Documentation ¶
Index ¶
- type NRN_CustomCars
- func (_c *NRN_CustomCars) AddModels(ctx context.Context, db database.DB, model *tests.Car, ...) error
- func (_c *NRN_CustomCars) AddNonPointerModels(ctx context.Context, db database.DB, model *tests.Car, ...) error
- func (_c *NRN_CustomCars) ClearModelsRelation(ctx context.Context, db database.DB, models ...*tests.Car) (int64, error)
- func (_c *NRN_CustomCars) ClearNonPointerModelsRelation(ctx context.Context, db database.DB, models ...*tests.Car) (int64, error)
- func (_c *NRN_CustomCars) Delete(ctx context.Context, db database.DB, models ...*tests.Car) (int64, error)
- func (_c *NRN_CustomCars) FromModels(input ...mapping.Model) []*tests.Car
- func (_c *NRN_CustomCars) GetModels(ctx context.Context, db database.DB, model *tests.Car, ...) ([]*external.Model, error)
- func (_c *NRN_CustomCars) GetNonPointerModels(ctx context.Context, db database.DB, model *tests.Car, ...) ([]*external.Model, error)
- func (_c *NRN_CustomCars) Insert(ctx context.Context, db database.DB, models ...*tests.Car) error
- func (_c *NRN_CustomCars) ModelStruct() *mapping.ModelStruct
- func (_c *NRN_CustomCars) Query(db database.DB, models ...*tests.Car) *_customCarsQueryBuilder
- func (_c *NRN_CustomCars) QueryCtx(ctx context.Context, db database.DB, models ...*tests.Car) *_customCarsQueryBuilder
- func (_c *NRN_CustomCars) Refresh(ctx context.Context, db database.DB, models ...*tests.Car) error
- func (_c *NRN_CustomCars) SetModels(ctx context.Context, db database.DB, model *tests.Car, ...) error
- func (_c *NRN_CustomCars) SetNonPointerModels(ctx context.Context, db database.DB, model *tests.Car, ...) error
- func (_c *NRN_CustomCars) ToModels(input ...*tests.Car) []mapping.Model
- func (_c *NRN_CustomCars) Update(ctx context.Context, db database.DB, models ...*tests.Car) (int64, error)
- type NRN_Users
- func (_u *NRN_Users) AddCars(ctx context.Context, db database.DB, model *tests.User, ...) error
- func (_u *NRN_Users) AddSons(ctx context.Context, db database.DB, model *tests.User, ...) error
- func (_u *NRN_Users) ClearCarsRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func (_u *NRN_Users) ClearExternalRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func (_u *NRN_Users) ClearFavoriteCarRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func (_u *NRN_Users) ClearSisterRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func (_u *NRN_Users) ClearSonsRelation(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func (_u *NRN_Users) Delete(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
- func (_u *NRN_Users) FromModels(input ...mapping.Model) []*tests.User
- func (_u *NRN_Users) GetCars(ctx context.Context, db database.DB, model *tests.User, ...) ([]*tests.Car, error)
- func (_u *NRN_Users) GetExternal(ctx context.Context, db database.DB, model *tests.User, ...) (*external.Model, error)
- func (_u *NRN_Users) GetFavoriteCar(ctx context.Context, db database.DB, model *tests.User, ...) (*tests.Car, error)
- func (_u *NRN_Users) GetSister(ctx context.Context, db database.DB, model *tests.User, ...) (*tests.User, error)
- func (_u *NRN_Users) GetSons(ctx context.Context, db database.DB, model *tests.User, ...) ([]*tests.User, error)
- func (_u *NRN_Users) Insert(ctx context.Context, db database.DB, models ...*tests.User) error
- func (_u *NRN_Users) ModelStruct() *mapping.ModelStruct
- func (_u *NRN_Users) Query(db database.DB, models ...*tests.User) *_usersQueryBuilder
- func (_u *NRN_Users) QueryCtx(ctx context.Context, db database.DB, models ...*tests.User) *_usersQueryBuilder
- func (_u *NRN_Users) Refresh(ctx context.Context, db database.DB, models ...*tests.User) error
- func (_u *NRN_Users) SetCars(ctx context.Context, db database.DB, model *tests.User, ...) error
- func (_u *NRN_Users) SetExternal(ctx context.Context, db database.DB, model *tests.User, ...) error
- func (_u *NRN_Users) SetFavoriteCar(ctx context.Context, db database.DB, model *tests.User, relation *tests.Car) error
- func (_u *NRN_Users) SetSister(ctx context.Context, db database.DB, model *tests.User, relation *tests.User) error
- func (_u *NRN_Users) SetSons(ctx context.Context, db database.DB, model *tests.User, ...) error
- func (_u *NRN_Users) ToModels(input ...*tests.User) []mapping.Model
- func (_u *NRN_Users) Update(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NRN_CustomCars ¶
type NRN_CustomCars struct {
// contains filtered or unexported fields
}
NRN_CustomCars is the query helper that provides model specific database API.
func (*NRN_CustomCars) AddModels ¶ added in v0.0.6
func (_c *NRN_CustomCars) AddModels(ctx context.Context, db database.DB, model *tests.Car, relations ...*external.Model) error
AddModels adds the 'Models' relationship for provided input 'models'.
func (*NRN_CustomCars) AddNonPointerModels ¶ added in v0.0.6
func (_c *NRN_CustomCars) AddNonPointerModels(ctx context.Context, db database.DB, model *tests.Car, relations ...*external.Model) error
AddNonPointerModels adds the 'NonPointerModels' relationship for provided input 'models'.
func (*NRN_CustomCars) ClearModelsRelation ¶ added in v0.0.6
func (_c *NRN_CustomCars) ClearModelsRelation(ctx context.Context, db database.DB, models ...*tests.Car) (int64, error)
ClearModelsRelation clears the 'Models' 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 (*NRN_CustomCars) ClearNonPointerModelsRelation ¶ added in v0.0.6
func (_c *NRN_CustomCars) ClearNonPointerModelsRelation(ctx context.Context, db database.DB, models ...*tests.Car) (int64, error)
ClearNonPointerModelsRelation clears the 'NonPointerModels' 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 (*NRN_CustomCars) Delete ¶
func (_c *NRN_CustomCars) Delete(ctx context.Context, db database.DB, models ...*tests.Car) (int64, error)
Delete deletes tests.Car models in database.
func (*NRN_CustomCars) FromModels ¶
func (_c *NRN_CustomCars) FromModels(input ...mapping.Model) []*tests.Car
FromModels converts the input mapping.Model into []*tests.Car.
func (*NRN_CustomCars) GetModels ¶ added in v0.0.6
func (_c *NRN_CustomCars) GetModels(ctx context.Context, db database.DB, model *tests.Car, relationFieldset ...string) ([]*external.Model, error)
GetModels gets the 'Models' relationship for provided input 'model'.
func (*NRN_CustomCars) GetNonPointerModels ¶ added in v0.0.6
func (_c *NRN_CustomCars) GetNonPointerModels(ctx context.Context, db database.DB, model *tests.Car, relationFieldset ...string) ([]*external.Model, error)
GetNonPointerModels gets the 'NonPointerModels' relationship for provided input 'model'.
func (*NRN_CustomCars) ModelStruct ¶
func (_c *NRN_CustomCars) ModelStruct() *mapping.ModelStruct
ModelStruct gets the stored model struct.
func (*NRN_CustomCars) Query ¶
func (_c *NRN_CustomCars) Query(db database.DB, models ...*tests.Car) *_customCarsQueryBuilder
Query creates the query for the tests.Car.
func (*NRN_CustomCars) QueryCtx ¶
func (_c *NRN_CustomCars) QueryCtx(ctx context.Context, db database.DB, models ...*tests.Car) *_customCarsQueryBuilder
QueryCtx creates the query for the tests.Car with provided 'ctx' context.
func (*NRN_CustomCars) Refresh ¶
Refresh creates the query for the tests.Car with provided 'ctx' context.
func (*NRN_CustomCars) SetModels ¶ added in v0.0.6
func (_c *NRN_CustomCars) SetModels(ctx context.Context, db database.DB, model *tests.Car, relations ...*external.Model) error
SetModels sets the 'Models' relationship for provided input 'models'.
func (*NRN_CustomCars) SetNonPointerModels ¶ added in v0.0.6
func (_c *NRN_CustomCars) SetNonPointerModels(ctx context.Context, db database.DB, model *tests.Car, relations ...*external.Model) error
SetNonPointerModels sets the 'NonPointerModels' relationship for provided input 'models'.
type NRN_Users ¶
type NRN_Users struct {
// contains filtered or unexported fields
}
NRN_Users is the query helper that provides model specific database API.
func (*NRN_Users) AddCars ¶
func (_u *NRN_Users) AddCars(ctx context.Context, db database.DB, model *tests.User, relations ...*tests.Car) error
AddCars adds the 'Cars' relationship for provided input 'models'.
func (*NRN_Users) AddSons ¶
func (_u *NRN_Users) AddSons(ctx context.Context, db database.DB, model *tests.User, relations ...*tests.User) error
AddSons adds the 'Sons' relationship for provided input 'models'.
func (*NRN_Users) ClearCarsRelation ¶
func (_u *NRN_Users) 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 (*NRN_Users) ClearExternalRelation ¶
func (_u *NRN_Users) 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 (*NRN_Users) ClearFavoriteCarRelation ¶
func (_u *NRN_Users) 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 (*NRN_Users) ClearSisterRelation ¶
func (_u *NRN_Users) 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 (*NRN_Users) ClearSonsRelation ¶
func (_u *NRN_Users) 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 (*NRN_Users) Delete ¶
func (_u *NRN_Users) Delete(ctx context.Context, db database.DB, models ...*tests.User) (int64, error)
Delete deletes tests.User models in database.
func (*NRN_Users) FromModels ¶
FromModels converts the input mapping.Model into []*tests.User.
func (*NRN_Users) GetCars ¶
func (_u *NRN_Users) 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 (*NRN_Users) GetExternal ¶
func (_u *NRN_Users) 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 (*NRN_Users) GetFavoriteCar ¶
func (_u *NRN_Users) 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 (*NRN_Users) GetSister ¶
func (_u *NRN_Users) 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 (*NRN_Users) GetSons ¶
func (_u *NRN_Users) 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 (*NRN_Users) ModelStruct ¶
func (_u *NRN_Users) ModelStruct() *mapping.ModelStruct
ModelStruct gets the stored model struct.
func (*NRN_Users) QueryCtx ¶
func (_u *NRN_Users) QueryCtx(ctx context.Context, db database.DB, models ...*tests.User) *_usersQueryBuilder
QueryCtx creates the query for the tests.User with provided 'ctx' context.
func (*NRN_Users) Refresh ¶
Refresh creates the query for the tests.User with provided 'ctx' context.
func (*NRN_Users) SetCars ¶
func (_u *NRN_Users) SetCars(ctx context.Context, db database.DB, model *tests.User, relations ...*tests.Car) error
SetCars sets the 'Cars' relationship for provided input 'models'.
func (*NRN_Users) SetExternal ¶
func (_u *NRN_Users) SetExternal(ctx context.Context, db database.DB, model *tests.User, relation *external.Model) error
SetExternal sets the 'External' relationship for provided input 'models'.
func (*NRN_Users) SetFavoriteCar ¶
func (_u *NRN_Users) SetFavoriteCar(ctx context.Context, db database.DB, model *tests.User, relation *tests.Car) error
SetFavoriteCar sets the 'FavoriteCar' relationship for provided input 'models'.
func (*NRN_Users) SetSister ¶
func (_u *NRN_Users) SetSister(ctx context.Context, db database.DB, model *tests.User, relation *tests.User) error
SetSister sets the 'Sister' relationship for provided input 'models'.
func (*NRN_Users) SetSons ¶
func (_u *NRN_Users) SetSons(ctx context.Context, db database.DB, model *tests.User, relations ...*tests.User) error
SetSons sets the 'Sons' relationship for provided input 'models'.