Class | Sequel::JDBC::H2::Dataset
In: | lib/sequel/adapters/jdbc/h2.rb
Parent: | JDBC::Dataset

Dataset class for H2 datasets accessed via JDBC.

### Methods

complex_expression_sql_append requires_sql_standard_datetimes? supports_is_true? supports_join_using? supports_multiple_column_in?

### Constants

SELECT_CLAUSE_METHODS | = | clause_methods(:select, %w'select distinct columns from join where group having compounds order limit')
BITWISE_METHOD_MAP | = | {:& =>:BITAND, :| => :BITOR, :^ => :BITXOR}
APOS | = | Dataset::APOS
HSTAR | = | "H*".freeze
BITCOMP_OPEN | = | "((0 - ".freeze
BITCOMP_CLOSE | = | ") - 1)".freeze
ILIKE_PLACEHOLDER | = | "CAST(? AS VARCHAR_IGNORECASE)".freeze
TIME_FORMAT | = | "'%H:%M:%S'".freeze
H2_CLOB_METHOD | = | TYPE_TRANSLATOR_INSTANCE.method(:h2_clob)

### Public Instance methods

complex_expression_sql_append(sql, op, args)

Emulate the case insensitive LIKE operator and the bitwise operators.

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 131
    131:         def complex_expression_sql_append(sql, op, args)
    132:           case op
    133:           when :ILIKE, "NOT ILIKE""NOT ILIKE"
    134:             super(sql, (op == :ILIKE ? :LIKE : "NOT LIKE""NOT LIKE"), [SQL::PlaceholderLiteralString.new(ILIKE_PLACEHOLDER, [args.at(0)]), args.at(1)])
    135:           when :&, :|, :^
    136:             sql << complex_expression_arg_pairs(args){|a, b| literal(SQL::Function.new(BITWISE_METHOD_MAP[op], a, b))}
    137:           when :<<
    138:             sql << complex_expression_arg_pairs(args){|a, b| "(#{literal(a)} * POWER(2, #{literal(b)}))"}
    139:           when :>>
    140:             sql << complex_expression_arg_pairs(args){|a, b| "(#{literal(a)} / POWER(2, #{literal(b)}))"}
    141:           when 'B~''B~'
    142:             sql << BITCOMP_OPEN
    143:             literal_append(sql, args.at(0))
    144:             sql << BITCOMP_CLOSE
    145:           else
    146:             super
    147:           end
    148:         end

requires_sql_standard_datetimes?()

H2 requires SQL standard datetimes

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 151
    151:         def requires_sql_standard_datetimes?
    152:           true
    153:         end

supports_is_true?()

H2 doesn‘t support IS TRUE

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 156
    156:         def supports_is_true?
    157:           false
    158:         end

supports_join_using?()

H2 doesn‘t support JOIN USING

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 161
    161:         def supports_join_using?
    162:           false
    163:         end

supports_multiple_column_in?()

H2 doesn‘t support multiple columns in IN/NOT IN

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 166
    166:         def supports_multiple_column_in?
    167:           false
    168:         end

[Validate]