pub struct InitialSnapshotStore { /* private fields */ }Expand description
The single SQLite owner for an initial snapshot. PhantomData<Rc<()>> makes the lifecycle
explicitly thread-confined even on platforms where rusqlite’s connection is movable.
Implementations§
Source§impl InitialSnapshotStore
impl InitialSnapshotStore
Sourcepub fn open_or_create(
path: impl AsRef<Path>,
identity: InitialSnapshotIdentity,
tables: Vec<InitialSnapshotTable>,
) -> Result<InitialSnapshotOpen, ReplicaError>
pub fn open_or_create( path: impl AsRef<Path>, identity: InitialSnapshotIdentity, tables: Vec<InitialSnapshotTable>, ) -> Result<InitialSnapshotOpen, ReplicaError>
Classify and open a generation-owned build. An unrelated data-bearing database is never cleared or adopted. SQLite performs hot-journal recovery while the existing schema is read.
pub fn begin(&mut self, snapshot_id: &str) -> Result<(), ReplicaError>
Sourcepub fn apply_add(
&mut self,
table: &str,
row: &[OwnedValue],
) -> Result<(), ReplicaError>
pub fn apply_add( &mut self, table: &str, row: &[OwnedValue], ) -> Result<(), ReplicaError>
Execute one strict positional INSERT immediately. The connection’s prepared-statement cache retains the generated SQL per mapped table; no UPSERT/replace/ignore form is permitted.
Sourcepub fn commit(
self,
checkpoint: InitialSnapshotCommit,
) -> Result<StoredSourceCheckpoint, ReplicaError>
pub fn commit( self, checkpoint: InitialSnapshotCommit, ) -> Result<StoredSourceCheckpoint, ReplicaError>
Commit data, signed locator/checkpoint, accounting, and marker removal as one SQLite atom.
pub fn rollback(&mut self)
pub fn rows(&self) -> u64
pub fn path(&self) -> &Path
pub fn journal_mode(&self) -> Result<String, ReplicaError>
pub fn locking_mode(&self) -> Result<String, ReplicaError>
pub fn synchronous(&self) -> Result<i64, ReplicaError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for InitialSnapshotStore
impl !RefUnwindSafe for InitialSnapshotStore
impl !Send for InitialSnapshotStore
impl !Sync for InitialSnapshotStore
impl Unpin for InitialSnapshotStore
impl UnsafeUnpin for InitialSnapshotStore
impl !UnwindSafe for InitialSnapshotStore
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