Also, SQLC doesn't allow for dynamic query building so think about an input search struct from which you may add where clauses — or not.
Also doesn't support multiple inserts with N rows being inserted.
Otherwise for standard queries, it's great.
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.
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.
If library supports named parameters they should be used by default in examples.
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.
For example I have original query:
SELECT * from users where following_count > $1 and followers_count < $2;
Then some refactoring later it becomes: SELECT * from users where enabled and followers_count < $1 and following_count > $2;
As I understand go API would not change it still query(int, int).