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 50 50: def initialize(recorder, pos, transformer=nil) 51: @recorder = recorder 52: @pos = pos 53: @transformer = transformer 54: 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 58 58: def sql_literal_append(ds, sql) 59: if ds.opts[:placeholder_literal_null] 60: ds.send(:literal_append, sql, nil) 61: else 62: @recorder.use(sql, @pos, @transformer) 63: end 64: end