class Sequel::Postgres::PGStringArray

PGArray subclass for handling char/varchar/text arrays.

Constants

CHAR
TEXT
VARCHAR

Public Instance Methods

array_type() click to toggle source

By default, use a text array. If char is given without a size, use varchar instead, as otherwise Postgres assumes length of 1, which is likely to cause data loss.

# File lib/sequel/extensions/pg_array.rb, line 419
def array_type
  case (c = super)
  when nil 
    TEXT
  when CHAR, :char
    VARCHAR
  else
    c
  end
end