relops / sqlc

Other
101 stars 8 forks source link

suggestion to improve the API #11

Closed alokmenghrajani closed 7 years ago

alokmenghrajani commented 8 years ago

I think the API would be nicer if you start with the db. I.e. db.Select(...).From(...).Query(). It also avoids having to specify the dialect each time.

I attempted to do this on my fork (see https://github.com/alokmenghrajani/sqlc/commit/f441c535542f1e365b91c65f5a6ff072df2be484), but I'm not sure if you care about keeping the API backwards compatible.