pub struct AccelRepository { /* private fields */ }Expand description
Derives, maintains, and queries the accelerator indexes for the Postgres backend.
Implementations§
Source§impl AccelRepository
impl AccelRepository
pub fn new(pool: PgPool, triples: TripleRepository) -> Self
Sourcepub async fn run(
&self,
query: &AcceleratedQuery,
) -> Result<AccelSolutions, DomainError>
pub async fn run( &self, query: &AcceleratedQuery, ) -> Result<AccelSolutions, DomainError>
Answer a recognized query from the graph’s accelerator indexes, which the
write path keeps in sync with the committed triples (see
Self::refresh_graph).
Sourcepub async fn refresh_graph(
&self,
conn: &mut PgConnection,
graph: &str,
) -> Result<(), DomainError>
pub async fn refresh_graph( &self, conn: &mut PgConnection, graph: &str, ) -> Result<(), DomainError>
Rebuild a graph’s accelerator indexes from its triples, inside the
caller’s write transaction (atomic with the triple write). The triple
scan runs through conn, so it sees the triples the same transaction
just wrote; the rebuilt indexes are deleted and reinserted on conn and
commit together with the triples. Callers invoke this after every write
that changes a graph’s triples.
Trait Implementations§
Source§impl Clone for AccelRepository
impl Clone for AccelRepository
Source§fn clone(&self) -> AccelRepository
fn clone(&self) -> AccelRepository
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AccelRepository
impl !UnwindSafe for AccelRepository
impl Freeze for AccelRepository
impl Send for AccelRepository
impl Sync for AccelRepository
impl Unpin for AccelRepository
impl UnsafeUnpin for AccelRepository
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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