Drop-in wrapper around Pgvector.Ecto.Vector with a real equal?/2.
Pgvector.Ecto.Vector inherits Ecto's default equal?/2 (plain ==),
so change detection compares terms structurally. Whenever the value
loaded from the database isn't the exact representation being written
back — a custom Postgrex types module decoding to a different struct,
or list-vs-%Pgvector{} round trips — a byte-identical embedding
always dirties the changeset, turning idempotent re-stores into write
amplification plus HNSW index churn.
This type delegates type/cast/load/dump to Pgvector.Ecto.Vector
(identical wire behavior) and compares values by their encoded binary,
so byte-identical vectors are equal regardless of representation.
Values it can't encode (an opaque struct from a custom decoder that is neither enumerable nor castable) fall back to structural comparison, which is today's behavior rather than a crash.
If pgvector-elixir ships equal?/2 upstream (pgvector-python's
Vector.__eq__ is the family precedent), this module becomes a no-op
layer that can be dropped in a major release.
Summary
Functions
Callback implementation for Ecto.Type.cast/1.
Callback implementation for Ecto.Type.dump/1.
Callback implementation for Ecto.Type.embed_as/1.
Callback implementation for Ecto.Type.equal?/2.
Callback implementation for Ecto.Type.load/1.
Callback implementation for Ecto.Type.type/0.
Functions
Callback implementation for Ecto.Type.cast/1.
Callback implementation for Ecto.Type.dump/1.
Callback implementation for Ecto.Type.embed_as/1.
Callback implementation for Ecto.Type.equal?/2.
Callback implementation for Ecto.Type.load/1.
Callback implementation for Ecto.Type.type/0.