Skip to content
/ sqlay Public

really simple sqlite3 bindings for educational purposes only

License

Notifications You must be signed in to change notification settings

zizkovrb/sqlay

Repository files navigation

Sqlay Build Status

Really simple sqlite3 bindings for ruby. Just for my education purposes.

Installation

Add this line to your application's Gemfile:

gem 'sqlay', github: 'simi/sqlay'

And then execute:

$ bundle

Usage

query = Sqlay.execute("test.db", "SELECT date('now') AS date;")
query[0]["date"] #=> '27/06/2013'

query = Sqlay.execute("test.db", "SELECT 15 AS number;")
query[0]["number"] #=> 15

query = Sqlay.execute(":memory:", "SELECT 3.1415 AS float;")
query[0]["float"] #=> 3.1415

query = Sqlay.execute(":memory:", "SELECT null AS nil;")
query[0]["nil"] #=> nil

DONE

  • basic data types works now (integer, float, string and null)
  • basic error reporting (Sqlay::Error with error message)

TODO

  • return valid BLOB

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

really simple sqlite3 bindings for educational purposes only

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published