Expand description
NoSQL embedded database on top of RocksDB.
§Usage
use simpledb::Database;
// open a database
let db = Database::open("./target/path/to/database").unwrap();
// left push a value to a list
db.list_left_push("key", "value".as_bytes()).unwrap();§Supported Data Type
- map: store field/value pairs, includes the following operations with
map_prefix:get,put,delete,count,for_each,items. - set: store unique values, includes the following operations with
set_prefix:add,is_member,delete,count,for_each,items. - list: store ordered values, includes the following operations with
list_prefix:left_push,left_pop,right_push,right_pop,count,for_each,items. - sorted list: store sorted score/value pairs, includes the following operations with
sorted_list_prefix:add,left_pop,right_pop,count,for_each,items. - sorted set: store sorted score/value pairs, includes the following operations with
sorted_set_prefix:add,is_member,delete,left,right,for_each,items. - Notes: the difference between
sorted listandsorted setislistallow the same members,setdoes not allow the same members.
Re-exports§
pub use codec::BytesComparableScore;pub use codec::KeyMeta;pub use codec::KeyType;