Ecto type inference from the schema and mapping to a PostgreSQL type.
The type is read from schema.__schema__(:type, field) and mapped to the PG
type used in ::type[] casts. The :types option (override) takes precedence
and is the only path for binary sources ("table"), which have no schema.
Summary
Functions
Returns the Ecto type for a field. For a binary source it requires an override
from :types, but even then returns only a type stand-in — the real PG type
comes from the override.
{:ok, "pg_type"} or {:error, :array_unsupported}.
Functions
Returns the Ecto type for a field. For a binary source it requires an override
from :types, but even then returns only a type stand-in — the real PG type
comes from the override.
{:ok, "pg_type"} or {:error, :array_unsupported}.
override (from :types) takes precedence. kind decides about arrays:
:array(anunnestcolumn) + array type ->{:error, :array_unsupported}(unnest would flatten a multi-dimensional array),:scalar(a placeholder) + array type -> OK, e.g."bigint[]"— it is an ordinary scalar parameter, so a constant array value lands in the column fine.