Versioned.Helpers (Versioned v0.2.1) View Source
Tools shared between modules. (For internal use.)
Link to this section Summary
Functions
Create a version_mod struct to insert from a new instance of the record.
Recursively crawl changeset and compile a list of version structs with is_deleted set to true.
Wrap a line of AST in a block if it isn't already wrapped.
Link to this section Functions
Specs
build_version(Ecto.Schema.t(), keyword()) :: Ecto.Changeset.t() | nil
Create a version_mod struct to insert from a new instance of the record.
Options
:deleted- Iftrue, records will marked as deleted.:change- For updates, anEcto.Changeset.t/0should be provided to inform which records were inserted vs updated vs deleted.
Specs
deleted_versions(Ecto.Changeset.t(), keyword()) :: [Ecto.Schema.t()]
Recursively crawl changeset and compile a list of version structs with is_deleted set to true.
Specs
Wrap a line of AST in a block if it isn't already wrapped.