pub struct SchemaWriteTransaction<'a> { /* private fields */ }Expand description
A writable transaction of the working schema set. You should not change this directly, the writability is for the server internally to allow reloading of the schema. Changes you make will be lost when the server re-reads the schema from disk.
Implementations§
Source§impl SchemaWriteTransaction<'_>
impl SchemaWriteTransaction<'_>
pub fn commit(self) -> Result<(), OperationError>
pub fn update_attributes( &mut self, attributetypes: Vec<SchemaAttribute>, ) -> Result<(), OperationError>
pub fn update_classes( &mut self, classtypes: Vec<SchemaClass>, ) -> Result<(), OperationError>
pub fn to_entries(&self) -> Vec<Entry<EntryInit, EntryNew>>
pub fn reload_idxmeta(&self) -> Vec<IdxKey>
Sourcepub fn generate_in_memory(&mut self) -> Result<(), OperationError>
pub fn generate_in_memory(&mut self) -> Result<(), OperationError>
Generate the minimal in memory schema needed to begin the server bootstrap process. This should contain the most critical schema definitions that the server requires to be able to read in other schema objects and persist them into our database.
THIS IS FOR SYSTEM CRITICAL INTERNAL SCHEMA ONLY
Schema should otherwise be in our migration data - not here.
Trait Implementations§
Source§impl SchemaTransaction for SchemaWriteTransaction<'_>
impl SchemaTransaction for SchemaWriteTransaction<'_>
fn get_attributes_unique(&self) -> &Vec<Attribute>
fn get_reference_types(&self) -> &HashMap<Attribute, SchemaAttribute>
fn get_classes(&self) -> &HashMap<AttrString, SchemaClass>
fn get_attributes(&self) -> &HashMap<Attribute, SchemaAttribute>
fn validate(&self) -> Vec<Result<(), ConsistencyError>>
fn is_replicated(&self, attr: &Attribute) -> bool
fn is_multivalue(&self, attr: &Attribute) -> Result<bool, SchemaError>
fn normalise_attr_if_exists(&self, an: &str) -> Option<Attribute>
fn query_attrs_difference( &self, prev_class: &BTreeSet<&str>, new_iutf8: &BTreeSet<&str>, ) -> Result<(BTreeSet<&str>, BTreeSet<&str>), SchemaError>
Auto Trait Implementations§
impl<'a> Freeze for SchemaWriteTransaction<'a>
impl<'a> RefUnwindSafe for SchemaWriteTransaction<'a>
impl<'a> !Send for SchemaWriteTransaction<'a>
impl<'a> Sync for SchemaWriteTransaction<'a>
impl<'a> Unpin for SchemaWriteTransaction<'a>
impl<'a> UnwindSafe for SchemaWriteTransaction<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> 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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].