tntdb::mysql::Statement Class Reference

#include <tntdb/mysql/impl/statement.h>

Inheritance diagram for tntdb::mysql::Statement:
tntdb::IStatement cxxtools::SimpleRefCounted

Public Member Functions

 Statement (Connection *conn, MYSQL *mysql, const std::string &query)
 ~Statement ()
void clear ()
void setNull (const std::string &col)
void setBool (const std::string &col, bool data)
void setShort (const std::string &col, short data)
void setInt (const std::string &col, int data)
void setLong (const std::string &col, long data)
void setUnsignedShort (const std::string &col, unsigned short data)
void setUnsigned (const std::string &col, unsigned data)
void setUnsignedLong (const std::string &col, unsigned long data)
void setInt32 (const std::string &col, int32_t data)
void setUnsigned32 (const std::string &col, uint32_t data)
void setInt64 (const std::string &col, int64_t data)
void setUnsigned64 (const std::string &col, uint64_t data)
void setDecimal (const std::string &col, const Decimal &data)
void setFloat (const std::string &col, float data)
void setDouble (const std::string &col, double data)
void setChar (const std::string &col, char data)
void setString (const std::string &col, const std::string &data)
void setBlob (const std::string &col, const Blob &data)
void setDate (const std::string &col, const Date &data)
void setTime (const std::string &col, const Time &data)
void setDatetime (const std::string &col, const Datetime &data)
size_type execute ()
tntdb::Result select ()
tntdb::Row selectRow ()
tntdb::Value selectValue ()
ICursorcreateCursor (unsigned fetchsize)
MYSQL_STMT * getStmt ()
 getStmt returns a MYSQL_STMT.
void execute (MYSQL_STMT *stmt, unsigned fetchsize)
void putback (MYSQL_STMT *stmt)
 Statement-handles retrieved by getStmt can be offered for reuse with this method.
MYSQL_FIELD * getFields ()
unsigned getFieldCount ()
- Public Member Functions inherited from tntdb::IStatement
virtual void setUString (const std::string &col, const cxxtools::String &data)
- Public Member Functions inherited from cxxtools::SimpleRefCounted
 SimpleRefCounted ()
 SimpleRefCounted (unsigned refs_)
virtual ~SimpleRefCounted ()
virtual unsigned addRef ()
virtual unsigned release ()
unsigned refs () const

Additional Inherited Members

- Public Types inherited from tntdb::IStatement
typedef unsigned size_type

Constructor & Destructor Documentation

tntdb::mysql::Statement::Statement ( Connection conn,
MYSQL *  mysql,
const std::string &  query 
)
tntdb::mysql::Statement::~Statement ( )

Member Function Documentation

void tntdb::mysql::Statement::clear ( )
virtual

Implements tntdb::IStatement.

ICursor* tntdb::mysql::Statement::createCursor ( unsigned  fetchsize)
virtual

Implements tntdb::IStatement.

size_type tntdb::mysql::Statement::execute ( )
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::execute ( MYSQL_STMT *  stmt,
unsigned  fetchsize 
)
unsigned tntdb::mysql::Statement::getFieldCount ( )
MYSQL_FIELD* tntdb::mysql::Statement::getFields ( )
MYSQL_STMT* tntdb::mysql::Statement::getStmt ( )

getStmt returns a MYSQL_STMT.

The caller is responsable to close the statement. If this class has already prepared a statement, this is returned and removed from this class.

void tntdb::mysql::Statement::putback ( MYSQL_STMT *  stmt)

Statement-handles retrieved by getStmt can be offered for reuse with this method.

Ownership is transfered back to this class. If there is already a statement, the offered statement is closed.

tntdb::Result tntdb::mysql::Statement::select ( )
virtual

Implements tntdb::IStatement.

tntdb::Row tntdb::mysql::Statement::selectRow ( )
virtual

Implements tntdb::IStatement.

tntdb::Value tntdb::mysql::Statement::selectValue ( )
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setBlob ( const std::string &  col,
const Blob data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setBool ( const std::string &  col,
bool  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setChar ( const std::string &  col,
char  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setDate ( const std::string &  col,
const Date data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setDatetime ( const std::string &  col,
const Datetime data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setDecimal ( const std::string &  col,
const Decimal data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setDouble ( const std::string &  col,
double  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setFloat ( const std::string &  col,
float  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setInt ( const std::string &  col,
int  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setInt32 ( const std::string &  col,
int32_t  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setInt64 ( const std::string &  col,
int64_t  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setLong ( const std::string &  col,
long  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setNull ( const std::string &  col)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setShort ( const std::string &  col,
short  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setString ( const std::string &  col,
const std::string &  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setTime ( const std::string &  col,
const Time data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setUnsigned ( const std::string &  col,
unsigned  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setUnsigned32 ( const std::string &  col,
uint32_t  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setUnsigned64 ( const std::string &  col,
uint64_t  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setUnsignedLong ( const std::string &  col,
unsigned long  data 
)
virtual

Implements tntdb::IStatement.

void tntdb::mysql::Statement::setUnsignedShort ( const std::string &  col,
unsigned short  data 
)
virtual

Implements tntdb::IStatement.


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