diff options
| author | Teddy Wing | 2021-06-12 16:32:13 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2021-06-12 16:32:13 +0200 | 
| commit | 6a6bacf975156a045cf48f9e58520f0bc0f54429 (patch) | |
| tree | 30a808bda0f1d4257b19ca8194a0f4638ee3309a /src/database.rs | |
| parent | 589545996e2b886e2c9e3ddb7b769d9e5e7959cf (diff) | |
| download | reflectub-6a6bacf975156a045cf48f9e58520f0bc0f54429.tar.bz2 | |
Db::connect(): Fix database open call
Turns out I need to specify all the flag I want in the open call,
including the one to open the database for reading and writing. This
fixes the "Error code 21: Library used incorrectly" error I was getting
earlier.
Diffstat (limited to 'src/database.rs')
| -rw-r--r-- | src/database.rs | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/src/database.rs b/src/database.rs index f23fcd4..0785dd5 100644 --- a/src/database.rs +++ b/src/database.rs @@ -70,7 +70,8 @@ impl Db {              Db {                  connection: rusqlite::Connection::open_with_flags(                      path, -                    rusqlite::OpenFlags::SQLITE_OPEN_CREATE, +                    rusqlite::OpenFlags::SQLITE_OPEN_READ_WRITE +                    | rusqlite::OpenFlags::SQLITE_OPEN_CREATE,                  )?,              }          ) | 
