jameswritescode / rubyserv

Ruby IRC Services
MIT License
3 stars 1 forks source link

sqlite support #10

Open jameswritescode opened 9 years ago

jameswritescode commented 9 years ago

It would be great if RubyServ could have full support for a database.

Using sqlite would be way more portable then any other database type, so sqlite is what I want to go with, and eventually supporting other database drivers.

jameswritescode commented 9 years ago

https://github.com/sparklemotion/sqlite3-ruby

Seems like it's really straight forward to generate a db based off of https://github.com/sparklemotion/sqlite3-ruby#synopsis

I'm thinking it would be cool to have a helper available for plugins that'll be like a one time db setup e.g.

database_setup do |db|
  db.name = 'howell.db'
  db.execute <<-SQL
    create table lastfm (
      # ...
    );
  SQL
end