MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / range_scan_with_index

Function range_scan_with_index

nodedb/src/engine/sparse/btree.rs:482–492  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

480
481 #[test]
482 fn range_scan_with_index() {
483 let (engine, _dir) = open_temp();
484 engine.index_put(1, "users", "age", "025", "u1").unwrap();
485 engine.index_put(1, "users", "age", "030", "u2").unwrap();
486 engine.index_put(1, "users", "age", "035", "u3").unwrap();
487 engine.index_put(1, "users", "age", "040", "u4").unwrap();
488 let results = engine
489 .range_scan(1, "users", "age", Some(b"025"), Some(b"036"), 10)
490 .unwrap();
491 assert_eq!(results.len(), 3);
492 }
493
494 #[test]
495 fn collections_are_isolated() {

Callers

nothing calls this directly

Calls 3

index_putMethod · 0.80
range_scanMethod · 0.80
open_tempFunction · 0.70

Tested by

no test coverage detected