Sha256: 1c58d639f885c458ec6608ddb68d5ce7cec17f2c0c6783119b7553db539272ba

Contents?: true

Size: 846 Bytes

Versions: 66

Compression:

Stored size: 846 Bytes

Contents

module Bmg
  module Sql
    class Processor
      class FromSelf < Processor

        def on_with_exp(sexpr)
          q = builder.next_qualifier!
          name_intro = builder.name_intro(q, sexpr.select_exp)
          [ :with_exp,
            sexpr.with_spec.dup.push(name_intro),
            builder.select_all(sexpr.select_exp, q, q) ]
        end

        def on_nonjoin_exp(sexpr)
          q = builder.next_qualifier!
          [ :with_exp,
            [:with_spec,
              builder.name_intro(q, sexpr)],
            builder.select_all(sexpr, q, q) ]
        end
        alias :on_union      :on_nonjoin_exp
        alias :on_except     :on_nonjoin_exp
        alias :on_intersect  :on_nonjoin_exp
        alias :on_select_exp :on_nonjoin_exp

      end # class FromSelf
    end # class Processor
  end # module Sql
end # module Bmg

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
bmg-0.23.3 lib/bmg/sql/processor/from_self.rb
bmg-0.23.2 lib/bmg/sql/processor/from_self.rb
bmg-0.23.1 lib/bmg/sql/processor/from_self.rb
bmg-0.23.0 lib/bmg/sql/processor/from_self.rb
bmg-0.21.5 lib/bmg/sql/processor/from_self.rb
bmg-0.21.4 lib/bmg/sql/processor/from_self.rb
bmg-0.20.5 lib/bmg/sql/processor/from_self.rb
bmg-0.19.3 lib/bmg/sql/processor/from_self.rb
bmg-0.21.3 lib/bmg/sql/processor/from_self.rb
bmg-0.21.2 lib/bmg/sql/processor/from_self.rb
bmg-0.21.0 lib/bmg/sql/processor/from_self.rb
bmg-0.20.4 lib/bmg/sql/processor/from_self.rb
bmg-0.20.2 lib/bmg/sql/processor/from_self.rb
bmg-0.20.1 lib/bmg/sql/processor/from_self.rb
bmg-0.20.0 lib/bmg/sql/processor/from_self.rb
bmg-0.19.2 lib/bmg/sql/processor/from_self.rb
bmg-0.19.1 lib/bmg/sql/processor/from_self.rb
bmg-0.19.0 lib/bmg/sql/processor/from_self.rb
bmg-0.18.15 lib/bmg/sql/processor/from_self.rb
bmg-0.18.14 lib/bmg/sql/processor/from_self.rb