query

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Q               = new(Query)
	Collection      *collection
	CollectionVideo *collectionVideo
	Comment         *comment
	Favorite        *favorite
	Follow          *follow
	User            *user
	Video           *video
)

Functions

func SetDefault

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

Types

type ICollectionDo

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

type ICollectionVideoDo

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

type ICommentDo

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

type IFavoriteDo

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

type IFollowDo

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

type IUserDo

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

type IVideoDo

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

type Query

type Query struct {
	Collection      collection
	CollectionVideo collectionVideo
	Comment         comment
	Favorite        favorite
	Follow          follow
	User            user
	Video           video
	// 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