Packages

IntegrateDB is a database sharing system. It provides integration primitives and data ownership and migration controls. Use it to integrate applications directly through a Postgres database.

Current section

Files

Jump to
integratedb lib integrate specification path.ex
Raw

lib/integrate/specification/path.ex

defmodule Integrate.Specification.Path do
use Integrate, :schema
@derive {Jason.Encoder, only: [:schema, :table]}
embedded_schema do
field :schema, :string
field :table, :string
end
@doc false
def changeset(schema, attrs) do
schema
|> cast(attrs, [:schema, :table])
|> validate_required([:schema, :table])
|> Validate.identifier(:schema)
|> Validate.identifier_or_asterisk(:table)
end
end