Closed stevencothren closed 9 years ago
Hi steven, thanks for your interest on the project.
Right now, lookupQuery is exposed through Raw func (d DotSql) Raw(name string) (string, error)
, I've added it so I can use dotsql with sql extensions like https://github.com/jmoiron/sqlx, and also compose more elaborated queries (like bulk INSERTs).
About exposing all loaded query names, I don't see a benefit on that, I mean, you should know wich queries are inside your files, do you see any benefit?
Adding queries after initial file has been loaded sounds great, and I think it's related to #5, now, the purpose of dotsql is to avoid writing sql in your code, don't think that saving a file makes sense.
Hi, I have just started looking at this project and I've had a couple of ideas. I wanted to see what your thoughts are and if the ideas are in line with where you are taking this project.
What do you think about exposing lookupQuery, so that callers can retrieve the SQL? What about exposing the ability to get all of the loaded query names?
How about adding a method to add queries after the initial file is loaded? Perhaps have the ability for dotsql to write out a valid config file that includes these newly added queries?
I guess I am seeing it as a potential query manager, but perhaps that should be a higher level application that just uses dotsql?