gluesql_shared_memory_storage/
index.rs1use {
2 super::SharedMemoryStorage,
3 async_trait::async_trait,
4 gluesql_core::{
5 ast::{IndexOperator, OrderByExpr},
6 data::Value,
7 error::{Error, Result},
8 store::{Index, IndexMut, RowIter},
9 },
10};
11
12#[async_trait]
13impl Index for SharedMemoryStorage {
14 async fn scan_indexed_data<'a>(
15 &'a self,
16 _table_name: &str,
17 _index_name: &str,
18 _asc: Option<bool>,
19 _cmp_value: Option<(&IndexOperator, Value)>,
20 ) -> Result<RowIter<'a>> {
21 Err(Error::StorageMsg(
22 "[Shared MemoryStorage] index is not supported".to_owned(),
23 ))
24 }
25}
26
27#[async_trait]
28impl IndexMut for SharedMemoryStorage {
29 async fn create_index(
30 &mut self,
31 _table_name: &str,
32 _index_name: &str,
33 _column: &OrderByExpr,
34 ) -> Result<()> {
35 Err(Error::StorageMsg(
36 "[Shared MemoryStorage] index is not supported".to_owned(),
37 ))
38 }
39
40 async fn drop_index(&mut self, _table_name: &str, _index_name: &str) -> Result<()> {
41 Err(Error::StorageMsg(
42 "[Shared MemoryStorage] index is not supported".to_owned(),
43 ))
44 }
45}