Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CL_DBCommand Class Reference

#include <db_command.h>

List of all members.

Public Member Functions

 CL_DBCommand (CL_DBConnection *database)
 Construction:.
 CL_DBCommand (const CL_String &sql_statement, CL_DBConnection *database)
 ~CL_DBCommand ()
int get_last_insert_rowid () const
 Attributes:.
int get_columns () const
const char * get_name (int column) const
int get_index (const char *name) const
int get_index (const CL_String &name) const
const char * get_decltype (int column) const
const char * get_decltype (const char *name) const
CL_ByteArray get_blob (int column) const
CL_ByteArray get_blob (const char *name) const
void get_blob (int column, CL_ByteArray &array) const
void get_blob (const char *name, CL_ByteArray &array) const
const void * get_blob_raw (int column) const
const void * get_blob_raw (const char *name) const
int get_blob_size (int column) const
int get_blob_size (const char *name) const
double get_double (int column) const
double get_double (const char *name) const
int get_int (int column) const
int get_int (const char *name) const
const char * get_text (int column) const
const char * get_text (const char *name) const
CL_DBReturnValue operator[] (int column) const
CL_DBReturnValue operator[] (const char *name) const
CL_DBReturnValue operator[] (const CL_String &name) const
int get_param_column (const char *name) const
void compile (const CL_String &sql_statement)
 Operations:.
void compile (const char *sql_statement)
void compilef (const char *sql_statement,...)
void set_param_double (int column, double value)
void set_param_double (const char *column_name, double value)
void set_param_int (int column, int value)
void set_param_int (const char *column_name, int value)
void set_param_blob (int column, const CL_ByteArray &blob)
void set_param_blob (const char *column_name, const CL_ByteArray &blob)
void set_param_text (int column, const char *text)
void set_param_text (const char *column_name, const char *text)
bool step ()
void reset ()

Private Attributes

CL_DBConnectiondb
 Implementation:.
sqlite3_stmt * vm
int last_insert_rowid


Constructor & Destructor Documentation

CL_DBCommand::CL_DBCommand CL_DBConnection database  ) 
 

Construction:.

Definition at line 43 of file db_command.cpp.

CL_DBCommand::CL_DBCommand const CL_String &  sql_statement,
CL_DBConnection database
 

Definition at line 48 of file db_command.cpp.

References compile().

CL_DBCommand::~CL_DBCommand  ) 
 

Definition at line 54 of file db_command.cpp.

References reset().


Member Function Documentation

void CL_DBCommand::compile const char *  sql_statement  ) 
 

Definition at line 229 of file db_command.cpp.

References cl_log_event(), CL_DBConnection::db, db, CL_DBConnection::mutex, reset(), and vm.

void CL_DBCommand::compile const CL_String &  sql_statement  ) 
 

Operations:.

Definition at line 224 of file db_command.cpp.

Referenced by CL_DBCommand(), and compilef().

void CL_DBCommand::compilef const char *  sql_statement,
  ...
 

Definition at line 244 of file db_command.cpp.

References compile(), db, and CL_DBConnection::mutex.

void CL_DBCommand::get_blob const char *  name,
CL_ByteArray array
const
 

Definition at line 141 of file db_command.cpp.

References get_blob(), and get_index().

void CL_DBCommand::get_blob int  column,
CL_ByteArray array
const
 

Definition at line 127 of file db_command.cpp.

References db, CL_DBConnection::mutex, CL_ByteArray::set_size(), and vm.

CL_ByteArray CL_DBCommand::get_blob const char *  name  )  const
 

Definition at line 121 of file db_command.cpp.

References db, get_blob(), get_index(), and CL_DBConnection::mutex.

CL_ByteArray CL_DBCommand::get_blob int  column  )  const
 

Definition at line 114 of file db_command.cpp.

Referenced by CL_DBReturnValue::get_blob(), and get_blob().

const void * CL_DBCommand::get_blob_raw const char *  name  )  const
 

Definition at line 152 of file db_command.cpp.

References get_blob_raw(), and get_index().

const void * CL_DBCommand::get_blob_raw int  column  )  const
 

Definition at line 146 of file db_command.cpp.

References db, CL_DBConnection::mutex, and vm.

Referenced by CL_DBReturnValue::get_blob_raw(), and get_blob_raw().

int CL_DBCommand::get_blob_size const char *  name  )  const
 

Definition at line 163 of file db_command.cpp.

References get_blob_size(), and get_index().

int CL_DBCommand::get_blob_size int  column  )  const
 

Definition at line 157 of file db_command.cpp.

References db, CL_DBConnection::mutex, and vm.

Referenced by CL_DBReturnValue::get_blob_size(), and get_blob_size().

int CL_DBCommand::get_columns  )  const
 

Definition at line 67 of file db_command.cpp.

References db, CL_DBConnection::mutex, and vm.

Referenced by get_index().

const char * CL_DBCommand::get_decltype const char *  name  )  const
 

Definition at line 108 of file db_command.cpp.

References db, get_index(), CL_DBConnection::mutex, and vm.

const char * CL_DBCommand::get_decltype int  column  )  const
 

Definition at line 102 of file db_command.cpp.

References db, CL_DBConnection::mutex, and vm.

double CL_DBCommand::get_double const char *  name  )  const
 

Definition at line 174 of file db_command.cpp.

References get_double(), and get_index().

double CL_DBCommand::get_double int  column  )  const
 

Definition at line 168 of file db_command.cpp.

References db, CL_DBConnection::mutex, and vm.

Referenced by CL_DBReturnValue::get_double(), and get_double().

int CL_DBCommand::get_index const CL_String &  name  )  const
 

Definition at line 97 of file db_command.cpp.

References get_index().

int CL_DBCommand::get_index const char *  name  )  const
 

Definition at line 79 of file db_command.cpp.

References CL_String, db, get_columns(), CL_DBConnection::mutex, TEXT, CL_StringHelp::utf8_to_text(), and vm.

Referenced by get_blob(), get_blob_raw(), get_blob_size(), get_decltype(), get_double(), get_index(), get_int(), get_text(), and operator[]().

int CL_DBCommand::get_int const char *  name  )  const
 

Definition at line 185 of file db_command.cpp.

References get_index(), and get_int().

int CL_DBCommand::get_int int  column  )  const
 

Definition at line 179 of file db_command.cpp.

References db, CL_DBConnection::mutex, and vm.

Referenced by CL_DBReturnValue::get_int(), and get_int().

int CL_DBCommand::get_last_insert_rowid  )  const
 

Attributes:.

Definition at line 62 of file db_command.cpp.

References last_insert_rowid.

const char * CL_DBCommand::get_name int  column  )  const
 

Definition at line 73 of file db_command.cpp.

References db, CL_DBConnection::mutex, and vm.

int CL_DBCommand::get_param_column const char *  name  )  const
 

Definition at line 216 of file db_command.cpp.

Referenced by set_param_blob(), set_param_double(), set_param_int(), and set_param_text().

const char * CL_DBCommand::get_text const char *  name  )  const
 

Definition at line 196 of file db_command.cpp.

References get_index(), and get_text().

const char * CL_DBCommand::get_text int  column  )  const
 

Definition at line 190 of file db_command.cpp.

References db, CL_DBConnection::mutex, and vm.

Referenced by CL_DBReturnValue::get_text(), and get_text().

CL_DBReturnValue CL_DBCommand::operator[] const CL_String &  name  )  const
 

Definition at line 211 of file db_command.cpp.

References get_index().

CL_DBReturnValue CL_DBCommand::operator[] const char *  name  )  const
 

Definition at line 206 of file db_command.cpp.

References get_index().

CL_DBReturnValue CL_DBCommand::operator[] int  column  )  const
 

Definition at line 201 of file db_command.cpp.

void CL_DBCommand::reset  ) 
 

Definition at line 331 of file db_command.cpp.

References CL_DBConnection::db, db, last_insert_rowid, CL_DBConnection::mutex, and vm.

Referenced by compile(), step(), and ~CL_DBCommand().

void CL_DBCommand::set_param_blob const char *  column_name,
const CL_ByteArray blob
 

Definition at line 285 of file db_command.cpp.

References get_param_column(), and set_param_blob().

void CL_DBCommand::set_param_blob int  column,
const CL_ByteArray blob
 

Definition at line 281 of file db_command.cpp.

Referenced by set_param_blob().

void CL_DBCommand::set_param_double const char *  column_name,
double  value
 

Definition at line 267 of file db_command.cpp.

References get_param_column(), and set_param_double().

void CL_DBCommand::set_param_double int  column,
double  value
 

Definition at line 263 of file db_command.cpp.

Referenced by set_param_double().

void CL_DBCommand::set_param_int const char *  column_name,
int  value
 

Definition at line 276 of file db_command.cpp.

References get_param_column(), and set_param_int().

void CL_DBCommand::set_param_int int  column,
int  value
 

Definition at line 272 of file db_command.cpp.

Referenced by set_param_int().

void CL_DBCommand::set_param_text const char *  column_name,
const char *  text
 

Definition at line 294 of file db_command.cpp.

References get_param_column(), and set_param_text().

void CL_DBCommand::set_param_text int  column,
const char *  text
 

Definition at line 290 of file db_command.cpp.

Referenced by set_param_text().

bool CL_DBCommand::step  ) 
 

Definition at line 299 of file db_command.cpp.

References CL_DBConnection::db, db, last_insert_rowid, CL_DBConnection::mutex, reset(), CL_System::sleep(), TEXT, and vm.


Member Data Documentation

CL_DBConnection* CL_DBCommand::db [private]
 

Implementation:.

Definition at line 130 of file db_command.h.

Referenced by compile(), compilef(), get_blob(), get_blob_raw(), get_blob_size(), get_columns(), get_decltype(), get_double(), get_index(), get_int(), get_name(), get_text(), reset(), and step().

int CL_DBCommand::last_insert_rowid [private]
 

Definition at line 134 of file db_command.h.

Referenced by get_last_insert_rowid(), reset(), and step().

sqlite3_stmt* CL_DBCommand::vm [private]
 

Definition at line 132 of file db_command.h.

Referenced by compile(), get_blob(), get_blob_raw(), get_blob_size(), get_columns(), get_decltype(), get_double(), get_index(), get_int(), get_name(), get_text(), reset(), and step().


The documentation for this class was generated from the following files:
Generated on Sat Feb 19 22:51:17 2005 for npcore by  doxygen 1.4.1