Packages
integratedb
0.1.0
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
Current section
Files
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