pub struct SQLiteRecordStore { /* private fields */ }Expand description
Record persistence over a managed SQLite pool, including SQLCipher and compressed connections. Snapshots retain logical sequences; this adapter does not retain physical transactions between operations.
Logical snapshot leases protect predecessor histories across bounded reads and native processes; reclamation preserves head tombstones and all commit receipts. The Key/Value provider uses these records directly. Self::for_native converts a native catalog and atomically maintains its current rows with their history; ManagedConnection::bind_native_records binds catalog and data handles to the same logical session.
Implementations§
Source§impl SQLiteRecordStore
impl SQLiteRecordStore
Sourcepub fn set_receipt_retention_limit(
&self,
limit: u64,
control: &StorageReadControl,
) -> VersionResult<()>
pub fn set_receipt_retention_limit( &self, limit: u64, control: &StorageReadControl, ) -> VersionResult<()>
Set the shared database’s maximum retained receipt count. Pending, unacknowledged and SSI-referenced receipts all count. Lowering the limit preserves existing entries and prevents allocation until release/reclamation makes room. The default is 65,536 entries; zero and values above SQLite’s positive i64 range are rejected.
Source§impl SQLiteRecordStore
impl SQLiteRecordStore
Sourcepub fn admit_serializable<T>(
&self,
read_only: bool,
control: &StorageReadControl,
capture: impl FnOnce() -> VersionResult<T>,
) -> VersionResult<(SerializableParticipant, T)>
pub fn admit_serializable<T>( &self, read_only: bool, control: &StorageReadControl, capture: impl FnOnce() -> VersionResult<T>, ) -> VersionResult<(SerializableParticipant, T)>
Reconcile abandoned participants, retain a new participant and capture its fixed data view under shared admission. The returned handle must outlive every operation and retained nested/pinned view attributed to it. All publishers must use the same shared admission; this does not by itself enable SQL SSI.
Sourcepub fn recover_serializable(
&self,
control: &StorageReadControl,
) -> VersionResult<()>
pub fn recover_serializable( &self, control: &StorageReadControl, ) -> VersionResult<()>
Reconcile receipts and retire dead retained participants without admitting a new one. Untracked legacy actors remain manually owned. A missing prepared receipt is an error, not evidence of abort.
Source§impl SQLiteRecordStore
impl SQLiteRecordStore
Sourcepub fn serializable_admission(
&self,
control: &StorageReadControl,
) -> VersionResult<SQLiteSerializableAdmission>
pub fn serializable_admission( &self, control: &StorageReadControl, ) -> VersionResult<SQLiteSerializableAdmission>
Acquire the shared SSI state without retaining a main-database physical transaction. The supplied allowance bounds the decoded graph and its predicate keys; serialization streams directly to a transactional BLOB.
Source§impl SQLiteRecordStore
impl SQLiteRecordStore
pub fn new(connection: &ManagedConnection) -> VersionResult<Self>
Sourcepub fn for_native(
connection: &ManagedConnection,
control: &StorageReadControl,
) -> VersionResult<Self>
pub fn for_native( connection: &ManagedConnection, control: &StorageReadControl, ) -> VersionResult<Self>
Atomically initialize or upgrade a native catalog and import its baseline, or reopen its versioned materialization. Unbound native store handles are disabled after conversion; callers must bind a routed native session or prepare native records through the shared transaction contract.
Sourcepub fn native_namespace(&self) -> Option<DatabaseId>
pub fn native_namespace(&self) -> Option<DatabaseId>
Immutable namespace for database-owned native record keys. Use it with NativeRecordOwner::Database; VersionedPersistence::database_id identifies the transaction history and may differ after restoration. Key/Value and raw record stores return None.
Trait Implementations§
Source§impl Clone for SQLiteRecordStore
impl Clone for SQLiteRecordStore
Source§impl ResourceLeaseProvider for SQLiteRecordStore
impl ResourceLeaseProvider for SQLiteRecordStore
Source§fn try_acquire_resource(
&self,
id: ResourceLeaseId,
request: ResourceLeaseRequest,
control: &StorageReadControl,
) -> VersionResult<Option<ResourceLease>>
fn try_acquire_resource( &self, id: ResourceLeaseId, request: ResourceLeaseRequest, control: &StorageReadControl, ) -> VersionResult<Option<ResourceLease>>
None means a conflicting owner is alive. Process death releases native leases; age, a missing catalog head and an unknown commit result never prove abandonment. No admission lock remains held by the returned handle.Source§impl SerializableCoordinator for SQLiteRecordStore
impl SerializableCoordinator for SQLiteRecordStore
Source§fn with_serializable_admission(
&self,
control: &StorageReadControl,
operation: &mut SerializableOperation<'_>,
) -> VersionResult<()>
fn with_serializable_admission( &self, control: &StorageReadControl, operation: &mut SerializableOperation<'_>, ) -> VersionResult<()>
Source§fn admit_serializable_snapshot(
&self,
read_only: bool,
control: &StorageReadControl,
) -> Result<(SerializableParticipant, Arc<dyn CommittedRecordSnapshot>), VersionError>
fn admit_serializable_snapshot( &self, read_only: bool, control: &StorageReadControl, ) -> Result<(SerializableParticipant, Arc<dyn CommittedRecordSnapshot>), VersionError>
Source§fn recover_serializable_participants(
&self,
control: &StorageReadControl,
) -> Result<(), VersionError>
fn recover_serializable_participants( &self, control: &StorageReadControl, ) -> Result<(), VersionError>
Source§impl VectorFieldGuardLayout for SQLiteRecordStore
impl VectorFieldGuardLayout for SQLiteRecordStore
fn prefix(&self, control: &StorageReadControl) -> VersionResult<BudgetedVec<u8>>
fn reference( &self, key: &[u8], control: &StorageReadControl, ) -> VersionResult<Option<VectorFieldGuard>>
Source§impl VersionedPersistence for SQLiteRecordStore
impl VersionedPersistence for SQLiteRecordStore
Source§fn diskann_population_record_layout(
&self,
) -> Option<&dyn DiskANNPopulationRecordLayout>
fn diskann_population_record_layout( &self, ) -> Option<&dyn DiskANNPopulationRecordLayout>
Source§fn resource_leases(&self) -> Option<&dyn ResourceLeaseProvider>
fn resource_leases(&self) -> Option<&dyn ResourceLeaseProvider>
Source§fn serializable_coordinator(&self) -> Option<&dyn SerializableCoordinator>
fn serializable_coordinator(&self) -> Option<&dyn SerializableCoordinator>
Source§fn identifier_watermark(
&self,
namespace: &[u8],
control: &StorageReadControl,
) -> VersionResult<Option<u64>>
fn identifier_watermark( &self, namespace: &[u8], control: &StorageReadControl, ) -> VersionResult<Option<u64>>
Source§fn allocate_identifiers(
&self,
namespace: &[u8],
request: IdentifierRequest,
control: &StorageReadControl,
) -> VersionResult<IdentifierAllocation>
fn allocate_identifiers( &self, namespace: &[u8], request: IdentifierRequest, control: &StorageReadControl, ) -> VersionResult<IdentifierAllocation>
fn database_id(&self) -> DatabaseId
fn graph_record_layout(&self) -> Option<&dyn GraphRecordLayout>
Source§fn occurrence_record_layout(&self) -> &dyn OccurrenceRecordLayout
fn occurrence_record_layout(&self) -> &dyn OccurrenceRecordLayout
fn notification_record_layout(&self) -> &dyn NotificationRecordLayout
fn maintenance_record_layout(&self) -> &dyn MaintenanceRecordLayout
fn ivf_record_layout(&self) -> &dyn IVFRecordLayout
Source§fn hnsw_record_layout(&self) -> Option<&dyn HNSWRecordLayout>
fn hnsw_record_layout(&self) -> Option<&dyn HNSWRecordLayout>
Source§fn allocate_transaction(
&self,
control: &StorageReadControl,
) -> VersionResult<StorageTransactionId>
fn allocate_transaction( &self, control: &StorageReadControl, ) -> VersionResult<StorageTransactionId>
Source§fn allocate_managed_transaction(
&self,
control: &StorageReadControl,
) -> VersionResult<RetainedTransactionAllocation>
fn allocate_managed_transaction( &self, control: &StorageReadControl, ) -> VersionResult<RetainedTransactionAllocation>
fn snapshot( &self, control: &StorageReadControl, ) -> VersionResult<Arc<dyn CommittedRecordSnapshot>>
Source§fn reclaim_versions(&self, control: &StorageReadControl) -> VersionResult<u64>
fn reclaim_versions(&self, control: &StorageReadControl) -> VersionResult<u64>
Source§fn reclaim_tombstones(
&self,
request: &TombstoneReclamationRequest<'_>,
control: &StorageReadControl,
) -> VersionResult<TombstoneReclamationStep>
fn reclaim_tombstones( &self, request: &TombstoneReclamationRequest<'_>, control: &StorageReadControl, ) -> VersionResult<TombstoneReclamationStep>
Source§fn reclaim_diskann_tombstones(
&self,
control: &StorageReadControl,
) -> VersionResult<()>
fn reclaim_diskann_tombstones( &self, control: &StorageReadControl, ) -> VersionResult<()>
DiskANN identities after ordinary history collection. The default owns the common Key/Value generation, canonical-origin, change-journal and field-guard namespaces; providers with another layout must override it. Wrappers must forward the original control and physical layout selection.Source§fn vector_field_guard_layout(&self) -> &dyn VectorFieldGuardLayout
fn vector_field_guard_layout(&self) -> &dyn VectorFieldGuardLayout
Source§fn commit(
&self,
transaction: StorageTransactionId,
prepared: &PreparedRecordCommit,
control: &StorageReadControl,
) -> CommitResult
fn commit( &self, transaction: StorageTransactionId, prepared: &PreparedRecordCommit, control: &StorageReadControl, ) -> CommitResult
PreparedRecordCommit::validate_snapshot before validating heads; only its rejection permits common storage to materialize derived effects again. Canonical changes and application callbacks must never be replayed, and mismatched fingerprint reuse is rejected.