Skip to content

Commit

Permalink
Implement append
Browse files Browse the repository at this point in the history
  • Loading branch information
sanketkedia committed Nov 11, 2024
1 parent 22dea40 commit 1196f5f
Show file tree
Hide file tree
Showing 7 changed files with 321 additions and 33 deletions.
16 changes: 16 additions & 0 deletions rust/blockstore/src/types/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ impl BlockfileWriter {
}
}

pub async fn get_clone<
K: Key + Into<KeyWrapper> + ArrowWriteableKey,
V: Value + Writeable + ArrowWriteableValue,
>(
&self,
prefix: &str,
key: K,
) -> Result<Option<V::OwnedReadableValue>, Box<dyn ChromaError>> {
match self {
BlockfileWriter::MemoryBlockfileWriter(_) => todo!(),
BlockfileWriter::ArrowBlockfileWriter(writer) => {
writer.get_clone::<K, V>(prefix, key).await
}
}
}

pub fn id(&self) -> uuid::Uuid {
match self {
BlockfileWriter::MemoryBlockfileWriter(writer) => writer.id(),
Expand Down
Loading

0 comments on commit 1196f5f

Please sign in to comment.