Giter Site home page Giter Site logo

leveldb-ruby's Introduction

LevelDB is a very fast, persistent, in-process key-value store.
Read more about it here: http://code.google.com/p/leveldb/.

This gem contains Ruby bindings so that you can use it from your
Ruby process.

INSTALLATION

  gem install leveldb-ruby

SYNOPSIS

  require 'rubygems' # on for ruby 1.8
  require 'leveldb'

  ## make a new database
  db = LevelDB::DB.new "/tmp/asdf"

  ## getting and setting
  db.put "it", "works"               # => "works"
  db.get "it"                        # => "works"

  db["hello"] = "there"              # => "there"
  db["hello"]                        # => "there"

  db["nonexistent"]                  # => nil

  ## testing
  db.includes? "hello"               # => true
  db.contains? "hello"               # => true

  ## keys and values
  db.keys                            # => "it", "hello"
  db.values                          # => "there", "works"

  ## iterating
  db.each { |k, v| ... }
  db.map { |k, v| ... }
  db.each                            # => LevelDB::Iterator

  ## ranges
  db.each(:from => "a", :to => "b")  # => LevelDB::Iterator
  db.each(:from => "a", :to => "b").
    map { |k, v| ... }
  # etc...

  ## deleting
  db.delete "hello"       # => "there"
  db.delete "hello"       # => nil

LICENSE

  Leveldb-ruby is available for your use under the terms of
  the New BSD License. See the LICENSE file for details.

CREDIT

  This gem brought to you by William Morgan <http://masanjin.net/>
  and the following honorable contributors:
  - Rick Olson
  - byplayer
  - Yukio Goto
  - Johannes Holzfuß
  - Steve Wilhelm
  - Gabriel Ebner
  and by users like you.

BUGS

  Please report bugs to https://github.com/wmorgan/leveldb-ruby/issues.


leveldb-ruby's People

Contributors

byplayer avatar gebner avatar linrock avatar rw avatar stevewilhelm avatar technoweenie avatar wmorgan avatar yukio-goto avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.