You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, let us say I have a query like "SELECT id, name, slug FROM product" which I am already using in my code else where. Now I want to add more conditions on top of that using sqlbuilder. Is there a way to parse this into a select statement? I have tried the following
There is no such feature right now. I'm considering how to support it. One possible design is that: When building a SQL, Builders ignore all parts which is not set.
For instance, if we don't call Select and From on a SelectBuilder, the SELECT and FROM clause are completely missing in the final output.
Thanks, that sounds useful. one very useful thing this unlocks is being able to use this sqlc. Use sqlc to generate models from a query, and add dynamic where and pagination clauses using this library.
For example, let us say I have a query like "SELECT id, name, slug FROM product" which I am already using in my code else where. Now I want to add more conditions on top of that using sqlbuilder. Is there a way to parse this into a select statement? I have tried the following
But this prints
With an extra select from. Is this a valid usecase for this library?
Thanks for any help, the library seems awesome!
The text was updated successfully, but these errors were encountered: