SourceForge.net Logo

DatabaseSQLite.cpp File Reference

#include "dbfacade.h"
#include <sqlite3.h>

Include dependency graph for DatabaseSQLite.cpp:


Classes

class  ResultRowSQLite
class  ResultSQLite
class  DatabaseSQLite

Defines

#define DEFAULT_SQLITE_ERROR_EXCEPTION
#define GET_FOO_AT

Functions

 REGISTER_PLUGIN ("SQLite", DatabaseSQLite)

Define Documentation

#define DEFAULT_SQLITE_ERROR_EXCEPTION

Value:

{                                                                                                                                               \
        int err = sqlite3_errcode( connection_ );                                                       \
        if( err != SQLITE_OK )                                                                                          \
        {                                                                                                                                       \
                if( std::string(sqlite3_errmsg(connection_)) == "foreign_key" ) \
                        throw dbfacade::ForeignKeyConstraintException(                          \
                                sqlite3_errmsg(connection_) );                                                  \
                if( err == SQLITE_CONSTRAINT )                                                                  \
                        throw dbfacade::UniqueConstraintException(                                      \
                                sqlite3_errmsg(connection_) );                                                  \
        }                                                                                                                                       \
        else                                                                                                                            \
                throw dbfacade::Exception( sqlite3_errmsg(connection_) );               \
}

#define GET_FOO_AT

Value:

if( !hasValueAt(index) )                                                                                        \
                throw dbfacade::EmptyResultSetException(                                                \
                        "No value found.");                                                                                     \
        return


Function Documentation

REGISTER_PLUGIN ( "SQLite"  ,
DatabaseSQLite   
)


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