Skip to content
This repository

Ruby bindings for LevelDB

tree: efd37b47b3

Fetching latest commit…

Cannot retrieve the latest commit at this time

README
LevelDB Ruby bindings.

Do this:

  gem install leveldb-ruby


And then run this:

  require 'rubygems' # on ruby < 1.9
  require 'leveldb'

  db = LevelDB::DB.new "/tmp/asdf"
  db.put "it", "works"
  db.get "it"

Only a very few operations are supported right now:

  DB.new    # creates or loads as necessary
  DB.create # dies if it already exists
  DB.load   # dies unless it alread exists

  DB#get    # alias: DB#[]
  DB#put    # alias: DB#[]=
  DB#delete

  DB#each
  ... and all the enumerable methods
Something went wrong with that request. Please try again.