A SQL database driver for Sandthorn, made with Sequel.
Add this line to your application's Gemfile:
gem 'sandthorn_driver_sequel'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sandthorn_driver_sequel
Change the global configuration, the default data serialization for events are YAML.
Change the serialization of events to Oj.
SandthornDriverSequel.configure { |conf|
conf.event_serializer = Proc.new { |data| Oj::dump(data) }
conf.event_deserializer = Proc.new { |data| Oj::load(data) }
}
Creates a driver from a Sequel connection. Its possible to send in a block like the one for configure
to chage configuration for the driver.
driver = SandthornDriverSequel.driver_from_connection(connection: Sequel.sqlite)
Creates a driver from a Sequel url. Its possible to send in a block like the one for configure
to change configuration for the driver.
driver = SandthornDriverSequel.driver_from_connection(url: "<sequel url string>")
Migrate the database based on a url string
SandthornDriverSequel.migrate_url(url: "<sequel url string>")
Migrate the database based on a connection
SandthornDriverSequel.migrate_connection(connection: "<sequel connection>")
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request