Trait kanidmd_lib::be::BackendTransaction

source ·
pub trait BackendTransaction {
    type IdlLayerType: IdlArcSqliteTransaction;
    type RuvType: ReplicationUpdateVectorTransaction;

Show 17 methods // Required methods fn get_idlayer(&mut self) -> &mut Self::IdlLayerType; fn get_ruv(&mut self) -> &mut Self::RuvType; fn get_idxmeta_ref(&self) -> &IdxMeta; // Provided methods fn filter2idl( &mut self, filt: &FilterResolved, thres: usize, ) -> Result<(IdList, FilterPlan), OperationError> { ... } 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> { ... } fn exists( &mut self, erl: &Limits, filt: &Filter<FilterValidResolved>, ) -> Result<bool, OperationError> { ... } 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> { ... }
}

Required Associated Types§

source

type IdlLayerType: IdlArcSqliteTransaction

source

type RuvType: ReplicationUpdateVectorTransaction

Required Methods§

source

fn get_idlayer(&mut self) -> &mut Self::IdlLayerType

source

fn get_ruv(&mut self) -> &mut Self::RuvType

source

fn get_idxmeta_ref(&self) -> &IdxMeta

Provided Methods§

source

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.

source

fn filter2idl_sub( &mut self, attr: &Attribute, sub_idx_key: String, ) -> Result<(IdList, FilterPlan), OperationError>

source

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>

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.

source

fn retrieve_range( &mut self, ranges: &BTreeMap<Uuid, ReplCidRange>, ) -> Result<Vec<Arc<EntrySealedCommitted>>, OperationError>

source

fn verify(&mut self) -> Vec<Result<(), ConsistencyError>>

source

fn verify_entry_index( &mut self, e: &EntrySealedCommitted, ) -> Result<(), ConsistencyError>

source

fn verify_indexes(&mut self) -> Vec<Result<(), ConsistencyError>>

source

fn verify_ruv(&mut self, results: &mut Vec<Result<(), ConsistencyError>>)

source

fn backup(&mut self, dst_path: &str) -> Result<(), OperationError>

source

fn name2uuid(&mut self, name: &str) -> Result<Option<Uuid>, OperationError>

source

fn externalid2uuid( &mut self, name: &str, ) -> Result<Option<Uuid>, OperationError>

source

fn uuid2spn(&mut self, uuid: Uuid) -> Result<Option<Value>, OperationError>

source

fn uuid2rdn(&mut self, uuid: Uuid) -> Result<Option<String>, OperationError>

Implementors§

source§

impl<'a> BackendTransaction for BackendReadTransaction<'a>

§

type IdlLayerType = IdlArcSqliteReadTransaction<'a>

§

type RuvType = ReplicationUpdateVectorReadTransaction<'a>

source§

impl<'a> BackendTransaction for BackendWriteTransaction<'a>

§

type IdlLayerType = IdlArcSqliteWriteTransaction<'a>

§

type RuvType = ReplicationUpdateVectorWriteTransaction<'a>