parent
95685ba9a7
commit
c3bb2b62a8
1 changed files with 6 additions and 8 deletions
|
@ -32,12 +32,15 @@ pub enum Error {
|
||||||
Internal,
|
Internal,
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------ Rows
|
// ------ Store
|
||||||
pub trait RowStore {
|
pub trait RowStore {
|
||||||
fn new_ref(partition: &str, sort: &str) -> impl RowRef;
|
fn new_row(&self, partition: &str, sort: &str) -> impl RowRef;
|
||||||
fn new_ref_batch(partition: &str, filter: Selector) -> impl RowRefBatch;
|
fn new_row_batch(&self, partition: &str, filter: Selector) -> impl RowRefBatch;
|
||||||
|
fn new_blob(&self, key: &str) -> impl BlobRef;
|
||||||
|
fn new_blob_list(&self) -> Vec<impl BlobRef>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ------- Row
|
||||||
pub trait RowRef {
|
pub trait RowRef {
|
||||||
fn to_value(&self, content: &[u8]) -> impl RowValue;
|
fn to_value(&self, content: &[u8]) -> impl RowValue;
|
||||||
async fn get(&self) -> Result<impl RowValue, Error>;
|
async fn get(&self) -> Result<impl RowValue, Error>;
|
||||||
|
@ -66,11 +69,6 @@ pub trait RowValueBatch {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----- Blobs
|
// ----- Blobs
|
||||||
pub trait BlobStore {
|
|
||||||
fn new_ref(key: &str) -> impl BlobRef;
|
|
||||||
async fn list(&self) -> ();
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait BlobRef {
|
pub trait BlobRef {
|
||||||
fn set_value(&self, content: &[u8]) -> impl BlobValue;
|
fn set_value(&self, content: &[u8]) -> impl BlobValue;
|
||||||
async fn get(&self) -> impl BlobValue;
|
async fn get(&self) -> impl BlobValue;
|
||||||
|
|
Loading…
Reference in a new issue