pub struct LocalDatabase<F: VfsFile> { /* private fields */ }Expand description
One exclusively locked database handle is the transaction/session boundary. Closing drops uncommitted state. Failed I/O fences the controller until reopen.
Implementations§
Source§impl<F: VfsFile> LocalDatabase<F>
impl<F: VfsFile> LocalDatabase<F>
pub fn create( file: F, name: impl Into<PathBuf>, now_ms: u64, ) -> Result<Self, LocalReadError>
pub fn open(file: F, name: impl Into<PathBuf>) -> Result<Self, LocalReadError>
pub fn query( &mut self, sql: &str, now_ms: u64, ) -> Result<ScalarResult, LocalReadError>
Sourcepub fn check_healthy(&self) -> Result<(), LocalReadError>
pub fn check_healthy(&self) -> Result<(), LocalReadError>
Host-side read operations must honor the same interrupted-publication fence.
Sourcepub fn catalog(&self) -> Result<ScalarResult, LocalReadError>
pub fn catalog(&self) -> Result<ScalarResult, LocalReadError>
Read actual persisted contracts without inferring schemas from row payloads.
Sourcepub fn read_query(
&self,
sql: &str,
parameters: &[Value],
scopes: &[ReadScope],
) -> Result<ScalarResult, LocalReadError>
pub fn read_query( &self, sql: &str, parameters: &[Value], scopes: &[ReadScope], ) -> Result<ScalarResult, LocalReadError>
Only SELECT is admitted; a caller cannot widen the host’s source-row scope.
pub fn query_with_params( &mut self, sql: &str, parameters: &[Value], now_ms: u64, ) -> Result<ScalarResult, LocalReadError>
pub fn into_inner(self) -> F
Auto Trait Implementations§
impl<F> !Freeze for LocalDatabase<F>
impl<F> !RefUnwindSafe for LocalDatabase<F>
impl<F> !UnwindSafe for LocalDatabase<F>
impl<F> Send for LocalDatabase<F>where
EmbeddedResidentStore<F>: Send,
impl<F> Sync for LocalDatabase<F>where
EmbeddedResidentStore<F>: Sync,
impl<F> Unpin for LocalDatabase<F>where
EmbeddedResidentStore<F>: Unpin,
impl<F> UnsafeUnpin for LocalDatabase<F>where
EmbeddedResidentStore<F>: 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