mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-03-16 23:00:49 +00:00
Add the two mutex-related flags
This commit is contained in:
parent
8e990ff3c6
commit
9328fa0897
@ -170,6 +170,22 @@ impl ConnectionFlags {
|
|||||||
self
|
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.
|
/// Open the database for reading only.
|
||||||
pub fn set_read_only(mut self) -> Self {
|
pub fn set_read_only(mut self) -> Self {
|
||||||
self.0 |= ffi::SQLITE_OPEN_READWRITE;
|
self.0 |= ffi::SQLITE_OPEN_READWRITE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user