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