Public Member Functions | |
SQLiteKeyValueStore (const StringBuffer &table, const StringBuffer &colKey, const StringBuffer &colValue, const StringBuffer &path, bool isTransactional=false) | |
virtual Enumeration & | getProperties () |
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 Enumeration & | query (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 |
bool SQLiteKeyValueStore::checkIfTableExists | ( | const char * | tableName | ) |
Checks if the table already exists in the sqlite database.
const | char* tableName the name of the table to check |
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.
Implements KeyValueStore.
Reimplemented in BlockingSQLiteKeyValueStore.
int SQLiteKeyValueStore::init | ( | const char * | table, | |
const char * | colKey, | |||
const char * | colValue, | |||
const char * | path | |||
) |
Initializes the database.