Skip to main content

RepositoryGraphStagingGuard

Struct RepositoryGraphStagingGuard 

Source
pub struct RepositoryGraphStagingGuard<'store> { /* private fields */ }
Expand description

Disposable typed repository-graph writer used before main index publication.

Implementations§

Source§

impl RepositoryGraphStagingGuard<'_>

Source

pub fn append_entity_refs(&mut self, entities: &[&GraphEntity]) -> DbResult<()>

Append borrowed entity rows without cloning the staged domain objects.

§Errors

Returns an error for foreign project or generation rows, stable-key collisions, or SQLite failures.

Source

pub fn append_batch( &mut self, entities: &[GraphEntity], relations: &[LogicalRelation], occurrences: &[RelationOccurrence], coverage: &[CoverageRecord], entity_exports: &[EntityResolutionKey], relation_dependencies: &[RelationDependencyKey], ) -> DbResult<()>

Append one fully validated graph and resolution-key batch.

§Errors

Returns an error for foreign project or generation rows, invalid owner bindings, stable-key collisions, or SQLite failures.

Source

pub fn set_document_unresolved_reasons( &mut self, reasons: &[(LogicalRelationKey, DocumentTargetUnresolvedReason)], ) -> DbResult<()>

Attach closed reasons to staged unresolved documents relations.

§Errors

Returns an error without partial mutation for duplicate keys, incompatible staged relations, or SQLite failures.

Source

pub fn set_document_unresolved_reasons_controlled( &mut self, reasons: &[(LogicalRelationKey, DocumentTargetUnresolvedReason)], control: &IndexWorkControl, ) -> DbResult<()>

Attach staged document reasons while observing publication cancellation.

§Errors

Returns an error without partial mutation when cancellation, duplicate keys, incompatible staged relations, or SQLite failures occur.

Source

pub fn complete(self) -> DbResult<()>

Commit the staged graph and bind it to the requested generation.

§Errors

Returns an error when SQLite cannot persist the generation or commit.

Auto Trait Implementations§

§

impl<'store> !RefUnwindSafe for RepositoryGraphStagingGuard<'store>

§

impl<'store> !Send for RepositoryGraphStagingGuard<'store>

§

impl<'store> !Sync for RepositoryGraphStagingGuard<'store>

§

impl<'store> !UnwindSafe for RepositoryGraphStagingGuard<'store>

§

impl<'store> Freeze for RepositoryGraphStagingGuard<'store>

§

impl<'store> Unpin for RepositoryGraphStagingGuard<'store>

§

impl<'store> UnsafeUnpin for RepositoryGraphStagingGuard<'store>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.