Module: Sequel::DB2

Defined in:
lib/sequel/adapters/db2.rb,
lib/sequel/adapters/shared/db2.rb

Defined Under Namespace

Modules: DatabaseMethods, DatasetMethods Classes: DB2Error, Database, Dataset

Constant Summary collapse

DB2_TYPES =

Hash holding type translation methods, used by Dataset#fetch_rows.

{
  :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)
}

Class Attribute Summary collapse

Class Attribute Details

.convert_smallint_to_boolObject

Whether to convert smallint values to bool, true by default. Can also be overridden per dataset.



17
18
19
# File 'lib/sequel/adapters/db2.rb', line 17

def convert_smallint_to_bool
  @convert_smallint_to_bool
end

.use_clob_as_blobObject

Whether to use clob as the generic File type, true by default.



9
10
11
# File 'lib/sequel/adapters/shared/db2.rb', line 9

def use_clob_as_blob
  @use_clob_as_blob
end