HSQLDB does support common table expressions, but the support is broken. CTEs operate more like temprorary tables or views, lasting longer than the duration of the expression. CTEs in earlier queries might take precedence over CTEs with the same name in later queries. Also, if any CTE is recursive, all CTEs must be recursive. If you want to use CTEs with HSQLDB, you'll have to manually modify the dataset to allow it.
Handle HSQLDB specific case insensitive LIKE and bitwise operator support.
# File lib/sequel/adapters/jdbc/hsqldb.rb, line 126 def complex_expression_sql_append(sql, op, args) case op when :ILIKE, :"NOT ILIKE" super(sql, (op == :ILIKE ? :LIKE : :"NOT LIKE"), args.map{|v| SQL::Function.new(:ucase, v)}) when :&, :|, :^ op = BITWISE_METHOD_MAP[op] sql << complex_expression_arg_pairs(args){|a, b| literal(SQL::Function.new(op, a, b))} when :<< sql << complex_expression_arg_pairs(args){|a, b| "(#{literal(a)} * POWER(2, #{literal(b)}))"} when :>> sql << complex_expression_arg_pairs(args){|a, b| "(#{literal(a)} / POWER(2, #{literal(b)}))"} when :% sql << complex_expression_arg_pairs(args){|a, b| "MOD(#{literal(a)}, #{literal(b)})"} when :'B~' sql << BITCOMP_OPEN literal_append(sql, args.at(0)) sql << BITCOMP_CLOSE else super end end
HSQLDB requires recursive CTEs to have column aliases.
# File lib/sequel/adapters/jdbc/hsqldb.rb, line 149 def recursive_cte_requires_column_aliases? true end
HSQLDB does not support IS TRUE.
# File lib/sequel/adapters/jdbc/hsqldb.rb, line 159 def supports_is_true? false end
Generated with the Darkfish Rdoc Generator 2.