Project

unqlite

0.01
No release in over 3 years
Low commit activity in last 3 years
UnQLite lib for ruby, using C extension.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 5.0.3
~> 10.0.4
~> 4.9.2
 Project Readme

UnQLite for Ruby

UnQLite interface for ruby programs.

Note: This is an alpha version and many features are missing! But, I would love to merge some pull-requests to make it better (:

Installation

You have to install UnQLite into your system and compile it as a shared library. Unfortunately, UnQLite doesn't have a Makefile (or something like that) to automate that step. If you are on linux, you can check this gist and compile it using gcc.

After installing UnQLite, add this line to your application's Gemfile:

gem 'unqlite'

And then execute:

$ bundle

Or install it yourself as:

$ gem install unqlite

Usage

For in-memory databases

db = UnQLite::Database.new(":mem:")
db.store("key", "wabba")
db.fetch("key") # => "wabba"
db.close

For regular databases

db = UnQLite::Database.new("database.db") # You may also give a full path
db.store("key", "wabba")
db.fetch("key") # => "wabba"

# Now you have to commit your changes or close your database
db.commit

db.store("key2", "wabba2")
db.close # Will automatically commit

Contributing

  1. Fork it
  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 new Pull Request