Represents a prepared statement in PostgreSQL.
More...
#include <relx/connection/postgresql_statement.hpp>
Represents a prepared statement in PostgreSQL.
Definition at line 20 of file postgresql_statement.hpp.
◆ PostgreSQLStatement() [1/3]
| relx::connection::PostgreSQLStatement::PostgreSQLStatement |
( |
PostgreSQLConnection & |
connection, |
|
|
std::string |
name, |
|
|
std::string |
sql, |
|
|
int |
param_count |
|
) |
| |
Constructor.
- Parameters
-
| connection | The connection that owns this prepared statement |
| name | The name of the prepared statement |
| sql | The SQL query text |
| param_count | The number of parameters in the statement |
◆ ~PostgreSQLStatement()
| relx::connection::PostgreSQLStatement::~PostgreSQLStatement |
( |
| ) |
|
Destructor that deallocates the prepared statement.
◆ PostgreSQLStatement() [2/3]
◆ PostgreSQLStatement() [3/3]
◆ execute()
Execute the prepared statement with parameters.
- Parameters
-
| params | Vector of parameter values |
- Returns
- Result containing the query results or an error
◆ execute_typed()
template<typename... Args>
Execute the prepared statement with typed parameters.
- Template Parameters
-
| Args | The types of the parameters |
- Parameters
-
- Returns
- Result containing the query results or an error
Definition at line 51 of file postgresql_statement.hpp.
◆ is_valid()
| bool relx::connection::PostgreSQLStatement::is_valid |
( |
| ) |
const |
|
inline |
Check if the statement is still valid.
- Returns
- True if the statement is valid, false otherwise
Definition at line 103 of file postgresql_statement.hpp.
◆ name()
| const std::string & relx::connection::PostgreSQLStatement::name |
( |
| ) |
const |
|
inline |
Get the name of the prepared statement.
- Returns
- The name of the prepared statement
Definition at line 91 of file postgresql_statement.hpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ param_count()
| int relx::connection::PostgreSQLStatement::param_count |
( |
| ) |
const |
|
inline |
◆ sql()
| const std::string & relx::connection::PostgreSQLStatement::sql |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: