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(".freeze, " AS VARCHAR_IGNORECASE)".freeze].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 137
    137:         def complex_expression_sql_append(sql, op, args)
    138:           case op
    139:           when :ILIKE, "NOT ILIKE""NOT ILIKE"
    140:             super(sql, (op == :ILIKE ? :LIKE : "NOT LIKE""NOT LIKE"), [SQL::PlaceholderLiteralString.new(ILIKE_PLACEHOLDER, [args.at(0)]), args.at(1)])
    141:           when :&, :|, :^
    142:             sql << complex_expression_arg_pairs(args){|a, b| literal(SQL::Function.new(BITWISE_METHOD_MAP[op], a, b))}
    143:           when :<<
    144:             sql << complex_expression_arg_pairs(args){|a, b| "(#{literal(a)} * POWER(2, #{literal(b)}))"}
    145:           when :>>
    146:             sql << complex_expression_arg_pairs(args){|a, b| "(#{literal(a)} / POWER(2, #{literal(b)}))"}
    147:           when 'B~''B~'
    148:             sql << BITCOMP_OPEN
    149:             literal_append(sql, args.at(0))
    150:             sql << BITCOMP_CLOSE
    151:           else
    152:             super
    153:           end
    154:         end

requires_sql_standard_datetimes?()

H2 requires SQL standard datetimes

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 157
    157:         def requires_sql_standard_datetimes?
    158:           true
    159:         end

supports_is_true?()

H2 doesn‘t support IS TRUE

[Source]

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

supports_join_using?()

H2 doesn‘t support JOIN USING

[Source]

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

supports_multiple_column_in?()

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

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 172
    172:         def supports_multiple_column_in?
    173:           false
    174:         end

[Validate]