Project

ruboty-sql

0.0
No commit activity in last 3 years
No release in over 3 years
Sql handler for Ruboty
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
>= 0
~> 10.0

Runtime

 Project Readme

Ruboty::Sql

Sql handler for Ruboty.

Installation

Add this line to your application's Gemfile:

gem 'ruboty-sql'
gem 'sqlite3' # Your database library

And then execute:

$ bundle

Usage

> ruboty sql select * from incenses;
+----------------------------+----+--------+----------------------------+---------+
| created_at                 | id | source | updated_at                 | user_id |
+----------------------------+----+--------+----------------------------+---------+
| 2015-03-02 20:48:36.990325 | 1  |        | 2015-03-02 20:48:36.990325 | 1       |
| 2015-03-03 18:49:27.894872 | 2  |        | 2015-03-03 18:49:27.894872 | 2       |
| 2015-03-07 16:19:12.756657 | 3  |        | 2015-03-07 16:19:12.756657 | 1       |
| 2015-03-10 11:11:38.409086 | 4  | api    | 2015-03-10 11:11:38.409086 | 1       |
+----------------------------+----+--------+----------------------------+---------+
4 rows in set

ENV

like rails's database.yml.

add prefix RUBOTY_SQL_

adapter => RUBOTY_SQL_ADAPTER

username => RUBOTY_SQL_USERNAME

security (strongly recommended)

Create readonly user.

example for sqlite3

RUBOTY_SQL_ADAPTER=sqlite3
RUBOTY_SQL_DATABASE=/path/to/sqlite3.db

Contributing

  1. Fork it ( https://github.com/yoshiori/ruboty-sql/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