Class | Sequel::Postgres::PGStringArray |
In: |
lib/sequel/extensions/pg_array.rb
|
Parent: | PGArray |
PGArray subclass for handling char/varchar/text arrays.
CHAR | = | 'char'.freeze |
VARCHAR | = | 'varchar'.freeze |
TEXT | = | 'text'.freeze |
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 419: def array_type 420: case (c = super) 421: when nil 422: TEXT 423: when CHAR, :char 424: VARCHAR 425: else 426: c 427: end 428: end