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