query

package
v0.2.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Q        = new(Query)
	CronJobM *cronJobM
	JobM     *jobM
)

Functions

func SetDefault

func SetDefault(db *gorm.DB, opts ...gen.DOOption)

Types

type ICronJobMDo

type ICronJobMDo interface {
	gen.SubQuery
	Debug() ICronJobMDo
	WithContext(ctx context.Context) ICronJobMDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() ICronJobMDo
	WriteDB() ICronJobMDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) ICronJobMDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) ICronJobMDo
	Not(conds ...gen.Condition) ICronJobMDo
	Or(conds ...gen.Condition) ICronJobMDo
	Select(conds ...field.Expr) ICronJobMDo
	Where(conds ...gen.Condition) ICronJobMDo
	Order(conds ...field.Expr) ICronJobMDo
	Distinct(cols ...field.Expr) ICronJobMDo
	Omit(cols ...field.Expr) ICronJobMDo
	Join(table schema.Tabler, on ...field.Expr) ICronJobMDo
	LeftJoin(table schema.Tabler, on ...field.Expr) ICronJobMDo
	RightJoin(table schema.Tabler, on ...field.Expr) ICronJobMDo
	Group(cols ...field.Expr) ICronJobMDo
	Having(conds ...gen.Condition) ICronJobMDo
	Limit(limit int) ICronJobMDo
	Offset(offset int) ICronJobMDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) ICronJobMDo
	Unscoped() ICronJobMDo
	Create(values ...*model.CronJobM) error
	CreateInBatches(values []*model.CronJobM, batchSize int) error
	Save(values ...*model.CronJobM) error
	First() (*model.CronJobM, error)
	Take() (*model.CronJobM, error)
	Last() (*model.CronJobM, error)
	Find() ([]*model.CronJobM, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.CronJobM, err error)
	FindInBatches(result *[]*model.CronJobM, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.CronJobM) (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) ICronJobMDo
	Assign(attrs ...field.AssignExpr) ICronJobMDo
	Joins(fields ...field.RelationField) ICronJobMDo
	Preload(fields ...field.RelationField) ICronJobMDo
	FirstOrInit() (*model.CronJobM, error)
	FirstOrCreate() (*model.CronJobM, error)
	FindByPage(offset int, limit int) (result []*model.CronJobM, 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) ICronJobMDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type IJobMDo

type IJobMDo interface {
	gen.SubQuery
	Debug() IJobMDo
	WithContext(ctx context.Context) IJobMDo
	WithResult(fc func(tx gen.Dao)) gen.ResultInfo
	ReplaceDB(db *gorm.DB)
	ReadDB() IJobMDo
	WriteDB() IJobMDo
	As(alias string) gen.Dao
	Session(config *gorm.Session) IJobMDo
	Columns(cols ...field.Expr) gen.Columns
	Clauses(conds ...clause.Expression) IJobMDo
	Not(conds ...gen.Condition) IJobMDo
	Or(conds ...gen.Condition) IJobMDo
	Select(conds ...field.Expr) IJobMDo
	Where(conds ...gen.Condition) IJobMDo
	Order(conds ...field.Expr) IJobMDo
	Distinct(cols ...field.Expr) IJobMDo
	Omit(cols ...field.Expr) IJobMDo
	Join(table schema.Tabler, on ...field.Expr) IJobMDo
	LeftJoin(table schema.Tabler, on ...field.Expr) IJobMDo
	RightJoin(table schema.Tabler, on ...field.Expr) IJobMDo
	Group(cols ...field.Expr) IJobMDo
	Having(conds ...gen.Condition) IJobMDo
	Limit(limit int) IJobMDo
	Offset(offset int) IJobMDo
	Count() (count int64, err error)
	Scopes(funcs ...func(gen.Dao) gen.Dao) IJobMDo
	Unscoped() IJobMDo
	Create(values ...*model.JobM) error
	CreateInBatches(values []*model.JobM, batchSize int) error
	Save(values ...*model.JobM) error
	First() (*model.JobM, error)
	Take() (*model.JobM, error)
	Last() (*model.JobM, error)
	Find() ([]*model.JobM, error)
	FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.JobM, err error)
	FindInBatches(result *[]*model.JobM, batchSize int, fc func(tx gen.Dao, batch int) error) error
	Pluck(column field.Expr, dest interface{}) error
	Delete(...*model.JobM) (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) IJobMDo
	Assign(attrs ...field.AssignExpr) IJobMDo
	Joins(fields ...field.RelationField) IJobMDo
	Preload(fields ...field.RelationField) IJobMDo
	FirstOrInit() (*model.JobM, error)
	FirstOrCreate() (*model.JobM, error)
	FindByPage(offset int, limit int) (result []*model.JobM, 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) IJobMDo
	UnderlyingDB() *gorm.DB
	schema.Tabler
}

type Query

type Query struct {
	CronJobM cronJobM
	JobM     jobM
	// contains filtered or unexported fields
}

func Use

func Use(db *gorm.DB, opts ...gen.DOOption) *Query

func (*Query) Available

func (q *Query) Available() bool

func (*Query) Begin

func (q *Query) Begin(opts ...*sql.TxOptions) *QueryTx

func (*Query) ReadDB

func (q *Query) ReadDB() *Query

func (*Query) ReplaceDB

func (q *Query) ReplaceDB(db *gorm.DB) *Query

func (*Query) Transaction

func (q *Query) Transaction(fc func(tx *Query) error, opts ...*sql.TxOptions) error

func (*Query) WithContext

func (q *Query) WithContext(ctx context.Context) *queryCtx

func (*Query) WriteDB

func (q *Query) WriteDB() *Query

type QueryTx

type QueryTx struct {
	*Query
	Error error
}

func (*QueryTx) Commit

func (q *QueryTx) Commit() error

func (*QueryTx) Rollback

func (q *QueryTx) Rollback() error

func (*QueryTx) RollbackTo

func (q *QueryTx) RollbackTo(name string) error

func (*QueryTx) SavePoint

func (q *QueryTx) SavePoint(name string) error

Jump to

Keyboard shortcuts

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