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