Skip to content

Instantly share code, notes, and snippets.

@lopex
Created December 1, 2014 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lopex/71faf902c25e27f443e7 to your computer and use it in GitHub Desktop.
Save lopex/71faf902c25e27f443e7 to your computer and use it in GitHub Desktop.
gem 'jdbc-sqlite3', '=3.8.7'
gem 'sequel', '=4.17.0'
require 'sequel'
require 'logger'
DB = Sequel.connect('jdbc:sqlite:test.db', :loggers => [Logger.new($stdout)], :convert_types => false)
DB.create_table? :test_table do
primary_key :id
Date :the_date
end
DB[:test_table].insert(the_date: Sequel.string_to_date("2014-12-10"))
DB[:test_table].all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment