kyotocabinet

Version, currently 0.2.01 version
  • 0.2.0latestJan 16, 2022

github.com/kostya/kyotocabinet

Fast Persistent Embedded KeyValue Storage. Wrapper for KyotoCabinet

6 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  kyotocabinet:
    github: kostya/kyotocabinet
    version: ~> 0.2.0

Then run:

shards install

shard.yml

Crystal
no constraint declared
License
MIT
Author
Konstantin Makarchev

Dependencies

This version declares no dependencies.

README

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 |