patch memtable and add ts for wal

Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2024-01-25 23:09:16 +08:00
parent 89acc23208
commit 218c73f384
11 changed files with 256 additions and 96 deletions

View File

@@ -51,6 +51,22 @@ impl MemTable {
unimplemented!()
}
pub fn for_testing_put_slice(&self, key: &[u8], value: &[u8]) -> Result<()> {
self.put(key, value)
}
pub fn for_testing_get_slice(&self, key: &[u8]) -> Option<Bytes> {
self.get(key)
}
pub fn for_testing_scan_slice(
&self,
lower: Bound<&[u8]>,
upper: Bound<&[u8]>,
) -> MemTableIterator {
self.scan(lower, upper)
}
/// Get a value by key.
pub fn get(&self, _key: &[u8]) -> Option<Bytes> {
unimplemented!()