usercollection

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCars

func AddCars(ctx context.Context, db database.DB, model *tests.User, relations ...*tests.Car) error

AddCars adds the 'Cars' relationship for provided input 'models'.

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

func ClearCarsRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)

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

func ClearSisterRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)

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

func ClearSonsRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)

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 Delete

func Delete(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)

Delete deletes tests.User models in database.

func FromModels

func FromModels(input ...mapping.Model) []*tests.User

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 Insert

func Insert(ctx context.Context, db database.DB, models ...*tests.User) error

Insert inserts tests.User into database.

func Query

func Query(db database.DB, models ...*tests.User) *_usersQueryBuilder

Query creates the query for the tests.User.

func QueryCtx

func QueryCtx(ctx context.Context, db database.DB, models ...*tests.User) *_usersQueryBuilder

QueryCtx creates the query for the tests.User with provided 'ctx' context.

func Refresh

func Refresh(ctx context.Context, db database.DB, models ...*tests.User) error

Refresh creates the query for the tests.User with provided 'ctx' context.

func SetCars

func SetCars(ctx context.Context, db database.DB, model *tests.User, relations ...*tests.Car) error

SetCars sets the 'Cars' relationship for provided input 'models'.

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 SetSister

func SetSister(ctx context.Context, db database.DB, model *tests.User, relation *tests.User) error

SetSister sets the 'Sister' 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'.

func ToModels

func ToModels(input ...*tests.User) []mapping.Model

ToModels converts the input slice of tests.User into []mapping.Model

func Update

func Update(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)

Update updates tests.User models into database.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL