pub struct MemoryRepository { /* private fields */ }Implementations§
Source§impl MemoryRepository
impl MemoryRepository
pub fn new(pool: PgPool) -> Self
pub fn pool(&self) -> &PgPool
pub async fn create_memory( &self, request: CreateMemoryRequest, ) -> Result<Memory>
pub async fn get_memory(&self, id: Uuid) -> Result<Memory>
pub async fn update_memory( &self, id: Uuid, request: UpdateMemoryRequest, ) -> Result<Memory>
pub async fn delete_memory(&self, id: Uuid) -> Result<()>
pub async fn search_memories( &self, request: SearchRequest, ) -> Result<SearchResponse>
pub async fn search_memories_simple( &self, request: SearchRequest, ) -> Result<Vec<SearchResult>>
pub async fn get_memories_by_tier( &self, tier: MemoryTier, limit: Option<i64>, ) -> Result<Vec<Memory>>
pub async fn migrate_memory( &self, id: Uuid, to_tier: MemoryTier, reason: Option<String>, ) -> Result<Memory>
pub async fn get_expired_memories(&self) -> Result<Vec<Memory>>
pub async fn cleanup_expired_memories(&self) -> Result<u64>
pub async fn get_migration_candidates( &self, tier: MemoryTier, limit: i64, ) -> Result<Vec<Memory>>
pub async fn get_statistics(&self) -> Result<MemoryStatistics>
Auto Trait Implementations§
impl Freeze for MemoryRepository
impl !RefUnwindSafe for MemoryRepository
impl Send for MemoryRepository
impl Sync for MemoryRepository
impl Unpin for MemoryRepository
impl !UnwindSafe for MemoryRepository
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 more