Skip to content
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

Add ability to force a Dataset query to run as prepared. #7

Closed
doug-martin opened this issue Mar 13, 2015 · 0 comments
Closed

Add ability to force a Dataset query to run as prepared. #7

doug-martin opened this issue Mar 13, 2015 · 0 comments

Comments

@doug-martin
Copy link
Owner

Currently all statements are interpolated by Dataset if run directly. I would be nice to specify that the dataset should use a prepared statement.

var items []Item
db.From("item").Prepared(true).Where(goqu.Ex{"id": 10}).ScanStructs(&items)

This might also entail adding a statement cacher to prevent the same query from being prepared multiple times.

doug-martin added a commit that referenced this issue Mar 14, 2015
* Changed sql generation methods to use a common naming convention. `To(Sql|Insert|Update|Delete)`
   * Also changed to have common return values `string, []interface{}, error)`
* Added `Dataset.Prepared` which allows a user to specify whether or not SQL should be interpolated. #7
* Updated Docs
    * More examples
* Increased test coverage.
doug-martin added a commit that referenced this issue Mar 14, 2015
* Changed sql generation methods to use a common naming convention. `To(Sql|Insert|Update|Delete)`
   * Also changed to have common return values `string, []interface{}, error)`
* Added `Dataset.Prepared` which allows a user to specify whether or not SQL should be interpolated. #7
* Updated Docs
    * More examples
* Increased test coverage.
doug-martin added a commit that referenced this issue Mar 14, 2015
* Changed sql generation methods to use a common naming convention. `To(Sql|Insert|Update|Delete)`
   * Also changed to have common return values `string, []interface{}, error)`
* Added `Dataset.Prepared` which allows a user to specify whether or not SQL should be interpolated. #7
* Updated Docs
    * More examples
* Increased test coverage.
doug-martin added a commit that referenced this issue Mar 14, 2015
* Changed sql generation methods to use a common naming convention. `To(Sql|Insert|Update|Delete)`
   * Also changed to have common return values `string, []interface{}, error)`
* Added `Dataset.Prepared` which allows a user to specify whether or not SQL should be interpolated. #7
* Updated Docs
    * More examples
* Increased test coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant