1
0
mirror of https://github.com/fluencelabs/sqlite-wasm-connector synced 2025-03-16 06:50:49 +00:00

Add the two mutex-related flags

This commit is contained in:
Ivan Ukhov 2019-06-08 20:15:44 +02:00
parent 8e990ff3c6
commit 9328fa0897

@ -170,6 +170,22 @@ impl ConnectionFlags {
self
}
/// Open the database in the serialized [threading mode][1].
///
/// [1]: https://www.sqlite.org/threadsafe.html
pub fn set_full_mutex(mut self) -> Self {
self.0 |= ffi::SQLITE_OPEN_FULLMUTEX;
self
}
/// Opens the database in the multi-thread [threading mode][1].
///
/// [1]: https://www.sqlite.org/threadsafe.html
pub fn set_no_mutex(mut self) -> Self {
self.0 |= ffi::SQLITE_OPEN_NOMUTEX;
self
}
/// Open the database for reading only.
pub fn set_read_only(mut self) -> Self {
self.0 |= ffi::SQLITE_OPEN_READWRITE;