ecto_as_state_machine v1.0.7 EctoAsStateMachine.State View Source

State callbacks

Link to this section Summary

Link to this section Functions

Link to this function can_event?(config) View Source
can_event?(%{event: List.t, model: Map.t, column: atom}) ::
  true |
  false
Link to this function is_state?(config) View Source
is_state?(%{event: List.t, state: String.t, column: atom}) ::
  true |
  false
Link to this function next_state(config) View Source
next_state(%{events: List.t, model: Map.t, states: List.t, initial: String.t, column: atom}) ::
  term |
  %{valid: false}
Link to this function state_with_initial(state, map) View Source
state_with_initial(String.t, %{states: List.t, initial: String.t}) ::
  String.t |
  String.t
Link to this function update(config) View Source
update(%{event: List.t, model: Map.t, states: List.t, initial: String.t, column: atom}) ::
  term |
  %{valid: false}
Link to this function update!(config) View Source
update!(%{repo: Ecto.Repo, event: List.t, model: Map.t, states: List.t, initial: String.t, column: atom}) ::
  term |
  {:error, term}