aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/lib/arel/collectors/sql_string.rb
blob: c293a89a74b5c22a597d2ae5edc2da8bf16e3ed3 (plain) (tree)
1
2
3
4
5
6
7
                             
 
                                      
 
                         
                   
                                 




                       
                        

                                  

            
 
                      

             


       
# frozen_string_literal: true

require "arel/collectors/plain_string"

module Arel # :nodoc: all
  module Collectors
    class SQLString < PlainString
      def initialize(*)
        super
        @bind_index = 1
      end

      def add_bind(bind)
        self << yield(@bind_index)
        @bind_index += 1
        self
      end

      def compile(bvs)
        value
      end
    end
  end
end