Documentation ¶
Index ¶
- type IManufacturerDo
- type IPartDo
- type IPersonDo
- type IVehicleDo
- type IVehicleForSaleDo
- type IVehicleModelDo
- type Query
- func (q *Query) Available() bool
- func (q *Query) Begin(opts ...*sql.TxOptions) *QueryTx
- func (q *Query) ReadDB() *Query
- func (q *Query) ReplaceDB(db *gorm.DB) *Query
- func (q *Query) Transaction(fc func(tx *Query) error, opts ...*sql.TxOptions) error
- func (q *Query) WithContext(ctx context.Context) *queryCtx
- func (q *Query) WriteDB() *Query
- type QueryTx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IManufacturerDo ¶
type IManufacturerDo interface { gen.SubQuery Debug() IManufacturerDo WithContext(ctx context.Context) IManufacturerDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IManufacturerDo WriteDB() IManufacturerDo As(alias string) gen.Dao Session(config *gorm.Session) IManufacturerDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IManufacturerDo Not(conds ...gen.Condition) IManufacturerDo Or(conds ...gen.Condition) IManufacturerDo Select(conds ...field.Expr) IManufacturerDo Where(conds ...gen.Condition) IManufacturerDo Order(conds ...field.Expr) IManufacturerDo Distinct(cols ...field.Expr) IManufacturerDo Omit(cols ...field.Expr) IManufacturerDo Join(table schema.Tabler, on ...field.Expr) IManufacturerDo LeftJoin(table schema.Tabler, on ...field.Expr) IManufacturerDo RightJoin(table schema.Tabler, on ...field.Expr) IManufacturerDo Group(cols ...field.Expr) IManufacturerDo Having(conds ...gen.Condition) IManufacturerDo Limit(limit int) IManufacturerDo Offset(offset int) IManufacturerDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IManufacturerDo Unscoped() IManufacturerDo Create(values ...*model.Manufacturer) error CreateInBatches(values []*model.Manufacturer, batchSize int) error Save(values ...*model.Manufacturer) error First() (*model.Manufacturer, error) Take() (*model.Manufacturer, error) Last() (*model.Manufacturer, error) Find() ([]*model.Manufacturer, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Manufacturer, err error) FindInBatches(result *[]*model.Manufacturer, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Manufacturer) (info gen.ResultInfo, err error) Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) Updates(value interface{}) (info gen.ResultInfo, err error) UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) UpdateColumns(value interface{}) (info gen.ResultInfo, err error) UpdateFrom(q gen.SubQuery) gen.Dao Attrs(attrs ...field.AssignExpr) IManufacturerDo Assign(attrs ...field.AssignExpr) IManufacturerDo Joins(fields ...field.RelationField) IManufacturerDo Preload(fields ...field.RelationField) IManufacturerDo FirstOrInit() (*model.Manufacturer, error) FirstOrCreate() (*model.Manufacturer, error) FindByPage(offset int, limit int) (result []*model.Manufacturer, count int64, err error) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) Scan(result interface{}) (err error) Returning(value interface{}, columns ...string) IManufacturerDo UnderlyingDB() *gorm.DB schema.Tabler }
type IPartDo ¶
type IPartDo interface { gen.SubQuery Debug() IPartDo WithContext(ctx context.Context) IPartDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IPartDo WriteDB() IPartDo As(alias string) gen.Dao Session(config *gorm.Session) IPartDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IPartDo Not(conds ...gen.Condition) IPartDo Or(conds ...gen.Condition) IPartDo Select(conds ...field.Expr) IPartDo Where(conds ...gen.Condition) IPartDo Order(conds ...field.Expr) IPartDo Distinct(cols ...field.Expr) IPartDo Omit(cols ...field.Expr) IPartDo Join(table schema.Tabler, on ...field.Expr) IPartDo LeftJoin(table schema.Tabler, on ...field.Expr) IPartDo RightJoin(table schema.Tabler, on ...field.Expr) IPartDo Group(cols ...field.Expr) IPartDo Having(conds ...gen.Condition) IPartDo Limit(limit int) IPartDo Offset(offset int) IPartDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IPartDo Unscoped() IPartDo Create(values ...*model.Part) error CreateInBatches(values []*model.Part, batchSize int) error Save(values ...*model.Part) error First() (*model.Part, error) Take() (*model.Part, error) Last() (*model.Part, error) Find() ([]*model.Part, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Part, err error) FindInBatches(result *[]*model.Part, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Part) (info gen.ResultInfo, err error) Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) Updates(value interface{}) (info gen.ResultInfo, err error) UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) UpdateColumns(value interface{}) (info gen.ResultInfo, err error) UpdateFrom(q gen.SubQuery) gen.Dao Attrs(attrs ...field.AssignExpr) IPartDo Assign(attrs ...field.AssignExpr) IPartDo Joins(fields ...field.RelationField) IPartDo Preload(fields ...field.RelationField) IPartDo FirstOrInit() (*model.Part, error) FirstOrCreate() (*model.Part, error) FindByPage(offset int, limit int) (result []*model.Part, count int64, err error) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) Scan(result interface{}) (err error) Returning(value interface{}, columns ...string) IPartDo UnderlyingDB() *gorm.DB schema.Tabler }
type IPersonDo ¶
type IPersonDo interface { gen.SubQuery Debug() IPersonDo WithContext(ctx context.Context) IPersonDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IPersonDo WriteDB() IPersonDo As(alias string) gen.Dao Session(config *gorm.Session) IPersonDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IPersonDo Not(conds ...gen.Condition) IPersonDo Or(conds ...gen.Condition) IPersonDo Select(conds ...field.Expr) IPersonDo Where(conds ...gen.Condition) IPersonDo Order(conds ...field.Expr) IPersonDo Distinct(cols ...field.Expr) IPersonDo Omit(cols ...field.Expr) IPersonDo Join(table schema.Tabler, on ...field.Expr) IPersonDo LeftJoin(table schema.Tabler, on ...field.Expr) IPersonDo RightJoin(table schema.Tabler, on ...field.Expr) IPersonDo Group(cols ...field.Expr) IPersonDo Having(conds ...gen.Condition) IPersonDo Limit(limit int) IPersonDo Offset(offset int) IPersonDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IPersonDo Unscoped() IPersonDo Create(values ...*model.Person) error CreateInBatches(values []*model.Person, batchSize int) error Save(values ...*model.Person) error First() (*model.Person, error) Take() (*model.Person, error) Last() (*model.Person, error) Find() ([]*model.Person, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Person, err error) FindInBatches(result *[]*model.Person, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Person) (info gen.ResultInfo, err error) Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) Updates(value interface{}) (info gen.ResultInfo, err error) UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) UpdateColumns(value interface{}) (info gen.ResultInfo, err error) UpdateFrom(q gen.SubQuery) gen.Dao Attrs(attrs ...field.AssignExpr) IPersonDo Assign(attrs ...field.AssignExpr) IPersonDo Joins(fields ...field.RelationField) IPersonDo Preload(fields ...field.RelationField) IPersonDo FirstOrInit() (*model.Person, error) FirstOrCreate() (*model.Person, error) FindByPage(offset int, limit int) (result []*model.Person, count int64, err error) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) Scan(result interface{}) (err error) Returning(value interface{}, columns ...string) IPersonDo UnderlyingDB() *gorm.DB schema.Tabler }
type IVehicleDo ¶
type IVehicleDo interface { gen.SubQuery Debug() IVehicleDo WithContext(ctx context.Context) IVehicleDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IVehicleDo WriteDB() IVehicleDo As(alias string) gen.Dao Session(config *gorm.Session) IVehicleDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IVehicleDo Not(conds ...gen.Condition) IVehicleDo Or(conds ...gen.Condition) IVehicleDo Select(conds ...field.Expr) IVehicleDo Where(conds ...gen.Condition) IVehicleDo Order(conds ...field.Expr) IVehicleDo Distinct(cols ...field.Expr) IVehicleDo Omit(cols ...field.Expr) IVehicleDo Join(table schema.Tabler, on ...field.Expr) IVehicleDo LeftJoin(table schema.Tabler, on ...field.Expr) IVehicleDo RightJoin(table schema.Tabler, on ...field.Expr) IVehicleDo Group(cols ...field.Expr) IVehicleDo Having(conds ...gen.Condition) IVehicleDo Limit(limit int) IVehicleDo Offset(offset int) IVehicleDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IVehicleDo Unscoped() IVehicleDo Create(values ...*model.Vehicle) error CreateInBatches(values []*model.Vehicle, batchSize int) error Save(values ...*model.Vehicle) error First() (*model.Vehicle, error) Take() (*model.Vehicle, error) Last() (*model.Vehicle, error) Find() ([]*model.Vehicle, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Vehicle, err error) FindInBatches(result *[]*model.Vehicle, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Vehicle) (info gen.ResultInfo, err error) Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) Updates(value interface{}) (info gen.ResultInfo, err error) UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) UpdateColumns(value interface{}) (info gen.ResultInfo, err error) UpdateFrom(q gen.SubQuery) gen.Dao Attrs(attrs ...field.AssignExpr) IVehicleDo Assign(attrs ...field.AssignExpr) IVehicleDo Joins(fields ...field.RelationField) IVehicleDo Preload(fields ...field.RelationField) IVehicleDo FirstOrInit() (*model.Vehicle, error) FirstOrCreate() (*model.Vehicle, error) FindByPage(offset int, limit int) (result []*model.Vehicle, count int64, err error) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) Scan(result interface{}) (err error) Returning(value interface{}, columns ...string) IVehicleDo UnderlyingDB() *gorm.DB schema.Tabler }
type IVehicleForSaleDo ¶
type IVehicleForSaleDo interface { gen.SubQuery Debug() IVehicleForSaleDo WithContext(ctx context.Context) IVehicleForSaleDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IVehicleForSaleDo WriteDB() IVehicleForSaleDo As(alias string) gen.Dao Session(config *gorm.Session) IVehicleForSaleDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IVehicleForSaleDo Not(conds ...gen.Condition) IVehicleForSaleDo Or(conds ...gen.Condition) IVehicleForSaleDo Select(conds ...field.Expr) IVehicleForSaleDo Where(conds ...gen.Condition) IVehicleForSaleDo Order(conds ...field.Expr) IVehicleForSaleDo Distinct(cols ...field.Expr) IVehicleForSaleDo Omit(cols ...field.Expr) IVehicleForSaleDo Join(table schema.Tabler, on ...field.Expr) IVehicleForSaleDo LeftJoin(table schema.Tabler, on ...field.Expr) IVehicleForSaleDo RightJoin(table schema.Tabler, on ...field.Expr) IVehicleForSaleDo Group(cols ...field.Expr) IVehicleForSaleDo Having(conds ...gen.Condition) IVehicleForSaleDo Limit(limit int) IVehicleForSaleDo Offset(offset int) IVehicleForSaleDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IVehicleForSaleDo Unscoped() IVehicleForSaleDo Create(values ...*model.VehicleForSale) error CreateInBatches(values []*model.VehicleForSale, batchSize int) error Save(values ...*model.VehicleForSale) error First() (*model.VehicleForSale, error) Take() (*model.VehicleForSale, error) Last() (*model.VehicleForSale, error) Find() ([]*model.VehicleForSale, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.VehicleForSale, err error) FindInBatches(result *[]*model.VehicleForSale, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.VehicleForSale) (info gen.ResultInfo, err error) Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) Updates(value interface{}) (info gen.ResultInfo, err error) UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) UpdateColumns(value interface{}) (info gen.ResultInfo, err error) UpdateFrom(q gen.SubQuery) gen.Dao Attrs(attrs ...field.AssignExpr) IVehicleForSaleDo Assign(attrs ...field.AssignExpr) IVehicleForSaleDo Joins(fields ...field.RelationField) IVehicleForSaleDo Preload(fields ...field.RelationField) IVehicleForSaleDo FirstOrInit() (*model.VehicleForSale, error) FirstOrCreate() (*model.VehicleForSale, error) FindByPage(offset int, limit int) (result []*model.VehicleForSale, count int64, err error) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) Scan(result interface{}) (err error) Returning(value interface{}, columns ...string) IVehicleForSaleDo UnderlyingDB() *gorm.DB schema.Tabler }
type IVehicleModelDo ¶
type IVehicleModelDo interface { gen.SubQuery Debug() IVehicleModelDo WithContext(ctx context.Context) IVehicleModelDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IVehicleModelDo WriteDB() IVehicleModelDo As(alias string) gen.Dao Session(config *gorm.Session) IVehicleModelDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IVehicleModelDo Not(conds ...gen.Condition) IVehicleModelDo Or(conds ...gen.Condition) IVehicleModelDo Select(conds ...field.Expr) IVehicleModelDo Where(conds ...gen.Condition) IVehicleModelDo Order(conds ...field.Expr) IVehicleModelDo Distinct(cols ...field.Expr) IVehicleModelDo Omit(cols ...field.Expr) IVehicleModelDo Join(table schema.Tabler, on ...field.Expr) IVehicleModelDo LeftJoin(table schema.Tabler, on ...field.Expr) IVehicleModelDo RightJoin(table schema.Tabler, on ...field.Expr) IVehicleModelDo Group(cols ...field.Expr) IVehicleModelDo Having(conds ...gen.Condition) IVehicleModelDo Limit(limit int) IVehicleModelDo Offset(offset int) IVehicleModelDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IVehicleModelDo Unscoped() IVehicleModelDo Create(values ...*model.VehicleModel) error CreateInBatches(values []*model.VehicleModel, batchSize int) error Save(values ...*model.VehicleModel) error First() (*model.VehicleModel, error) Take() (*model.VehicleModel, error) Last() (*model.VehicleModel, error) Find() ([]*model.VehicleModel, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.VehicleModel, err error) FindInBatches(result *[]*model.VehicleModel, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.VehicleModel) (info gen.ResultInfo, err error) Update(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) Updates(value interface{}) (info gen.ResultInfo, err error) UpdateColumn(column field.Expr, value interface{}) (info gen.ResultInfo, err error) UpdateColumnSimple(columns ...field.AssignExpr) (info gen.ResultInfo, err error) UpdateColumns(value interface{}) (info gen.ResultInfo, err error) UpdateFrom(q gen.SubQuery) gen.Dao Attrs(attrs ...field.AssignExpr) IVehicleModelDo Assign(attrs ...field.AssignExpr) IVehicleModelDo Joins(fields ...field.RelationField) IVehicleModelDo Preload(fields ...field.RelationField) IVehicleModelDo FirstOrInit() (*model.VehicleModel, error) FirstOrCreate() (*model.VehicleModel, error) FindByPage(offset int, limit int) (result []*model.VehicleModel, count int64, err error) ScanByPage(result interface{}, offset int, limit int) (count int64, err error) Scan(result interface{}) (err error) Returning(value interface{}, columns ...string) IVehicleModelDo UnderlyingDB() *gorm.DB schema.Tabler }
type Query ¶
type Query struct { Manufacturer manufacturer Part part Person person Vehicle vehicle VehicleForSale vehicleForSale VehicleModel vehicleModel // contains filtered or unexported fields }
func (*Query) Transaction ¶
func (*Query) WithContext ¶
type QueryTx ¶
func (*QueryTx) RollbackTo ¶
Click to show internal directories.
Click to hide internal directories.