Rivet.Ident.Phone (rivet_ident v3.5.0)

View Source

Summary

Functions

change_post for side effects; should return the item

change_prep alters the params only, and may only return {:ok, params}

change_validate is only run for changing existing records

create_post for side effects; should return the item

create_prep alters the params only, and may only return {:ok, params}

create_validate is only run for creating new records

Similar to replace, but it doesn't remove existing values if the attrs has nil

Update our updated_at but only if it hasn't changed within a minute (less load)

a hook if you just want to extend validate

Types

ecto_p_result()

@type ecto_p_result() :: {:ok | :error, Ecto.Changeset.t()}

id()

@type id() :: Ecto.UUID.t()

model_p_result()

@type model_p_result() :: {:ok, Rivet.Ident.Phone.t()}

one_error()

@type one_error() :: {:error, atom() | map()}

t()

@type t() :: %Rivet.Ident.Phone{
  __meta__: Ecto.Schema.Metadata.t(),
  id: binary() | nil,
  inserted_at: DateTime.t() | nil,
  number: String.t() | nil,
  primary: boolean() | nil,
  updated_at: DateTime.t() | nil,
  user: Ecto.Schema.belongs_to(Rivet.Ident.User.t()) | nil,
  user_id: binary() | nil,
  verified: boolean() | nil
}

Functions

aggregate(x, y)

all(clauses \\ [], args \\ [])

@spec all(keyword() | Ecto.Query.t(), list()) ::
  {:error, ecto_p_result()} | {:ok, [Rivet.Ident.Phone.t()]}

all!(clauses \\ [], args \\ [])

@spec all!(keyword() | Ecto.Query.t(), list()) :: [Rivet.Ident.Phone.t()]

associate(item, var, value)

build(params \\ %{})

change_post(item, params)

change_post for side effects; should return the item

Note: BE VERY CAREFUL on large impact effects. This can quickly become a performance bottleneck.

change_prep(item, params)

change_prep alters the params only, and may only return {:ok, params}

change_validate(chgset)

change_validate is only run for changing existing records

changeset(item, attrs)

count!()

count!(claims)

count_by_inserted!()

count_by_inserted!(since)

count_by_updated!()

count_by_updated!(since)

create(attrs \\ %{})

@spec create(map()) :: model_p_result() | ecto_p_result()

create_post(item, params)

create_post for side effects; should return the item

Note: BE VERY CAREFUL on large impact effects. This can quickly become a performance bottleneck.

create_prep(item, params)

create_prep alters the params only, and may only return {:ok, params}

create_validate(chgset)

create_validate is only run for creating new records

delete(item)

delete_all(clauses, opts \\ [])

delete_all_ids(ids, opts \\ [])

drop_replace(attrs, clauses)

@spec drop_replace(map(), Keyword.t()) :: model_p_result() | ecto_p_result()

exists?(clauses)

@spec exists?(claims_or_query :: keyword() | term()) :: true | false

full_table_scan(clauses, func)

insert(a, b)

latest(claims \\ [], x \\ 1)

latest!(claims \\ [], x \\ 1)

one(x, preload \\ [])

@spec one(id() | keyword() | Ecto.Query.t(), preload :: list()) ::
  {:ok, Rivet.Ident.Phone.t()} | one_error()

one!(x, preload \\ [])

@spec one!(id() | keyword() | Ecto.Query.t(), preload :: list()) ::
  nil | Rivet.Ident.Phone.t()

preload(item, preloads, opts \\ [])

@spec preload(Rivet.Ident.Phone.t(), preloads :: term(), opts :: Keyword.t()) ::
  model_p_result() | ecto_p_result()

preload!(item, preloads, opts \\ [])

@spec preload!(Rivet.Ident.Phone.t(), preloads :: term(), opts :: Keyword.t()) ::
  Rivet.Ident.Phone.t()

reload(item)

replace(attrs, clauses)

@spec replace(map(), Keyword.t()) :: model_p_result() | ecto_p_result()

replace_fill(attrs, clauses)

@spec replace_fill(map(), Keyword.t()) :: model_p_result() | ecto_p_result()

Similar to replace, but it doesn't remove existing values if the attrs has nil

stream(clauses, args)

stream_all!(args, func)

touch(this_id)

Update our updated_at but only if it hasn't changed within a minute (less load)

unload(item)

unload(item, assoc)

update(item, attrs)

@spec update(Rivet.Ident.Phone.t(), map()) :: model_p_result() | ecto_p_result()

update!(item, attrs)

update_all(clauses, set)

update_fill(item, attrs)

@spec update_fill(Rivet.Ident.Phone.t(), attrs :: map()) ::
  model_p_result() | ecto_p_result()

upsert(attrs, on_conflict \\ :nothing)

validate(chgset)

validate_post(chgset)

a hook if you just want to extend validate