asobi_player (asobi v0.35.4)

View Source

Summary

Functions

associations()

-spec associations() ->
                      [#kura_assoc{name :: atom(),
                                   type :: belongs_to | has_one | has_many | many_to_many,
                                   schema :: module(),
                                   foreign_key :: atom() | undefined,
                                   join_through :: binary() | module() | undefined,
                                   join_keys :: {atom(), atom()} | undefined,
                                   through :: [atom()] | undefined}].

fields()

-spec fields() ->
                [#kura_field{name :: atom(),
                             type :: kura_types:kura_type(),
                             column :: binary() | undefined,
                             default :: term(),
                             primary_key :: boolean(),
                             nullable :: boolean(),
                             virtual :: boolean()}].

generate_id()

-spec generate_id() -> binary().

indexes()

-spec indexes() -> [{[atom()], map()}].

password_changeset(Data, Params)

-spec password_changeset(map(), map()) ->
                            #kura_changeset{valid :: boolean(),
                                            schema :: module() | undefined,
                                            data :: map(),
                                            params :: map(),
                                            changes :: map(),
                                            errors :: [{atom(), binary()}],
                                            types :: #{atom() => kura_types:kura_type()},
                                            required :: [atom()],
                                            action :: atom() | undefined,
                                            constraints ::
                                                [#kura_constraint{type ::
                                                                      unique | foreign_key | check |
                                                                      exclusion,
                                                                  constraint :: binary(),
                                                                  field :: atom(),
                                                                  message :: binary()}],
                                            assoc_changes ::
                                                #{atom() => #kura_changeset{} | [#kura_changeset{}]},
                                            prepare :: [fun((#kura_changeset{}) -> #kura_changeset{})],
                                            optimistic_lock :: atom() | undefined}.

registration_changeset(Data, Params)

-spec registration_changeset(map(), map()) ->
                                #kura_changeset{valid :: boolean(),
                                                schema :: module() | undefined,
                                                data :: map(),
                                                params :: map(),
                                                changes :: map(),
                                                errors :: [{atom(), binary()}],
                                                types :: #{atom() => kura_types:kura_type()},
                                                required :: [atom()],
                                                action :: atom() | undefined,
                                                constraints ::
                                                    [#kura_constraint{type ::
                                                                          unique | foreign_key | check |
                                                                          exclusion,
                                                                      constraint :: binary(),
                                                                      field :: atom(),
                                                                      message :: binary()}],
                                                assoc_changes ::
                                                    #{atom() => #kura_changeset{} | [#kura_changeset{}]},
                                                prepare ::
                                                    [fun((#kura_changeset{}) -> #kura_changeset{})],
                                                optimistic_lock :: atom() | undefined}.

table()

-spec table() -> binary().

update_changeset(Data, Params)

-spec update_changeset(map(), map()) ->
                          #kura_changeset{valid :: boolean(),
                                          schema :: module() | undefined,
                                          data :: map(),
                                          params :: map(),
                                          changes :: map(),
                                          errors :: [{atom(), binary()}],
                                          types :: #{atom() => kura_types:kura_type()},
                                          required :: [atom()],
                                          action :: atom() | undefined,
                                          constraints ::
                                              [#kura_constraint{type ::
                                                                    unique | foreign_key | check |
                                                                    exclusion,
                                                                constraint :: binary(),
                                                                field :: atom(),
                                                                message :: binary()}],
                                          assoc_changes ::
                                              #{atom() => #kura_changeset{} | [#kura_changeset{}]},
                                          prepare :: [fun((#kura_changeset{}) -> #kura_changeset{})],
                                          optimistic_lock :: atom() | undefined}.