Sha256: 47337386b28aa0119c5d32a5787a32fe50f286aea77a7b2b3cfeec43719b92e2

Contents?: true

Size: 512 Bytes

Versions: 4

Compression:

Stored size: 512 Bytes

Contents

module Arel
  module Visitors
    class RubyFB < Arel::Visitors::ToSql
    private
      def visit_Arel_Nodes_Limit o
      end

      def visit_Arel_Nodes_Offset o
      end
    
      def visit_Arel_Nodes_SelectStatement o
      	o.limit || o.offset ? "SELECT #{fb_limit(o.limit)} #{fb_offset(o.offset)} * FROM (#{super})" : super
      end

      def fb_limit limit
      	"first #{limit.expr}" if limit
      end

      def fb_offset offset
      	"skip #{offset.expr}" if offset
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubyfb-0.6.7 lib/arel/visitors/rubyfb.rb
rubyfb-0.6.4 lib/arel/visitors/rubyfb.rb
rubyfb-0.6.3 lib/arel/visitors/rubyfb.rb
rubyfb-0.6.2 lib/arel/visitors/rubyfb.rb