Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ SYNOPSIS
require 'rubygems' # on for ruby 1.8
require 'leveldb'

## make a new database
## make a new database or open an existing one
## this creates a directory with the specified path containing multiple files
db = LevelDB::DB.new "/tmp/asdf"

## getting and setting
## leveldb keys and values must be strings
## arbitrary byte arrays can be stored by first encoding them as strings
db.put "it", "works" # => "works"
db.get "it" # => "works"

Expand Down Expand Up @@ -44,10 +47,12 @@ SYNOPSIS
map { |k, v| ... }
# etc...

## deleting
## deleting key/value pairs
db.delete "hello" # => "there"
db.delete "hello" # => nil

## to delete the database remove the directory and its contents

LICENSE

Leveldb-ruby is available for your use under the terms of
Expand Down