Packages

Endo is a library containing database schema reflection APIs for your applications, as well as implementations of queryable schemas to facilitate custom database reflection via Ecto.

Current section

Files

Jump to
endo lib endo adapters postgres pg_index.ex
Raw

lib/endo/adapters/postgres/pg_index.ex

defmodule Endo.Adapters.Postgres.PgIndex do
@moduledoc false
use Ecto.Schema
use Endo.Queryable
@type t :: %__MODULE__{}
@foreign_key_type :string
@primary_key false
schema "pg_index" do
# (references pg_class.oid)
field(:indexrelid, :id)
# oid (references pg_class.oid)
field(:indrelid, :id)
field(:indnatts, :integer)
field(:indnkeyatts, :integer)
field(:indisunique, :boolean)
field(:indisprimary, :boolean)
field(:indisexclusion, :boolean)
field(:indimmediate, :boolean)
field(:indisclustered, :boolean)
field(:indisvalid, :boolean)
field(:indcheckxmin, :boolean)
field(:indisready, :boolean)
field(:indislive, :boolean)
field(:indisreplident, :boolean)
# TODO: these types aren't supported by Ecto out of the box
# but I'm unsure if we really need them
# field :indkey int2vector (references pg_attribute.attnum)
# field :indcollation oidvector (references pg_collation.oid)
# field :indclass oidvector (references pg_opclass.oid)
# field :indoption int2vector
# field :indexprs pg_node_tree
# field :indpred pg_node_tree
end
end