paper_trail v0.8.2 PaperTrail

Link to this section Summary

Functions

Deletes a record from the database with a related version insertion in one transaction

Same as delete/2 but returns only the model struct or raises if the changeset is invalid.

Inserts a record to the database with a related version insertion in one transaction

Same as insert/2 but returns only the model struct or raises if the changeset is invalid.

Updates a record from the database with a related version insertion in one transaction

Same as update/2 but returns only the model struct or raises if the changeset is invalid.

Link to this section Functions

Link to this function

delete(struct, options \\ [origin: nil, meta: nil, originator: nil, prefix: nil])

Deletes a record from the database with a related version insertion in one transaction

Link to this function

delete!(struct, options \\ [origin: nil, meta: nil, originator: nil, prefix: nil])

Same as delete/2 but returns only the model struct or raises if the changeset is invalid.

Link to this function

get_current_model(version)

See PaperTrail.VersionQueries.get_current_model/1.

Link to this function

get_model_id(model)

Link to this function

get_version(record)

See PaperTrail.VersionQueries.get_version/1.

Link to this function

get_version(model_or_record, id_or_options)

See PaperTrail.VersionQueries.get_version/2.

Link to this function

get_version(model, id, options)

See PaperTrail.VersionQueries.get_version/3.

Link to this function

get_versions(record)

See PaperTrail.VersionQueries.get_versions/1.

Link to this function

get_versions(model_or_record, id_or_options)

See PaperTrail.VersionQueries.get_versions/2.

Link to this function

get_versions(model, id, options)

See PaperTrail.VersionQueries.get_versions/3.

Link to this function

insert(changeset, options \\ [origin: nil, meta: nil, originator: nil, prefix: nil])

Inserts a record to the database with a related version insertion in one transaction

Link to this function

insert!(changeset, options \\ [origin: nil, meta: nil, originator: nil, prefix: nil])

Same as insert/2 but returns only the model struct or raises if the changeset is invalid.

Link to this function

update(changeset, options \\ [origin: nil, meta: nil, originator: nil, prefix: nil])

Updates a record from the database with a related version insertion in one transaction

Link to this function

update!(changeset, options \\ [origin: nil, meta: nil, originator: nil, prefix: nil])

Same as update/2 but returns only the model struct or raises if the changeset is invalid.