class xqlOdbc

provides functions for searching in the database More...

Definition#include <xql/xqlodbc.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Private Members


Detailed Description

provides functions for searching in the database

 xqlOdbc ()

xqlOdbc

standard constructor. specific things are done by member functions.

 ~xqlOdbc ()

~xqlOdbc

[virtual]

void  setPasswd (const char* passwd)

setPasswd

sets the password for the ODBC-Connection

void  setSource (const char* source)

setSource

sets the ODBC-Sourcename for the ODBC-Connection

void  setUser (const char* user)

setUser

sets the Username for the ODBC-Connection

int  execUpdateStmt (std::string pSqlText)

execUpdateStmt

[const]

executes an update statement. Returns what?

int  getMaxId ()

getMaxId

[const]

gets the maximum id from xqlobject. This function is obsolete.

int  getNewId (const char * pTableName)

getNewId

[const]

gets a new id for xqlobject.

int  getCount (char * table, int pId)

getCount

[const]

This function is obsolete. and should be replaced by getInteger()

int  getInteger (std::string pSqlText)

getInteger

[const]

gets an integer value from a query. If the query returns several values, only the first one is given back.

bool  getBool (char * pSqlText)

getBool

[const]

gets an boolean value from a query. If the query returns several values, only the first one is given back.

void  getString (char * pSqlText, char * pResultString)

getString

gets an string value from a query. If the query returns several values, only the first one is given back.

bool  getConnection ()

getConnection

opens a connection

void  closeConnection ()

closeConnection

close a connection

void  startTransaction ()

startTransaction

[const]

starts a transaction;

void  commit ()

commit

[const]

commits a pending transaction

void  rollback ()

rollback

[const]

rolls back a pending transaction

int  getNewInstId ()

getNewInstId

int  getNewTypeId ()

getNewTypeId

char *  getSource ()

getSource

[const]

char *  getPasswd ()

getPasswd

[const]

char *  getUser ()

getUser

[const]

void  initXQLScheme ()

initXQLScheme

initiates the database schema for XQL. Creates the necessary tables. create the root account which will manage everything else (normally "admin"). This function may only be called once. If once called, it will fail on all other calls. If the database scema is corrupt, then use repairXQLScheme. Of course, this is not possible without data loss.

void  dropXQLScheme ()

dropXQLScheme

drops the whole XQL database tables. all data are lost. used to roughly recreate damaged database

intList *  getIntegerList (std::string pSql)

getIntegerList

void  storeBinObj (const long id, const char * pData, const long pSize)

storeBinObj

[const]

void  getBinObj (const long id, char ** pData, long * pSize)

getBinObj

[const]

get binary data from the database for id. raises an xqlException if no data were found for the given id. returns the pointer to the binary data pData, and the size (pSize)

long  getNewFileId ()

getNewFileId

std::string  getString (const std::string pSqlText)

getString

gets an string value from a query. If the query returns several values, only the first one is given back.

char * mUser

mUser

[private]

char * mPasswd

mPasswd

[private]

char * mSource

mSource

[private]

char mUserBuff[20]

mUserBuff[20]

[private]

char mPasswdBuff[20]

mPasswdBuff[20]

[private]

char mSourceBuff[20]

mSourceBuff[20]

[private]

long tReturn

tReturn

[private]

char mODBCStatus[10]

mODBCStatus[10]

[private]

char mODBCmsg[200]

mODBCmsg[200]

[private]

char mODBCbuffer[200]

mODBCbuffer[200]

[private]

odbc::Connection* mConn

mConn

[private]