Sha256: fd308940282e9bbdf92ccf6ca5f603e9e6a50ea9633518288086febb106bd603

Contents?: true

Size: 465 Bytes

Versions: 7

Compression:

Stored size: 465 Bytes

Contents

require 'arel/visitors/compat'

module Arel
  module Visitors
    class Firebird < Arel::Visitors::ToSql
      def visit_Arel_Nodes_SelectStatement o
        [
         o.cores.map { |x| visit_Arel_Nodes_SelectCore x }.join,
         ("ORDER BY #{o.orders.map { |x| visit x }.join(', ')}" unless o.orders.empty?),
         ("ROWS #{limit_for(o.limit)} " if o.limit),
         ("TO #{o.offset} " if o.offset),
        ].compact.join ' '
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
c3-activerecord-jdbc-adapter-1.1.3.1 lib/arel/visitors/firebird.rb
activerecord-jdbc-adapter-1.2.0 lib/arel/visitors/firebird.rb
c3-activerecord-jdbc-adapter-1.1.3 lib/arel/visitors/firebird.rb
jashmenn-activerecord-jdbc-adapter-1.2.0.0 lib/arel/visitors/firebird.rb
jashmenn-activerecord-jdbc-adapter-1.2.0 lib/arel/visitors/firebird.rb
activerecord-jdbc-adapter-1.1.3 lib/arel/visitors/firebird.rb
activerecord-jdbc-adapter-1.1.2 lib/arel/visitors/firebird.rb