Skip to content

NifflerDB is a simple, embeddable and persistent key-value store implemented as a B+ tree

Notifications You must be signed in to change notification settings

joakimthun/nifflerdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NifflerDB

NifflerDB is a simple, embeddable and persistent key-value store implemented as a B+ tree.

Hello World

#include "niffler/db.h"

int main(int argc, char* argv[])
{
    // true will truncate the file if it exists
    auto niffler = std::make_unique<niffler::db>("hello_world.ndb", true);
    niffler->insert("Hello World!", "Hello World!");
    
    return 0;
}

Public API(thread safe)

std::unique_ptr<find_result> find(const key& key) const;
bool exists(const key& key) const;
bool insert(const key& key, const void *data, u32 data_size);
bool remove(const key& key);

TODO

  • Better error handling
  • Support for multiple "buckets"
  • Unused pages clean-up
  • Memory-mapped I/O?
  • Transactions?

OS Support

Only runs on Windows(at least right now) and has only been tested with the Visual C++ Compiler.

About

NifflerDB is a simple, embeddable and persistent key-value store implemented as a B+ tree

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages