Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

EricSlick/unqlite-ruby

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Ruby bindings for the UnQLite embedded database

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C 65.5%
  • Ruby 34.5%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.