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