A disconnected buffer of rows fetched from a Statement's result set.
More...
#include <RowSet.h>
|
| | RowSet (Statement &statement, unsigned maxRows) |
| | Fetches up to maxRows rows from the current result set of statement.
|
| |
| | RowSet (Statement &statement, unsigned maxRows, bool includeCurrentRow) |
| | Fetches up to maxRows rows from the current result set of statement.
|
| |
| | RowSet (RowSet &&o) noexcept |
| |
| RowSet & | operator= (RowSet &&o) noexcept |
| |
|
| RowSet (const RowSet &)=delete |
| |
|
RowSet & | operator= (const RowSet &)=delete |
| |
| unsigned | getCount () const noexcept |
| | Returns the number of rows actually fetched.
|
| |
| unsigned | getMessageLength () const noexcept |
| | Returns the message length (in bytes) of each row.
|
| |
| Row | getRow (unsigned index) |
| | Returns a Row view for typed access to the row at index.
|
| |
| std::span< const std::byte > | getRawRow (unsigned index) const |
| | Returns a span over the raw data of the row at index.
|
| |
| const std::vector< std::byte > & | getRawBuffer () const noexcept |
| | Returns the entire contiguous buffer containing all fetched rows.
|
| |
A disconnected buffer of rows fetched from a Statement's result set.
Rows are fetched into a contiguous buffer at construction time. After construction the RowSet is independent of its source Statement and can be used, moved, or destroyed freely.
Definition at line 55 of file RowSet.h.
◆ RowSet() [1/3]
| RowSet::RowSet |
( |
Statement & |
statement, |
|
|
unsigned |
maxRows |
|
) |
| |
|
explicit |
Fetches up to maxRows rows from the current result set of statement.
The statement must have an open result set (i.e. execute() was called and it is a SELECT-type statement). Rows are fetched via IResultSet::fetchNext() directly into the internal buffer.
- Parameters
-
| statement | The statement with an open result set. |
| maxRows | Maximum number of rows to fetch. |
Definition at line 35 of file RowSet.cpp.
◆ RowSet() [2/3]
| RowSet::RowSet |
( |
Statement & |
statement, |
|
|
unsigned |
maxRows, |
|
|
bool |
includeCurrentRow |
|
) |
| |
|
explicit |
Fetches up to maxRows rows from the current result set of statement.
When includeCurrentRow is true, the current output message already fetched by statement.execute() is copied as the first row before fetching the remaining rows from the result set.
Definition at line 40 of file RowSet.cpp.
◆ RowSet() [3/3]
| fbcpp::RowSet::RowSet |
( |
RowSet && |
o | ) |
|
|
inlinenoexcept |
◆ getCount()
| unsigned fbcpp::RowSet::getCount |
( |
| ) |
const |
|
inlinenoexcept |
Returns the number of rows actually fetched.
Definition at line 120 of file RowSet.h.
◆ getMessageLength()
| unsigned fbcpp::RowSet::getMessageLength |
( |
| ) |
const |
|
inlinenoexcept |
Returns the message length (in bytes) of each row.
Definition at line 128 of file RowSet.h.
◆ getRawBuffer()
| const std::vector< std::byte > & fbcpp::RowSet::getRawBuffer |
( |
| ) |
const |
|
inlinenoexcept |
Returns the entire contiguous buffer containing all fetched rows.
Definition at line 157 of file RowSet.h.
◆ getRawRow()
| std::span< const std::byte > fbcpp::RowSet::getRawRow |
( |
unsigned |
index | ) |
const |
|
inline |
Returns a span over the raw data of the row at index.
- Parameters
-
Definition at line 147 of file RowSet.h.
◆ getRow()
| Row fbcpp::RowSet::getRow |
( |
unsigned |
index | ) |
|
|
inline |
Returns a Row view for typed access to the row at index.
- Parameters
-
Definition at line 137 of file RowSet.h.
◆ operator=()
The documentation for this class was generated from the following files: