SourceForge.net Logo

DatabaseSQLite Class Reference

Inheritance diagram for DatabaseSQLite:

Inheritance graph
[legend]
Collaboration diagram for DatabaseSQLite:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DatabaseSQLite ()
 ~DatabaseSQLite ()
void connect (const std::string &server, const std::string &username, const std::string &password, const std::string &dbname)
void execute (const std::string &statement)
dbfacade::ResultPtr sqlSelect (const std::string &statement, const bool allAtOnce=true)
int sqlInsert (const std::string &statement)
int sqlUpdate (const std::string &statement)
std::string escape (const char *unescaped, const int size) const


Constructor & Destructor Documentation

DatabaseSQLite::DatabaseSQLite (  )  [inline]

DatabaseSQLite::~DatabaseSQLite (  )  [inline]


Member Function Documentation

void DatabaseSQLite::connect ( const std::string &  server,
const std::string &  username,
const std::string &  password,
const std::string &  dbname 
) [inline, virtual]

Establishes a connection to a database.

Implements dbfacade::Database.

void DatabaseSQLite::execute ( const std::string &  statement  )  [inline, virtual]

Called by sqlSelect, sqlInsert and sqlUpdate.

Implements dbfacade::Database.

Here is the caller graph for this function:

dbfacade::ResultPtr DatabaseSQLite::sqlSelect ( const std::string &  statement,
const bool  allAtOnce = true 
) [inline, virtual]

Returns the result of the select statement.

Implements dbfacade::Database.

int DatabaseSQLite::sqlInsert ( const std::string &  statement  )  [inline, virtual]

MySQL:

  • Returns the first automatically generated AUTO_INCREMENT value (or the AUTO_INCREMENT value of the previously inserted row or 0 if there isn't one).
  • Throws an exception if VARCHARs are too long. PostgreSQL:
  • Returns the inserted OID (or 0 if no the table has no OIDs).
  • Truncates VARCHARs that are too long.

Implements dbfacade::Database.

Here is the call graph for this function:

int DatabaseSQLite::sqlUpdate ( const std::string &  statement  )  [inline, virtual]

Returns the number of affected rows.

Implements dbfacade::Database.

Here is the call graph for this function:

std::string DatabaseSQLite::escape ( const char *  unescaped,
const int  size 
) const [inline, virtual]

Replaces characters by escape sequences.

Implements dbfacade::Database.


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

Generated on Mon Mar 16 20:04:32 2009 for libdbfacade.so by  doxygen 1.5.5