query

package
v0.0.0-...-1b2adb6 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Q             = new(Query)
	ScreenDatum   *screenDatum
	ScreenProject *screenProject
)

Functions

func SetDefault

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

Types

type IScreenDatumDo

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

type IScreenProjectDo

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

type Query

type Query struct {
	ScreenDatum   screenDatum
	ScreenProject screenProject
	// 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