Class Sequel::JDBC::AS400::Dataset
In: lib/sequel/adapters/jdbc/as400.rb
Parent: JDBC::Dataset

Dataset class for AS400 datasets accessed via JDBC.

Methods

Included Modules

EmulateOffsetWithRowNumber

Constants

WILDCARD = Sequel::LiteralString.new('*').freeze
FETCH_FIRST_ROW_ONLY = " FETCH FIRST ROW ONLY".freeze
FETCH_FIRST = " FETCH FIRST ".freeze
ROWS_ONLY = " ROWS ONLY".freeze

Public Instance methods

Modify the sql to limit the number of rows returned

[Source]

    # File lib/sequel/adapters/jdbc/as400.rb, line 51
51:         def select_limit_sql(sql)
52:           if l = @opts[:limit]
53:             if l == 1
54:               sql << FETCH_FIRST_ROW_ONLY
55:             elsif l > 1
56:               sql << FETCH_FIRST
57:               literal_append(sql, l)
58:               sql << ROWS_ONLY
59:             end
60:           end
61:         end

[Source]

    # File lib/sequel/adapters/jdbc/as400.rb, line 63
63:         def supports_window_functions?
64:           true
65:         end

[Validate]