|
libdballe
8.6
|
Options controlling how to connect to a database. More...
#include <db.h>
Public Member Functions | |
| void | reset_actions () |
| Disable all the one-off actions set to perform on connection. More... | |
Static Public Member Functions | |
| static std::unique_ptr< DBConnectOptions > | create (const std::string &url) |
| Create a DBConnectOptions parsing the given URL. | |
| static std::unique_ptr< DBConnectOptions > | test_create (const char *backend=nullptr) |
| Create a DBConnectOptions for running unit tests. More... | |
Public Attributes | |
| std::string | url |
| URL to use to connect to the database. More... | |
| bool | wipe = false |
| Wipe database on connection. | |
Protected Member Functions | |
| DBConnectOptions (const DBConnectOptions &)=default | |
| DBConnectOptions (DBConnectOptions &&)=default | |
| DBConnectOptions & | operator= (const DBConnectOptions &)=default |
| DBConnectOptions & | operator= (DBConnectOptions &&)=default |
Options controlling how to connect to a database.
To allow to add members this structure without breaking the ABI, creation of new instances is restricted to DBConnectOptions::create().
| void dballe::DBConnectOptions::reset_actions | ( | ) |
Disable all the one-off actions set to perform on connection.
Call this after the first connection, if you need to reuse the DBConnectOptions multiple times.
|
static |
Create a DBConnectOptions for running unit tests.
Optionally allows to select a backend database.
| std::string dballe::DBConnectOptions::url |
URL to use to connect to the database.
See doc/fapi_connect.md for details.
1.8.16