Classes and Modules
Constants
DB2_TYPES | = | { :boolean => tt.method(:boolean), DB2CLI::SQL_BLOB => ::Sequel::SQL::Blob.method(:new), DB2CLI::SQL_TYPE_DATE => tt.method(:date), DB2CLI::SQL_TYPE_TIME => tt.method(:time), DB2CLI::SQL_DECIMAL => ::BigDecimal.method(:new) } |
Hash holding type translation methods, used by Sequel::DB2::Dataset#fetch_rows. |
Attributes
convert_smallint_to_bool | [RW] |
Whether to convert smallint values to bool, true by default. Can also be overridden per dataset. |
use_clob_as_blob | [RW] |
Whether to use clob as the generic File type, true by default. |
Public Instance methods
boolean
(s)
[show source]
# File lib/sequel/adapters/db2.rb, line 21 def boolean(s) !s.to_i.zero? end
date
(s)
[show source]
# File lib/sequel/adapters/db2.rb, line 22 def date(s) Date.new(s.year, s.month, s.day) end
time
(s)
[show source]
# File lib/sequel/adapters/db2.rb, line 23 def time(s) Sequel::SQLTime.create(s.hour, s.minute, s.second) end