pub trait DatasetIndexExt {
// Required methods
fn create_index<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
columns: &'life1 [&'life2 str],
index_type: IndexType,
name: Option<String>,
params: &'life3 dyn IndexParams,
replace: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn load_indices<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<Vec<Index>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_scalar_index_for_column<'life0, 'life1, 'async_trait>(
&'life0 self,
col: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Index>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn optimize_indices<'life0, 'life1, 'async_trait>(
&'life0 mut self,
options: &'life1 OptimizeOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn index_statistics<'life0, 'life1, 'async_trait>(
&'life0 self,
index_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn commit_existing_index<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
index_name: &'life1 str,
column: &'life2 str,
index_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided methods
fn load_index<'life0, 'life1, 'async_trait>(
&'life0 self,
uuid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Index>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn load_indices_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Index>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Required Methods§
Sourcefn create_index<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
columns: &'life1 [&'life2 str],
index_type: IndexType,
name: Option<String>,
params: &'life3 dyn IndexParams,
replace: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn create_index<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
columns: &'life1 [&'life2 str],
index_type: IndexType,
name: Option<String>,
params: &'life3 dyn IndexParams,
replace: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Create indices on columns.
Upon finish, a new dataset version is generated.
Parameters:
columns
: the columns to build the indices on.index_type
: specifyIndexType
.name
: optional index name. Must be unique in the dataset. if not provided, it will auto-generate one.params
: index parameters.replace
: replace the existing index if it exists.
Sourcefn load_indices<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<Vec<Index>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_indices<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<Vec<Index>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read all indices of this Dataset version.
The indices are lazy loaded and cached in memory within the [Dataset
] instance.
The cache is invalidated when the dataset version (Manifest) is changed.
Sourcefn load_scalar_index_for_column<'life0, 'life1, 'async_trait>(
&'life0 self,
col: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Index>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_scalar_index_for_column<'life0, 'life1, 'async_trait>(
&'life0 self,
col: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Index>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads a specific index with the given index name.
Sourcefn optimize_indices<'life0, 'life1, 'async_trait>(
&'life0 mut self,
options: &'life1 OptimizeOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn optimize_indices<'life0, 'life1, 'async_trait>(
&'life0 mut self,
options: &'life1 OptimizeOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Optimize indices.
Sourcefn index_statistics<'life0, 'life1, 'async_trait>(
&'life0 self,
index_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn index_statistics<'life0, 'life1, 'async_trait>(
&'life0 self,
index_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find index with a given index_name and return its serialized statistics.
If the index does not exist, return Error.
fn commit_existing_index<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
index_name: &'life1 str,
column: &'life2 str,
index_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Provided Methods§
Sourcefn load_index<'life0, 'life1, 'async_trait>(
&'life0 self,
uuid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Index>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_index<'life0, 'life1, 'async_trait>(
&'life0 self,
uuid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Index>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads all the indies of a given UUID.
Note that it is possible to have multiple indices with the same UUID, as they are the deltas of the same index.
Sourcefn load_indices_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Index>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_indices_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Index>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Loads a specific index with the given index name
§Returns
Ok(indices)
: if the index exists, returns the index.Ok(vec![])
: if the index does not exist.Err(e)
: if there is an error loading indices.