pub struct SqliteStore { /* private fields */ }Expand description
Main SQLite store for agent persistence
Implementations§
Source§impl SqliteStore
impl SqliteStore
Sourcepub async fn new(config: SqliteConfig) -> Result<Self, MemoryError>
pub async fn new(config: SqliteConfig) -> Result<Self, MemoryError>
Create a new SQLite store with the given configuration
Sourcepub async fn open<P: AsRef<Path>>(path: P) -> Result<Self, MemoryError>
pub async fn open<P: AsRef<Path>>(path: P) -> Result<Self, MemoryError>
Create a store with default configuration at the given path
Sourcepub async fn in_memory() -> Result<Self, MemoryError>
pub async fn in_memory() -> Result<Self, MemoryError>
Create an in-memory store (for testing)
Sourcepub fn pool(&self) -> &SqlitePool
pub fn pool(&self) -> &SqlitePool
Get the connection pool
Sourcepub fn session_backend(self: &Arc<Self>) -> SqliteSessionBackend
pub fn session_backend(self: &Arc<Self>) -> SqliteSessionBackend
Create a session backend from this store
Sourcepub fn vector_store(self: &Arc<Self>, dimension: usize) -> SqliteVectorStore
pub fn vector_store(self: &Arc<Self>, dimension: usize) -> SqliteVectorStore
Create a vector store from this store
Auto Trait Implementations§
impl Freeze for SqliteStore
impl !RefUnwindSafe for SqliteStore
impl Send for SqliteStore
impl Sync for SqliteStore
impl Unpin for SqliteStore
impl UnsafeUnpin for SqliteStore
impl !UnwindSafe for SqliteStore
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