Connection to an SQLite database.
More...
#include <database.hxx>
Public Member Functions |
| Database (const std::string &fileName) |
| Constructor.
|
int | execute (char const *const sql) |
| Execute a set of SQL statements.
|
Statement | prepare (char const *const sql) |
| Prepare execution of SQL statements.
|
const char * | errMsg () |
| Retrieve the last SQLite error message.
|
int | lastInsertRowId () |
| Retrieve the id of the last inserted row.
|
Detailed Description
Connection to an SQLite database.
Constructor & Destructor Documentation
Sqlite::Database::Database |
( |
const std::string & |
fileName | ) |
|
|
inline |
Constructor.
Create a connection to the SQLite database stored in a given file.
- Parameters
-
fileName | path to the SQLite database file |
- Exceptions
-
Member Function Documentation
const char* Sqlite::Database::errMsg |
( |
| ) |
|
|
inline |
Retrieve the last SQLite error message.
- Returns
- a C-style string containing the error message
int Sqlite::Database::execute |
( |
char const *const |
sql | ) |
|
Execute a set of SQL statements.
- Parameters
-
sql | C-style string containing SQL statements |
- Returns
SQLITE_OK
if everything went well
- Exceptions
-
int Sqlite::Database::lastInsertRowId |
( |
| ) |
|
|
inline |
Retrieve the id of the last inserted row.
- Returns
- the row id, as an int
Statement Sqlite::Database::prepare |
( |
char const *const |
sql | ) |
|
Prepare execution of SQL statements.
Get a prepared Statement object, which can then be executed with bound values.
- Parameters
-
sql | C-style string containing SQL statements |
- Returns
- a prepared Statement object for the SQL code
The documentation for this class was generated from the following files:
- /home/francois/projets/git/clang-tags/src/sqlite++/database.hxx
- /home/francois/projets/git/clang-tags/src/sqlite++/database.cxx