presage
0.9.2~beta
|
#include <sqliteDatabaseConnector.h>
Classes | |
class | SqliteDatabaseConnectorException |
Public Member Functions | |
SqliteDatabaseConnector (const std::string db, const size_t cardinality, const bool read_write) | |
SqliteDatabaseConnector (const std::string db, const size_t cardinality, const bool read_write, const std::string logger_level) | |
~SqliteDatabaseConnector () | |
virtual void | openDatabase () |
virtual void | closeDatabase () |
virtual NgramTable | executeSql (const std::string query) const |
Public Member Functions inherited from DatabaseConnector | |
DatabaseConnector (const std::string database_name, const size_t cardinality, const bool read_write) | |
DatabaseConnector (const std::string database_name, const size_t cardinality, const bool read_write, const std::string &log_level) | |
virtual | ~DatabaseConnector () |
void | createNgramTable (const size_t cardinality) const |
void | createUnigramTable () const |
void | createBigramTable () const |
void | createTrigramTable () const |
int | getUnigramCountsSum () const |
int | getNgramCount (const Ngram ngram) const |
NgramTable | getNgramLikeTable (const Ngram ngram, const char **filter, const int count_threshold, int limit=-1) const |
int | incrementNgramCount (const Ngram ngram) const |
void | insertNgram (const Ngram ngram, const int count) const |
void | updateNgram (const Ngram ngram, const int count) const |
void | removeNgram (const Ngram ngram) const |
virtual void | beginTransaction () const |
virtual void | endTransaction () const |
virtual void | rollbackTransaction () const |
Static Private Member Functions | |
static int | callback (void *pArg, int argc, char **argv, char **columnNames) |
Additional Inherited Members | |
Protected Member Functions inherited from DatabaseConnector | |
std::string | get_database_filename () const |
std::string | set_database_filename (const std::string &filename) |
void | set_cardinality (const size_t cardinality) |
size_t | get_cardinality () const |
void | set_read_write_mode (const bool read_write) |
bool | get_read_write_mode () const |
Protected Attributes inherited from DatabaseConnector | |
Logger< char > | logger |
Definition at line 43 of file sqliteDatabaseConnector.h.
SqliteDatabaseConnector::SqliteDatabaseConnector | ( | const std::string | db, |
const size_t | cardinality, | ||
const bool | read_write | ||
) |
Definition at line 31 of file sqliteDatabaseConnector.cpp.
References openDatabase().
SqliteDatabaseConnector::SqliteDatabaseConnector | ( | const std::string | db, |
const size_t | cardinality, | ||
const bool | read_write, | ||
const std::string | logger_level | ||
) |
Definition at line 39 of file sqliteDatabaseConnector.cpp.
References openDatabase().
SqliteDatabaseConnector::~SqliteDatabaseConnector | ( | ) |
Definition at line 48 of file sqliteDatabaseConnector.cpp.
References closeDatabase().
|
staticprivate |
Definition at line 173 of file sqliteDatabaseConnector.cpp.
Referenced by executeSql().
|
virtual |
Implements DatabaseConnector.
Definition at line 122 of file sqliteDatabaseConnector.cpp.
Referenced by ~SqliteDatabaseConnector().
|
virtual |
Implements DatabaseConnector.
Definition at line 133 of file sqliteDatabaseConnector.cpp.
References callback(), endl(), DatabaseConnector::get_database_filename(), DatabaseConnector::logger, and PRESAGE_SQLITE_EXECUTE_SQL_ERROR.
|
virtual |
Implements DatabaseConnector.
Definition at line 53 of file sqliteDatabaseConnector.cpp.
References DatabaseConnector::cardinality, DatabaseConnector::createNgramTable(), endl(), DatabaseConnector::get_cardinality(), DatabaseConnector::get_database_filename(), DatabaseConnector::get_read_write_mode(), DatabaseConnector::logger, and PRESAGE_SQLITE_OPEN_DATABASE_ERROR.
Referenced by SqliteDatabaseConnector().