mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-20 10:06:47 +02:00
Add enum for intended sqlite database open modes.
This commit is contained in:
parent
7f443e0428
commit
afed9ccfad
1 changed files with 18 additions and 0 deletions
|
@ -11,6 +11,24 @@ struct sqlite3_stmt;
|
|||
|
||||
namespace nix {
|
||||
|
||||
enum class SQLiteOpenMode {
|
||||
/**
|
||||
* Open the database in read-write mode.
|
||||
* If the database does not exist, it will be created.
|
||||
*/
|
||||
Normal,
|
||||
/**
|
||||
* Open the database in read-write mode.
|
||||
* Fails with an error if the database does not exist.
|
||||
*/
|
||||
NoCreate,
|
||||
/**
|
||||
* Open the database in read-only mode.
|
||||
* Fails with an error if the database does not exist.
|
||||
*/
|
||||
ReadOnly
|
||||
};
|
||||
|
||||
/**
|
||||
* RAII wrapper to close a SQLite database automatically.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue