libdballe  7.6
Public Member Functions | Data Fields | Protected Member Functions
dballe::db::ODBCStatement Struct Reference

ODBC statement. More...

#include <internals.h>

Inheritance diagram for dballe::db::ODBCStatement:
dballe::db::Sequence

Public Member Functions

 ODBCStatement (ODBCConnection &conn)
 
 ODBCStatement (const ODBCStatement &)=delete
 
 ODBCStatement (const ODBCStatement &&)=delete
 
ODBCStatementoperator= (const ODBCStatement &)=delete
 
void bind_in (int idx, const int &val)
 
void bind_in (int idx, const int &val, const SQLLEN &ind)
 
void bind_in (int idx, const unsigned &val)
 
void bind_in (int idx, const unsigned &val, const SQLLEN &ind)
 
void bind_in (int idx, const unsigned short &val)
 
void bind_in (int idx, const unsigned short &val, const SQLLEN &ind)
 
void bind_in (int idx, const char *val)
 
void bind_in (int idx, const char *val, const SQLLEN &ind)
 
void bind_in (int idx, const std::string &val)
 
void bind_in (int idx, const SQL_TIMESTAMP_STRUCT &val)
 
void bind_out (int idx, int &val)
 
void bind_out (int idx, int &val, SQLLEN &ind)
 
void bind_out (int idx, unsigned &val)
 
void bind_out (int idx, unsigned &val, SQLLEN &ind)
 
void bind_out (int idx, unsigned short &val)
 
void bind_out (int idx, unsigned short &val, SQLLEN &ind)
 
void bind_out (int idx, char *val, SQLLEN buflen)
 
void bind_out (int idx, char *val, SQLLEN buflen, SQLLEN &ind)
 
void bind_out (int idx, SQL_TIMESTAMP_STRUCT &val)
 
void bind_out (int idx, SQL_TIMESTAMP_STRUCT &val, SQLLEN &ind)
 
void prepare (const char *query)
 
void prepare (const char *query, int qlen)
 
void prepare (const std::string &query)
 
int execute ()
 
int execute_and_close ()
 
int exec_direct_and_close (const char *query, int qlen)
 
void execute_ignoring_results ()
 
int columns_count ()
 
bool fetch ()
 
bool fetch_expecting_one ()
 
void close_cursor ()
 
void close_cursor_if_needed ()
 
size_t select_rowcount ()
 Row count for select operations.
 
size_t rowcount ()
 Row count for insert, delete and other non-select operations.
 
void set_cursor_forward_only ()
 
void set_cursor_static ()
 

Data Fields

const ODBCConnectionconn
 
SQLHSTMT stm = nullptr
 
const char * ignore_error = nullptr
 If non-NULL, ignore all errors with this code.
 

Protected Member Functions

bool error_is_ignored ()
 
bool is_error (int sqlres)
 

Detailed Description

ODBC statement.

Member Function Documentation

int dballe::db::ODBCStatement::columns_count ( )
Returns
the number of columns in the result set (or 0 if the statement did not return columns)
int dballe::db::ODBCStatement::exec_direct_and_close ( const char *  query,
int  qlen 
)
Returns
SQLExecute's result
int dballe::db::ODBCStatement::execute ( )
Returns
SQLExecute's result
int dballe::db::ODBCStatement::execute_and_close ( )
Returns
SQLExecute's result

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