Documentation ¶
Index ¶
- Variables
- func SetDefault(db *gorm.DB, opts ...gen.DOOption)
- type IAdminDo
- type IAdminMenuDo
- type IAuthorizedAPIDo
- type IAuthorizedDo
- type ICategoryDo
- type ICronTaskDo
- type IMenuActionDo
- type IMenuDo
- type ISiteDo
- 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 ¶
View Source
var ( Q = new(Query) Admin *admin AdminMenu *adminMenu Authorized *authorized AuthorizedAPI *authorizedAPI Category *category CronTask *cronTask Menu *menu MenuAction *menuAction Site *site )
Functions ¶
Types ¶
type IAdminDo ¶
type IAdminDo interface { gen.SubQuery Debug() IAdminDo WithContext(ctx context.Context) IAdminDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IAdminDo WriteDB() IAdminDo As(alias string) gen.Dao Session(config *gorm.Session) IAdminDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IAdminDo Not(conds ...gen.Condition) IAdminDo Or(conds ...gen.Condition) IAdminDo Select(conds ...field.Expr) IAdminDo Where(conds ...gen.Condition) IAdminDo Order(conds ...field.Expr) IAdminDo Distinct(cols ...field.Expr) IAdminDo Omit(cols ...field.Expr) IAdminDo Join(table schema.Tabler, on ...field.Expr) IAdminDo LeftJoin(table schema.Tabler, on ...field.Expr) IAdminDo RightJoin(table schema.Tabler, on ...field.Expr) IAdminDo Group(cols ...field.Expr) IAdminDo Having(conds ...gen.Condition) IAdminDo Limit(limit int) IAdminDo Offset(offset int) IAdminDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IAdminDo Unscoped() IAdminDo Create(values ...*model.Admin) error CreateInBatches(values []*model.Admin, batchSize int) error Save(values ...*model.Admin) error First() (*model.Admin, error) Take() (*model.Admin, error) Last() (*model.Admin, error) Find() ([]*model.Admin, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Admin, err error) FindInBatches(result *[]*model.Admin, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Admin) (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) IAdminDo Assign(attrs ...field.AssignExpr) IAdminDo Joins(fields ...field.RelationField) IAdminDo Preload(fields ...field.RelationField) IAdminDo FirstOrInit() (*model.Admin, error) FirstOrCreate() (*model.Admin, error) FindByPage(offset int, limit int) (result []*model.Admin, 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) IAdminDo UnderlyingDB() *gorm.DB schema.Tabler }
type IAdminMenuDo ¶
type IAdminMenuDo interface { gen.SubQuery Debug() IAdminMenuDo WithContext(ctx context.Context) IAdminMenuDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IAdminMenuDo WriteDB() IAdminMenuDo As(alias string) gen.Dao Session(config *gorm.Session) IAdminMenuDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IAdminMenuDo Not(conds ...gen.Condition) IAdminMenuDo Or(conds ...gen.Condition) IAdminMenuDo Select(conds ...field.Expr) IAdminMenuDo Where(conds ...gen.Condition) IAdminMenuDo Order(conds ...field.Expr) IAdminMenuDo Distinct(cols ...field.Expr) IAdminMenuDo Omit(cols ...field.Expr) IAdminMenuDo Join(table schema.Tabler, on ...field.Expr) IAdminMenuDo LeftJoin(table schema.Tabler, on ...field.Expr) IAdminMenuDo RightJoin(table schema.Tabler, on ...field.Expr) IAdminMenuDo Group(cols ...field.Expr) IAdminMenuDo Having(conds ...gen.Condition) IAdminMenuDo Limit(limit int) IAdminMenuDo Offset(offset int) IAdminMenuDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IAdminMenuDo Unscoped() IAdminMenuDo Create(values ...*model.AdminMenu) error CreateInBatches(values []*model.AdminMenu, batchSize int) error Save(values ...*model.AdminMenu) error First() (*model.AdminMenu, error) Take() (*model.AdminMenu, error) Last() (*model.AdminMenu, error) Find() ([]*model.AdminMenu, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.AdminMenu, err error) FindInBatches(result *[]*model.AdminMenu, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.AdminMenu) (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) IAdminMenuDo Assign(attrs ...field.AssignExpr) IAdminMenuDo Joins(fields ...field.RelationField) IAdminMenuDo Preload(fields ...field.RelationField) IAdminMenuDo FirstOrInit() (*model.AdminMenu, error) FirstOrCreate() (*model.AdminMenu, error) FindByPage(offset int, limit int) (result []*model.AdminMenu, 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) IAdminMenuDo UnderlyingDB() *gorm.DB schema.Tabler }
type IAuthorizedAPIDo ¶
type IAuthorizedAPIDo interface { gen.SubQuery Debug() IAuthorizedAPIDo WithContext(ctx context.Context) IAuthorizedAPIDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IAuthorizedAPIDo WriteDB() IAuthorizedAPIDo As(alias string) gen.Dao Session(config *gorm.Session) IAuthorizedAPIDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IAuthorizedAPIDo Not(conds ...gen.Condition) IAuthorizedAPIDo Or(conds ...gen.Condition) IAuthorizedAPIDo Select(conds ...field.Expr) IAuthorizedAPIDo Where(conds ...gen.Condition) IAuthorizedAPIDo Order(conds ...field.Expr) IAuthorizedAPIDo Distinct(cols ...field.Expr) IAuthorizedAPIDo Omit(cols ...field.Expr) IAuthorizedAPIDo Join(table schema.Tabler, on ...field.Expr) IAuthorizedAPIDo LeftJoin(table schema.Tabler, on ...field.Expr) IAuthorizedAPIDo RightJoin(table schema.Tabler, on ...field.Expr) IAuthorizedAPIDo Group(cols ...field.Expr) IAuthorizedAPIDo Having(conds ...gen.Condition) IAuthorizedAPIDo Limit(limit int) IAuthorizedAPIDo Offset(offset int) IAuthorizedAPIDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IAuthorizedAPIDo Unscoped() IAuthorizedAPIDo Create(values ...*model.AuthorizedAPI) error CreateInBatches(values []*model.AuthorizedAPI, batchSize int) error Save(values ...*model.AuthorizedAPI) error First() (*model.AuthorizedAPI, error) Take() (*model.AuthorizedAPI, error) Last() (*model.AuthorizedAPI, error) Find() ([]*model.AuthorizedAPI, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.AuthorizedAPI, err error) FindInBatches(result *[]*model.AuthorizedAPI, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.AuthorizedAPI) (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) IAuthorizedAPIDo Assign(attrs ...field.AssignExpr) IAuthorizedAPIDo Joins(fields ...field.RelationField) IAuthorizedAPIDo Preload(fields ...field.RelationField) IAuthorizedAPIDo FirstOrInit() (*model.AuthorizedAPI, error) FirstOrCreate() (*model.AuthorizedAPI, error) FindByPage(offset int, limit int) (result []*model.AuthorizedAPI, 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) IAuthorizedAPIDo UnderlyingDB() *gorm.DB schema.Tabler }
type IAuthorizedDo ¶
type IAuthorizedDo interface { gen.SubQuery Debug() IAuthorizedDo WithContext(ctx context.Context) IAuthorizedDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IAuthorizedDo WriteDB() IAuthorizedDo As(alias string) gen.Dao Session(config *gorm.Session) IAuthorizedDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IAuthorizedDo Not(conds ...gen.Condition) IAuthorizedDo Or(conds ...gen.Condition) IAuthorizedDo Select(conds ...field.Expr) IAuthorizedDo Where(conds ...gen.Condition) IAuthorizedDo Order(conds ...field.Expr) IAuthorizedDo Distinct(cols ...field.Expr) IAuthorizedDo Omit(cols ...field.Expr) IAuthorizedDo Join(table schema.Tabler, on ...field.Expr) IAuthorizedDo LeftJoin(table schema.Tabler, on ...field.Expr) IAuthorizedDo RightJoin(table schema.Tabler, on ...field.Expr) IAuthorizedDo Group(cols ...field.Expr) IAuthorizedDo Having(conds ...gen.Condition) IAuthorizedDo Limit(limit int) IAuthorizedDo Offset(offset int) IAuthorizedDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IAuthorizedDo Unscoped() IAuthorizedDo Create(values ...*model.Authorized) error CreateInBatches(values []*model.Authorized, batchSize int) error Save(values ...*model.Authorized) error First() (*model.Authorized, error) Take() (*model.Authorized, error) Last() (*model.Authorized, error) Find() ([]*model.Authorized, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Authorized, err error) FindInBatches(result *[]*model.Authorized, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Authorized) (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) IAuthorizedDo Assign(attrs ...field.AssignExpr) IAuthorizedDo Joins(fields ...field.RelationField) IAuthorizedDo Preload(fields ...field.RelationField) IAuthorizedDo FirstOrInit() (*model.Authorized, error) FirstOrCreate() (*model.Authorized, error) FindByPage(offset int, limit int) (result []*model.Authorized, 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) IAuthorizedDo UnderlyingDB() *gorm.DB schema.Tabler }
type ICategoryDo ¶
type ICategoryDo interface { gen.SubQuery Debug() ICategoryDo WithContext(ctx context.Context) ICategoryDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() ICategoryDo WriteDB() ICategoryDo As(alias string) gen.Dao Session(config *gorm.Session) ICategoryDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) ICategoryDo Not(conds ...gen.Condition) ICategoryDo Or(conds ...gen.Condition) ICategoryDo Select(conds ...field.Expr) ICategoryDo Where(conds ...gen.Condition) ICategoryDo Order(conds ...field.Expr) ICategoryDo Distinct(cols ...field.Expr) ICategoryDo Omit(cols ...field.Expr) ICategoryDo Join(table schema.Tabler, on ...field.Expr) ICategoryDo LeftJoin(table schema.Tabler, on ...field.Expr) ICategoryDo RightJoin(table schema.Tabler, on ...field.Expr) ICategoryDo Group(cols ...field.Expr) ICategoryDo Having(conds ...gen.Condition) ICategoryDo Limit(limit int) ICategoryDo Offset(offset int) ICategoryDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) ICategoryDo Unscoped() ICategoryDo Create(values ...*model.Category) error CreateInBatches(values []*model.Category, batchSize int) error Save(values ...*model.Category) error First() (*model.Category, error) Take() (*model.Category, error) Last() (*model.Category, error) Find() ([]*model.Category, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Category, err error) FindInBatches(result *[]*model.Category, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Category) (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) ICategoryDo Assign(attrs ...field.AssignExpr) ICategoryDo Joins(fields ...field.RelationField) ICategoryDo Preload(fields ...field.RelationField) ICategoryDo FirstOrInit() (*model.Category, error) FirstOrCreate() (*model.Category, error) FindByPage(offset int, limit int) (result []*model.Category, 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) ICategoryDo UnderlyingDB() *gorm.DB schema.Tabler GetParentIdsByGroupParentId() (result map[string]interface{}, err error) }
type ICronTaskDo ¶
type ICronTaskDo interface { gen.SubQuery Debug() ICronTaskDo WithContext(ctx context.Context) ICronTaskDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() ICronTaskDo WriteDB() ICronTaskDo As(alias string) gen.Dao Session(config *gorm.Session) ICronTaskDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) ICronTaskDo Not(conds ...gen.Condition) ICronTaskDo Or(conds ...gen.Condition) ICronTaskDo Select(conds ...field.Expr) ICronTaskDo Where(conds ...gen.Condition) ICronTaskDo Order(conds ...field.Expr) ICronTaskDo Distinct(cols ...field.Expr) ICronTaskDo Omit(cols ...field.Expr) ICronTaskDo Join(table schema.Tabler, on ...field.Expr) ICronTaskDo LeftJoin(table schema.Tabler, on ...field.Expr) ICronTaskDo RightJoin(table schema.Tabler, on ...field.Expr) ICronTaskDo Group(cols ...field.Expr) ICronTaskDo Having(conds ...gen.Condition) ICronTaskDo Limit(limit int) ICronTaskDo Offset(offset int) ICronTaskDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) ICronTaskDo Unscoped() ICronTaskDo Create(values ...*model.CronTask) error CreateInBatches(values []*model.CronTask, batchSize int) error Save(values ...*model.CronTask) error First() (*model.CronTask, error) Take() (*model.CronTask, error) Last() (*model.CronTask, error) Find() ([]*model.CronTask, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.CronTask, err error) FindInBatches(result *[]*model.CronTask, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.CronTask) (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) ICronTaskDo Assign(attrs ...field.AssignExpr) ICronTaskDo Joins(fields ...field.RelationField) ICronTaskDo Preload(fields ...field.RelationField) ICronTaskDo FirstOrInit() (*model.CronTask, error) FirstOrCreate() (*model.CronTask, error) FindByPage(offset int, limit int) (result []*model.CronTask, 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) ICronTaskDo UnderlyingDB() *gorm.DB schema.Tabler }
type IMenuActionDo ¶
type IMenuActionDo interface { gen.SubQuery Debug() IMenuActionDo WithContext(ctx context.Context) IMenuActionDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IMenuActionDo WriteDB() IMenuActionDo As(alias string) gen.Dao Session(config *gorm.Session) IMenuActionDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IMenuActionDo Not(conds ...gen.Condition) IMenuActionDo Or(conds ...gen.Condition) IMenuActionDo Select(conds ...field.Expr) IMenuActionDo Where(conds ...gen.Condition) IMenuActionDo Order(conds ...field.Expr) IMenuActionDo Distinct(cols ...field.Expr) IMenuActionDo Omit(cols ...field.Expr) IMenuActionDo Join(table schema.Tabler, on ...field.Expr) IMenuActionDo LeftJoin(table schema.Tabler, on ...field.Expr) IMenuActionDo RightJoin(table schema.Tabler, on ...field.Expr) IMenuActionDo Group(cols ...field.Expr) IMenuActionDo Having(conds ...gen.Condition) IMenuActionDo Limit(limit int) IMenuActionDo Offset(offset int) IMenuActionDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IMenuActionDo Unscoped() IMenuActionDo Create(values ...*model.MenuAction) error CreateInBatches(values []*model.MenuAction, batchSize int) error Save(values ...*model.MenuAction) error First() (*model.MenuAction, error) Take() (*model.MenuAction, error) Last() (*model.MenuAction, error) Find() ([]*model.MenuAction, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.MenuAction, err error) FindInBatches(result *[]*model.MenuAction, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.MenuAction) (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) IMenuActionDo Assign(attrs ...field.AssignExpr) IMenuActionDo Joins(fields ...field.RelationField) IMenuActionDo Preload(fields ...field.RelationField) IMenuActionDo FirstOrInit() (*model.MenuAction, error) FirstOrCreate() (*model.MenuAction, error) FindByPage(offset int, limit int) (result []*model.MenuAction, 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) IMenuActionDo UnderlyingDB() *gorm.DB schema.Tabler }
type IMenuDo ¶
type IMenuDo interface { gen.SubQuery Debug() IMenuDo WithContext(ctx context.Context) IMenuDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() IMenuDo WriteDB() IMenuDo As(alias string) gen.Dao Session(config *gorm.Session) IMenuDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) IMenuDo Not(conds ...gen.Condition) IMenuDo Or(conds ...gen.Condition) IMenuDo Select(conds ...field.Expr) IMenuDo Where(conds ...gen.Condition) IMenuDo Order(conds ...field.Expr) IMenuDo Distinct(cols ...field.Expr) IMenuDo Omit(cols ...field.Expr) IMenuDo Join(table schema.Tabler, on ...field.Expr) IMenuDo LeftJoin(table schema.Tabler, on ...field.Expr) IMenuDo RightJoin(table schema.Tabler, on ...field.Expr) IMenuDo Group(cols ...field.Expr) IMenuDo Having(conds ...gen.Condition) IMenuDo Limit(limit int) IMenuDo Offset(offset int) IMenuDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) IMenuDo Unscoped() IMenuDo Create(values ...*model.Menu) error CreateInBatches(values []*model.Menu, batchSize int) error Save(values ...*model.Menu) error First() (*model.Menu, error) Take() (*model.Menu, error) Last() (*model.Menu, error) Find() ([]*model.Menu, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Menu, err error) FindInBatches(result *[]*model.Menu, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Menu) (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) IMenuDo Assign(attrs ...field.AssignExpr) IMenuDo Joins(fields ...field.RelationField) IMenuDo Preload(fields ...field.RelationField) IMenuDo FirstOrInit() (*model.Menu, error) FirstOrCreate() (*model.Menu, error) FindByPage(offset int, limit int) (result []*model.Menu, 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) IMenuDo UnderlyingDB() *gorm.DB schema.Tabler }
type ISiteDo ¶
type ISiteDo interface { gen.SubQuery Debug() ISiteDo WithContext(ctx context.Context) ISiteDo WithResult(fc func(tx gen.Dao)) gen.ResultInfo ReplaceDB(db *gorm.DB) ReadDB() ISiteDo WriteDB() ISiteDo As(alias string) gen.Dao Session(config *gorm.Session) ISiteDo Columns(cols ...field.Expr) gen.Columns Clauses(conds ...clause.Expression) ISiteDo Not(conds ...gen.Condition) ISiteDo Or(conds ...gen.Condition) ISiteDo Select(conds ...field.Expr) ISiteDo Where(conds ...gen.Condition) ISiteDo Order(conds ...field.Expr) ISiteDo Distinct(cols ...field.Expr) ISiteDo Omit(cols ...field.Expr) ISiteDo Join(table schema.Tabler, on ...field.Expr) ISiteDo LeftJoin(table schema.Tabler, on ...field.Expr) ISiteDo RightJoin(table schema.Tabler, on ...field.Expr) ISiteDo Group(cols ...field.Expr) ISiteDo Having(conds ...gen.Condition) ISiteDo Limit(limit int) ISiteDo Offset(offset int) ISiteDo Count() (count int64, err error) Scopes(funcs ...func(gen.Dao) gen.Dao) ISiteDo Unscoped() ISiteDo Create(values ...*model.Site) error CreateInBatches(values []*model.Site, batchSize int) error Save(values ...*model.Site) error First() (*model.Site, error) Take() (*model.Site, error) Last() (*model.Site, error) Find() ([]*model.Site, error) FindInBatch(batchSize int, fc func(tx gen.Dao, batch int) error) (results []*model.Site, err error) FindInBatches(result *[]*model.Site, batchSize int, fc func(tx gen.Dao, batch int) error) error Pluck(column field.Expr, dest interface{}) error Delete(...*model.Site) (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) ISiteDo Assign(attrs ...field.AssignExpr) ISiteDo Joins(fields ...field.RelationField) ISiteDo Preload(fields ...field.RelationField) ISiteDo FirstOrInit() (*model.Site, error) FirstOrCreate() (*model.Site, error) FindByPage(offset int, limit int) (result []*model.Site, 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) ISiteDo UnderlyingDB() *gorm.DB schema.Tabler }
type Query ¶
type Query struct { Admin admin AdminMenu adminMenu Authorized authorized AuthorizedAPI authorizedAPI Category category CronTask cronTask Menu menu MenuAction menuAction Site site // 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.