pub struct TemporalQueryEngine<'a> { /* private fields */ }Expand description
Temporal query engine
Implementations§
Source§impl<'a> TemporalQueryEngine<'a>
impl<'a> TemporalQueryEngine<'a>
Sourcepub fn new(conn: &'a Connection) -> Self
pub fn new(conn: &'a Connection) -> Self
Create a new temporal query engine
Sourcepub fn get_memory_at(
&self,
memory_id: i64,
as_of: DateTime<Utc>,
) -> Result<Option<TemporalMemory>>
pub fn get_memory_at( &self, memory_id: i64, as_of: DateTime<Utc>, ) -> Result<Option<TemporalMemory>>
Get a memory as it existed at a specific point in time
Sourcepub fn query_time_range(
&self,
options: &TemporalQueryOptions,
limit: i64,
) -> Result<Vec<Memory>>
pub fn query_time_range( &self, options: &TemporalQueryOptions, limit: i64, ) -> Result<Vec<Memory>>
Query memories within a time range
Sourcepub fn get_crossrefs_at(
&self,
memory_id: i64,
as_of: DateTime<Utc>,
) -> Result<Vec<CrossReference>>
pub fn get_crossrefs_at( &self, memory_id: i64, as_of: DateTime<Utc>, ) -> Result<Vec<CrossReference>>
Get cross-references valid at a specific point in time
Sourcepub fn get_version_history(&self, memory_id: i64) -> Result<Vec<MemorySnapshot>>
pub fn get_version_history(&self, memory_id: i64) -> Result<Vec<MemorySnapshot>>
Get version history for a memory
Sourcepub fn get_memory_version(
&self,
memory_id: i64,
version: i32,
) -> Result<Option<MemorySnapshot>>
pub fn get_memory_version( &self, memory_id: i64, version: i32, ) -> Result<Option<MemorySnapshot>>
Get a specific version of a memory
Auto Trait Implementations§
impl<'a> Freeze for TemporalQueryEngine<'a>
impl<'a> !RefUnwindSafe for TemporalQueryEngine<'a>
impl<'a> !Send for TemporalQueryEngine<'a>
impl<'a> !Sync for TemporalQueryEngine<'a>
impl<'a> Unpin for TemporalQueryEngine<'a>
impl<'a> UnsafeUnpin for TemporalQueryEngine<'a>
impl<'a> !UnwindSafe for TemporalQueryEngine<'a>
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> 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 moreCreates a shared type from an unshared type.