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

                 

                                      

                   
                                 




                       
                       

                                  

            



                     


       
# encoding: utf-8

require 'arel/collectors/plain_string'

module Arel
  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