query

package
v0.0.0-...-3a3bdc2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Q               = new(Query)
	Article         *article
	ArticleCollect  *articleCollect
	ArticleFavorite *articleFavorite
	ArticleView     *articleView
	CommentFavorite *commentFavorite
	Follow          *follow
	User            *user
)

Functions

func SetDefault

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

Types

type IArticleCollectDo

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

type IArticleDo

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

type IArticleFavoriteDo

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

type IArticleViewDo

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

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

type Query struct {
	Article         article
	ArticleCollect  articleCollect
	ArticleFavorite articleFavorite
	ArticleView     articleView
	CommentFavorite commentFavorite
	Follow          follow
	User            user
	// 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