Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AccountUser
- type AccountUserClient
- func (c *AccountUserClient) Create() *AccountUserCreate
- func (c *AccountUserClient) CreateBulk(builders ...*AccountUserCreate) *AccountUserCreateBulk
- func (c *AccountUserClient) Delete() *AccountUserDelete
- func (c *AccountUserClient) DeleteOne(au *AccountUser) *AccountUserDeleteOne
- func (c *AccountUserClient) DeleteOneID(id uint32) *AccountUserDeleteOne
- func (c *AccountUserClient) Get(ctx context.Context, id uint32) (*AccountUser, error)
- func (c *AccountUserClient) GetX(ctx context.Context, id uint32) *AccountUser
- func (c *AccountUserClient) Hooks() []Hook
- func (c *AccountUserClient) Intercept(interceptors ...Interceptor)
- func (c *AccountUserClient) Interceptors() []Interceptor
- func (c *AccountUserClient) Query() *AccountUserQuery
- func (c *AccountUserClient) Update() *AccountUserUpdate
- func (c *AccountUserClient) UpdateOne(au *AccountUser) *AccountUserUpdateOne
- func (c *AccountUserClient) UpdateOneID(id uint32) *AccountUserUpdateOne
- func (c *AccountUserClient) Use(hooks ...Hook)
- type AccountUserCreate
- func (auc *AccountUserCreate) Exec(ctx context.Context) error
- func (auc *AccountUserCreate) ExecX(ctx context.Context)
- func (auc *AccountUserCreate) Mutation() *AccountUserMutation
- func (auc *AccountUserCreate) OnConflict(opts ...sql.ConflictOption) *AccountUserUpsertOne
- func (auc *AccountUserCreate) OnConflictColumns(columns ...string) *AccountUserUpsertOne
- func (auc *AccountUserCreate) Save(ctx context.Context) (*AccountUser, error)
- func (auc *AccountUserCreate) SaveX(ctx context.Context) *AccountUser
- func (auc *AccountUserCreate) SetCreateAt(i int64) *AccountUserCreate
- func (auc *AccountUserCreate) SetCreateIPAt(s string) *AccountUserCreate
- func (auc *AccountUserCreate) SetEmail(s string) *AccountUserCreate
- func (auc *AccountUserCreate) SetID(u uint32) *AccountUserCreate
- func (auc *AccountUserCreate) SetLastLoginAt(i int64) *AccountUserCreate
- func (auc *AccountUserCreate) SetLastLoginIPAt(s string) *AccountUserCreate
- func (auc *AccountUserCreate) SetLoginTimes(i int64) *AccountUserCreate
- func (auc *AccountUserCreate) SetNillableCreateAt(i *int64) *AccountUserCreate
- func (auc *AccountUserCreate) SetNillableCreateIPAt(s *string) *AccountUserCreate
- func (auc *AccountUserCreate) SetNillableEmail(s *string) *AccountUserCreate
- func (auc *AccountUserCreate) SetNillableLastLoginAt(i *int64) *AccountUserCreate
- func (auc *AccountUserCreate) SetNillableLastLoginIPAt(s *string) *AccountUserCreate
- func (auc *AccountUserCreate) SetNillableLoginTimes(i *int64) *AccountUserCreate
- func (auc *AccountUserCreate) SetNillablePassword(s *string) *AccountUserCreate
- func (auc *AccountUserCreate) SetNillablePhone(s *string) *AccountUserCreate
- func (auc *AccountUserCreate) SetNillableStatus(i *int8) *AccountUserCreate
- func (auc *AccountUserCreate) SetNillableUsername(s *string) *AccountUserCreate
- func (auc *AccountUserCreate) SetPassword(s string) *AccountUserCreate
- func (auc *AccountUserCreate) SetPhone(s string) *AccountUserCreate
- func (auc *AccountUserCreate) SetStatus(i int8) *AccountUserCreate
- func (auc *AccountUserCreate) SetUsername(s string) *AccountUserCreate
- type AccountUserCreateBulk
- func (aucb *AccountUserCreateBulk) Exec(ctx context.Context) error
- func (aucb *AccountUserCreateBulk) ExecX(ctx context.Context)
- func (aucb *AccountUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccountUserUpsertBulk
- func (aucb *AccountUserCreateBulk) OnConflictColumns(columns ...string) *AccountUserUpsertBulk
- func (aucb *AccountUserCreateBulk) Save(ctx context.Context) ([]*AccountUser, error)
- func (aucb *AccountUserCreateBulk) SaveX(ctx context.Context) []*AccountUser
- type AccountUserDelete
- type AccountUserDeleteOne
- type AccountUserFilter
- func (f *AccountUserFilter) Where(p entql.P)
- func (f *AccountUserFilter) WhereCreateAt(p entql.Int64P)
- func (f *AccountUserFilter) WhereCreateIPAt(p entql.StringP)
- func (f *AccountUserFilter) WhereEmail(p entql.StringP)
- func (f *AccountUserFilter) WhereID(p entql.Uint32P)
- func (f *AccountUserFilter) WhereLastLoginAt(p entql.Int64P)
- func (f *AccountUserFilter) WhereLastLoginIPAt(p entql.StringP)
- func (f *AccountUserFilter) WhereLoginTimes(p entql.Int64P)
- func (f *AccountUserFilter) WherePassword(p entql.StringP)
- func (f *AccountUserFilter) WherePhone(p entql.StringP)
- func (f *AccountUserFilter) WhereStatus(p entql.Int8P)
- func (f *AccountUserFilter) WhereUsername(p entql.StringP)
- type AccountUserGroupBy
- func (augb *AccountUserGroupBy) Aggregate(fns ...AggregateFunc) *AccountUserGroupBy
- func (s *AccountUserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountUserGroupBy) BoolX(ctx context.Context) bool
- func (s *AccountUserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountUserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AccountUserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountUserGroupBy) Float64X(ctx context.Context) float64
- func (s *AccountUserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountUserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AccountUserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AccountUserGroupBy) IntX(ctx context.Context) int
- func (s *AccountUserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AccountUserGroupBy) IntsX(ctx context.Context) []int
- func (augb *AccountUserGroupBy) Scan(ctx context.Context, v any) error
- func (s *AccountUserGroupBy) ScanX(ctx context.Context, v any)
- func (s *AccountUserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AccountUserGroupBy) StringX(ctx context.Context) string
- func (s *AccountUserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AccountUserGroupBy) StringsX(ctx context.Context) []string
- type AccountUserMutation
- func (m *AccountUserMutation) AddCreateAt(i int64)
- func (m *AccountUserMutation) AddField(name string, value ent.Value) error
- func (m *AccountUserMutation) AddLastLoginAt(i int64)
- func (m *AccountUserMutation) AddLoginTimes(i int64)
- func (m *AccountUserMutation) AddStatus(i int8)
- func (m *AccountUserMutation) AddedCreateAt() (r int64, exists bool)
- func (m *AccountUserMutation) AddedEdges() []string
- func (m *AccountUserMutation) AddedField(name string) (ent.Value, bool)
- func (m *AccountUserMutation) AddedFields() []string
- func (m *AccountUserMutation) AddedIDs(name string) []ent.Value
- func (m *AccountUserMutation) AddedLastLoginAt() (r int64, exists bool)
- func (m *AccountUserMutation) AddedLoginTimes() (r int64, exists bool)
- func (m *AccountUserMutation) AddedStatus() (r int8, exists bool)
- func (m *AccountUserMutation) ClearEdge(name string) error
- func (m *AccountUserMutation) ClearEmail()
- func (m *AccountUserMutation) ClearField(name string) error
- func (m *AccountUserMutation) ClearPassword()
- func (m *AccountUserMutation) ClearPhone()
- func (m *AccountUserMutation) ClearUsername()
- func (m *AccountUserMutation) ClearedEdges() []string
- func (m *AccountUserMutation) ClearedFields() []string
- func (m AccountUserMutation) Client() *Client
- func (m *AccountUserMutation) CreateAt() (r int64, exists bool)
- func (m *AccountUserMutation) CreateIPAt() (r string, exists bool)
- func (m *AccountUserMutation) EdgeCleared(name string) bool
- func (m *AccountUserMutation) Email() (r string, exists bool)
- func (m *AccountUserMutation) EmailCleared() bool
- func (m *AccountUserMutation) Field(name string) (ent.Value, bool)
- func (m *AccountUserMutation) FieldCleared(name string) bool
- func (m *AccountUserMutation) Fields() []string
- func (m *AccountUserMutation) Filter() *AccountUserFilter
- func (m *AccountUserMutation) ID() (id uint32, exists bool)
- func (m *AccountUserMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *AccountUserMutation) LastLoginAt() (r int64, exists bool)
- func (m *AccountUserMutation) LastLoginIPAt() (r string, exists bool)
- func (m *AccountUserMutation) LoginTimes() (r int64, exists bool)
- func (m *AccountUserMutation) OldCreateAt(ctx context.Context) (v int64, err error)
- func (m *AccountUserMutation) OldCreateIPAt(ctx context.Context) (v string, err error)
- func (m *AccountUserMutation) OldEmail(ctx context.Context) (v *string, err error)
- func (m *AccountUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AccountUserMutation) OldLastLoginAt(ctx context.Context) (v int64, err error)
- func (m *AccountUserMutation) OldLastLoginIPAt(ctx context.Context) (v string, err error)
- func (m *AccountUserMutation) OldLoginTimes(ctx context.Context) (v int64, err error)
- func (m *AccountUserMutation) OldPassword(ctx context.Context) (v *string, err error)
- func (m *AccountUserMutation) OldPhone(ctx context.Context) (v *string, err error)
- func (m *AccountUserMutation) OldStatus(ctx context.Context) (v int8, err error)
- func (m *AccountUserMutation) OldUsername(ctx context.Context) (v *string, err error)
- func (m *AccountUserMutation) Op() Op
- func (m *AccountUserMutation) Password() (r string, exists bool)
- func (m *AccountUserMutation) PasswordCleared() bool
- func (m *AccountUserMutation) Phone() (r string, exists bool)
- func (m *AccountUserMutation) PhoneCleared() bool
- func (m *AccountUserMutation) RemovedEdges() []string
- func (m *AccountUserMutation) RemovedIDs(name string) []ent.Value
- func (m *AccountUserMutation) ResetCreateAt()
- func (m *AccountUserMutation) ResetCreateIPAt()
- func (m *AccountUserMutation) ResetEdge(name string) error
- func (m *AccountUserMutation) ResetEmail()
- func (m *AccountUserMutation) ResetField(name string) error
- func (m *AccountUserMutation) ResetLastLoginAt()
- func (m *AccountUserMutation) ResetLastLoginIPAt()
- func (m *AccountUserMutation) ResetLoginTimes()
- func (m *AccountUserMutation) ResetPassword()
- func (m *AccountUserMutation) ResetPhone()
- func (m *AccountUserMutation) ResetStatus()
- func (m *AccountUserMutation) ResetUsername()
- func (m *AccountUserMutation) SetCreateAt(i int64)
- func (m *AccountUserMutation) SetCreateIPAt(s string)
- func (m *AccountUserMutation) SetEmail(s string)
- func (m *AccountUserMutation) SetField(name string, value ent.Value) error
- func (m *AccountUserMutation) SetID(id uint32)
- func (m *AccountUserMutation) SetLastLoginAt(i int64)
- func (m *AccountUserMutation) SetLastLoginIPAt(s string)
- func (m *AccountUserMutation) SetLoginTimes(i int64)
- func (m *AccountUserMutation) SetOp(op Op)
- func (m *AccountUserMutation) SetPassword(s string)
- func (m *AccountUserMutation) SetPhone(s string)
- func (m *AccountUserMutation) SetStatus(i int8)
- func (m *AccountUserMutation) SetUsername(s string)
- func (m *AccountUserMutation) Status() (r int8, exists bool)
- func (m AccountUserMutation) Tx() (*Tx, error)
- func (m *AccountUserMutation) Type() string
- func (m *AccountUserMutation) Username() (r string, exists bool)
- func (m *AccountUserMutation) UsernameCleared() bool
- func (m *AccountUserMutation) Where(ps ...predicate.AccountUser)
- func (m *AccountUserMutation) WhereP(ps ...func(*sql.Selector))
- type AccountUserQuery
- func (auq *AccountUserQuery) Aggregate(fns ...AggregateFunc) *AccountUserSelect
- func (auq *AccountUserQuery) All(ctx context.Context) ([]*AccountUser, error)
- func (auq *AccountUserQuery) AllX(ctx context.Context) []*AccountUser
- func (auq *AccountUserQuery) Clone() *AccountUserQuery
- func (auq *AccountUserQuery) Count(ctx context.Context) (int, error)
- func (auq *AccountUserQuery) CountX(ctx context.Context) int
- func (auq *AccountUserQuery) Exist(ctx context.Context) (bool, error)
- func (auq *AccountUserQuery) ExistX(ctx context.Context) bool
- func (auq *AccountUserQuery) Filter() *AccountUserFilter
- func (auq *AccountUserQuery) First(ctx context.Context) (*AccountUser, error)
- func (auq *AccountUserQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (auq *AccountUserQuery) FirstIDX(ctx context.Context) uint32
- func (auq *AccountUserQuery) FirstX(ctx context.Context) *AccountUser
- func (auq *AccountUserQuery) GroupBy(field string, fields ...string) *AccountUserGroupBy
- func (auq *AccountUserQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (auq *AccountUserQuery) IDsX(ctx context.Context) []uint32
- func (auq *AccountUserQuery) Limit(limit int) *AccountUserQuery
- func (auq *AccountUserQuery) Modify(modifiers ...func(s *sql.Selector)) *AccountUserSelect
- func (auq *AccountUserQuery) Offset(offset int) *AccountUserQuery
- func (auq *AccountUserQuery) Only(ctx context.Context) (*AccountUser, error)
- func (auq *AccountUserQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (auq *AccountUserQuery) OnlyIDX(ctx context.Context) uint32
- func (auq *AccountUserQuery) OnlyX(ctx context.Context) *AccountUser
- func (auq *AccountUserQuery) Order(o ...OrderFunc) *AccountUserQuery
- func (auq *AccountUserQuery) Select(fields ...string) *AccountUserSelect
- func (auq *AccountUserQuery) Unique(unique bool) *AccountUserQuery
- func (auq *AccountUserQuery) Where(ps ...predicate.AccountUser) *AccountUserQuery
- type AccountUserSelect
- func (aus *AccountUserSelect) Aggregate(fns ...AggregateFunc) *AccountUserSelect
- func (s *AccountUserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccountUserSelect) BoolX(ctx context.Context) bool
- func (s *AccountUserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AccountUserSelect) BoolsX(ctx context.Context) []bool
- func (s *AccountUserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccountUserSelect) Float64X(ctx context.Context) float64
- func (s *AccountUserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccountUserSelect) Float64sX(ctx context.Context) []float64
- func (s *AccountUserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AccountUserSelect) IntX(ctx context.Context) int
- func (s *AccountUserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AccountUserSelect) IntsX(ctx context.Context) []int
- func (aus *AccountUserSelect) Modify(modifiers ...func(s *sql.Selector)) *AccountUserSelect
- func (aus *AccountUserSelect) Scan(ctx context.Context, v any) error
- func (s *AccountUserSelect) ScanX(ctx context.Context, v any)
- func (s *AccountUserSelect) String(ctx context.Context) (_ string, err error)
- func (s *AccountUserSelect) StringX(ctx context.Context) string
- func (s *AccountUserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AccountUserSelect) StringsX(ctx context.Context) []string
- type AccountUserUpdate
- func (auu *AccountUserUpdate) AddCreateAt(i int64) *AccountUserUpdate
- func (auu *AccountUserUpdate) AddLastLoginAt(i int64) *AccountUserUpdate
- func (auu *AccountUserUpdate) AddLoginTimes(i int64) *AccountUserUpdate
- func (auu *AccountUserUpdate) AddStatus(i int8) *AccountUserUpdate
- func (auu *AccountUserUpdate) ClearEmail() *AccountUserUpdate
- func (auu *AccountUserUpdate) ClearPassword() *AccountUserUpdate
- func (auu *AccountUserUpdate) ClearPhone() *AccountUserUpdate
- func (auu *AccountUserUpdate) ClearUsername() *AccountUserUpdate
- func (auu *AccountUserUpdate) Exec(ctx context.Context) error
- func (auu *AccountUserUpdate) ExecX(ctx context.Context)
- func (auu *AccountUserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUserUpdate
- func (auu *AccountUserUpdate) Mutation() *AccountUserMutation
- func (auu *AccountUserUpdate) Save(ctx context.Context) (int, error)
- func (auu *AccountUserUpdate) SaveX(ctx context.Context) int
- func (auu *AccountUserUpdate) SetCreateAt(i int64) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetCreateIPAt(s string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetEmail(s string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetLastLoginAt(i int64) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetLastLoginIPAt(s string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetLoginTimes(i int64) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetNillableCreateAt(i *int64) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetNillableCreateIPAt(s *string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetNillableEmail(s *string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetNillableLastLoginAt(i *int64) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetNillableLastLoginIPAt(s *string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetNillableLoginTimes(i *int64) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetNillablePassword(s *string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetNillablePhone(s *string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetNillableStatus(i *int8) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetNillableUsername(s *string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetPassword(s string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetPhone(s string) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetStatus(i int8) *AccountUserUpdate
- func (auu *AccountUserUpdate) SetUsername(s string) *AccountUserUpdate
- func (auu *AccountUserUpdate) Where(ps ...predicate.AccountUser) *AccountUserUpdate
- type AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) AddCreateAt(i int64) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) AddLastLoginAt(i int64) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) AddLoginTimes(i int64) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) AddStatus(i int8) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) ClearEmail() *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) ClearPassword() *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) ClearPhone() *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) ClearUsername() *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) Exec(ctx context.Context) error
- func (auuo *AccountUserUpdateOne) ExecX(ctx context.Context)
- func (auuo *AccountUserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) Mutation() *AccountUserMutation
- func (auuo *AccountUserUpdateOne) Save(ctx context.Context) (*AccountUser, error)
- func (auuo *AccountUserUpdateOne) SaveX(ctx context.Context) *AccountUser
- func (auuo *AccountUserUpdateOne) Select(field string, fields ...string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetCreateAt(i int64) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetCreateIPAt(s string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetEmail(s string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetLastLoginAt(i int64) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetLastLoginIPAt(s string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetLoginTimes(i int64) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetNillableCreateAt(i *int64) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetNillableCreateIPAt(s *string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetNillableEmail(s *string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetNillableLastLoginAt(i *int64) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetNillableLastLoginIPAt(s *string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetNillableLoginTimes(i *int64) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetNillablePassword(s *string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetNillablePhone(s *string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetNillableStatus(i *int8) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetNillableUsername(s *string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetPassword(s string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetPhone(s string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetStatus(i int8) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) SetUsername(s string) *AccountUserUpdateOne
- func (auuo *AccountUserUpdateOne) Where(ps ...predicate.AccountUser) *AccountUserUpdateOne
- type AccountUserUpsert
- func (u *AccountUserUpsert) AddCreateAt(v int64) *AccountUserUpsert
- func (u *AccountUserUpsert) AddLastLoginAt(v int64) *AccountUserUpsert
- func (u *AccountUserUpsert) AddLoginTimes(v int64) *AccountUserUpsert
- func (u *AccountUserUpsert) AddStatus(v int8) *AccountUserUpsert
- func (u *AccountUserUpsert) ClearEmail() *AccountUserUpsert
- func (u *AccountUserUpsert) ClearPassword() *AccountUserUpsert
- func (u *AccountUserUpsert) ClearPhone() *AccountUserUpsert
- func (u *AccountUserUpsert) ClearUsername() *AccountUserUpsert
- func (u *AccountUserUpsert) SetCreateAt(v int64) *AccountUserUpsert
- func (u *AccountUserUpsert) SetCreateIPAt(v string) *AccountUserUpsert
- func (u *AccountUserUpsert) SetEmail(v string) *AccountUserUpsert
- func (u *AccountUserUpsert) SetLastLoginAt(v int64) *AccountUserUpsert
- func (u *AccountUserUpsert) SetLastLoginIPAt(v string) *AccountUserUpsert
- func (u *AccountUserUpsert) SetLoginTimes(v int64) *AccountUserUpsert
- func (u *AccountUserUpsert) SetPassword(v string) *AccountUserUpsert
- func (u *AccountUserUpsert) SetPhone(v string) *AccountUserUpsert
- func (u *AccountUserUpsert) SetStatus(v int8) *AccountUserUpsert
- func (u *AccountUserUpsert) SetUsername(v string) *AccountUserUpsert
- func (u *AccountUserUpsert) UpdateCreateAt() *AccountUserUpsert
- func (u *AccountUserUpsert) UpdateCreateIPAt() *AccountUserUpsert
- func (u *AccountUserUpsert) UpdateEmail() *AccountUserUpsert
- func (u *AccountUserUpsert) UpdateLastLoginAt() *AccountUserUpsert
- func (u *AccountUserUpsert) UpdateLastLoginIPAt() *AccountUserUpsert
- func (u *AccountUserUpsert) UpdateLoginTimes() *AccountUserUpsert
- func (u *AccountUserUpsert) UpdatePassword() *AccountUserUpsert
- func (u *AccountUserUpsert) UpdatePhone() *AccountUserUpsert
- func (u *AccountUserUpsert) UpdateStatus() *AccountUserUpsert
- func (u *AccountUserUpsert) UpdateUsername() *AccountUserUpsert
- type AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) AddCreateAt(v int64) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) AddLastLoginAt(v int64) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) AddLoginTimes(v int64) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) AddStatus(v int8) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) ClearEmail() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) ClearPassword() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) ClearPhone() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) ClearUsername() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) DoNothing() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) Exec(ctx context.Context) error
- func (u *AccountUserUpsertBulk) ExecX(ctx context.Context)
- func (u *AccountUserUpsertBulk) Ignore() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) SetCreateAt(v int64) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) SetCreateIPAt(v string) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) SetEmail(v string) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) SetLastLoginAt(v int64) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) SetLastLoginIPAt(v string) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) SetLoginTimes(v int64) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) SetPassword(v string) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) SetPhone(v string) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) SetStatus(v int8) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) SetUsername(v string) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) Update(set func(*AccountUserUpsert)) *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdateCreateAt() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdateCreateIPAt() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdateEmail() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdateLastLoginAt() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdateLastLoginIPAt() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdateLoginTimes() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdateNewValues() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdatePassword() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdatePhone() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdateStatus() *AccountUserUpsertBulk
- func (u *AccountUserUpsertBulk) UpdateUsername() *AccountUserUpsertBulk
- type AccountUserUpsertOne
- func (u *AccountUserUpsertOne) AddCreateAt(v int64) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) AddLastLoginAt(v int64) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) AddLoginTimes(v int64) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) AddStatus(v int8) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) ClearEmail() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) ClearPassword() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) ClearPhone() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) ClearUsername() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) DoNothing() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) Exec(ctx context.Context) error
- func (u *AccountUserUpsertOne) ExecX(ctx context.Context)
- func (u *AccountUserUpsertOne) ID(ctx context.Context) (id uint32, err error)
- func (u *AccountUserUpsertOne) IDX(ctx context.Context) uint32
- func (u *AccountUserUpsertOne) Ignore() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) SetCreateAt(v int64) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) SetCreateIPAt(v string) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) SetEmail(v string) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) SetLastLoginAt(v int64) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) SetLastLoginIPAt(v string) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) SetLoginTimes(v int64) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) SetPassword(v string) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) SetPhone(v string) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) SetStatus(v int8) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) SetUsername(v string) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) Update(set func(*AccountUserUpsert)) *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdateCreateAt() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdateCreateIPAt() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdateEmail() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdateLastLoginAt() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdateLastLoginIPAt() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdateLoginTimes() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdateNewValues() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdatePassword() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdatePhone() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdateStatus() *AccountUserUpsertOne
- func (u *AccountUserUpsertOne) UpdateUsername() *AccountUserUpsertOne
- type AccountUsers
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAccountUser = "AccountUser" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AccountUser ¶
type AccountUser struct { // ID of the ent. // 自增id ID uint32 `json:"id,omitempty"` // 用户名 Username *string `json:"username,omitempty"` // 手机号 Phone *string `json:"phone,omitempty"` // 邮箱 Email *string `json:"email,omitempty"` // 密码 Password *string `json:"password,omitempty"` // 创建时间 CreateAt int64 `json:"create_at,omitempty"` // 创建ip CreateIPAt string `json:"create_ip_at,omitempty"` // 最后一次登录时间 LastLoginAt int64 `json:"last_login_at,omitempty"` // 最后一次登录ip LastLoginIPAt string `json:"last_login_ip_at,omitempty"` // 登录次数 LoginTimes int64 `json:"login_times,omitempty"` // 状态 0:禁用 1:启用 -1:删除 Status int8 `json:"status,omitempty"` // contains filtered or unexported fields }
AccountUser is the model entity for the AccountUser schema.
func (*AccountUser) String ¶
func (au *AccountUser) String() string
String implements the fmt.Stringer.
func (*AccountUser) Unwrap ¶
func (au *AccountUser) Unwrap() *AccountUser
Unwrap unwraps the AccountUser entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*AccountUser) Update ¶
func (au *AccountUser) Update() *AccountUserUpdateOne
Update returns a builder for updating this AccountUser. Note that you need to call AccountUser.Unwrap() before calling this method if this AccountUser was returned from a transaction, and the transaction was committed or rolled back.
type AccountUserClient ¶
type AccountUserClient struct {
// contains filtered or unexported fields
}
AccountUserClient is a client for the AccountUser schema.
func NewAccountUserClient ¶
func NewAccountUserClient(c config) *AccountUserClient
NewAccountUserClient returns a client for the AccountUser from the given config.
func (*AccountUserClient) Create ¶
func (c *AccountUserClient) Create() *AccountUserCreate
Create returns a builder for creating a AccountUser entity.
func (*AccountUserClient) CreateBulk ¶
func (c *AccountUserClient) CreateBulk(builders ...*AccountUserCreate) *AccountUserCreateBulk
CreateBulk returns a builder for creating a bulk of AccountUser entities.
func (*AccountUserClient) Delete ¶
func (c *AccountUserClient) Delete() *AccountUserDelete
Delete returns a delete builder for AccountUser.
func (*AccountUserClient) DeleteOne ¶
func (c *AccountUserClient) DeleteOne(au *AccountUser) *AccountUserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AccountUserClient) DeleteOneID ¶
func (c *AccountUserClient) DeleteOneID(id uint32) *AccountUserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AccountUserClient) Get ¶
func (c *AccountUserClient) Get(ctx context.Context, id uint32) (*AccountUser, error)
Get returns a AccountUser entity by its id.
func (*AccountUserClient) GetX ¶
func (c *AccountUserClient) GetX(ctx context.Context, id uint32) *AccountUser
GetX is like Get, but panics if an error occurs.
func (*AccountUserClient) Hooks ¶
func (c *AccountUserClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AccountUserClient) Intercept ¶
func (c *AccountUserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `accountuser.Intercept(f(g(h())))`.
func (*AccountUserClient) Interceptors ¶
func (c *AccountUserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AccountUserClient) Query ¶
func (c *AccountUserClient) Query() *AccountUserQuery
Query returns a query builder for AccountUser.
func (*AccountUserClient) Update ¶
func (c *AccountUserClient) Update() *AccountUserUpdate
Update returns an update builder for AccountUser.
func (*AccountUserClient) UpdateOne ¶
func (c *AccountUserClient) UpdateOne(au *AccountUser) *AccountUserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AccountUserClient) UpdateOneID ¶
func (c *AccountUserClient) UpdateOneID(id uint32) *AccountUserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AccountUserClient) Use ¶
func (c *AccountUserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `accountuser.Hooks(f(g(h())))`.
type AccountUserCreate ¶
type AccountUserCreate struct {
// contains filtered or unexported fields
}
AccountUserCreate is the builder for creating a AccountUser entity.
func (*AccountUserCreate) Exec ¶
func (auc *AccountUserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUserCreate) ExecX ¶
func (auc *AccountUserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUserCreate) Mutation ¶
func (auc *AccountUserCreate) Mutation() *AccountUserMutation
Mutation returns the AccountUserMutation object of the builder.
func (*AccountUserCreate) OnConflict ¶
func (auc *AccountUserCreate) OnConflict(opts ...sql.ConflictOption) *AccountUserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.AccountUser.Create(). SetUsername(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AccountUserUpsert) { SetUsername(v+v). }). Exec(ctx)
func (*AccountUserCreate) OnConflictColumns ¶
func (auc *AccountUserCreate) OnConflictColumns(columns ...string) *AccountUserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.AccountUser.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AccountUserCreate) Save ¶
func (auc *AccountUserCreate) Save(ctx context.Context) (*AccountUser, error)
Save creates the AccountUser in the database.
func (*AccountUserCreate) SaveX ¶
func (auc *AccountUserCreate) SaveX(ctx context.Context) *AccountUser
SaveX calls Save and panics if Save returns an error.
func (*AccountUserCreate) SetCreateAt ¶
func (auc *AccountUserCreate) SetCreateAt(i int64) *AccountUserCreate
SetCreateAt sets the "create_at" field.
func (*AccountUserCreate) SetCreateIPAt ¶
func (auc *AccountUserCreate) SetCreateIPAt(s string) *AccountUserCreate
SetCreateIPAt sets the "create_ip_at" field.
func (*AccountUserCreate) SetEmail ¶
func (auc *AccountUserCreate) SetEmail(s string) *AccountUserCreate
SetEmail sets the "email" field.
func (*AccountUserCreate) SetID ¶
func (auc *AccountUserCreate) SetID(u uint32) *AccountUserCreate
SetID sets the "id" field.
func (*AccountUserCreate) SetLastLoginAt ¶
func (auc *AccountUserCreate) SetLastLoginAt(i int64) *AccountUserCreate
SetLastLoginAt sets the "last_login_at" field.
func (*AccountUserCreate) SetLastLoginIPAt ¶
func (auc *AccountUserCreate) SetLastLoginIPAt(s string) *AccountUserCreate
SetLastLoginIPAt sets the "last_login_ip_at" field.
func (*AccountUserCreate) SetLoginTimes ¶
func (auc *AccountUserCreate) SetLoginTimes(i int64) *AccountUserCreate
SetLoginTimes sets the "login_times" field.
func (*AccountUserCreate) SetNillableCreateAt ¶
func (auc *AccountUserCreate) SetNillableCreateAt(i *int64) *AccountUserCreate
SetNillableCreateAt sets the "create_at" field if the given value is not nil.
func (*AccountUserCreate) SetNillableCreateIPAt ¶
func (auc *AccountUserCreate) SetNillableCreateIPAt(s *string) *AccountUserCreate
SetNillableCreateIPAt sets the "create_ip_at" field if the given value is not nil.
func (*AccountUserCreate) SetNillableEmail ¶
func (auc *AccountUserCreate) SetNillableEmail(s *string) *AccountUserCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AccountUserCreate) SetNillableLastLoginAt ¶
func (auc *AccountUserCreate) SetNillableLastLoginAt(i *int64) *AccountUserCreate
SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.
func (*AccountUserCreate) SetNillableLastLoginIPAt ¶
func (auc *AccountUserCreate) SetNillableLastLoginIPAt(s *string) *AccountUserCreate
SetNillableLastLoginIPAt sets the "last_login_ip_at" field if the given value is not nil.
func (*AccountUserCreate) SetNillableLoginTimes ¶
func (auc *AccountUserCreate) SetNillableLoginTimes(i *int64) *AccountUserCreate
SetNillableLoginTimes sets the "login_times" field if the given value is not nil.
func (*AccountUserCreate) SetNillablePassword ¶
func (auc *AccountUserCreate) SetNillablePassword(s *string) *AccountUserCreate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*AccountUserCreate) SetNillablePhone ¶
func (auc *AccountUserCreate) SetNillablePhone(s *string) *AccountUserCreate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*AccountUserCreate) SetNillableStatus ¶
func (auc *AccountUserCreate) SetNillableStatus(i *int8) *AccountUserCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*AccountUserCreate) SetNillableUsername ¶
func (auc *AccountUserCreate) SetNillableUsername(s *string) *AccountUserCreate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AccountUserCreate) SetPassword ¶
func (auc *AccountUserCreate) SetPassword(s string) *AccountUserCreate
SetPassword sets the "password" field.
func (*AccountUserCreate) SetPhone ¶
func (auc *AccountUserCreate) SetPhone(s string) *AccountUserCreate
SetPhone sets the "phone" field.
func (*AccountUserCreate) SetStatus ¶
func (auc *AccountUserCreate) SetStatus(i int8) *AccountUserCreate
SetStatus sets the "status" field.
func (*AccountUserCreate) SetUsername ¶
func (auc *AccountUserCreate) SetUsername(s string) *AccountUserCreate
SetUsername sets the "username" field.
type AccountUserCreateBulk ¶
type AccountUserCreateBulk struct {
// contains filtered or unexported fields
}
AccountUserCreateBulk is the builder for creating many AccountUser entities in bulk.
func (*AccountUserCreateBulk) Exec ¶
func (aucb *AccountUserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUserCreateBulk) ExecX ¶
func (aucb *AccountUserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUserCreateBulk) OnConflict ¶
func (aucb *AccountUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccountUserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.AccountUser.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AccountUserUpsert) { SetUsername(v+v). }). Exec(ctx)
func (*AccountUserCreateBulk) OnConflictColumns ¶
func (aucb *AccountUserCreateBulk) OnConflictColumns(columns ...string) *AccountUserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.AccountUser.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AccountUserCreateBulk) Save ¶
func (aucb *AccountUserCreateBulk) Save(ctx context.Context) ([]*AccountUser, error)
Save creates the AccountUser entities in the database.
func (*AccountUserCreateBulk) SaveX ¶
func (aucb *AccountUserCreateBulk) SaveX(ctx context.Context) []*AccountUser
SaveX is like Save, but panics if an error occurs.
type AccountUserDelete ¶
type AccountUserDelete struct {
// contains filtered or unexported fields
}
AccountUserDelete is the builder for deleting a AccountUser entity.
func (*AccountUserDelete) Exec ¶
func (aud *AccountUserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AccountUserDelete) ExecX ¶
func (aud *AccountUserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AccountUserDelete) Where ¶
func (aud *AccountUserDelete) Where(ps ...predicate.AccountUser) *AccountUserDelete
Where appends a list predicates to the AccountUserDelete builder.
type AccountUserDeleteOne ¶
type AccountUserDeleteOne struct {
// contains filtered or unexported fields
}
AccountUserDeleteOne is the builder for deleting a single AccountUser entity.
func (*AccountUserDeleteOne) Exec ¶
func (audo *AccountUserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AccountUserDeleteOne) ExecX ¶
func (audo *AccountUserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUserDeleteOne) Where ¶
func (audo *AccountUserDeleteOne) Where(ps ...predicate.AccountUser) *AccountUserDeleteOne
Where appends a list predicates to the AccountUserDelete builder.
type AccountUserFilter ¶
type AccountUserFilter struct {
// contains filtered or unexported fields
}
AccountUserFilter provides a generic filtering capability at runtime for AccountUserQuery.
func (*AccountUserFilter) Where ¶
func (f *AccountUserFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*AccountUserFilter) WhereCreateAt ¶
func (f *AccountUserFilter) WhereCreateAt(p entql.Int64P)
WhereCreateAt applies the entql int64 predicate on the create_at field.
func (*AccountUserFilter) WhereCreateIPAt ¶
func (f *AccountUserFilter) WhereCreateIPAt(p entql.StringP)
WhereCreateIPAt applies the entql string predicate on the create_ip_at field.
func (*AccountUserFilter) WhereEmail ¶
func (f *AccountUserFilter) WhereEmail(p entql.StringP)
WhereEmail applies the entql string predicate on the email field.
func (*AccountUserFilter) WhereID ¶
func (f *AccountUserFilter) WhereID(p entql.Uint32P)
WhereID applies the entql uint32 predicate on the id field.
func (*AccountUserFilter) WhereLastLoginAt ¶
func (f *AccountUserFilter) WhereLastLoginAt(p entql.Int64P)
WhereLastLoginAt applies the entql int64 predicate on the last_login_at field.
func (*AccountUserFilter) WhereLastLoginIPAt ¶
func (f *AccountUserFilter) WhereLastLoginIPAt(p entql.StringP)
WhereLastLoginIPAt applies the entql string predicate on the last_login_ip_at field.
func (*AccountUserFilter) WhereLoginTimes ¶
func (f *AccountUserFilter) WhereLoginTimes(p entql.Int64P)
WhereLoginTimes applies the entql int64 predicate on the login_times field.
func (*AccountUserFilter) WherePassword ¶
func (f *AccountUserFilter) WherePassword(p entql.StringP)
WherePassword applies the entql string predicate on the password field.
func (*AccountUserFilter) WherePhone ¶
func (f *AccountUserFilter) WherePhone(p entql.StringP)
WherePhone applies the entql string predicate on the phone field.
func (*AccountUserFilter) WhereStatus ¶
func (f *AccountUserFilter) WhereStatus(p entql.Int8P)
WhereStatus applies the entql int8 predicate on the status field.
func (*AccountUserFilter) WhereUsername ¶
func (f *AccountUserFilter) WhereUsername(p entql.StringP)
WhereUsername applies the entql string predicate on the username field.
type AccountUserGroupBy ¶
type AccountUserGroupBy struct {
// contains filtered or unexported fields
}
AccountUserGroupBy is the group-by builder for AccountUser entities.
func (*AccountUserGroupBy) Aggregate ¶
func (augb *AccountUserGroupBy) Aggregate(fns ...AggregateFunc) *AccountUserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AccountUserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountUserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountUserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountUserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountUserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountUserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountUserGroupBy) Scan ¶
func (augb *AccountUserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccountUserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccountUserMutation ¶
type AccountUserMutation struct {
// contains filtered or unexported fields
}
AccountUserMutation represents an operation that mutates the AccountUser nodes in the graph.
func (*AccountUserMutation) AddCreateAt ¶
func (m *AccountUserMutation) AddCreateAt(i int64)
AddCreateAt adds i to the "create_at" field.
func (*AccountUserMutation) AddField ¶
func (m *AccountUserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AccountUserMutation) AddLastLoginAt ¶
func (m *AccountUserMutation) AddLastLoginAt(i int64)
AddLastLoginAt adds i to the "last_login_at" field.
func (*AccountUserMutation) AddLoginTimes ¶
func (m *AccountUserMutation) AddLoginTimes(i int64)
AddLoginTimes adds i to the "login_times" field.
func (*AccountUserMutation) AddStatus ¶
func (m *AccountUserMutation) AddStatus(i int8)
AddStatus adds i to the "status" field.
func (*AccountUserMutation) AddedCreateAt ¶
func (m *AccountUserMutation) AddedCreateAt() (r int64, exists bool)
AddedCreateAt returns the value that was added to the "create_at" field in this mutation.
func (*AccountUserMutation) AddedEdges ¶
func (m *AccountUserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AccountUserMutation) AddedField ¶
func (m *AccountUserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AccountUserMutation) AddedFields ¶
func (m *AccountUserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AccountUserMutation) AddedIDs ¶
func (m *AccountUserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AccountUserMutation) AddedLastLoginAt ¶
func (m *AccountUserMutation) AddedLastLoginAt() (r int64, exists bool)
AddedLastLoginAt returns the value that was added to the "last_login_at" field in this mutation.
func (*AccountUserMutation) AddedLoginTimes ¶
func (m *AccountUserMutation) AddedLoginTimes() (r int64, exists bool)
AddedLoginTimes returns the value that was added to the "login_times" field in this mutation.
func (*AccountUserMutation) AddedStatus ¶
func (m *AccountUserMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*AccountUserMutation) ClearEdge ¶
func (m *AccountUserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*AccountUserMutation) ClearEmail ¶
func (m *AccountUserMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*AccountUserMutation) ClearField ¶
func (m *AccountUserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*AccountUserMutation) ClearPassword ¶
func (m *AccountUserMutation) ClearPassword()
ClearPassword clears the value of the "password" field.
func (*AccountUserMutation) ClearPhone ¶
func (m *AccountUserMutation) ClearPhone()
ClearPhone clears the value of the "phone" field.
func (*AccountUserMutation) ClearUsername ¶
func (m *AccountUserMutation) ClearUsername()
ClearUsername clears the value of the "username" field.
func (*AccountUserMutation) ClearedEdges ¶
func (m *AccountUserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AccountUserMutation) ClearedFields ¶
func (m *AccountUserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AccountUserMutation) Client ¶
func (m AccountUserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*AccountUserMutation) CreateAt ¶
func (m *AccountUserMutation) CreateAt() (r int64, exists bool)
CreateAt returns the value of the "create_at" field in the mutation.
func (*AccountUserMutation) CreateIPAt ¶
func (m *AccountUserMutation) CreateIPAt() (r string, exists bool)
CreateIPAt returns the value of the "create_ip_at" field in the mutation.
func (*AccountUserMutation) EdgeCleared ¶
func (m *AccountUserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AccountUserMutation) Email ¶
func (m *AccountUserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*AccountUserMutation) EmailCleared ¶
func (m *AccountUserMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*AccountUserMutation) Field ¶
func (m *AccountUserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AccountUserMutation) FieldCleared ¶
func (m *AccountUserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AccountUserMutation) Fields ¶
func (m *AccountUserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*AccountUserMutation) Filter ¶
func (m *AccountUserMutation) Filter() *AccountUserFilter
Filter returns an entql.Where implementation to apply filters on the AccountUserMutation builder.
func (*AccountUserMutation) ID ¶
func (m *AccountUserMutation) ID() (id uint32, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AccountUserMutation) IDs ¶
func (m *AccountUserMutation) IDs(ctx context.Context) ([]uint32, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AccountUserMutation) LastLoginAt ¶
func (m *AccountUserMutation) LastLoginAt() (r int64, exists bool)
LastLoginAt returns the value of the "last_login_at" field in the mutation.
func (*AccountUserMutation) LastLoginIPAt ¶
func (m *AccountUserMutation) LastLoginIPAt() (r string, exists bool)
LastLoginIPAt returns the value of the "last_login_ip_at" field in the mutation.
func (*AccountUserMutation) LoginTimes ¶
func (m *AccountUserMutation) LoginTimes() (r int64, exists bool)
LoginTimes returns the value of the "login_times" field in the mutation.
func (*AccountUserMutation) OldCreateAt ¶
func (m *AccountUserMutation) OldCreateAt(ctx context.Context) (v int64, err error)
OldCreateAt returns the old "create_at" field's value of the AccountUser entity. If the AccountUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountUserMutation) OldCreateIPAt ¶
func (m *AccountUserMutation) OldCreateIPAt(ctx context.Context) (v string, err error)
OldCreateIPAt returns the old "create_ip_at" field's value of the AccountUser entity. If the AccountUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountUserMutation) OldEmail ¶
func (m *AccountUserMutation) OldEmail(ctx context.Context) (v *string, err error)
OldEmail returns the old "email" field's value of the AccountUser entity. If the AccountUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountUserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*AccountUserMutation) OldLastLoginAt ¶
func (m *AccountUserMutation) OldLastLoginAt(ctx context.Context) (v int64, err error)
OldLastLoginAt returns the old "last_login_at" field's value of the AccountUser entity. If the AccountUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountUserMutation) OldLastLoginIPAt ¶
func (m *AccountUserMutation) OldLastLoginIPAt(ctx context.Context) (v string, err error)
OldLastLoginIPAt returns the old "last_login_ip_at" field's value of the AccountUser entity. If the AccountUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountUserMutation) OldLoginTimes ¶
func (m *AccountUserMutation) OldLoginTimes(ctx context.Context) (v int64, err error)
OldLoginTimes returns the old "login_times" field's value of the AccountUser entity. If the AccountUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountUserMutation) OldPassword ¶
func (m *AccountUserMutation) OldPassword(ctx context.Context) (v *string, err error)
OldPassword returns the old "password" field's value of the AccountUser entity. If the AccountUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountUserMutation) OldPhone ¶
func (m *AccountUserMutation) OldPhone(ctx context.Context) (v *string, err error)
OldPhone returns the old "phone" field's value of the AccountUser entity. If the AccountUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountUserMutation) OldStatus ¶
func (m *AccountUserMutation) OldStatus(ctx context.Context) (v int8, err error)
OldStatus returns the old "status" field's value of the AccountUser entity. If the AccountUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountUserMutation) OldUsername ¶
func (m *AccountUserMutation) OldUsername(ctx context.Context) (v *string, err error)
OldUsername returns the old "username" field's value of the AccountUser entity. If the AccountUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccountUserMutation) Op ¶
func (m *AccountUserMutation) Op() Op
Op returns the operation name.
func (*AccountUserMutation) Password ¶
func (m *AccountUserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*AccountUserMutation) PasswordCleared ¶
func (m *AccountUserMutation) PasswordCleared() bool
PasswordCleared returns if the "password" field was cleared in this mutation.
func (*AccountUserMutation) Phone ¶
func (m *AccountUserMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*AccountUserMutation) PhoneCleared ¶
func (m *AccountUserMutation) PhoneCleared() bool
PhoneCleared returns if the "phone" field was cleared in this mutation.
func (*AccountUserMutation) RemovedEdges ¶
func (m *AccountUserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AccountUserMutation) RemovedIDs ¶
func (m *AccountUserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*AccountUserMutation) ResetCreateAt ¶
func (m *AccountUserMutation) ResetCreateAt()
ResetCreateAt resets all changes to the "create_at" field.
func (*AccountUserMutation) ResetCreateIPAt ¶
func (m *AccountUserMutation) ResetCreateIPAt()
ResetCreateIPAt resets all changes to the "create_ip_at" field.
func (*AccountUserMutation) ResetEdge ¶
func (m *AccountUserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*AccountUserMutation) ResetEmail ¶
func (m *AccountUserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*AccountUserMutation) ResetField ¶
func (m *AccountUserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*AccountUserMutation) ResetLastLoginAt ¶
func (m *AccountUserMutation) ResetLastLoginAt()
ResetLastLoginAt resets all changes to the "last_login_at" field.
func (*AccountUserMutation) ResetLastLoginIPAt ¶
func (m *AccountUserMutation) ResetLastLoginIPAt()
ResetLastLoginIPAt resets all changes to the "last_login_ip_at" field.
func (*AccountUserMutation) ResetLoginTimes ¶
func (m *AccountUserMutation) ResetLoginTimes()
ResetLoginTimes resets all changes to the "login_times" field.
func (*AccountUserMutation) ResetPassword ¶
func (m *AccountUserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*AccountUserMutation) ResetPhone ¶
func (m *AccountUserMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*AccountUserMutation) ResetStatus ¶
func (m *AccountUserMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*AccountUserMutation) ResetUsername ¶
func (m *AccountUserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*AccountUserMutation) SetCreateAt ¶
func (m *AccountUserMutation) SetCreateAt(i int64)
SetCreateAt sets the "create_at" field.
func (*AccountUserMutation) SetCreateIPAt ¶
func (m *AccountUserMutation) SetCreateIPAt(s string)
SetCreateIPAt sets the "create_ip_at" field.
func (*AccountUserMutation) SetEmail ¶
func (m *AccountUserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*AccountUserMutation) SetField ¶
func (m *AccountUserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AccountUserMutation) SetID ¶
func (m *AccountUserMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of AccountUser entities.
func (*AccountUserMutation) SetLastLoginAt ¶
func (m *AccountUserMutation) SetLastLoginAt(i int64)
SetLastLoginAt sets the "last_login_at" field.
func (*AccountUserMutation) SetLastLoginIPAt ¶
func (m *AccountUserMutation) SetLastLoginIPAt(s string)
SetLastLoginIPAt sets the "last_login_ip_at" field.
func (*AccountUserMutation) SetLoginTimes ¶
func (m *AccountUserMutation) SetLoginTimes(i int64)
SetLoginTimes sets the "login_times" field.
func (*AccountUserMutation) SetOp ¶
func (m *AccountUserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AccountUserMutation) SetPassword ¶
func (m *AccountUserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*AccountUserMutation) SetPhone ¶
func (m *AccountUserMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*AccountUserMutation) SetStatus ¶
func (m *AccountUserMutation) SetStatus(i int8)
SetStatus sets the "status" field.
func (*AccountUserMutation) SetUsername ¶
func (m *AccountUserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*AccountUserMutation) Status ¶
func (m *AccountUserMutation) Status() (r int8, exists bool)
Status returns the value of the "status" field in the mutation.
func (AccountUserMutation) Tx ¶
func (m AccountUserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AccountUserMutation) Type ¶
func (m *AccountUserMutation) Type() string
Type returns the node type of this mutation (AccountUser).
func (*AccountUserMutation) Username ¶
func (m *AccountUserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*AccountUserMutation) UsernameCleared ¶
func (m *AccountUserMutation) UsernameCleared() bool
UsernameCleared returns if the "username" field was cleared in this mutation.
func (*AccountUserMutation) Where ¶
func (m *AccountUserMutation) Where(ps ...predicate.AccountUser)
Where appends a list predicates to the AccountUserMutation builder.
func (*AccountUserMutation) WhereP ¶
func (m *AccountUserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AccountUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AccountUserQuery ¶
type AccountUserQuery struct {
// contains filtered or unexported fields
}
AccountUserQuery is the builder for querying AccountUser entities.
func (*AccountUserQuery) Aggregate ¶
func (auq *AccountUserQuery) Aggregate(fns ...AggregateFunc) *AccountUserSelect
Aggregate returns a AccountUserSelect configured with the given aggregations.
func (*AccountUserQuery) All ¶
func (auq *AccountUserQuery) All(ctx context.Context) ([]*AccountUser, error)
All executes the query and returns a list of AccountUsers.
func (*AccountUserQuery) AllX ¶
func (auq *AccountUserQuery) AllX(ctx context.Context) []*AccountUser
AllX is like All, but panics if an error occurs.
func (*AccountUserQuery) Clone ¶
func (auq *AccountUserQuery) Clone() *AccountUserQuery
Clone returns a duplicate of the AccountUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AccountUserQuery) Count ¶
func (auq *AccountUserQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AccountUserQuery) CountX ¶
func (auq *AccountUserQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AccountUserQuery) Exist ¶
func (auq *AccountUserQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AccountUserQuery) ExistX ¶
func (auq *AccountUserQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AccountUserQuery) Filter ¶
func (auq *AccountUserQuery) Filter() *AccountUserFilter
Filter returns a Filter implementation to apply filters on the AccountUserQuery builder.
func (*AccountUserQuery) First ¶
func (auq *AccountUserQuery) First(ctx context.Context) (*AccountUser, error)
First returns the first AccountUser entity from the query. Returns a *NotFoundError when no AccountUser was found.
func (*AccountUserQuery) FirstID ¶
func (auq *AccountUserQuery) FirstID(ctx context.Context) (id uint32, err error)
FirstID returns the first AccountUser ID from the query. Returns a *NotFoundError when no AccountUser ID was found.
func (*AccountUserQuery) FirstIDX ¶
func (auq *AccountUserQuery) FirstIDX(ctx context.Context) uint32
FirstIDX is like FirstID, but panics if an error occurs.
func (*AccountUserQuery) FirstX ¶
func (auq *AccountUserQuery) FirstX(ctx context.Context) *AccountUser
FirstX is like First, but panics if an error occurs.
func (*AccountUserQuery) GroupBy ¶
func (auq *AccountUserQuery) GroupBy(field string, fields ...string) *AccountUserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Username string `json:"username,omitempty"` Count int `json:"count,omitempty"` } client.AccountUser.Query(). GroupBy(accountuser.FieldUsername). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AccountUserQuery) IDs ¶
func (auq *AccountUserQuery) IDs(ctx context.Context) (ids []uint32, err error)
IDs executes the query and returns a list of AccountUser IDs.
func (*AccountUserQuery) IDsX ¶
func (auq *AccountUserQuery) IDsX(ctx context.Context) []uint32
IDsX is like IDs, but panics if an error occurs.
func (*AccountUserQuery) Limit ¶
func (auq *AccountUserQuery) Limit(limit int) *AccountUserQuery
Limit the number of records to be returned by this query.
func (*AccountUserQuery) Modify ¶
func (auq *AccountUserQuery) Modify(modifiers ...func(s *sql.Selector)) *AccountUserSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*AccountUserQuery) Offset ¶
func (auq *AccountUserQuery) Offset(offset int) *AccountUserQuery
Offset to start from.
func (*AccountUserQuery) Only ¶
func (auq *AccountUserQuery) Only(ctx context.Context) (*AccountUser, error)
Only returns a single AccountUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AccountUser entity is found. Returns a *NotFoundError when no AccountUser entities are found.
func (*AccountUserQuery) OnlyID ¶
func (auq *AccountUserQuery) OnlyID(ctx context.Context) (id uint32, err error)
OnlyID is like Only, but returns the only AccountUser ID in the query. Returns a *NotSingularError when more than one AccountUser ID is found. Returns a *NotFoundError when no entities are found.
func (*AccountUserQuery) OnlyIDX ¶
func (auq *AccountUserQuery) OnlyIDX(ctx context.Context) uint32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AccountUserQuery) OnlyX ¶
func (auq *AccountUserQuery) OnlyX(ctx context.Context) *AccountUser
OnlyX is like Only, but panics if an error occurs.
func (*AccountUserQuery) Order ¶
func (auq *AccountUserQuery) Order(o ...OrderFunc) *AccountUserQuery
Order specifies how the records should be ordered.
func (*AccountUserQuery) Select ¶
func (auq *AccountUserQuery) Select(fields ...string) *AccountUserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Username string `json:"username,omitempty"` } client.AccountUser.Query(). Select(accountuser.FieldUsername). Scan(ctx, &v)
func (*AccountUserQuery) Unique ¶
func (auq *AccountUserQuery) Unique(unique bool) *AccountUserQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*AccountUserQuery) Where ¶
func (auq *AccountUserQuery) Where(ps ...predicate.AccountUser) *AccountUserQuery
Where adds a new predicate for the AccountUserQuery builder.
type AccountUserSelect ¶
type AccountUserSelect struct { *AccountUserQuery // contains filtered or unexported fields }
AccountUserSelect is the builder for selecting fields of AccountUser entities.
func (*AccountUserSelect) Aggregate ¶
func (aus *AccountUserSelect) Aggregate(fns ...AggregateFunc) *AccountUserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AccountUserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccountUserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccountUserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccountUserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccountUserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccountUserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccountUserSelect) Modify ¶
func (aus *AccountUserSelect) Modify(modifiers ...func(s *sql.Selector)) *AccountUserSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*AccountUserSelect) Scan ¶
func (aus *AccountUserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccountUserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccountUserUpdate ¶
type AccountUserUpdate struct {
// contains filtered or unexported fields
}
AccountUserUpdate is the builder for updating AccountUser entities.
func (*AccountUserUpdate) AddCreateAt ¶
func (auu *AccountUserUpdate) AddCreateAt(i int64) *AccountUserUpdate
AddCreateAt adds i to the "create_at" field.
func (*AccountUserUpdate) AddLastLoginAt ¶
func (auu *AccountUserUpdate) AddLastLoginAt(i int64) *AccountUserUpdate
AddLastLoginAt adds i to the "last_login_at" field.
func (*AccountUserUpdate) AddLoginTimes ¶
func (auu *AccountUserUpdate) AddLoginTimes(i int64) *AccountUserUpdate
AddLoginTimes adds i to the "login_times" field.
func (*AccountUserUpdate) AddStatus ¶
func (auu *AccountUserUpdate) AddStatus(i int8) *AccountUserUpdate
AddStatus adds i to the "status" field.
func (*AccountUserUpdate) ClearEmail ¶
func (auu *AccountUserUpdate) ClearEmail() *AccountUserUpdate
ClearEmail clears the value of the "email" field.
func (*AccountUserUpdate) ClearPassword ¶
func (auu *AccountUserUpdate) ClearPassword() *AccountUserUpdate
ClearPassword clears the value of the "password" field.
func (*AccountUserUpdate) ClearPhone ¶
func (auu *AccountUserUpdate) ClearPhone() *AccountUserUpdate
ClearPhone clears the value of the "phone" field.
func (*AccountUserUpdate) ClearUsername ¶
func (auu *AccountUserUpdate) ClearUsername() *AccountUserUpdate
ClearUsername clears the value of the "username" field.
func (*AccountUserUpdate) Exec ¶
func (auu *AccountUserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUserUpdate) ExecX ¶
func (auu *AccountUserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUserUpdate) Modify ¶
func (auu *AccountUserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUserUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*AccountUserUpdate) Mutation ¶
func (auu *AccountUserUpdate) Mutation() *AccountUserMutation
Mutation returns the AccountUserMutation object of the builder.
func (*AccountUserUpdate) Save ¶
func (auu *AccountUserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AccountUserUpdate) SaveX ¶
func (auu *AccountUserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AccountUserUpdate) SetCreateAt ¶
func (auu *AccountUserUpdate) SetCreateAt(i int64) *AccountUserUpdate
SetCreateAt sets the "create_at" field.
func (*AccountUserUpdate) SetCreateIPAt ¶
func (auu *AccountUserUpdate) SetCreateIPAt(s string) *AccountUserUpdate
SetCreateIPAt sets the "create_ip_at" field.
func (*AccountUserUpdate) SetEmail ¶
func (auu *AccountUserUpdate) SetEmail(s string) *AccountUserUpdate
SetEmail sets the "email" field.
func (*AccountUserUpdate) SetLastLoginAt ¶
func (auu *AccountUserUpdate) SetLastLoginAt(i int64) *AccountUserUpdate
SetLastLoginAt sets the "last_login_at" field.
func (*AccountUserUpdate) SetLastLoginIPAt ¶
func (auu *AccountUserUpdate) SetLastLoginIPAt(s string) *AccountUserUpdate
SetLastLoginIPAt sets the "last_login_ip_at" field.
func (*AccountUserUpdate) SetLoginTimes ¶
func (auu *AccountUserUpdate) SetLoginTimes(i int64) *AccountUserUpdate
SetLoginTimes sets the "login_times" field.
func (*AccountUserUpdate) SetNillableCreateAt ¶
func (auu *AccountUserUpdate) SetNillableCreateAt(i *int64) *AccountUserUpdate
SetNillableCreateAt sets the "create_at" field if the given value is not nil.
func (*AccountUserUpdate) SetNillableCreateIPAt ¶
func (auu *AccountUserUpdate) SetNillableCreateIPAt(s *string) *AccountUserUpdate
SetNillableCreateIPAt sets the "create_ip_at" field if the given value is not nil.
func (*AccountUserUpdate) SetNillableEmail ¶
func (auu *AccountUserUpdate) SetNillableEmail(s *string) *AccountUserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AccountUserUpdate) SetNillableLastLoginAt ¶
func (auu *AccountUserUpdate) SetNillableLastLoginAt(i *int64) *AccountUserUpdate
SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.
func (*AccountUserUpdate) SetNillableLastLoginIPAt ¶
func (auu *AccountUserUpdate) SetNillableLastLoginIPAt(s *string) *AccountUserUpdate
SetNillableLastLoginIPAt sets the "last_login_ip_at" field if the given value is not nil.
func (*AccountUserUpdate) SetNillableLoginTimes ¶
func (auu *AccountUserUpdate) SetNillableLoginTimes(i *int64) *AccountUserUpdate
SetNillableLoginTimes sets the "login_times" field if the given value is not nil.
func (*AccountUserUpdate) SetNillablePassword ¶
func (auu *AccountUserUpdate) SetNillablePassword(s *string) *AccountUserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*AccountUserUpdate) SetNillablePhone ¶
func (auu *AccountUserUpdate) SetNillablePhone(s *string) *AccountUserUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*AccountUserUpdate) SetNillableStatus ¶
func (auu *AccountUserUpdate) SetNillableStatus(i *int8) *AccountUserUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*AccountUserUpdate) SetNillableUsername ¶
func (auu *AccountUserUpdate) SetNillableUsername(s *string) *AccountUserUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AccountUserUpdate) SetPassword ¶
func (auu *AccountUserUpdate) SetPassword(s string) *AccountUserUpdate
SetPassword sets the "password" field.
func (*AccountUserUpdate) SetPhone ¶
func (auu *AccountUserUpdate) SetPhone(s string) *AccountUserUpdate
SetPhone sets the "phone" field.
func (*AccountUserUpdate) SetStatus ¶
func (auu *AccountUserUpdate) SetStatus(i int8) *AccountUserUpdate
SetStatus sets the "status" field.
func (*AccountUserUpdate) SetUsername ¶
func (auu *AccountUserUpdate) SetUsername(s string) *AccountUserUpdate
SetUsername sets the "username" field.
func (*AccountUserUpdate) Where ¶
func (auu *AccountUserUpdate) Where(ps ...predicate.AccountUser) *AccountUserUpdate
Where appends a list predicates to the AccountUserUpdate builder.
type AccountUserUpdateOne ¶
type AccountUserUpdateOne struct {
// contains filtered or unexported fields
}
AccountUserUpdateOne is the builder for updating a single AccountUser entity.
func (*AccountUserUpdateOne) AddCreateAt ¶
func (auuo *AccountUserUpdateOne) AddCreateAt(i int64) *AccountUserUpdateOne
AddCreateAt adds i to the "create_at" field.
func (*AccountUserUpdateOne) AddLastLoginAt ¶
func (auuo *AccountUserUpdateOne) AddLastLoginAt(i int64) *AccountUserUpdateOne
AddLastLoginAt adds i to the "last_login_at" field.
func (*AccountUserUpdateOne) AddLoginTimes ¶
func (auuo *AccountUserUpdateOne) AddLoginTimes(i int64) *AccountUserUpdateOne
AddLoginTimes adds i to the "login_times" field.
func (*AccountUserUpdateOne) AddStatus ¶
func (auuo *AccountUserUpdateOne) AddStatus(i int8) *AccountUserUpdateOne
AddStatus adds i to the "status" field.
func (*AccountUserUpdateOne) ClearEmail ¶
func (auuo *AccountUserUpdateOne) ClearEmail() *AccountUserUpdateOne
ClearEmail clears the value of the "email" field.
func (*AccountUserUpdateOne) ClearPassword ¶
func (auuo *AccountUserUpdateOne) ClearPassword() *AccountUserUpdateOne
ClearPassword clears the value of the "password" field.
func (*AccountUserUpdateOne) ClearPhone ¶
func (auuo *AccountUserUpdateOne) ClearPhone() *AccountUserUpdateOne
ClearPhone clears the value of the "phone" field.
func (*AccountUserUpdateOne) ClearUsername ¶
func (auuo *AccountUserUpdateOne) ClearUsername() *AccountUserUpdateOne
ClearUsername clears the value of the "username" field.
func (*AccountUserUpdateOne) Exec ¶
func (auuo *AccountUserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AccountUserUpdateOne) ExecX ¶
func (auuo *AccountUserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUserUpdateOne) Modify ¶
func (auuo *AccountUserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AccountUserUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*AccountUserUpdateOne) Mutation ¶
func (auuo *AccountUserUpdateOne) Mutation() *AccountUserMutation
Mutation returns the AccountUserMutation object of the builder.
func (*AccountUserUpdateOne) Save ¶
func (auuo *AccountUserUpdateOne) Save(ctx context.Context) (*AccountUser, error)
Save executes the query and returns the updated AccountUser entity.
func (*AccountUserUpdateOne) SaveX ¶
func (auuo *AccountUserUpdateOne) SaveX(ctx context.Context) *AccountUser
SaveX is like Save, but panics if an error occurs.
func (*AccountUserUpdateOne) Select ¶
func (auuo *AccountUserUpdateOne) Select(field string, fields ...string) *AccountUserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AccountUserUpdateOne) SetCreateAt ¶
func (auuo *AccountUserUpdateOne) SetCreateAt(i int64) *AccountUserUpdateOne
SetCreateAt sets the "create_at" field.
func (*AccountUserUpdateOne) SetCreateIPAt ¶
func (auuo *AccountUserUpdateOne) SetCreateIPAt(s string) *AccountUserUpdateOne
SetCreateIPAt sets the "create_ip_at" field.
func (*AccountUserUpdateOne) SetEmail ¶
func (auuo *AccountUserUpdateOne) SetEmail(s string) *AccountUserUpdateOne
SetEmail sets the "email" field.
func (*AccountUserUpdateOne) SetLastLoginAt ¶
func (auuo *AccountUserUpdateOne) SetLastLoginAt(i int64) *AccountUserUpdateOne
SetLastLoginAt sets the "last_login_at" field.
func (*AccountUserUpdateOne) SetLastLoginIPAt ¶
func (auuo *AccountUserUpdateOne) SetLastLoginIPAt(s string) *AccountUserUpdateOne
SetLastLoginIPAt sets the "last_login_ip_at" field.
func (*AccountUserUpdateOne) SetLoginTimes ¶
func (auuo *AccountUserUpdateOne) SetLoginTimes(i int64) *AccountUserUpdateOne
SetLoginTimes sets the "login_times" field.
func (*AccountUserUpdateOne) SetNillableCreateAt ¶
func (auuo *AccountUserUpdateOne) SetNillableCreateAt(i *int64) *AccountUserUpdateOne
SetNillableCreateAt sets the "create_at" field if the given value is not nil.
func (*AccountUserUpdateOne) SetNillableCreateIPAt ¶
func (auuo *AccountUserUpdateOne) SetNillableCreateIPAt(s *string) *AccountUserUpdateOne
SetNillableCreateIPAt sets the "create_ip_at" field if the given value is not nil.
func (*AccountUserUpdateOne) SetNillableEmail ¶
func (auuo *AccountUserUpdateOne) SetNillableEmail(s *string) *AccountUserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AccountUserUpdateOne) SetNillableLastLoginAt ¶
func (auuo *AccountUserUpdateOne) SetNillableLastLoginAt(i *int64) *AccountUserUpdateOne
SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.
func (*AccountUserUpdateOne) SetNillableLastLoginIPAt ¶
func (auuo *AccountUserUpdateOne) SetNillableLastLoginIPAt(s *string) *AccountUserUpdateOne
SetNillableLastLoginIPAt sets the "last_login_ip_at" field if the given value is not nil.
func (*AccountUserUpdateOne) SetNillableLoginTimes ¶
func (auuo *AccountUserUpdateOne) SetNillableLoginTimes(i *int64) *AccountUserUpdateOne
SetNillableLoginTimes sets the "login_times" field if the given value is not nil.
func (*AccountUserUpdateOne) SetNillablePassword ¶
func (auuo *AccountUserUpdateOne) SetNillablePassword(s *string) *AccountUserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*AccountUserUpdateOne) SetNillablePhone ¶
func (auuo *AccountUserUpdateOne) SetNillablePhone(s *string) *AccountUserUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*AccountUserUpdateOne) SetNillableStatus ¶
func (auuo *AccountUserUpdateOne) SetNillableStatus(i *int8) *AccountUserUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*AccountUserUpdateOne) SetNillableUsername ¶
func (auuo *AccountUserUpdateOne) SetNillableUsername(s *string) *AccountUserUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AccountUserUpdateOne) SetPassword ¶
func (auuo *AccountUserUpdateOne) SetPassword(s string) *AccountUserUpdateOne
SetPassword sets the "password" field.
func (*AccountUserUpdateOne) SetPhone ¶
func (auuo *AccountUserUpdateOne) SetPhone(s string) *AccountUserUpdateOne
SetPhone sets the "phone" field.
func (*AccountUserUpdateOne) SetStatus ¶
func (auuo *AccountUserUpdateOne) SetStatus(i int8) *AccountUserUpdateOne
SetStatus sets the "status" field.
func (*AccountUserUpdateOne) SetUsername ¶
func (auuo *AccountUserUpdateOne) SetUsername(s string) *AccountUserUpdateOne
SetUsername sets the "username" field.
func (*AccountUserUpdateOne) Where ¶
func (auuo *AccountUserUpdateOne) Where(ps ...predicate.AccountUser) *AccountUserUpdateOne
Where appends a list predicates to the AccountUserUpdate builder.
type AccountUserUpsert ¶
AccountUserUpsert is the "OnConflict" setter.
func (*AccountUserUpsert) AddCreateAt ¶
func (u *AccountUserUpsert) AddCreateAt(v int64) *AccountUserUpsert
AddCreateAt adds v to the "create_at" field.
func (*AccountUserUpsert) AddLastLoginAt ¶
func (u *AccountUserUpsert) AddLastLoginAt(v int64) *AccountUserUpsert
AddLastLoginAt adds v to the "last_login_at" field.
func (*AccountUserUpsert) AddLoginTimes ¶
func (u *AccountUserUpsert) AddLoginTimes(v int64) *AccountUserUpsert
AddLoginTimes adds v to the "login_times" field.
func (*AccountUserUpsert) AddStatus ¶
func (u *AccountUserUpsert) AddStatus(v int8) *AccountUserUpsert
AddStatus adds v to the "status" field.
func (*AccountUserUpsert) ClearEmail ¶
func (u *AccountUserUpsert) ClearEmail() *AccountUserUpsert
ClearEmail clears the value of the "email" field.
func (*AccountUserUpsert) ClearPassword ¶
func (u *AccountUserUpsert) ClearPassword() *AccountUserUpsert
ClearPassword clears the value of the "password" field.
func (*AccountUserUpsert) ClearPhone ¶
func (u *AccountUserUpsert) ClearPhone() *AccountUserUpsert
ClearPhone clears the value of the "phone" field.
func (*AccountUserUpsert) ClearUsername ¶
func (u *AccountUserUpsert) ClearUsername() *AccountUserUpsert
ClearUsername clears the value of the "username" field.
func (*AccountUserUpsert) SetCreateAt ¶
func (u *AccountUserUpsert) SetCreateAt(v int64) *AccountUserUpsert
SetCreateAt sets the "create_at" field.
func (*AccountUserUpsert) SetCreateIPAt ¶
func (u *AccountUserUpsert) SetCreateIPAt(v string) *AccountUserUpsert
SetCreateIPAt sets the "create_ip_at" field.
func (*AccountUserUpsert) SetEmail ¶
func (u *AccountUserUpsert) SetEmail(v string) *AccountUserUpsert
SetEmail sets the "email" field.
func (*AccountUserUpsert) SetLastLoginAt ¶
func (u *AccountUserUpsert) SetLastLoginAt(v int64) *AccountUserUpsert
SetLastLoginAt sets the "last_login_at" field.
func (*AccountUserUpsert) SetLastLoginIPAt ¶
func (u *AccountUserUpsert) SetLastLoginIPAt(v string) *AccountUserUpsert
SetLastLoginIPAt sets the "last_login_ip_at" field.
func (*AccountUserUpsert) SetLoginTimes ¶
func (u *AccountUserUpsert) SetLoginTimes(v int64) *AccountUserUpsert
SetLoginTimes sets the "login_times" field.
func (*AccountUserUpsert) SetPassword ¶
func (u *AccountUserUpsert) SetPassword(v string) *AccountUserUpsert
SetPassword sets the "password" field.
func (*AccountUserUpsert) SetPhone ¶
func (u *AccountUserUpsert) SetPhone(v string) *AccountUserUpsert
SetPhone sets the "phone" field.
func (*AccountUserUpsert) SetStatus ¶
func (u *AccountUserUpsert) SetStatus(v int8) *AccountUserUpsert
SetStatus sets the "status" field.
func (*AccountUserUpsert) SetUsername ¶
func (u *AccountUserUpsert) SetUsername(v string) *AccountUserUpsert
SetUsername sets the "username" field.
func (*AccountUserUpsert) UpdateCreateAt ¶
func (u *AccountUserUpsert) UpdateCreateAt() *AccountUserUpsert
UpdateCreateAt sets the "create_at" field to the value that was provided on create.
func (*AccountUserUpsert) UpdateCreateIPAt ¶
func (u *AccountUserUpsert) UpdateCreateIPAt() *AccountUserUpsert
UpdateCreateIPAt sets the "create_ip_at" field to the value that was provided on create.
func (*AccountUserUpsert) UpdateEmail ¶
func (u *AccountUserUpsert) UpdateEmail() *AccountUserUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AccountUserUpsert) UpdateLastLoginAt ¶
func (u *AccountUserUpsert) UpdateLastLoginAt() *AccountUserUpsert
UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.
func (*AccountUserUpsert) UpdateLastLoginIPAt ¶
func (u *AccountUserUpsert) UpdateLastLoginIPAt() *AccountUserUpsert
UpdateLastLoginIPAt sets the "last_login_ip_at" field to the value that was provided on create.
func (*AccountUserUpsert) UpdateLoginTimes ¶
func (u *AccountUserUpsert) UpdateLoginTimes() *AccountUserUpsert
UpdateLoginTimes sets the "login_times" field to the value that was provided on create.
func (*AccountUserUpsert) UpdatePassword ¶
func (u *AccountUserUpsert) UpdatePassword() *AccountUserUpsert
UpdatePassword sets the "password" field to the value that was provided on create.
func (*AccountUserUpsert) UpdatePhone ¶
func (u *AccountUserUpsert) UpdatePhone() *AccountUserUpsert
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*AccountUserUpsert) UpdateStatus ¶
func (u *AccountUserUpsert) UpdateStatus() *AccountUserUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*AccountUserUpsert) UpdateUsername ¶
func (u *AccountUserUpsert) UpdateUsername() *AccountUserUpsert
UpdateUsername sets the "username" field to the value that was provided on create.
type AccountUserUpsertBulk ¶
type AccountUserUpsertBulk struct {
// contains filtered or unexported fields
}
AccountUserUpsertBulk is the builder for "upsert"-ing a bulk of AccountUser nodes.
func (*AccountUserUpsertBulk) AddCreateAt ¶
func (u *AccountUserUpsertBulk) AddCreateAt(v int64) *AccountUserUpsertBulk
AddCreateAt adds v to the "create_at" field.
func (*AccountUserUpsertBulk) AddLastLoginAt ¶
func (u *AccountUserUpsertBulk) AddLastLoginAt(v int64) *AccountUserUpsertBulk
AddLastLoginAt adds v to the "last_login_at" field.
func (*AccountUserUpsertBulk) AddLoginTimes ¶
func (u *AccountUserUpsertBulk) AddLoginTimes(v int64) *AccountUserUpsertBulk
AddLoginTimes adds v to the "login_times" field.
func (*AccountUserUpsertBulk) AddStatus ¶
func (u *AccountUserUpsertBulk) AddStatus(v int8) *AccountUserUpsertBulk
AddStatus adds v to the "status" field.
func (*AccountUserUpsertBulk) ClearEmail ¶
func (u *AccountUserUpsertBulk) ClearEmail() *AccountUserUpsertBulk
ClearEmail clears the value of the "email" field.
func (*AccountUserUpsertBulk) ClearPassword ¶
func (u *AccountUserUpsertBulk) ClearPassword() *AccountUserUpsertBulk
ClearPassword clears the value of the "password" field.
func (*AccountUserUpsertBulk) ClearPhone ¶
func (u *AccountUserUpsertBulk) ClearPhone() *AccountUserUpsertBulk
ClearPhone clears the value of the "phone" field.
func (*AccountUserUpsertBulk) ClearUsername ¶
func (u *AccountUserUpsertBulk) ClearUsername() *AccountUserUpsertBulk
ClearUsername clears the value of the "username" field.
func (*AccountUserUpsertBulk) DoNothing ¶
func (u *AccountUserUpsertBulk) DoNothing() *AccountUserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AccountUserUpsertBulk) Exec ¶
func (u *AccountUserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUserUpsertBulk) ExecX ¶
func (u *AccountUserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUserUpsertBulk) Ignore ¶
func (u *AccountUserUpsertBulk) Ignore() *AccountUserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.AccountUser.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AccountUserUpsertBulk) SetCreateAt ¶
func (u *AccountUserUpsertBulk) SetCreateAt(v int64) *AccountUserUpsertBulk
SetCreateAt sets the "create_at" field.
func (*AccountUserUpsertBulk) SetCreateIPAt ¶
func (u *AccountUserUpsertBulk) SetCreateIPAt(v string) *AccountUserUpsertBulk
SetCreateIPAt sets the "create_ip_at" field.
func (*AccountUserUpsertBulk) SetEmail ¶
func (u *AccountUserUpsertBulk) SetEmail(v string) *AccountUserUpsertBulk
SetEmail sets the "email" field.
func (*AccountUserUpsertBulk) SetLastLoginAt ¶
func (u *AccountUserUpsertBulk) SetLastLoginAt(v int64) *AccountUserUpsertBulk
SetLastLoginAt sets the "last_login_at" field.
func (*AccountUserUpsertBulk) SetLastLoginIPAt ¶
func (u *AccountUserUpsertBulk) SetLastLoginIPAt(v string) *AccountUserUpsertBulk
SetLastLoginIPAt sets the "last_login_ip_at" field.
func (*AccountUserUpsertBulk) SetLoginTimes ¶
func (u *AccountUserUpsertBulk) SetLoginTimes(v int64) *AccountUserUpsertBulk
SetLoginTimes sets the "login_times" field.
func (*AccountUserUpsertBulk) SetPassword ¶
func (u *AccountUserUpsertBulk) SetPassword(v string) *AccountUserUpsertBulk
SetPassword sets the "password" field.
func (*AccountUserUpsertBulk) SetPhone ¶
func (u *AccountUserUpsertBulk) SetPhone(v string) *AccountUserUpsertBulk
SetPhone sets the "phone" field.
func (*AccountUserUpsertBulk) SetStatus ¶
func (u *AccountUserUpsertBulk) SetStatus(v int8) *AccountUserUpsertBulk
SetStatus sets the "status" field.
func (*AccountUserUpsertBulk) SetUsername ¶
func (u *AccountUserUpsertBulk) SetUsername(v string) *AccountUserUpsertBulk
SetUsername sets the "username" field.
func (*AccountUserUpsertBulk) Update ¶
func (u *AccountUserUpsertBulk) Update(set func(*AccountUserUpsert)) *AccountUserUpsertBulk
Update allows overriding fields `UPDATE` values. See the AccountUserCreateBulk.OnConflict documentation for more info.
func (*AccountUserUpsertBulk) UpdateCreateAt ¶
func (u *AccountUserUpsertBulk) UpdateCreateAt() *AccountUserUpsertBulk
UpdateCreateAt sets the "create_at" field to the value that was provided on create.
func (*AccountUserUpsertBulk) UpdateCreateIPAt ¶
func (u *AccountUserUpsertBulk) UpdateCreateIPAt() *AccountUserUpsertBulk
UpdateCreateIPAt sets the "create_ip_at" field to the value that was provided on create.
func (*AccountUserUpsertBulk) UpdateEmail ¶
func (u *AccountUserUpsertBulk) UpdateEmail() *AccountUserUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AccountUserUpsertBulk) UpdateLastLoginAt ¶
func (u *AccountUserUpsertBulk) UpdateLastLoginAt() *AccountUserUpsertBulk
UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.
func (*AccountUserUpsertBulk) UpdateLastLoginIPAt ¶
func (u *AccountUserUpsertBulk) UpdateLastLoginIPAt() *AccountUserUpsertBulk
UpdateLastLoginIPAt sets the "last_login_ip_at" field to the value that was provided on create.
func (*AccountUserUpsertBulk) UpdateLoginTimes ¶
func (u *AccountUserUpsertBulk) UpdateLoginTimes() *AccountUserUpsertBulk
UpdateLoginTimes sets the "login_times" field to the value that was provided on create.
func (*AccountUserUpsertBulk) UpdateNewValues ¶
func (u *AccountUserUpsertBulk) UpdateNewValues() *AccountUserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.AccountUser.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(accountuser.FieldID) }), ). Exec(ctx)
func (*AccountUserUpsertBulk) UpdatePassword ¶
func (u *AccountUserUpsertBulk) UpdatePassword() *AccountUserUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*AccountUserUpsertBulk) UpdatePhone ¶
func (u *AccountUserUpsertBulk) UpdatePhone() *AccountUserUpsertBulk
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*AccountUserUpsertBulk) UpdateStatus ¶
func (u *AccountUserUpsertBulk) UpdateStatus() *AccountUserUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*AccountUserUpsertBulk) UpdateUsername ¶
func (u *AccountUserUpsertBulk) UpdateUsername() *AccountUserUpsertBulk
UpdateUsername sets the "username" field to the value that was provided on create.
type AccountUserUpsertOne ¶
type AccountUserUpsertOne struct {
// contains filtered or unexported fields
}
AccountUserUpsertOne is the builder for "upsert"-ing
one AccountUser node.
func (*AccountUserUpsertOne) AddCreateAt ¶
func (u *AccountUserUpsertOne) AddCreateAt(v int64) *AccountUserUpsertOne
AddCreateAt adds v to the "create_at" field.
func (*AccountUserUpsertOne) AddLastLoginAt ¶
func (u *AccountUserUpsertOne) AddLastLoginAt(v int64) *AccountUserUpsertOne
AddLastLoginAt adds v to the "last_login_at" field.
func (*AccountUserUpsertOne) AddLoginTimes ¶
func (u *AccountUserUpsertOne) AddLoginTimes(v int64) *AccountUserUpsertOne
AddLoginTimes adds v to the "login_times" field.
func (*AccountUserUpsertOne) AddStatus ¶
func (u *AccountUserUpsertOne) AddStatus(v int8) *AccountUserUpsertOne
AddStatus adds v to the "status" field.
func (*AccountUserUpsertOne) ClearEmail ¶
func (u *AccountUserUpsertOne) ClearEmail() *AccountUserUpsertOne
ClearEmail clears the value of the "email" field.
func (*AccountUserUpsertOne) ClearPassword ¶
func (u *AccountUserUpsertOne) ClearPassword() *AccountUserUpsertOne
ClearPassword clears the value of the "password" field.
func (*AccountUserUpsertOne) ClearPhone ¶
func (u *AccountUserUpsertOne) ClearPhone() *AccountUserUpsertOne
ClearPhone clears the value of the "phone" field.
func (*AccountUserUpsertOne) ClearUsername ¶
func (u *AccountUserUpsertOne) ClearUsername() *AccountUserUpsertOne
ClearUsername clears the value of the "username" field.
func (*AccountUserUpsertOne) DoNothing ¶
func (u *AccountUserUpsertOne) DoNothing() *AccountUserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AccountUserUpsertOne) Exec ¶
func (u *AccountUserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AccountUserUpsertOne) ExecX ¶
func (u *AccountUserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccountUserUpsertOne) ID ¶
func (u *AccountUserUpsertOne) ID(ctx context.Context) (id uint32, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*AccountUserUpsertOne) IDX ¶
func (u *AccountUserUpsertOne) IDX(ctx context.Context) uint32
IDX is like ID, but panics if an error occurs.
func (*AccountUserUpsertOne) Ignore ¶
func (u *AccountUserUpsertOne) Ignore() *AccountUserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.AccountUser.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AccountUserUpsertOne) SetCreateAt ¶
func (u *AccountUserUpsertOne) SetCreateAt(v int64) *AccountUserUpsertOne
SetCreateAt sets the "create_at" field.
func (*AccountUserUpsertOne) SetCreateIPAt ¶
func (u *AccountUserUpsertOne) SetCreateIPAt(v string) *AccountUserUpsertOne
SetCreateIPAt sets the "create_ip_at" field.
func (*AccountUserUpsertOne) SetEmail ¶
func (u *AccountUserUpsertOne) SetEmail(v string) *AccountUserUpsertOne
SetEmail sets the "email" field.
func (*AccountUserUpsertOne) SetLastLoginAt ¶
func (u *AccountUserUpsertOne) SetLastLoginAt(v int64) *AccountUserUpsertOne
SetLastLoginAt sets the "last_login_at" field.
func (*AccountUserUpsertOne) SetLastLoginIPAt ¶
func (u *AccountUserUpsertOne) SetLastLoginIPAt(v string) *AccountUserUpsertOne
SetLastLoginIPAt sets the "last_login_ip_at" field.
func (*AccountUserUpsertOne) SetLoginTimes ¶
func (u *AccountUserUpsertOne) SetLoginTimes(v int64) *AccountUserUpsertOne
SetLoginTimes sets the "login_times" field.
func (*AccountUserUpsertOne) SetPassword ¶
func (u *AccountUserUpsertOne) SetPassword(v string) *AccountUserUpsertOne
SetPassword sets the "password" field.
func (*AccountUserUpsertOne) SetPhone ¶
func (u *AccountUserUpsertOne) SetPhone(v string) *AccountUserUpsertOne
SetPhone sets the "phone" field.
func (*AccountUserUpsertOne) SetStatus ¶
func (u *AccountUserUpsertOne) SetStatus(v int8) *AccountUserUpsertOne
SetStatus sets the "status" field.
func (*AccountUserUpsertOne) SetUsername ¶
func (u *AccountUserUpsertOne) SetUsername(v string) *AccountUserUpsertOne
SetUsername sets the "username" field.
func (*AccountUserUpsertOne) Update ¶
func (u *AccountUserUpsertOne) Update(set func(*AccountUserUpsert)) *AccountUserUpsertOne
Update allows overriding fields `UPDATE` values. See the AccountUserCreate.OnConflict documentation for more info.
func (*AccountUserUpsertOne) UpdateCreateAt ¶
func (u *AccountUserUpsertOne) UpdateCreateAt() *AccountUserUpsertOne
UpdateCreateAt sets the "create_at" field to the value that was provided on create.
func (*AccountUserUpsertOne) UpdateCreateIPAt ¶
func (u *AccountUserUpsertOne) UpdateCreateIPAt() *AccountUserUpsertOne
UpdateCreateIPAt sets the "create_ip_at" field to the value that was provided on create.
func (*AccountUserUpsertOne) UpdateEmail ¶
func (u *AccountUserUpsertOne) UpdateEmail() *AccountUserUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AccountUserUpsertOne) UpdateLastLoginAt ¶
func (u *AccountUserUpsertOne) UpdateLastLoginAt() *AccountUserUpsertOne
UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.
func (*AccountUserUpsertOne) UpdateLastLoginIPAt ¶
func (u *AccountUserUpsertOne) UpdateLastLoginIPAt() *AccountUserUpsertOne
UpdateLastLoginIPAt sets the "last_login_ip_at" field to the value that was provided on create.
func (*AccountUserUpsertOne) UpdateLoginTimes ¶
func (u *AccountUserUpsertOne) UpdateLoginTimes() *AccountUserUpsertOne
UpdateLoginTimes sets the "login_times" field to the value that was provided on create.
func (*AccountUserUpsertOne) UpdateNewValues ¶
func (u *AccountUserUpsertOne) UpdateNewValues() *AccountUserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.AccountUser.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(accountuser.FieldID) }), ). Exec(ctx)
func (*AccountUserUpsertOne) UpdatePassword ¶
func (u *AccountUserUpsertOne) UpdatePassword() *AccountUserUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*AccountUserUpsertOne) UpdatePhone ¶
func (u *AccountUserUpsertOne) UpdatePhone() *AccountUserUpsertOne
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*AccountUserUpsertOne) UpdateStatus ¶
func (u *AccountUserUpsertOne) UpdateStatus() *AccountUserUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*AccountUserUpsertOne) UpdateUsername ¶
func (u *AccountUserUpsertOne) UpdateUsername() *AccountUserUpsertOne
UpdateUsername sets the "username" field to the value that was provided on create.
type AccountUsers ¶
type AccountUsers []*AccountUser
AccountUsers is a parsable slice of AccountUser.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // AccountUser is the client for interacting with the AccountUser builders. AccountUser *AccountUserClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). AccountUser. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // AccountUser is the client for interacting with the AccountUser builders. AccountUser *AccountUserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.