Skip to main content

ContextStoreApi

Trait ContextStoreApi 

Source
pub trait ContextStoreApi {
Show 15 methods // Required methods fn add( &mut self, records: &[AddRecordRequest], ) -> impl Future<Output = Result<AddRecordsResponse, ContextError>> + Send; fn upsert( &mut self, request: &UpsertRecordRequest, ) -> impl Future<Output = Result<UpsertRecordResponse, ContextError>> + Send; fn update( &mut self, request: &UpdateRecordRequest, ) -> impl Future<Output = Result<UpdateRecordResponse, ContextError>> + Send; fn get( &self, id: &str, ) -> impl Future<Output = Result<Option<RecordDto>, ContextError>> + Send; fn get_by_external_id( &self, external_id: &str, ) -> impl Future<Output = Result<Option<RecordDto>, ContextError>> + Send; fn delete_by_id( &mut self, id: &str, ) -> impl Future<Output = Result<DeleteRecordResponse, ContextError>> + Send; fn delete_by_external_id( &mut self, external_id: &str, ) -> impl Future<Output = Result<DeleteRecordResponse, ContextError>> + Send; fn list( &self, limit: Option<usize>, offset: Option<usize>, filters: Option<Value>, include_expired: bool, include_retired: bool, ) -> impl Future<Output = Result<Vec<RecordDto>, ContextError>> + Send; fn related( &self, target_id: &str, relation: Option<&str>, limit: Option<usize>, include_expired: bool, include_retired: bool, ) -> impl Future<Output = Result<Vec<RecordDto>, ContextError>> + Send; fn search( &self, request: &SearchRequest, ) -> impl Future<Output = Result<Vec<SearchResultDto>, ContextError>> + Send; fn retrieve( &self, request: &RetrieveRequest, ) -> impl Future<Output = Result<Vec<RetrieveResultDto>, ContextError>> + Send; fn version(&self) -> u64; fn checkout( &mut self, version: u64, ) -> impl Future<Output = Result<(), ContextError>> + Send; fn compact( &mut self, options: Option<CompactRequest>, ) -> impl Future<Output = Result<CompactResponse, ContextError>> + Send; fn compaction_stats( &self, ) -> impl Future<Output = Result<CompactStatsResponse, ContextError>> + Send;
}

Required Methods§

Source

fn add( &mut self, records: &[AddRecordRequest], ) -> impl Future<Output = Result<AddRecordsResponse, ContextError>> + Send

Source

fn upsert( &mut self, request: &UpsertRecordRequest, ) -> impl Future<Output = Result<UpsertRecordResponse, ContextError>> + Send

Source

fn update( &mut self, request: &UpdateRecordRequest, ) -> impl Future<Output = Result<UpdateRecordResponse, ContextError>> + Send

Source

fn get( &self, id: &str, ) -> impl Future<Output = Result<Option<RecordDto>, ContextError>> + Send

Source

fn get_by_external_id( &self, external_id: &str, ) -> impl Future<Output = Result<Option<RecordDto>, ContextError>> + Send

Source

fn delete_by_id( &mut self, id: &str, ) -> impl Future<Output = Result<DeleteRecordResponse, ContextError>> + Send

Source

fn delete_by_external_id( &mut self, external_id: &str, ) -> impl Future<Output = Result<DeleteRecordResponse, ContextError>> + Send

Source

fn list( &self, limit: Option<usize>, offset: Option<usize>, filters: Option<Value>, include_expired: bool, include_retired: bool, ) -> impl Future<Output = Result<Vec<RecordDto>, ContextError>> + Send

Source

fn related( &self, target_id: &str, relation: Option<&str>, limit: Option<usize>, include_expired: bool, include_retired: bool, ) -> impl Future<Output = Result<Vec<RecordDto>, ContextError>> + Send

Source

fn search( &self, request: &SearchRequest, ) -> impl Future<Output = Result<Vec<SearchResultDto>, ContextError>> + Send

Source

fn retrieve( &self, request: &RetrieveRequest, ) -> impl Future<Output = Result<Vec<RetrieveResultDto>, ContextError>> + Send

Source

fn version(&self) -> u64

Source

fn checkout( &mut self, version: u64, ) -> impl Future<Output = Result<(), ContextError>> + Send

Source

fn compact( &mut self, options: Option<CompactRequest>, ) -> impl Future<Output = Result<CompactResponse, ContextError>> + Send

Source

fn compaction_stats( &self, ) -> impl Future<Output = Result<CompactStatsResponse, ContextError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ContextStoreApi for ContextStore

Source§

async fn add( &mut self, records: &[AddRecordRequest], ) -> Result<AddRecordsResponse, ContextError>

Source§

async fn upsert( &mut self, request: &UpsertRecordRequest, ) -> Result<UpsertRecordResponse, ContextError>

Source§

async fn update( &mut self, request: &UpdateRecordRequest, ) -> Result<UpdateRecordResponse, ContextError>

Source§

async fn get(&self, id: &str) -> Result<Option<RecordDto>, ContextError>

Source§

async fn get_by_external_id( &self, external_id: &str, ) -> Result<Option<RecordDto>, ContextError>

Source§

async fn delete_by_id( &mut self, id: &str, ) -> Result<DeleteRecordResponse, ContextError>

Source§

async fn delete_by_external_id( &mut self, external_id: &str, ) -> Result<DeleteRecordResponse, ContextError>

Source§

async fn list( &self, limit: Option<usize>, offset: Option<usize>, filters: Option<Value>, include_expired: bool, include_retired: bool, ) -> Result<Vec<RecordDto>, ContextError>

Source§

async fn related( &self, target_id: &str, relation: Option<&str>, limit: Option<usize>, include_expired: bool, include_retired: bool, ) -> Result<Vec<RecordDto>, ContextError>

Source§

async fn search( &self, request: &SearchRequest, ) -> Result<Vec<SearchResultDto>, ContextError>

Source§

async fn retrieve( &self, request: &RetrieveRequest, ) -> Result<Vec<RetrieveResultDto>, ContextError>

Source§

fn version(&self) -> u64

Source§

async fn checkout(&mut self, version: u64) -> Result<(), ContextError>

Source§

async fn compact( &mut self, options: Option<CompactRequest>, ) -> Result<CompactResponse, ContextError>

Source§

async fn compaction_stats(&self) -> Result<CompactStatsResponse, ContextError>

Implementors§

Source§

impl ContextStoreApi for lance_context::ContextStore