MIRA
|
An exception that occurs whenever accessing the SQLite db results in an error. More...
#include <database/SQLiteDB.h>
Public Member Functions | |
Constructors and destructor | |
SQLiteDB (const Path &db) | |
Constructs a SQLite database by loading a db file. More... | |
~SQLiteDB () | |
Destructor. More... | |
Database operations | |
bool | tableExists (const std::string &table) |
Asks if a given table exists in the database. More... | |
SQLiteQuery | query (const std::string &sql) |
Executes a database query and returns the query object. More... | |
int | exec (const std::string &sql) |
Executes a statement on the database. More... | |
An exception that occurs whenever accessing the SQLite db results in an error.
Wrapper class for the SQLite C API. Used for constructing and accessing file based SQLite databases.
Constructs a SQLite database by loading a db file.
The database is created if not exist.
[in] | db | The path to the database file |
~SQLiteDB | ( | ) |
Destructor.
bool tableExists | ( | const std::string & | table | ) |
Asks if a given table exists in the database.
[in] | table | The table name. |
SQLiteQuery query | ( | const std::string & | sql | ) |
Executes a database query and returns the query object.
[in] | sql | The query in SQL syntax. |
int exec | ( | const std::string & | sql | ) |
Executes a statement on the database.
[in] | sql | The statement |