SQLite driver implementation.
More...
#include <SqliteDriverInstanceImpl.h>
SQLite driver implementation.
◆ SqliteDriverInstanceImpl()
| impl::SqliteDriverInstanceImpl::SqliteDriverInstanceImpl |
( |
sqlite3 * | conn | ) |
|
|
explicitnoexcept |
◆ ~SqliteDriverInstanceImpl()
| impl::SqliteDriverInstanceImpl::~SqliteDriverInstanceImpl |
( |
| ) |
|
|
overridenoexcept |
◆ begin()
| bool impl::SqliteDriverInstanceImpl::begin |
( |
| ) |
|
|
nodiscardoverridevirtualnoexcept |
◆ commit()
| bool impl::SqliteDriverInstanceImpl::commit |
( |
| ) |
|
|
nodiscardoverridevirtualnoexcept |
◆ createStatement()
◆ executeQuery()
| ResultSet::Ptr impl::SqliteDriverInstanceImpl::executeQuery |
( |
const char * | sql | ) |
|
|
overridevirtualnoexcept |
◆ executeUpdate()
| int64_t impl::SqliteDriverInstanceImpl::executeUpdate |
( |
const char * | sql | ) |
|
|
overridevirtualnoexcept |
Execute the update
- Parameters
-
- Returns
- Count the number of rows updated
- Return values
-
Implements sese::db::DriverInstance.
◆ getAutoCommit()
| bool impl::SqliteDriverInstanceImpl::getAutoCommit |
( |
bool & | status | ) |
|
|
nodiscardoverridevirtualnoexcept |
Checks whether auto-commit is enabled
- Warning
- Since libpq does not support retrieving the autoCommit status, it is recommended to use the command line to obtain this value when using PostgreSQL.
- Return values
-
| false | If the operation fails |
Implements sese::db::DriverInstance.
◆ getInsertId()
| bool impl::SqliteDriverInstanceImpl::getInsertId |
( |
int64_t & | id | ) |
const |
|
nodiscardoverridevirtualnoexcept |
Retrieves the auto-incremented ID
- Warning
- Since libpq does not support retrieving the auto-incremented ID, it is recommended to use the command line with the query ‘SELECT currval(pg_get_serial_sequence('tabName’, 'colName'))` to get the auto-incremented ID when using PostgreSQL.
- Return values
-
| false | If the retrieval fails |
Implements sese::db::DriverInstance.
◆ getLastError()
| int impl::SqliteDriverInstanceImpl::getLastError |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Retrieves the error code corresponding to the instance's driver
- Returns
- The error code
Implements sese::db::DriverInstance.
◆ getLastErrorMessage()
| const char * impl::SqliteDriverInstanceImpl::getLastErrorMessage |
( |
| ) |
const |
|
nodiscardoverridevirtualnoexcept |
Retrieves the error message corresponding to the instance's driver (null check required)
- Returns
- The error message
Implements sese::db::DriverInstance.
◆ rollback()
| bool impl::SqliteDriverInstanceImpl::rollback |
( |
| ) |
|
|
nodiscardoverridevirtualnoexcept |
◆ setAutoCommit()
| bool impl::SqliteDriverInstanceImpl::setAutoCommit |
( |
bool | enable | ) |
|
|
nodiscardoverridevirtualnoexcept |
Sets the transaction auto-commit mode
- Warning
- Since libpq does not support setting autocommit, and the autoCommit property is global, it is recommended to use
begin() to start a transaction when using PostgreSQL.
-
Since sqlite3 does not support setting autocommit, it is recommended to use
begin() to start a transaction when using SQLite.
- Parameters
-
| enable | Enable or disable auto-commit mode |
- Return values
-
| false | If the operation fails |
Implements sese::db::DriverInstance.
◆ conn
| sqlite3* sese::db::impl::SqliteDriverInstanceImpl::conn = nullptr |
|
protected |
The documentation for this class was generated from the following files: