Skip to main content

gluesql_git_storage/
store.rs

1use {
2    crate::GitStorage,
3    gluesql_core::{
4        data::{Key, Schema, Value},
5        error::Result,
6        store::{RowIter, Store},
7    },
8};
9
10impl Store for GitStorage {
11    fn fetch_all_schemas(&self) -> Result<Vec<Schema>> {
12        self.get_store().fetch_all_schemas()
13    }
14
15    fn fetch_schema(&self, table_name: &str) -> Result<Option<Schema>> {
16        self.get_store().fetch_schema(table_name)
17    }
18
19    fn fetch_data(&self, table_name: &str, key: &Key) -> Result<Option<Vec<Value>>> {
20        self.get_store().fetch_data(table_name, key)
21    }
22
23    fn scan_data<'a>(&'a self, table_name: &str) -> Result<RowIter<'a>> {
24        self.get_store().scan_data(table_name)
25    }
26}