QuickStore alternatives and similar gems
Based on the "ORM/ODM" category.
Alternatively, view QuickStore alternatives based on common mentions on social networks and blogs.
-
DataMapper
DISCONTINUED. ORM which works well with legacy databases. Last release (1.2.0) was on 13 October 2011.
SaaSHub - Software Alternatives and Reviews
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of QuickStore or a related project?
README
QuickStore
Simple local key-value store based on YAML::Store.
Installation
Add this line to your application's Gemfile:
gem 'quick_store'
And then execute:
$ bundle
Or install it yourself as:
$ gem install quick_store
Usage
require 'quick_store'
Configuration
QuickStore.configure do |config|
config.file_path = 'path/to/store/file.yml'
config.key_separator = '|' # default is '/'
end
Storing, fetching, and deleting data
You can store, receive, and remove data from the store by using different methods:
# Using dynamic setters and getters
QuickStore.store.arbitrary_key = 'value' # => "value"
QuickStore.store.arbitrary_key # => "value"
QuickStore.store.delete_arbitrary_key # => "value"
# Using the ::set, ::get, and ::delete methods
QuickStore.store.set(:arbitrary_key, 'value') # => "value"
QuickStore.store.get(:arbitrary_key) # => "value"
QuickStore.store.delete(:arbitrary_key) # => "value"
# Example for a nested key ('/' is the default key separator)
QuickStore.store.set('a/b/c', 'value') # => {"b"=>{"c"=>"value"}}
QuickStore.store.get('a/b/c') # => "value"
QuickStore.store.get('a/b') # => {"c"=>"value"}
QuickStore.store.get('a') # => {"b"=>{"c"=>"value"}}
# Removing data for a certain nested key
QuickStore.store.delete('a/b/c') # => {"b"=>{"c"=>nil}}
QuickStore.store.get('a') # => {"b"=>{"c"=>nil}}
# Removing data for all nested keys under a certain key
QuickStore.store.delete('a') # => {"b"=>{"c"=>nil}}
QuickStore.store.get('a') # => nil
Contributing
- Fork it ( https://github.com/[my-github-username]/quick_store/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
License
The quick_store gem is released under the MIT License.
*Note that all licence references and agreements mentioned in the QuickStore README section above
are relevant to that project's source code only.