-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convenience exec/query overloads that do parameterized SQL #118
Comments
One other simple possibility is to expand the For example: auto prep = conn.prepare("SELECT * FROM mytable WHERE id=? AND name=?");
foreach(r; prep.query(7, "Frank")) { ... } If you do go for the one liner, one thing that the current implementation makes a bit cumbersome is that you have to store the |
FWIW, in my NIH version of |
FWIW, The refcoutning problem @schveiguy refers to above was fixed in v1.1.4 (see second-to-last bullet item under v1.4.4) |
Nice. I may be able to just about eliminate my templates that do this :) |
I have to come back here to say, was able to trim out ALL of my cruft in my DB wrapper. Things in mysql-native are looking awesome!
I was able to delete probably about 130 lines of code from my project that just dealt with wrapping and lifetime. Kudos! |
Glad to hear it! |
...using prepared statements behind-the scenes.
Ie:
conn.query("SELECT * FROM mytable WHERE id=? AND name=?", 7, "Frank")
The text was updated successfully, but these errors were encountered: