global: snapshot

This commit is contained in:
nym21
2025-11-09 22:57:06 +01:00
parent dc2e847f58
commit f6a2a0540b
58 changed files with 504 additions and 714 deletions

View File

@@ -21,10 +21,14 @@ use crate::{
pub struct AsyncQuery(Query);
impl AsyncQuery {
pub async fn build(reader: &Reader, indexer: &Indexer, computer: &Computer) -> Self {
pub fn build(reader: &Reader, indexer: &Indexer, computer: &Computer) -> Self {
Self(Query::build(reader, indexer, computer))
}
pub fn inner(&self) -> &Query {
&self.0
}
pub async fn get_height(&self) -> Height {
self.0.get_height()
}
@@ -104,7 +108,7 @@ impl AsyncQuery {
self.0.get_index_to_vecids(paginated_index)
}
pub async fn metric_to_indexes(&self, metric: String) -> Option<&Vec<Index>> {
pub async fn metric_to_indexes(&self, metric: Metric) -> Option<&Vec<Index>> {
self.0.metric_to_indexes(metric)
}