Bylaw.Ecto.Changeset (bylaw_postgres v0.1.0-alpha.1)

Copy Markdown View Source

Extracts conservative changeset candidates from Ecto schema source files.

A candidate is a function whose source AST directly calls cast/3, cast/4, Ecto.Changeset.cast/3, Ecto.Changeset.cast/4, change/2, or Ecto.Changeset.change/2. Literal cast/change fields are extracted for comparison with database constraints. Dynamic field lists are treated as unverifiable by returning an empty field list for v1.

Summary

Functions

Returns changeset candidates found for the given schema modules and source paths.

Functions

candidates(paths, modules)

@spec candidates(paths :: [Path.t()], modules :: [module()]) :: [
  Bylaw.Ecto.Changeset.Candidate.t()
]

Returns changeset candidates found for the given schema modules and source paths.