Methods
Public Instance
Constants
APOS | = | Dataset::APOS | ||
BITCOMP_CLOSE | = | ") - 1)".freeze | ||
BITCOMP_OPEN | = | "((0 - ".freeze | ||
BITWISE_METHOD_MAP | = | {:& =>:BITAND, :| => :BITOR, :^ => :BITXOR} | ||
BLOB_OPEN | = | "X'".freeze | ||
BOOL_FALSE | = | 'FALSE'.freeze | ||
BOOL_TRUE | = | 'TRUE'.freeze | ||
DEFAULT_FROM | = | " FROM (VALUES (0))".freeze | ||
HSTAR | = | "H*".freeze | ||
SELECT_CLAUSE_METHODS | = | clause_methods(:select, %w'select distinct columns from join where group having compounds order limit lock') |
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. |
|
SQL_WITH_RECURSIVE | = | "WITH RECURSIVE ".freeze | ||
TIME_FORMAT | = | "'%H:%M:%S'".freeze |
Public Instance methods
Handle HSQLDB specific case insensitive LIKE and bitwise operator support.
# File lib/sequel/adapters/jdbc/hsqldb.rb, line 133 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 156 def recursive_cte_requires_column_aliases? true end
HSQLDB requires SQL standard datetimes in some places.
# File lib/sequel/adapters/jdbc/hsqldb.rb, line 161 def requires_sql_standard_datetimes? true end
HSQLDB does not support IS TRUE.
# File lib/sequel/adapters/jdbc/hsqldb.rb, line 166 def supports_is_true? false end
HSQLDB supports lateral subqueries.
# File lib/sequel/adapters/jdbc/hsqldb.rb, line 171 def supports_lateral_subqueries? true end