Sha256: 94eced09e18bc2faaf0b81041c46477c65ffa2c5d9f67cffccd4864725cbfe79
Contents?: true
Size: 577 Bytes
Versions: 2
Compression:
Stored size: 577 Bytes
Contents
module Arel module Visitors class RubyFB < Arel::Visitors::ToSql Arel::Visitors::VISITORS['rubyfb'] = Arel::Visitors::RubyFB 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubyfb-0.6.1 | lib/arel/visitors/rubyfb.rb |
rubyfb-0.6 | lib/arel/visitors/rubyfb.rb |