kyotocabinet

Fast Persistent Embedded KeyValue Storage. Wrapper for KyotoCabinet

kyotocabinet

Fast Persistent Embedded KeyValue Storage. Wrapper for KyotoCabinet

Installation

Add this to your application's shard.yml:

dependencies:
  kyotocabinet:
    github: kostya/kyotocabinet

Usage

require "kyotocabinet"

db = KyotoCabinet::DB.new("./1.kch")

db.set("key", "value")
db["key2"] = "value2"

p db.get("key") # => "value"
p db["key2"] # => "value2"

db.del("key")

db.each do |key, value|
  p "#{key} = #{value}"
end

db.close

Compare with LevelDB

test LevelDB KyotoCabinet
1mln set 3.66s 1.00s
1mln get 1.95s 0.63s
iterate over all records 0.27s 0.31s
db size 16Mb 45Mb
Repository

kyotocabinet

Owner
Statistic
  • 5
  • 1
  • 0
  • 0
  • 0
  • almost 3 years ago
  • November 9, 2017
License

MIT License

Links
Synced at

Thu, 07 Nov 2024 05:59:42 GMT

Languages