One major downside of ORMs is typically the complexity of doing things that are outside the happy path. SQL—the language relational databases use—is standardized but its types are not always compatible with what the application is doing. In this recipe, we'll explore a few ways to run more advanced queries in Rust's diesel-rs.
Running advanced queries using an ORM
Getting ready
Create a Rust binary project using cargo new advanced-orm and make sure that port 8081 is accessible from the localhost. To access the services, get a program such as curl or Postman to execute POST, GET, and more type web requests, as well as a program to create and manage SQLite (https://www.sqlite.org/index.html) databases...