pub struct LocalReadDatabase<F: VfsFile> { /* private fields */ }Expand description
Holds the exclusively owned file and reconstructs snapshot + committed WAL once. Callers retain the file lock until this value is dropped. No mutator is exposed.
Implementations§
Source§impl<F: VfsFile> LocalReadDatabase<F>
impl<F: VfsFile> LocalReadDatabase<F>
pub fn open(file: F, name: impl Into<PathBuf>) -> Result<Self, LocalReadError>
pub fn query(&self, sql: &str) -> Result<ScalarResult, LocalReadError>
Auto Trait Implementations§
impl<F> !Freeze for LocalReadDatabase<F>
impl<F> !RefUnwindSafe for LocalReadDatabase<F>
impl<F> !UnwindSafe for LocalReadDatabase<F>
impl<F> Forget for LocalReadDatabase<F>
impl<F> Move for LocalReadDatabase<F>
impl<F> Send for LocalReadDatabase<F>where
F: Send,
RawVecInner: Send,
Atomic<bool>: Send,
Atomic<u64>: Send,
RwLock<RawRwLock, HashMap<String, Arc<SegmentManager>>>: Send,
RwLock<RawRwLock, HashMap<EntityId, Vec<(EntityId, RefType, String)>>>: Send,
RwLock<RawRwLock, BTreeMap<String, Vec<ContextPosting>>>: Send,
RwLock<RawRwLock, BTreeMap<(String, String), Vec<ContextPosting>>>: Send,
RwLock<RawRwLock, HashMap<u64, EntityKeys>>: Send,
RwLock<RawRwLock, HashSet<u64>>: Send,
RwLock<RawRwLock, HashSet<String>>: Send,
RwLock<RawRwLock, Shard>: Send,
RwLock<RawRwLock, HashMap<(String, String), Vec<EntityId>>>: Send,
RwLock<RawRwLock, Vec<u8>>: Send,
RawTable<(String, CollectionContract)>: Send,
impl<F> Sync for LocalReadDatabase<F>where
F: Sync,
RawVecInner: Sync,
Atomic<bool>: Sync,
Atomic<u64>: Sync,
RwLock<RawRwLock, HashMap<String, Arc<SegmentManager>>>: Sync,
RwLock<RawRwLock, HashMap<EntityId, Vec<(EntityId, RefType, String)>>>: Sync,
RwLock<RawRwLock, BTreeMap<String, Vec<ContextPosting>>>: Sync,
RwLock<RawRwLock, BTreeMap<(String, String), Vec<ContextPosting>>>: Sync,
RwLock<RawRwLock, HashMap<u64, EntityKeys>>: Sync,
RwLock<RawRwLock, HashSet<u64>>: Sync,
RwLock<RawRwLock, HashSet<String>>: Sync,
RwLock<RawRwLock, Shard>: Sync,
RwLock<RawRwLock, HashMap<(String, String), Vec<EntityId>>>: Sync,
RwLock<RawRwLock, Vec<u8>>: Sync,
RawTable<(String, CollectionContract)>: Sync,
impl<F> Unpin for LocalReadDatabase<F>where
F: Unpin,
*const u8 is !null: Unpin,
Align1<u8>: Unpin,
Align8<u64>: Unpin,
Align8<usize>: Unpin,
Arc<SegmentManager>: Unpin,
*const LeafNode<String, Vec<ContextPosting>> is !null: Unpin,
Box<(String, Vec<ContextPosting>)>: Unpin,
*const LeafNode<(String, String), Vec<ContextPosting>> is !null: Unpin,
Box<((String, String), Vec<ContextPosting>)>: Unpin,
Arc<str>: Unpin,
Box<GraphNodeKind>: Unpin,
Box<GraphEdgeKind>: Unpin,
Box<TimeSeriesPointKind>: Unpin,
Arc<CronSchedule>: Unpin,
Arc<Vec<String>>: Unpin,
Box<EntityAux>: Unpin,
Box<SqlTypeName>: Unpin,
Arc<Expr>: Unpin,
Arc<[String]>: Unpin,
*const LeafNode<String, GraphVertexContract> is !null: Unpin,
Box<(String, GraphVertexContract)>: Unpin,
*const LeafNode<String, GraphEdgeContract> is !null: Unpin,
Box<(String, GraphEdgeContract)>: Unpin,
impl<F> UnsafeUnpin for LocalReadDatabase<F>where
F: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
Align8<u64>: UnsafeUnpin,
Align8<usize>: UnsafeUnpin,
PhantomData<(String, Arc<SegmentManager>)>: UnsafeUnpin,
PhantomData<(EntityId, Vec<(EntityId, RefType, String)>)>: UnsafeUnpin,
*const LeafNode<String, Vec<ContextPosting>> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Vec<ContextPosting>)>>: UnsafeUnpin,
*const LeafNode<(String, String), Vec<ContextPosting>> is !null: UnsafeUnpin,
PhantomData<Box<((String, String), Vec<ContextPosting>)>>: UnsafeUnpin,
PhantomData<(u64, EntityKeys)>: UnsafeUnpin,
PhantomData<(u64, ())>: UnsafeUnpin,
PhantomData<(String, ())>: UnsafeUnpin,
PhantomData<(u64, (String, UnifiedEntity))>: UnsafeUnpin,
PhantomData<u64>: UnsafeUnpin,
PhantomData<((String, String), Vec<EntityId>)>: UnsafeUnpin,
PhantomData<(String, CollectionContract)>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more