Adds a warning to the stores len function

pull/46/head
Tpt 4 years ago
parent 2a88927f3f
commit f3c8432a19
  1. 2
      lib/src/store/memory.rs
  2. 2
      lib/src/store/rocksdb.rs
  3. 2
      lib/src/store/sled.rs

@ -195,6 +195,8 @@ impl MemoryStore {
}
/// Returns the number of quads in the store
///
/// Warning: this function executes a full scan
pub fn len(&self) -> usize {
self.indexes()
.spog

@ -150,6 +150,8 @@ impl RocksDbStore {
}
/// Returns the number of quads in the store
///
/// Warning: this function executes a full scan
pub fn len(&self) -> usize {
self.db
.full_iterator_cf(self.spog_cf(), IteratorMode::Start)

@ -151,6 +151,8 @@ impl SledStore {
}
/// Returns the number of quads in the store
///
/// Warning: this function executes a full scan
pub fn len(&self) -> usize {
self.quads.len() / 6
}

Loading…
Cancel
Save