cardb

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 AddModels

func AddModels(ctx context.Context, db database.DB, model *tests.Car, relations ...*external.Model) error

AddModels adds the 'Models' relationship for provided input 'models'.

func AddNonPointerModels

func AddNonPointerModels(ctx context.Context, db database.DB, model *tests.Car, relations ...*external.Model) error

AddNonPointerModels adds the 'NonPointerModels' relationship for provided input 'models'.

func ClearModelsRelation

func 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 ClearNonPointerModelsRelation

func 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 Delete

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

Delete deletes tests.Car models in database.

func FromModels

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

FromModels converts the input mapping.Model into []*tests.Car.

func GetModels

func 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 GetNonPointerModels

func 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 Insert

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

Insert inserts tests.Car into database.

func Query

func Query(db database.DB, models ...*tests.Car) *_customCarsQueryBuilder

Query creates the query for the tests.Car.

func QueryCtx

func QueryCtx(ctx context.Context, db database.DB, models ...*tests.Car) *_customCarsQueryBuilder

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

func Refresh

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

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

func SetModels

func SetModels(ctx context.Context, db database.DB, model *tests.Car, relations ...*external.Model) error

SetModels sets the 'Models' relationship for provided input 'models'.

func SetNonPointerModels

func SetNonPointerModels(ctx context.Context, db database.DB, model *tests.Car, relations ...*external.Model) error

SetNonPointerModels sets the 'NonPointerModels' relationship for provided input 'models'.

func ToModels

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

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

func Update

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

Update updates tests.Car 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