Is it possible to read all values matching key pattern from rocks db. e.g:
key1 -> value1
key12 -> value12
key123 -> value123
I want to ready all keys matching pattern => "key1*" or "key*2"
Is there a way to perform this kind of search operation in Rocks Db.
key1* yes: You can use rocksdb::DB::iterator with RocksDB::IteratorMode::From("key1".as_bytes(), rocksdb::Direction::Forward), and then put a .take_while(|(k, _)| k.starts_with("key1".as_bytes())) to stop it from leaving key1*.key*2 noWhy is this tagged Rust?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With