mardi 19 mai 2015

pass sqlite options through sqlite3 ruby gem

class Database
  include Cinch::Plugin

  match /select .* from gears where .* like .*/i

  def execute(m)
    db = SQLite3::Database.new( "development.sqlite3")
    m.reply db.execute("#{m.message}")
end
end

I would like to pass a option when I start the development.sqlite3. Since I am using the sqlite 3 gem to open my database I am not sure how to pass a parameter or init file to it or if it is even possible. Any help would be appreciated.

Aucun commentaire:

Enregistrer un commentaire