AntlUtilsEcto.Query (antl_utils_ecto v2.13.2)

View Source

Set of utils for Ecto.Query

Summary

Types

status()

@type status() :: :ended | :ongoing | :scheduled

Functions

json_extract(field, path)

(macro)
@spec json_extract(Macro.t(), Macro.t()) :: Macro.t()

or_where(queryable, key, value)

@spec or_where(any(), atom(), nil | binary() | [any()]) :: Ecto.Query.t()

or_where_like(queryable, key, value)

@spec or_where_like(any(), atom(), binary()) :: Ecto.Query.t()

or_where_not(queryable, key, value)

@spec or_where_not(any(), atom(), nil | binary() | [any()]) :: Ecto.Query.t()

where(queryable, key, value)

@spec where(any(), atom(), nil | binary() | [any()] | integer() | boolean()) ::
  Ecto.Query.t()

where_extracted_json_contains(queryable, field, path, value)

@spec where_extracted_json_contains(Ecto.Queryable.t(), atom(), binary(), binary()) ::
  Ecto.Queryable.t()

where_in_period(queryable, start_at_key, end_at_key, datetime)

@spec where_in_period(any(), atom(), atom(), DateTime.t()) :: Ecto.Query.t()

where_like(queryable, key, value)

@spec where_like(any(), atom(), binary()) :: Ecto.Query.t()

where_not(queryable, key, value)

@spec where_not(any(), atom(), nil | binary() | [any()] | integer() | boolean()) ::
  Ecto.Query.t()

where_period_status(queryable, status, start_at_key, end_at_key, datetime)

@spec where_period_status(
  Ecto.Queryable.t(),
  status() | [status()],
  atom(),
  atom(),
  DateTime.t()
) ::
  Ecto.Query.t()