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