Async PostgreSQL streaming data source for processing large result sets.
More...
#include <relx/connection/postgresql_async_streaming_source.hpp>
Async PostgreSQL streaming data source for processing large result sets.
This class implements an async-compatible data source interface. It uses PostgreSQL's single-row mode with async operations to fetch results incrementally.
Definition at line 33 of file postgresql_async_streaming_source.hpp.
◆ PostgreSQLAsyncStreamingSource() [1/3]
| relx::connection::PostgreSQLAsyncStreamingSource::PostgreSQLAsyncStreamingSource |
( |
PostgreSQLAsyncConnection & |
connection, |
|
|
std::string |
sql, |
|
|
std::vector< std::string > |
params = {} |
|
) |
| |
Constructor with async connection and query parameters.
- Parameters
-
| connection | Async PostgreSQL connection to use for queries |
| sql | The SQL query string to execute |
| params | Optional query parameters |
◆ ~PostgreSQLAsyncStreamingSource()
| relx::connection::PostgreSQLAsyncStreamingSource::~PostgreSQLAsyncStreamingSource |
( |
| ) |
|
Destructor that cleans up any active query.
◆ PostgreSQLAsyncStreamingSource() [2/3]
◆ PostgreSQLAsyncStreamingSource() [3/3]
◆ async_cleanup()
| boost::asio::awaitable< void > relx::connection::PostgreSQLAsyncStreamingSource::async_cleanup |
( |
| ) |
|
Explicitly cleanup any active query asynchronously.
- Returns
- Awaitable that resolves when cleanup is complete
◆ get_column_names()
| const std::vector< std::string > & relx::connection::PostgreSQLAsyncStreamingSource::get_column_names |
( |
| ) |
const |
Get the column names for the result set.
- Returns
- Vector of column names
◆ get_connection()
◆ get_next_row()
| boost::asio::awaitable< std::optional< std::string > > relx::connection::PostgreSQLAsyncStreamingSource::get_next_row |
( |
| ) |
|
Get the next row from the result set asynchronously.
- Returns
- Awaitable that resolves to optional string containing the next row data
Returns row data in the format "col1|col2|col3|..." for compatibility with LazyRow
◆ has_more_rows()
| bool relx::connection::PostgreSQLAsyncStreamingSource::has_more_rows |
( |
| ) |
const |
|
inline |
◆ initialize()
| boost::asio::awaitable< ConnectionResult< void > > relx::connection::PostgreSQLAsyncStreamingSource::initialize |
( |
| ) |
|
Initialize the streaming query asynchronously.
- Returns
- Awaitable that resolves to success or failure
◆ is_initialized()
| bool relx::connection::PostgreSQLAsyncStreamingSource::is_initialized |
( |
| ) |
const |
|
inline |
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following file: