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 AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type ModelVersion
- type ModelVersionClient
- func (c *ModelVersionClient) Create() *ModelVersionCreate
- func (c *ModelVersionClient) CreateBulk(builders ...*ModelVersionCreate) *ModelVersionCreateBulk
- func (c *ModelVersionClient) Delete() *ModelVersionDelete
- func (c *ModelVersionClient) DeleteOne(mv *ModelVersion) *ModelVersionDeleteOne
- func (c *ModelVersionClient) DeleteOneID(id int) *ModelVersionDeleteOne
- func (c *ModelVersionClient) Get(ctx context.Context, id int) (*ModelVersion, error)
- func (c *ModelVersionClient) GetX(ctx context.Context, id int) *ModelVersion
- func (c *ModelVersionClient) Hooks() []Hook
- func (c *ModelVersionClient) Query() *ModelVersionQuery
- func (c *ModelVersionClient) Update() *ModelVersionUpdate
- func (c *ModelVersionClient) UpdateOne(mv *ModelVersion) *ModelVersionUpdateOne
- func (c *ModelVersionClient) UpdateOneID(id int) *ModelVersionUpdateOne
- func (c *ModelVersionClient) Use(hooks ...Hook)
- type ModelVersionCreate
- func (mvc *ModelVersionCreate) Mutation() *ModelVersionMutation
- func (mvc *ModelVersionCreate) Save(ctx context.Context) (*ModelVersion, error)
- func (mvc *ModelVersionCreate) SaveX(ctx context.Context) *ModelVersion
- func (mvc *ModelVersionCreate) SetID(i int) *ModelVersionCreate
- func (mvc *ModelVersionCreate) SetNillableUpdateTime(t *time.Time) *ModelVersionCreate
- func (mvc *ModelVersionCreate) SetUpdateTime(t time.Time) *ModelVersionCreate
- func (mvc *ModelVersionCreate) SetVersion(s string) *ModelVersionCreate
- type ModelVersionCreateBulk
- type ModelVersionDelete
- type ModelVersionDeleteOne
- type ModelVersionGroupBy
- func (mvgb *ModelVersionGroupBy) Aggregate(fns ...AggregateFunc) *ModelVersionGroupBy
- func (mvgb *ModelVersionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (mvgb *ModelVersionGroupBy) BoolX(ctx context.Context) bool
- func (mvgb *ModelVersionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (mvgb *ModelVersionGroupBy) BoolsX(ctx context.Context) []bool
- func (mvgb *ModelVersionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (mvgb *ModelVersionGroupBy) Float64X(ctx context.Context) float64
- func (mvgb *ModelVersionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (mvgb *ModelVersionGroupBy) Float64sX(ctx context.Context) []float64
- func (mvgb *ModelVersionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (mvgb *ModelVersionGroupBy) IntX(ctx context.Context) int
- func (mvgb *ModelVersionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (mvgb *ModelVersionGroupBy) IntsX(ctx context.Context) []int
- func (mvgb *ModelVersionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (mvgb *ModelVersionGroupBy) ScanX(ctx context.Context, v interface{})
- func (mvgb *ModelVersionGroupBy) String(ctx context.Context) (_ string, err error)
- func (mvgb *ModelVersionGroupBy) StringX(ctx context.Context) string
- func (mvgb *ModelVersionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (mvgb *ModelVersionGroupBy) StringsX(ctx context.Context) []string
- type ModelVersionMutation
- func (m *ModelVersionMutation) AddField(name string, value ent.Value) error
- func (m *ModelVersionMutation) AddedEdges() []string
- func (m *ModelVersionMutation) AddedField(name string) (ent.Value, bool)
- func (m *ModelVersionMutation) AddedFields() []string
- func (m *ModelVersionMutation) AddedIDs(name string) []ent.Value
- func (m *ModelVersionMutation) ClearEdge(name string) error
- func (m *ModelVersionMutation) ClearField(name string) error
- func (m *ModelVersionMutation) ClearedEdges() []string
- func (m *ModelVersionMutation) ClearedFields() []string
- func (m ModelVersionMutation) Client() *Client
- func (m *ModelVersionMutation) EdgeCleared(name string) bool
- func (m *ModelVersionMutation) Field(name string) (ent.Value, bool)
- func (m *ModelVersionMutation) FieldCleared(name string) bool
- func (m *ModelVersionMutation) Fields() []string
- func (m *ModelVersionMutation) ID() (id int, exists bool)
- func (m *ModelVersionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ModelVersionMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ModelVersionMutation) OldVersion(ctx context.Context) (v string, err error)
- func (m *ModelVersionMutation) Op() Op
- func (m *ModelVersionMutation) RemovedEdges() []string
- func (m *ModelVersionMutation) RemovedIDs(name string) []ent.Value
- func (m *ModelVersionMutation) ResetEdge(name string) error
- func (m *ModelVersionMutation) ResetField(name string) error
- func (m *ModelVersionMutation) ResetUpdateTime()
- func (m *ModelVersionMutation) ResetVersion()
- func (m *ModelVersionMutation) SetField(name string, value ent.Value) error
- func (m *ModelVersionMutation) SetID(id int)
- func (m *ModelVersionMutation) SetUpdateTime(t time.Time)
- func (m *ModelVersionMutation) SetVersion(s string)
- func (m ModelVersionMutation) Tx() (*Tx, error)
- func (m *ModelVersionMutation) Type() string
- func (m *ModelVersionMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ModelVersionMutation) Version() (r string, exists bool)
- type ModelVersionQuery
- func (mvq *ModelVersionQuery) All(ctx context.Context) ([]*ModelVersion, error)
- func (mvq *ModelVersionQuery) AllX(ctx context.Context) []*ModelVersion
- func (mvq *ModelVersionQuery) Clone() *ModelVersionQuery
- func (mvq *ModelVersionQuery) Count(ctx context.Context) (int, error)
- func (mvq *ModelVersionQuery) CountX(ctx context.Context) int
- func (mvq *ModelVersionQuery) Exist(ctx context.Context) (bool, error)
- func (mvq *ModelVersionQuery) ExistX(ctx context.Context) bool
- func (mvq *ModelVersionQuery) First(ctx context.Context) (*ModelVersion, error)
- func (mvq *ModelVersionQuery) FirstID(ctx context.Context) (id int, err error)
- func (mvq *ModelVersionQuery) FirstIDX(ctx context.Context) int
- func (mvq *ModelVersionQuery) FirstX(ctx context.Context) *ModelVersion
- func (mvq *ModelVersionQuery) GroupBy(field string, fields ...string) *ModelVersionGroupBy
- func (mvq *ModelVersionQuery) IDs(ctx context.Context) ([]int, error)
- func (mvq *ModelVersionQuery) IDsX(ctx context.Context) []int
- func (mvq *ModelVersionQuery) Limit(limit int) *ModelVersionQuery
- func (mvq *ModelVersionQuery) Offset(offset int) *ModelVersionQuery
- func (mvq *ModelVersionQuery) Only(ctx context.Context) (*ModelVersion, error)
- func (mvq *ModelVersionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mvq *ModelVersionQuery) OnlyIDX(ctx context.Context) int
- func (mvq *ModelVersionQuery) OnlyX(ctx context.Context) *ModelVersion
- func (mvq *ModelVersionQuery) Order(o ...OrderFunc) *ModelVersionQuery
- func (mvq *ModelVersionQuery) Select(field string, fields ...string) *ModelVersionSelect
- func (mvq *ModelVersionQuery) Unique(unique bool) *ModelVersionQuery
- func (mvq *ModelVersionQuery) Where(ps ...predicate.ModelVersion) *ModelVersionQuery
- type ModelVersionSelect
- func (mvs *ModelVersionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (mvs *ModelVersionSelect) BoolX(ctx context.Context) bool
- func (mvs *ModelVersionSelect) Bools(ctx context.Context) ([]bool, error)
- func (mvs *ModelVersionSelect) BoolsX(ctx context.Context) []bool
- func (mvs *ModelVersionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (mvs *ModelVersionSelect) Float64X(ctx context.Context) float64
- func (mvs *ModelVersionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (mvs *ModelVersionSelect) Float64sX(ctx context.Context) []float64
- func (mvs *ModelVersionSelect) Int(ctx context.Context) (_ int, err error)
- func (mvs *ModelVersionSelect) IntX(ctx context.Context) int
- func (mvs *ModelVersionSelect) Ints(ctx context.Context) ([]int, error)
- func (mvs *ModelVersionSelect) IntsX(ctx context.Context) []int
- func (mvs *ModelVersionSelect) Scan(ctx context.Context, v interface{}) error
- func (mvs *ModelVersionSelect) ScanX(ctx context.Context, v interface{})
- func (mvs *ModelVersionSelect) String(ctx context.Context) (_ string, err error)
- func (mvs *ModelVersionSelect) StringX(ctx context.Context) string
- func (mvs *ModelVersionSelect) Strings(ctx context.Context) ([]string, error)
- func (mvs *ModelVersionSelect) StringsX(ctx context.Context) []string
- type ModelVersionUpdate
- func (mvu *ModelVersionUpdate) Exec(ctx context.Context) error
- func (mvu *ModelVersionUpdate) ExecX(ctx context.Context)
- func (mvu *ModelVersionUpdate) Mutation() *ModelVersionMutation
- func (mvu *ModelVersionUpdate) Save(ctx context.Context) (int, error)
- func (mvu *ModelVersionUpdate) SaveX(ctx context.Context) int
- func (mvu *ModelVersionUpdate) SetUpdateTime(t time.Time) *ModelVersionUpdate
- func (mvu *ModelVersionUpdate) SetVersion(s string) *ModelVersionUpdate
- func (mvu *ModelVersionUpdate) Where(ps ...predicate.ModelVersion) *ModelVersionUpdate
- type ModelVersionUpdateOne
- func (mvuo *ModelVersionUpdateOne) Exec(ctx context.Context) error
- func (mvuo *ModelVersionUpdateOne) ExecX(ctx context.Context)
- func (mvuo *ModelVersionUpdateOne) Mutation() *ModelVersionMutation
- func (mvuo *ModelVersionUpdateOne) Save(ctx context.Context) (*ModelVersion, error)
- func (mvuo *ModelVersionUpdateOne) SaveX(ctx context.Context) *ModelVersion
- func (mvuo *ModelVersionUpdateOne) Select(field string, fields ...string) *ModelVersionUpdateOne
- func (mvuo *ModelVersionUpdateOne) SetUpdateTime(t time.Time) *ModelVersionUpdateOne
- func (mvuo *ModelVersionUpdateOne) SetVersion(s string) *ModelVersionUpdateOne
- type ModelVersions
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type SystemSetting
- type SystemSettingClient
- func (c *SystemSettingClient) Create() *SystemSettingCreate
- func (c *SystemSettingClient) CreateBulk(builders ...*SystemSettingCreate) *SystemSettingCreateBulk
- func (c *SystemSettingClient) Delete() *SystemSettingDelete
- func (c *SystemSettingClient) DeleteOne(ss *SystemSetting) *SystemSettingDeleteOne
- func (c *SystemSettingClient) DeleteOneID(id int) *SystemSettingDeleteOne
- func (c *SystemSettingClient) Get(ctx context.Context, id int) (*SystemSetting, error)
- func (c *SystemSettingClient) GetX(ctx context.Context, id int) *SystemSetting
- func (c *SystemSettingClient) Hooks() []Hook
- func (c *SystemSettingClient) Query() *SystemSettingQuery
- func (c *SystemSettingClient) Update() *SystemSettingUpdate
- func (c *SystemSettingClient) UpdateOne(ss *SystemSetting) *SystemSettingUpdateOne
- func (c *SystemSettingClient) UpdateOneID(id int) *SystemSettingUpdateOne
- func (c *SystemSettingClient) Use(hooks ...Hook)
- type SystemSettingCreate
- func (ssc *SystemSettingCreate) Mutation() *SystemSettingMutation
- func (ssc *SystemSettingCreate) Save(ctx context.Context) (*SystemSetting, error)
- func (ssc *SystemSettingCreate) SaveX(ctx context.Context) *SystemSetting
- func (ssc *SystemSettingCreate) SetID(i int) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetKey(s string) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetNillableSpace(s *systemsetting.Space) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetNillableTypeof(s *string) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetNillableUpdateTime(t *time.Time) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetNillableValue(s *string) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetSpace(s systemsetting.Space) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetTypeof(s string) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetUpdateTime(t time.Time) *SystemSettingCreate
- func (ssc *SystemSettingCreate) SetValue(s string) *SystemSettingCreate
- type SystemSettingCreateBulk
- type SystemSettingDelete
- type SystemSettingDeleteOne
- type SystemSettingGroupBy
- func (ssgb *SystemSettingGroupBy) Aggregate(fns ...AggregateFunc) *SystemSettingGroupBy
- func (ssgb *SystemSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ssgb *SystemSettingGroupBy) BoolX(ctx context.Context) bool
- func (ssgb *SystemSettingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ssgb *SystemSettingGroupBy) BoolsX(ctx context.Context) []bool
- func (ssgb *SystemSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ssgb *SystemSettingGroupBy) Float64X(ctx context.Context) float64
- func (ssgb *SystemSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ssgb *SystemSettingGroupBy) Float64sX(ctx context.Context) []float64
- func (ssgb *SystemSettingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ssgb *SystemSettingGroupBy) IntX(ctx context.Context) int
- func (ssgb *SystemSettingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ssgb *SystemSettingGroupBy) IntsX(ctx context.Context) []int
- func (ssgb *SystemSettingGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ssgb *SystemSettingGroupBy) ScanX(ctx context.Context, v interface{})
- func (ssgb *SystemSettingGroupBy) String(ctx context.Context) (_ string, err error)
- func (ssgb *SystemSettingGroupBy) StringX(ctx context.Context) string
- func (ssgb *SystemSettingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ssgb *SystemSettingGroupBy) StringsX(ctx context.Context) []string
- type SystemSettingMutation
- func (m *SystemSettingMutation) AddField(name string, value ent.Value) error
- func (m *SystemSettingMutation) AddedEdges() []string
- func (m *SystemSettingMutation) AddedField(name string) (ent.Value, bool)
- func (m *SystemSettingMutation) AddedFields() []string
- func (m *SystemSettingMutation) AddedIDs(name string) []ent.Value
- func (m *SystemSettingMutation) ClearEdge(name string) error
- func (m *SystemSettingMutation) ClearField(name string) error
- func (m *SystemSettingMutation) ClearSpace()
- func (m *SystemSettingMutation) ClearValue()
- func (m *SystemSettingMutation) ClearedEdges() []string
- func (m *SystemSettingMutation) ClearedFields() []string
- func (m SystemSettingMutation) Client() *Client
- func (m *SystemSettingMutation) EdgeCleared(name string) bool
- func (m *SystemSettingMutation) Field(name string) (ent.Value, bool)
- func (m *SystemSettingMutation) FieldCleared(name string) bool
- func (m *SystemSettingMutation) Fields() []string
- func (m *SystemSettingMutation) ID() (id int, exists bool)
- func (m *SystemSettingMutation) Key() (r string, exists bool)
- func (m *SystemSettingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SystemSettingMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *SystemSettingMutation) OldSpace(ctx context.Context) (v *systemsetting.Space, err error)
- func (m *SystemSettingMutation) OldTypeof(ctx context.Context) (v string, err error)
- func (m *SystemSettingMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *SystemSettingMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *SystemSettingMutation) Op() Op
- func (m *SystemSettingMutation) RemovedEdges() []string
- func (m *SystemSettingMutation) RemovedIDs(name string) []ent.Value
- func (m *SystemSettingMutation) ResetEdge(name string) error
- func (m *SystemSettingMutation) ResetField(name string) error
- func (m *SystemSettingMutation) ResetKey()
- func (m *SystemSettingMutation) ResetSpace()
- func (m *SystemSettingMutation) ResetTypeof()
- func (m *SystemSettingMutation) ResetUpdateTime()
- func (m *SystemSettingMutation) ResetValue()
- func (m *SystemSettingMutation) SetField(name string, value ent.Value) error
- func (m *SystemSettingMutation) SetID(id int)
- func (m *SystemSettingMutation) SetKey(s string)
- func (m *SystemSettingMutation) SetSpace(s systemsetting.Space)
- func (m *SystemSettingMutation) SetTypeof(s string)
- func (m *SystemSettingMutation) SetUpdateTime(t time.Time)
- func (m *SystemSettingMutation) SetValue(s string)
- func (m *SystemSettingMutation) Space() (r systemsetting.Space, exists bool)
- func (m *SystemSettingMutation) SpaceCleared() bool
- func (m SystemSettingMutation) Tx() (*Tx, error)
- func (m *SystemSettingMutation) Type() string
- func (m *SystemSettingMutation) Typeof() (r string, exists bool)
- func (m *SystemSettingMutation) UpdateTime() (r time.Time, exists bool)
- func (m *SystemSettingMutation) Value() (r string, exists bool)
- func (m *SystemSettingMutation) ValueCleared() bool
- type SystemSettingQuery
- func (ssq *SystemSettingQuery) All(ctx context.Context) ([]*SystemSetting, error)
- func (ssq *SystemSettingQuery) AllX(ctx context.Context) []*SystemSetting
- func (ssq *SystemSettingQuery) Clone() *SystemSettingQuery
- func (ssq *SystemSettingQuery) Count(ctx context.Context) (int, error)
- func (ssq *SystemSettingQuery) CountX(ctx context.Context) int
- func (ssq *SystemSettingQuery) Exist(ctx context.Context) (bool, error)
- func (ssq *SystemSettingQuery) ExistX(ctx context.Context) bool
- func (ssq *SystemSettingQuery) First(ctx context.Context) (*SystemSetting, error)
- func (ssq *SystemSettingQuery) FirstID(ctx context.Context) (id int, err error)
- func (ssq *SystemSettingQuery) FirstIDX(ctx context.Context) int
- func (ssq *SystemSettingQuery) FirstX(ctx context.Context) *SystemSetting
- func (ssq *SystemSettingQuery) GroupBy(field string, fields ...string) *SystemSettingGroupBy
- func (ssq *SystemSettingQuery) IDs(ctx context.Context) ([]int, error)
- func (ssq *SystemSettingQuery) IDsX(ctx context.Context) []int
- func (ssq *SystemSettingQuery) Limit(limit int) *SystemSettingQuery
- func (ssq *SystemSettingQuery) Offset(offset int) *SystemSettingQuery
- func (ssq *SystemSettingQuery) Only(ctx context.Context) (*SystemSetting, error)
- func (ssq *SystemSettingQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ssq *SystemSettingQuery) OnlyIDX(ctx context.Context) int
- func (ssq *SystemSettingQuery) OnlyX(ctx context.Context) *SystemSetting
- func (ssq *SystemSettingQuery) Order(o ...OrderFunc) *SystemSettingQuery
- func (ssq *SystemSettingQuery) Select(field string, fields ...string) *SystemSettingSelect
- func (ssq *SystemSettingQuery) Unique(unique bool) *SystemSettingQuery
- func (ssq *SystemSettingQuery) Where(ps ...predicate.SystemSetting) *SystemSettingQuery
- type SystemSettingSelect
- func (sss *SystemSettingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (sss *SystemSettingSelect) BoolX(ctx context.Context) bool
- func (sss *SystemSettingSelect) Bools(ctx context.Context) ([]bool, error)
- func (sss *SystemSettingSelect) BoolsX(ctx context.Context) []bool
- func (sss *SystemSettingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (sss *SystemSettingSelect) Float64X(ctx context.Context) float64
- func (sss *SystemSettingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (sss *SystemSettingSelect) Float64sX(ctx context.Context) []float64
- func (sss *SystemSettingSelect) Int(ctx context.Context) (_ int, err error)
- func (sss *SystemSettingSelect) IntX(ctx context.Context) int
- func (sss *SystemSettingSelect) Ints(ctx context.Context) ([]int, error)
- func (sss *SystemSettingSelect) IntsX(ctx context.Context) []int
- func (sss *SystemSettingSelect) Scan(ctx context.Context, v interface{}) error
- func (sss *SystemSettingSelect) ScanX(ctx context.Context, v interface{})
- func (sss *SystemSettingSelect) String(ctx context.Context) (_ string, err error)
- func (sss *SystemSettingSelect) StringX(ctx context.Context) string
- func (sss *SystemSettingSelect) Strings(ctx context.Context) ([]string, error)
- func (sss *SystemSettingSelect) StringsX(ctx context.Context) []string
- type SystemSettingUpdate
- func (ssu *SystemSettingUpdate) ClearSpace() *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) ClearValue() *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) Exec(ctx context.Context) error
- func (ssu *SystemSettingUpdate) ExecX(ctx context.Context)
- func (ssu *SystemSettingUpdate) Mutation() *SystemSettingMutation
- func (ssu *SystemSettingUpdate) Save(ctx context.Context) (int, error)
- func (ssu *SystemSettingUpdate) SaveX(ctx context.Context) int
- func (ssu *SystemSettingUpdate) SetKey(s string) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetNillableSpace(s *systemsetting.Space) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetNillableTypeof(s *string) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetNillableValue(s *string) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetSpace(s systemsetting.Space) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetTypeof(s string) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetUpdateTime(t time.Time) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) SetValue(s string) *SystemSettingUpdate
- func (ssu *SystemSettingUpdate) Where(ps ...predicate.SystemSetting) *SystemSettingUpdate
- type SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) ClearSpace() *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) ClearValue() *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) Exec(ctx context.Context) error
- func (ssuo *SystemSettingUpdateOne) ExecX(ctx context.Context)
- func (ssuo *SystemSettingUpdateOne) Mutation() *SystemSettingMutation
- func (ssuo *SystemSettingUpdateOne) Save(ctx context.Context) (*SystemSetting, error)
- func (ssuo *SystemSettingUpdateOne) SaveX(ctx context.Context) *SystemSetting
- func (ssuo *SystemSettingUpdateOne) Select(field string, fields ...string) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetKey(s string) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetNillableSpace(s *systemsetting.Space) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetNillableTypeof(s *string) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetNillableValue(s *string) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetSpace(s systemsetting.Space) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetTypeof(s string) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetUpdateTime(t time.Time) *SystemSettingUpdateOne
- func (ssuo *SystemSettingUpdateOne) SetValue(s string) *SystemSettingUpdateOne
- type SystemSettings
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryUserEmails(u *User) *UserEmailQuery
- func (c *UserClient) QueryUserSecurityLogs(u *User) *UserSecurityLogQuery
- func (c *UserClient) QueryUserSettings(u *User) *UserSettingQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddUserEmailIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddUserEmails(u ...*UserEmail) *UserCreate
- func (uc *UserCreate) AddUserSecurityLogIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddUserSecurityLogs(u ...*UserSecurityLog) *UserCreate
- func (uc *UserCreate) AddUserSettingIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddUserSettings(u ...*UserSetting) *UserCreate
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetDeleteTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetID(i int) *UserCreate
- func (uc *UserCreate) SetLastPwdAuth(t time.Time) *UserCreate
- func (uc *UserCreate) SetNickname(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDeleteTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableLastPwdAuth(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
- func (uc *UserCreate) SetNillablePhone(s *string) *UserCreate
- func (uc *UserCreate) SetNillableSn(s *string) *UserCreate
- func (uc *UserCreate) SetNillableStatus(u *user.Status) *UserCreate
- func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetPhone(s string) *UserCreate
- func (uc *UserCreate) SetSignature(s string) *UserCreate
- func (uc *UserCreate) SetSn(s string) *UserCreate
- func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
- func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserEmail
- type UserEmailClient
- func (c *UserEmailClient) Create() *UserEmailCreate
- func (c *UserEmailClient) CreateBulk(builders ...*UserEmailCreate) *UserEmailCreateBulk
- func (c *UserEmailClient) Delete() *UserEmailDelete
- func (c *UserEmailClient) DeleteOne(ue *UserEmail) *UserEmailDeleteOne
- func (c *UserEmailClient) DeleteOneID(id int) *UserEmailDeleteOne
- func (c *UserEmailClient) Get(ctx context.Context, id int) (*UserEmail, error)
- func (c *UserEmailClient) GetX(ctx context.Context, id int) *UserEmail
- func (c *UserEmailClient) Hooks() []Hook
- func (c *UserEmailClient) Query() *UserEmailQuery
- func (c *UserEmailClient) QueryEmailOwner(ue *UserEmail) *UserQuery
- func (c *UserEmailClient) Update() *UserEmailUpdate
- func (c *UserEmailClient) UpdateOne(ue *UserEmail) *UserEmailUpdateOne
- func (c *UserEmailClient) UpdateOneID(id int) *UserEmailUpdateOne
- func (c *UserEmailClient) Use(hooks ...Hook)
- type UserEmailCreate
- func (uec *UserEmailCreate) Mutation() *UserEmailMutation
- func (uec *UserEmailCreate) Save(ctx context.Context) (*UserEmail, error)
- func (uec *UserEmailCreate) SaveX(ctx context.Context) *UserEmail
- func (uec *UserEmailCreate) SetCreateTime(t time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetEmail(s string) *UserEmailCreate
- func (uec *UserEmailCreate) SetEmailOwner(u *User) *UserEmailCreate
- func (uec *UserEmailCreate) SetEmailOwnerID(id int) *UserEmailCreate
- func (uec *UserEmailCreate) SetID(i int) *UserEmailCreate
- func (uec *UserEmailCreate) SetIsPrimary(b bool) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableCreateTime(t *time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableIsPrimary(b *bool) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableUpdateTime(t *time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableVerifed(b *bool) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableVerifedTime(t *time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetNillableVerifyTicket(s *string) *UserEmailCreate
- func (uec *UserEmailCreate) SetOwnerID(i int) *UserEmailCreate
- func (uec *UserEmailCreate) SetUpdateTime(t time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetVerifed(b bool) *UserEmailCreate
- func (uec *UserEmailCreate) SetVerifedTime(t time.Time) *UserEmailCreate
- func (uec *UserEmailCreate) SetVerifyTicket(s string) *UserEmailCreate
- type UserEmailCreateBulk
- type UserEmailDelete
- type UserEmailDeleteOne
- type UserEmailEdges
- type UserEmailGroupBy
- func (uegb *UserEmailGroupBy) Aggregate(fns ...AggregateFunc) *UserEmailGroupBy
- func (uegb *UserEmailGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (uegb *UserEmailGroupBy) BoolX(ctx context.Context) bool
- func (uegb *UserEmailGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (uegb *UserEmailGroupBy) BoolsX(ctx context.Context) []bool
- func (uegb *UserEmailGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (uegb *UserEmailGroupBy) Float64X(ctx context.Context) float64
- func (uegb *UserEmailGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (uegb *UserEmailGroupBy) Float64sX(ctx context.Context) []float64
- func (uegb *UserEmailGroupBy) Int(ctx context.Context) (_ int, err error)
- func (uegb *UserEmailGroupBy) IntX(ctx context.Context) int
- func (uegb *UserEmailGroupBy) Ints(ctx context.Context) ([]int, error)
- func (uegb *UserEmailGroupBy) IntsX(ctx context.Context) []int
- func (uegb *UserEmailGroupBy) Scan(ctx context.Context, v interface{}) error
- func (uegb *UserEmailGroupBy) ScanX(ctx context.Context, v interface{})
- func (uegb *UserEmailGroupBy) String(ctx context.Context) (_ string, err error)
- func (uegb *UserEmailGroupBy) StringX(ctx context.Context) string
- func (uegb *UserEmailGroupBy) Strings(ctx context.Context) ([]string, error)
- func (uegb *UserEmailGroupBy) StringsX(ctx context.Context) []string
- type UserEmailMutation
- func (m *UserEmailMutation) AddField(name string, value ent.Value) error
- func (m *UserEmailMutation) AddedEdges() []string
- func (m *UserEmailMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserEmailMutation) AddedFields() []string
- func (m *UserEmailMutation) AddedIDs(name string) []ent.Value
- func (m *UserEmailMutation) ClearEdge(name string) error
- func (m *UserEmailMutation) ClearEmailOwner()
- func (m *UserEmailMutation) ClearField(name string) error
- func (m *UserEmailMutation) ClearVerifedTime()
- func (m *UserEmailMutation) ClearVerifyTicket()
- func (m *UserEmailMutation) ClearedEdges() []string
- func (m *UserEmailMutation) ClearedFields() []string
- func (m UserEmailMutation) Client() *Client
- func (m *UserEmailMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserEmailMutation) EdgeCleared(name string) bool
- func (m *UserEmailMutation) Email() (r string, exists bool)
- func (m *UserEmailMutation) EmailOwnerCleared() bool
- func (m *UserEmailMutation) EmailOwnerID() (id int, exists bool)
- func (m *UserEmailMutation) EmailOwnerIDs() (ids []int)
- func (m *UserEmailMutation) Field(name string) (ent.Value, bool)
- func (m *UserEmailMutation) FieldCleared(name string) bool
- func (m *UserEmailMutation) Fields() []string
- func (m *UserEmailMutation) ID() (id int, exists bool)
- func (m *UserEmailMutation) IsPrimary() (r bool, exists bool)
- func (m *UserEmailMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserEmailMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserEmailMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserEmailMutation) OldIsPrimary(ctx context.Context) (v bool, err error)
- func (m *UserEmailMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *UserEmailMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserEmailMutation) OldVerifed(ctx context.Context) (v bool, err error)
- func (m *UserEmailMutation) OldVerifedTime(ctx context.Context) (v *time.Time, err error)
- func (m *UserEmailMutation) OldVerifyTicket(ctx context.Context) (v *string, err error)
- func (m *UserEmailMutation) Op() Op
- func (m *UserEmailMutation) OwnerID() (r int, exists bool)
- func (m *UserEmailMutation) RemovedEdges() []string
- func (m *UserEmailMutation) RemovedIDs(name string) []ent.Value
- func (m *UserEmailMutation) ResetCreateTime()
- func (m *UserEmailMutation) ResetEdge(name string) error
- func (m *UserEmailMutation) ResetEmail()
- func (m *UserEmailMutation) ResetEmailOwner()
- func (m *UserEmailMutation) ResetField(name string) error
- func (m *UserEmailMutation) ResetIsPrimary()
- func (m *UserEmailMutation) ResetOwnerID()
- func (m *UserEmailMutation) ResetUpdateTime()
- func (m *UserEmailMutation) ResetVerifed()
- func (m *UserEmailMutation) ResetVerifedTime()
- func (m *UserEmailMutation) ResetVerifyTicket()
- func (m *UserEmailMutation) SetCreateTime(t time.Time)
- func (m *UserEmailMutation) SetEmail(s string)
- func (m *UserEmailMutation) SetEmailOwnerID(id int)
- func (m *UserEmailMutation) SetField(name string, value ent.Value) error
- func (m *UserEmailMutation) SetID(id int)
- func (m *UserEmailMutation) SetIsPrimary(b bool)
- func (m *UserEmailMutation) SetOwnerID(i int)
- func (m *UserEmailMutation) SetUpdateTime(t time.Time)
- func (m *UserEmailMutation) SetVerifed(b bool)
- func (m *UserEmailMutation) SetVerifedTime(t time.Time)
- func (m *UserEmailMutation) SetVerifyTicket(s string)
- func (m UserEmailMutation) Tx() (*Tx, error)
- func (m *UserEmailMutation) Type() string
- func (m *UserEmailMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserEmailMutation) Verifed() (r bool, exists bool)
- func (m *UserEmailMutation) VerifedTime() (r time.Time, exists bool)
- func (m *UserEmailMutation) VerifedTimeCleared() bool
- func (m *UserEmailMutation) VerifyTicket() (r string, exists bool)
- func (m *UserEmailMutation) VerifyTicketCleared() bool
- type UserEmailQuery
- func (ueq *UserEmailQuery) All(ctx context.Context) ([]*UserEmail, error)
- func (ueq *UserEmailQuery) AllX(ctx context.Context) []*UserEmail
- func (ueq *UserEmailQuery) Clone() *UserEmailQuery
- func (ueq *UserEmailQuery) Count(ctx context.Context) (int, error)
- func (ueq *UserEmailQuery) CountX(ctx context.Context) int
- func (ueq *UserEmailQuery) Exist(ctx context.Context) (bool, error)
- func (ueq *UserEmailQuery) ExistX(ctx context.Context) bool
- func (ueq *UserEmailQuery) First(ctx context.Context) (*UserEmail, error)
- func (ueq *UserEmailQuery) FirstID(ctx context.Context) (id int, err error)
- func (ueq *UserEmailQuery) FirstIDX(ctx context.Context) int
- func (ueq *UserEmailQuery) FirstX(ctx context.Context) *UserEmail
- func (ueq *UserEmailQuery) GroupBy(field string, fields ...string) *UserEmailGroupBy
- func (ueq *UserEmailQuery) IDs(ctx context.Context) ([]int, error)
- func (ueq *UserEmailQuery) IDsX(ctx context.Context) []int
- func (ueq *UserEmailQuery) Limit(limit int) *UserEmailQuery
- func (ueq *UserEmailQuery) Offset(offset int) *UserEmailQuery
- func (ueq *UserEmailQuery) Only(ctx context.Context) (*UserEmail, error)
- func (ueq *UserEmailQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ueq *UserEmailQuery) OnlyIDX(ctx context.Context) int
- func (ueq *UserEmailQuery) OnlyX(ctx context.Context) *UserEmail
- func (ueq *UserEmailQuery) Order(o ...OrderFunc) *UserEmailQuery
- func (ueq *UserEmailQuery) QueryEmailOwner() *UserQuery
- func (ueq *UserEmailQuery) Select(field string, fields ...string) *UserEmailSelect
- func (ueq *UserEmailQuery) Unique(unique bool) *UserEmailQuery
- func (ueq *UserEmailQuery) Where(ps ...predicate.UserEmail) *UserEmailQuery
- func (ueq *UserEmailQuery) WithEmailOwner(opts ...func(*UserQuery)) *UserEmailQuery
- type UserEmailSelect
- func (ues *UserEmailSelect) Bool(ctx context.Context) (_ bool, err error)
- func (ues *UserEmailSelect) BoolX(ctx context.Context) bool
- func (ues *UserEmailSelect) Bools(ctx context.Context) ([]bool, error)
- func (ues *UserEmailSelect) BoolsX(ctx context.Context) []bool
- func (ues *UserEmailSelect) Float64(ctx context.Context) (_ float64, err error)
- func (ues *UserEmailSelect) Float64X(ctx context.Context) float64
- func (ues *UserEmailSelect) Float64s(ctx context.Context) ([]float64, error)
- func (ues *UserEmailSelect) Float64sX(ctx context.Context) []float64
- func (ues *UserEmailSelect) Int(ctx context.Context) (_ int, err error)
- func (ues *UserEmailSelect) IntX(ctx context.Context) int
- func (ues *UserEmailSelect) Ints(ctx context.Context) ([]int, error)
- func (ues *UserEmailSelect) IntsX(ctx context.Context) []int
- func (ues *UserEmailSelect) Scan(ctx context.Context, v interface{}) error
- func (ues *UserEmailSelect) ScanX(ctx context.Context, v interface{})
- func (ues *UserEmailSelect) String(ctx context.Context) (_ string, err error)
- func (ues *UserEmailSelect) StringX(ctx context.Context) string
- func (ues *UserEmailSelect) Strings(ctx context.Context) ([]string, error)
- func (ues *UserEmailSelect) StringsX(ctx context.Context) []string
- type UserEmailUpdate
- func (ueu *UserEmailUpdate) ClearEmailOwner() *UserEmailUpdate
- func (ueu *UserEmailUpdate) ClearVerifedTime() *UserEmailUpdate
- func (ueu *UserEmailUpdate) ClearVerifyTicket() *UserEmailUpdate
- func (ueu *UserEmailUpdate) Exec(ctx context.Context) error
- func (ueu *UserEmailUpdate) ExecX(ctx context.Context)
- func (ueu *UserEmailUpdate) Mutation() *UserEmailMutation
- func (ueu *UserEmailUpdate) Save(ctx context.Context) (int, error)
- func (ueu *UserEmailUpdate) SaveX(ctx context.Context) int
- func (ueu *UserEmailUpdate) SetEmail(s string) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetEmailOwner(u *User) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetEmailOwnerID(id int) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetIsPrimary(b bool) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetNillableIsPrimary(b *bool) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetNillableVerifed(b *bool) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetNillableVerifedTime(t *time.Time) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetNillableVerifyTicket(s *string) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetOwnerID(i int) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetUpdateTime(t time.Time) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetVerifed(b bool) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetVerifedTime(t time.Time) *UserEmailUpdate
- func (ueu *UserEmailUpdate) SetVerifyTicket(s string) *UserEmailUpdate
- func (ueu *UserEmailUpdate) Where(ps ...predicate.UserEmail) *UserEmailUpdate
- type UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) ClearEmailOwner() *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) ClearVerifedTime() *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) ClearVerifyTicket() *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) Exec(ctx context.Context) error
- func (ueuo *UserEmailUpdateOne) ExecX(ctx context.Context)
- func (ueuo *UserEmailUpdateOne) Mutation() *UserEmailMutation
- func (ueuo *UserEmailUpdateOne) Save(ctx context.Context) (*UserEmail, error)
- func (ueuo *UserEmailUpdateOne) SaveX(ctx context.Context) *UserEmail
- func (ueuo *UserEmailUpdateOne) Select(field string, fields ...string) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetEmail(s string) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetEmailOwner(u *User) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetEmailOwnerID(id int) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetIsPrimary(b bool) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetNillableIsPrimary(b *bool) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetNillableVerifed(b *bool) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetNillableVerifedTime(t *time.Time) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetNillableVerifyTicket(s *string) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetOwnerID(i int) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetUpdateTime(t time.Time) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetVerifed(b bool) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetVerifedTime(t time.Time) *UserEmailUpdateOne
- func (ueuo *UserEmailUpdateOne) SetVerifyTicket(s string) *UserEmailUpdateOne
- type UserEmails
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ugb *UserGroupBy) IntX(ctx context.Context) int
- func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
- func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (ugb *UserGroupBy) StringX(ctx context.Context) string
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddUserEmailIDs(ids ...int)
- func (m *UserMutation) AddUserSecurityLogIDs(ids ...int)
- func (m *UserMutation) AddUserSettingIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearDeleteTime()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearLastPwdAuth()
- func (m *UserMutation) ClearPassword()
- func (m *UserMutation) ClearPhone()
- func (m *UserMutation) ClearStatus()
- func (m *UserMutation) ClearUserEmails()
- func (m *UserMutation) ClearUserSecurityLogs()
- func (m *UserMutation) ClearUserSettings()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserMutation) DeleteTime() (r time.Time, exists bool)
- func (m *UserMutation) DeleteTimeCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) LastPwdAuth() (r time.Time, exists bool)
- func (m *UserMutation) LastPwdAuthCleared() bool
- func (m *UserMutation) Nickname() (r string, exists bool)
- func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDeleteTime(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldLastPwdAuth(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldNickname(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldPhone(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldSignature(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldSn(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldStatus(ctx context.Context) (v *user.Status, err error)
- func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) PasswordCleared() bool
- func (m *UserMutation) Phone() (r string, exists bool)
- func (m *UserMutation) PhoneCleared() bool
- func (m *UserMutation) RemoveUserEmailIDs(ids ...int)
- func (m *UserMutation) RemoveUserSecurityLogIDs(ids ...int)
- func (m *UserMutation) RemoveUserSettingIDs(ids ...int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedUserEmailsIDs() (ids []int)
- func (m *UserMutation) RemovedUserSecurityLogsIDs() (ids []int)
- func (m *UserMutation) RemovedUserSettingsIDs() (ids []int)
- func (m *UserMutation) ResetCreateTime()
- func (m *UserMutation) ResetDeleteTime()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetLastPwdAuth()
- func (m *UserMutation) ResetNickname()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetPhone()
- func (m *UserMutation) ResetSignature()
- func (m *UserMutation) ResetSn()
- func (m *UserMutation) ResetStatus()
- func (m *UserMutation) ResetUpdateTime()
- func (m *UserMutation) ResetUserEmails()
- func (m *UserMutation) ResetUserSecurityLogs()
- func (m *UserMutation) ResetUserSettings()
- func (m *UserMutation) SetCreateTime(t time.Time)
- func (m *UserMutation) SetDeleteTime(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id int)
- func (m *UserMutation) SetLastPwdAuth(t time.Time)
- func (m *UserMutation) SetNickname(s string)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetPhone(s string)
- func (m *UserMutation) SetSignature(s string)
- func (m *UserMutation) SetSn(s string)
- func (m *UserMutation) SetStatus(u user.Status)
- func (m *UserMutation) SetUpdateTime(t time.Time)
- func (m *UserMutation) Signature() (r string, exists bool)
- func (m *UserMutation) Sn() (r string, exists bool)
- func (m *UserMutation) Status() (r user.Status, exists bool)
- func (m *UserMutation) StatusCleared() bool
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserMutation) UserEmailsCleared() bool
- func (m *UserMutation) UserEmailsIDs() (ids []int)
- func (m *UserMutation) UserSecurityLogsCleared() bool
- func (m *UserMutation) UserSecurityLogsIDs() (ids []int)
- func (m *UserMutation) UserSettingsCleared() bool
- func (m *UserMutation) UserSettingsIDs() (ids []int)
- type UserQuery
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryUserEmails() *UserEmailQuery
- func (uq *UserQuery) QueryUserSecurityLogs() *UserSecurityLogQuery
- func (uq *UserQuery) QueryUserSettings() *UserSettingQuery
- func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithUserEmails(opts ...func(*UserEmailQuery)) *UserQuery
- func (uq *UserQuery) WithUserSecurityLogs(opts ...func(*UserSecurityLogQuery)) *UserQuery
- func (uq *UserQuery) WithUserSettings(opts ...func(*UserSettingQuery)) *UserQuery
- type UserSecurityLog
- type UserSecurityLogClient
- func (c *UserSecurityLogClient) Create() *UserSecurityLogCreate
- func (c *UserSecurityLogClient) CreateBulk(builders ...*UserSecurityLogCreate) *UserSecurityLogCreateBulk
- func (c *UserSecurityLogClient) Delete() *UserSecurityLogDelete
- func (c *UserSecurityLogClient) DeleteOne(usl *UserSecurityLog) *UserSecurityLogDeleteOne
- func (c *UserSecurityLogClient) DeleteOneID(id int) *UserSecurityLogDeleteOne
- func (c *UserSecurityLogClient) Get(ctx context.Context, id int) (*UserSecurityLog, error)
- func (c *UserSecurityLogClient) GetX(ctx context.Context, id int) *UserSecurityLog
- func (c *UserSecurityLogClient) Hooks() []Hook
- func (c *UserSecurityLogClient) Query() *UserSecurityLogQuery
- func (c *UserSecurityLogClient) QuerySecurityLogsOwner(usl *UserSecurityLog) *UserQuery
- func (c *UserSecurityLogClient) Update() *UserSecurityLogUpdate
- func (c *UserSecurityLogClient) UpdateOne(usl *UserSecurityLog) *UserSecurityLogUpdateOne
- func (c *UserSecurityLogClient) UpdateOneID(id int) *UserSecurityLogUpdateOne
- func (c *UserSecurityLogClient) Use(hooks ...Hook)
- type UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) Mutation() *UserSecurityLogMutation
- func (uslc *UserSecurityLogCreate) Save(ctx context.Context) (*UserSecurityLog, error)
- func (uslc *UserSecurityLogCreate) SaveX(ctx context.Context) *UserSecurityLog
- func (uslc *UserSecurityLogCreate) SetAction(u usersecuritylog.Action) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetCreateTime(t time.Time) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetDescription(s string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetID(i int) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetIP(s string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableCreateTime(t *time.Time) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableDescription(s *string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableIP(s *string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableRemark(s *string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableRequestID(s *string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetNillableServerVersion(s *string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetOwnerID(i int) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetRemark(s string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetRequestID(s string) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetSecurityLogsOwner(u *User) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetSecurityLogsOwnerID(id int) *UserSecurityLogCreate
- func (uslc *UserSecurityLogCreate) SetServerVersion(s string) *UserSecurityLogCreate
- type UserSecurityLogCreateBulk
- type UserSecurityLogDelete
- type UserSecurityLogDeleteOne
- type UserSecurityLogEdges
- type UserSecurityLogGroupBy
- func (uslgb *UserSecurityLogGroupBy) Aggregate(fns ...AggregateFunc) *UserSecurityLogGroupBy
- func (uslgb *UserSecurityLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (uslgb *UserSecurityLogGroupBy) BoolX(ctx context.Context) bool
- func (uslgb *UserSecurityLogGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (uslgb *UserSecurityLogGroupBy) BoolsX(ctx context.Context) []bool
- func (uslgb *UserSecurityLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (uslgb *UserSecurityLogGroupBy) Float64X(ctx context.Context) float64
- func (uslgb *UserSecurityLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (uslgb *UserSecurityLogGroupBy) Float64sX(ctx context.Context) []float64
- func (uslgb *UserSecurityLogGroupBy) Int(ctx context.Context) (_ int, err error)
- func (uslgb *UserSecurityLogGroupBy) IntX(ctx context.Context) int
- func (uslgb *UserSecurityLogGroupBy) Ints(ctx context.Context) ([]int, error)
- func (uslgb *UserSecurityLogGroupBy) IntsX(ctx context.Context) []int
- func (uslgb *UserSecurityLogGroupBy) Scan(ctx context.Context, v interface{}) error
- func (uslgb *UserSecurityLogGroupBy) ScanX(ctx context.Context, v interface{})
- func (uslgb *UserSecurityLogGroupBy) String(ctx context.Context) (_ string, err error)
- func (uslgb *UserSecurityLogGroupBy) StringX(ctx context.Context) string
- func (uslgb *UserSecurityLogGroupBy) Strings(ctx context.Context) ([]string, error)
- func (uslgb *UserSecurityLogGroupBy) StringsX(ctx context.Context) []string
- type UserSecurityLogMutation
- func (m *UserSecurityLogMutation) Action() (r usersecuritylog.Action, exists bool)
- func (m *UserSecurityLogMutation) AddField(name string, value ent.Value) error
- func (m *UserSecurityLogMutation) AddedEdges() []string
- func (m *UserSecurityLogMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserSecurityLogMutation) AddedFields() []string
- func (m *UserSecurityLogMutation) AddedIDs(name string) []ent.Value
- func (m *UserSecurityLogMutation) ClearDescription()
- func (m *UserSecurityLogMutation) ClearEdge(name string) error
- func (m *UserSecurityLogMutation) ClearField(name string) error
- func (m *UserSecurityLogMutation) ClearIP()
- func (m *UserSecurityLogMutation) ClearRemark()
- func (m *UserSecurityLogMutation) ClearRequestID()
- func (m *UserSecurityLogMutation) ClearSecurityLogsOwner()
- func (m *UserSecurityLogMutation) ClearServerVersion()
- func (m *UserSecurityLogMutation) ClearedEdges() []string
- func (m *UserSecurityLogMutation) ClearedFields() []string
- func (m UserSecurityLogMutation) Client() *Client
- func (m *UserSecurityLogMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserSecurityLogMutation) Description() (r string, exists bool)
- func (m *UserSecurityLogMutation) DescriptionCleared() bool
- func (m *UserSecurityLogMutation) EdgeCleared(name string) bool
- func (m *UserSecurityLogMutation) Field(name string) (ent.Value, bool)
- func (m *UserSecurityLogMutation) FieldCleared(name string) bool
- func (m *UserSecurityLogMutation) Fields() []string
- func (m *UserSecurityLogMutation) ID() (id int, exists bool)
- func (m *UserSecurityLogMutation) IP() (r string, exists bool)
- func (m *UserSecurityLogMutation) IPCleared() bool
- func (m *UserSecurityLogMutation) OldAction(ctx context.Context) (v usersecuritylog.Action, err error)
- func (m *UserSecurityLogMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserSecurityLogMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *UserSecurityLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserSecurityLogMutation) OldIP(ctx context.Context) (v *string, err error)
- func (m *UserSecurityLogMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *UserSecurityLogMutation) OldRemark(ctx context.Context) (v *string, err error)
- func (m *UserSecurityLogMutation) OldRequestID(ctx context.Context) (v *string, err error)
- func (m *UserSecurityLogMutation) OldServerVersion(ctx context.Context) (v *string, err error)
- func (m *UserSecurityLogMutation) Op() Op
- func (m *UserSecurityLogMutation) OwnerID() (r int, exists bool)
- func (m *UserSecurityLogMutation) Remark() (r string, exists bool)
- func (m *UserSecurityLogMutation) RemarkCleared() bool
- func (m *UserSecurityLogMutation) RemovedEdges() []string
- func (m *UserSecurityLogMutation) RemovedIDs(name string) []ent.Value
- func (m *UserSecurityLogMutation) RequestID() (r string, exists bool)
- func (m *UserSecurityLogMutation) RequestIDCleared() bool
- func (m *UserSecurityLogMutation) ResetAction()
- func (m *UserSecurityLogMutation) ResetCreateTime()
- func (m *UserSecurityLogMutation) ResetDescription()
- func (m *UserSecurityLogMutation) ResetEdge(name string) error
- func (m *UserSecurityLogMutation) ResetField(name string) error
- func (m *UserSecurityLogMutation) ResetIP()
- func (m *UserSecurityLogMutation) ResetOwnerID()
- func (m *UserSecurityLogMutation) ResetRemark()
- func (m *UserSecurityLogMutation) ResetRequestID()
- func (m *UserSecurityLogMutation) ResetSecurityLogsOwner()
- func (m *UserSecurityLogMutation) ResetServerVersion()
- func (m *UserSecurityLogMutation) SecurityLogsOwnerCleared() bool
- func (m *UserSecurityLogMutation) SecurityLogsOwnerID() (id int, exists bool)
- func (m *UserSecurityLogMutation) SecurityLogsOwnerIDs() (ids []int)
- func (m *UserSecurityLogMutation) ServerVersion() (r string, exists bool)
- func (m *UserSecurityLogMutation) ServerVersionCleared() bool
- func (m *UserSecurityLogMutation) SetAction(u usersecuritylog.Action)
- func (m *UserSecurityLogMutation) SetCreateTime(t time.Time)
- func (m *UserSecurityLogMutation) SetDescription(s string)
- func (m *UserSecurityLogMutation) SetField(name string, value ent.Value) error
- func (m *UserSecurityLogMutation) SetID(id int)
- func (m *UserSecurityLogMutation) SetIP(s string)
- func (m *UserSecurityLogMutation) SetOwnerID(i int)
- func (m *UserSecurityLogMutation) SetRemark(s string)
- func (m *UserSecurityLogMutation) SetRequestID(s string)
- func (m *UserSecurityLogMutation) SetSecurityLogsOwnerID(id int)
- func (m *UserSecurityLogMutation) SetServerVersion(s string)
- func (m UserSecurityLogMutation) Tx() (*Tx, error)
- func (m *UserSecurityLogMutation) Type() string
- type UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) All(ctx context.Context) ([]*UserSecurityLog, error)
- func (uslq *UserSecurityLogQuery) AllX(ctx context.Context) []*UserSecurityLog
- func (uslq *UserSecurityLogQuery) Clone() *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) Count(ctx context.Context) (int, error)
- func (uslq *UserSecurityLogQuery) CountX(ctx context.Context) int
- func (uslq *UserSecurityLogQuery) Exist(ctx context.Context) (bool, error)
- func (uslq *UserSecurityLogQuery) ExistX(ctx context.Context) bool
- func (uslq *UserSecurityLogQuery) First(ctx context.Context) (*UserSecurityLog, error)
- func (uslq *UserSecurityLogQuery) FirstID(ctx context.Context) (id int, err error)
- func (uslq *UserSecurityLogQuery) FirstIDX(ctx context.Context) int
- func (uslq *UserSecurityLogQuery) FirstX(ctx context.Context) *UserSecurityLog
- func (uslq *UserSecurityLogQuery) GroupBy(field string, fields ...string) *UserSecurityLogGroupBy
- func (uslq *UserSecurityLogQuery) IDs(ctx context.Context) ([]int, error)
- func (uslq *UserSecurityLogQuery) IDsX(ctx context.Context) []int
- func (uslq *UserSecurityLogQuery) Limit(limit int) *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) Offset(offset int) *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) Only(ctx context.Context) (*UserSecurityLog, error)
- func (uslq *UserSecurityLogQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uslq *UserSecurityLogQuery) OnlyIDX(ctx context.Context) int
- func (uslq *UserSecurityLogQuery) OnlyX(ctx context.Context) *UserSecurityLog
- func (uslq *UserSecurityLogQuery) Order(o ...OrderFunc) *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) QuerySecurityLogsOwner() *UserQuery
- func (uslq *UserSecurityLogQuery) Select(field string, fields ...string) *UserSecurityLogSelect
- func (uslq *UserSecurityLogQuery) Unique(unique bool) *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) Where(ps ...predicate.UserSecurityLog) *UserSecurityLogQuery
- func (uslq *UserSecurityLogQuery) WithSecurityLogsOwner(opts ...func(*UserQuery)) *UserSecurityLogQuery
- type UserSecurityLogSelect
- func (usls *UserSecurityLogSelect) Bool(ctx context.Context) (_ bool, err error)
- func (usls *UserSecurityLogSelect) BoolX(ctx context.Context) bool
- func (usls *UserSecurityLogSelect) Bools(ctx context.Context) ([]bool, error)
- func (usls *UserSecurityLogSelect) BoolsX(ctx context.Context) []bool
- func (usls *UserSecurityLogSelect) Float64(ctx context.Context) (_ float64, err error)
- func (usls *UserSecurityLogSelect) Float64X(ctx context.Context) float64
- func (usls *UserSecurityLogSelect) Float64s(ctx context.Context) ([]float64, error)
- func (usls *UserSecurityLogSelect) Float64sX(ctx context.Context) []float64
- func (usls *UserSecurityLogSelect) Int(ctx context.Context) (_ int, err error)
- func (usls *UserSecurityLogSelect) IntX(ctx context.Context) int
- func (usls *UserSecurityLogSelect) Ints(ctx context.Context) ([]int, error)
- func (usls *UserSecurityLogSelect) IntsX(ctx context.Context) []int
- func (usls *UserSecurityLogSelect) Scan(ctx context.Context, v interface{}) error
- func (usls *UserSecurityLogSelect) ScanX(ctx context.Context, v interface{})
- func (usls *UserSecurityLogSelect) String(ctx context.Context) (_ string, err error)
- func (usls *UserSecurityLogSelect) StringX(ctx context.Context) string
- func (usls *UserSecurityLogSelect) Strings(ctx context.Context) ([]string, error)
- func (usls *UserSecurityLogSelect) StringsX(ctx context.Context) []string
- type UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearDescription() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearIP() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearRemark() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearRequestID() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearSecurityLogsOwner() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) ClearServerVersion() *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) Exec(ctx context.Context) error
- func (uslu *UserSecurityLogUpdate) ExecX(ctx context.Context)
- func (uslu *UserSecurityLogUpdate) Mutation() *UserSecurityLogMutation
- func (uslu *UserSecurityLogUpdate) Save(ctx context.Context) (int, error)
- func (uslu *UserSecurityLogUpdate) SaveX(ctx context.Context) int
- func (uslu *UserSecurityLogUpdate) SetAction(u usersecuritylog.Action) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetDescription(s string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetIP(s string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableDescription(s *string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableIP(s *string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableRemark(s *string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableRequestID(s *string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetNillableServerVersion(s *string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetOwnerID(i int) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetRemark(s string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetRequestID(s string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetSecurityLogsOwner(u *User) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetSecurityLogsOwnerID(id int) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) SetServerVersion(s string) *UserSecurityLogUpdate
- func (uslu *UserSecurityLogUpdate) Where(ps ...predicate.UserSecurityLog) *UserSecurityLogUpdate
- type UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearDescription() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearIP() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearRemark() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearRequestID() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearSecurityLogsOwner() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) ClearServerVersion() *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) Exec(ctx context.Context) error
- func (usluo *UserSecurityLogUpdateOne) ExecX(ctx context.Context)
- func (usluo *UserSecurityLogUpdateOne) Mutation() *UserSecurityLogMutation
- func (usluo *UserSecurityLogUpdateOne) Save(ctx context.Context) (*UserSecurityLog, error)
- func (usluo *UserSecurityLogUpdateOne) SaveX(ctx context.Context) *UserSecurityLog
- func (usluo *UserSecurityLogUpdateOne) Select(field string, fields ...string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetAction(u usersecuritylog.Action) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetDescription(s string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetIP(s string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableDescription(s *string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableIP(s *string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableRemark(s *string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableRequestID(s *string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetNillableServerVersion(s *string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetOwnerID(i int) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetRemark(s string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetRequestID(s string) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetSecurityLogsOwner(u *User) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetSecurityLogsOwnerID(id int) *UserSecurityLogUpdateOne
- func (usluo *UserSecurityLogUpdateOne) SetServerVersion(s string) *UserSecurityLogUpdateOne
- type UserSecurityLogs
- type UserSelect
- func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (us *UserSelect) BoolX(ctx context.Context) bool
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (us *UserSelect) Float64X(ctx context.Context) float64
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (us *UserSelect) IntX(ctx context.Context) int
- func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (us *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
- func (us *UserSelect) ScanX(ctx context.Context, v interface{})
- func (us *UserSelect) String(ctx context.Context) (_ string, err error)
- func (us *UserSelect) StringX(ctx context.Context) string
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserSetting
- type UserSettingClient
- func (c *UserSettingClient) Create() *UserSettingCreate
- func (c *UserSettingClient) CreateBulk(builders ...*UserSettingCreate) *UserSettingCreateBulk
- func (c *UserSettingClient) Delete() *UserSettingDelete
- func (c *UserSettingClient) DeleteOne(us *UserSetting) *UserSettingDeleteOne
- func (c *UserSettingClient) DeleteOneID(id int) *UserSettingDeleteOne
- func (c *UserSettingClient) Get(ctx context.Context, id int) (*UserSetting, error)
- func (c *UserSettingClient) GetX(ctx context.Context, id int) *UserSetting
- func (c *UserSettingClient) Hooks() []Hook
- func (c *UserSettingClient) Query() *UserSettingQuery
- func (c *UserSettingClient) QuerySettingsOwner(us *UserSetting) *UserQuery
- func (c *UserSettingClient) Update() *UserSettingUpdate
- func (c *UserSettingClient) UpdateOne(us *UserSetting) *UserSettingUpdateOne
- func (c *UserSettingClient) UpdateOneID(id int) *UserSettingUpdateOne
- func (c *UserSettingClient) Use(hooks ...Hook)
- type UserSettingCreate
- func (usc *UserSettingCreate) Mutation() *UserSettingMutation
- func (usc *UserSettingCreate) Save(ctx context.Context) (*UserSetting, error)
- func (usc *UserSettingCreate) SaveX(ctx context.Context) *UserSetting
- func (usc *UserSettingCreate) SetID(i int) *UserSettingCreate
- func (usc *UserSettingCreate) SetKey(s string) *UserSettingCreate
- func (usc *UserSettingCreate) SetNillableTypeof(u *usersetting.Typeof) *UserSettingCreate
- func (usc *UserSettingCreate) SetOwnerID(i int) *UserSettingCreate
- func (usc *UserSettingCreate) SetSettingsOwner(u *User) *UserSettingCreate
- func (usc *UserSettingCreate) SetSettingsOwnerID(id int) *UserSettingCreate
- func (usc *UserSettingCreate) SetTypeof(u usersetting.Typeof) *UserSettingCreate
- func (usc *UserSettingCreate) SetValue(s string) *UserSettingCreate
- type UserSettingCreateBulk
- type UserSettingDelete
- type UserSettingDeleteOne
- type UserSettingEdges
- type UserSettingGroupBy
- func (usgb *UserSettingGroupBy) Aggregate(fns ...AggregateFunc) *UserSettingGroupBy
- func (usgb *UserSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (usgb *UserSettingGroupBy) BoolX(ctx context.Context) bool
- func (usgb *UserSettingGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (usgb *UserSettingGroupBy) BoolsX(ctx context.Context) []bool
- func (usgb *UserSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (usgb *UserSettingGroupBy) Float64X(ctx context.Context) float64
- func (usgb *UserSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (usgb *UserSettingGroupBy) Float64sX(ctx context.Context) []float64
- func (usgb *UserSettingGroupBy) Int(ctx context.Context) (_ int, err error)
- func (usgb *UserSettingGroupBy) IntX(ctx context.Context) int
- func (usgb *UserSettingGroupBy) Ints(ctx context.Context) ([]int, error)
- func (usgb *UserSettingGroupBy) IntsX(ctx context.Context) []int
- func (usgb *UserSettingGroupBy) Scan(ctx context.Context, v interface{}) error
- func (usgb *UserSettingGroupBy) ScanX(ctx context.Context, v interface{})
- func (usgb *UserSettingGroupBy) String(ctx context.Context) (_ string, err error)
- func (usgb *UserSettingGroupBy) StringX(ctx context.Context) string
- func (usgb *UserSettingGroupBy) Strings(ctx context.Context) ([]string, error)
- func (usgb *UserSettingGroupBy) StringsX(ctx context.Context) []string
- type UserSettingMutation
- func (m *UserSettingMutation) AddField(name string, value ent.Value) error
- func (m *UserSettingMutation) AddedEdges() []string
- func (m *UserSettingMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserSettingMutation) AddedFields() []string
- func (m *UserSettingMutation) AddedIDs(name string) []ent.Value
- func (m *UserSettingMutation) ClearEdge(name string) error
- func (m *UserSettingMutation) ClearField(name string) error
- func (m *UserSettingMutation) ClearSettingsOwner()
- func (m *UserSettingMutation) ClearedEdges() []string
- func (m *UserSettingMutation) ClearedFields() []string
- func (m UserSettingMutation) Client() *Client
- func (m *UserSettingMutation) EdgeCleared(name string) bool
- func (m *UserSettingMutation) Field(name string) (ent.Value, bool)
- func (m *UserSettingMutation) FieldCleared(name string) bool
- func (m *UserSettingMutation) Fields() []string
- func (m *UserSettingMutation) ID() (id int, exists bool)
- func (m *UserSettingMutation) Key() (r string, exists bool)
- func (m *UserSettingMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserSettingMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *UserSettingMutation) OldOwnerID(ctx context.Context) (v int, err error)
- func (m *UserSettingMutation) OldTypeof(ctx context.Context) (v usersetting.Typeof, err error)
- func (m *UserSettingMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *UserSettingMutation) Op() Op
- func (m *UserSettingMutation) OwnerID() (r int, exists bool)
- func (m *UserSettingMutation) RemovedEdges() []string
- func (m *UserSettingMutation) RemovedIDs(name string) []ent.Value
- func (m *UserSettingMutation) ResetEdge(name string) error
- func (m *UserSettingMutation) ResetField(name string) error
- func (m *UserSettingMutation) ResetKey()
- func (m *UserSettingMutation) ResetOwnerID()
- func (m *UserSettingMutation) ResetSettingsOwner()
- func (m *UserSettingMutation) ResetTypeof()
- func (m *UserSettingMutation) ResetValue()
- func (m *UserSettingMutation) SetField(name string, value ent.Value) error
- func (m *UserSettingMutation) SetID(id int)
- func (m *UserSettingMutation) SetKey(s string)
- func (m *UserSettingMutation) SetOwnerID(i int)
- func (m *UserSettingMutation) SetSettingsOwnerID(id int)
- func (m *UserSettingMutation) SetTypeof(u usersetting.Typeof)
- func (m *UserSettingMutation) SetValue(s string)
- func (m *UserSettingMutation) SettingsOwnerCleared() bool
- func (m *UserSettingMutation) SettingsOwnerID() (id int, exists bool)
- func (m *UserSettingMutation) SettingsOwnerIDs() (ids []int)
- func (m UserSettingMutation) Tx() (*Tx, error)
- func (m *UserSettingMutation) Type() string
- func (m *UserSettingMutation) Typeof() (r usersetting.Typeof, exists bool)
- func (m *UserSettingMutation) Value() (r string, exists bool)
- type UserSettingQuery
- func (usq *UserSettingQuery) All(ctx context.Context) ([]*UserSetting, error)
- func (usq *UserSettingQuery) AllX(ctx context.Context) []*UserSetting
- func (usq *UserSettingQuery) Clone() *UserSettingQuery
- func (usq *UserSettingQuery) Count(ctx context.Context) (int, error)
- func (usq *UserSettingQuery) CountX(ctx context.Context) int
- func (usq *UserSettingQuery) Exist(ctx context.Context) (bool, error)
- func (usq *UserSettingQuery) ExistX(ctx context.Context) bool
- func (usq *UserSettingQuery) First(ctx context.Context) (*UserSetting, error)
- func (usq *UserSettingQuery) FirstID(ctx context.Context) (id int, err error)
- func (usq *UserSettingQuery) FirstIDX(ctx context.Context) int
- func (usq *UserSettingQuery) FirstX(ctx context.Context) *UserSetting
- func (usq *UserSettingQuery) GroupBy(field string, fields ...string) *UserSettingGroupBy
- func (usq *UserSettingQuery) IDs(ctx context.Context) ([]int, error)
- func (usq *UserSettingQuery) IDsX(ctx context.Context) []int
- func (usq *UserSettingQuery) Limit(limit int) *UserSettingQuery
- func (usq *UserSettingQuery) Offset(offset int) *UserSettingQuery
- func (usq *UserSettingQuery) Only(ctx context.Context) (*UserSetting, error)
- func (usq *UserSettingQuery) OnlyID(ctx context.Context) (id int, err error)
- func (usq *UserSettingQuery) OnlyIDX(ctx context.Context) int
- func (usq *UserSettingQuery) OnlyX(ctx context.Context) *UserSetting
- func (usq *UserSettingQuery) Order(o ...OrderFunc) *UserSettingQuery
- func (usq *UserSettingQuery) QuerySettingsOwner() *UserQuery
- func (usq *UserSettingQuery) Select(field string, fields ...string) *UserSettingSelect
- func (usq *UserSettingQuery) Unique(unique bool) *UserSettingQuery
- func (usq *UserSettingQuery) Where(ps ...predicate.UserSetting) *UserSettingQuery
- func (usq *UserSettingQuery) WithSettingsOwner(opts ...func(*UserQuery)) *UserSettingQuery
- type UserSettingSelect
- func (uss *UserSettingSelect) Bool(ctx context.Context) (_ bool, err error)
- func (uss *UserSettingSelect) BoolX(ctx context.Context) bool
- func (uss *UserSettingSelect) Bools(ctx context.Context) ([]bool, error)
- func (uss *UserSettingSelect) BoolsX(ctx context.Context) []bool
- func (uss *UserSettingSelect) Float64(ctx context.Context) (_ float64, err error)
- func (uss *UserSettingSelect) Float64X(ctx context.Context) float64
- func (uss *UserSettingSelect) Float64s(ctx context.Context) ([]float64, error)
- func (uss *UserSettingSelect) Float64sX(ctx context.Context) []float64
- func (uss *UserSettingSelect) Int(ctx context.Context) (_ int, err error)
- func (uss *UserSettingSelect) IntX(ctx context.Context) int
- func (uss *UserSettingSelect) Ints(ctx context.Context) ([]int, error)
- func (uss *UserSettingSelect) IntsX(ctx context.Context) []int
- func (uss *UserSettingSelect) Scan(ctx context.Context, v interface{}) error
- func (uss *UserSettingSelect) ScanX(ctx context.Context, v interface{})
- func (uss *UserSettingSelect) String(ctx context.Context) (_ string, err error)
- func (uss *UserSettingSelect) StringX(ctx context.Context) string
- func (uss *UserSettingSelect) Strings(ctx context.Context) ([]string, error)
- func (uss *UserSettingSelect) StringsX(ctx context.Context) []string
- type UserSettingUpdate
- func (usu *UserSettingUpdate) ClearSettingsOwner() *UserSettingUpdate
- func (usu *UserSettingUpdate) Exec(ctx context.Context) error
- func (usu *UserSettingUpdate) ExecX(ctx context.Context)
- func (usu *UserSettingUpdate) Mutation() *UserSettingMutation
- func (usu *UserSettingUpdate) Save(ctx context.Context) (int, error)
- func (usu *UserSettingUpdate) SaveX(ctx context.Context) int
- func (usu *UserSettingUpdate) SetKey(s string) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetNillableTypeof(u *usersetting.Typeof) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetOwnerID(i int) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetSettingsOwner(u *User) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetSettingsOwnerID(id int) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetTypeof(u usersetting.Typeof) *UserSettingUpdate
- func (usu *UserSettingUpdate) SetValue(s string) *UserSettingUpdate
- func (usu *UserSettingUpdate) Where(ps ...predicate.UserSetting) *UserSettingUpdate
- type UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) ClearSettingsOwner() *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) Exec(ctx context.Context) error
- func (usuo *UserSettingUpdateOne) ExecX(ctx context.Context)
- func (usuo *UserSettingUpdateOne) Mutation() *UserSettingMutation
- func (usuo *UserSettingUpdateOne) Save(ctx context.Context) (*UserSetting, error)
- func (usuo *UserSettingUpdateOne) SaveX(ctx context.Context) *UserSetting
- func (usuo *UserSettingUpdateOne) Select(field string, fields ...string) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetKey(s string) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetNillableTypeof(u *usersetting.Typeof) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetOwnerID(i int) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetSettingsOwner(u *User) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetSettingsOwnerID(id int) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetTypeof(u usersetting.Typeof) *UserSettingUpdateOne
- func (usuo *UserSettingUpdateOne) SetValue(s string) *UserSettingUpdateOne
- type UserSettings
- type UserUpdate
- func (uu *UserUpdate) AddUserEmailIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddUserEmails(u ...*UserEmail) *UserUpdate
- func (uu *UserUpdate) AddUserSecurityLogIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddUserSecurityLogs(u ...*UserSecurityLog) *UserUpdate
- func (uu *UserUpdate) AddUserSettingIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddUserSettings(u ...*UserSetting) *UserUpdate
- func (uu *UserUpdate) ClearDeleteTime() *UserUpdate
- func (uu *UserUpdate) ClearLastPwdAuth() *UserUpdate
- func (uu *UserUpdate) ClearPassword() *UserUpdate
- func (uu *UserUpdate) ClearPhone() *UserUpdate
- func (uu *UserUpdate) ClearStatus() *UserUpdate
- func (uu *UserUpdate) ClearUserEmails() *UserUpdate
- func (uu *UserUpdate) ClearUserSecurityLogs() *UserUpdate
- func (uu *UserUpdate) ClearUserSettings() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveUserEmailIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveUserEmails(u ...*UserEmail) *UserUpdate
- func (uu *UserUpdate) RemoveUserSecurityLogIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveUserSecurityLogs(u ...*UserSecurityLog) *UserUpdate
- func (uu *UserUpdate) RemoveUserSettingIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveUserSettings(u ...*UserSetting) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetDeleteTime(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetLastPwdAuth(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetNickname(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableDeleteTime(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableLastPwdAuth(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePhone(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableStatus(u *user.Status) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetPhone(s string) *UserUpdate
- func (uu *UserUpdate) SetSignature(s string) *UserUpdate
- func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
- func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddUserEmailIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserEmails(u ...*UserEmail) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserSecurityLogIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserSecurityLogs(u ...*UserSecurityLog) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserSettingIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserSettings(u ...*UserSetting) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDeleteTime() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLastPwdAuth() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPhone() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearStatus() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUserEmails() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUserSecurityLogs() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUserSettings() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveUserEmailIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserEmails(u ...*UserEmail) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserSecurityLogIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserSecurityLogs(u ...*UserSecurityLog) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserSettingIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserSettings(u ...*UserSetting) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeleteTime(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastPwdAuth(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNickname(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeleteTime(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastPwdAuth(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePhone(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableStatus(u *user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPhone(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSignature(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
- type Users
- 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. TypeModelVersion = "ModelVersion" TypeSystemSetting = "SystemSetting" TypeUser = "User" TypeUserEmail = "UserEmail" TypeUserSecurityLog = "UserSecurityLog" TypeUserSetting = "UserSetting" )
const Version string = "14b42a33"
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 validaton error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
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(model.As(model.Sum(field1), "sum_field1"), (model.As(model.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 // ModelVersion is the client for interacting with the ModelVersion builders. ModelVersion *ModelVersionClient // SystemSetting is the client for interacting with the SystemSetting builders. SystemSetting *SystemSettingClient // User is the client for interacting with the User builders. User *UserClient // UserEmail is the client for interacting with the UserEmail builders. UserEmail *UserEmailClient // UserSecurityLog is the client for interacting with the UserSecurityLog builders. UserSecurityLog *UserSecurityLogClient // UserSetting is the client for interacting with the UserSetting builders. UserSetting *UserSettingClient // 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(). ModelVersion. Query(). Count(ctx)
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(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 ModelVersion ¶
type ModelVersion struct { // ID of the ent. ID int `json:"id,omitempty"` // Version holds the value of the "version" field. Version string `json:"version,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // contains filtered or unexported fields }
ModelVersion is the model entity for the ModelVersion schema.
func (*ModelVersion) String ¶
func (mv *ModelVersion) String() string
String implements the fmt.Stringer.
func (*ModelVersion) Unwrap ¶
func (mv *ModelVersion) Unwrap() *ModelVersion
Unwrap unwraps the ModelVersion 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 (*ModelVersion) Update ¶
func (mv *ModelVersion) Update() *ModelVersionUpdateOne
Update returns a builder for updating this ModelVersion. Note that you need to call ModelVersion.Unwrap() before calling this method if this ModelVersion was returned from a transaction, and the transaction was committed or rolled back.
type ModelVersionClient ¶
type ModelVersionClient struct {
// contains filtered or unexported fields
}
ModelVersionClient is a client for the ModelVersion schema.
func NewModelVersionClient ¶
func NewModelVersionClient(c config) *ModelVersionClient
NewModelVersionClient returns a client for the ModelVersion from the given config.
func (*ModelVersionClient) Create ¶
func (c *ModelVersionClient) Create() *ModelVersionCreate
Create returns a create builder for ModelVersion.
func (*ModelVersionClient) CreateBulk ¶
func (c *ModelVersionClient) CreateBulk(builders ...*ModelVersionCreate) *ModelVersionCreateBulk
CreateBulk returns a builder for creating a bulk of ModelVersion entities.
func (*ModelVersionClient) Delete ¶
func (c *ModelVersionClient) Delete() *ModelVersionDelete
Delete returns a delete builder for ModelVersion.
func (*ModelVersionClient) DeleteOne ¶
func (c *ModelVersionClient) DeleteOne(mv *ModelVersion) *ModelVersionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ModelVersionClient) DeleteOneID ¶
func (c *ModelVersionClient) DeleteOneID(id int) *ModelVersionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ModelVersionClient) Get ¶
func (c *ModelVersionClient) Get(ctx context.Context, id int) (*ModelVersion, error)
Get returns a ModelVersion entity by its id.
func (*ModelVersionClient) GetX ¶
func (c *ModelVersionClient) GetX(ctx context.Context, id int) *ModelVersion
GetX is like Get, but panics if an error occurs.
func (*ModelVersionClient) Hooks ¶
func (c *ModelVersionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ModelVersionClient) Query ¶
func (c *ModelVersionClient) Query() *ModelVersionQuery
Query returns a query builder for ModelVersion.
func (*ModelVersionClient) Update ¶
func (c *ModelVersionClient) Update() *ModelVersionUpdate
Update returns an update builder for ModelVersion.
func (*ModelVersionClient) UpdateOne ¶
func (c *ModelVersionClient) UpdateOne(mv *ModelVersion) *ModelVersionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ModelVersionClient) UpdateOneID ¶
func (c *ModelVersionClient) UpdateOneID(id int) *ModelVersionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ModelVersionClient) Use ¶
func (c *ModelVersionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `modelversion.Hooks(f(g(h())))`.
type ModelVersionCreate ¶
type ModelVersionCreate struct {
// contains filtered or unexported fields
}
ModelVersionCreate is the builder for creating a ModelVersion entity.
func (*ModelVersionCreate) Mutation ¶
func (mvc *ModelVersionCreate) Mutation() *ModelVersionMutation
Mutation returns the ModelVersionMutation object of the builder.
func (*ModelVersionCreate) Save ¶
func (mvc *ModelVersionCreate) Save(ctx context.Context) (*ModelVersion, error)
Save creates the ModelVersion in the database.
func (*ModelVersionCreate) SaveX ¶
func (mvc *ModelVersionCreate) SaveX(ctx context.Context) *ModelVersion
SaveX calls Save and panics if Save returns an error.
func (*ModelVersionCreate) SetID ¶
func (mvc *ModelVersionCreate) SetID(i int) *ModelVersionCreate
SetID sets the "id" field.
func (*ModelVersionCreate) SetNillableUpdateTime ¶
func (mvc *ModelVersionCreate) SetNillableUpdateTime(t *time.Time) *ModelVersionCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ModelVersionCreate) SetUpdateTime ¶
func (mvc *ModelVersionCreate) SetUpdateTime(t time.Time) *ModelVersionCreate
SetUpdateTime sets the "update_time" field.
func (*ModelVersionCreate) SetVersion ¶
func (mvc *ModelVersionCreate) SetVersion(s string) *ModelVersionCreate
SetVersion sets the "version" field.
type ModelVersionCreateBulk ¶
type ModelVersionCreateBulk struct {
// contains filtered or unexported fields
}
ModelVersionCreateBulk is the builder for creating many ModelVersion entities in bulk.
func (*ModelVersionCreateBulk) Save ¶
func (mvcb *ModelVersionCreateBulk) Save(ctx context.Context) ([]*ModelVersion, error)
Save creates the ModelVersion entities in the database.
func (*ModelVersionCreateBulk) SaveX ¶
func (mvcb *ModelVersionCreateBulk) SaveX(ctx context.Context) []*ModelVersion
SaveX is like Save, but panics if an error occurs.
type ModelVersionDelete ¶
type ModelVersionDelete struct {
// contains filtered or unexported fields
}
ModelVersionDelete is the builder for deleting a ModelVersion entity.
func (*ModelVersionDelete) Exec ¶
func (mvd *ModelVersionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ModelVersionDelete) ExecX ¶
func (mvd *ModelVersionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ModelVersionDelete) Where ¶
func (mvd *ModelVersionDelete) Where(ps ...predicate.ModelVersion) *ModelVersionDelete
Where adds a new predicate to the ModelVersionDelete builder.
type ModelVersionDeleteOne ¶
type ModelVersionDeleteOne struct {
// contains filtered or unexported fields
}
ModelVersionDeleteOne is the builder for deleting a single ModelVersion entity.
func (*ModelVersionDeleteOne) Exec ¶
func (mvdo *ModelVersionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ModelVersionDeleteOne) ExecX ¶
func (mvdo *ModelVersionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ModelVersionGroupBy ¶
type ModelVersionGroupBy struct {
// contains filtered or unexported fields
}
ModelVersionGroupBy is the group-by builder for ModelVersion entities.
func (*ModelVersionGroupBy) Aggregate ¶
func (mvgb *ModelVersionGroupBy) Aggregate(fns ...AggregateFunc) *ModelVersionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ModelVersionGroupBy) Bool ¶
func (mvgb *ModelVersionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ModelVersionGroupBy) BoolX ¶
func (mvgb *ModelVersionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ModelVersionGroupBy) Bools ¶
func (mvgb *ModelVersionGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*ModelVersionGroupBy) BoolsX ¶
func (mvgb *ModelVersionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ModelVersionGroupBy) Float64 ¶
func (mvgb *ModelVersionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ModelVersionGroupBy) Float64X ¶
func (mvgb *ModelVersionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ModelVersionGroupBy) Float64s ¶
func (mvgb *ModelVersionGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*ModelVersionGroupBy) Float64sX ¶
func (mvgb *ModelVersionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ModelVersionGroupBy) Int ¶
func (mvgb *ModelVersionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ModelVersionGroupBy) IntX ¶
func (mvgb *ModelVersionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ModelVersionGroupBy) Ints ¶
func (mvgb *ModelVersionGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*ModelVersionGroupBy) IntsX ¶
func (mvgb *ModelVersionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ModelVersionGroupBy) Scan ¶
func (mvgb *ModelVersionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ModelVersionGroupBy) ScanX ¶
func (mvgb *ModelVersionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ModelVersionGroupBy) String ¶
func (mvgb *ModelVersionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ModelVersionGroupBy) StringX ¶
func (mvgb *ModelVersionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ModelVersionMutation ¶
type ModelVersionMutation struct {
// contains filtered or unexported fields
}
ModelVersionMutation represents an operation that mutates the ModelVersion nodes in the graph.
func (*ModelVersionMutation) AddField ¶
func (m *ModelVersionMutation) 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 (*ModelVersionMutation) AddedEdges ¶
func (m *ModelVersionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ModelVersionMutation) AddedField ¶
func (m *ModelVersionMutation) 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 (*ModelVersionMutation) AddedFields ¶
func (m *ModelVersionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ModelVersionMutation) AddedIDs ¶
func (m *ModelVersionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ModelVersionMutation) ClearEdge ¶
func (m *ModelVersionMutation) 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 (*ModelVersionMutation) ClearField ¶
func (m *ModelVersionMutation) 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 (*ModelVersionMutation) ClearedEdges ¶
func (m *ModelVersionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ModelVersionMutation) ClearedFields ¶
func (m *ModelVersionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ModelVersionMutation) Client ¶
func (m ModelVersionMutation) 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 (*ModelVersionMutation) EdgeCleared ¶
func (m *ModelVersionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ModelVersionMutation) Field ¶
func (m *ModelVersionMutation) 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 (*ModelVersionMutation) FieldCleared ¶
func (m *ModelVersionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ModelVersionMutation) Fields ¶
func (m *ModelVersionMutation) 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 (*ModelVersionMutation) ID ¶
func (m *ModelVersionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*ModelVersionMutation) 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 (*ModelVersionMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the ModelVersion entity. If the ModelVersion 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 (*ModelVersionMutation) OldVersion ¶
func (m *ModelVersionMutation) OldVersion(ctx context.Context) (v string, err error)
OldVersion returns the old "version" field's value of the ModelVersion entity. If the ModelVersion 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 (*ModelVersionMutation) Op ¶
func (m *ModelVersionMutation) Op() Op
Op returns the operation name.
func (*ModelVersionMutation) RemovedEdges ¶
func (m *ModelVersionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ModelVersionMutation) RemovedIDs ¶
func (m *ModelVersionMutation) 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 (*ModelVersionMutation) ResetEdge ¶
func (m *ModelVersionMutation) 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 (*ModelVersionMutation) ResetField ¶
func (m *ModelVersionMutation) 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 (*ModelVersionMutation) ResetUpdateTime ¶
func (m *ModelVersionMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ModelVersionMutation) ResetVersion ¶
func (m *ModelVersionMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*ModelVersionMutation) SetField ¶
func (m *ModelVersionMutation) 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 (*ModelVersionMutation) SetID ¶
func (m *ModelVersionMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ModelVersion entities.
func (*ModelVersionMutation) SetUpdateTime ¶
func (m *ModelVersionMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ModelVersionMutation) SetVersion ¶
func (m *ModelVersionMutation) SetVersion(s string)
SetVersion sets the "version" field.
func (ModelVersionMutation) Tx ¶
func (m ModelVersionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ModelVersionMutation) Type ¶
func (m *ModelVersionMutation) Type() string
Type returns the node type of this mutation (ModelVersion).
func (*ModelVersionMutation) UpdateTime ¶
func (m *ModelVersionMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ModelVersionMutation) Version ¶
func (m *ModelVersionMutation) Version() (r string, exists bool)
Version returns the value of the "version" field in the mutation.
type ModelVersionQuery ¶
type ModelVersionQuery struct {
// contains filtered or unexported fields
}
ModelVersionQuery is the builder for querying ModelVersion entities.
func (*ModelVersionQuery) All ¶
func (mvq *ModelVersionQuery) All(ctx context.Context) ([]*ModelVersion, error)
All executes the query and returns a list of ModelVersions.
func (*ModelVersionQuery) AllX ¶
func (mvq *ModelVersionQuery) AllX(ctx context.Context) []*ModelVersion
AllX is like All, but panics if an error occurs.
func (*ModelVersionQuery) Clone ¶
func (mvq *ModelVersionQuery) Clone() *ModelVersionQuery
Clone returns a duplicate of the ModelVersionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ModelVersionQuery) Count ¶
func (mvq *ModelVersionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ModelVersionQuery) CountX ¶
func (mvq *ModelVersionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ModelVersionQuery) Exist ¶
func (mvq *ModelVersionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ModelVersionQuery) ExistX ¶
func (mvq *ModelVersionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ModelVersionQuery) First ¶
func (mvq *ModelVersionQuery) First(ctx context.Context) (*ModelVersion, error)
First returns the first ModelVersion entity from the query. Returns a *NotFoundError when no ModelVersion was found.
func (*ModelVersionQuery) FirstID ¶
func (mvq *ModelVersionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ModelVersion ID from the query. Returns a *NotFoundError when no ModelVersion ID was found.
func (*ModelVersionQuery) FirstIDX ¶
func (mvq *ModelVersionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ModelVersionQuery) FirstX ¶
func (mvq *ModelVersionQuery) FirstX(ctx context.Context) *ModelVersion
FirstX is like First, but panics if an error occurs.
func (*ModelVersionQuery) GroupBy ¶
func (mvq *ModelVersionQuery) GroupBy(field string, fields ...string) *ModelVersionGroupBy
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 { Version string `json:"version,omitempty"` Count int `json:"count,omitempty"` } client.ModelVersion.Query(). GroupBy(modelversion.FieldVersion). Aggregate(model.Count()). Scan(ctx, &v)
func (*ModelVersionQuery) IDs ¶
func (mvq *ModelVersionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of ModelVersion IDs.
func (*ModelVersionQuery) IDsX ¶
func (mvq *ModelVersionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ModelVersionQuery) Limit ¶
func (mvq *ModelVersionQuery) Limit(limit int) *ModelVersionQuery
Limit adds a limit step to the query.
func (*ModelVersionQuery) Offset ¶
func (mvq *ModelVersionQuery) Offset(offset int) *ModelVersionQuery
Offset adds an offset step to the query.
func (*ModelVersionQuery) Only ¶
func (mvq *ModelVersionQuery) Only(ctx context.Context) (*ModelVersion, error)
Only returns a single ModelVersion entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one ModelVersion entity is not found. Returns a *NotFoundError when no ModelVersion entities are found.
func (*ModelVersionQuery) OnlyID ¶
func (mvq *ModelVersionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ModelVersion ID in the query. Returns a *NotSingularError when exactly one ModelVersion ID is not found. Returns a *NotFoundError when no entities are found.
func (*ModelVersionQuery) OnlyIDX ¶
func (mvq *ModelVersionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ModelVersionQuery) OnlyX ¶
func (mvq *ModelVersionQuery) OnlyX(ctx context.Context) *ModelVersion
OnlyX is like Only, but panics if an error occurs.
func (*ModelVersionQuery) Order ¶
func (mvq *ModelVersionQuery) Order(o ...OrderFunc) *ModelVersionQuery
Order adds an order step to the query.
func (*ModelVersionQuery) Select ¶
func (mvq *ModelVersionQuery) Select(field string, fields ...string) *ModelVersionSelect
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 { Version string `json:"version,omitempty"` } client.ModelVersion.Query(). Select(modelversion.FieldVersion). Scan(ctx, &v)
func (*ModelVersionQuery) Unique ¶
func (mvq *ModelVersionQuery) Unique(unique bool) *ModelVersionQuery
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 (*ModelVersionQuery) Where ¶
func (mvq *ModelVersionQuery) Where(ps ...predicate.ModelVersion) *ModelVersionQuery
Where adds a new predicate for the ModelVersionQuery builder.
type ModelVersionSelect ¶
type ModelVersionSelect struct { *ModelVersionQuery // contains filtered or unexported fields }
ModelVersionSelect is the builder for selecting fields of ModelVersion entities.
func (*ModelVersionSelect) Bool ¶
func (mvs *ModelVersionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ModelVersionSelect) BoolX ¶
func (mvs *ModelVersionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ModelVersionSelect) Bools ¶
func (mvs *ModelVersionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ModelVersionSelect) BoolsX ¶
func (mvs *ModelVersionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ModelVersionSelect) Float64 ¶
func (mvs *ModelVersionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ModelVersionSelect) Float64X ¶
func (mvs *ModelVersionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ModelVersionSelect) Float64s ¶
func (mvs *ModelVersionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ModelVersionSelect) Float64sX ¶
func (mvs *ModelVersionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ModelVersionSelect) Int ¶
func (mvs *ModelVersionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ModelVersionSelect) IntX ¶
func (mvs *ModelVersionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ModelVersionSelect) Ints ¶
func (mvs *ModelVersionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ModelVersionSelect) IntsX ¶
func (mvs *ModelVersionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ModelVersionSelect) Scan ¶
func (mvs *ModelVersionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ModelVersionSelect) ScanX ¶
func (mvs *ModelVersionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ModelVersionSelect) String ¶
func (mvs *ModelVersionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ModelVersionSelect) StringX ¶
func (mvs *ModelVersionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ModelVersionUpdate ¶
type ModelVersionUpdate struct {
// contains filtered or unexported fields
}
ModelVersionUpdate is the builder for updating ModelVersion entities.
func (*ModelVersionUpdate) Exec ¶
func (mvu *ModelVersionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ModelVersionUpdate) ExecX ¶
func (mvu *ModelVersionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ModelVersionUpdate) Mutation ¶
func (mvu *ModelVersionUpdate) Mutation() *ModelVersionMutation
Mutation returns the ModelVersionMutation object of the builder.
func (*ModelVersionUpdate) Save ¶
func (mvu *ModelVersionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ModelVersionUpdate) SaveX ¶
func (mvu *ModelVersionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ModelVersionUpdate) SetUpdateTime ¶
func (mvu *ModelVersionUpdate) SetUpdateTime(t time.Time) *ModelVersionUpdate
SetUpdateTime sets the "update_time" field.
func (*ModelVersionUpdate) SetVersion ¶
func (mvu *ModelVersionUpdate) SetVersion(s string) *ModelVersionUpdate
SetVersion sets the "version" field.
func (*ModelVersionUpdate) Where ¶
func (mvu *ModelVersionUpdate) Where(ps ...predicate.ModelVersion) *ModelVersionUpdate
Where adds a new predicate for the ModelVersionUpdate builder.
type ModelVersionUpdateOne ¶
type ModelVersionUpdateOne struct {
// contains filtered or unexported fields
}
ModelVersionUpdateOne is the builder for updating a single ModelVersion entity.
func (*ModelVersionUpdateOne) Exec ¶
func (mvuo *ModelVersionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ModelVersionUpdateOne) ExecX ¶
func (mvuo *ModelVersionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ModelVersionUpdateOne) Mutation ¶
func (mvuo *ModelVersionUpdateOne) Mutation() *ModelVersionMutation
Mutation returns the ModelVersionMutation object of the builder.
func (*ModelVersionUpdateOne) Save ¶
func (mvuo *ModelVersionUpdateOne) Save(ctx context.Context) (*ModelVersion, error)
Save executes the query and returns the updated ModelVersion entity.
func (*ModelVersionUpdateOne) SaveX ¶
func (mvuo *ModelVersionUpdateOne) SaveX(ctx context.Context) *ModelVersion
SaveX is like Save, but panics if an error occurs.
func (*ModelVersionUpdateOne) Select ¶
func (mvuo *ModelVersionUpdateOne) Select(field string, fields ...string) *ModelVersionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ModelVersionUpdateOne) SetUpdateTime ¶
func (mvuo *ModelVersionUpdateOne) SetUpdateTime(t time.Time) *ModelVersionUpdateOne
SetUpdateTime sets the "update_time" field.
func (*ModelVersionUpdateOne) SetVersion ¶
func (mvuo *ModelVersionUpdateOne) SetVersion(s string) *ModelVersionUpdateOne
SetVersion sets the "version" field.
type ModelVersions ¶
type ModelVersions []*ModelVersion
ModelVersions is a parsable slice of ModelVersion.
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 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(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 Rollbacker method.
type SystemSetting ¶
type SystemSetting struct { // ID of the ent. ID int `json:"id,omitempty"` // Space holds the value of the "space" field. Space *systemsetting.Space `json:"space,omitempty"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // Typeof holds the value of the "typeof" field. Typeof string `json:"typeof,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // contains filtered or unexported fields }
SystemSetting is the model entity for the SystemSetting schema.
func (*SystemSetting) String ¶
func (ss *SystemSetting) String() string
String implements the fmt.Stringer.
func (*SystemSetting) Unwrap ¶
func (ss *SystemSetting) Unwrap() *SystemSetting
Unwrap unwraps the SystemSetting 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 (*SystemSetting) Update ¶
func (ss *SystemSetting) Update() *SystemSettingUpdateOne
Update returns a builder for updating this SystemSetting. Note that you need to call SystemSetting.Unwrap() before calling this method if this SystemSetting was returned from a transaction, and the transaction was committed or rolled back.
type SystemSettingClient ¶
type SystemSettingClient struct {
// contains filtered or unexported fields
}
SystemSettingClient is a client for the SystemSetting schema.
func NewSystemSettingClient ¶
func NewSystemSettingClient(c config) *SystemSettingClient
NewSystemSettingClient returns a client for the SystemSetting from the given config.
func (*SystemSettingClient) Create ¶
func (c *SystemSettingClient) Create() *SystemSettingCreate
Create returns a create builder for SystemSetting.
func (*SystemSettingClient) CreateBulk ¶
func (c *SystemSettingClient) CreateBulk(builders ...*SystemSettingCreate) *SystemSettingCreateBulk
CreateBulk returns a builder for creating a bulk of SystemSetting entities.
func (*SystemSettingClient) Delete ¶
func (c *SystemSettingClient) Delete() *SystemSettingDelete
Delete returns a delete builder for SystemSetting.
func (*SystemSettingClient) DeleteOne ¶
func (c *SystemSettingClient) DeleteOne(ss *SystemSetting) *SystemSettingDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*SystemSettingClient) DeleteOneID ¶
func (c *SystemSettingClient) DeleteOneID(id int) *SystemSettingDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*SystemSettingClient) Get ¶
func (c *SystemSettingClient) Get(ctx context.Context, id int) (*SystemSetting, error)
Get returns a SystemSetting entity by its id.
func (*SystemSettingClient) GetX ¶
func (c *SystemSettingClient) GetX(ctx context.Context, id int) *SystemSetting
GetX is like Get, but panics if an error occurs.
func (*SystemSettingClient) Hooks ¶
func (c *SystemSettingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SystemSettingClient) Query ¶
func (c *SystemSettingClient) Query() *SystemSettingQuery
Query returns a query builder for SystemSetting.
func (*SystemSettingClient) Update ¶
func (c *SystemSettingClient) Update() *SystemSettingUpdate
Update returns an update builder for SystemSetting.
func (*SystemSettingClient) UpdateOne ¶
func (c *SystemSettingClient) UpdateOne(ss *SystemSetting) *SystemSettingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SystemSettingClient) UpdateOneID ¶
func (c *SystemSettingClient) UpdateOneID(id int) *SystemSettingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SystemSettingClient) Use ¶
func (c *SystemSettingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `systemsetting.Hooks(f(g(h())))`.
type SystemSettingCreate ¶
type SystemSettingCreate struct {
// contains filtered or unexported fields
}
SystemSettingCreate is the builder for creating a SystemSetting entity.
func (*SystemSettingCreate) Mutation ¶
func (ssc *SystemSettingCreate) Mutation() *SystemSettingMutation
Mutation returns the SystemSettingMutation object of the builder.
func (*SystemSettingCreate) Save ¶
func (ssc *SystemSettingCreate) Save(ctx context.Context) (*SystemSetting, error)
Save creates the SystemSetting in the database.
func (*SystemSettingCreate) SaveX ¶
func (ssc *SystemSettingCreate) SaveX(ctx context.Context) *SystemSetting
SaveX calls Save and panics if Save returns an error.
func (*SystemSettingCreate) SetID ¶
func (ssc *SystemSettingCreate) SetID(i int) *SystemSettingCreate
SetID sets the "id" field.
func (*SystemSettingCreate) SetKey ¶
func (ssc *SystemSettingCreate) SetKey(s string) *SystemSettingCreate
SetKey sets the "key" field.
func (*SystemSettingCreate) SetNillableSpace ¶
func (ssc *SystemSettingCreate) SetNillableSpace(s *systemsetting.Space) *SystemSettingCreate
SetNillableSpace sets the "space" field if the given value is not nil.
func (*SystemSettingCreate) SetNillableTypeof ¶
func (ssc *SystemSettingCreate) SetNillableTypeof(s *string) *SystemSettingCreate
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*SystemSettingCreate) SetNillableUpdateTime ¶
func (ssc *SystemSettingCreate) SetNillableUpdateTime(t *time.Time) *SystemSettingCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*SystemSettingCreate) SetNillableValue ¶
func (ssc *SystemSettingCreate) SetNillableValue(s *string) *SystemSettingCreate
SetNillableValue sets the "value" field if the given value is not nil.
func (*SystemSettingCreate) SetSpace ¶
func (ssc *SystemSettingCreate) SetSpace(s systemsetting.Space) *SystemSettingCreate
SetSpace sets the "space" field.
func (*SystemSettingCreate) SetTypeof ¶
func (ssc *SystemSettingCreate) SetTypeof(s string) *SystemSettingCreate
SetTypeof sets the "typeof" field.
func (*SystemSettingCreate) SetUpdateTime ¶
func (ssc *SystemSettingCreate) SetUpdateTime(t time.Time) *SystemSettingCreate
SetUpdateTime sets the "update_time" field.
func (*SystemSettingCreate) SetValue ¶
func (ssc *SystemSettingCreate) SetValue(s string) *SystemSettingCreate
SetValue sets the "value" field.
type SystemSettingCreateBulk ¶
type SystemSettingCreateBulk struct {
// contains filtered or unexported fields
}
SystemSettingCreateBulk is the builder for creating many SystemSetting entities in bulk.
func (*SystemSettingCreateBulk) Save ¶
func (sscb *SystemSettingCreateBulk) Save(ctx context.Context) ([]*SystemSetting, error)
Save creates the SystemSetting entities in the database.
func (*SystemSettingCreateBulk) SaveX ¶
func (sscb *SystemSettingCreateBulk) SaveX(ctx context.Context) []*SystemSetting
SaveX is like Save, but panics if an error occurs.
type SystemSettingDelete ¶
type SystemSettingDelete struct {
// contains filtered or unexported fields
}
SystemSettingDelete is the builder for deleting a SystemSetting entity.
func (*SystemSettingDelete) Exec ¶
func (ssd *SystemSettingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SystemSettingDelete) ExecX ¶
func (ssd *SystemSettingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SystemSettingDelete) Where ¶
func (ssd *SystemSettingDelete) Where(ps ...predicate.SystemSetting) *SystemSettingDelete
Where adds a new predicate to the SystemSettingDelete builder.
type SystemSettingDeleteOne ¶
type SystemSettingDeleteOne struct {
// contains filtered or unexported fields
}
SystemSettingDeleteOne is the builder for deleting a single SystemSetting entity.
func (*SystemSettingDeleteOne) Exec ¶
func (ssdo *SystemSettingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SystemSettingDeleteOne) ExecX ¶
func (ssdo *SystemSettingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SystemSettingGroupBy ¶
type SystemSettingGroupBy struct {
// contains filtered or unexported fields
}
SystemSettingGroupBy is the group-by builder for SystemSetting entities.
func (*SystemSettingGroupBy) Aggregate ¶
func (ssgb *SystemSettingGroupBy) Aggregate(fns ...AggregateFunc) *SystemSettingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SystemSettingGroupBy) Bool ¶
func (ssgb *SystemSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) BoolX ¶
func (ssgb *SystemSettingGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SystemSettingGroupBy) Bools ¶
func (ssgb *SystemSettingGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) BoolsX ¶
func (ssgb *SystemSettingGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SystemSettingGroupBy) Float64 ¶
func (ssgb *SystemSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) Float64X ¶
func (ssgb *SystemSettingGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SystemSettingGroupBy) Float64s ¶
func (ssgb *SystemSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) Float64sX ¶
func (ssgb *SystemSettingGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SystemSettingGroupBy) Int ¶
func (ssgb *SystemSettingGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) IntX ¶
func (ssgb *SystemSettingGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SystemSettingGroupBy) Ints ¶
func (ssgb *SystemSettingGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) IntsX ¶
func (ssgb *SystemSettingGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SystemSettingGroupBy) Scan ¶
func (ssgb *SystemSettingGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*SystemSettingGroupBy) ScanX ¶
func (ssgb *SystemSettingGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SystemSettingGroupBy) String ¶
func (ssgb *SystemSettingGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*SystemSettingGroupBy) StringX ¶
func (ssgb *SystemSettingGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SystemSettingMutation ¶
type SystemSettingMutation struct {
// contains filtered or unexported fields
}
SystemSettingMutation represents an operation that mutates the SystemSetting nodes in the graph.
func (*SystemSettingMutation) AddField ¶
func (m *SystemSettingMutation) 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 (*SystemSettingMutation) AddedEdges ¶
func (m *SystemSettingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SystemSettingMutation) AddedField ¶
func (m *SystemSettingMutation) 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 (*SystemSettingMutation) AddedFields ¶
func (m *SystemSettingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SystemSettingMutation) AddedIDs ¶
func (m *SystemSettingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SystemSettingMutation) ClearEdge ¶
func (m *SystemSettingMutation) 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 (*SystemSettingMutation) ClearField ¶
func (m *SystemSettingMutation) 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 (*SystemSettingMutation) ClearSpace ¶
func (m *SystemSettingMutation) ClearSpace()
ClearSpace clears the value of the "space" field.
func (*SystemSettingMutation) ClearValue ¶
func (m *SystemSettingMutation) ClearValue()
ClearValue clears the value of the "value" field.
func (*SystemSettingMutation) ClearedEdges ¶
func (m *SystemSettingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SystemSettingMutation) ClearedFields ¶
func (m *SystemSettingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SystemSettingMutation) Client ¶
func (m SystemSettingMutation) 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 (*SystemSettingMutation) EdgeCleared ¶
func (m *SystemSettingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SystemSettingMutation) Field ¶
func (m *SystemSettingMutation) 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 (*SystemSettingMutation) FieldCleared ¶
func (m *SystemSettingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SystemSettingMutation) Fields ¶
func (m *SystemSettingMutation) 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 (*SystemSettingMutation) ID ¶
func (m *SystemSettingMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*SystemSettingMutation) Key ¶
func (m *SystemSettingMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*SystemSettingMutation) 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 (*SystemSettingMutation) OldKey ¶
func (m *SystemSettingMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the SystemSetting entity. If the SystemSetting 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 (*SystemSettingMutation) OldSpace ¶
func (m *SystemSettingMutation) OldSpace(ctx context.Context) (v *systemsetting.Space, err error)
OldSpace returns the old "space" field's value of the SystemSetting entity. If the SystemSetting 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 (*SystemSettingMutation) OldTypeof ¶
func (m *SystemSettingMutation) OldTypeof(ctx context.Context) (v string, err error)
OldTypeof returns the old "typeof" field's value of the SystemSetting entity. If the SystemSetting 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 (*SystemSettingMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the SystemSetting entity. If the SystemSetting 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 (*SystemSettingMutation) OldValue ¶
func (m *SystemSettingMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the SystemSetting entity. If the SystemSetting 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 (*SystemSettingMutation) Op ¶
func (m *SystemSettingMutation) Op() Op
Op returns the operation name.
func (*SystemSettingMutation) RemovedEdges ¶
func (m *SystemSettingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SystemSettingMutation) RemovedIDs ¶
func (m *SystemSettingMutation) 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 (*SystemSettingMutation) ResetEdge ¶
func (m *SystemSettingMutation) 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 (*SystemSettingMutation) ResetField ¶
func (m *SystemSettingMutation) 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 (*SystemSettingMutation) ResetKey ¶
func (m *SystemSettingMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*SystemSettingMutation) ResetSpace ¶
func (m *SystemSettingMutation) ResetSpace()
ResetSpace resets all changes to the "space" field.
func (*SystemSettingMutation) ResetTypeof ¶
func (m *SystemSettingMutation) ResetTypeof()
ResetTypeof resets all changes to the "typeof" field.
func (*SystemSettingMutation) ResetUpdateTime ¶
func (m *SystemSettingMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*SystemSettingMutation) ResetValue ¶
func (m *SystemSettingMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*SystemSettingMutation) SetField ¶
func (m *SystemSettingMutation) 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 (*SystemSettingMutation) SetID ¶
func (m *SystemSettingMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of SystemSetting entities.
func (*SystemSettingMutation) SetKey ¶
func (m *SystemSettingMutation) SetKey(s string)
SetKey sets the "key" field.
func (*SystemSettingMutation) SetSpace ¶
func (m *SystemSettingMutation) SetSpace(s systemsetting.Space)
SetSpace sets the "space" field.
func (*SystemSettingMutation) SetTypeof ¶
func (m *SystemSettingMutation) SetTypeof(s string)
SetTypeof sets the "typeof" field.
func (*SystemSettingMutation) SetUpdateTime ¶
func (m *SystemSettingMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*SystemSettingMutation) SetValue ¶
func (m *SystemSettingMutation) SetValue(s string)
SetValue sets the "value" field.
func (*SystemSettingMutation) Space ¶
func (m *SystemSettingMutation) Space() (r systemsetting.Space, exists bool)
Space returns the value of the "space" field in the mutation.
func (*SystemSettingMutation) SpaceCleared ¶
func (m *SystemSettingMutation) SpaceCleared() bool
SpaceCleared returns if the "space" field was cleared in this mutation.
func (SystemSettingMutation) Tx ¶
func (m SystemSettingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SystemSettingMutation) Type ¶
func (m *SystemSettingMutation) Type() string
Type returns the node type of this mutation (SystemSetting).
func (*SystemSettingMutation) Typeof ¶
func (m *SystemSettingMutation) Typeof() (r string, exists bool)
Typeof returns the value of the "typeof" field in the mutation.
func (*SystemSettingMutation) UpdateTime ¶
func (m *SystemSettingMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*SystemSettingMutation) Value ¶
func (m *SystemSettingMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*SystemSettingMutation) ValueCleared ¶
func (m *SystemSettingMutation) ValueCleared() bool
ValueCleared returns if the "value" field was cleared in this mutation.
type SystemSettingQuery ¶
type SystemSettingQuery struct {
// contains filtered or unexported fields
}
SystemSettingQuery is the builder for querying SystemSetting entities.
func (*SystemSettingQuery) All ¶
func (ssq *SystemSettingQuery) All(ctx context.Context) ([]*SystemSetting, error)
All executes the query and returns a list of SystemSettings.
func (*SystemSettingQuery) AllX ¶
func (ssq *SystemSettingQuery) AllX(ctx context.Context) []*SystemSetting
AllX is like All, but panics if an error occurs.
func (*SystemSettingQuery) Clone ¶
func (ssq *SystemSettingQuery) Clone() *SystemSettingQuery
Clone returns a duplicate of the SystemSettingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SystemSettingQuery) Count ¶
func (ssq *SystemSettingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SystemSettingQuery) CountX ¶
func (ssq *SystemSettingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SystemSettingQuery) Exist ¶
func (ssq *SystemSettingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SystemSettingQuery) ExistX ¶
func (ssq *SystemSettingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SystemSettingQuery) First ¶
func (ssq *SystemSettingQuery) First(ctx context.Context) (*SystemSetting, error)
First returns the first SystemSetting entity from the query. Returns a *NotFoundError when no SystemSetting was found.
func (*SystemSettingQuery) FirstID ¶
func (ssq *SystemSettingQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first SystemSetting ID from the query. Returns a *NotFoundError when no SystemSetting ID was found.
func (*SystemSettingQuery) FirstIDX ¶
func (ssq *SystemSettingQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SystemSettingQuery) FirstX ¶
func (ssq *SystemSettingQuery) FirstX(ctx context.Context) *SystemSetting
FirstX is like First, but panics if an error occurs.
func (*SystemSettingQuery) GroupBy ¶
func (ssq *SystemSettingQuery) GroupBy(field string, fields ...string) *SystemSettingGroupBy
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 { Space systemsetting.Space `json:"space,omitempty"` Count int `json:"count,omitempty"` } client.SystemSetting.Query(). GroupBy(systemsetting.FieldSpace). Aggregate(model.Count()). Scan(ctx, &v)
func (*SystemSettingQuery) IDs ¶
func (ssq *SystemSettingQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of SystemSetting IDs.
func (*SystemSettingQuery) IDsX ¶
func (ssq *SystemSettingQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SystemSettingQuery) Limit ¶
func (ssq *SystemSettingQuery) Limit(limit int) *SystemSettingQuery
Limit adds a limit step to the query.
func (*SystemSettingQuery) Offset ¶
func (ssq *SystemSettingQuery) Offset(offset int) *SystemSettingQuery
Offset adds an offset step to the query.
func (*SystemSettingQuery) Only ¶
func (ssq *SystemSettingQuery) Only(ctx context.Context) (*SystemSetting, error)
Only returns a single SystemSetting entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one SystemSetting entity is not found. Returns a *NotFoundError when no SystemSetting entities are found.
func (*SystemSettingQuery) OnlyID ¶
func (ssq *SystemSettingQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only SystemSetting ID in the query. Returns a *NotSingularError when exactly one SystemSetting ID is not found. Returns a *NotFoundError when no entities are found.
func (*SystemSettingQuery) OnlyIDX ¶
func (ssq *SystemSettingQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SystemSettingQuery) OnlyX ¶
func (ssq *SystemSettingQuery) OnlyX(ctx context.Context) *SystemSetting
OnlyX is like Only, but panics if an error occurs.
func (*SystemSettingQuery) Order ¶
func (ssq *SystemSettingQuery) Order(o ...OrderFunc) *SystemSettingQuery
Order adds an order step to the query.
func (*SystemSettingQuery) Select ¶
func (ssq *SystemSettingQuery) Select(field string, fields ...string) *SystemSettingSelect
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 { Space systemsetting.Space `json:"space,omitempty"` } client.SystemSetting.Query(). Select(systemsetting.FieldSpace). Scan(ctx, &v)
func (*SystemSettingQuery) Unique ¶
func (ssq *SystemSettingQuery) Unique(unique bool) *SystemSettingQuery
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 (*SystemSettingQuery) Where ¶
func (ssq *SystemSettingQuery) Where(ps ...predicate.SystemSetting) *SystemSettingQuery
Where adds a new predicate for the SystemSettingQuery builder.
type SystemSettingSelect ¶
type SystemSettingSelect struct { *SystemSettingQuery // contains filtered or unexported fields }
SystemSettingSelect is the builder for selecting fields of SystemSetting entities.
func (*SystemSettingSelect) Bool ¶
func (sss *SystemSettingSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) BoolX ¶
func (sss *SystemSettingSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*SystemSettingSelect) Bools ¶
func (sss *SystemSettingSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) BoolsX ¶
func (sss *SystemSettingSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*SystemSettingSelect) Float64 ¶
func (sss *SystemSettingSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) Float64X ¶
func (sss *SystemSettingSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*SystemSettingSelect) Float64s ¶
func (sss *SystemSettingSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) Float64sX ¶
func (sss *SystemSettingSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*SystemSettingSelect) Int ¶
func (sss *SystemSettingSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) IntX ¶
func (sss *SystemSettingSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*SystemSettingSelect) Ints ¶
func (sss *SystemSettingSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) IntsX ¶
func (sss *SystemSettingSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*SystemSettingSelect) Scan ¶
func (sss *SystemSettingSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*SystemSettingSelect) ScanX ¶
func (sss *SystemSettingSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*SystemSettingSelect) String ¶
func (sss *SystemSettingSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*SystemSettingSelect) StringX ¶
func (sss *SystemSettingSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type SystemSettingUpdate ¶
type SystemSettingUpdate struct {
// contains filtered or unexported fields
}
SystemSettingUpdate is the builder for updating SystemSetting entities.
func (*SystemSettingUpdate) ClearSpace ¶
func (ssu *SystemSettingUpdate) ClearSpace() *SystemSettingUpdate
ClearSpace clears the value of the "space" field.
func (*SystemSettingUpdate) ClearValue ¶
func (ssu *SystemSettingUpdate) ClearValue() *SystemSettingUpdate
ClearValue clears the value of the "value" field.
func (*SystemSettingUpdate) Exec ¶
func (ssu *SystemSettingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SystemSettingUpdate) ExecX ¶
func (ssu *SystemSettingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SystemSettingUpdate) Mutation ¶
func (ssu *SystemSettingUpdate) Mutation() *SystemSettingMutation
Mutation returns the SystemSettingMutation object of the builder.
func (*SystemSettingUpdate) Save ¶
func (ssu *SystemSettingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SystemSettingUpdate) SaveX ¶
func (ssu *SystemSettingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SystemSettingUpdate) SetKey ¶
func (ssu *SystemSettingUpdate) SetKey(s string) *SystemSettingUpdate
SetKey sets the "key" field.
func (*SystemSettingUpdate) SetNillableSpace ¶
func (ssu *SystemSettingUpdate) SetNillableSpace(s *systemsetting.Space) *SystemSettingUpdate
SetNillableSpace sets the "space" field if the given value is not nil.
func (*SystemSettingUpdate) SetNillableTypeof ¶
func (ssu *SystemSettingUpdate) SetNillableTypeof(s *string) *SystemSettingUpdate
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*SystemSettingUpdate) SetNillableValue ¶
func (ssu *SystemSettingUpdate) SetNillableValue(s *string) *SystemSettingUpdate
SetNillableValue sets the "value" field if the given value is not nil.
func (*SystemSettingUpdate) SetSpace ¶
func (ssu *SystemSettingUpdate) SetSpace(s systemsetting.Space) *SystemSettingUpdate
SetSpace sets the "space" field.
func (*SystemSettingUpdate) SetTypeof ¶
func (ssu *SystemSettingUpdate) SetTypeof(s string) *SystemSettingUpdate
SetTypeof sets the "typeof" field.
func (*SystemSettingUpdate) SetUpdateTime ¶
func (ssu *SystemSettingUpdate) SetUpdateTime(t time.Time) *SystemSettingUpdate
SetUpdateTime sets the "update_time" field.
func (*SystemSettingUpdate) SetValue ¶
func (ssu *SystemSettingUpdate) SetValue(s string) *SystemSettingUpdate
SetValue sets the "value" field.
func (*SystemSettingUpdate) Where ¶
func (ssu *SystemSettingUpdate) Where(ps ...predicate.SystemSetting) *SystemSettingUpdate
Where adds a new predicate for the SystemSettingUpdate builder.
type SystemSettingUpdateOne ¶
type SystemSettingUpdateOne struct {
// contains filtered or unexported fields
}
SystemSettingUpdateOne is the builder for updating a single SystemSetting entity.
func (*SystemSettingUpdateOne) ClearSpace ¶
func (ssuo *SystemSettingUpdateOne) ClearSpace() *SystemSettingUpdateOne
ClearSpace clears the value of the "space" field.
func (*SystemSettingUpdateOne) ClearValue ¶
func (ssuo *SystemSettingUpdateOne) ClearValue() *SystemSettingUpdateOne
ClearValue clears the value of the "value" field.
func (*SystemSettingUpdateOne) Exec ¶
func (ssuo *SystemSettingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SystemSettingUpdateOne) ExecX ¶
func (ssuo *SystemSettingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SystemSettingUpdateOne) Mutation ¶
func (ssuo *SystemSettingUpdateOne) Mutation() *SystemSettingMutation
Mutation returns the SystemSettingMutation object of the builder.
func (*SystemSettingUpdateOne) Save ¶
func (ssuo *SystemSettingUpdateOne) Save(ctx context.Context) (*SystemSetting, error)
Save executes the query and returns the updated SystemSetting entity.
func (*SystemSettingUpdateOne) SaveX ¶
func (ssuo *SystemSettingUpdateOne) SaveX(ctx context.Context) *SystemSetting
SaveX is like Save, but panics if an error occurs.
func (*SystemSettingUpdateOne) Select ¶
func (ssuo *SystemSettingUpdateOne) Select(field string, fields ...string) *SystemSettingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SystemSettingUpdateOne) SetKey ¶
func (ssuo *SystemSettingUpdateOne) SetKey(s string) *SystemSettingUpdateOne
SetKey sets the "key" field.
func (*SystemSettingUpdateOne) SetNillableSpace ¶
func (ssuo *SystemSettingUpdateOne) SetNillableSpace(s *systemsetting.Space) *SystemSettingUpdateOne
SetNillableSpace sets the "space" field if the given value is not nil.
func (*SystemSettingUpdateOne) SetNillableTypeof ¶
func (ssuo *SystemSettingUpdateOne) SetNillableTypeof(s *string) *SystemSettingUpdateOne
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*SystemSettingUpdateOne) SetNillableValue ¶
func (ssuo *SystemSettingUpdateOne) SetNillableValue(s *string) *SystemSettingUpdateOne
SetNillableValue sets the "value" field if the given value is not nil.
func (*SystemSettingUpdateOne) SetSpace ¶
func (ssuo *SystemSettingUpdateOne) SetSpace(s systemsetting.Space) *SystemSettingUpdateOne
SetSpace sets the "space" field.
func (*SystemSettingUpdateOne) SetTypeof ¶
func (ssuo *SystemSettingUpdateOne) SetTypeof(s string) *SystemSettingUpdateOne
SetTypeof sets the "typeof" field.
func (*SystemSettingUpdateOne) SetUpdateTime ¶
func (ssuo *SystemSettingUpdateOne) SetUpdateTime(t time.Time) *SystemSettingUpdateOne
SetUpdateTime sets the "update_time" field.
func (*SystemSettingUpdateOne) SetValue ¶
func (ssuo *SystemSettingUpdateOne) SetValue(s string) *SystemSettingUpdateOne
SetValue sets the "value" field.
type SystemSettings ¶
type SystemSettings []*SystemSetting
SystemSettings is a parsable slice of SystemSetting.
type Tx ¶
type Tx struct { // ModelVersion is the client for interacting with the ModelVersion builders. ModelVersion *ModelVersionClient // SystemSetting is the client for interacting with the SystemSetting builders. SystemSetting *SystemSettingClient // User is the client for interacting with the User builders. User *UserClient // UserEmail is the client for interacting with the UserEmail builders. UserEmail *UserEmailClient // UserSecurityLog is the client for interacting with the UserSecurityLog builders. UserSecurityLog *UserSecurityLogClient // UserSetting is the client for interacting with the UserSetting builders. UserSetting *UserSettingClient // 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 User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // Sn holds the value of the "sn" field. Sn string `json:"-"` // Nickname holds the value of the "nickname" field. Nickname string `json:"nickname,omitempty"` // Phone holds the value of the "phone" field. Phone *string `json:"phone,omitempty"` // Password holds the value of the "password" field. Password *string `json:"-"` // Status holds the value of the "status" field. Status *user.Status `json:"-"` // Signature holds the value of the "signature" field. Signature string `json:"-"` // LastPwdAuth holds the value of the "last_pwd_auth" field. LastPwdAuth *time.Time `json:"-"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // DeleteTime holds the value of the "delete_time" field. DeleteTime *time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryUserEmails ¶
func (u *User) QueryUserEmails() *UserEmailQuery
QueryUserEmails queries the "UserEmails" edge of the User entity.
func (*User) QueryUserSecurityLogs ¶
func (u *User) QueryUserSecurityLogs() *UserSecurityLogQuery
QueryUserSecurityLogs queries the "UserSecurityLogs" edge of the User entity.
func (*User) QueryUserSettings ¶
func (u *User) QueryUserSettings() *UserSettingQuery
QueryUserSettings queries the "UserSettings" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User 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 (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a create builder for User.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryUserEmails ¶
func (c *UserClient) QueryUserEmails(u *User) *UserEmailQuery
QueryUserEmails queries the UserEmails edge of a User.
func (*UserClient) QueryUserSecurityLogs ¶
func (c *UserClient) QueryUserSecurityLogs(u *User) *UserSecurityLogQuery
QueryUserSecurityLogs queries the UserSecurityLogs edge of a User.
func (*UserClient) QueryUserSettings ¶
func (c *UserClient) QueryUserSettings(u *User) *UserSettingQuery
QueryUserSettings queries the UserSettings edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddUserEmailIDs ¶
func (uc *UserCreate) AddUserEmailIDs(ids ...int) *UserCreate
AddUserEmailIDs adds the "UserEmails" edge to the UserEmail entity by IDs.
func (*UserCreate) AddUserEmails ¶
func (uc *UserCreate) AddUserEmails(u ...*UserEmail) *UserCreate
AddUserEmails adds the "UserEmails" edges to the UserEmail entity.
func (*UserCreate) AddUserSecurityLogIDs ¶
func (uc *UserCreate) AddUserSecurityLogIDs(ids ...int) *UserCreate
AddUserSecurityLogIDs adds the "UserSecurityLogs" edge to the UserSecurityLog entity by IDs.
func (*UserCreate) AddUserSecurityLogs ¶
func (uc *UserCreate) AddUserSecurityLogs(u ...*UserSecurityLog) *UserCreate
AddUserSecurityLogs adds the "UserSecurityLogs" edges to the UserSecurityLog entity.
func (*UserCreate) AddUserSettingIDs ¶
func (uc *UserCreate) AddUserSettingIDs(ids ...int) *UserCreate
AddUserSettingIDs adds the "UserSettings" edge to the UserSetting entity by IDs.
func (*UserCreate) AddUserSettings ¶
func (uc *UserCreate) AddUserSettings(u ...*UserSetting) *UserCreate
AddUserSettings adds the "UserSettings" edges to the UserSetting entity.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreateTime ¶
func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate
SetCreateTime sets the "create_time" field.
func (*UserCreate) SetDeleteTime ¶
func (uc *UserCreate) SetDeleteTime(t time.Time) *UserCreate
SetDeleteTime sets the "delete_time" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(i int) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetLastPwdAuth ¶
func (uc *UserCreate) SetLastPwdAuth(t time.Time) *UserCreate
SetLastPwdAuth sets the "last_pwd_auth" field.
func (*UserCreate) SetNickname ¶
func (uc *UserCreate) SetNickname(s string) *UserCreate
SetNickname sets the "nickname" field.
func (*UserCreate) SetNillableCreateTime ¶
func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserCreate) SetNillableDeleteTime ¶
func (uc *UserCreate) SetNillableDeleteTime(t *time.Time) *UserCreate
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*UserCreate) SetNillableLastPwdAuth ¶
func (uc *UserCreate) SetNillableLastPwdAuth(t *time.Time) *UserCreate
SetNillableLastPwdAuth sets the "last_pwd_auth" field if the given value is not nil.
func (*UserCreate) SetNillablePassword ¶
func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserCreate) SetNillablePhone ¶
func (uc *UserCreate) SetNillablePhone(s *string) *UserCreate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserCreate) SetNillableSn ¶
func (uc *UserCreate) SetNillableSn(s *string) *UserCreate
SetNillableSn sets the "sn" field if the given value is not nil.
func (*UserCreate) SetNillableStatus ¶
func (uc *UserCreate) SetNillableStatus(u *user.Status) *UserCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserCreate) SetNillableUpdateTime ¶
func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetPhone ¶
func (uc *UserCreate) SetPhone(s string) *UserCreate
SetPhone sets the "phone" field.
func (*UserCreate) SetSignature ¶
func (uc *UserCreate) SetSignature(s string) *UserCreate
SetSignature sets the "signature" field.
func (*UserCreate) SetSn ¶
func (uc *UserCreate) SetSn(s string) *UserCreate
SetSn sets the "sn" field.
func (*UserCreate) SetStatus ¶
func (uc *UserCreate) SetStatus(u user.Status) *UserCreate
SetStatus sets the "status" field.
func (*UserCreate) SetUpdateTime ¶
func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
SetUpdateTime sets the "update_time" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where adds a new predicate to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct { // UserEmails holds the value of the UserEmails edge. UserEmails []*UserEmail `json:"emails,omitempty"` // UserSettings holds the value of the UserSettings edge. UserSettings []*UserSetting `json:"settings,omitempty"` // UserSecurityLogs holds the value of the UserSecurityLogs edge. UserSecurityLogs []*UserSecurityLog `json:"securityLogs,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) UserEmailsOrErr ¶
UserEmailsOrErr returns the UserEmails value or an error if the edge was not loaded in eager-loading.
func (UserEdges) UserSecurityLogsOrErr ¶
func (e UserEdges) UserSecurityLogsOrErr() ([]*UserSecurityLog, error)
UserSecurityLogsOrErr returns the UserSecurityLogs value or an error if the edge was not loaded in eager-loading.
func (UserEdges) UserSettingsOrErr ¶
func (e UserEdges) UserSettingsOrErr() ([]*UserSetting, error)
UserSettingsOrErr returns the UserSettings value or an error if the edge was not loaded in eager-loading.
type UserEmail ¶
type UserEmail struct { // ID of the ent. ID int `json:"id,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"-"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Verifed holds the value of the "verifed" field. Verifed bool `json:"-"` // VerifyTicket holds the value of the "verify_ticket" field. VerifyTicket *string `json:"-"` // VerifedTime holds the value of the "verifed_time" field. VerifedTime *time.Time `json:"-"` // IsPrimary holds the value of the "is_primary" field. IsPrimary bool `json:"is_primary,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserEmailQuery when eager-loading is set. Edges UserEmailEdges `json:"edges"` // contains filtered or unexported fields }
UserEmail is the model entity for the UserEmail schema.
func (*UserEmail) QueryEmailOwner ¶
QueryEmailOwner queries the "email_owner" edge of the UserEmail entity.
func (*UserEmail) Unwrap ¶
Unwrap unwraps the UserEmail 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 (*UserEmail) Update ¶
func (ue *UserEmail) Update() *UserEmailUpdateOne
Update returns a builder for updating this UserEmail. Note that you need to call UserEmail.Unwrap() before calling this method if this UserEmail was returned from a transaction, and the transaction was committed or rolled back.
type UserEmailClient ¶
type UserEmailClient struct {
// contains filtered or unexported fields
}
UserEmailClient is a client for the UserEmail schema.
func NewUserEmailClient ¶
func NewUserEmailClient(c config) *UserEmailClient
NewUserEmailClient returns a client for the UserEmail from the given config.
func (*UserEmailClient) Create ¶
func (c *UserEmailClient) Create() *UserEmailCreate
Create returns a create builder for UserEmail.
func (*UserEmailClient) CreateBulk ¶
func (c *UserEmailClient) CreateBulk(builders ...*UserEmailCreate) *UserEmailCreateBulk
CreateBulk returns a builder for creating a bulk of UserEmail entities.
func (*UserEmailClient) Delete ¶
func (c *UserEmailClient) Delete() *UserEmailDelete
Delete returns a delete builder for UserEmail.
func (*UserEmailClient) DeleteOne ¶
func (c *UserEmailClient) DeleteOne(ue *UserEmail) *UserEmailDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserEmailClient) DeleteOneID ¶
func (c *UserEmailClient) DeleteOneID(id int) *UserEmailDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserEmailClient) GetX ¶
func (c *UserEmailClient) GetX(ctx context.Context, id int) *UserEmail
GetX is like Get, but panics if an error occurs.
func (*UserEmailClient) Hooks ¶
func (c *UserEmailClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserEmailClient) Query ¶
func (c *UserEmailClient) Query() *UserEmailQuery
Query returns a query builder for UserEmail.
func (*UserEmailClient) QueryEmailOwner ¶
func (c *UserEmailClient) QueryEmailOwner(ue *UserEmail) *UserQuery
QueryEmailOwner queries the email_owner edge of a UserEmail.
func (*UserEmailClient) Update ¶
func (c *UserEmailClient) Update() *UserEmailUpdate
Update returns an update builder for UserEmail.
func (*UserEmailClient) UpdateOne ¶
func (c *UserEmailClient) UpdateOne(ue *UserEmail) *UserEmailUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserEmailClient) UpdateOneID ¶
func (c *UserEmailClient) UpdateOneID(id int) *UserEmailUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserEmailClient) Use ¶
func (c *UserEmailClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `useremail.Hooks(f(g(h())))`.
type UserEmailCreate ¶
type UserEmailCreate struct {
// contains filtered or unexported fields
}
UserEmailCreate is the builder for creating a UserEmail entity.
func (*UserEmailCreate) Mutation ¶
func (uec *UserEmailCreate) Mutation() *UserEmailMutation
Mutation returns the UserEmailMutation object of the builder.
func (*UserEmailCreate) Save ¶
func (uec *UserEmailCreate) Save(ctx context.Context) (*UserEmail, error)
Save creates the UserEmail in the database.
func (*UserEmailCreate) SaveX ¶
func (uec *UserEmailCreate) SaveX(ctx context.Context) *UserEmail
SaveX calls Save and panics if Save returns an error.
func (*UserEmailCreate) SetCreateTime ¶
func (uec *UserEmailCreate) SetCreateTime(t time.Time) *UserEmailCreate
SetCreateTime sets the "create_time" field.
func (*UserEmailCreate) SetEmail ¶
func (uec *UserEmailCreate) SetEmail(s string) *UserEmailCreate
SetEmail sets the "email" field.
func (*UserEmailCreate) SetEmailOwner ¶
func (uec *UserEmailCreate) SetEmailOwner(u *User) *UserEmailCreate
SetEmailOwner sets the "email_owner" edge to the User entity.
func (*UserEmailCreate) SetEmailOwnerID ¶
func (uec *UserEmailCreate) SetEmailOwnerID(id int) *UserEmailCreate
SetEmailOwnerID sets the "email_owner" edge to the User entity by ID.
func (*UserEmailCreate) SetID ¶
func (uec *UserEmailCreate) SetID(i int) *UserEmailCreate
SetID sets the "id" field.
func (*UserEmailCreate) SetIsPrimary ¶
func (uec *UserEmailCreate) SetIsPrimary(b bool) *UserEmailCreate
SetIsPrimary sets the "is_primary" field.
func (*UserEmailCreate) SetNillableCreateTime ¶
func (uec *UserEmailCreate) SetNillableCreateTime(t *time.Time) *UserEmailCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserEmailCreate) SetNillableIsPrimary ¶
func (uec *UserEmailCreate) SetNillableIsPrimary(b *bool) *UserEmailCreate
SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.
func (*UserEmailCreate) SetNillableUpdateTime ¶
func (uec *UserEmailCreate) SetNillableUpdateTime(t *time.Time) *UserEmailCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserEmailCreate) SetNillableVerifed ¶
func (uec *UserEmailCreate) SetNillableVerifed(b *bool) *UserEmailCreate
SetNillableVerifed sets the "verifed" field if the given value is not nil.
func (*UserEmailCreate) SetNillableVerifedTime ¶
func (uec *UserEmailCreate) SetNillableVerifedTime(t *time.Time) *UserEmailCreate
SetNillableVerifedTime sets the "verifed_time" field if the given value is not nil.
func (*UserEmailCreate) SetNillableVerifyTicket ¶
func (uec *UserEmailCreate) SetNillableVerifyTicket(s *string) *UserEmailCreate
SetNillableVerifyTicket sets the "verify_ticket" field if the given value is not nil.
func (*UserEmailCreate) SetOwnerID ¶
func (uec *UserEmailCreate) SetOwnerID(i int) *UserEmailCreate
SetOwnerID sets the "owner_id" field.
func (*UserEmailCreate) SetUpdateTime ¶
func (uec *UserEmailCreate) SetUpdateTime(t time.Time) *UserEmailCreate
SetUpdateTime sets the "update_time" field.
func (*UserEmailCreate) SetVerifed ¶
func (uec *UserEmailCreate) SetVerifed(b bool) *UserEmailCreate
SetVerifed sets the "verifed" field.
func (*UserEmailCreate) SetVerifedTime ¶
func (uec *UserEmailCreate) SetVerifedTime(t time.Time) *UserEmailCreate
SetVerifedTime sets the "verifed_time" field.
func (*UserEmailCreate) SetVerifyTicket ¶
func (uec *UserEmailCreate) SetVerifyTicket(s string) *UserEmailCreate
SetVerifyTicket sets the "verify_ticket" field.
type UserEmailCreateBulk ¶
type UserEmailCreateBulk struct {
// contains filtered or unexported fields
}
UserEmailCreateBulk is the builder for creating many UserEmail entities in bulk.
type UserEmailDelete ¶
type UserEmailDelete struct {
// contains filtered or unexported fields
}
UserEmailDelete is the builder for deleting a UserEmail entity.
func (*UserEmailDelete) Exec ¶
func (ued *UserEmailDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserEmailDelete) ExecX ¶
func (ued *UserEmailDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailDelete) Where ¶
func (ued *UserEmailDelete) Where(ps ...predicate.UserEmail) *UserEmailDelete
Where adds a new predicate to the UserEmailDelete builder.
type UserEmailDeleteOne ¶
type UserEmailDeleteOne struct {
// contains filtered or unexported fields
}
UserEmailDeleteOne is the builder for deleting a single UserEmail entity.
func (*UserEmailDeleteOne) Exec ¶
func (uedo *UserEmailDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserEmailDeleteOne) ExecX ¶
func (uedo *UserEmailDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEmailEdges ¶
type UserEmailEdges struct { // EmailOwner holds the value of the email_owner edge. EmailOwner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
UserEmailEdges holds the relations/edges for other nodes in the graph.
func (UserEmailEdges) EmailOwnerOrErr ¶
func (e UserEmailEdges) EmailOwnerOrErr() (*User, error)
EmailOwnerOrErr returns the EmailOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserEmailGroupBy ¶
type UserEmailGroupBy struct {
// contains filtered or unexported fields
}
UserEmailGroupBy is the group-by builder for UserEmail entities.
func (*UserEmailGroupBy) Aggregate ¶
func (uegb *UserEmailGroupBy) Aggregate(fns ...AggregateFunc) *UserEmailGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserEmailGroupBy) Bool ¶
func (uegb *UserEmailGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserEmailGroupBy) BoolX ¶
func (uegb *UserEmailGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserEmailGroupBy) Bools ¶
func (uegb *UserEmailGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserEmailGroupBy) BoolsX ¶
func (uegb *UserEmailGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserEmailGroupBy) Float64 ¶
func (uegb *UserEmailGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserEmailGroupBy) Float64X ¶
func (uegb *UserEmailGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserEmailGroupBy) Float64s ¶
func (uegb *UserEmailGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserEmailGroupBy) Float64sX ¶
func (uegb *UserEmailGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserEmailGroupBy) Int ¶
func (uegb *UserEmailGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserEmailGroupBy) IntX ¶
func (uegb *UserEmailGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserEmailGroupBy) Ints ¶
func (uegb *UserEmailGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserEmailGroupBy) IntsX ¶
func (uegb *UserEmailGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserEmailGroupBy) Scan ¶
func (uegb *UserEmailGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserEmailGroupBy) ScanX ¶
func (uegb *UserEmailGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserEmailGroupBy) String ¶
func (uegb *UserEmailGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserEmailGroupBy) StringX ¶
func (uegb *UserEmailGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserEmailMutation ¶
type UserEmailMutation struct {
// contains filtered or unexported fields
}
UserEmailMutation represents an operation that mutates the UserEmail nodes in the graph.
func (*UserEmailMutation) AddField ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) AddedEdges ¶
func (m *UserEmailMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserEmailMutation) AddedField ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) AddedFields ¶
func (m *UserEmailMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserEmailMutation) AddedIDs ¶
func (m *UserEmailMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserEmailMutation) ClearEdge ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ClearEmailOwner ¶
func (m *UserEmailMutation) ClearEmailOwner()
ClearEmailOwner clears the "email_owner" edge to the User entity.
func (*UserEmailMutation) ClearField ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ClearVerifedTime ¶
func (m *UserEmailMutation) ClearVerifedTime()
ClearVerifedTime clears the value of the "verifed_time" field.
func (*UserEmailMutation) ClearVerifyTicket ¶
func (m *UserEmailMutation) ClearVerifyTicket()
ClearVerifyTicket clears the value of the "verify_ticket" field.
func (*UserEmailMutation) ClearedEdges ¶
func (m *UserEmailMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserEmailMutation) ClearedFields ¶
func (m *UserEmailMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserEmailMutation) Client ¶
func (m UserEmailMutation) 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 (*UserEmailMutation) CreateTime ¶
func (m *UserEmailMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserEmailMutation) EdgeCleared ¶
func (m *UserEmailMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserEmailMutation) Email ¶
func (m *UserEmailMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserEmailMutation) EmailOwnerCleared ¶
func (m *UserEmailMutation) EmailOwnerCleared() bool
EmailOwnerCleared reports if the "email_owner" edge to the User entity was cleared.
func (*UserEmailMutation) EmailOwnerID ¶
func (m *UserEmailMutation) EmailOwnerID() (id int, exists bool)
EmailOwnerID returns the "email_owner" edge ID in the mutation.
func (*UserEmailMutation) EmailOwnerIDs ¶
func (m *UserEmailMutation) EmailOwnerIDs() (ids []int)
EmailOwnerIDs returns the "email_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EmailOwnerID instead. It exists only for internal usage by the builders.
func (*UserEmailMutation) Field ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) FieldCleared ¶
func (m *UserEmailMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserEmailMutation) Fields ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ID ¶
func (m *UserEmailMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*UserEmailMutation) IsPrimary ¶
func (m *UserEmailMutation) IsPrimary() (r bool, exists bool)
IsPrimary returns the value of the "is_primary" field in the mutation.
func (*UserEmailMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldEmail ¶
func (m *UserEmailMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) 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 (*UserEmailMutation) OldIsPrimary ¶
func (m *UserEmailMutation) OldIsPrimary(ctx context.Context) (v bool, err error)
OldIsPrimary returns the old "is_primary" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldOwnerID ¶
func (m *UserEmailMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldVerifed ¶
func (m *UserEmailMutation) OldVerifed(ctx context.Context) (v bool, err error)
OldVerifed returns the old "verifed" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldVerifedTime ¶
OldVerifedTime returns the old "verifed_time" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OldVerifyTicket ¶
func (m *UserEmailMutation) OldVerifyTicket(ctx context.Context) (v *string, err error)
OldVerifyTicket returns the old "verify_ticket" field's value of the UserEmail entity. If the UserEmail 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 (*UserEmailMutation) OwnerID ¶
func (m *UserEmailMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*UserEmailMutation) RemovedEdges ¶
func (m *UserEmailMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserEmailMutation) RemovedIDs ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ResetCreateTime ¶
func (m *UserEmailMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserEmailMutation) ResetEdge ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ResetEmail ¶
func (m *UserEmailMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserEmailMutation) ResetEmailOwner ¶
func (m *UserEmailMutation) ResetEmailOwner()
ResetEmailOwner resets all changes to the "email_owner" edge.
func (*UserEmailMutation) ResetField ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) ResetIsPrimary ¶
func (m *UserEmailMutation) ResetIsPrimary()
ResetIsPrimary resets all changes to the "is_primary" field.
func (*UserEmailMutation) ResetOwnerID ¶
func (m *UserEmailMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*UserEmailMutation) ResetUpdateTime ¶
func (m *UserEmailMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserEmailMutation) ResetVerifed ¶
func (m *UserEmailMutation) ResetVerifed()
ResetVerifed resets all changes to the "verifed" field.
func (*UserEmailMutation) ResetVerifedTime ¶
func (m *UserEmailMutation) ResetVerifedTime()
ResetVerifedTime resets all changes to the "verifed_time" field.
func (*UserEmailMutation) ResetVerifyTicket ¶
func (m *UserEmailMutation) ResetVerifyTicket()
ResetVerifyTicket resets all changes to the "verify_ticket" field.
func (*UserEmailMutation) SetCreateTime ¶
func (m *UserEmailMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserEmailMutation) SetEmail ¶
func (m *UserEmailMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserEmailMutation) SetEmailOwnerID ¶
func (m *UserEmailMutation) SetEmailOwnerID(id int)
SetEmailOwnerID sets the "email_owner" edge to the User entity by id.
func (*UserEmailMutation) SetField ¶
func (m *UserEmailMutation) 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 (*UserEmailMutation) SetID ¶
func (m *UserEmailMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserEmail entities.
func (*UserEmailMutation) SetIsPrimary ¶
func (m *UserEmailMutation) SetIsPrimary(b bool)
SetIsPrimary sets the "is_primary" field.
func (*UserEmailMutation) SetOwnerID ¶
func (m *UserEmailMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*UserEmailMutation) SetUpdateTime ¶
func (m *UserEmailMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserEmailMutation) SetVerifed ¶
func (m *UserEmailMutation) SetVerifed(b bool)
SetVerifed sets the "verifed" field.
func (*UserEmailMutation) SetVerifedTime ¶
func (m *UserEmailMutation) SetVerifedTime(t time.Time)
SetVerifedTime sets the "verifed_time" field.
func (*UserEmailMutation) SetVerifyTicket ¶
func (m *UserEmailMutation) SetVerifyTicket(s string)
SetVerifyTicket sets the "verify_ticket" field.
func (UserEmailMutation) Tx ¶
func (m UserEmailMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserEmailMutation) Type ¶
func (m *UserEmailMutation) Type() string
Type returns the node type of this mutation (UserEmail).
func (*UserEmailMutation) UpdateTime ¶
func (m *UserEmailMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserEmailMutation) Verifed ¶
func (m *UserEmailMutation) Verifed() (r bool, exists bool)
Verifed returns the value of the "verifed" field in the mutation.
func (*UserEmailMutation) VerifedTime ¶
func (m *UserEmailMutation) VerifedTime() (r time.Time, exists bool)
VerifedTime returns the value of the "verifed_time" field in the mutation.
func (*UserEmailMutation) VerifedTimeCleared ¶
func (m *UserEmailMutation) VerifedTimeCleared() bool
VerifedTimeCleared returns if the "verifed_time" field was cleared in this mutation.
func (*UserEmailMutation) VerifyTicket ¶
func (m *UserEmailMutation) VerifyTicket() (r string, exists bool)
VerifyTicket returns the value of the "verify_ticket" field in the mutation.
func (*UserEmailMutation) VerifyTicketCleared ¶
func (m *UserEmailMutation) VerifyTicketCleared() bool
VerifyTicketCleared returns if the "verify_ticket" field was cleared in this mutation.
type UserEmailQuery ¶
type UserEmailQuery struct {
// contains filtered or unexported fields
}
UserEmailQuery is the builder for querying UserEmail entities.
func (*UserEmailQuery) All ¶
func (ueq *UserEmailQuery) All(ctx context.Context) ([]*UserEmail, error)
All executes the query and returns a list of UserEmails.
func (*UserEmailQuery) AllX ¶
func (ueq *UserEmailQuery) AllX(ctx context.Context) []*UserEmail
AllX is like All, but panics if an error occurs.
func (*UserEmailQuery) Clone ¶
func (ueq *UserEmailQuery) Clone() *UserEmailQuery
Clone returns a duplicate of the UserEmailQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserEmailQuery) Count ¶
func (ueq *UserEmailQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserEmailQuery) CountX ¶
func (ueq *UserEmailQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserEmailQuery) Exist ¶
func (ueq *UserEmailQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserEmailQuery) ExistX ¶
func (ueq *UserEmailQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserEmailQuery) First ¶
func (ueq *UserEmailQuery) First(ctx context.Context) (*UserEmail, error)
First returns the first UserEmail entity from the query. Returns a *NotFoundError when no UserEmail was found.
func (*UserEmailQuery) FirstID ¶
func (ueq *UserEmailQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserEmail ID from the query. Returns a *NotFoundError when no UserEmail ID was found.
func (*UserEmailQuery) FirstIDX ¶
func (ueq *UserEmailQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserEmailQuery) FirstX ¶
func (ueq *UserEmailQuery) FirstX(ctx context.Context) *UserEmail
FirstX is like First, but panics if an error occurs.
func (*UserEmailQuery) GroupBy ¶
func (ueq *UserEmailQuery) GroupBy(field string, fields ...string) *UserEmailGroupBy
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 { OwnerID int `json:"-"` Count int `json:"count,omitempty"` } client.UserEmail.Query(). GroupBy(useremail.FieldOwnerID). Aggregate(model.Count()). Scan(ctx, &v)
func (*UserEmailQuery) IDs ¶
func (ueq *UserEmailQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserEmail IDs.
func (*UserEmailQuery) IDsX ¶
func (ueq *UserEmailQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserEmailQuery) Limit ¶
func (ueq *UserEmailQuery) Limit(limit int) *UserEmailQuery
Limit adds a limit step to the query.
func (*UserEmailQuery) Offset ¶
func (ueq *UserEmailQuery) Offset(offset int) *UserEmailQuery
Offset adds an offset step to the query.
func (*UserEmailQuery) Only ¶
func (ueq *UserEmailQuery) Only(ctx context.Context) (*UserEmail, error)
Only returns a single UserEmail entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserEmail entity is not found. Returns a *NotFoundError when no UserEmail entities are found.
func (*UserEmailQuery) OnlyID ¶
func (ueq *UserEmailQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserEmail ID in the query. Returns a *NotSingularError when exactly one UserEmail ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserEmailQuery) OnlyIDX ¶
func (ueq *UserEmailQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserEmailQuery) OnlyX ¶
func (ueq *UserEmailQuery) OnlyX(ctx context.Context) *UserEmail
OnlyX is like Only, but panics if an error occurs.
func (*UserEmailQuery) Order ¶
func (ueq *UserEmailQuery) Order(o ...OrderFunc) *UserEmailQuery
Order adds an order step to the query.
func (*UserEmailQuery) QueryEmailOwner ¶
func (ueq *UserEmailQuery) QueryEmailOwner() *UserQuery
QueryEmailOwner chains the current query on the "email_owner" edge.
func (*UserEmailQuery) Select ¶
func (ueq *UserEmailQuery) Select(field string, fields ...string) *UserEmailSelect
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 { OwnerID int `json:"-"` } client.UserEmail.Query(). Select(useremail.FieldOwnerID). Scan(ctx, &v)
func (*UserEmailQuery) Unique ¶
func (ueq *UserEmailQuery) Unique(unique bool) *UserEmailQuery
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 (*UserEmailQuery) Where ¶
func (ueq *UserEmailQuery) Where(ps ...predicate.UserEmail) *UserEmailQuery
Where adds a new predicate for the UserEmailQuery builder.
func (*UserEmailQuery) WithEmailOwner ¶
func (ueq *UserEmailQuery) WithEmailOwner(opts ...func(*UserQuery)) *UserEmailQuery
WithEmailOwner tells the query-builder to eager-load the nodes that are connected to the "email_owner" edge. The optional arguments are used to configure the query builder of the edge.
type UserEmailSelect ¶
type UserEmailSelect struct { *UserEmailQuery // contains filtered or unexported fields }
UserEmailSelect is the builder for selecting fields of UserEmail entities.
func (*UserEmailSelect) Bool ¶
func (ues *UserEmailSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) BoolX ¶
func (ues *UserEmailSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserEmailSelect) Bools ¶
func (ues *UserEmailSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) BoolsX ¶
func (ues *UserEmailSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserEmailSelect) Float64 ¶
func (ues *UserEmailSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) Float64X ¶
func (ues *UserEmailSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserEmailSelect) Float64s ¶
func (ues *UserEmailSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) Float64sX ¶
func (ues *UserEmailSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserEmailSelect) Int ¶
func (ues *UserEmailSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) IntX ¶
func (ues *UserEmailSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserEmailSelect) Ints ¶
func (ues *UserEmailSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) IntsX ¶
func (ues *UserEmailSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserEmailSelect) Scan ¶
func (ues *UserEmailSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserEmailSelect) ScanX ¶
func (ues *UserEmailSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserEmailSelect) String ¶
func (ues *UserEmailSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserEmailSelect) StringX ¶
func (ues *UserEmailSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserEmailUpdate ¶
type UserEmailUpdate struct {
// contains filtered or unexported fields
}
UserEmailUpdate is the builder for updating UserEmail entities.
func (*UserEmailUpdate) ClearEmailOwner ¶
func (ueu *UserEmailUpdate) ClearEmailOwner() *UserEmailUpdate
ClearEmailOwner clears the "email_owner" edge to the User entity.
func (*UserEmailUpdate) ClearVerifedTime ¶
func (ueu *UserEmailUpdate) ClearVerifedTime() *UserEmailUpdate
ClearVerifedTime clears the value of the "verifed_time" field.
func (*UserEmailUpdate) ClearVerifyTicket ¶
func (ueu *UserEmailUpdate) ClearVerifyTicket() *UserEmailUpdate
ClearVerifyTicket clears the value of the "verify_ticket" field.
func (*UserEmailUpdate) Exec ¶
func (ueu *UserEmailUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserEmailUpdate) ExecX ¶
func (ueu *UserEmailUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailUpdate) Mutation ¶
func (ueu *UserEmailUpdate) Mutation() *UserEmailMutation
Mutation returns the UserEmailMutation object of the builder.
func (*UserEmailUpdate) Save ¶
func (ueu *UserEmailUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserEmailUpdate) SaveX ¶
func (ueu *UserEmailUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserEmailUpdate) SetEmail ¶
func (ueu *UserEmailUpdate) SetEmail(s string) *UserEmailUpdate
SetEmail sets the "email" field.
func (*UserEmailUpdate) SetEmailOwner ¶
func (ueu *UserEmailUpdate) SetEmailOwner(u *User) *UserEmailUpdate
SetEmailOwner sets the "email_owner" edge to the User entity.
func (*UserEmailUpdate) SetEmailOwnerID ¶
func (ueu *UserEmailUpdate) SetEmailOwnerID(id int) *UserEmailUpdate
SetEmailOwnerID sets the "email_owner" edge to the User entity by ID.
func (*UserEmailUpdate) SetIsPrimary ¶
func (ueu *UserEmailUpdate) SetIsPrimary(b bool) *UserEmailUpdate
SetIsPrimary sets the "is_primary" field.
func (*UserEmailUpdate) SetNillableIsPrimary ¶
func (ueu *UserEmailUpdate) SetNillableIsPrimary(b *bool) *UserEmailUpdate
SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.
func (*UserEmailUpdate) SetNillableVerifed ¶
func (ueu *UserEmailUpdate) SetNillableVerifed(b *bool) *UserEmailUpdate
SetNillableVerifed sets the "verifed" field if the given value is not nil.
func (*UserEmailUpdate) SetNillableVerifedTime ¶
func (ueu *UserEmailUpdate) SetNillableVerifedTime(t *time.Time) *UserEmailUpdate
SetNillableVerifedTime sets the "verifed_time" field if the given value is not nil.
func (*UserEmailUpdate) SetNillableVerifyTicket ¶
func (ueu *UserEmailUpdate) SetNillableVerifyTicket(s *string) *UserEmailUpdate
SetNillableVerifyTicket sets the "verify_ticket" field if the given value is not nil.
func (*UserEmailUpdate) SetOwnerID ¶
func (ueu *UserEmailUpdate) SetOwnerID(i int) *UserEmailUpdate
SetOwnerID sets the "owner_id" field.
func (*UserEmailUpdate) SetUpdateTime ¶
func (ueu *UserEmailUpdate) SetUpdateTime(t time.Time) *UserEmailUpdate
SetUpdateTime sets the "update_time" field.
func (*UserEmailUpdate) SetVerifed ¶
func (ueu *UserEmailUpdate) SetVerifed(b bool) *UserEmailUpdate
SetVerifed sets the "verifed" field.
func (*UserEmailUpdate) SetVerifedTime ¶
func (ueu *UserEmailUpdate) SetVerifedTime(t time.Time) *UserEmailUpdate
SetVerifedTime sets the "verifed_time" field.
func (*UserEmailUpdate) SetVerifyTicket ¶
func (ueu *UserEmailUpdate) SetVerifyTicket(s string) *UserEmailUpdate
SetVerifyTicket sets the "verify_ticket" field.
func (*UserEmailUpdate) Where ¶
func (ueu *UserEmailUpdate) Where(ps ...predicate.UserEmail) *UserEmailUpdate
Where adds a new predicate for the UserEmailUpdate builder.
type UserEmailUpdateOne ¶
type UserEmailUpdateOne struct {
// contains filtered or unexported fields
}
UserEmailUpdateOne is the builder for updating a single UserEmail entity.
func (*UserEmailUpdateOne) ClearEmailOwner ¶
func (ueuo *UserEmailUpdateOne) ClearEmailOwner() *UserEmailUpdateOne
ClearEmailOwner clears the "email_owner" edge to the User entity.
func (*UserEmailUpdateOne) ClearVerifedTime ¶
func (ueuo *UserEmailUpdateOne) ClearVerifedTime() *UserEmailUpdateOne
ClearVerifedTime clears the value of the "verifed_time" field.
func (*UserEmailUpdateOne) ClearVerifyTicket ¶
func (ueuo *UserEmailUpdateOne) ClearVerifyTicket() *UserEmailUpdateOne
ClearVerifyTicket clears the value of the "verify_ticket" field.
func (*UserEmailUpdateOne) Exec ¶
func (ueuo *UserEmailUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserEmailUpdateOne) ExecX ¶
func (ueuo *UserEmailUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserEmailUpdateOne) Mutation ¶
func (ueuo *UserEmailUpdateOne) Mutation() *UserEmailMutation
Mutation returns the UserEmailMutation object of the builder.
func (*UserEmailUpdateOne) Save ¶
func (ueuo *UserEmailUpdateOne) Save(ctx context.Context) (*UserEmail, error)
Save executes the query and returns the updated UserEmail entity.
func (*UserEmailUpdateOne) SaveX ¶
func (ueuo *UserEmailUpdateOne) SaveX(ctx context.Context) *UserEmail
SaveX is like Save, but panics if an error occurs.
func (*UserEmailUpdateOne) Select ¶
func (ueuo *UserEmailUpdateOne) Select(field string, fields ...string) *UserEmailUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserEmailUpdateOne) SetEmail ¶
func (ueuo *UserEmailUpdateOne) SetEmail(s string) *UserEmailUpdateOne
SetEmail sets the "email" field.
func (*UserEmailUpdateOne) SetEmailOwner ¶
func (ueuo *UserEmailUpdateOne) SetEmailOwner(u *User) *UserEmailUpdateOne
SetEmailOwner sets the "email_owner" edge to the User entity.
func (*UserEmailUpdateOne) SetEmailOwnerID ¶
func (ueuo *UserEmailUpdateOne) SetEmailOwnerID(id int) *UserEmailUpdateOne
SetEmailOwnerID sets the "email_owner" edge to the User entity by ID.
func (*UserEmailUpdateOne) SetIsPrimary ¶
func (ueuo *UserEmailUpdateOne) SetIsPrimary(b bool) *UserEmailUpdateOne
SetIsPrimary sets the "is_primary" field.
func (*UserEmailUpdateOne) SetNillableIsPrimary ¶
func (ueuo *UserEmailUpdateOne) SetNillableIsPrimary(b *bool) *UserEmailUpdateOne
SetNillableIsPrimary sets the "is_primary" field if the given value is not nil.
func (*UserEmailUpdateOne) SetNillableVerifed ¶
func (ueuo *UserEmailUpdateOne) SetNillableVerifed(b *bool) *UserEmailUpdateOne
SetNillableVerifed sets the "verifed" field if the given value is not nil.
func (*UserEmailUpdateOne) SetNillableVerifedTime ¶
func (ueuo *UserEmailUpdateOne) SetNillableVerifedTime(t *time.Time) *UserEmailUpdateOne
SetNillableVerifedTime sets the "verifed_time" field if the given value is not nil.
func (*UserEmailUpdateOne) SetNillableVerifyTicket ¶
func (ueuo *UserEmailUpdateOne) SetNillableVerifyTicket(s *string) *UserEmailUpdateOne
SetNillableVerifyTicket sets the "verify_ticket" field if the given value is not nil.
func (*UserEmailUpdateOne) SetOwnerID ¶
func (ueuo *UserEmailUpdateOne) SetOwnerID(i int) *UserEmailUpdateOne
SetOwnerID sets the "owner_id" field.
func (*UserEmailUpdateOne) SetUpdateTime ¶
func (ueuo *UserEmailUpdateOne) SetUpdateTime(t time.Time) *UserEmailUpdateOne
SetUpdateTime sets the "update_time" field.
func (*UserEmailUpdateOne) SetVerifed ¶
func (ueuo *UserEmailUpdateOne) SetVerifed(b bool) *UserEmailUpdateOne
SetVerifed sets the "verifed" field.
func (*UserEmailUpdateOne) SetVerifedTime ¶
func (ueuo *UserEmailUpdateOne) SetVerifedTime(t time.Time) *UserEmailUpdateOne
SetVerifedTime sets the "verifed_time" field.
func (*UserEmailUpdateOne) SetVerifyTicket ¶
func (ueuo *UserEmailUpdateOne) SetVerifyTicket(s string) *UserEmailUpdateOne
SetVerifyTicket sets the "verify_ticket" field.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) BoolX ¶
func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserGroupBy) Bools ¶
func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) BoolsX ¶
func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupBy) Float64 ¶
func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) Float64X ¶
func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserGroupBy) Float64s ¶
func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) Float64sX ¶
func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupBy) Int ¶
func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) IntX ¶
func (ugb *UserGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserGroupBy) Ints ¶
func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) IntsX ¶
func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) ScanX ¶
func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserGroupBy) String ¶
func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) StringX ¶
func (ugb *UserGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) 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 (*UserMutation) AddUserEmailIDs ¶
func (m *UserMutation) AddUserEmailIDs(ids ...int)
AddUserEmailIDs adds the "UserEmails" edge to the UserEmail entity by ids.
func (*UserMutation) AddUserSecurityLogIDs ¶
func (m *UserMutation) AddUserSecurityLogIDs(ids ...int)
AddUserSecurityLogIDs adds the "UserSecurityLogs" edge to the UserSecurityLog entity by ids.
func (*UserMutation) AddUserSettingIDs ¶
func (m *UserMutation) AddUserSettingIDs(ids ...int)
AddUserSettingIDs adds the "UserSettings" edge to the UserSetting entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) 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 (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearDeleteTime ¶
func (m *UserMutation) ClearDeleteTime()
ClearDeleteTime clears the value of the "delete_time" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) 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 (*UserMutation) ClearField ¶
func (m *UserMutation) 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 (*UserMutation) ClearLastPwdAuth ¶
func (m *UserMutation) ClearLastPwdAuth()
ClearLastPwdAuth clears the value of the "last_pwd_auth" field.
func (*UserMutation) ClearPassword ¶
func (m *UserMutation) ClearPassword()
ClearPassword clears the value of the "password" field.
func (*UserMutation) ClearPhone ¶
func (m *UserMutation) ClearPhone()
ClearPhone clears the value of the "phone" field.
func (*UserMutation) ClearStatus ¶
func (m *UserMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*UserMutation) ClearUserEmails ¶
func (m *UserMutation) ClearUserEmails()
ClearUserEmails clears the "UserEmails" edge to the UserEmail entity.
func (*UserMutation) ClearUserSecurityLogs ¶
func (m *UserMutation) ClearUserSecurityLogs()
ClearUserSecurityLogs clears the "UserSecurityLogs" edge to the UserSecurityLog entity.
func (*UserMutation) ClearUserSettings ¶
func (m *UserMutation) ClearUserSettings()
ClearUserSettings clears the "UserSettings" edge to the UserSetting entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) 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 (*UserMutation) CreateTime ¶
func (m *UserMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserMutation) DeleteTime ¶
func (m *UserMutation) DeleteTime() (r time.Time, exists bool)
DeleteTime returns the value of the "delete_time" field in the mutation.
func (*UserMutation) DeleteTimeCleared ¶
func (m *UserMutation) DeleteTimeCleared() bool
DeleteTimeCleared returns if the "delete_time" field was cleared in this mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) 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 (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) 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 (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*UserMutation) LastPwdAuth ¶
func (m *UserMutation) LastPwdAuth() (r time.Time, exists bool)
LastPwdAuth returns the value of the "last_pwd_auth" field in the mutation.
func (*UserMutation) LastPwdAuthCleared ¶
func (m *UserMutation) LastPwdAuthCleared() bool
LastPwdAuthCleared returns if the "last_pwd_auth" field was cleared in this mutation.
func (*UserMutation) Nickname ¶
func (m *UserMutation) Nickname() (r string, exists bool)
Nickname returns the value of the "nickname" field in the mutation.
func (*UserMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the User entity. If the User 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 (*UserMutation) OldDeleteTime ¶
OldDeleteTime returns the old "delete_time" field's value of the User entity. If the User 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 (*UserMutation) 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 (*UserMutation) OldLastPwdAuth ¶
OldLastPwdAuth returns the old "last_pwd_auth" field's value of the User entity. If the User 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 (*UserMutation) OldNickname ¶
func (m *UserMutation) OldNickname(ctx context.Context) (v string, err error)
OldNickname returns the old "nickname" field's value of the User entity. If the User 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 (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v *string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User 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 (*UserMutation) OldPhone ¶
func (m *UserMutation) OldPhone(ctx context.Context) (v *string, err error)
OldPhone returns the old "phone" field's value of the User entity. If the User 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 (*UserMutation) OldSignature ¶
func (m *UserMutation) OldSignature(ctx context.Context) (v string, err error)
OldSignature returns the old "signature" field's value of the User entity. If the User 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 (*UserMutation) OldSn ¶
func (m *UserMutation) OldSn(ctx context.Context) (v string, err error)
OldSn returns the old "sn" field's value of the User entity. If the User 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 (*UserMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the User entity. If the User 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 (*UserMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the User entity. If the User 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 (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) PasswordCleared ¶
func (m *UserMutation) PasswordCleared() bool
PasswordCleared returns if the "password" field was cleared in this mutation.
func (*UserMutation) Phone ¶
func (m *UserMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*UserMutation) PhoneCleared ¶
func (m *UserMutation) PhoneCleared() bool
PhoneCleared returns if the "phone" field was cleared in this mutation.
func (*UserMutation) RemoveUserEmailIDs ¶
func (m *UserMutation) RemoveUserEmailIDs(ids ...int)
RemoveUserEmailIDs removes the "UserEmails" edge to the UserEmail entity by IDs.
func (*UserMutation) RemoveUserSecurityLogIDs ¶
func (m *UserMutation) RemoveUserSecurityLogIDs(ids ...int)
RemoveUserSecurityLogIDs removes the "UserSecurityLogs" edge to the UserSecurityLog entity by IDs.
func (*UserMutation) RemoveUserSettingIDs ¶
func (m *UserMutation) RemoveUserSettingIDs(ids ...int)
RemoveUserSettingIDs removes the "UserSettings" edge to the UserSetting entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) 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 (*UserMutation) RemovedUserEmailsIDs ¶
func (m *UserMutation) RemovedUserEmailsIDs() (ids []int)
RemovedUserEmails returns the removed IDs of the "UserEmails" edge to the UserEmail entity.
func (*UserMutation) RemovedUserSecurityLogsIDs ¶
func (m *UserMutation) RemovedUserSecurityLogsIDs() (ids []int)
RemovedUserSecurityLogs returns the removed IDs of the "UserSecurityLogs" edge to the UserSecurityLog entity.
func (*UserMutation) RemovedUserSettingsIDs ¶
func (m *UserMutation) RemovedUserSettingsIDs() (ids []int)
RemovedUserSettings returns the removed IDs of the "UserSettings" edge to the UserSetting entity.
func (*UserMutation) ResetCreateTime ¶
func (m *UserMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserMutation) ResetDeleteTime ¶
func (m *UserMutation) ResetDeleteTime()
ResetDeleteTime resets all changes to the "delete_time" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) 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 (*UserMutation) ResetField ¶
func (m *UserMutation) 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 (*UserMutation) ResetLastPwdAuth ¶
func (m *UserMutation) ResetLastPwdAuth()
ResetLastPwdAuth resets all changes to the "last_pwd_auth" field.
func (*UserMutation) ResetNickname ¶
func (m *UserMutation) ResetNickname()
ResetNickname resets all changes to the "nickname" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetPhone ¶
func (m *UserMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*UserMutation) ResetSignature ¶
func (m *UserMutation) ResetSignature()
ResetSignature resets all changes to the "signature" field.
func (*UserMutation) ResetSn ¶
func (m *UserMutation) ResetSn()
ResetSn resets all changes to the "sn" field.
func (*UserMutation) ResetStatus ¶
func (m *UserMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*UserMutation) ResetUpdateTime ¶
func (m *UserMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserMutation) ResetUserEmails ¶
func (m *UserMutation) ResetUserEmails()
ResetUserEmails resets all changes to the "UserEmails" edge.
func (*UserMutation) ResetUserSecurityLogs ¶
func (m *UserMutation) ResetUserSecurityLogs()
ResetUserSecurityLogs resets all changes to the "UserSecurityLogs" edge.
func (*UserMutation) ResetUserSettings ¶
func (m *UserMutation) ResetUserSettings()
ResetUserSettings resets all changes to the "UserSettings" edge.
func (*UserMutation) SetCreateTime ¶
func (m *UserMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserMutation) SetDeleteTime ¶
func (m *UserMutation) SetDeleteTime(t time.Time)
SetDeleteTime sets the "delete_time" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) 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 (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetLastPwdAuth ¶
func (m *UserMutation) SetLastPwdAuth(t time.Time)
SetLastPwdAuth sets the "last_pwd_auth" field.
func (*UserMutation) SetNickname ¶
func (m *UserMutation) SetNickname(s string)
SetNickname sets the "nickname" field.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetPhone ¶
func (m *UserMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*UserMutation) SetSignature ¶
func (m *UserMutation) SetSignature(s string)
SetSignature sets the "signature" field.
func (*UserMutation) SetStatus ¶
func (m *UserMutation) SetStatus(u user.Status)
SetStatus sets the "status" field.
func (*UserMutation) SetUpdateTime ¶
func (m *UserMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserMutation) Signature ¶
func (m *UserMutation) Signature() (r string, exists bool)
Signature returns the value of the "signature" field in the mutation.
func (*UserMutation) Sn ¶
func (m *UserMutation) Sn() (r string, exists bool)
Sn returns the value of the "sn" field in the mutation.
func (*UserMutation) Status ¶
func (m *UserMutation) Status() (r user.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*UserMutation) StatusCleared ¶
func (m *UserMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdateTime ¶
func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserMutation) UserEmailsCleared ¶
func (m *UserMutation) UserEmailsCleared() bool
UserEmailsCleared reports if the "UserEmails" edge to the UserEmail entity was cleared.
func (*UserMutation) UserEmailsIDs ¶
func (m *UserMutation) UserEmailsIDs() (ids []int)
UserEmailsIDs returns the "UserEmails" edge IDs in the mutation.
func (*UserMutation) UserSecurityLogsCleared ¶
func (m *UserMutation) UserSecurityLogsCleared() bool
UserSecurityLogsCleared reports if the "UserSecurityLogs" edge to the UserSecurityLog entity was cleared.
func (*UserMutation) UserSecurityLogsIDs ¶
func (m *UserMutation) UserSecurityLogsIDs() (ids []int)
UserSecurityLogsIDs returns the "UserSecurityLogs" edge IDs in the mutation.
func (*UserMutation) UserSettingsCleared ¶
func (m *UserMutation) UserSettingsCleared() bool
UserSettingsCleared reports if the "UserSettings" edge to the UserSetting entity was cleared.
func (*UserMutation) UserSettingsIDs ¶
func (m *UserMutation) UserSettingsIDs() (ids []int)
UserSettingsIDs returns the "UserSettings" edge IDs in the mutation.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
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 { Sn string `json:"-"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldSn). Aggregate(model.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one User entity is not found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when exactly one User ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryUserEmails ¶
func (uq *UserQuery) QueryUserEmails() *UserEmailQuery
QueryUserEmails chains the current query on the "UserEmails" edge.
func (*UserQuery) QueryUserSecurityLogs ¶
func (uq *UserQuery) QueryUserSecurityLogs() *UserSecurityLogQuery
QueryUserSecurityLogs chains the current query on the "UserSecurityLogs" edge.
func (*UserQuery) QueryUserSettings ¶
func (uq *UserQuery) QueryUserSettings() *UserSettingQuery
QueryUserSettings chains the current query on the "UserSettings" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
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 { Sn string `json:"-"` } client.User.Query(). Select(user.FieldSn). Scan(ctx, &v)
func (*UserQuery) Unique ¶
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 (*UserQuery) WithUserEmails ¶
func (uq *UserQuery) WithUserEmails(opts ...func(*UserEmailQuery)) *UserQuery
WithUserEmails tells the query-builder to eager-load the nodes that are connected to the "UserEmails" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithUserSecurityLogs ¶
func (uq *UserQuery) WithUserSecurityLogs(opts ...func(*UserSecurityLogQuery)) *UserQuery
WithUserSecurityLogs tells the query-builder to eager-load the nodes that are connected to the "UserSecurityLogs" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithUserSettings ¶
func (uq *UserQuery) WithUserSettings(opts ...func(*UserSettingQuery)) *UserQuery
WithUserSettings tells the query-builder to eager-load the nodes that are connected to the "UserSettings" edge. The optional arguments are used to configure the query builder of the edge.
type UserSecurityLog ¶
type UserSecurityLog struct { // ID of the ent. ID int `json:"id,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"-"` // Action holds the value of the "action" field. Action usersecuritylog.Action `json:"action,omitempty"` // IP holds the value of the "ip" field. IP *string `json:"ip,omitempty"` // RequestID holds the value of the "request_id" field. RequestID *string `json:"request_id,omitempty"` // ServerVersion holds the value of the "server_version" field. ServerVersion *string `json:"server_version,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Remark holds the value of the "remark" field. Remark *string `json:"remark,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"-"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserSecurityLogQuery when eager-loading is set. Edges UserSecurityLogEdges `json:"edges"` // contains filtered or unexported fields }
UserSecurityLog is the model entity for the UserSecurityLog schema.
func (*UserSecurityLog) QuerySecurityLogsOwner ¶
func (usl *UserSecurityLog) QuerySecurityLogsOwner() *UserQuery
QuerySecurityLogsOwner queries the "security_logs_owner" edge of the UserSecurityLog entity.
func (*UserSecurityLog) String ¶
func (usl *UserSecurityLog) String() string
String implements the fmt.Stringer.
func (*UserSecurityLog) Unwrap ¶
func (usl *UserSecurityLog) Unwrap() *UserSecurityLog
Unwrap unwraps the UserSecurityLog 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 (*UserSecurityLog) Update ¶
func (usl *UserSecurityLog) Update() *UserSecurityLogUpdateOne
Update returns a builder for updating this UserSecurityLog. Note that you need to call UserSecurityLog.Unwrap() before calling this method if this UserSecurityLog was returned from a transaction, and the transaction was committed or rolled back.
type UserSecurityLogClient ¶
type UserSecurityLogClient struct {
// contains filtered or unexported fields
}
UserSecurityLogClient is a client for the UserSecurityLog schema.
func NewUserSecurityLogClient ¶
func NewUserSecurityLogClient(c config) *UserSecurityLogClient
NewUserSecurityLogClient returns a client for the UserSecurityLog from the given config.
func (*UserSecurityLogClient) Create ¶
func (c *UserSecurityLogClient) Create() *UserSecurityLogCreate
Create returns a create builder for UserSecurityLog.
func (*UserSecurityLogClient) CreateBulk ¶
func (c *UserSecurityLogClient) CreateBulk(builders ...*UserSecurityLogCreate) *UserSecurityLogCreateBulk
CreateBulk returns a builder for creating a bulk of UserSecurityLog entities.
func (*UserSecurityLogClient) Delete ¶
func (c *UserSecurityLogClient) Delete() *UserSecurityLogDelete
Delete returns a delete builder for UserSecurityLog.
func (*UserSecurityLogClient) DeleteOne ¶
func (c *UserSecurityLogClient) DeleteOne(usl *UserSecurityLog) *UserSecurityLogDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserSecurityLogClient) DeleteOneID ¶
func (c *UserSecurityLogClient) DeleteOneID(id int) *UserSecurityLogDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserSecurityLogClient) Get ¶
func (c *UserSecurityLogClient) Get(ctx context.Context, id int) (*UserSecurityLog, error)
Get returns a UserSecurityLog entity by its id.
func (*UserSecurityLogClient) GetX ¶
func (c *UserSecurityLogClient) GetX(ctx context.Context, id int) *UserSecurityLog
GetX is like Get, but panics if an error occurs.
func (*UserSecurityLogClient) Hooks ¶
func (c *UserSecurityLogClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserSecurityLogClient) Query ¶
func (c *UserSecurityLogClient) Query() *UserSecurityLogQuery
Query returns a query builder for UserSecurityLog.
func (*UserSecurityLogClient) QuerySecurityLogsOwner ¶
func (c *UserSecurityLogClient) QuerySecurityLogsOwner(usl *UserSecurityLog) *UserQuery
QuerySecurityLogsOwner queries the security_logs_owner edge of a UserSecurityLog.
func (*UserSecurityLogClient) Update ¶
func (c *UserSecurityLogClient) Update() *UserSecurityLogUpdate
Update returns an update builder for UserSecurityLog.
func (*UserSecurityLogClient) UpdateOne ¶
func (c *UserSecurityLogClient) UpdateOne(usl *UserSecurityLog) *UserSecurityLogUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserSecurityLogClient) UpdateOneID ¶
func (c *UserSecurityLogClient) UpdateOneID(id int) *UserSecurityLogUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserSecurityLogClient) Use ¶
func (c *UserSecurityLogClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usersecuritylog.Hooks(f(g(h())))`.
type UserSecurityLogCreate ¶
type UserSecurityLogCreate struct {
// contains filtered or unexported fields
}
UserSecurityLogCreate is the builder for creating a UserSecurityLog entity.
func (*UserSecurityLogCreate) Mutation ¶
func (uslc *UserSecurityLogCreate) Mutation() *UserSecurityLogMutation
Mutation returns the UserSecurityLogMutation object of the builder.
func (*UserSecurityLogCreate) Save ¶
func (uslc *UserSecurityLogCreate) Save(ctx context.Context) (*UserSecurityLog, error)
Save creates the UserSecurityLog in the database.
func (*UserSecurityLogCreate) SaveX ¶
func (uslc *UserSecurityLogCreate) SaveX(ctx context.Context) *UserSecurityLog
SaveX calls Save and panics if Save returns an error.
func (*UserSecurityLogCreate) SetAction ¶
func (uslc *UserSecurityLogCreate) SetAction(u usersecuritylog.Action) *UserSecurityLogCreate
SetAction sets the "action" field.
func (*UserSecurityLogCreate) SetCreateTime ¶
func (uslc *UserSecurityLogCreate) SetCreateTime(t time.Time) *UserSecurityLogCreate
SetCreateTime sets the "create_time" field.
func (*UserSecurityLogCreate) SetDescription ¶
func (uslc *UserSecurityLogCreate) SetDescription(s string) *UserSecurityLogCreate
SetDescription sets the "description" field.
func (*UserSecurityLogCreate) SetID ¶
func (uslc *UserSecurityLogCreate) SetID(i int) *UserSecurityLogCreate
SetID sets the "id" field.
func (*UserSecurityLogCreate) SetIP ¶
func (uslc *UserSecurityLogCreate) SetIP(s string) *UserSecurityLogCreate
SetIP sets the "ip" field.
func (*UserSecurityLogCreate) SetNillableAction ¶
func (uslc *UserSecurityLogCreate) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogCreate
SetNillableAction sets the "action" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableCreateTime ¶
func (uslc *UserSecurityLogCreate) SetNillableCreateTime(t *time.Time) *UserSecurityLogCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableDescription ¶
func (uslc *UserSecurityLogCreate) SetNillableDescription(s *string) *UserSecurityLogCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableIP ¶
func (uslc *UserSecurityLogCreate) SetNillableIP(s *string) *UserSecurityLogCreate
SetNillableIP sets the "ip" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableRemark ¶
func (uslc *UserSecurityLogCreate) SetNillableRemark(s *string) *UserSecurityLogCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableRequestID ¶
func (uslc *UserSecurityLogCreate) SetNillableRequestID(s *string) *UserSecurityLogCreate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*UserSecurityLogCreate) SetNillableServerVersion ¶
func (uslc *UserSecurityLogCreate) SetNillableServerVersion(s *string) *UserSecurityLogCreate
SetNillableServerVersion sets the "server_version" field if the given value is not nil.
func (*UserSecurityLogCreate) SetOwnerID ¶
func (uslc *UserSecurityLogCreate) SetOwnerID(i int) *UserSecurityLogCreate
SetOwnerID sets the "owner_id" field.
func (*UserSecurityLogCreate) SetRemark ¶
func (uslc *UserSecurityLogCreate) SetRemark(s string) *UserSecurityLogCreate
SetRemark sets the "remark" field.
func (*UserSecurityLogCreate) SetRequestID ¶
func (uslc *UserSecurityLogCreate) SetRequestID(s string) *UserSecurityLogCreate
SetRequestID sets the "request_id" field.
func (*UserSecurityLogCreate) SetSecurityLogsOwner ¶
func (uslc *UserSecurityLogCreate) SetSecurityLogsOwner(u *User) *UserSecurityLogCreate
SetSecurityLogsOwner sets the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogCreate) SetSecurityLogsOwnerID ¶
func (uslc *UserSecurityLogCreate) SetSecurityLogsOwnerID(id int) *UserSecurityLogCreate
SetSecurityLogsOwnerID sets the "security_logs_owner" edge to the User entity by ID.
func (*UserSecurityLogCreate) SetServerVersion ¶
func (uslc *UserSecurityLogCreate) SetServerVersion(s string) *UserSecurityLogCreate
SetServerVersion sets the "server_version" field.
type UserSecurityLogCreateBulk ¶
type UserSecurityLogCreateBulk struct {
// contains filtered or unexported fields
}
UserSecurityLogCreateBulk is the builder for creating many UserSecurityLog entities in bulk.
func (*UserSecurityLogCreateBulk) Save ¶
func (uslcb *UserSecurityLogCreateBulk) Save(ctx context.Context) ([]*UserSecurityLog, error)
Save creates the UserSecurityLog entities in the database.
func (*UserSecurityLogCreateBulk) SaveX ¶
func (uslcb *UserSecurityLogCreateBulk) SaveX(ctx context.Context) []*UserSecurityLog
SaveX is like Save, but panics if an error occurs.
type UserSecurityLogDelete ¶
type UserSecurityLogDelete struct {
// contains filtered or unexported fields
}
UserSecurityLogDelete is the builder for deleting a UserSecurityLog entity.
func (*UserSecurityLogDelete) Exec ¶
func (usld *UserSecurityLogDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserSecurityLogDelete) ExecX ¶
func (usld *UserSecurityLogDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserSecurityLogDelete) Where ¶
func (usld *UserSecurityLogDelete) Where(ps ...predicate.UserSecurityLog) *UserSecurityLogDelete
Where adds a new predicate to the UserSecurityLogDelete builder.
type UserSecurityLogDeleteOne ¶
type UserSecurityLogDeleteOne struct {
// contains filtered or unexported fields
}
UserSecurityLogDeleteOne is the builder for deleting a single UserSecurityLog entity.
func (*UserSecurityLogDeleteOne) Exec ¶
func (usldo *UserSecurityLogDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserSecurityLogDeleteOne) ExecX ¶
func (usldo *UserSecurityLogDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserSecurityLogEdges ¶
type UserSecurityLogEdges struct { // SecurityLogsOwner holds the value of the security_logs_owner edge. SecurityLogsOwner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
UserSecurityLogEdges holds the relations/edges for other nodes in the graph.
func (UserSecurityLogEdges) SecurityLogsOwnerOrErr ¶
func (e UserSecurityLogEdges) SecurityLogsOwnerOrErr() (*User, error)
SecurityLogsOwnerOrErr returns the SecurityLogsOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserSecurityLogGroupBy ¶
type UserSecurityLogGroupBy struct {
// contains filtered or unexported fields
}
UserSecurityLogGroupBy is the group-by builder for UserSecurityLog entities.
func (*UserSecurityLogGroupBy) Aggregate ¶
func (uslgb *UserSecurityLogGroupBy) Aggregate(fns ...AggregateFunc) *UserSecurityLogGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserSecurityLogGroupBy) Bool ¶
func (uslgb *UserSecurityLogGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserSecurityLogGroupBy) BoolX ¶
func (uslgb *UserSecurityLogGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Bools ¶
func (uslgb *UserSecurityLogGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserSecurityLogGroupBy) BoolsX ¶
func (uslgb *UserSecurityLogGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Float64 ¶
func (uslgb *UserSecurityLogGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserSecurityLogGroupBy) Float64X ¶
func (uslgb *UserSecurityLogGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Float64s ¶
func (uslgb *UserSecurityLogGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserSecurityLogGroupBy) Float64sX ¶
func (uslgb *UserSecurityLogGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Int ¶
func (uslgb *UserSecurityLogGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserSecurityLogGroupBy) IntX ¶
func (uslgb *UserSecurityLogGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Ints ¶
func (uslgb *UserSecurityLogGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserSecurityLogGroupBy) IntsX ¶
func (uslgb *UserSecurityLogGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSecurityLogGroupBy) Scan ¶
func (uslgb *UserSecurityLogGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserSecurityLogGroupBy) ScanX ¶
func (uslgb *UserSecurityLogGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSecurityLogGroupBy) String ¶
func (uslgb *UserSecurityLogGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserSecurityLogGroupBy) StringX ¶
func (uslgb *UserSecurityLogGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSecurityLogMutation ¶
type UserSecurityLogMutation struct {
// contains filtered or unexported fields
}
UserSecurityLogMutation represents an operation that mutates the UserSecurityLog nodes in the graph.
func (*UserSecurityLogMutation) Action ¶
func (m *UserSecurityLogMutation) Action() (r usersecuritylog.Action, exists bool)
Action returns the value of the "action" field in the mutation.
func (*UserSecurityLogMutation) AddField ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) AddedEdges ¶
func (m *UserSecurityLogMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserSecurityLogMutation) AddedField ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) AddedFields ¶
func (m *UserSecurityLogMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserSecurityLogMutation) AddedIDs ¶
func (m *UserSecurityLogMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserSecurityLogMutation) ClearDescription ¶
func (m *UserSecurityLogMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*UserSecurityLogMutation) ClearEdge ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) ClearField ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) ClearIP ¶
func (m *UserSecurityLogMutation) ClearIP()
ClearIP clears the value of the "ip" field.
func (*UserSecurityLogMutation) ClearRemark ¶
func (m *UserSecurityLogMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*UserSecurityLogMutation) ClearRequestID ¶
func (m *UserSecurityLogMutation) ClearRequestID()
ClearRequestID clears the value of the "request_id" field.
func (*UserSecurityLogMutation) ClearSecurityLogsOwner ¶
func (m *UserSecurityLogMutation) ClearSecurityLogsOwner()
ClearSecurityLogsOwner clears the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogMutation) ClearServerVersion ¶
func (m *UserSecurityLogMutation) ClearServerVersion()
ClearServerVersion clears the value of the "server_version" field.
func (*UserSecurityLogMutation) ClearedEdges ¶
func (m *UserSecurityLogMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserSecurityLogMutation) ClearedFields ¶
func (m *UserSecurityLogMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserSecurityLogMutation) Client ¶
func (m UserSecurityLogMutation) 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 (*UserSecurityLogMutation) CreateTime ¶
func (m *UserSecurityLogMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserSecurityLogMutation) Description ¶
func (m *UserSecurityLogMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*UserSecurityLogMutation) DescriptionCleared ¶
func (m *UserSecurityLogMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*UserSecurityLogMutation) EdgeCleared ¶
func (m *UserSecurityLogMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserSecurityLogMutation) Field ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) FieldCleared ¶
func (m *UserSecurityLogMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserSecurityLogMutation) Fields ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) ID ¶
func (m *UserSecurityLogMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*UserSecurityLogMutation) IP ¶
func (m *UserSecurityLogMutation) IP() (r string, exists bool)
IP returns the value of the "ip" field in the mutation.
func (*UserSecurityLogMutation) IPCleared ¶
func (m *UserSecurityLogMutation) IPCleared() bool
IPCleared returns if the "ip" field was cleared in this mutation.
func (*UserSecurityLogMutation) OldAction ¶
func (m *UserSecurityLogMutation) OldAction(ctx context.Context) (v usersecuritylog.Action, err error)
OldAction returns the old "action" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldDescription ¶
func (m *UserSecurityLogMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) 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 (*UserSecurityLogMutation) OldIP ¶
func (m *UserSecurityLogMutation) OldIP(ctx context.Context) (v *string, err error)
OldIP returns the old "ip" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldOwnerID ¶
func (m *UserSecurityLogMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldRemark ¶
func (m *UserSecurityLogMutation) OldRemark(ctx context.Context) (v *string, err error)
OldRemark returns the old "remark" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldRequestID ¶
func (m *UserSecurityLogMutation) OldRequestID(ctx context.Context) (v *string, err error)
OldRequestID returns the old "request_id" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) OldServerVersion ¶
func (m *UserSecurityLogMutation) OldServerVersion(ctx context.Context) (v *string, err error)
OldServerVersion returns the old "server_version" field's value of the UserSecurityLog entity. If the UserSecurityLog 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 (*UserSecurityLogMutation) Op ¶
func (m *UserSecurityLogMutation) Op() Op
Op returns the operation name.
func (*UserSecurityLogMutation) OwnerID ¶
func (m *UserSecurityLogMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*UserSecurityLogMutation) Remark ¶
func (m *UserSecurityLogMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*UserSecurityLogMutation) RemarkCleared ¶
func (m *UserSecurityLogMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*UserSecurityLogMutation) RemovedEdges ¶
func (m *UserSecurityLogMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserSecurityLogMutation) RemovedIDs ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) RequestID ¶
func (m *UserSecurityLogMutation) RequestID() (r string, exists bool)
RequestID returns the value of the "request_id" field in the mutation.
func (*UserSecurityLogMutation) RequestIDCleared ¶
func (m *UserSecurityLogMutation) RequestIDCleared() bool
RequestIDCleared returns if the "request_id" field was cleared in this mutation.
func (*UserSecurityLogMutation) ResetAction ¶
func (m *UserSecurityLogMutation) ResetAction()
ResetAction resets all changes to the "action" field.
func (*UserSecurityLogMutation) ResetCreateTime ¶
func (m *UserSecurityLogMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserSecurityLogMutation) ResetDescription ¶
func (m *UserSecurityLogMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*UserSecurityLogMutation) ResetEdge ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) ResetField ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) ResetIP ¶
func (m *UserSecurityLogMutation) ResetIP()
ResetIP resets all changes to the "ip" field.
func (*UserSecurityLogMutation) ResetOwnerID ¶
func (m *UserSecurityLogMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*UserSecurityLogMutation) ResetRemark ¶
func (m *UserSecurityLogMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*UserSecurityLogMutation) ResetRequestID ¶
func (m *UserSecurityLogMutation) ResetRequestID()
ResetRequestID resets all changes to the "request_id" field.
func (*UserSecurityLogMutation) ResetSecurityLogsOwner ¶
func (m *UserSecurityLogMutation) ResetSecurityLogsOwner()
ResetSecurityLogsOwner resets all changes to the "security_logs_owner" edge.
func (*UserSecurityLogMutation) ResetServerVersion ¶
func (m *UserSecurityLogMutation) ResetServerVersion()
ResetServerVersion resets all changes to the "server_version" field.
func (*UserSecurityLogMutation) SecurityLogsOwnerCleared ¶
func (m *UserSecurityLogMutation) SecurityLogsOwnerCleared() bool
SecurityLogsOwnerCleared reports if the "security_logs_owner" edge to the User entity was cleared.
func (*UserSecurityLogMutation) SecurityLogsOwnerID ¶
func (m *UserSecurityLogMutation) SecurityLogsOwnerID() (id int, exists bool)
SecurityLogsOwnerID returns the "security_logs_owner" edge ID in the mutation.
func (*UserSecurityLogMutation) SecurityLogsOwnerIDs ¶
func (m *UserSecurityLogMutation) SecurityLogsOwnerIDs() (ids []int)
SecurityLogsOwnerIDs returns the "security_logs_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SecurityLogsOwnerID instead. It exists only for internal usage by the builders.
func (*UserSecurityLogMutation) ServerVersion ¶
func (m *UserSecurityLogMutation) ServerVersion() (r string, exists bool)
ServerVersion returns the value of the "server_version" field in the mutation.
func (*UserSecurityLogMutation) ServerVersionCleared ¶
func (m *UserSecurityLogMutation) ServerVersionCleared() bool
ServerVersionCleared returns if the "server_version" field was cleared in this mutation.
func (*UserSecurityLogMutation) SetAction ¶
func (m *UserSecurityLogMutation) SetAction(u usersecuritylog.Action)
SetAction sets the "action" field.
func (*UserSecurityLogMutation) SetCreateTime ¶
func (m *UserSecurityLogMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserSecurityLogMutation) SetDescription ¶
func (m *UserSecurityLogMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*UserSecurityLogMutation) SetField ¶
func (m *UserSecurityLogMutation) 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 (*UserSecurityLogMutation) SetID ¶
func (m *UserSecurityLogMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserSecurityLog entities.
func (*UserSecurityLogMutation) SetIP ¶
func (m *UserSecurityLogMutation) SetIP(s string)
SetIP sets the "ip" field.
func (*UserSecurityLogMutation) SetOwnerID ¶
func (m *UserSecurityLogMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*UserSecurityLogMutation) SetRemark ¶
func (m *UserSecurityLogMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*UserSecurityLogMutation) SetRequestID ¶
func (m *UserSecurityLogMutation) SetRequestID(s string)
SetRequestID sets the "request_id" field.
func (*UserSecurityLogMutation) SetSecurityLogsOwnerID ¶
func (m *UserSecurityLogMutation) SetSecurityLogsOwnerID(id int)
SetSecurityLogsOwnerID sets the "security_logs_owner" edge to the User entity by id.
func (*UserSecurityLogMutation) SetServerVersion ¶
func (m *UserSecurityLogMutation) SetServerVersion(s string)
SetServerVersion sets the "server_version" field.
func (UserSecurityLogMutation) Tx ¶
func (m UserSecurityLogMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserSecurityLogMutation) Type ¶
func (m *UserSecurityLogMutation) Type() string
Type returns the node type of this mutation (UserSecurityLog).
type UserSecurityLogQuery ¶
type UserSecurityLogQuery struct {
// contains filtered or unexported fields
}
UserSecurityLogQuery is the builder for querying UserSecurityLog entities.
func (*UserSecurityLogQuery) All ¶
func (uslq *UserSecurityLogQuery) All(ctx context.Context) ([]*UserSecurityLog, error)
All executes the query and returns a list of UserSecurityLogs.
func (*UserSecurityLogQuery) AllX ¶
func (uslq *UserSecurityLogQuery) AllX(ctx context.Context) []*UserSecurityLog
AllX is like All, but panics if an error occurs.
func (*UserSecurityLogQuery) Clone ¶
func (uslq *UserSecurityLogQuery) Clone() *UserSecurityLogQuery
Clone returns a duplicate of the UserSecurityLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserSecurityLogQuery) Count ¶
func (uslq *UserSecurityLogQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserSecurityLogQuery) CountX ¶
func (uslq *UserSecurityLogQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserSecurityLogQuery) Exist ¶
func (uslq *UserSecurityLogQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserSecurityLogQuery) ExistX ¶
func (uslq *UserSecurityLogQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserSecurityLogQuery) First ¶
func (uslq *UserSecurityLogQuery) First(ctx context.Context) (*UserSecurityLog, error)
First returns the first UserSecurityLog entity from the query. Returns a *NotFoundError when no UserSecurityLog was found.
func (*UserSecurityLogQuery) FirstID ¶
func (uslq *UserSecurityLogQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserSecurityLog ID from the query. Returns a *NotFoundError when no UserSecurityLog ID was found.
func (*UserSecurityLogQuery) FirstIDX ¶
func (uslq *UserSecurityLogQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserSecurityLogQuery) FirstX ¶
func (uslq *UserSecurityLogQuery) FirstX(ctx context.Context) *UserSecurityLog
FirstX is like First, but panics if an error occurs.
func (*UserSecurityLogQuery) GroupBy ¶
func (uslq *UserSecurityLogQuery) GroupBy(field string, fields ...string) *UserSecurityLogGroupBy
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 { OwnerID int `json:"-"` Count int `json:"count,omitempty"` } client.UserSecurityLog.Query(). GroupBy(usersecuritylog.FieldOwnerID). Aggregate(model.Count()). Scan(ctx, &v)
func (*UserSecurityLogQuery) IDs ¶
func (uslq *UserSecurityLogQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserSecurityLog IDs.
func (*UserSecurityLogQuery) IDsX ¶
func (uslq *UserSecurityLogQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserSecurityLogQuery) Limit ¶
func (uslq *UserSecurityLogQuery) Limit(limit int) *UserSecurityLogQuery
Limit adds a limit step to the query.
func (*UserSecurityLogQuery) Offset ¶
func (uslq *UserSecurityLogQuery) Offset(offset int) *UserSecurityLogQuery
Offset adds an offset step to the query.
func (*UserSecurityLogQuery) Only ¶
func (uslq *UserSecurityLogQuery) Only(ctx context.Context) (*UserSecurityLog, error)
Only returns a single UserSecurityLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserSecurityLog entity is not found. Returns a *NotFoundError when no UserSecurityLog entities are found.
func (*UserSecurityLogQuery) OnlyID ¶
func (uslq *UserSecurityLogQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserSecurityLog ID in the query. Returns a *NotSingularError when exactly one UserSecurityLog ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserSecurityLogQuery) OnlyIDX ¶
func (uslq *UserSecurityLogQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserSecurityLogQuery) OnlyX ¶
func (uslq *UserSecurityLogQuery) OnlyX(ctx context.Context) *UserSecurityLog
OnlyX is like Only, but panics if an error occurs.
func (*UserSecurityLogQuery) Order ¶
func (uslq *UserSecurityLogQuery) Order(o ...OrderFunc) *UserSecurityLogQuery
Order adds an order step to the query.
func (*UserSecurityLogQuery) QuerySecurityLogsOwner ¶
func (uslq *UserSecurityLogQuery) QuerySecurityLogsOwner() *UserQuery
QuerySecurityLogsOwner chains the current query on the "security_logs_owner" edge.
func (*UserSecurityLogQuery) Select ¶
func (uslq *UserSecurityLogQuery) Select(field string, fields ...string) *UserSecurityLogSelect
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 { OwnerID int `json:"-"` } client.UserSecurityLog.Query(). Select(usersecuritylog.FieldOwnerID). Scan(ctx, &v)
func (*UserSecurityLogQuery) Unique ¶
func (uslq *UserSecurityLogQuery) Unique(unique bool) *UserSecurityLogQuery
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 (*UserSecurityLogQuery) Where ¶
func (uslq *UserSecurityLogQuery) Where(ps ...predicate.UserSecurityLog) *UserSecurityLogQuery
Where adds a new predicate for the UserSecurityLogQuery builder.
func (*UserSecurityLogQuery) WithSecurityLogsOwner ¶
func (uslq *UserSecurityLogQuery) WithSecurityLogsOwner(opts ...func(*UserQuery)) *UserSecurityLogQuery
WithSecurityLogsOwner tells the query-builder to eager-load the nodes that are connected to the "security_logs_owner" edge. The optional arguments are used to configure the query builder of the edge.
type UserSecurityLogSelect ¶
type UserSecurityLogSelect struct { *UserSecurityLogQuery // contains filtered or unexported fields }
UserSecurityLogSelect is the builder for selecting fields of UserSecurityLog entities.
func (*UserSecurityLogSelect) Bool ¶
func (usls *UserSecurityLogSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) BoolX ¶
func (usls *UserSecurityLogSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSecurityLogSelect) Bools ¶
func (usls *UserSecurityLogSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) BoolsX ¶
func (usls *UserSecurityLogSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSecurityLogSelect) Float64 ¶
func (usls *UserSecurityLogSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) Float64X ¶
func (usls *UserSecurityLogSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSecurityLogSelect) Float64s ¶
func (usls *UserSecurityLogSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) Float64sX ¶
func (usls *UserSecurityLogSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSecurityLogSelect) Int ¶
func (usls *UserSecurityLogSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) IntX ¶
func (usls *UserSecurityLogSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSecurityLogSelect) Ints ¶
func (usls *UserSecurityLogSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) IntsX ¶
func (usls *UserSecurityLogSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSecurityLogSelect) Scan ¶
func (usls *UserSecurityLogSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSecurityLogSelect) ScanX ¶
func (usls *UserSecurityLogSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSecurityLogSelect) String ¶
func (usls *UserSecurityLogSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSecurityLogSelect) StringX ¶
func (usls *UserSecurityLogSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSecurityLogUpdate ¶
type UserSecurityLogUpdate struct {
// contains filtered or unexported fields
}
UserSecurityLogUpdate is the builder for updating UserSecurityLog entities.
func (*UserSecurityLogUpdate) ClearDescription ¶
func (uslu *UserSecurityLogUpdate) ClearDescription() *UserSecurityLogUpdate
ClearDescription clears the value of the "description" field.
func (*UserSecurityLogUpdate) ClearIP ¶
func (uslu *UserSecurityLogUpdate) ClearIP() *UserSecurityLogUpdate
ClearIP clears the value of the "ip" field.
func (*UserSecurityLogUpdate) ClearRemark ¶
func (uslu *UserSecurityLogUpdate) ClearRemark() *UserSecurityLogUpdate
ClearRemark clears the value of the "remark" field.
func (*UserSecurityLogUpdate) ClearRequestID ¶
func (uslu *UserSecurityLogUpdate) ClearRequestID() *UserSecurityLogUpdate
ClearRequestID clears the value of the "request_id" field.
func (*UserSecurityLogUpdate) ClearSecurityLogsOwner ¶
func (uslu *UserSecurityLogUpdate) ClearSecurityLogsOwner() *UserSecurityLogUpdate
ClearSecurityLogsOwner clears the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogUpdate) ClearServerVersion ¶
func (uslu *UserSecurityLogUpdate) ClearServerVersion() *UserSecurityLogUpdate
ClearServerVersion clears the value of the "server_version" field.
func (*UserSecurityLogUpdate) Exec ¶
func (uslu *UserSecurityLogUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserSecurityLogUpdate) ExecX ¶
func (uslu *UserSecurityLogUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSecurityLogUpdate) Mutation ¶
func (uslu *UserSecurityLogUpdate) Mutation() *UserSecurityLogMutation
Mutation returns the UserSecurityLogMutation object of the builder.
func (*UserSecurityLogUpdate) Save ¶
func (uslu *UserSecurityLogUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserSecurityLogUpdate) SaveX ¶
func (uslu *UserSecurityLogUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserSecurityLogUpdate) SetAction ¶
func (uslu *UserSecurityLogUpdate) SetAction(u usersecuritylog.Action) *UserSecurityLogUpdate
SetAction sets the "action" field.
func (*UserSecurityLogUpdate) SetDescription ¶
func (uslu *UserSecurityLogUpdate) SetDescription(s string) *UserSecurityLogUpdate
SetDescription sets the "description" field.
func (*UserSecurityLogUpdate) SetIP ¶
func (uslu *UserSecurityLogUpdate) SetIP(s string) *UserSecurityLogUpdate
SetIP sets the "ip" field.
func (*UserSecurityLogUpdate) SetNillableAction ¶
func (uslu *UserSecurityLogUpdate) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogUpdate
SetNillableAction sets the "action" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetNillableDescription ¶
func (uslu *UserSecurityLogUpdate) SetNillableDescription(s *string) *UserSecurityLogUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetNillableIP ¶
func (uslu *UserSecurityLogUpdate) SetNillableIP(s *string) *UserSecurityLogUpdate
SetNillableIP sets the "ip" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetNillableRemark ¶
func (uslu *UserSecurityLogUpdate) SetNillableRemark(s *string) *UserSecurityLogUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetNillableRequestID ¶
func (uslu *UserSecurityLogUpdate) SetNillableRequestID(s *string) *UserSecurityLogUpdate
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetNillableServerVersion ¶
func (uslu *UserSecurityLogUpdate) SetNillableServerVersion(s *string) *UserSecurityLogUpdate
SetNillableServerVersion sets the "server_version" field if the given value is not nil.
func (*UserSecurityLogUpdate) SetOwnerID ¶
func (uslu *UserSecurityLogUpdate) SetOwnerID(i int) *UserSecurityLogUpdate
SetOwnerID sets the "owner_id" field.
func (*UserSecurityLogUpdate) SetRemark ¶
func (uslu *UserSecurityLogUpdate) SetRemark(s string) *UserSecurityLogUpdate
SetRemark sets the "remark" field.
func (*UserSecurityLogUpdate) SetRequestID ¶
func (uslu *UserSecurityLogUpdate) SetRequestID(s string) *UserSecurityLogUpdate
SetRequestID sets the "request_id" field.
func (*UserSecurityLogUpdate) SetSecurityLogsOwner ¶
func (uslu *UserSecurityLogUpdate) SetSecurityLogsOwner(u *User) *UserSecurityLogUpdate
SetSecurityLogsOwner sets the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogUpdate) SetSecurityLogsOwnerID ¶
func (uslu *UserSecurityLogUpdate) SetSecurityLogsOwnerID(id int) *UserSecurityLogUpdate
SetSecurityLogsOwnerID sets the "security_logs_owner" edge to the User entity by ID.
func (*UserSecurityLogUpdate) SetServerVersion ¶
func (uslu *UserSecurityLogUpdate) SetServerVersion(s string) *UserSecurityLogUpdate
SetServerVersion sets the "server_version" field.
func (*UserSecurityLogUpdate) Where ¶
func (uslu *UserSecurityLogUpdate) Where(ps ...predicate.UserSecurityLog) *UserSecurityLogUpdate
Where adds a new predicate for the UserSecurityLogUpdate builder.
type UserSecurityLogUpdateOne ¶
type UserSecurityLogUpdateOne struct {
// contains filtered or unexported fields
}
UserSecurityLogUpdateOne is the builder for updating a single UserSecurityLog entity.
func (*UserSecurityLogUpdateOne) ClearDescription ¶
func (usluo *UserSecurityLogUpdateOne) ClearDescription() *UserSecurityLogUpdateOne
ClearDescription clears the value of the "description" field.
func (*UserSecurityLogUpdateOne) ClearIP ¶
func (usluo *UserSecurityLogUpdateOne) ClearIP() *UserSecurityLogUpdateOne
ClearIP clears the value of the "ip" field.
func (*UserSecurityLogUpdateOne) ClearRemark ¶
func (usluo *UserSecurityLogUpdateOne) ClearRemark() *UserSecurityLogUpdateOne
ClearRemark clears the value of the "remark" field.
func (*UserSecurityLogUpdateOne) ClearRequestID ¶
func (usluo *UserSecurityLogUpdateOne) ClearRequestID() *UserSecurityLogUpdateOne
ClearRequestID clears the value of the "request_id" field.
func (*UserSecurityLogUpdateOne) ClearSecurityLogsOwner ¶
func (usluo *UserSecurityLogUpdateOne) ClearSecurityLogsOwner() *UserSecurityLogUpdateOne
ClearSecurityLogsOwner clears the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogUpdateOne) ClearServerVersion ¶
func (usluo *UserSecurityLogUpdateOne) ClearServerVersion() *UserSecurityLogUpdateOne
ClearServerVersion clears the value of the "server_version" field.
func (*UserSecurityLogUpdateOne) Exec ¶
func (usluo *UserSecurityLogUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserSecurityLogUpdateOne) ExecX ¶
func (usluo *UserSecurityLogUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSecurityLogUpdateOne) Mutation ¶
func (usluo *UserSecurityLogUpdateOne) Mutation() *UserSecurityLogMutation
Mutation returns the UserSecurityLogMutation object of the builder.
func (*UserSecurityLogUpdateOne) Save ¶
func (usluo *UserSecurityLogUpdateOne) Save(ctx context.Context) (*UserSecurityLog, error)
Save executes the query and returns the updated UserSecurityLog entity.
func (*UserSecurityLogUpdateOne) SaveX ¶
func (usluo *UserSecurityLogUpdateOne) SaveX(ctx context.Context) *UserSecurityLog
SaveX is like Save, but panics if an error occurs.
func (*UserSecurityLogUpdateOne) Select ¶
func (usluo *UserSecurityLogUpdateOne) Select(field string, fields ...string) *UserSecurityLogUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserSecurityLogUpdateOne) SetAction ¶
func (usluo *UserSecurityLogUpdateOne) SetAction(u usersecuritylog.Action) *UserSecurityLogUpdateOne
SetAction sets the "action" field.
func (*UserSecurityLogUpdateOne) SetDescription ¶
func (usluo *UserSecurityLogUpdateOne) SetDescription(s string) *UserSecurityLogUpdateOne
SetDescription sets the "description" field.
func (*UserSecurityLogUpdateOne) SetIP ¶
func (usluo *UserSecurityLogUpdateOne) SetIP(s string) *UserSecurityLogUpdateOne
SetIP sets the "ip" field.
func (*UserSecurityLogUpdateOne) SetNillableAction ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableAction(u *usersecuritylog.Action) *UserSecurityLogUpdateOne
SetNillableAction sets the "action" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetNillableDescription ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableDescription(s *string) *UserSecurityLogUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetNillableIP ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableIP(s *string) *UserSecurityLogUpdateOne
SetNillableIP sets the "ip" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetNillableRemark ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableRemark(s *string) *UserSecurityLogUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetNillableRequestID ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableRequestID(s *string) *UserSecurityLogUpdateOne
SetNillableRequestID sets the "request_id" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetNillableServerVersion ¶
func (usluo *UserSecurityLogUpdateOne) SetNillableServerVersion(s *string) *UserSecurityLogUpdateOne
SetNillableServerVersion sets the "server_version" field if the given value is not nil.
func (*UserSecurityLogUpdateOne) SetOwnerID ¶
func (usluo *UserSecurityLogUpdateOne) SetOwnerID(i int) *UserSecurityLogUpdateOne
SetOwnerID sets the "owner_id" field.
func (*UserSecurityLogUpdateOne) SetRemark ¶
func (usluo *UserSecurityLogUpdateOne) SetRemark(s string) *UserSecurityLogUpdateOne
SetRemark sets the "remark" field.
func (*UserSecurityLogUpdateOne) SetRequestID ¶
func (usluo *UserSecurityLogUpdateOne) SetRequestID(s string) *UserSecurityLogUpdateOne
SetRequestID sets the "request_id" field.
func (*UserSecurityLogUpdateOne) SetSecurityLogsOwner ¶
func (usluo *UserSecurityLogUpdateOne) SetSecurityLogsOwner(u *User) *UserSecurityLogUpdateOne
SetSecurityLogsOwner sets the "security_logs_owner" edge to the User entity.
func (*UserSecurityLogUpdateOne) SetSecurityLogsOwnerID ¶
func (usluo *UserSecurityLogUpdateOne) SetSecurityLogsOwnerID(id int) *UserSecurityLogUpdateOne
SetSecurityLogsOwnerID sets the "security_logs_owner" edge to the User entity by ID.
func (*UserSecurityLogUpdateOne) SetServerVersion ¶
func (usluo *UserSecurityLogUpdateOne) SetServerVersion(s string) *UserSecurityLogUpdateOne
SetServerVersion sets the "server_version" field.
type UserSecurityLogs ¶
type UserSecurityLogs []*UserSecurityLog
UserSecurityLogs is a parsable slice of UserSecurityLog.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolX ¶
func (us *UserSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSelect) Bools ¶
func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolsX ¶
func (us *UserSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSelect) Float64 ¶
func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64X ¶
func (us *UserSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSelect) Float64s ¶
func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64sX ¶
func (us *UserSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSelect) Int ¶
func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntX ¶
func (us *UserSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSelect) Ints ¶
func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntsX ¶
func (us *UserSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) ScanX ¶
func (us *UserSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSelect) String ¶
func (us *UserSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSelect) StringX ¶
func (us *UserSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSetting ¶
type UserSetting struct { // ID of the ent. ID int `json:"id,omitempty"` // OwnerID holds the value of the "owner_id" field. OwnerID int `json:"-"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // Typeof holds the value of the "typeof" field. Typeof usersetting.Typeof `json:"typeof,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserSettingQuery when eager-loading is set. Edges UserSettingEdges `json:"edges"` // contains filtered or unexported fields }
UserSetting is the model entity for the UserSetting schema.
func (*UserSetting) QuerySettingsOwner ¶
func (us *UserSetting) QuerySettingsOwner() *UserQuery
QuerySettingsOwner queries the "settings_owner" edge of the UserSetting entity.
func (*UserSetting) String ¶
func (us *UserSetting) String() string
String implements the fmt.Stringer.
func (*UserSetting) Unwrap ¶
func (us *UserSetting) Unwrap() *UserSetting
Unwrap unwraps the UserSetting 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 (*UserSetting) Update ¶
func (us *UserSetting) Update() *UserSettingUpdateOne
Update returns a builder for updating this UserSetting. Note that you need to call UserSetting.Unwrap() before calling this method if this UserSetting was returned from a transaction, and the transaction was committed or rolled back.
type UserSettingClient ¶
type UserSettingClient struct {
// contains filtered or unexported fields
}
UserSettingClient is a client for the UserSetting schema.
func NewUserSettingClient ¶
func NewUserSettingClient(c config) *UserSettingClient
NewUserSettingClient returns a client for the UserSetting from the given config.
func (*UserSettingClient) Create ¶
func (c *UserSettingClient) Create() *UserSettingCreate
Create returns a create builder for UserSetting.
func (*UserSettingClient) CreateBulk ¶
func (c *UserSettingClient) CreateBulk(builders ...*UserSettingCreate) *UserSettingCreateBulk
CreateBulk returns a builder for creating a bulk of UserSetting entities.
func (*UserSettingClient) Delete ¶
func (c *UserSettingClient) Delete() *UserSettingDelete
Delete returns a delete builder for UserSetting.
func (*UserSettingClient) DeleteOne ¶
func (c *UserSettingClient) DeleteOne(us *UserSetting) *UserSettingDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserSettingClient) DeleteOneID ¶
func (c *UserSettingClient) DeleteOneID(id int) *UserSettingDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserSettingClient) Get ¶
func (c *UserSettingClient) Get(ctx context.Context, id int) (*UserSetting, error)
Get returns a UserSetting entity by its id.
func (*UserSettingClient) GetX ¶
func (c *UserSettingClient) GetX(ctx context.Context, id int) *UserSetting
GetX is like Get, but panics if an error occurs.
func (*UserSettingClient) Hooks ¶
func (c *UserSettingClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserSettingClient) Query ¶
func (c *UserSettingClient) Query() *UserSettingQuery
Query returns a query builder for UserSetting.
func (*UserSettingClient) QuerySettingsOwner ¶
func (c *UserSettingClient) QuerySettingsOwner(us *UserSetting) *UserQuery
QuerySettingsOwner queries the settings_owner edge of a UserSetting.
func (*UserSettingClient) Update ¶
func (c *UserSettingClient) Update() *UserSettingUpdate
Update returns an update builder for UserSetting.
func (*UserSettingClient) UpdateOne ¶
func (c *UserSettingClient) UpdateOne(us *UserSetting) *UserSettingUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserSettingClient) UpdateOneID ¶
func (c *UserSettingClient) UpdateOneID(id int) *UserSettingUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserSettingClient) Use ¶
func (c *UserSettingClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usersetting.Hooks(f(g(h())))`.
type UserSettingCreate ¶
type UserSettingCreate struct {
// contains filtered or unexported fields
}
UserSettingCreate is the builder for creating a UserSetting entity.
func (*UserSettingCreate) Mutation ¶
func (usc *UserSettingCreate) Mutation() *UserSettingMutation
Mutation returns the UserSettingMutation object of the builder.
func (*UserSettingCreate) Save ¶
func (usc *UserSettingCreate) Save(ctx context.Context) (*UserSetting, error)
Save creates the UserSetting in the database.
func (*UserSettingCreate) SaveX ¶
func (usc *UserSettingCreate) SaveX(ctx context.Context) *UserSetting
SaveX calls Save and panics if Save returns an error.
func (*UserSettingCreate) SetID ¶
func (usc *UserSettingCreate) SetID(i int) *UserSettingCreate
SetID sets the "id" field.
func (*UserSettingCreate) SetKey ¶
func (usc *UserSettingCreate) SetKey(s string) *UserSettingCreate
SetKey sets the "key" field.
func (*UserSettingCreate) SetNillableTypeof ¶
func (usc *UserSettingCreate) SetNillableTypeof(u *usersetting.Typeof) *UserSettingCreate
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*UserSettingCreate) SetOwnerID ¶
func (usc *UserSettingCreate) SetOwnerID(i int) *UserSettingCreate
SetOwnerID sets the "owner_id" field.
func (*UserSettingCreate) SetSettingsOwner ¶
func (usc *UserSettingCreate) SetSettingsOwner(u *User) *UserSettingCreate
SetSettingsOwner sets the "settings_owner" edge to the User entity.
func (*UserSettingCreate) SetSettingsOwnerID ¶
func (usc *UserSettingCreate) SetSettingsOwnerID(id int) *UserSettingCreate
SetSettingsOwnerID sets the "settings_owner" edge to the User entity by ID.
func (*UserSettingCreate) SetTypeof ¶
func (usc *UserSettingCreate) SetTypeof(u usersetting.Typeof) *UserSettingCreate
SetTypeof sets the "typeof" field.
func (*UserSettingCreate) SetValue ¶
func (usc *UserSettingCreate) SetValue(s string) *UserSettingCreate
SetValue sets the "value" field.
type UserSettingCreateBulk ¶
type UserSettingCreateBulk struct {
// contains filtered or unexported fields
}
UserSettingCreateBulk is the builder for creating many UserSetting entities in bulk.
func (*UserSettingCreateBulk) Save ¶
func (uscb *UserSettingCreateBulk) Save(ctx context.Context) ([]*UserSetting, error)
Save creates the UserSetting entities in the database.
func (*UserSettingCreateBulk) SaveX ¶
func (uscb *UserSettingCreateBulk) SaveX(ctx context.Context) []*UserSetting
SaveX is like Save, but panics if an error occurs.
type UserSettingDelete ¶
type UserSettingDelete struct {
// contains filtered or unexported fields
}
UserSettingDelete is the builder for deleting a UserSetting entity.
func (*UserSettingDelete) Exec ¶
func (usd *UserSettingDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserSettingDelete) ExecX ¶
func (usd *UserSettingDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserSettingDelete) Where ¶
func (usd *UserSettingDelete) Where(ps ...predicate.UserSetting) *UserSettingDelete
Where adds a new predicate to the UserSettingDelete builder.
type UserSettingDeleteOne ¶
type UserSettingDeleteOne struct {
// contains filtered or unexported fields
}
UserSettingDeleteOne is the builder for deleting a single UserSetting entity.
func (*UserSettingDeleteOne) Exec ¶
func (usdo *UserSettingDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserSettingDeleteOne) ExecX ¶
func (usdo *UserSettingDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserSettingEdges ¶
type UserSettingEdges struct { // SettingsOwner holds the value of the settings_owner edge. SettingsOwner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
UserSettingEdges holds the relations/edges for other nodes in the graph.
func (UserSettingEdges) SettingsOwnerOrErr ¶
func (e UserSettingEdges) SettingsOwnerOrErr() (*User, error)
SettingsOwnerOrErr returns the SettingsOwner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserSettingGroupBy ¶
type UserSettingGroupBy struct {
// contains filtered or unexported fields
}
UserSettingGroupBy is the group-by builder for UserSetting entities.
func (*UserSettingGroupBy) Aggregate ¶
func (usgb *UserSettingGroupBy) Aggregate(fns ...AggregateFunc) *UserSettingGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserSettingGroupBy) Bool ¶
func (usgb *UserSettingGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserSettingGroupBy) BoolX ¶
func (usgb *UserSettingGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSettingGroupBy) Bools ¶
func (usgb *UserSettingGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserSettingGroupBy) BoolsX ¶
func (usgb *UserSettingGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSettingGroupBy) Float64 ¶
func (usgb *UserSettingGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserSettingGroupBy) Float64X ¶
func (usgb *UserSettingGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSettingGroupBy) Float64s ¶
func (usgb *UserSettingGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserSettingGroupBy) Float64sX ¶
func (usgb *UserSettingGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSettingGroupBy) Int ¶
func (usgb *UserSettingGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserSettingGroupBy) IntX ¶
func (usgb *UserSettingGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSettingGroupBy) Ints ¶
func (usgb *UserSettingGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserSettingGroupBy) IntsX ¶
func (usgb *UserSettingGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSettingGroupBy) Scan ¶
func (usgb *UserSettingGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserSettingGroupBy) ScanX ¶
func (usgb *UserSettingGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSettingGroupBy) String ¶
func (usgb *UserSettingGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserSettingGroupBy) StringX ¶
func (usgb *UserSettingGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSettingMutation ¶
type UserSettingMutation struct {
// contains filtered or unexported fields
}
UserSettingMutation represents an operation that mutates the UserSetting nodes in the graph.
func (*UserSettingMutation) AddField ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) AddedEdges ¶
func (m *UserSettingMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserSettingMutation) AddedField ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) AddedFields ¶
func (m *UserSettingMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserSettingMutation) AddedIDs ¶
func (m *UserSettingMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserSettingMutation) ClearEdge ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ClearField ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ClearSettingsOwner ¶
func (m *UserSettingMutation) ClearSettingsOwner()
ClearSettingsOwner clears the "settings_owner" edge to the User entity.
func (*UserSettingMutation) ClearedEdges ¶
func (m *UserSettingMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserSettingMutation) ClearedFields ¶
func (m *UserSettingMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserSettingMutation) Client ¶
func (m UserSettingMutation) 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 (*UserSettingMutation) EdgeCleared ¶
func (m *UserSettingMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserSettingMutation) Field ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) FieldCleared ¶
func (m *UserSettingMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserSettingMutation) Fields ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ID ¶
func (m *UserSettingMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*UserSettingMutation) Key ¶
func (m *UserSettingMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*UserSettingMutation) 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 (*UserSettingMutation) OldKey ¶
func (m *UserSettingMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the UserSetting entity. If the UserSetting 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 (*UserSettingMutation) OldOwnerID ¶
func (m *UserSettingMutation) OldOwnerID(ctx context.Context) (v int, err error)
OldOwnerID returns the old "owner_id" field's value of the UserSetting entity. If the UserSetting 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 (*UserSettingMutation) OldTypeof ¶
func (m *UserSettingMutation) OldTypeof(ctx context.Context) (v usersetting.Typeof, err error)
OldTypeof returns the old "typeof" field's value of the UserSetting entity. If the UserSetting 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 (*UserSettingMutation) OldValue ¶
func (m *UserSettingMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the UserSetting entity. If the UserSetting 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 (*UserSettingMutation) Op ¶
func (m *UserSettingMutation) Op() Op
Op returns the operation name.
func (*UserSettingMutation) OwnerID ¶
func (m *UserSettingMutation) OwnerID() (r int, exists bool)
OwnerID returns the value of the "owner_id" field in the mutation.
func (*UserSettingMutation) RemovedEdges ¶
func (m *UserSettingMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserSettingMutation) RemovedIDs ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ResetEdge ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ResetField ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) ResetKey ¶
func (m *UserSettingMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*UserSettingMutation) ResetOwnerID ¶
func (m *UserSettingMutation) ResetOwnerID()
ResetOwnerID resets all changes to the "owner_id" field.
func (*UserSettingMutation) ResetSettingsOwner ¶
func (m *UserSettingMutation) ResetSettingsOwner()
ResetSettingsOwner resets all changes to the "settings_owner" edge.
func (*UserSettingMutation) ResetTypeof ¶
func (m *UserSettingMutation) ResetTypeof()
ResetTypeof resets all changes to the "typeof" field.
func (*UserSettingMutation) ResetValue ¶
func (m *UserSettingMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*UserSettingMutation) SetField ¶
func (m *UserSettingMutation) 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 (*UserSettingMutation) SetID ¶
func (m *UserSettingMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserSetting entities.
func (*UserSettingMutation) SetKey ¶
func (m *UserSettingMutation) SetKey(s string)
SetKey sets the "key" field.
func (*UserSettingMutation) SetOwnerID ¶
func (m *UserSettingMutation) SetOwnerID(i int)
SetOwnerID sets the "owner_id" field.
func (*UserSettingMutation) SetSettingsOwnerID ¶
func (m *UserSettingMutation) SetSettingsOwnerID(id int)
SetSettingsOwnerID sets the "settings_owner" edge to the User entity by id.
func (*UserSettingMutation) SetTypeof ¶
func (m *UserSettingMutation) SetTypeof(u usersetting.Typeof)
SetTypeof sets the "typeof" field.
func (*UserSettingMutation) SetValue ¶
func (m *UserSettingMutation) SetValue(s string)
SetValue sets the "value" field.
func (*UserSettingMutation) SettingsOwnerCleared ¶
func (m *UserSettingMutation) SettingsOwnerCleared() bool
SettingsOwnerCleared reports if the "settings_owner" edge to the User entity was cleared.
func (*UserSettingMutation) SettingsOwnerID ¶
func (m *UserSettingMutation) SettingsOwnerID() (id int, exists bool)
SettingsOwnerID returns the "settings_owner" edge ID in the mutation.
func (*UserSettingMutation) SettingsOwnerIDs ¶
func (m *UserSettingMutation) SettingsOwnerIDs() (ids []int)
SettingsOwnerIDs returns the "settings_owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SettingsOwnerID instead. It exists only for internal usage by the builders.
func (UserSettingMutation) Tx ¶
func (m UserSettingMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserSettingMutation) Type ¶
func (m *UserSettingMutation) Type() string
Type returns the node type of this mutation (UserSetting).
func (*UserSettingMutation) Typeof ¶
func (m *UserSettingMutation) Typeof() (r usersetting.Typeof, exists bool)
Typeof returns the value of the "typeof" field in the mutation.
func (*UserSettingMutation) Value ¶
func (m *UserSettingMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
type UserSettingQuery ¶
type UserSettingQuery struct {
// contains filtered or unexported fields
}
UserSettingQuery is the builder for querying UserSetting entities.
func (*UserSettingQuery) All ¶
func (usq *UserSettingQuery) All(ctx context.Context) ([]*UserSetting, error)
All executes the query and returns a list of UserSettings.
func (*UserSettingQuery) AllX ¶
func (usq *UserSettingQuery) AllX(ctx context.Context) []*UserSetting
AllX is like All, but panics if an error occurs.
func (*UserSettingQuery) Clone ¶
func (usq *UserSettingQuery) Clone() *UserSettingQuery
Clone returns a duplicate of the UserSettingQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserSettingQuery) Count ¶
func (usq *UserSettingQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserSettingQuery) CountX ¶
func (usq *UserSettingQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserSettingQuery) Exist ¶
func (usq *UserSettingQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserSettingQuery) ExistX ¶
func (usq *UserSettingQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserSettingQuery) First ¶
func (usq *UserSettingQuery) First(ctx context.Context) (*UserSetting, error)
First returns the first UserSetting entity from the query. Returns a *NotFoundError when no UserSetting was found.
func (*UserSettingQuery) FirstID ¶
func (usq *UserSettingQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserSetting ID from the query. Returns a *NotFoundError when no UserSetting ID was found.
func (*UserSettingQuery) FirstIDX ¶
func (usq *UserSettingQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserSettingQuery) FirstX ¶
func (usq *UserSettingQuery) FirstX(ctx context.Context) *UserSetting
FirstX is like First, but panics if an error occurs.
func (*UserSettingQuery) GroupBy ¶
func (usq *UserSettingQuery) GroupBy(field string, fields ...string) *UserSettingGroupBy
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 { OwnerID int `json:"-"` Count int `json:"count,omitempty"` } client.UserSetting.Query(). GroupBy(usersetting.FieldOwnerID). Aggregate(model.Count()). Scan(ctx, &v)
func (*UserSettingQuery) IDs ¶
func (usq *UserSettingQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of UserSetting IDs.
func (*UserSettingQuery) IDsX ¶
func (usq *UserSettingQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserSettingQuery) Limit ¶
func (usq *UserSettingQuery) Limit(limit int) *UserSettingQuery
Limit adds a limit step to the query.
func (*UserSettingQuery) Offset ¶
func (usq *UserSettingQuery) Offset(offset int) *UserSettingQuery
Offset adds an offset step to the query.
func (*UserSettingQuery) Only ¶
func (usq *UserSettingQuery) Only(ctx context.Context) (*UserSetting, error)
Only returns a single UserSetting entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one UserSetting entity is not found. Returns a *NotFoundError when no UserSetting entities are found.
func (*UserSettingQuery) OnlyID ¶
func (usq *UserSettingQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserSetting ID in the query. Returns a *NotSingularError when exactly one UserSetting ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserSettingQuery) OnlyIDX ¶
func (usq *UserSettingQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserSettingQuery) OnlyX ¶
func (usq *UserSettingQuery) OnlyX(ctx context.Context) *UserSetting
OnlyX is like Only, but panics if an error occurs.
func (*UserSettingQuery) Order ¶
func (usq *UserSettingQuery) Order(o ...OrderFunc) *UserSettingQuery
Order adds an order step to the query.
func (*UserSettingQuery) QuerySettingsOwner ¶
func (usq *UserSettingQuery) QuerySettingsOwner() *UserQuery
QuerySettingsOwner chains the current query on the "settings_owner" edge.
func (*UserSettingQuery) Select ¶
func (usq *UserSettingQuery) Select(field string, fields ...string) *UserSettingSelect
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 { OwnerID int `json:"-"` } client.UserSetting.Query(). Select(usersetting.FieldOwnerID). Scan(ctx, &v)
func (*UserSettingQuery) Unique ¶
func (usq *UserSettingQuery) Unique(unique bool) *UserSettingQuery
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 (*UserSettingQuery) Where ¶
func (usq *UserSettingQuery) Where(ps ...predicate.UserSetting) *UserSettingQuery
Where adds a new predicate for the UserSettingQuery builder.
func (*UserSettingQuery) WithSettingsOwner ¶
func (usq *UserSettingQuery) WithSettingsOwner(opts ...func(*UserQuery)) *UserSettingQuery
WithSettingsOwner tells the query-builder to eager-load the nodes that are connected to the "settings_owner" edge. The optional arguments are used to configure the query builder of the edge.
type UserSettingSelect ¶
type UserSettingSelect struct { *UserSettingQuery // contains filtered or unexported fields }
UserSettingSelect is the builder for selecting fields of UserSetting entities.
func (*UserSettingSelect) Bool ¶
func (uss *UserSettingSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) BoolX ¶
func (uss *UserSettingSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSettingSelect) Bools ¶
func (uss *UserSettingSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) BoolsX ¶
func (uss *UserSettingSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSettingSelect) Float64 ¶
func (uss *UserSettingSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) Float64X ¶
func (uss *UserSettingSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSettingSelect) Float64s ¶
func (uss *UserSettingSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) Float64sX ¶
func (uss *UserSettingSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSettingSelect) Int ¶
func (uss *UserSettingSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) IntX ¶
func (uss *UserSettingSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSettingSelect) Ints ¶
func (uss *UserSettingSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) IntsX ¶
func (uss *UserSettingSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSettingSelect) Scan ¶
func (uss *UserSettingSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSettingSelect) ScanX ¶
func (uss *UserSettingSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSettingSelect) String ¶
func (uss *UserSettingSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSettingSelect) StringX ¶
func (uss *UserSettingSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserSettingUpdate ¶
type UserSettingUpdate struct {
// contains filtered or unexported fields
}
UserSettingUpdate is the builder for updating UserSetting entities.
func (*UserSettingUpdate) ClearSettingsOwner ¶
func (usu *UserSettingUpdate) ClearSettingsOwner() *UserSettingUpdate
ClearSettingsOwner clears the "settings_owner" edge to the User entity.
func (*UserSettingUpdate) Exec ¶
func (usu *UserSettingUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserSettingUpdate) ExecX ¶
func (usu *UserSettingUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSettingUpdate) Mutation ¶
func (usu *UserSettingUpdate) Mutation() *UserSettingMutation
Mutation returns the UserSettingMutation object of the builder.
func (*UserSettingUpdate) Save ¶
func (usu *UserSettingUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserSettingUpdate) SaveX ¶
func (usu *UserSettingUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserSettingUpdate) SetKey ¶
func (usu *UserSettingUpdate) SetKey(s string) *UserSettingUpdate
SetKey sets the "key" field.
func (*UserSettingUpdate) SetNillableTypeof ¶
func (usu *UserSettingUpdate) SetNillableTypeof(u *usersetting.Typeof) *UserSettingUpdate
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*UserSettingUpdate) SetOwnerID ¶
func (usu *UserSettingUpdate) SetOwnerID(i int) *UserSettingUpdate
SetOwnerID sets the "owner_id" field.
func (*UserSettingUpdate) SetSettingsOwner ¶
func (usu *UserSettingUpdate) SetSettingsOwner(u *User) *UserSettingUpdate
SetSettingsOwner sets the "settings_owner" edge to the User entity.
func (*UserSettingUpdate) SetSettingsOwnerID ¶
func (usu *UserSettingUpdate) SetSettingsOwnerID(id int) *UserSettingUpdate
SetSettingsOwnerID sets the "settings_owner" edge to the User entity by ID.
func (*UserSettingUpdate) SetTypeof ¶
func (usu *UserSettingUpdate) SetTypeof(u usersetting.Typeof) *UserSettingUpdate
SetTypeof sets the "typeof" field.
func (*UserSettingUpdate) SetValue ¶
func (usu *UserSettingUpdate) SetValue(s string) *UserSettingUpdate
SetValue sets the "value" field.
func (*UserSettingUpdate) Where ¶
func (usu *UserSettingUpdate) Where(ps ...predicate.UserSetting) *UserSettingUpdate
Where adds a new predicate for the UserSettingUpdate builder.
type UserSettingUpdateOne ¶
type UserSettingUpdateOne struct {
// contains filtered or unexported fields
}
UserSettingUpdateOne is the builder for updating a single UserSetting entity.
func (*UserSettingUpdateOne) ClearSettingsOwner ¶
func (usuo *UserSettingUpdateOne) ClearSettingsOwner() *UserSettingUpdateOne
ClearSettingsOwner clears the "settings_owner" edge to the User entity.
func (*UserSettingUpdateOne) Exec ¶
func (usuo *UserSettingUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserSettingUpdateOne) ExecX ¶
func (usuo *UserSettingUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserSettingUpdateOne) Mutation ¶
func (usuo *UserSettingUpdateOne) Mutation() *UserSettingMutation
Mutation returns the UserSettingMutation object of the builder.
func (*UserSettingUpdateOne) Save ¶
func (usuo *UserSettingUpdateOne) Save(ctx context.Context) (*UserSetting, error)
Save executes the query and returns the updated UserSetting entity.
func (*UserSettingUpdateOne) SaveX ¶
func (usuo *UserSettingUpdateOne) SaveX(ctx context.Context) *UserSetting
SaveX is like Save, but panics if an error occurs.
func (*UserSettingUpdateOne) Select ¶
func (usuo *UserSettingUpdateOne) Select(field string, fields ...string) *UserSettingUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserSettingUpdateOne) SetKey ¶
func (usuo *UserSettingUpdateOne) SetKey(s string) *UserSettingUpdateOne
SetKey sets the "key" field.
func (*UserSettingUpdateOne) SetNillableTypeof ¶
func (usuo *UserSettingUpdateOne) SetNillableTypeof(u *usersetting.Typeof) *UserSettingUpdateOne
SetNillableTypeof sets the "typeof" field if the given value is not nil.
func (*UserSettingUpdateOne) SetOwnerID ¶
func (usuo *UserSettingUpdateOne) SetOwnerID(i int) *UserSettingUpdateOne
SetOwnerID sets the "owner_id" field.
func (*UserSettingUpdateOne) SetSettingsOwner ¶
func (usuo *UserSettingUpdateOne) SetSettingsOwner(u *User) *UserSettingUpdateOne
SetSettingsOwner sets the "settings_owner" edge to the User entity.
func (*UserSettingUpdateOne) SetSettingsOwnerID ¶
func (usuo *UserSettingUpdateOne) SetSettingsOwnerID(id int) *UserSettingUpdateOne
SetSettingsOwnerID sets the "settings_owner" edge to the User entity by ID.
func (*UserSettingUpdateOne) SetTypeof ¶
func (usuo *UserSettingUpdateOne) SetTypeof(u usersetting.Typeof) *UserSettingUpdateOne
SetTypeof sets the "typeof" field.
func (*UserSettingUpdateOne) SetValue ¶
func (usuo *UserSettingUpdateOne) SetValue(s string) *UserSettingUpdateOne
SetValue sets the "value" field.
type UserSettings ¶
type UserSettings []*UserSetting
UserSettings is a parsable slice of UserSetting.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddUserEmailIDs ¶
func (uu *UserUpdate) AddUserEmailIDs(ids ...int) *UserUpdate
AddUserEmailIDs adds the "UserEmails" edge to the UserEmail entity by IDs.
func (*UserUpdate) AddUserEmails ¶
func (uu *UserUpdate) AddUserEmails(u ...*UserEmail) *UserUpdate
AddUserEmails adds the "UserEmails" edges to the UserEmail entity.
func (*UserUpdate) AddUserSecurityLogIDs ¶
func (uu *UserUpdate) AddUserSecurityLogIDs(ids ...int) *UserUpdate
AddUserSecurityLogIDs adds the "UserSecurityLogs" edge to the UserSecurityLog entity by IDs.
func (*UserUpdate) AddUserSecurityLogs ¶
func (uu *UserUpdate) AddUserSecurityLogs(u ...*UserSecurityLog) *UserUpdate
AddUserSecurityLogs adds the "UserSecurityLogs" edges to the UserSecurityLog entity.
func (*UserUpdate) AddUserSettingIDs ¶
func (uu *UserUpdate) AddUserSettingIDs(ids ...int) *UserUpdate
AddUserSettingIDs adds the "UserSettings" edge to the UserSetting entity by IDs.
func (*UserUpdate) AddUserSettings ¶
func (uu *UserUpdate) AddUserSettings(u ...*UserSetting) *UserUpdate
AddUserSettings adds the "UserSettings" edges to the UserSetting entity.
func (*UserUpdate) ClearDeleteTime ¶
func (uu *UserUpdate) ClearDeleteTime() *UserUpdate
ClearDeleteTime clears the value of the "delete_time" field.
func (*UserUpdate) ClearLastPwdAuth ¶
func (uu *UserUpdate) ClearLastPwdAuth() *UserUpdate
ClearLastPwdAuth clears the value of the "last_pwd_auth" field.
func (*UserUpdate) ClearPassword ¶
func (uu *UserUpdate) ClearPassword() *UserUpdate
ClearPassword clears the value of the "password" field.
func (*UserUpdate) ClearPhone ¶
func (uu *UserUpdate) ClearPhone() *UserUpdate
ClearPhone clears the value of the "phone" field.
func (*UserUpdate) ClearStatus ¶
func (uu *UserUpdate) ClearStatus() *UserUpdate
ClearStatus clears the value of the "status" field.
func (*UserUpdate) ClearUserEmails ¶
func (uu *UserUpdate) ClearUserEmails() *UserUpdate
ClearUserEmails clears all "UserEmails" edges to the UserEmail entity.
func (*UserUpdate) ClearUserSecurityLogs ¶
func (uu *UserUpdate) ClearUserSecurityLogs() *UserUpdate
ClearUserSecurityLogs clears all "UserSecurityLogs" edges to the UserSecurityLog entity.
func (*UserUpdate) ClearUserSettings ¶
func (uu *UserUpdate) ClearUserSettings() *UserUpdate
ClearUserSettings clears all "UserSettings" edges to the UserSetting entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveUserEmailIDs ¶
func (uu *UserUpdate) RemoveUserEmailIDs(ids ...int) *UserUpdate
RemoveUserEmailIDs removes the "UserEmails" edge to UserEmail entities by IDs.
func (*UserUpdate) RemoveUserEmails ¶
func (uu *UserUpdate) RemoveUserEmails(u ...*UserEmail) *UserUpdate
RemoveUserEmails removes "UserEmails" edges to UserEmail entities.
func (*UserUpdate) RemoveUserSecurityLogIDs ¶
func (uu *UserUpdate) RemoveUserSecurityLogIDs(ids ...int) *UserUpdate
RemoveUserSecurityLogIDs removes the "UserSecurityLogs" edge to UserSecurityLog entities by IDs.
func (*UserUpdate) RemoveUserSecurityLogs ¶
func (uu *UserUpdate) RemoveUserSecurityLogs(u ...*UserSecurityLog) *UserUpdate
RemoveUserSecurityLogs removes "UserSecurityLogs" edges to UserSecurityLog entities.
func (*UserUpdate) RemoveUserSettingIDs ¶
func (uu *UserUpdate) RemoveUserSettingIDs(ids ...int) *UserUpdate
RemoveUserSettingIDs removes the "UserSettings" edge to UserSetting entities by IDs.
func (*UserUpdate) RemoveUserSettings ¶
func (uu *UserUpdate) RemoveUserSettings(u ...*UserSetting) *UserUpdate
RemoveUserSettings removes "UserSettings" edges to UserSetting entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetDeleteTime ¶
func (uu *UserUpdate) SetDeleteTime(t time.Time) *UserUpdate
SetDeleteTime sets the "delete_time" field.
func (*UserUpdate) SetLastPwdAuth ¶
func (uu *UserUpdate) SetLastPwdAuth(t time.Time) *UserUpdate
SetLastPwdAuth sets the "last_pwd_auth" field.
func (*UserUpdate) SetNickname ¶
func (uu *UserUpdate) SetNickname(s string) *UserUpdate
SetNickname sets the "nickname" field.
func (*UserUpdate) SetNillableDeleteTime ¶
func (uu *UserUpdate) SetNillableDeleteTime(t *time.Time) *UserUpdate
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*UserUpdate) SetNillableLastPwdAuth ¶
func (uu *UserUpdate) SetNillableLastPwdAuth(t *time.Time) *UserUpdate
SetNillableLastPwdAuth sets the "last_pwd_auth" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillablePhone ¶
func (uu *UserUpdate) SetNillablePhone(s *string) *UserUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserUpdate) SetNillableStatus ¶
func (uu *UserUpdate) SetNillableStatus(u *user.Status) *UserUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetPhone ¶
func (uu *UserUpdate) SetPhone(s string) *UserUpdate
SetPhone sets the "phone" field.
func (*UserUpdate) SetSignature ¶
func (uu *UserUpdate) SetSignature(s string) *UserUpdate
SetSignature sets the "signature" field.
func (*UserUpdate) SetStatus ¶
func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate
SetStatus sets the "status" field.
func (*UserUpdate) SetUpdateTime ¶
func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
SetUpdateTime sets the "update_time" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where adds a new predicate for the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddUserEmailIDs ¶
func (uuo *UserUpdateOne) AddUserEmailIDs(ids ...int) *UserUpdateOne
AddUserEmailIDs adds the "UserEmails" edge to the UserEmail entity by IDs.
func (*UserUpdateOne) AddUserEmails ¶
func (uuo *UserUpdateOne) AddUserEmails(u ...*UserEmail) *UserUpdateOne
AddUserEmails adds the "UserEmails" edges to the UserEmail entity.
func (*UserUpdateOne) AddUserSecurityLogIDs ¶
func (uuo *UserUpdateOne) AddUserSecurityLogIDs(ids ...int) *UserUpdateOne
AddUserSecurityLogIDs adds the "UserSecurityLogs" edge to the UserSecurityLog entity by IDs.
func (*UserUpdateOne) AddUserSecurityLogs ¶
func (uuo *UserUpdateOne) AddUserSecurityLogs(u ...*UserSecurityLog) *UserUpdateOne
AddUserSecurityLogs adds the "UserSecurityLogs" edges to the UserSecurityLog entity.
func (*UserUpdateOne) AddUserSettingIDs ¶
func (uuo *UserUpdateOne) AddUserSettingIDs(ids ...int) *UserUpdateOne
AddUserSettingIDs adds the "UserSettings" edge to the UserSetting entity by IDs.
func (*UserUpdateOne) AddUserSettings ¶
func (uuo *UserUpdateOne) AddUserSettings(u ...*UserSetting) *UserUpdateOne
AddUserSettings adds the "UserSettings" edges to the UserSetting entity.
func (*UserUpdateOne) ClearDeleteTime ¶
func (uuo *UserUpdateOne) ClearDeleteTime() *UserUpdateOne
ClearDeleteTime clears the value of the "delete_time" field.
func (*UserUpdateOne) ClearLastPwdAuth ¶
func (uuo *UserUpdateOne) ClearLastPwdAuth() *UserUpdateOne
ClearLastPwdAuth clears the value of the "last_pwd_auth" field.
func (*UserUpdateOne) ClearPassword ¶
func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne
ClearPassword clears the value of the "password" field.
func (*UserUpdateOne) ClearPhone ¶
func (uuo *UserUpdateOne) ClearPhone() *UserUpdateOne
ClearPhone clears the value of the "phone" field.
func (*UserUpdateOne) ClearStatus ¶
func (uuo *UserUpdateOne) ClearStatus() *UserUpdateOne
ClearStatus clears the value of the "status" field.
func (*UserUpdateOne) ClearUserEmails ¶
func (uuo *UserUpdateOne) ClearUserEmails() *UserUpdateOne
ClearUserEmails clears all "UserEmails" edges to the UserEmail entity.
func (*UserUpdateOne) ClearUserSecurityLogs ¶
func (uuo *UserUpdateOne) ClearUserSecurityLogs() *UserUpdateOne
ClearUserSecurityLogs clears all "UserSecurityLogs" edges to the UserSecurityLog entity.
func (*UserUpdateOne) ClearUserSettings ¶
func (uuo *UserUpdateOne) ClearUserSettings() *UserUpdateOne
ClearUserSettings clears all "UserSettings" edges to the UserSetting entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveUserEmailIDs ¶
func (uuo *UserUpdateOne) RemoveUserEmailIDs(ids ...int) *UserUpdateOne
RemoveUserEmailIDs removes the "UserEmails" edge to UserEmail entities by IDs.
func (*UserUpdateOne) RemoveUserEmails ¶
func (uuo *UserUpdateOne) RemoveUserEmails(u ...*UserEmail) *UserUpdateOne
RemoveUserEmails removes "UserEmails" edges to UserEmail entities.
func (*UserUpdateOne) RemoveUserSecurityLogIDs ¶
func (uuo *UserUpdateOne) RemoveUserSecurityLogIDs(ids ...int) *UserUpdateOne
RemoveUserSecurityLogIDs removes the "UserSecurityLogs" edge to UserSecurityLog entities by IDs.
func (*UserUpdateOne) RemoveUserSecurityLogs ¶
func (uuo *UserUpdateOne) RemoveUserSecurityLogs(u ...*UserSecurityLog) *UserUpdateOne
RemoveUserSecurityLogs removes "UserSecurityLogs" edges to UserSecurityLog entities.
func (*UserUpdateOne) RemoveUserSettingIDs ¶
func (uuo *UserUpdateOne) RemoveUserSettingIDs(ids ...int) *UserUpdateOne
RemoveUserSettingIDs removes the "UserSettings" edge to UserSetting entities by IDs.
func (*UserUpdateOne) RemoveUserSettings ¶
func (uuo *UserUpdateOne) RemoveUserSettings(u ...*UserSetting) *UserUpdateOne
RemoveUserSettings removes "UserSettings" edges to UserSetting entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetDeleteTime ¶
func (uuo *UserUpdateOne) SetDeleteTime(t time.Time) *UserUpdateOne
SetDeleteTime sets the "delete_time" field.
func (*UserUpdateOne) SetLastPwdAuth ¶
func (uuo *UserUpdateOne) SetLastPwdAuth(t time.Time) *UserUpdateOne
SetLastPwdAuth sets the "last_pwd_auth" field.
func (*UserUpdateOne) SetNickname ¶
func (uuo *UserUpdateOne) SetNickname(s string) *UserUpdateOne
SetNickname sets the "nickname" field.
func (*UserUpdateOne) SetNillableDeleteTime ¶
func (uuo *UserUpdateOne) SetNillableDeleteTime(t *time.Time) *UserUpdateOne
SetNillableDeleteTime sets the "delete_time" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastPwdAuth ¶
func (uuo *UserUpdateOne) SetNillableLastPwdAuth(t *time.Time) *UserUpdateOne
SetNillableLastPwdAuth sets the "last_pwd_auth" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePhone ¶
func (uuo *UserUpdateOne) SetNillablePhone(s *string) *UserUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserUpdateOne) SetNillableStatus ¶
func (uuo *UserUpdateOne) SetNillableStatus(u *user.Status) *UserUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetPhone ¶
func (uuo *UserUpdateOne) SetPhone(s string) *UserUpdateOne
SetPhone sets the "phone" field.
func (*UserUpdateOne) SetSignature ¶
func (uuo *UserUpdateOne) SetSignature(s string) *UserUpdateOne
SetSignature sets the "signature" field.
func (*UserUpdateOne) SetStatus ¶
func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne
SetStatus sets the "status" field.
func (*UserUpdateOne) SetUpdateTime ¶
func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
SetUpdateTime sets the "update_time" field.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field 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.
Source Files
¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- modelversion.go
- modelversion_create.go
- modelversion_delete.go
- modelversion_query.go
- modelversion_update.go
- mutation.go
- runtime.go
- systemsetting.go
- systemsetting_create.go
- systemsetting_delete.go
- systemsetting_query.go
- systemsetting_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- useremail.go
- useremail_create.go
- useremail_delete.go
- useremail_query.go
- useremail_update.go
- usersecuritylog.go
- usersecuritylog_create.go
- usersecuritylog_delete.go
- usersecuritylog_query.go
- usersecuritylog_update.go
- usersetting.go
- usersetting_create.go
- usersetting_delete.go
- usersetting_query.go
- usersetting_update.go
- version.go