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.18.13 lib/bmg/sql/processor/bind.rb
bmg-0.18.12 lib/bmg/sql/processor/bind.rb
bmg-0.18.11 lib/bmg/sql/processor/bind.rb
bmg-0.18.10 lib/bmg/sql/processor/bind.rb
bmg-0.18.9 lib/bmg/sql/processor/bind.rb
bmg-0.18.8 lib/bmg/sql/processor/bind.rb
bmg-0.18.7 lib/bmg/sql/processor/bind.rb
bmg-0.18.6 lib/bmg/sql/processor/bind.rb
bmg-0.18.5 lib/bmg/sql/processor/bind.rb
bmg-0.18.4 lib/bmg/sql/processor/bind.rb
bmg-0.18.3 lib/bmg/sql/processor/bind.rb
bmg-0.18.2 lib/bmg/sql/processor/bind.rb
bmg-0.18.1 lib/bmg/sql/processor/bind.rb
bmg-0.18.0 lib/bmg/sql/processor/bind.rb
bmg-0.17.8 lib/bmg/sql/processor/bind.rb
bmg-0.17.7 lib/bmg/sql/processor/bind.rb
bmg-0.17.6 lib/bmg/sql/processor/bind.rb
bmg-0.17.5 lib/bmg/sql/processor/bind.rb
bmg-0.17.4 lib/bmg/sql/processor/bind.rb
bmg-0.17.3 lib/bmg/sql/processor/bind.rb