pub struct SqliteSparseStore { /* private fields */ }Expand description
SQLite-backed sparse vector store.
Implementations§
Source§impl SqliteSparseStore
impl SqliteSparseStore
Sourcepub fn new(
pool: Arc<ConnectionPool>,
is_file_backed: bool,
model_key: String,
namespace: String,
) -> Result<Self, SqliteError>
pub fn new( pool: Arc<ConnectionPool>, is_file_backed: bool, model_key: String, namespace: String, ) -> Result<Self, SqliteError>
Create a new sparse store for the given model key and namespace.
Trait Implementations§
Source§impl SparseStore for SqliteSparseStore
impl SparseStore for SqliteSparseStore
Source§fn insert_sparse<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
subject_id: Uuid,
kind: SubstrateKind,
namespace: &'life1 str,
field: &'life2 str,
vector: SparseVector,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn insert_sparse<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
subject_id: Uuid,
kind: SubstrateKind,
namespace: &'life1 str,
field: &'life2 str,
vector: SparseVector,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Insert a single sparse vector for a subject.
Source§fn insert_batch<'life0, 'async_trait>(
&'life0 self,
records: Vec<SparseRecord>,
) -> Pin<Box<dyn Future<Output = Result<BatchWriteSummary, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert_batch<'life0, 'async_trait>(
&'life0 self,
records: Vec<SparseRecord>,
) -> Pin<Box<dyn Future<Output = Result<BatchWriteSummary, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert a batch of sparse vector records.
Source§fn delete<'life0, 'async_trait>(
&'life0 self,
subject_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
subject_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete the sparse vector for a subject.
Source§fn search_sparse<'life0, 'async_trait>(
&'life0 self,
request: SparseSearchRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<SparseSearchHit>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search_sparse<'life0, 'async_trait>(
&'life0 self,
request: SparseSearchRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<SparseSearchHit>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Search over sparse vectors using a sparse query.
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteSparseStore
impl !UnwindSafe for SqliteSparseStore
impl Freeze for SqliteSparseStore
impl Send for SqliteSparseStore
impl Sync for SqliteSparseStore
impl Unpin for SqliteSparseStore
impl UnsafeUnpin for SqliteSparseStore
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