2005/5/9

     
 

class LiteTable

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::sql::sqlite::LiteTable Class Reference

#include <LiteTable.h>

Inheritance diagram for acdk::sql::sqlite::LiteTable:

acdk::lang::Object acdk::util::Iterator acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch List of all members.

Detailed Description

Wrapper for the C Api of SQLite.

Represents a result from a prepared statment In most cases this class will not be used in user code Different to JDBC, internal indeces for columns starts with 0


Public Member Functions

 LiteTable (IN(RLiteDb) db, sqlite3_stmt *stm)
 ~LiteTable ()
bool hasNext ()
 for Iterator interface

acdk::lang::Object next ()
 for Iterator interface

virtual acdk::lang::Object element ()
 for Iterator interface return this

virtual void remove ()
 will throw UnsupportedOperationException

bool getNext ()
void clearParameters ()
RLiteDb getDb ()
int curRow ()
 current row

RString getColName (int col)
void reset ()
int colCount ()
int getColumnByName (IN(RString) name)
bool getBoolean (int col)
byte getByte (int col)
short getShort (int col)
int getInt (int col)
jlong getLong (int col)
float getFloat (int col)
double getDouble (int col)
RString getString (int col)
RFlexByteBuffer getBlob (int col)
bool seek (int rowCount)
 -1 before first 0 first 1 - n absolute -2 last -3 after last

int seekEnd ()
 returns update to last row index

int getLiteType (int col)
 returns one of LiteColType

int getSqlType (int col)
RString getSQLTypeName (int col)
RString getColumnClassName (int col)
void bindInt (int col, int val)
 bind index starts with 1

void bindDouble (int col, double val)
void bindLong (int col, jlong val)
void bindText (int col, IN(RString) value)
void bindNull (int col)
void bindBlob (int col, IN(RReadByteBuffer) buffer)
int getParameterCount ()
 for Prepared statements

RString getParameterName (int col)
int getParamterIndexByName (IN(RString) name)
void checkLastResult ()
int checkResult (int res)

Public Attributes

RLiteDb _db
sqlite3_stmt * _stm
int _currow
bool _rowDelivered
bool _hasRow
int _rowCount
 how many rows -1 means doesn't know


Constructor & Destructor Documentation

acdk::sql::sqlite::LiteTable::LiteTable IN(RLiteDb db,
sqlite3_stmt *  stm
 

acdk::sql::sqlite::LiteTable::~LiteTable  ) 
 


Member Function Documentation

void acdk::sql::sqlite::LiteTable::bindBlob int  col,
IN(RReadByteBuffer buffer
 

void acdk::sql::sqlite::LiteTable::bindDouble int  col,
double  val
 

void acdk::sql::sqlite::LiteTable::bindInt int  col,
int  val
 

bind index starts with 1

void acdk::sql::sqlite::LiteTable::bindLong int  col,
jlong  val
 

void acdk::sql::sqlite::LiteTable::bindNull int  col  ) 
 

void acdk::sql::sqlite::LiteTable::bindText int  col,
IN(RString value
 

void acdk::sql::sqlite::LiteTable::checkLastResult  )  [inline]
 

int acdk::sql::sqlite::LiteTable::checkResult int  res  )  [inline]
 

void acdk::sql::sqlite::LiteTable::clearParameters  ) 
 

int acdk::sql::sqlite::LiteTable::colCount  ) 
 

int acdk::sql::sqlite::LiteTable::curRow  )  [inline]
 

current row

virtual acdk::lang::Object acdk::sql::sqlite::LiteTable::element  )  [inline, virtual]
 

for Iterator interface return this

Implements acdk::util::Iterator.

RFlexByteBuffer acdk::sql::sqlite::LiteTable::getBlob int  col  ) 
 

bool acdk::sql::sqlite::LiteTable::getBoolean int  col  ) 
 

byte acdk::sql::sqlite::LiteTable::getByte int  col  ) 
 

RString acdk::sql::sqlite::LiteTable::getColName int  col  ) 
 

int acdk::sql::sqlite::LiteTable::getColumnByName IN(RString name  ) 
 

RString acdk::sql::sqlite::LiteTable::getColumnClassName int  col  ) 
 

RLiteDb acdk::sql::sqlite::LiteTable::getDb  )  [inline]
 

double acdk::sql::sqlite::LiteTable::getDouble int  col  ) 
 

float acdk::sql::sqlite::LiteTable::getFloat int  col  ) 
 

int acdk::sql::sqlite::LiteTable::getInt int  col  ) 
 

int acdk::sql::sqlite::LiteTable::getLiteType int  col  ) 
 

returns one of LiteColType

jlong acdk::sql::sqlite::LiteTable::getLong int  col  ) 
 

bool acdk::sql::sqlite::LiteTable::getNext  ) 
 

int acdk::sql::sqlite::LiteTable::getParameterCount  ) 
 

for Prepared statements

RString acdk::sql::sqlite::LiteTable::getParameterName int  col  ) 
 

int acdk::sql::sqlite::LiteTable::getParamterIndexByName IN(RString name  ) 
 

short acdk::sql::sqlite::LiteTable::getShort int  col  ) 
 

int acdk::sql::sqlite::LiteTable::getSqlType int  col  ) 
 

RString acdk::sql::sqlite::LiteTable::getSQLTypeName int  col  ) 
 

RString acdk::sql::sqlite::LiteTable::getString int  col  ) 
 

bool acdk::sql::sqlite::LiteTable::hasNext  )  [virtual]
 

for Iterator interface

Implements acdk::util::Iterator.

acdk::lang::Object acdk::sql::sqlite::LiteTable::next  )  [virtual]
 

for Iterator interface

Returns:
this

Implements acdk::util::Iterator.

virtual void acdk::sql::sqlite::LiteTable::remove  )  [virtual]
 

will throw UnsupportedOperationException

Implements acdk::util::Iterator.

void acdk::sql::sqlite::LiteTable::reset  ) 
 

bool acdk::sql::sqlite::LiteTable::seek int  rowCount  ) 
 

-1 before first 0 first 1 - n absolute -2 last -3 after last

int acdk::sql::sqlite::LiteTable::seekEnd  ) 
 

returns update to last row index


Member Data Documentation

int acdk::sql::sqlite::LiteTable::_currow
 

RLiteDb acdk::sql::sqlite::LiteTable::_db
 

bool acdk::sql::sqlite::LiteTable::_hasRow
 

int acdk::sql::sqlite::LiteTable::_rowCount
 

how many rows -1 means doesn't know

bool acdk::sql::sqlite::LiteTable::_rowDelivered
 

sqlite3_stmt* acdk::sql::sqlite::LiteTable::_stm