SqliteDatabaseConnector Class Reference

`#include <sqliteDatabaseConnector.h>`

Inheritance diagram for SqliteDatabaseConnector:
Collaboration diagram for SqliteDatabaseConnector:

## 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, int limit=-1) const
NgramTable | getNgramLikeTableFiltered (const Ngram ngram, const char **filter, 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

## Detailed Description

Definition at line 43 of file sqliteDatabaseConnector.h.

## Constructor & Destructor Documentation

## SqliteDatabaseConnector() [1/2]

SqliteDatabaseConnector::SqliteDatabaseConnector | ( | const std::string | db,
|  | const size_t | cardinality,
|  | const bool | read_write
| ) |  |

Definition at line 31 of file sqliteDatabaseConnector.cpp.

References openDatabase().

Here is the call graph for this function:

## SqliteDatabaseConnector() [2/2]

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().

Here is the call graph for this function:

## ~SqliteDatabaseConnector()

SqliteDatabaseConnector::~SqliteDatabaseConnector | ( |  | ) |

Definition at line 48 of file sqliteDatabaseConnector.cpp.

References closeDatabase().

Here is the call graph for this function:

## Member Function Documentation

## callback()

int SqliteDatabaseConnector::callback | ( | void * | pArg,
|  | int | argc,
|  | char ** | argv,
|  | char ** | columnNames
| ) |  |

static private

Definition at line 173 of file sqliteDatabaseConnector.cpp.

Referenced by executeSql().

Here is the caller graph for this function:

## closeDatabase()

void SqliteDatabaseConnector::closeDatabase | ( |  | ) |

virtual

Implements DatabaseConnector.

Definition at line 122 of file sqliteDatabaseConnector.cpp.

Referenced by ~SqliteDatabaseConnector().

Here is the caller graph for this function:

## executeSql()

NgramTable SqliteDatabaseConnector::executeSql | ( | const std::string | query | ) | const

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.

Here is the call graph for this function:

## openDatabase()

void SqliteDatabaseConnector::openDatabase | ( |  | ) |

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().

Here is the call graph for this function:
Here is the caller graph for this function:

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

- /build/presage-F72hLE/presage-0.9.1/src/lib/predictors/dbconnector/sqliteDatabaseConnector.h
- /build/presage-F72hLE/presage-0.9.1/src/lib/predictors/dbconnector/sqliteDatabaseConnector.cpp