Method: Sequel::Plugins::PgArrayAssociations::ManyToPgArrayAssociationReflection#array_type

Defined in:
lib/sequel/plugins/pg_array_associations.rb

#array_typeObject



80
81
82
83
84
85
86
87
88
# File 'lib/sequel/plugins/pg_array_associations.rb', line 80

def array_type
  cached_fetch(:array_type) do
    if (sch = associated_class.db_schema) && (s = sch[self[:key]]) && (t = s[:db_type])
      t.sub(/\[\]\z/, '').freeze
    else
      :integer
    end
  end
end