Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby bindings for LevelDB

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 ext
Octocat-spinner-32 leveldb
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README
Octocat-spinner-32 RELEASE-SCRIPT
Octocat-spinner-32 Rakefile
Octocat-spinner-32 setup.rb
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.