module Sequel::Postgres::PGArray::DatabaseMethods

Constants

APOS
BLOB_RANGE
DOUBLE_APOS
ESCAPE_RE
ESCAPE_REPLACEMENT

Public Instance Methods

bound_variable_arg(arg, conn) click to toggle source

Handle arrays in bound variables

# File lib/sequel/extensions/pg_array.rb, line 211
def bound_variable_arg(arg, conn)
  case arg
  when PGArray
    bound_variable_array(arg.to_a)
  when Array
    bound_variable_array(arg)
  else
    super
  end
end
schema_column_type(db_type) click to toggle source

Make the column type detection handle registered array types.

# File lib/sequel/extensions/pg_array.rb, line 223
def schema_column_type(db_type)
  if (db_type =~ %r\A([^(]+)(?:\([^(]+\))?\[\]\z/o) && (type = ARRAY_TYPES[$1])
    type
  else
    super
  end
end