3 ms·
> This query can’t be represented in Diesel’s DSL (a sample of the DSL is demonstrated in Diesel’s getting started). I feel like most of the time, SQL DSLs end
by RcouF1uZ4gsC 5y ago
> This query can’t be represented in Diesel’s DSL (a sample of the DSL is demonstrated in Diesel’s getting started).
I feel like most of the time, SQL DSLs end up being bad. SQL is already a very high level language. There are a ton of examples of how to do stuff with SQL queries. DSLs, even if they have a way to express the SQL, are not nearly as widespread as SQL and then you will have to spend time figuring out how to translate the SQL into the DSL.
In addition, with libraries like sqlx for Rust, you can also get the type safety of a DSL using regular SQL.
I would say that as a developer, the time spent getting familiar with SQL is a good investment that will likely pay off across many projects and programming languages.