pub struct SqliteLfsRows { /* private fields */ }Expand description
The sqlite row twin over the co-tenant lfs_objects rows
(substrate.md §refs’ row-store pattern, ADR-019 §2): every write
call (LfsRows::assert, LfsRows::remove,
LfsRows::remove_repo) runs its check-and-writes inside one
BEGIN IMMEDIATE transaction on the co-tenant connection — two
clashing calls (cross-connection included) serialize on the write
lock and the refcount recompute reads the committed winner. The
refcount recompute is the transaction’s trailing statement — the
touched oid’s rows all carry the same current count at commit.
Blocking SQL bridges off the async executor
(tokio::task::spawn_blocking) per the composition’s concurrency
model; construction takes the already-migrated
(CoTenantSqlite::open)
handle — no construction I/O here. The record-removal leg that
takes a repo’s rows with the record rides the registry twin’s own
in-SQL copy (crate::sqlite — unconditional, see the module
doc); this impl’s LfsRows::remove_repo is the surface’s own
leg for the same row set.
Implementations§
Source§impl SqliteLfsRows
impl SqliteLfsRows
Sourcepub fn new(handle: CoTenantSqlite) -> Self
pub fn new(handle: CoTenantSqlite) -> Self
Mount the row store over a co-tenant handle (the same handle the sqlite registry and refs twins consume).
Trait Implementations§
Source§impl LfsRows for SqliteLfsRows
impl LfsRows for SqliteLfsRows
Source§fn assert<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
oid: &'life2 str,
size: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn assert<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
oid: &'life2 str,
size: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
(repo_id, oid) row with the
asserted size, or — when the pair already has a row — refresh
that row’s size and change nothing else (the refcount-aware
upsert: one oid re-asserted in one repo is one row).Source§fn remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
oid: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
oid: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn remove_repo<'life0, 'life1, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_repo<'life0, 'life1, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn rows<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LfsRow>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rows<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<LfsRow>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
(repo_id, oid)
order.