PaperTrail (paper_trail v0.10.1)
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
add_prefix(schema, prefix)
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
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.
get_current_model(version)
get_item_type(data)
get_model_id(model)
get_sequence_id(table_name)
get_version(record)
get_version(model_or_record, id_or_options)
get_version(model, id, options)
get_versions(record)
get_versions(model_or_record, id_or_options)
get_versions(model, id, options)
insert(changeset, options \\ [origin: nil, meta: nil, originator: nil, prefix: nil, model_key: :model, version_key: :version, ecto_options: []])
Inserts a record to the database with a related version insertion in one transaction
insert!(changeset, options \\ [origin: nil, meta: nil, originator: nil, prefix: nil, model_key: :model, version_key: :version, ecto_options: []])
Same as insert/2 but returns only the model struct or raises if the changeset is invalid.
make_version_struct(version, model, options)
serialize(data)
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
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.