OpenKO Database Model
Table- and column-level documentation generated from the jsonSchema
Loading...
Searching...
No Matches
storedProc::StoredProcedure Class Referenceexport
module StoredProc

Public Member Functions

void set_connection (const std::shared_ptr< nanodbc::connection > &conn)
 Sets the associated database connection.
 
void flush ()
 Flushes any output variables or return values by reading any and all result sets.
 

Protected Member Functions

 StoredProcedure (std::shared_ptr< nanodbc::connection > conn)
 
void prepare (const std::string &query) noexcept(false)
 Opens and prepares the statement with the associated query.
 
void flush_on_destruct ()
 Flushes any output variables or return values on destruction.
 
std::weak_ptr< nanodbc::result > execute () noexcept(false)
 Executes the currently prepared statement.
 
void skip_rows_in_result_set ()
 

Protected Attributes

std::shared_ptr< nanodbc::connection > _conn
 
nanodbc::statement _stmt
 
std::shared_ptr< nanodbc::result > _result
 
bool _flushed
 

Static Protected Attributes

static const nanodbc::string SqlState_InvalidCursorState = NANODBC_TEXT("24000")
 

Member Function Documentation

◆ execute()

std::weak_ptr< nanodbc::result > storedProc::StoredProcedure::execute ( )
inlineprotected

Executes the currently prepared statement.

Exceptions
nanodbc::database_error
Returns
a result set, if applicable

◆ prepare()

void storedProc::StoredProcedure::prepare ( const std::string & query)
inlineprotected

Opens and prepares the statement with the associated query.

Exceptions
nanodbc::database_error

The documentation for this class was generated from the following file: