pub struct SqliteMemoryStore { /* private fields */ }Expand description
SQLite-backed memory store.
Implements MemoryBackend for the memory_* agent tools.
Each memory is stored with an auto-generated UUID, kind, content, and subject.
The schema reserves an embedding column for future cosine-search support.
Implementations§
Source§impl SqliteMemoryStore
impl SqliteMemoryStore
Sourcepub fn open(path: &Path) -> Result<Self, Error>
pub fn open(path: &Path) -> Result<Self, Error>
Open or create a SQLite memory store at path.
Uses :memory: for an in-memory database. For persistent paths,
filesystem-aware journal-mode selection is applied (see
oxicode_mnemopi::journal::JournalMode). On network filesystems the
engine falls back to TRUNCATE mode + per-host DB sibling to avoid
SIGBUS from mmap’d -shm.
Trait Implementations§
Source§impl Debug for SqliteMemoryStore
impl Debug for SqliteMemoryStore
Source§impl MemoryBackend for SqliteMemoryStore
impl MemoryBackend for SqliteMemoryStore
Source§fn clear_all<'a>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<usize, ToolError>> + Send + 'a>>
fn clear_all<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<usize, ToolError>> + Send + 'a>>
Bulk delete: a single SQL statement, no per-row round-trip. Returns the number of rows removed across all subjects.
Source§fn enqueue_consolidation<'a>(
&'a self,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'a>>
fn enqueue_consolidation<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'a>>
No background pipeline: surface an honest “not supported” rather than claiming to have enqueued work that did not happen.
Source§fn put<'a>(
&'a self,
content: &'a str,
kind: &'a str,
subject: &'a str,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'a>>
fn put<'a>( &'a self, content: &'a str, kind: &'a str, subject: &'a str, ) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'a>>
Source§fn search<'a>(
&'a self,
query: &'a str,
k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>, ToolError>> + Send + 'a>>
fn search<'a>( &'a self, query: &'a str, k: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>, ToolError>> + Send + 'a>>
k matches.Source§fn list<'a>(
&'a self,
subject: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>, ToolError>> + Send + 'a>>
fn list<'a>( &'a self, subject: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryItem>, ToolError>> + Send + 'a>>
Source§fn delete<'a>(
&'a self,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<(), ToolError>> + Send + 'a>>
fn delete<'a>( &'a self, id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), ToolError>> + Send + 'a>>
Source§fn memory_info(&self) -> Option<String>
fn memory_info(&self) -> Option<String>
Source§fn trigger_consolidation(&self) -> Option<String>
fn trigger_consolidation(&self) -> Option<String>
Source§fn trigger_harmonize(&self) -> Option<String>
fn trigger_harmonize(&self) -> Option<String>
Auto Trait Implementations§
impl !Freeze for SqliteMemoryStore
impl !RefUnwindSafe for SqliteMemoryStore
impl !UnwindSafe for SqliteMemoryStore
impl Send for SqliteMemoryStore
impl Sync for SqliteMemoryStore
impl Unpin for SqliteMemoryStore
impl UnsafeUnpin for SqliteMemoryStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
self file descriptor. Read moreSource§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> ⓘ
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> ⓘ
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