-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganise query execution functions. (#580)
Reorganise query execution functions. Puts all the various ways to execute an SQL command into 3 categories: 1. "exec" functions return `result` (generally). 2. "query" functions wrap "exec" ones, plus string conversion. 3. "stream" functions are like "query" ones, but stream the query. To make these things fall into place, I'm renaming the recently added `for_each()` to `for_stream()`, and providing a `for_query()` cousin. Eventually, I hope `pqxx::result` can just _disappear_ from most users' consciousness. The normal ways to execute a query will be... * _exec0_ just for queries that return no data, * _query_ functions for small result sets or exotic queries, and * _stream_ functions for regular queries returning large result sets. (As a separate effort, I would like to integrate use of parameterised statements into the regular execution functions, so you just pass some `pqxx::params` to those basic functions. Un-parameterised statements will be nothing but a hidden optimisation.)
- Loading branch information
Showing
7 changed files
with
319 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.