github.com/kebasyaty/bushdb

A fast key-value storage library. The library uses fractal-tree addressing.

5 stars
0 dependents
License: MIT

Nothing has been indexed for 0.6.7 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  bushdb:
    github: kebasyaty/bushdb
    version: ~> 0.6.7

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.6.7. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

bushDB

bushDB is a fast key-value storage library that provides an ordered mapping from string keys to string values. The library uses fractal-tree addressing. The maximum size of the database is 16**32=340282366920938463463374607431768211456 branches, each branch can store one or more keys. The value of any key can be obtained in 32 steps, thereby achieving high performance. There is no need to iterate through all the keys in search of the desired value.

CI Docs Crystal GitHub license

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      bushdb:
        github: kebasyaty/bushdb
        version: ~> 0.6.10
  2. Run shards install

Usage

require "bushdb"

# Create DB
db : BushDB::DB = BushDB::DB.new

# Set, get, delete
db.set("key name", "Some text")
db.get("key name") # => "Some text"
db.has?("key name") # => true
#
db.delete("key name")
#
# If the key has been deleted.
db.get("key name") # => nil
db.has?("key name") # => false

# Delete the database directory with all the keys in it.
db.clear

# Delete the root directory with all databases in it.
db.napalm

License

This project is licensed under the MIT.

Changelog

View the change history.

Contributing

  1. Fork it (https://github.com/kebasyaty/bushdb/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • kebasyaty Gennady Kostyunin - creator and maintainer