For strings, numeric arguments, and date/time arguments, add them as parameters to the query instead of literalizing them into the SQL.
# File lib/sequel/extensions/pg_auto_parameterize.rb, line 127 def literal_append(sql, v) if sql.is_a?(StringWithArray) case v when String case v when LiteralString super when Sequel::SQL::Blob sql.add_arg(v, :bytea) else sql.add_arg(v) end when Bignum sql.add_arg(v, :int8) when Fixnum sql.add_arg(v, :int4) when Float sql.add_arg(v, :"double precision") when BigDecimal sql.add_arg(v, :numeric) when Sequel::SQLTime sql.add_arg(v, :time) when Time, DateTime sql.add_arg(v, :timestamp) when Date sql.add_arg(v, :date) else super end else super end end
Disable automatic parameterization for prepared statements, since they will use manual parameterization.
# File lib/sequel/extensions/pg_auto_parameterize.rb, line 169 def to_prepared_statement(*a) opts[:no_auto_parameterize] ? super : no_auto_parameterize.to_prepared_statement(*a) end
Generated with the Darkfish Rdoc Generator 2.