forked from jtv/libpqxx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`stream_query`: like `stream_from` but stronger-typed. It's becoming clear that `stream_from` was too weakly typed. Why would anyone want to read different rows of the same query result as different column types? Too many corner cases, too much complication, too much code that really doesn't deliver any value to the user. The new code is not only simpler, but faster as well. In C++20 or C++23 I may turn it into a generator, so that the compiler may be able to elide the heap-stored stack frame, which would turn some data members into local variables, which in turn may allow more aggressive optimisation.
- Loading branch information
Showing
25 changed files
with
899 additions
and
161 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
#include <pqxx/internal/callgate.hxx> | ||
#if !defined(PQXX_H_CONNECTION_STREAM_FROM) | ||
# define PQXX_H_CONNECTION_STREAM_FROM | ||
|
||
#include "pqxx/connection.hxx" | ||
# include <pqxx/internal/callgate.hxx> | ||
|
||
# include "pqxx/connection.hxx" | ||
|
||
namespace pqxx::internal::gate | ||
{ | ||
class PQXX_PRIVATE connection_stream_from : callgate<connection> | ||
// Not publicising this call gate to specific classes. We also use it in | ||
// stream_query, which is a template. | ||
struct PQXX_PRIVATE connection_stream_from : callgate<connection> | ||
{ | ||
friend class pqxx::stream_from; | ||
|
||
connection_stream_from(reference x) : super{x} {} | ||
|
||
auto read_copy_line() { return home().read_copy_line(); } | ||
}; | ||
} // namespace pqxx::internal::gate | ||
#endif |
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.