pub struct BackendWriteTransaction<'a> { /* private fields */ }
Implementations§
source§impl<'a> BackendWriteTransaction<'a>
impl<'a> BackendWriteTransaction<'a>
pub fn create( &mut self, cid: &Cid, entries: Vec<EntrySealedNew>, ) -> Result<Vec<EntrySealedCommitted>, OperationError>
sourcepub fn refresh(
&mut self,
entries: Vec<EntrySealedNew>,
) -> Result<Vec<EntrySealedCommitted>, OperationError>
pub fn refresh( &mut self, entries: Vec<EntrySealedNew>, ) -> Result<Vec<EntrySealedCommitted>, OperationError>
This is similar to create, but used in the replication path as it records all the CID’s in the entry to the RUV, but without applying the current CID as a new value in the RUV. We do not want to apply the current CID in the RUV related to this entry as that could cause an infinite replication loop!
pub fn modify( &mut self, cid: &Cid, pre_entries: &[Arc<EntrySealedCommitted>], post_entries: &[EntrySealedCommitted], ) -> Result<(), OperationError>
pub fn incremental_prepare<'x>( &mut self, entry_meta: &[EntryIncrementalNew], ) -> Result<Vec<Arc<EntrySealedCommitted>>, OperationError>
pub fn incremental_apply( &mut self, update_entries: &[(EntrySealedCommitted, Arc<EntrySealedCommitted>)], create_entries: Vec<EntrySealedNew>, ) -> Result<(), OperationError>
pub fn reap_tombstones( &mut self, cid: &Cid, trim_cid: &Cid, ) -> Result<usize, OperationError>
pub fn update_idxmeta( &mut self, idxkeys: Vec<IdxKey>, ) -> Result<(), OperationError>
pub fn upgrade_reindex(&mut self, v: i64) -> Result<(), OperationError>
pub fn reindex(&mut self, immediate: bool) -> Result<(), OperationError>
pub fn restore(&mut self, src_path: &str) -> Result<(), OperationError>
pub fn quarantine_entry(&mut self, id: u64) -> Result<(), OperationError>
pub fn restore_quarantined(&mut self, id: u64) -> Result<(), OperationError>
pub fn clear_cache(&mut self) -> Result<(), OperationError>
pub fn commit(self) -> Result<(), OperationError>
pub fn get_db_s_uuid(&mut self) -> Result<Uuid, OperationError>
sourcepub fn set_db_d_uuid(&mut self, nsid: Uuid) -> Result<(), OperationError>
pub fn set_db_d_uuid(&mut self, nsid: Uuid) -> Result<(), OperationError>
Manually set a new domain UUID and store it into the DB. This is used as part of a replication refresh.
sourcepub fn get_db_d_uuid(&mut self) -> Result<Uuid, OperationError>
pub fn get_db_d_uuid(&mut self) -> Result<Uuid, OperationError>
This pulls the domain UUID from the database
pub fn set_db_ts_max(&mut self, ts: Duration) -> Result<(), OperationError>
pub fn get_db_ts_max( &mut self, ts: Duration, ) -> Result<Duration, OperationError>
Trait Implementations§
source§impl<'a> BackendTransaction for BackendWriteTransaction<'a>
impl<'a> BackendTransaction for BackendWriteTransaction<'a>
type IdlLayerType = IdlArcSqliteWriteTransaction<'a>
type RuvType = ReplicationUpdateVectorWriteTransaction<'a>
fn get_idlayer(&mut self) -> &mut IdlArcSqliteWriteTransaction<'a>
fn get_ruv(&mut self) -> &mut ReplicationUpdateVectorWriteTransaction<'a>
fn get_idxmeta_ref(&self) -> &IdxMeta
source§fn filter2idl(
&mut self,
filt: &FilterResolved,
thres: usize,
) -> Result<(IdList, FilterPlan), OperationError>
fn filter2idl( &mut self, filt: &FilterResolved, thres: usize, ) -> Result<(IdList, FilterPlan), OperationError>
Recursively apply a filter, transforming into IdList’s on the way. This builds a query
execution log, so that it can be examined how an operation proceeded.
fn filter2idl_sub( &mut self, attr: &Attribute, sub_idx_key: String, ) -> Result<(IdList, FilterPlan), OperationError>
fn search( &mut self, erl: &Limits, filt: &Filter<FilterValidResolved>, ) -> Result<Vec<Arc<EntrySealedCommitted>>, OperationError>
source§fn exists(
&mut self,
erl: &Limits,
filt: &Filter<FilterValidResolved>,
) -> Result<bool, OperationError>
fn exists( &mut self, erl: &Limits, filt: &Filter<FilterValidResolved>, ) -> Result<bool, OperationError>
Given a filter, assert some condition exists.
Basically, this is a specialised case of search, where we don’t need to
load any candidates if they match. This is heavily used in uuid
refint and attr uniqueness.
fn retrieve_range( &mut self, ranges: &BTreeMap<Uuid, ReplCidRange>, ) -> Result<Vec<Arc<EntrySealedCommitted>>, OperationError>
fn verify(&mut self) -> Vec<Result<(), ConsistencyError>>
fn verify_entry_index( &mut self, e: &EntrySealedCommitted, ) -> Result<(), ConsistencyError>
fn verify_indexes(&mut self) -> Vec<Result<(), ConsistencyError>>
fn verify_ruv(&mut self, results: &mut Vec<Result<(), ConsistencyError>>)
fn backup(&mut self, dst_path: &str) -> Result<(), OperationError>
fn name2uuid(&mut self, name: &str) -> Result<Option<Uuid>, OperationError>
fn externalid2uuid( &mut self, name: &str, ) -> Result<Option<Uuid>, OperationError>
fn uuid2spn(&mut self, uuid: Uuid) -> Result<Option<Value>, OperationError>
fn uuid2rdn(&mut self, uuid: Uuid) -> Result<Option<String>, OperationError>
Auto Trait Implementations§
impl<'a> !Freeze for BackendWriteTransaction<'a>
impl<'a> !RefUnwindSafe for BackendWriteTransaction<'a>
impl<'a> !Send for BackendWriteTransaction<'a>
impl<'a> !Sync for BackendWriteTransaction<'a>
impl<'a> Unpin for BackendWriteTransaction<'a>
impl<'a> !UnwindSafe for BackendWriteTransaction<'a>
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request