Parent

Class Index [+]

Quicksearch

Sequel::JDBC::HSQLDB::Dataset

Dataset class for HSQLDB datasets accessed via JDBC.

Constants

BITWISE_METHOD_MAP
BOOL_TRUE
BOOL_FALSE
SELECT_CLAUSE_METHODS

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
APOS
HSTAR
BLOB_OPEN
BITCOMP_OPEN
BITCOMP_CLOSE
DEFAULT_FROM
TIME_FORMAT

Public Instance Methods

complex_expression_sql_append(sql, op, args) click to toggle source

Handle HSQLDB specific case insensitive LIKE and bitwise operator support.

     # File lib/sequel/adapters/jdbc/hsqldb.rb, line 109
109:         def complex_expression_sql_append(sql, op, args)
110:           case op
111:           when :ILIKE, :"NOT ILIKE"
112:             super(sql, (op == :ILIKE ? :LIKE : :"NOT LIKE"), [SQL::Function.new(:ucase, args.at(0)), SQL::Function.new(:ucase, args.at(1)) ])
113:           when :&, :|, :^
114:             op = BITWISE_METHOD_MAP[op]
115:             sql << complex_expression_arg_pairs(args){|a, b| literal(SQL::Function.new(op, a, b))}
116:           when :<<
117:             sql << complex_expression_arg_pairs(args){|a, b| "(#{literal(a)} * POWER(2, #{literal(b)}))"}
118:           when :>>
119:             sql << complex_expression_arg_pairs(args){|a, b| "(#{literal(a)} / POWER(2, #{literal(b)}))"}
120:           when :%
121:             sql << complex_expression_arg_pairs(args){|a, b| "MOD(#{literal(a)}, #{literal(b)})"}
122:           when :'B~'
123:             sql << BITCOMP_OPEN
124:             literal_append(sql, args.at(0))
125:             sql << BITCOMP_CLOSE
126:           else
127:             super
128:           end
129:         end
recursive_cte_requires_column_aliases?() click to toggle source

HSQLDB requires recursive CTEs to have column aliases.

     # File lib/sequel/adapters/jdbc/hsqldb.rb, line 132
132:         def recursive_cte_requires_column_aliases?
133:           true
134:         end
supports_is_true?() click to toggle source

HSQLDB does not support IS TRUE.

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

Private Instance Methods

literal_blob_append(sql, v) click to toggle source

Use string in hex format for blob data.

     # File lib/sequel/adapters/jdbc/hsqldb.rb, line 144
144:         def literal_blob_append(sql, v)
145:           sql << BLOB_OPEN << v.unpack(HSTAR).first << APOS
146:         end
literal_false() click to toggle source

HSQLDB uses FALSE for false values.

     # File lib/sequel/adapters/jdbc/hsqldb.rb, line 149
149:         def literal_false
150:           BOOL_FALSE
151:         end
literal_sqltime(v) click to toggle source

HSQLDB handles fractional seconds in timestamps, but not in times

     # File lib/sequel/adapters/jdbc/hsqldb.rb, line 154
154:         def literal_sqltime(v)
155:           v.strftime(TIME_FORMAT)
156:         end
literal_true() click to toggle source

HSQLDB uses TRUE for true values.

     # File lib/sequel/adapters/jdbc/hsqldb.rb, line 159
159:         def literal_true
160:           BOOL_TRUE
161:         end
select_clause_methods() click to toggle source

HSQLDB does not support CTEs well enough for Sequel to enable support for them.

     # File lib/sequel/adapters/jdbc/hsqldb.rb, line 164
164:         def select_clause_methods
165:           SELECT_CLAUSE_METHODS
166:         end
select_from_sql(sql) click to toggle source

Use a default FROM table if the dataset does not contain a FROM table.

     # File lib/sequel/adapters/jdbc/hsqldb.rb, line 169
169:         def select_from_sql(sql)
170:           if @opts[:from]
171:             super
172:           else
173:             sql << DEFAULT_FROM
174:           end
175:         end
select_with_sql_base() click to toggle source

Use WITH RECURSIVE instead of WITH if any of the CTEs is recursive

     # File lib/sequel/adapters/jdbc/hsqldb.rb, line 178
178:         def select_with_sql_base
179:           opts[:with].any?{|w| w[:recursive]} ? SQL_WITH_RECURSIVE : super
180:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.