Sha256: 2ed1e1e28e6e71ed180e9f34ea2517f8ec31a520dfd18e472fc6d62377c59713

Contents?: true

Size: 538 Bytes

Versions: 43

Compression:

Stored size: 538 Bytes

Contents

module Bmg
  module Sql
    class Processor
      class Bind < Processor

        def initialize(binding, builder)
          super(builder)
          @binding = binding
        end

        def on_select_exp(sexpr)
          if w = sexpr.where_clause
            pred = Predicate::Grammar.sexpr(w.predicate.bind(@binding))
            sexpr.with_update(:where_clause, [ :where_clause, pred ])
          else
            sexpr
          end
        end

      end # class Bind
    end # class Processor
  end # module Sql
end # module Bmg

Version data entries

43 entries across 43 versions & 1 rubygems

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