Methods
Public Instance
Constants
BITCOMP_CLOSE | = | ") - 1)".freeze | ||
BITCOMP_OPEN | = | "((0 - ".freeze | ||
BLOB_CLOSE | = | "' AS BLOB)".freeze | ||
BLOB_OPEN | = | "CAST(X'".freeze | ||
BOOL_FALSE | = | 'FALSE'.freeze | ||
BOOL_FALSE_OLD | = | '(1 = 0)'.freeze | ||
BOOL_TRUE | = | 'TRUE'.freeze | ||
BOOL_TRUE_OLD | = | '(1 = 1)'.freeze | ||
CAST_STRING_OPEN | = | "RTRIM(".freeze | ||
DEFAULT_FROM | = | " FROM sysibm.sysdummy1".freeze | ||
DERBY_CLOB_METHOD | = | TYPE_TRANSLATOR_INSTANCE.method(:derby_clob) | ||
EMULATED_FUNCTION_MAP | = | {:char_length=>'length'.freeze} | ||
FETCH_FIRST | = | " FETCH FIRST ".freeze | ||
HSTAR | = | "H*".freeze | ||
JAVA_SQL_CLOB | = | Java::JavaSQL::Clob | ||
OFFSET | = | Dataset::OFFSET | ||
PAREN_CLOSE | = | Dataset::PAREN_CLOSE | ||
PAREN_OPEN | = | Dataset::PAREN_OPEN | ||
ROWS | = | " ROWS".freeze | ||
ROWS_ONLY | = | " ROWS ONLY".freeze | ||
SELECT_CLAUSE_METHODS | = | clause_methods(:select, %w'select distinct columns from join where group having compounds order limit lock') | ||
TIME_FORMAT | = | "'%H:%M:%S'".freeze |
Public Instance methods
case_expression_sql_append
(sql, ce)
Derby doesn't support an expression between CASE and WHEN, so remove conditions.
[show source]
# File lib/sequel/adapters/jdbc/derby.rb, line 196 def case_expression_sql_append(sql, ce) super(sql, ce.with_merged_expression) end
cast_sql_append
(sql, expr, type)
If the type is String, trim the extra spaces since CHAR is used instead of varchar. This can cause problems if you are casting a char/varchar to a string and the ending whitespace is important.
[show source]
# File lib/sequel/adapters/jdbc/derby.rb, line 203 def cast_sql_append(sql, expr, type) if type == String sql << CAST_STRING_OPEN super sql << PAREN_CLOSE else super end end
complex_expression_sql_append
(sql, op, args)
[show source]
# File lib/sequel/adapters/jdbc/derby.rb, line 213 def complex_expression_sql_append(sql, op, args) case op when :% sql << complex_expression_arg_pairs(args){|a, b| "MOD(#{literal(a)}, #{literal(b)})"} when :&, :|, :^, :<<, :>> raise Error, "Derby doesn't support the #{op} operator" when :'B~' sql << BITCOMP_OPEN literal_append(sql, args.at(0)) sql << BITCOMP_CLOSE when :extract sql << args.at(0).to_s << PAREN_OPEN literal_append(sql, args.at(1)) sql << PAREN_CLOSE else super end end
supports_group_rollup?
()
Derby supports GROUP BY ROLLUP (but not CUBE)
[show source]
# File lib/sequel/adapters/jdbc/derby.rb, line 233 def supports_group_rollup? true end
supports_is_true?
()
Derby does not support IS TRUE.
[show source]
# File lib/sequel/adapters/jdbc/derby.rb, line 238 def supports_is_true? false end
supports_multiple_column_in?
()
Derby does not support IN/NOT IN with multiple columns
[show source]
# File lib/sequel/adapters/jdbc/derby.rb, line 243 def supports_multiple_column_in? false end