Created
April 8, 2013 15:03
-
-
Save hryk/5337472 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'sequel' | |
DB = Sequel.connect('jdbc:sqlite:memory:') | |
DB.create_table :items do | |
primary_key :id | |
String :string_attribute | |
Boolean :boolean_attribute | |
end | |
DB[:items].insert(string_attribute: 'Foo', | |
boolean_attribute: false) | |
item = DB[:items].first | |
puts item[:boolean_attribute].class | |
puts item[:boolean_attribute].inspect | |
# => String | |
# => "f" | |
# | |
# with JRuby 1.7.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to this spec of sequel, sequel's jdbc adapter for sqlite3 does not support generic boolean type.