pub struct OpenFlag(/* private fields */);Expand description
Database open flag.
The default is SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE.
Implementations§
Source§impl OpenFlag
impl OpenFlag
Sourcepub const OPEN_READONLY: Self
pub const OPEN_READONLY: Self
The database is opened in read-only mode. If the database does not already exist, an error is returned.
Sourcepub const OPEN_READWRITE: Self
pub const OPEN_READWRITE: Self
The database is opened for reading and writing if possible, or reading only if the file is write protected by the operating system.
Sourcepub const OPEN_READWRITE_CREATE: Self
pub const OPEN_READWRITE_CREATE: Self
The database is opened for reading and writing, and is created if it does not already exist.
Sourcepub const OPEN_MEMORY: Self
pub const OPEN_MEMORY: Self
The database will be opened as an in-memory database.
The database is named by the “filename” argument for the purposes of cache-sharing, if shared cache mode is enabled, but the “filename” is otherwise ignored.
Sourcepub const OPEN_NOMUTEX: Self
pub const OPEN_NOMUTEX: Self
The new database connection will use the “multi-thread” threading mode.
This means that separate threads are allowed to use SQLite at the same time, as long as each thread is using a different database connection.
Sourcepub const OPEN_FULLMUTEX: Self
pub const OPEN_FULLMUTEX: Self
The new database connection will use the “serialized” threading mode.
This means the multiple threads can safely attempt to use the same database connection at the same time.
(Mutexes will block any actual concurrency, but in this mode there is no harm in trying.)
Sourcepub const OPEN_SHAREDCACHE: Self
pub const OPEN_SHAREDCACHE: Self
The database is opened shared cache enabled, overriding the default shared cache setting provided by sqlite3_enable_shared_cache().
The use of shared cache mode is discouraged and hence shared cache capabilities may be omitted from many builds of SQLite. In such cases, this option is a no-op.
Sourcepub const OPEN_PRIVATECACHE: Self
pub const OPEN_PRIVATECACHE: Self
The database is opened shared cache disabled, overriding the default shared cache setting provided by sqlite3_enable_shared_cache().