Class | Sequel::Dataset::PlaceholderLiteralizer::Argument |
In: |
lib/sequel/dataset/placeholder_literalizer.rb
|
Parent: | Object |
A placeholder argument used by the PlaceholderLiteralizer. This records the offset that the argument should be used in the resulting SQL.
Set the recorder, the argument position, and any transforming block to use for this placeholder.
# File lib/sequel/dataset/placeholder_literalizer.rb, line 48 48: def initialize(recorder, pos, transformer=nil) 49: @recorder = recorder 50: @pos = pos 51: @transformer = transformer 52: end
Record the SQL query offset, argument position, and transforming block where the argument should be literalized.
# File lib/sequel/dataset/placeholder_literalizer.rb, line 56 56: def sql_literal_append(ds, sql) 57: if ds.opts[:placeholder_literal_null] 58: ds.send(:literal_append, sql, nil) 59: else 60: @recorder.use(sql, @pos, @transformer) 61: end 62: end