volatiletech / sqlboiler

Generate a Go ORM tailored to your database schema.
BSD 3-Clause "New" or "Revised" License
6.73k stars 544 forks source link

Exposing queries package internals #276

Closed edoshor closed 6 years ago

edoshor commented 6 years ago

We use sqlboiler in almost all of our go apps and we love it. Thanks.

Quite often we reach out to Raw queries. Be it DB specific stuff or really complex queries we still use the library for that (binding, etc...).

It would make our lives a lot easier if the logic in query_builders.go would have public access. So when we build our sql strings we could utilize the query mods system (we reuse that across the app) to generate sql snippets.

aarondl commented 6 years ago

@edoshor I'm glad you guys are enjoying it!

It doesn't cost us anything in any way to expose those so I'll go ahead and do this in v3.

edoshor commented 6 years ago

Thanks a lot. Looking for v3 then (^_^)

aarondl commented 6 years ago

Hey @edoshor, was looking at this briefly and was trying to understand which functions appeal in the queries module. You mentioned the query mods system but that's already completely exported. Anything specific you can give me?

edoshor commented 6 years ago

The main query building function buildQuery was all we needed.

aarondl commented 6 years ago

Done.