diff options
author | Alex Auvolat <alex@adnab.me> | 2022-12-13 15:43:22 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-12-13 15:43:22 +0100 |
commit | d6040e32a610a792d1e5365a7643eb99fbb5a217 (patch) | |
tree | b5196885ae750852ad848edda714d48f4819e4b6 /src/db/sqlite_adapter.rs | |
parent | d7f90cabb0517a50a6c3dd702852770240566bfc (diff) | |
download | garage-d6040e32a610a792d1e5365a7643eb99fbb5a217.tar.gz garage-d6040e32a610a792d1e5365a7643eb99fbb5a217.zip |
cli: prettier table in garage stats
Diffstat (limited to 'src/db/sqlite_adapter.rs')
-rw-r--r-- | src/db/sqlite_adapter.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/db/sqlite_adapter.rs b/src/db/sqlite_adapter.rs index 886fda6e..63b4506e 100644 --- a/src/db/sqlite_adapter.rs +++ b/src/db/sqlite_adapter.rs @@ -144,6 +144,10 @@ impl IDb for SqliteDb { } } + fn fast_len(&self, tree: usize) -> Result<Option<usize>> { + Ok(Some(self.len(tree)?)) + } + fn insert(&self, tree: usize, key: &[u8], value: &[u8]) -> Result<Option<Value>> { trace!("insert {}: lock db", tree); let this = self.0.lock().unwrap(); |