Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

C based ordered key-value ACID DB using skiplist datastructure.

Notifications You must be signed in to change notification settings

Coderphobia/skipdb

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Berkeley DB style database implemented with a skip list instead of a b-tree. It's small, portable and supports ACID transactions (with true durability).

The license is Revised BSD.

Example:

#include "SkipDB.h"

int main(void)
{
	Datum key;
	Datum value;
	int count;

	// open
	
	SkipDB *db = SkipDB_new();
	SkipDB_setPath_(db, "test.skipdb");
	SkipDB_open(db);
	
	// write
	
	SkipDB_beginTransaction(db);
	key = Datum_FromCString_("testKey");
	value = Datum_FromCString_("testValue");
	SkipDB_at_put_(db, key, value);
	SkipDB_commitTransaction(db);
	
	// read
	
	value = SkipDB_at_(db, key);
	
	// count
	
	count = SkipDB_count(db);

	// remove
	
	SkipDB_beginTransaction(db);
	SkipDB_removeAt_(db, key);
	SkipDB_commitTransaction(db);
	
	// there's also a cursor API
	// not shown in this example code

	// close
	
	SkipDB_close(db);
	
	return 0;
}

About

C based ordered key-value ACID DB using skiplist datastructure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 90.5%
  • Objective-C 6.8%
  • Roff 2.1%
  • Makefile 0.6%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.