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 requires_sql_standard_datetimes? supports_is_true? supports_join_using? supports_multiple_column_in?

### Constants

SELECT_CLAUSE_METHODS | = | clause_methods(:select, %w'distinct columns from join where group having compounds order limit')
BITWISE_METHOD_MAP | = | {:& =>:BITAND, :| => :BITOR, :^ => :BITXOR}

### Public Instance methods

complex_expression_sql(op, args)

Work around H2‘s lack of a case insensitive LIKE operator

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 113
    113:         def complex_expression_sql(op, args)
    114:           case op
    115:           when :ILIKE
    116:             super(:LIKE, [SQL::PlaceholderLiteralString.new("CAST(? AS VARCHAR_IGNORECASE)", [args.at(0)]), args.at(1)])
    117:           when "NOT ILIKE""NOT ILIKE"
    118:             super("NOT LIKE""NOT LIKE", [SQL::PlaceholderLiteralString.new("CAST(? AS VARCHAR_IGNORECASE)", [args.at(0)]), args.at(1)])
    119:           when :&, :|, :^
    120:             literal(SQL::Function.new(BITWISE_METHOD_MAP[op], *args))
    121:           when :<<
    122:             "(#{literal(args[0])} * POWER(2, #{literal(args[1])}))"
    123:           when :>>
    124:             "(#{literal(args[0])} / POWER(2, #{literal(args[1])}))"
    125:           else
    126:             super(op, args)
    127:           end
    128:         end

requires_sql_standard_datetimes?()

H2 requires SQL standard datetimes

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 131
    131:         def requires_sql_standard_datetimes?
    132:           true
    133:         end

supports_is_true?()

H2 doesn‘t support IS TRUE

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 136
    136:         def supports_is_true?
    137:           false
    138:         end

supports_join_using?()

H2 doesn‘t support JOIN USING

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 141
    141:         def supports_join_using?
    142:           false
    143:         end

supports_multiple_column_in?()

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

[Source]

         # File lib/sequel/adapters/jdbc/h2.rb, line 146
    146:         def supports_multiple_column_in?
    147:           false
    148:         end

[Validate]