SQLiteKeyValueStore Class Reference
[Client]

Inheritance diagram for SQLiteKeyValueStore:
[legend]
Collaboration diagram for SQLiteKeyValueStore:
[legend]

List of all members.

Public Member Functions

 SQLiteKeyValueStore (const StringBuffer &table, const StringBuffer &colKey, const StringBuffer &colValue, const StringBuffer &path, bool isTransactional=false)
virtual EnumerationgetProperties ()
 Get all the properties that are currently defined.
int connect ()
int disconnect ()
virtual int close ()
 Ensure that all properties are stored persistently.
int init (const char *table, const char *colKey, const char *colValue, const char *path)
 Initializes the database.
bool checkIfTableExists (const char *tableName)
 Checks if the table already exists in the sqlite database.

Public Attributes

SQLiteKeyValueStore::SQLiteKeyValueStoreEnumeration enumeration

Protected Member Functions

virtual Enumerationquery (const StringBuffer &sql) const
virtual int execute (const StringBuffer &sql)
virtual bool enumeration_hasMoreElement ()
virtual ArrayElement * enumeration_getNextElement ()

Private Attributes

StringBuffer path
sqlite3 * db
sqlite3_stmt * statement
int enumeration_lastReturn
int enumeration_totalRows
int enumeration_nextRow
KeyValuePair enumeration_kvp
bool isTransactional


Detailed Description


Member Function Documentation

bool SQLiteKeyValueStore::checkIfTableExists ( const char *  tableName  ) 

Checks if the table already exists in the sqlite database.

Parameters:
const char* tableName the name of the table to check
Returns:
- Success or Failure

virtual int SQLiteKeyValueStore::close (  )  [virtual]

Ensure that all properties are stored persistently.

If setting a property led to an error earlier, this call will indicate the failure.

Returns:
0 - success, failure otherwise

Implements KeyValueStore.

Reimplemented in BlockingSQLiteKeyValueStore.

int SQLiteKeyValueStore::init ( const char *  table,
const char *  colKey,
const char *  colValue,
const char *  path 
)

Initializes the database.

Returns:
0 success


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

Generated on Tue Apr 6 13:00:42 2010 for Funambol Outlook Plug-in Library by  doxygen 1.5.7.1