|
lintel 0.2.0
|
#include <Connection.h>
Public Member Functions | |
| Connection (ConnectionType connectionType, const std::string &connectionInfo) | |
| Connection (const std::shared_ptr< DatabaseConnectionEntry > &connectionEntry) | |
| Connection (Connection &connection)=delete | |
| bool | isHealthy () const |
Friends | |
| class | Transaction |
| class | Statement |
| class | PreparedStatement |
| class | Notify |
| class | Cursor |
Unified database connection wrapping either a PostgreSQL or SQLite connection.
|
explicit |
Constructs a connection from a type and connection info string.
| connectionType | the database type (PostgreSQL or SQLite) |
| connectionInfo | connection string or file path |
|
explicit |
Constructs a connection from a database connection configuration entry.
| connectionEntry | the configuration entry describing the connection |
|
explicitdelete |
| bool lintel::db::Connection::isHealthy | ( | ) | const |
Reports whether the underlying driver still considers the connection usable.
PostgreSQL asks PQstatus; SQLite runs a lightweight SELECT 1 probe (the recent error code is not a reliable health signal, because it stays set after a non-fatal error such as a constraint violation). Used by lintel::db::ConnectionPool to drop broken connections on release.
|
friend |
|
friend |