Sha256: ae5c0f5466e16b5b36de453b8d702f20c18f1315288580155774f67495f21d99
Contents?: true
Size: 557 Bytes
Versions: 23
Compression:
Stored size: 557 Bytes
Contents
# frozen_string_literal: true require "arel/collectors/plain_string" module Arel # :nodoc: all module Collectors class SQLString < PlainString attr_accessor :preparable, :retryable def initialize(*) super @bind_index = 1 end def add_bind(bind) self << yield(@bind_index) @bind_index += 1 self end def add_binds(binds, proc_for_binds = nil, &block) self << (@bind_index...@bind_index += binds.size).map(&block).join(", ") self end end end end
Version data entries
23 entries across 23 versions & 2 rubygems