All Projects → Kerollmops → Heed

Kerollmops / Heed

Licence: other
A fully typed LMDB/MDBX wrapper with minimum overhead

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Heed

lmdb-js
Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Stars: ✭ 270 (+90.14%)
Mutual labels:  lmdb, key-value-store
nim-lmdb
Nim LMDB wrapper
Stars: ✭ 31 (-78.17%)
Mutual labels:  wrapper, lmdb
Datalevin
A simple, fast and durable Datalog database
Stars: ✭ 360 (+153.52%)
Mutual labels:  key-value-store, lmdb
Ahk Libs
AutoHotkey library archive.
Stars: ✭ 125 (-11.97%)
Mutual labels:  wrapper
Foundationdb
FoundationDB - the open source, distributed, transactional key-value store
Stars: ✭ 10,937 (+7602.11%)
Mutual labels:  key-value-store
Mastodonkit
MastodonKit is a Swift Framework that wraps Mastodon's API
Stars: ✭ 134 (-5.63%)
Mutual labels:  wrapper
Olric
Distributed cache and in-memory key/value data store. It can be used both as an embedded Go library and as a language-independent service.
Stars: ✭ 2,067 (+1355.63%)
Mutual labels:  key-value-store
Olegdb
Enough works to use this in production
Stars: ✭ 122 (-14.08%)
Mutual labels:  key-value-store
Asana Api Php Class
A dependency free, lightweight PHP class that acts as wrapper for Asana API. Lets make things fast and easy! :)
Stars: ✭ 137 (-3.52%)
Mutual labels:  wrapper
Dukglue
A C++ binding/wrapper library for the Duktape JavaScript interpreter.
Stars: ✭ 132 (-7.04%)
Mutual labels:  wrapper
Ardb
A redis protocol compatible nosql, it support multiple storage engines as backend like Google's LevelDB, Facebook's RocksDB, OpenLDAP's LMDB, PerconaFT, WiredTiger, ForestDB.
Stars: ✭ 1,707 (+1102.11%)
Mutual labels:  lmdb
Rialto
Manage Node resources with PHP
Stars: ✭ 128 (-9.86%)
Mutual labels:  wrapper
Angular Diff Match Patch
An AngularJS wrapper for google-diff-match-patch
Stars: ✭ 135 (-4.93%)
Mutual labels:  wrapper
Terminal Canvas
Manipulate the cursor in your terminal via high-performant, low-level, canvas-like API
Stars: ✭ 125 (-11.97%)
Mutual labels:  wrapper
Pacaptr
Pacman-like syntax wrapper for many package managers.
Stars: ✭ 138 (-2.82%)
Mutual labels:  wrapper
Colore
A powerful C# library for Razer Chroma's SDK
Stars: ✭ 121 (-14.79%)
Mutual labels:  wrapper
Mailjet Apiv3 Nodejs
[API v3] Official Mailjet API v3 NodeJS wrapper
Stars: ✭ 137 (-3.52%)
Mutual labels:  wrapper
Rcloneexplorer
rclone GUI for Windows
Stars: ✭ 129 (-9.15%)
Mutual labels:  wrapper
Pokeapi Js Wrapper
PokeAPI browser wrapper, fully async with built-in cache
Stars: ✭ 129 (-9.15%)
Mutual labels:  wrapper
Libfaketime
libfaketime modifies the system time for a single application
Stars: ✭ 1,932 (+1260.56%)
Mutual labels:  wrapper

heed

A fully typed LMDB/MDBX wrapper with minimum overhead, uses bytemuck internally.

Build Status Dependency Status Heed Doc Crates.io

the opposite of heed

This library is able to serialize all kind of types, not just bytes slices, even Serde types are supported.

Using MDBX instead of LMDB

Heed can also be used with MDBX, this is a compatible backend, you can activate it by using the mdbx feature. When MDBX is used the generated databases cannot be read by using the lmdb feature, those two kv-stores are not compatible and vice-versa.

Notice that some specific features will only be accessible by using the mdbx cargo feature. Environment creation flags depends on the backend you chose.

To test that heed works with MDBX you can run this command:

cargo test --features 'mdbx serde-json' --no-default-features

Example Usage

fs::create_dir_all("target/heed.mdb")?;
let env = EnvOpenOptions::new().open("target/heed.mdb")?;

// We open the default unamed database.
// Specifying the type of the newly created database.
// Here we specify that the key is an str and the value a simple integer.
let db: Database<Str, OwnedType<i32>> = env.create_database(None)?;

// We then open a write transaction and start writing into the database.
// All of those puts are type checked at compile time,
// therefore you cannot write an integer instead of a string.
let mut wtxn = env.write_txn()?;
db.put(&mut wtxn, "seven", &7)?;
db.put(&mut wtxn, "zero", &0)?;
db.put(&mut wtxn, "five", &5)?;
db.put(&mut wtxn, "three", &3)?;
wtxn.commit()?;

// We open a read transaction to check if those values are available.
// When we read we also type check at compile time.
let rtxn = env.read_txn()?;

let ret = db.get(&rtxn, "zero")?;
assert_eq!(ret, Some(0));

let ret = db.get(&rtxn, "five")?;
assert_eq!(ret, Some(5));

You want to see more about all the possibilities? Go check out the examples.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].