Represents the database.
More...
#include <docudb.hpp>
Represents the database.
Definition at line 867 of file docudb.hpp.
◆ database() [1/5]
docudb::database::database |
( |
| ) |
|
|
default |
Constructs an empty database object.
◆ database() [2/5]
docudb::database::database |
( |
database const & | | ) |
|
|
delete |
◆ database() [3/5]
docudb::database::database |
( |
database && | | ) |
|
◆ database() [4/5]
docudb::database::database |
( |
std::string_view | connection_string | ) |
|
|
explicit |
Constructs a new database object.
- Parameters
-
connection_string | A valid connection string to the database (e.g. the database file path or :memory:). |
◆ database() [5/5]
Constructs a new database object.
- Parameters
-
connection_string | A valid connection string to the database (e.g. the database file path or :memory:). |
mode | The mode for opening the database file. |
thread_mode | The threading model for the connection. |
◆ ~database()
docudb::database::~database |
( |
| ) |
|
Destroys the database object.
◆ backup_to()
void docudb::database::backup_to |
( |
database & | dest, |
|
|
std::function< void(int, int)> | progress = [](int, int){} ) const |
Backup the current database into the destination database.
- Parameters
-
name | The destination database. |
progress | Progress callback void progress(int remaining, int total) { ... } |
◆ collection()
db_collection docudb::database::collection |
( |
std::string_view | name | ) |
const |
Gets a collection by name.
- Parameters
-
name | The name of the collection. |
- Returns
- db_collection The collection object.
◆ collections()
std::vector< db_collection > docudb::database::collections |
( |
| ) |
const |
Gets all collections.
- Returns
- std::vector<db_collection> The collection list.
◆ filename_database()
std::string docudb::database::filename_database |
( |
| ) |
const |
|
noexcept |
Returns the database file name.
◆ filename_journal()
std::string docudb::database::filename_journal |
( |
| ) |
const |
|
noexcept |
Returns the database journal file name.
◆ filename_wal()
std::string docudb::database::filename_wal |
( |
| ) |
const |
|
noexcept |
Returns the database write-ahead log file name.
◆ load_extensions()
void docudb::database::load_extensions |
( |
| ) |
const |
Load docudb's sqlite3 extensions (e.g. regexp)
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this struct was generated from the following file: