|
lintel 0.2.0
|
#include <Connection.h>
Public Member Functions | |
| Connection (const std::string &connectionInfo) | |
| Connection (const std::shared_ptr< DatabaseConnectionEntry > &connectionEntry) | |
| Connection (Connection &connection)=delete | |
| bool | isHealthy () const |
| ~Connection () | |
Friends | |
| class | Transaction |
| class | Statement |
| class | PreparedStatement |
| class | Notify |
| class | Cursor |
SQLite database connection wrapping a sqlite3 handle.
|
explicit |
Constructs an SQLite connection from a file path.
| connectionInfo | the path to the SQLite database file |
|
explicit |
Constructs an SQLite connection from a configuration entry.
| connectionEntry | the database connection configuration entry |
|
delete |
| lintel::sqlite::Connection::~Connection | ( | ) |
Destructor, closes the database.
| bool lintel::sqlite::Connection::isHealthy | ( | ) | const |
Lightweight liveness probe.
Runs SELECT 1 on the open handle instead of reading sqlite3_errcode, because the error code stays set after a non-fatal error (e.g. a constraint violation) and would wrongly report a healthy connection as broken.
SELECT 1
|
friend |
|
friend |