Documentation ¶
Index ¶
- func AddCars(ctx context.Context, db database.DB, model *tests.User, ...) error
- func AddSons(ctx context.Context, db database.DB, model *tests.User, ...) error
- func ClearCarsRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func ClearExternalRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func ClearFavoriteCarRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func ClearSisterRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func ClearSonsRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func Delete(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func FromModels(input ...mapping.Model) []*tests.User
- func GetCars(ctx context.Context, db database.DB, model *tests.User, ...) ([]*tests.Car, error)
- func GetExternal(ctx context.Context, db database.DB, model *tests.User, ...) (*external.Model, error)
- func GetFavoriteCar(ctx context.Context, db database.DB, model *tests.User, ...) (*tests.Car, error)
- func GetSister(ctx context.Context, db database.DB, model *tests.User, ...) (*tests.User, error)
- func GetSons(ctx context.Context, db database.DB, model *tests.User, ...) ([]*tests.User, error)
- func Insert(ctx context.Context, db database.DB, models ...*tests.User) error
- func Query(db database.DB, models ...*tests.User) *_usersQueryBuilder
- func QueryCtx(ctx context.Context, db database.DB, models ...*tests.User) *_usersQueryBuilder
- func Refresh(ctx context.Context, db database.DB, models ...*tests.User) error
- func SetCars(ctx context.Context, db database.DB, model *tests.User, ...) error
- func SetExternal(ctx context.Context, db database.DB, model *tests.User, ...) error
- func SetFavoriteCar(ctx context.Context, db database.DB, model *tests.User, relation *tests.Car) error
- func SetSister(ctx context.Context, db database.DB, model *tests.User, relation *tests.User) error
- func SetSons(ctx context.Context, db database.DB, model *tests.User, ...) error
- func ToModels(input ...*tests.User) []mapping.Model
- func Update(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSons ¶
func AddSons(ctx context.Context, db database.DB, model *tests.User, relations ...*tests.User) error
AddSons adds the 'Sons' relationship for provided input 'models'.
func ClearCarsRelation ¶
ClearCarsRelation clears the 'Cars' relationship for provided models. For relationships of type: BelongsTo, HasOne, HasMany if foreign key is not nullable than the function would return an error.
func ClearExternalRelation ¶
func ClearExternalRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
ClearExternalRelation clears the 'External' relationship for provided models. For relationships of type: BelongsTo, HasOne, HasMany if foreign key is not nullable than the function would return an error.
func ClearFavoriteCarRelation ¶
func ClearFavoriteCarRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
ClearFavoriteCarRelation clears the 'FavoriteCar' relationship for provided models. For relationships of type: BelongsTo, HasOne, HasMany if foreign key is not nullable than the function would return an error.
func ClearSisterRelation ¶
ClearSisterRelation clears the 'Sister' relationship for provided models. For relationships of type: BelongsTo, HasOne, HasMany if foreign key is not nullable than the function would return an error.
func ClearSonsRelation ¶
ClearSonsRelation clears the 'Sons' relationship for provided models. For relationships of type: BelongsTo, HasOne, HasMany if foreign key is not nullable than the function would return an error.
func FromModels ¶
FromModels converts the input mapping.Model into []*tests.User.
func GetCars ¶
func GetCars(ctx context.Context, db database.DB, model *tests.User, relationFieldset ...string) ([]*tests.Car, error)
GetCars gets the 'Cars' relationship for provided input 'model'.
func GetExternal ¶
func GetExternal(ctx context.Context, db database.DB, model *tests.User, relationFieldset ...string) (*external.Model, error)
GetExternal gets the 'External' relationship for provided input 'model'.
func GetFavoriteCar ¶
func GetFavoriteCar(ctx context.Context, db database.DB, model *tests.User, relationFieldset ...string) (*tests.Car, error)
GetFavoriteCar gets the 'FavoriteCar' relationship for provided input 'model'.
func GetSister ¶
func GetSister(ctx context.Context, db database.DB, model *tests.User, relationFieldset ...string) (*tests.User, error)
GetSister gets the 'Sister' relationship for provided input 'model'.
func GetSons ¶
func GetSons(ctx context.Context, db database.DB, model *tests.User, relationFieldset ...string) ([]*tests.User, error)
GetSons gets the 'Sons' relationship for provided input 'model'.
func SetExternal ¶
func SetExternal(ctx context.Context, db database.DB, model *tests.User, relation *external.Model) error
SetExternal sets the 'External' relationship for provided input 'models'.
func SetFavoriteCar ¶
func SetFavoriteCar(ctx context.Context, db database.DB, model *tests.User, relation *tests.Car) error
SetFavoriteCar sets the 'FavoriteCar' relationship for provided input 'models'.
func SetSons ¶
func SetSons(ctx context.Context, db database.DB, model *tests.User, relations ...*tests.User) error
SetSons sets the 'Sons' relationship for provided input 'models'.
Types ¶
This section is empty.