db_conn
v0.2.1-alpha
Database Connection API
|
statement - is a class that manages native driver statement handle. More...
#include <statement.hpp>
Public Member Functions | |
statement (statement &&stmt) | |
Move constructor. More... | |
statement & | operator= (statement &&stmt) |
Assignment operator. More... | |
void | prepare (const std::string &sql) |
Function prepares dynamic SQL statement. More... | |
void | call (const std::string &proc) |
Function prepares SQL stored procedure. More... | |
result_set | execute () |
Function runs last executed SQL statement. More... | |
result_set | execute (const std::string &sql, bool cursor=false, bool scrollable=false) |
Function runs SQL statement. More... | |
bool | cancel () |
Function cancels currently running SQL statements. More... | |
int | proc_retval () |
Function returns stored procedure return value. More... | |
statement - is a class that manages native driver statement handle.
statement object cannot be instantiated directly, only via connection get_statement() function call. statement objects automatically delete the native statement handle they manage as soon as they themselves are destroyed, or as soon as their value changes by an assignment operation. When an assignment operation takes place between two statement objects, ownership of native statement handle is transferred, which means that the object losing ownership is no longer has access to the native statement handle.
Definition at line 72 of file statement.hpp.
|
inline |
|
inline |
Function prepares SQL stored procedure.
proc | stored procedure to be executed |
Definition at line 108 of file statement.hpp.
|
inline |
Function cancels currently running SQL statements.
Definition at line 138 of file statement.hpp.
|
inline |
Function runs last executed SQL statement.
Definition at line 117 of file statement.hpp.
|
inline |
Function runs SQL statement.
sql | statement to be executed |
cursor | = true to use cursor with select statements |
scrollable | = true to use scrollable cursor |
Definition at line 129 of file statement.hpp.
|
inline |
Function prepares dynamic SQL statement.
sql | statement to be executed |
Definition at line 99 of file statement.hpp.
|
inline |
Function returns stored procedure return value.
This function must be called after all result sets from stored proc select statements had been processed
Definition at line 149 of file statement.hpp.