query

package
v0.0.0-...-066287a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Q              = new(Query)
	Account        *account
	Collection     *collection
	Comment        *comment
	File           *file
	Follow         *follow
	GooseDbVersion *gooseDbVersion
	Interaction    *interaction
	Template       *template
	User           *user
	UserCollect    *userCollect
	UserLike       *userLike
	Video          *video
)

Functions

func SetDefault

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

Types

type IAccountDo

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

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 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 IFileDo

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

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

type IInteractionDo

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

type ITemplateDo

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

type IUserCollectDo

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

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