pub struct SqliteRegistry { /* private fields */ }Expand description
The durable write side of the family pair over the co-tenant
git_repos rows (the pair’s sqlite implement). Reads ride the
cached provider in the composed assemblies — the hot path never
touches this side except the refresh reads.
Mount over an already-migrated co-tenant handle (the refs twin’s shape — the same handle the composition opens once for both twins; the migrations run at the handle’s construction, loud, ADR-024 §1).
Implementations§
Source§impl SqliteRegistry
impl SqliteRegistry
Sourcepub fn new(handle: CoTenantSqlite) -> Self
pub fn new(handle: CoTenantSqlite) -> Self
Mount the twin over a co-tenant handle.
Trait Implementations§
Source§impl RegistryWrite for SqliteRegistry
impl RegistryWrite for SqliteRegistry
Source§fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 RepoRecord,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 RepoRecord,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a repo record.
RegistryError::Invalid on a malformed
id or record, RegistryError::AlreadyExists when the id is
taken. Returns the mutation’s sequence number.Source§fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 RepoRecord,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 RepoRecord,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Replace a repo record (the grant-mutation path, ADR-011).
RegistryError::Invalid on a malformed record,
RegistryError::NotFound when the id is absent. Returns the
mutation’s sequence number.Source§fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove<'life0, 'life1, 'async_trait>(
&'life0 self,
repo_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove a repo record.
RegistryError::NotFound when the id
is absent. Returns the removal’s sequence number.Source§fn watermark<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watermark<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<i64, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The table’s current watermark: the max sequence number ever
assigned (0 on a fresh table). Monotone — a committed removal
advances it even though it leaves no row.
Source§fn rows_since<'life0, 'async_trait>(
&'life0 self,
seq: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<RegistryRow>, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rows_since<'life0, 'async_trait>(
&'life0 self,
seq: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<RegistryRow>, RegistryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The reconcile catch-up read: every row mutated after
seq, in
sequence order. rows_since(0) is the whole table — the cached
provider’s snapshot-refresh read (whole-table by contract).Auto Trait Implementations§
impl !RefUnwindSafe for SqliteRegistry
impl !UnwindSafe for SqliteRegistry
impl Freeze for SqliteRegistry
impl Send for SqliteRegistry
impl Sync for SqliteRegistry
impl Unpin for SqliteRegistry
impl UnsafeUnpin for SqliteRegistry
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