PaperTrail.Multi (paper_trail v0.10.12)

Summary

Types

@type changeset() :: Ecto.Changeset.t()
@type multi() :: Ecto.Multi.t()
@type options() :: PaperTrail.options()
@type queryable() :: PaperTrail.queryable()
@type result() ::
  {:ok, any()}
  | {:error, any()}
  | {:error, Ecto.Multi.name(), any(), %{required(Ecto.Multi.name()) => any()}}
Link to this type

struct_or_changeset()

@type struct_or_changeset() :: Ecto.Schema.t() | Ecto.Changeset.t()
@type updates() :: PaperTrail.updates()

Functions

Link to this function

add_prefix(changeset, prefix)

See PaperTrail.Serializer.add_prefix/2.

Link to this function

append(lhs, rhs)

See Ecto.Multi.append/2.

Link to this function

commit(multi, options \\ [])

@spec commit(multi(), options()) :: result()
Link to this function

delete(multi, struct_or_changeset, options \\ [])

@spec delete(multi(), struct_or_changeset(), options()) :: multi()
Link to this function

error(multi, name, value)

See Ecto.Multi.error/3.

Link to this function

get_item_type(data)

See PaperTrail.Serializer.get_item_type/1.

Link to this function

get_model_id(model)

See PaperTrail.Serializer.get_model_id/1.

Link to this function

get_sequence_from_model(changeset, options \\ [])

See PaperTrail.Serializer.get_sequence_from_model/2.

Link to this function

get_sequence_id(table_name, options \\ [])

See PaperTrail.Serializer.get_sequence_id/2.

Link to this function

insert(multi, changeset, options \\ [])

@spec insert(multi(), changeset(), options()) :: multi()
Link to this function

make_version_struct(version, model, options)

See PaperTrail.Serializer.make_version_struct/3.

Link to this function

make_version_structs(version, queryable, changes, options)

See PaperTrail.Serializer.make_version_structs/4.

Link to this function

merge(multi, merge)

See Ecto.Multi.merge/2.

Link to this function

merge(multi, mod, fun, args)

See Ecto.Multi.merge/4.

See Ecto.Multi.new/0.

Link to this function

prepend(lhs, rhs)

See Ecto.Multi.prepend/2.

Link to this function

run(multi, name, run)

See Ecto.Multi.run/3.

Link to this function

run(multi, name, mod, fun, args)

See Ecto.Multi.run/5.

Link to this function

serialize(data, options)

See PaperTrail.Serializer.serialize/2.

See Ecto.Multi.to_list/1.

Link to this function

update(multi, changeset, options \\ [])

@spec update(multi(), changeset(), options()) :: multi()
Link to this function

update_all(multi, queryable, updates, options \\ [])

@spec update_all(multi(), queryable(), updates(), options()) :: multi()