Versioned.Multi (Versioned v0.3.0) View Source
Tools for operating on versioned records.
Link to this section Summary
Functions
Returns an Ecto.Multi with all steps necessary to delete a versioned record.
Returns an Ecto.Multi with all steps necessary to insert a versioned record.
Returns an Ecto.Multi with all steps necessary to update a versioned record.
Link to this section Functions
Specs
delete( Ecto.Multi.t(), atom() | String.t(), Ecto.Schema.t() | Ecto.Changeset.t(), Keyword.t() ) :: Ecto.Multi.t()
Returns an Ecto.Multi with all steps necessary to delete a versioned record.
An Ecto.Multi is returned which first updates the record itself, inserts a new version into the versions table and finally deletes associations as needed.
If name
is "puppy"
, the returned parts will be:
"puppy_record"
- The updated record itself."puppy_version"
- The newly inserted version record (is_deleted=TRUE).
Specs
insert( Ecto.Multi.t(), atom() | String.t(), Ecto.Schema.t() | Ecto.Changeset.t(), keyword() ) :: Ecto.Multi.t()
Returns an Ecto.Multi with all steps necessary to insert a versioned record.
If name
is "puppy"
, the returned parts will be:
"puppy_record"
- The inserted record itself."puppy_version"
- The inserted version record.
Specs
update(Ecto.Multi.t(), atom() | String.t(), Ecto.Changeset.t(), keyword()) :: Ecto.Multi.t()
Returns an Ecto.Multi with all steps necessary to update a versioned record.
An Ecto.Multi is returned which first updates the record itself, inserts a new version into the versions table and finally deletes associations as needed.
If name
is "puppy"
, the returned parts will be:
"puppy_record"
- The updated record itself."puppy_version"
- The newly inserted version record."puppy_deletes"
- List of association version records which were deleted.