module Sequel::Postgres::AutoParameterizeInArray::TreatStringListAsUntypedArray

Constants

NO_EXPLICIT_CAST

Sentinal value to use as an auto param type to use auto parameterization of a string array without an explicit type cast.

Private Instance Methods

_bound_variable_type_for_string_array(r) click to toggle source

Use a query parameter with no type cast for string arrays.

   # File lib/sequel/extensions/pg_auto_parameterize_in_array.rb
78 def _bound_variable_type_for_string_array(r)
79   NO_EXPLICIT_CAST
80 end
_convert_array_to_pg_array_with_type(r, type) click to toggle source

Recognize NO_EXPLICIT_CAST sentinal value and use wrapped PGArray that will be parameterized into the query.

Calls superclass method
   # File lib/sequel/extensions/pg_auto_parameterize_in_array.rb
69 def _convert_array_to_pg_array_with_type(r, type)
70   if NO_EXPLICIT_CAST.equal?(type)
71     ParameterizedUntypedPGArray.new(Sequel.pg_array(r))
72   else
73     super
74   end
75 end