Sqlc: Data access simplified. Throw away your ORM
docs.sqlc.dev
Sqlc: Data access simplified. Throw away your ORM
1–10 of 24 posts
Re: Sqlc: Data access simplified. Throw away your ORM
#2Re: Sqlc: Data access simplified. Throw away your ORM
#3If library supports named parameters they should be used by default in examples.
Re: Sqlc: Data access simplified. Throw away your ORM
#4I have a little research[1] on dynamic queries.
[1]: https://github.com/baverman/sqlbind?tab=readme-ov-file#dynam...
Re: Sqlc: Data access simplified. Throw away your ORM
#5This is cool, but most ORMs have support for raw SQL.
Re: Sqlc: Data access simplified. Throw away your ORM
#6Static templates for SQL becomes a chore to express dynamic queries. A dynamic query depends from incoming request. For example search filters should add or delete conditional expressions for a query. I have a little research[1] on dynamic queries. [1]: https://github.com/baverman/sqlbind?tab=readme-ov-file#dynam...
For me, I write almost nothing but static queries, SQLc is just so much nicer to use.
I don't mind having to do the odd dynamic query from scratch.
I just wish sqlc supported named Params in MySQL, the resulting function param ordering is a little annoying.
Re: Sqlc: Data access simplified. Throw away your ORM
#7This is cool, but most ORMs have support for raw SQL.
SQLc you write the queries, it generates the boilerplate functions to execute them.
This works better than an ORM because you don't have to deal with an ORM.
Re: Sqlc: Data access simplified. Throw away your ORM
#8Re: Sqlc: Data access simplified. Throw away your ORM
#9Re: Sqlc: Data access simplified. Throw away your ORM
#10Static templates for SQL becomes a chore to express dynamic queries. A dynamic query depends from incoming request. For example search filters should add or delete conditional expressions for a query. I have a little research[1] on dynamic queries. [1]: https://github.com/baverman/sqlbind?tab=readme-ov-file#dynam...
If you're writing a lot of dynamic queries I think you should opt for a query builder, not an orm. For me, I write almost nothing but static queries, SQLc is just so much nicer to use. I don't mind having to do the odd dynamic query from scratch. I just wish sqlc supported named Params in MySQL, the resulting function param ordering is a little annoying.
And a big NO-NO for me templates force you to repeat the same SQL in many slightly different queries. SQL composability is not a thing with templates.