module Sequel::DB2::DatasetMethods

  1. lib/sequel/adapters/shared/db2.rb

Constants

BITWISE_METHOD_MAP = {:& =>:BITAND, :| => :BITOR, :^ => :BITXOR, :'B~'=>:BITNOT}.freeze  

Public Instance methods

cast_sql_append(sql, expr, type)

DB2 casts strings using RTRIM and CHAR instead of VARCHAR.

[show source]
    # File lib/sequel/adapters/shared/db2.rb
294 def cast_sql_append(sql, expr, type)
295   if(type == String)
296     sql << "RTRIM(CHAR("
297     literal_append(sql, expr)
298     sql << "))"
299   else
300     super
301   end
302 end
complex_expression_sql_append(sql, op, args)
[show source]
    # File lib/sequel/adapters/shared/db2.rb
304 def complex_expression_sql_append(sql, op, args)
305   case op
306   when :&, :|, :^, :%, :<<, :>>
307     complex_expression_emulate_append(sql, op, args)
308   when :'B~'
309     literal_append(sql, SQL::Function.new(:BITNOT, *args))
310   when :extract
311     sql << args[0].to_s
312     sql << '('
313     literal_append(sql, args[1])
314     sql << ')'
315   else
316     super
317   end
318 end
quote_identifiers?()
[show source]
    # File lib/sequel/adapters/shared/db2.rb
320 def quote_identifiers?
321   @opts.fetch(:quote_identifiers, false)
322 end
supports_cte?(type=:select)
[show source]
    # File lib/sequel/adapters/shared/db2.rb
324 def supports_cte?(type=:select)
325   type == :select
326 end
supports_group_cube?()

DB2 supports GROUP BY CUBE

[show source]
    # File lib/sequel/adapters/shared/db2.rb
329 def supports_group_cube?
330   true
331 end
supports_group_rollup?()

DB2 supports GROUP BY ROLLUP

[show source]
    # File lib/sequel/adapters/shared/db2.rb
334 def supports_group_rollup?
335   true
336 end
supports_grouping_sets?()

DB2 supports GROUPING SETS

[show source]
    # File lib/sequel/adapters/shared/db2.rb
339 def supports_grouping_sets?
340   true
341 end
supports_is_true?()

DB2 does not support IS TRUE.

[show source]
    # File lib/sequel/adapters/shared/db2.rb
344 def supports_is_true?
345   false
346 end
supports_lateral_subqueries?()

DB2 supports lateral subqueries

[show source]
    # File lib/sequel/adapters/shared/db2.rb
349 def supports_lateral_subqueries?
350   true
351 end
supports_merge?()

DB2 supports MERGE

[show source]
    # File lib/sequel/adapters/shared/db2.rb
354 def supports_merge?
355   true
356 end
supports_multiple_column_in?()

DB2 does not support multiple columns in IN.

[show source]
    # File lib/sequel/adapters/shared/db2.rb
359 def supports_multiple_column_in?
360   false
361 end
supports_select_all_and_column?()

DB2 only allows * in SELECT if it is the only thing being selected.

[show source]
    # File lib/sequel/adapters/shared/db2.rb
364 def supports_select_all_and_column?
365   false
366 end
supports_where_true?()

DB2 does not support WHERE 1.

[show source]
    # File lib/sequel/adapters/shared/db2.rb
374 def supports_where_true?
375   false
376 end
supports_window_functions?()

DB2 supports window functions

[show source]
    # File lib/sequel/adapters/shared/db2.rb
369 def supports_window_functions?
370   true
371 end