Diesel offers a high level query builder and lets you think about your problems in rust, not sql. Our focus on zero-cost abstractions allows diesel to run your query and load your data even faster than c. Unlike active record and other orms, diesel is designed to be abstracted over. Diesel enables you to write reusable code and think in terms of your problem domain and not sql.
Types which represent the result of a sql query implement a trait called queryable. You can find all the types supported by diesel in the sqltypes module. It takes full advantage of rusts type system to create a low overhead query builder that feels like rust. Unless you explicitly state otherwise, any contribution you intentionally submit for inclusion in the work, as defined in the apache-2.
0 license, shall be dual-licensed as above, without any additional terms or conditions. Sgrifdiesel, a safe, extensible orm and query builder for rust api documentation latest release master branch homepage diesel gets rid of the boilerplate for da. Diesel gets rid of the boilerplate for database interaction and eliminates runtime errors without sacrificing performance. It takes full advantage of rusts type system to create a low overhead query builder that feels like rust.
Now that we know how to create a project that uses diesel orm to interact with databases in rust, lets take a look at how to create a project that uses sqlx instead. Start by running the command below lately i have been playing around and enjoyed learning about the rust programming. When started such a project there are usually two options everything is brand new, there is no existing database - the dabase can be generated from the data types used in the program. .