pub struct OpenOptions {
pub readonly: bool,
pub lock: LockMode,
pub snapshot_every: u64,
pub compaction: Option<CatalogCompaction>,
pub cypher: Option<CipherOptions>,
pub follow: FollowOption,
pub cache: CachePolicy,
pub layout: LayoutOptions,
}Expand description
How Database::open acquires the writer lock and whether it opens for writing at all.
Fields§
§readonly: bool§lock: LockMode§snapshot_every: u64Ops applied to a table between periodic <table>.idx snapshots — see Table::snapshot.
0 disables periodic snapshotting; defaults to [DEFAULT_SNAPSHOT_EVERY].
compaction: Option<CatalogCompaction>Overrides the automatic-compaction policy of every table for this handle — the TS
compaction option, where Disabled is its false. None leaves the choice to the
catalog: the table’s own options.compaction, then defaults.compaction, then
[DEFAULT_COMPACTION].
cypher: Option<CipherOptions>Keys for the fields a schema marks cypher. Without them such fields cannot be written.
follow: FollowOptionWhether reads catch up with what other processes appended, without an explicit refresh.
cache: CachePolicyHow many parsed documents each table of this handle keeps in memory in front of its log —
see CachePolicy. Disabled by default, and named here rather than in the catalog on
purpose: it costs memory in this process only, so it is the opener’s call and not a property
of the database on disk.
layout: LayoutOptionsWhere in the directory the metadata document and the table files live. Left at its default,
this is the flat arrangement every database used before layouts existed, under
hayson.json — and an existing database is opened in the arrangement it is stored in,
whether or not the caller names one.
Trait Implementations§
Source§impl Clone for OpenOptions
impl Clone for OpenOptions
Source§fn clone(&self) -> OpenOptions
fn clone(&self) -> OpenOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more