paper_trail v0.1.1 PaperTrail

Summary

Functions

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

Gets the last version of a record

Gets the last version of a record given its module reference and its id

Gets all the versions of a record

Gets all the versions of a record given a module and its id

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

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

Functions

delete(struct, meta \\ nil)

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

get_version(record)

Gets the last version of a record

get_version(model, id)

Gets the last version of a record given its module reference and its id

get_versions(record)

Gets all the versions of a record

get_versions(model, id)

Gets all the versions of a record given a module and its id

insert(changeset, meta \\ nil)

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

update(changeset, meta \\ nil)

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