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 Job
- type JobClient
- func (c *JobClient) Create() *JobCreate
- func (c *JobClient) CreateBulk(builders ...*JobCreate) *JobCreateBulk
- func (c *JobClient) Delete() *JobDelete
- func (c *JobClient) DeleteOne(j *Job) *JobDeleteOne
- func (c *JobClient) DeleteOneID(id int) *JobDeleteOne
- func (c *JobClient) Get(ctx context.Context, id int) (*Job, error)
- func (c *JobClient) GetX(ctx context.Context, id int) *Job
- func (c *JobClient) Hooks() []Hook
- func (c *JobClient) Query() *JobQuery
- func (c *JobClient) Update() *JobUpdate
- func (c *JobClient) UpdateOne(j *Job) *JobUpdateOne
- func (c *JobClient) UpdateOneID(id int) *JobUpdateOne
- func (c *JobClient) Use(hooks ...Hook)
- type JobCreate
- func (jc *JobCreate) Exec(ctx context.Context) error
- func (jc *JobCreate) ExecX(ctx context.Context)
- func (jc *JobCreate) Mutation() *JobMutation
- func (jc *JobCreate) Save(ctx context.Context) (*Job, error)
- func (jc *JobCreate) SaveX(ctx context.Context) *Job
- func (jc *JobCreate) SetArea(s string) *JobCreate
- func (jc *JobCreate) SetCompanyName(s string) *JobCreate
- func (jc *JobCreate) SetCreateTime(t time.Time) *JobCreate
- func (jc *JobCreate) SetDescription(s string) *JobCreate
- func (jc *JobCreate) SetExp(i int8) *JobCreate
- func (jc *JobCreate) SetIsExist(b bool) *JobCreate
- func (jc *JobCreate) SetIsRemote(b bool) *JobCreate
- func (jc *JobCreate) SetJobName(s string) *JobCreate
- func (jc *JobCreate) SetNillableCreateTime(t *time.Time) *JobCreate
- func (jc *JobCreate) SetNillableIsExist(b *bool) *JobCreate
- func (jc *JobCreate) SetNillableUpdateTime(t *time.Time) *JobCreate
- func (jc *JobCreate) SetUpdateTime(t time.Time) *JobCreate
- type JobCreateBulk
- type JobDelete
- type JobDeleteOne
- type JobGroupBy
- func (jgb *JobGroupBy) Aggregate(fns ...AggregateFunc) *JobGroupBy
- func (s *JobGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *JobGroupBy) BoolX(ctx context.Context) bool
- func (s *JobGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *JobGroupBy) BoolsX(ctx context.Context) []bool
- func (s *JobGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *JobGroupBy) Float64X(ctx context.Context) float64
- func (s *JobGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *JobGroupBy) Float64sX(ctx context.Context) []float64
- func (s *JobGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *JobGroupBy) IntX(ctx context.Context) int
- func (s *JobGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *JobGroupBy) IntsX(ctx context.Context) []int
- func (jgb *JobGroupBy) Scan(ctx context.Context, v any) error
- func (s *JobGroupBy) ScanX(ctx context.Context, v any)
- func (s *JobGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *JobGroupBy) StringX(ctx context.Context) string
- func (s *JobGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *JobGroupBy) StringsX(ctx context.Context) []string
- type JobMutation
- func (m *JobMutation) AddExp(i int8)
- func (m *JobMutation) AddField(name string, value ent.Value) error
- func (m *JobMutation) AddedEdges() []string
- func (m *JobMutation) AddedExp() (r int8, exists bool)
- func (m *JobMutation) AddedField(name string) (ent.Value, bool)
- func (m *JobMutation) AddedFields() []string
- func (m *JobMutation) AddedIDs(name string) []ent.Value
- func (m *JobMutation) Area() (r string, exists bool)
- func (m *JobMutation) ClearEdge(name string) error
- func (m *JobMutation) ClearField(name string) error
- func (m *JobMutation) ClearedEdges() []string
- func (m *JobMutation) ClearedFields() []string
- func (m JobMutation) Client() *Client
- func (m *JobMutation) CompanyName() (r string, exists bool)
- func (m *JobMutation) CreateTime() (r time.Time, exists bool)
- func (m *JobMutation) Description() (r string, exists bool)
- func (m *JobMutation) EdgeCleared(name string) bool
- func (m *JobMutation) Exp() (r int8, exists bool)
- func (m *JobMutation) Field(name string) (ent.Value, bool)
- func (m *JobMutation) FieldCleared(name string) bool
- func (m *JobMutation) Fields() []string
- func (m *JobMutation) ID() (id int, exists bool)
- func (m *JobMutation) IDs(ctx context.Context) ([]int, error)
- func (m *JobMutation) IsExist() (r bool, exists bool)
- func (m *JobMutation) IsRemote() (r bool, exists bool)
- func (m *JobMutation) JobName() (r string, exists bool)
- func (m *JobMutation) OldArea(ctx context.Context) (v string, err error)
- func (m *JobMutation) OldCompanyName(ctx context.Context) (v string, err error)
- func (m *JobMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *JobMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *JobMutation) OldExp(ctx context.Context) (v int8, err error)
- func (m *JobMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *JobMutation) OldIsExist(ctx context.Context) (v bool, err error)
- func (m *JobMutation) OldIsRemote(ctx context.Context) (v bool, err error)
- func (m *JobMutation) OldJobName(ctx context.Context) (v string, err error)
- func (m *JobMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *JobMutation) Op() Op
- func (m *JobMutation) RemovedEdges() []string
- func (m *JobMutation) RemovedIDs(name string) []ent.Value
- func (m *JobMutation) ResetArea()
- func (m *JobMutation) ResetCompanyName()
- func (m *JobMutation) ResetCreateTime()
- func (m *JobMutation) ResetDescription()
- func (m *JobMutation) ResetEdge(name string) error
- func (m *JobMutation) ResetExp()
- func (m *JobMutation) ResetField(name string) error
- func (m *JobMutation) ResetIsExist()
- func (m *JobMutation) ResetIsRemote()
- func (m *JobMutation) ResetJobName()
- func (m *JobMutation) ResetUpdateTime()
- func (m *JobMutation) SetArea(s string)
- func (m *JobMutation) SetCompanyName(s string)
- func (m *JobMutation) SetCreateTime(t time.Time)
- func (m *JobMutation) SetDescription(s string)
- func (m *JobMutation) SetExp(i int8)
- func (m *JobMutation) SetField(name string, value ent.Value) error
- func (m *JobMutation) SetIsExist(b bool)
- func (m *JobMutation) SetIsRemote(b bool)
- func (m *JobMutation) SetJobName(s string)
- func (m *JobMutation) SetUpdateTime(t time.Time)
- func (m JobMutation) Tx() (*Tx, error)
- func (m *JobMutation) Type() string
- func (m *JobMutation) UpdateTime() (r time.Time, exists bool)
- func (m *JobMutation) Where(ps ...predicate.Job)
- type JobQuery
- func (jq *JobQuery) All(ctx context.Context) ([]*Job, error)
- func (jq *JobQuery) AllX(ctx context.Context) []*Job
- func (jq *JobQuery) Clone() *JobQuery
- func (jq *JobQuery) Count(ctx context.Context) (int, error)
- func (jq *JobQuery) CountX(ctx context.Context) int
- func (jq *JobQuery) Exist(ctx context.Context) (bool, error)
- func (jq *JobQuery) ExistX(ctx context.Context) bool
- func (jq *JobQuery) First(ctx context.Context) (*Job, error)
- func (jq *JobQuery) FirstID(ctx context.Context) (id int, err error)
- func (jq *JobQuery) FirstIDX(ctx context.Context) int
- func (jq *JobQuery) FirstX(ctx context.Context) *Job
- func (jq *JobQuery) GroupBy(field string, fields ...string) *JobGroupBy
- func (jq *JobQuery) IDs(ctx context.Context) ([]int, error)
- func (jq *JobQuery) IDsX(ctx context.Context) []int
- func (jq *JobQuery) Limit(limit int) *JobQuery
- func (jq *JobQuery) Offset(offset int) *JobQuery
- func (jq *JobQuery) Only(ctx context.Context) (*Job, error)
- func (jq *JobQuery) OnlyID(ctx context.Context) (id int, err error)
- func (jq *JobQuery) OnlyIDX(ctx context.Context) int
- func (jq *JobQuery) OnlyX(ctx context.Context) *Job
- func (jq *JobQuery) Order(o ...OrderFunc) *JobQuery
- func (jq *JobQuery) Select(fields ...string) *JobSelect
- func (jq *JobQuery) Unique(unique bool) *JobQuery
- func (jq *JobQuery) Where(ps ...predicate.Job) *JobQuery
- type JobSelect
- func (s *JobSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *JobSelect) BoolX(ctx context.Context) bool
- func (s *JobSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *JobSelect) BoolsX(ctx context.Context) []bool
- func (s *JobSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *JobSelect) Float64X(ctx context.Context) float64
- func (s *JobSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *JobSelect) Float64sX(ctx context.Context) []float64
- func (s *JobSelect) Int(ctx context.Context) (_ int, err error)
- func (s *JobSelect) IntX(ctx context.Context) int
- func (s *JobSelect) Ints(ctx context.Context) ([]int, error)
- func (s *JobSelect) IntsX(ctx context.Context) []int
- func (js *JobSelect) Scan(ctx context.Context, v any) error
- func (s *JobSelect) ScanX(ctx context.Context, v any)
- func (s *JobSelect) String(ctx context.Context) (_ string, err error)
- func (s *JobSelect) StringX(ctx context.Context) string
- func (s *JobSelect) Strings(ctx context.Context) ([]string, error)
- func (s *JobSelect) StringsX(ctx context.Context) []string
- type JobUpdate
- func (ju *JobUpdate) AddExp(i int8) *JobUpdate
- func (ju *JobUpdate) Exec(ctx context.Context) error
- func (ju *JobUpdate) ExecX(ctx context.Context)
- func (ju *JobUpdate) Mutation() *JobMutation
- func (ju *JobUpdate) Save(ctx context.Context) (int, error)
- func (ju *JobUpdate) SaveX(ctx context.Context) int
- func (ju *JobUpdate) SetArea(s string) *JobUpdate
- func (ju *JobUpdate) SetCompanyName(s string) *JobUpdate
- func (ju *JobUpdate) SetCreateTime(t time.Time) *JobUpdate
- func (ju *JobUpdate) SetDescription(s string) *JobUpdate
- func (ju *JobUpdate) SetExp(i int8) *JobUpdate
- func (ju *JobUpdate) SetIsExist(b bool) *JobUpdate
- func (ju *JobUpdate) SetIsRemote(b bool) *JobUpdate
- func (ju *JobUpdate) SetJobName(s string) *JobUpdate
- func (ju *JobUpdate) SetNillableCreateTime(t *time.Time) *JobUpdate
- func (ju *JobUpdate) SetNillableIsExist(b *bool) *JobUpdate
- func (ju *JobUpdate) SetUpdateTime(t time.Time) *JobUpdate
- func (ju *JobUpdate) Where(ps ...predicate.Job) *JobUpdate
- type JobUpdateOne
- func (juo *JobUpdateOne) AddExp(i int8) *JobUpdateOne
- func (juo *JobUpdateOne) Exec(ctx context.Context) error
- func (juo *JobUpdateOne) ExecX(ctx context.Context)
- func (juo *JobUpdateOne) Mutation() *JobMutation
- func (juo *JobUpdateOne) Save(ctx context.Context) (*Job, error)
- func (juo *JobUpdateOne) SaveX(ctx context.Context) *Job
- func (juo *JobUpdateOne) Select(field string, fields ...string) *JobUpdateOne
- func (juo *JobUpdateOne) SetArea(s string) *JobUpdateOne
- func (juo *JobUpdateOne) SetCompanyName(s string) *JobUpdateOne
- func (juo *JobUpdateOne) SetCreateTime(t time.Time) *JobUpdateOne
- func (juo *JobUpdateOne) SetDescription(s string) *JobUpdateOne
- func (juo *JobUpdateOne) SetExp(i int8) *JobUpdateOne
- func (juo *JobUpdateOne) SetIsExist(b bool) *JobUpdateOne
- func (juo *JobUpdateOne) SetIsRemote(b bool) *JobUpdateOne
- func (juo *JobUpdateOne) SetJobName(s string) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableCreateTime(t *time.Time) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableIsExist(b *bool) *JobUpdateOne
- func (juo *JobUpdateOne) SetUpdateTime(t time.Time) *JobUpdateOne
- type Jobs
- 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 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) 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) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- 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) SetIsExist(b bool) *UserCreate
- func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableIsExist(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableRole(i *int8) *UserCreate
- func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetRole(i int8) *UserCreate
- func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetUserName(s string) *UserCreate
- func (uc *UserCreate) SetUserTitle(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserInfoCreate
- func (uic *UserInfoCreate) Exec(ctx context.Context) error
- func (uic *UserInfoCreate) ExecX(ctx context.Context)
- func (uic *UserInfoCreate) Mutation() *UserInfoMutation
- func (uic *UserInfoCreate) Save(ctx context.Context) (*User_info, error)
- func (uic *UserInfoCreate) SaveX(ctx context.Context) *User_info
- func (uic *UserInfoCreate) SetPasswdHash(s string) *UserInfoCreate
- func (uic *UserInfoCreate) SetSalt(s string) *UserInfoCreate
- func (uic *UserInfoCreate) SetUserName(s string) *UserInfoCreate
- type UserInfoCreateBulk
- type UserInfoDelete
- type UserInfoDeleteOne
- type UserInfoGroupBy
- func (uigb *UserInfoGroupBy) Aggregate(fns ...AggregateFunc) *UserInfoGroupBy
- func (s *UserInfoGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserInfoGroupBy) BoolX(ctx context.Context) bool
- func (s *UserInfoGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserInfoGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserInfoGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserInfoGroupBy) Float64X(ctx context.Context) float64
- func (s *UserInfoGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserInfoGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserInfoGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserInfoGroupBy) IntX(ctx context.Context) int
- func (s *UserInfoGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserInfoGroupBy) IntsX(ctx context.Context) []int
- func (uigb *UserInfoGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserInfoGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserInfoGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserInfoGroupBy) StringX(ctx context.Context) string
- func (s *UserInfoGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserInfoGroupBy) StringsX(ctx context.Context) []string
- type UserInfoMutation
- func (m *UserInfoMutation) AddField(name string, value ent.Value) error
- func (m *UserInfoMutation) AddedEdges() []string
- func (m *UserInfoMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserInfoMutation) AddedFields() []string
- func (m *UserInfoMutation) AddedIDs(name string) []ent.Value
- func (m *UserInfoMutation) ClearEdge(name string) error
- func (m *UserInfoMutation) ClearField(name string) error
- func (m *UserInfoMutation) ClearedEdges() []string
- func (m *UserInfoMutation) ClearedFields() []string
- func (m UserInfoMutation) Client() *Client
- func (m *UserInfoMutation) EdgeCleared(name string) bool
- func (m *UserInfoMutation) Field(name string) (ent.Value, bool)
- func (m *UserInfoMutation) FieldCleared(name string) bool
- func (m *UserInfoMutation) Fields() []string
- func (m *UserInfoMutation) ID() (id int, exists bool)
- func (m *UserInfoMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserInfoMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserInfoMutation) OldPasswdHash(ctx context.Context) (v string, err error)
- func (m *UserInfoMutation) OldSalt(ctx context.Context) (v string, err error)
- func (m *UserInfoMutation) OldUserName(ctx context.Context) (v string, err error)
- func (m *UserInfoMutation) Op() Op
- func (m *UserInfoMutation) PasswdHash() (r string, exists bool)
- func (m *UserInfoMutation) RemovedEdges() []string
- func (m *UserInfoMutation) RemovedIDs(name string) []ent.Value
- func (m *UserInfoMutation) ResetEdge(name string) error
- func (m *UserInfoMutation) ResetField(name string) error
- func (m *UserInfoMutation) ResetPasswdHash()
- func (m *UserInfoMutation) ResetSalt()
- func (m *UserInfoMutation) ResetUserName()
- func (m *UserInfoMutation) Salt() (r string, exists bool)
- func (m *UserInfoMutation) SetField(name string, value ent.Value) error
- func (m *UserInfoMutation) SetPasswdHash(s string)
- func (m *UserInfoMutation) SetSalt(s string)
- func (m *UserInfoMutation) SetUserName(s string)
- func (m UserInfoMutation) Tx() (*Tx, error)
- func (m *UserInfoMutation) Type() string
- func (m *UserInfoMutation) UserName() (r string, exists bool)
- func (m *UserInfoMutation) Where(ps ...predicate.User_info)
- type UserInfoQuery
- func (uiq *UserInfoQuery) All(ctx context.Context) ([]*User_info, error)
- func (uiq *UserInfoQuery) AllX(ctx context.Context) []*User_info
- func (uiq *UserInfoQuery) Clone() *UserInfoQuery
- func (uiq *UserInfoQuery) Count(ctx context.Context) (int, error)
- func (uiq *UserInfoQuery) CountX(ctx context.Context) int
- func (uiq *UserInfoQuery) Exist(ctx context.Context) (bool, error)
- func (uiq *UserInfoQuery) ExistX(ctx context.Context) bool
- func (uiq *UserInfoQuery) First(ctx context.Context) (*User_info, error)
- func (uiq *UserInfoQuery) FirstID(ctx context.Context) (id int, err error)
- func (uiq *UserInfoQuery) FirstIDX(ctx context.Context) int
- func (uiq *UserInfoQuery) FirstX(ctx context.Context) *User_info
- func (uiq *UserInfoQuery) GroupBy(field string, fields ...string) *UserInfoGroupBy
- func (uiq *UserInfoQuery) IDs(ctx context.Context) ([]int, error)
- func (uiq *UserInfoQuery) IDsX(ctx context.Context) []int
- func (uiq *UserInfoQuery) Limit(limit int) *UserInfoQuery
- func (uiq *UserInfoQuery) Offset(offset int) *UserInfoQuery
- func (uiq *UserInfoQuery) Only(ctx context.Context) (*User_info, error)
- func (uiq *UserInfoQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uiq *UserInfoQuery) OnlyIDX(ctx context.Context) int
- func (uiq *UserInfoQuery) OnlyX(ctx context.Context) *User_info
- func (uiq *UserInfoQuery) Order(o ...OrderFunc) *UserInfoQuery
- func (uiq *UserInfoQuery) Select(fields ...string) *UserInfoSelect
- func (uiq *UserInfoQuery) Unique(unique bool) *UserInfoQuery
- func (uiq *UserInfoQuery) Where(ps ...predicate.User_info) *UserInfoQuery
- type UserInfoSelect
- func (s *UserInfoSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserInfoSelect) BoolX(ctx context.Context) bool
- func (s *UserInfoSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserInfoSelect) BoolsX(ctx context.Context) []bool
- func (s *UserInfoSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserInfoSelect) Float64X(ctx context.Context) float64
- func (s *UserInfoSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserInfoSelect) Float64sX(ctx context.Context) []float64
- func (s *UserInfoSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserInfoSelect) IntX(ctx context.Context) int
- func (s *UserInfoSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserInfoSelect) IntsX(ctx context.Context) []int
- func (uis *UserInfoSelect) Scan(ctx context.Context, v any) error
- func (s *UserInfoSelect) ScanX(ctx context.Context, v any)
- func (s *UserInfoSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserInfoSelect) StringX(ctx context.Context) string
- func (s *UserInfoSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserInfoSelect) StringsX(ctx context.Context) []string
- type UserInfoUpdate
- func (uiu *UserInfoUpdate) Exec(ctx context.Context) error
- func (uiu *UserInfoUpdate) ExecX(ctx context.Context)
- func (uiu *UserInfoUpdate) Mutation() *UserInfoMutation
- func (uiu *UserInfoUpdate) Save(ctx context.Context) (int, error)
- func (uiu *UserInfoUpdate) SaveX(ctx context.Context) int
- func (uiu *UserInfoUpdate) SetPasswdHash(s string) *UserInfoUpdate
- func (uiu *UserInfoUpdate) SetSalt(s string) *UserInfoUpdate
- func (uiu *UserInfoUpdate) SetUserName(s string) *UserInfoUpdate
- func (uiu *UserInfoUpdate) Where(ps ...predicate.User_info) *UserInfoUpdate
- type UserInfoUpdateOne
- func (uiuo *UserInfoUpdateOne) Exec(ctx context.Context) error
- func (uiuo *UserInfoUpdateOne) ExecX(ctx context.Context)
- func (uiuo *UserInfoUpdateOne) Mutation() *UserInfoMutation
- func (uiuo *UserInfoUpdateOne) Save(ctx context.Context) (*User_info, error)
- func (uiuo *UserInfoUpdateOne) SaveX(ctx context.Context) *User_info
- func (uiuo *UserInfoUpdateOne) Select(field string, fields ...string) *UserInfoUpdateOne
- func (uiuo *UserInfoUpdateOne) SetPasswdHash(s string) *UserInfoUpdateOne
- func (uiuo *UserInfoUpdateOne) SetSalt(s string) *UserInfoUpdateOne
- func (uiuo *UserInfoUpdateOne) SetUserName(s string) *UserInfoUpdateOne
- type UserJobCreate
- func (ujc *UserJobCreate) Exec(ctx context.Context) error
- func (ujc *UserJobCreate) ExecX(ctx context.Context)
- func (ujc *UserJobCreate) Mutation() *UserJobMutation
- func (ujc *UserJobCreate) Save(ctx context.Context) (*User_job, error)
- func (ujc *UserJobCreate) SaveX(ctx context.Context) *User_job
- func (ujc *UserJobCreate) SetCreateTime(t time.Time) *UserJobCreate
- func (ujc *UserJobCreate) SetJobID(i int64) *UserJobCreate
- func (ujc *UserJobCreate) SetNillableCreateTime(t *time.Time) *UserJobCreate
- func (ujc *UserJobCreate) SetNillableUpdateTime(t *time.Time) *UserJobCreate
- func (ujc *UserJobCreate) SetUpdateTime(t time.Time) *UserJobCreate
- func (ujc *UserJobCreate) SetUserID(i int64) *UserJobCreate
- type UserJobCreateBulk
- type UserJobDelete
- type UserJobDeleteOne
- type UserJobGroupBy
- func (ujgb *UserJobGroupBy) Aggregate(fns ...AggregateFunc) *UserJobGroupBy
- func (s *UserJobGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserJobGroupBy) BoolX(ctx context.Context) bool
- func (s *UserJobGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserJobGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserJobGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserJobGroupBy) Float64X(ctx context.Context) float64
- func (s *UserJobGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserJobGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserJobGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserJobGroupBy) IntX(ctx context.Context) int
- func (s *UserJobGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserJobGroupBy) IntsX(ctx context.Context) []int
- func (ujgb *UserJobGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserJobGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserJobGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserJobGroupBy) StringX(ctx context.Context) string
- func (s *UserJobGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserJobGroupBy) StringsX(ctx context.Context) []string
- type UserJobMutation
- func (m *UserJobMutation) AddField(name string, value ent.Value) error
- func (m *UserJobMutation) AddJobID(i int64)
- func (m *UserJobMutation) AddUserID(i int64)
- func (m *UserJobMutation) AddedEdges() []string
- func (m *UserJobMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserJobMutation) AddedFields() []string
- func (m *UserJobMutation) AddedIDs(name string) []ent.Value
- func (m *UserJobMutation) AddedJobID() (r int64, exists bool)
- func (m *UserJobMutation) AddedUserID() (r int64, exists bool)
- func (m *UserJobMutation) ClearEdge(name string) error
- func (m *UserJobMutation) ClearField(name string) error
- func (m *UserJobMutation) ClearedEdges() []string
- func (m *UserJobMutation) ClearedFields() []string
- func (m UserJobMutation) Client() *Client
- func (m *UserJobMutation) CreateTime() (r time.Time, exists bool)
- func (m *UserJobMutation) EdgeCleared(name string) bool
- func (m *UserJobMutation) Field(name string) (ent.Value, bool)
- func (m *UserJobMutation) FieldCleared(name string) bool
- func (m *UserJobMutation) Fields() []string
- func (m *UserJobMutation) ID() (id int, exists bool)
- func (m *UserJobMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserJobMutation) JobID() (r int64, exists bool)
- func (m *UserJobMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserJobMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserJobMutation) OldJobID(ctx context.Context) (v int64, err error)
- func (m *UserJobMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserJobMutation) OldUserID(ctx context.Context) (v int64, err error)
- func (m *UserJobMutation) Op() Op
- func (m *UserJobMutation) RemovedEdges() []string
- func (m *UserJobMutation) RemovedIDs(name string) []ent.Value
- func (m *UserJobMutation) ResetCreateTime()
- func (m *UserJobMutation) ResetEdge(name string) error
- func (m *UserJobMutation) ResetField(name string) error
- func (m *UserJobMutation) ResetJobID()
- func (m *UserJobMutation) ResetUpdateTime()
- func (m *UserJobMutation) ResetUserID()
- func (m *UserJobMutation) SetCreateTime(t time.Time)
- func (m *UserJobMutation) SetField(name string, value ent.Value) error
- func (m *UserJobMutation) SetJobID(i int64)
- func (m *UserJobMutation) SetUpdateTime(t time.Time)
- func (m *UserJobMutation) SetUserID(i int64)
- func (m UserJobMutation) Tx() (*Tx, error)
- func (m *UserJobMutation) Type() string
- func (m *UserJobMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserJobMutation) UserID() (r int64, exists bool)
- func (m *UserJobMutation) Where(ps ...predicate.User_job)
- type UserJobQuery
- func (ujq *UserJobQuery) All(ctx context.Context) ([]*User_job, error)
- func (ujq *UserJobQuery) AllX(ctx context.Context) []*User_job
- func (ujq *UserJobQuery) Clone() *UserJobQuery
- func (ujq *UserJobQuery) Count(ctx context.Context) (int, error)
- func (ujq *UserJobQuery) CountX(ctx context.Context) int
- func (ujq *UserJobQuery) Exist(ctx context.Context) (bool, error)
- func (ujq *UserJobQuery) ExistX(ctx context.Context) bool
- func (ujq *UserJobQuery) First(ctx context.Context) (*User_job, error)
- func (ujq *UserJobQuery) FirstID(ctx context.Context) (id int, err error)
- func (ujq *UserJobQuery) FirstIDX(ctx context.Context) int
- func (ujq *UserJobQuery) FirstX(ctx context.Context) *User_job
- func (ujq *UserJobQuery) GroupBy(field string, fields ...string) *UserJobGroupBy
- func (ujq *UserJobQuery) IDs(ctx context.Context) ([]int, error)
- func (ujq *UserJobQuery) IDsX(ctx context.Context) []int
- func (ujq *UserJobQuery) Limit(limit int) *UserJobQuery
- func (ujq *UserJobQuery) Offset(offset int) *UserJobQuery
- func (ujq *UserJobQuery) Only(ctx context.Context) (*User_job, error)
- func (ujq *UserJobQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ujq *UserJobQuery) OnlyIDX(ctx context.Context) int
- func (ujq *UserJobQuery) OnlyX(ctx context.Context) *User_job
- func (ujq *UserJobQuery) Order(o ...OrderFunc) *UserJobQuery
- func (ujq *UserJobQuery) Select(fields ...string) *UserJobSelect
- func (ujq *UserJobQuery) Unique(unique bool) *UserJobQuery
- func (ujq *UserJobQuery) Where(ps ...predicate.User_job) *UserJobQuery
- type UserJobSelect
- func (s *UserJobSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserJobSelect) BoolX(ctx context.Context) bool
- func (s *UserJobSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserJobSelect) BoolsX(ctx context.Context) []bool
- func (s *UserJobSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserJobSelect) Float64X(ctx context.Context) float64
- func (s *UserJobSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserJobSelect) Float64sX(ctx context.Context) []float64
- func (s *UserJobSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserJobSelect) IntX(ctx context.Context) int
- func (s *UserJobSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserJobSelect) IntsX(ctx context.Context) []int
- func (ujs *UserJobSelect) Scan(ctx context.Context, v any) error
- func (s *UserJobSelect) ScanX(ctx context.Context, v any)
- func (s *UserJobSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserJobSelect) StringX(ctx context.Context) string
- func (s *UserJobSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserJobSelect) StringsX(ctx context.Context) []string
- type UserJobUpdate
- func (uju *UserJobUpdate) AddJobID(i int64) *UserJobUpdate
- func (uju *UserJobUpdate) AddUserID(i int64) *UserJobUpdate
- func (uju *UserJobUpdate) Exec(ctx context.Context) error
- func (uju *UserJobUpdate) ExecX(ctx context.Context)
- func (uju *UserJobUpdate) Mutation() *UserJobMutation
- func (uju *UserJobUpdate) Save(ctx context.Context) (int, error)
- func (uju *UserJobUpdate) SaveX(ctx context.Context) int
- func (uju *UserJobUpdate) SetCreateTime(t time.Time) *UserJobUpdate
- func (uju *UserJobUpdate) SetJobID(i int64) *UserJobUpdate
- func (uju *UserJobUpdate) SetNillableCreateTime(t *time.Time) *UserJobUpdate
- func (uju *UserJobUpdate) SetUpdateTime(t time.Time) *UserJobUpdate
- func (uju *UserJobUpdate) SetUserID(i int64) *UserJobUpdate
- func (uju *UserJobUpdate) Where(ps ...predicate.User_job) *UserJobUpdate
- type UserJobUpdateOne
- func (ujuo *UserJobUpdateOne) AddJobID(i int64) *UserJobUpdateOne
- func (ujuo *UserJobUpdateOne) AddUserID(i int64) *UserJobUpdateOne
- func (ujuo *UserJobUpdateOne) Exec(ctx context.Context) error
- func (ujuo *UserJobUpdateOne) ExecX(ctx context.Context)
- func (ujuo *UserJobUpdateOne) Mutation() *UserJobMutation
- func (ujuo *UserJobUpdateOne) Save(ctx context.Context) (*User_job, error)
- func (ujuo *UserJobUpdateOne) SaveX(ctx context.Context) *User_job
- func (ujuo *UserJobUpdateOne) Select(field string, fields ...string) *UserJobUpdateOne
- func (ujuo *UserJobUpdateOne) SetCreateTime(t time.Time) *UserJobUpdateOne
- func (ujuo *UserJobUpdateOne) SetJobID(i int64) *UserJobUpdateOne
- func (ujuo *UserJobUpdateOne) SetNillableCreateTime(t *time.Time) *UserJobUpdateOne
- func (ujuo *UserJobUpdateOne) SetUpdateTime(t time.Time) *UserJobUpdateOne
- func (ujuo *UserJobUpdateOne) SetUserID(i int64) *UserJobUpdateOne
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddRole(i int8)
- 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) AddedRole() (r int8, exists bool)
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- 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) 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) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) IsExist() (r bool, exists bool)
- func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIsExist(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldRole(ctx context.Context) (v int8, err error)
- func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUserName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUserTitle(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCreateTime()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIsExist()
- func (m *UserMutation) ResetRole()
- func (m *UserMutation) ResetUpdateTime()
- func (m *UserMutation) ResetUserName()
- func (m *UserMutation) ResetUserTitle()
- func (m *UserMutation) Role() (r int8, exists bool)
- func (m *UserMutation) SetCreateTime(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetIsExist(b bool)
- func (m *UserMutation) SetRole(i int8)
- func (m *UserMutation) SetUpdateTime(t time.Time)
- func (m *UserMutation) SetUserName(s string)
- func (m *UserMutation) SetUserTitle(s string)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UserMutation) UserName() (r string, exists bool)
- func (m *UserMutation) UserTitle() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- 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) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddRole(i int8) *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetCreateTime(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetIsExist(b bool) *UserUpdate
- func (uu *UserUpdate) SetNillableCreateTime(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableIsExist(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableRole(i *int8) *UserUpdate
- func (uu *UserUpdate) SetRole(i int8) *UserUpdate
- func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUserName(s string) *UserUpdate
- func (uu *UserUpdate) SetUserTitle(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddRole(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- 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) SetCreateTime(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsExist(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreateTime(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsExist(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRole(i *int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRole(i int8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUserName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUserTitle(s string) *UserUpdateOne
- type User_info
- type User_infoClient
- func (c *User_infoClient) Create() *UserInfoCreate
- func (c *User_infoClient) CreateBulk(builders ...*UserInfoCreate) *UserInfoCreateBulk
- func (c *User_infoClient) Delete() *UserInfoDelete
- func (c *User_infoClient) DeleteOne(ui *User_info) *UserInfoDeleteOne
- func (c *User_infoClient) DeleteOneID(id int) *UserInfoDeleteOne
- func (c *User_infoClient) Get(ctx context.Context, id int) (*User_info, error)
- func (c *User_infoClient) GetX(ctx context.Context, id int) *User_info
- func (c *User_infoClient) Hooks() []Hook
- func (c *User_infoClient) Query() *UserInfoQuery
- func (c *User_infoClient) Update() *UserInfoUpdate
- func (c *User_infoClient) UpdateOne(ui *User_info) *UserInfoUpdateOne
- func (c *User_infoClient) UpdateOneID(id int) *UserInfoUpdateOne
- func (c *User_infoClient) Use(hooks ...Hook)
- type User_infos
- type User_job
- type User_jobClient
- func (c *User_jobClient) Create() *UserJobCreate
- func (c *User_jobClient) CreateBulk(builders ...*UserJobCreate) *UserJobCreateBulk
- func (c *User_jobClient) Delete() *UserJobDelete
- func (c *User_jobClient) DeleteOne(uj *User_job) *UserJobDeleteOne
- func (c *User_jobClient) DeleteOneID(id int) *UserJobDeleteOne
- func (c *User_jobClient) Get(ctx context.Context, id int) (*User_job, error)
- func (c *User_jobClient) GetX(ctx context.Context, id int) *User_job
- func (c *User_jobClient) Hooks() []Hook
- func (c *User_jobClient) Query() *UserJobQuery
- func (c *User_jobClient) Update() *UserJobUpdate
- func (c *User_jobClient) UpdateOne(uj *User_job) *UserJobUpdateOne
- func (c *User_jobClient) UpdateOneID(id int) *UserJobUpdateOne
- func (c *User_jobClient) Use(hooks ...Hook)
- type User_jobs
- 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. TypeJob = "Job" TypeUser = "User" TypeUser_info = "User_info" TypeUser_job = "User_job" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Job is the client for interacting with the Job builders. Job *JobClient // User is the client for interacting with the User builders. User *UserClient // User_info is the client for interacting with the User_info builders. User_info *User_infoClient // User_job is the client for interacting with the User_job builders. User_job *User_jobClient // 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(). Job. 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(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Job ¶
type Job struct { // ID of the ent. ID int `json:"id,omitempty"` // job name JobName string `json:"job_name,omitempty"` // company name CompanyName string `json:"company_name,omitempty"` // delete or not IsExist bool `json:"is_exist,omitempty"` // job desc Description string `json:"description,omitempty"` // job is remote or not IsRemote bool `json:"is_remote,omitempty"` // job exp Exp int8 `json:"exp,omitempty"` // job area Area string `json:"area,omitempty"` // create_time CreateTime time.Time `json:"create_time,omitempty"` // update_time UpdateTime time.Time `json:"update_time,omitempty"` // contains filtered or unexported fields }
Job is the model entity for the Job schema.
func (*Job) Unwrap ¶
Unwrap unwraps the Job 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 (*Job) Update ¶
func (j *Job) Update() *JobUpdateOne
Update returns a builder for updating this Job. Note that you need to call Job.Unwrap() before calling this method if this Job was returned from a transaction, and the transaction was committed or rolled back.
type JobClient ¶
type JobClient struct {
// contains filtered or unexported fields
}
JobClient is a client for the Job schema.
func NewJobClient ¶
func NewJobClient(c config) *JobClient
NewJobClient returns a client for the Job from the given config.
func (*JobClient) CreateBulk ¶
func (c *JobClient) CreateBulk(builders ...*JobCreate) *JobCreateBulk
CreateBulk returns a builder for creating a bulk of Job entities.
func (*JobClient) DeleteOne ¶
func (c *JobClient) DeleteOne(j *Job) *JobDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*JobClient) DeleteOneID ¶
func (c *JobClient) DeleteOneID(id int) *JobDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*JobClient) UpdateOne ¶
func (c *JobClient) UpdateOne(j *Job) *JobUpdateOne
UpdateOne returns an update builder for the given entity.
func (*JobClient) UpdateOneID ¶
func (c *JobClient) UpdateOneID(id int) *JobUpdateOne
UpdateOneID returns an update builder for the given id.
type JobCreate ¶
type JobCreate struct {
// contains filtered or unexported fields
}
JobCreate is the builder for creating a Job entity.
func (*JobCreate) Mutation ¶
func (jc *JobCreate) Mutation() *JobMutation
Mutation returns the JobMutation object of the builder.
func (*JobCreate) SetCompanyName ¶
SetCompanyName sets the "company_name" field.
func (*JobCreate) SetCreateTime ¶
SetCreateTime sets the "create_time" field.
func (*JobCreate) SetDescription ¶
SetDescription sets the "description" field.
func (*JobCreate) SetIsExist ¶
SetIsExist sets the "is_exist" field.
func (*JobCreate) SetIsRemote ¶
SetIsRemote sets the "is_remote" field.
func (*JobCreate) SetJobName ¶
SetJobName sets the "job_name" field.
func (*JobCreate) SetNillableCreateTime ¶
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*JobCreate) SetNillableIsExist ¶
SetNillableIsExist sets the "is_exist" field if the given value is not nil.
func (*JobCreate) SetNillableUpdateTime ¶
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
type JobCreateBulk ¶
type JobCreateBulk struct {
// contains filtered or unexported fields
}
JobCreateBulk is the builder for creating many Job entities in bulk.
func (*JobCreateBulk) Exec ¶
func (jcb *JobCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*JobCreateBulk) ExecX ¶
func (jcb *JobCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type JobDelete ¶
type JobDelete struct {
// contains filtered or unexported fields
}
JobDelete is the builder for deleting a Job entity.
func (*JobDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type JobDeleteOne ¶
type JobDeleteOne struct {
// contains filtered or unexported fields
}
JobDeleteOne is the builder for deleting a single Job entity.
func (*JobDeleteOne) Exec ¶
func (jdo *JobDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*JobDeleteOne) ExecX ¶
func (jdo *JobDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type JobGroupBy ¶
type JobGroupBy struct {
// contains filtered or unexported fields
}
JobGroupBy is the group-by builder for Job entities.
func (*JobGroupBy) Aggregate ¶
func (jgb *JobGroupBy) Aggregate(fns ...AggregateFunc) *JobGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*JobGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Scan ¶
func (jgb *JobGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*JobGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type JobMutation ¶
type JobMutation struct {
// contains filtered or unexported fields
}
JobMutation represents an operation that mutates the Job nodes in the graph.
func (*JobMutation) AddField ¶
func (m *JobMutation) 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 (*JobMutation) AddedEdges ¶
func (m *JobMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*JobMutation) AddedExp ¶
func (m *JobMutation) AddedExp() (r int8, exists bool)
AddedExp returns the value that was added to the "exp" field in this mutation.
func (*JobMutation) AddedField ¶
func (m *JobMutation) 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 (*JobMutation) AddedFields ¶
func (m *JobMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*JobMutation) AddedIDs ¶
func (m *JobMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*JobMutation) Area ¶
func (m *JobMutation) Area() (r string, exists bool)
Area returns the value of the "area" field in the mutation.
func (*JobMutation) ClearEdge ¶
func (m *JobMutation) 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 (*JobMutation) ClearField ¶
func (m *JobMutation) 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 (*JobMutation) ClearedEdges ¶
func (m *JobMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*JobMutation) ClearedFields ¶
func (m *JobMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (JobMutation) Client ¶
func (m JobMutation) 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 (*JobMutation) CompanyName ¶
func (m *JobMutation) CompanyName() (r string, exists bool)
CompanyName returns the value of the "company_name" field in the mutation.
func (*JobMutation) CreateTime ¶
func (m *JobMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*JobMutation) Description ¶
func (m *JobMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*JobMutation) EdgeCleared ¶
func (m *JobMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*JobMutation) Exp ¶
func (m *JobMutation) Exp() (r int8, exists bool)
Exp returns the value of the "exp" field in the mutation.
func (*JobMutation) Field ¶
func (m *JobMutation) 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 (*JobMutation) FieldCleared ¶
func (m *JobMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*JobMutation) Fields ¶
func (m *JobMutation) 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 (*JobMutation) ID ¶
func (m *JobMutation) 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 or after it was returned from the database.
func (*JobMutation) IDs ¶
func (m *JobMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*JobMutation) IsExist ¶
func (m *JobMutation) IsExist() (r bool, exists bool)
IsExist returns the value of the "is_exist" field in the mutation.
func (*JobMutation) IsRemote ¶
func (m *JobMutation) IsRemote() (r bool, exists bool)
IsRemote returns the value of the "is_remote" field in the mutation.
func (*JobMutation) JobName ¶
func (m *JobMutation) JobName() (r string, exists bool)
JobName returns the value of the "job_name" field in the mutation.
func (*JobMutation) OldArea ¶
func (m *JobMutation) OldArea(ctx context.Context) (v string, err error)
OldArea returns the old "area" field's value of the Job entity. If the Job 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 (*JobMutation) OldCompanyName ¶
func (m *JobMutation) OldCompanyName(ctx context.Context) (v string, err error)
OldCompanyName returns the old "company_name" field's value of the Job entity. If the Job 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 (*JobMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Job entity. If the Job 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 (*JobMutation) OldDescription ¶
func (m *JobMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Job entity. If the Job 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 (*JobMutation) OldExp ¶
func (m *JobMutation) OldExp(ctx context.Context) (v int8, err error)
OldExp returns the old "exp" field's value of the Job entity. If the Job 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 (*JobMutation) 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 (*JobMutation) OldIsExist ¶
func (m *JobMutation) OldIsExist(ctx context.Context) (v bool, err error)
OldIsExist returns the old "is_exist" field's value of the Job entity. If the Job 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 (*JobMutation) OldIsRemote ¶
func (m *JobMutation) OldIsRemote(ctx context.Context) (v bool, err error)
OldIsRemote returns the old "is_remote" field's value of the Job entity. If the Job 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 (*JobMutation) OldJobName ¶
func (m *JobMutation) OldJobName(ctx context.Context) (v string, err error)
OldJobName returns the old "job_name" field's value of the Job entity. If the Job 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 (*JobMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Job entity. If the Job 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 (*JobMutation) RemovedEdges ¶
func (m *JobMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*JobMutation) RemovedIDs ¶
func (m *JobMutation) 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 (*JobMutation) ResetArea ¶
func (m *JobMutation) ResetArea()
ResetArea resets all changes to the "area" field.
func (*JobMutation) ResetCompanyName ¶
func (m *JobMutation) ResetCompanyName()
ResetCompanyName resets all changes to the "company_name" field.
func (*JobMutation) ResetCreateTime ¶
func (m *JobMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*JobMutation) ResetDescription ¶
func (m *JobMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*JobMutation) ResetEdge ¶
func (m *JobMutation) 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 (*JobMutation) ResetExp ¶
func (m *JobMutation) ResetExp()
ResetExp resets all changes to the "exp" field.
func (*JobMutation) ResetField ¶
func (m *JobMutation) 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 (*JobMutation) ResetIsExist ¶
func (m *JobMutation) ResetIsExist()
ResetIsExist resets all changes to the "is_exist" field.
func (*JobMutation) ResetIsRemote ¶
func (m *JobMutation) ResetIsRemote()
ResetIsRemote resets all changes to the "is_remote" field.
func (*JobMutation) ResetJobName ¶
func (m *JobMutation) ResetJobName()
ResetJobName resets all changes to the "job_name" field.
func (*JobMutation) ResetUpdateTime ¶
func (m *JobMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*JobMutation) SetArea ¶
func (m *JobMutation) SetArea(s string)
SetArea sets the "area" field.
func (*JobMutation) SetCompanyName ¶
func (m *JobMutation) SetCompanyName(s string)
SetCompanyName sets the "company_name" field.
func (*JobMutation) SetCreateTime ¶
func (m *JobMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*JobMutation) SetDescription ¶
func (m *JobMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*JobMutation) SetField ¶
func (m *JobMutation) 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 (*JobMutation) SetIsExist ¶
func (m *JobMutation) SetIsExist(b bool)
SetIsExist sets the "is_exist" field.
func (*JobMutation) SetIsRemote ¶
func (m *JobMutation) SetIsRemote(b bool)
SetIsRemote sets the "is_remote" field.
func (*JobMutation) SetJobName ¶
func (m *JobMutation) SetJobName(s string)
SetJobName sets the "job_name" field.
func (*JobMutation) SetUpdateTime ¶
func (m *JobMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (JobMutation) Tx ¶
func (m JobMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*JobMutation) Type ¶
func (m *JobMutation) Type() string
Type returns the node type of this mutation (Job).
func (*JobMutation) UpdateTime ¶
func (m *JobMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*JobMutation) Where ¶
func (m *JobMutation) Where(ps ...predicate.Job)
Where appends a list predicates to the JobMutation builder.
type JobQuery ¶
type JobQuery struct {
// contains filtered or unexported fields
}
JobQuery is the builder for querying Job entities.
func (*JobQuery) Clone ¶
Clone returns a duplicate of the JobQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*JobQuery) First ¶
First returns the first Job entity from the query. Returns a *NotFoundError when no Job was found.
func (*JobQuery) FirstID ¶
FirstID returns the first Job ID from the query. Returns a *NotFoundError when no Job ID was found.
func (*JobQuery) GroupBy ¶
func (jq *JobQuery) GroupBy(field string, fields ...string) *JobGroupBy
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 { JobName string `json:"job_name,omitempty"` Count int `json:"count,omitempty"` } client.Job.Query(). GroupBy(job.FieldJobName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*JobQuery) Only ¶
Only returns a single Job entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Job entity is found. Returns a *NotFoundError when no Job entities are found.
func (*JobQuery) OnlyID ¶
OnlyID is like Only, but returns the only Job ID in the query. Returns a *NotSingularError when more than one Job ID is found. Returns a *NotFoundError when no entities are found.
func (*JobQuery) Select ¶
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 { JobName string `json:"job_name,omitempty"` } client.Job.Query(). Select(job.FieldJobName). Scan(ctx, &v)
type JobSelect ¶
type JobSelect struct { *JobQuery // contains filtered or unexported fields }
JobSelect is the builder for selecting fields of Job entities.
func (*JobSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*JobSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*JobSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*JobSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*JobSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*JobSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*JobSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type JobUpdate ¶
type JobUpdate struct {
// contains filtered or unexported fields
}
JobUpdate is the builder for updating Job entities.
func (*JobUpdate) Mutation ¶
func (ju *JobUpdate) Mutation() *JobMutation
Mutation returns the JobMutation object of the builder.
func (*JobUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*JobUpdate) SetCompanyName ¶
SetCompanyName sets the "company_name" field.
func (*JobUpdate) SetCreateTime ¶
SetCreateTime sets the "create_time" field.
func (*JobUpdate) SetDescription ¶
SetDescription sets the "description" field.
func (*JobUpdate) SetIsExist ¶
SetIsExist sets the "is_exist" field.
func (*JobUpdate) SetIsRemote ¶
SetIsRemote sets the "is_remote" field.
func (*JobUpdate) SetJobName ¶
SetJobName sets the "job_name" field.
func (*JobUpdate) SetNillableCreateTime ¶
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*JobUpdate) SetNillableIsExist ¶
SetNillableIsExist sets the "is_exist" field if the given value is not nil.
func (*JobUpdate) SetUpdateTime ¶
SetUpdateTime sets the "update_time" field.
type JobUpdateOne ¶
type JobUpdateOne struct {
// contains filtered or unexported fields
}
JobUpdateOne is the builder for updating a single Job entity.
func (*JobUpdateOne) AddExp ¶
func (juo *JobUpdateOne) AddExp(i int8) *JobUpdateOne
AddExp adds i to the "exp" field.
func (*JobUpdateOne) Exec ¶
func (juo *JobUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*JobUpdateOne) ExecX ¶
func (juo *JobUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JobUpdateOne) Mutation ¶
func (juo *JobUpdateOne) Mutation() *JobMutation
Mutation returns the JobMutation object of the builder.
func (*JobUpdateOne) Save ¶
func (juo *JobUpdateOne) Save(ctx context.Context) (*Job, error)
Save executes the query and returns the updated Job entity.
func (*JobUpdateOne) SaveX ¶
func (juo *JobUpdateOne) SaveX(ctx context.Context) *Job
SaveX is like Save, but panics if an error occurs.
func (*JobUpdateOne) Select ¶
func (juo *JobUpdateOne) Select(field string, fields ...string) *JobUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*JobUpdateOne) SetArea ¶
func (juo *JobUpdateOne) SetArea(s string) *JobUpdateOne
SetArea sets the "area" field.
func (*JobUpdateOne) SetCompanyName ¶
func (juo *JobUpdateOne) SetCompanyName(s string) *JobUpdateOne
SetCompanyName sets the "company_name" field.
func (*JobUpdateOne) SetCreateTime ¶
func (juo *JobUpdateOne) SetCreateTime(t time.Time) *JobUpdateOne
SetCreateTime sets the "create_time" field.
func (*JobUpdateOne) SetDescription ¶
func (juo *JobUpdateOne) SetDescription(s string) *JobUpdateOne
SetDescription sets the "description" field.
func (*JobUpdateOne) SetExp ¶
func (juo *JobUpdateOne) SetExp(i int8) *JobUpdateOne
SetExp sets the "exp" field.
func (*JobUpdateOne) SetIsExist ¶
func (juo *JobUpdateOne) SetIsExist(b bool) *JobUpdateOne
SetIsExist sets the "is_exist" field.
func (*JobUpdateOne) SetIsRemote ¶
func (juo *JobUpdateOne) SetIsRemote(b bool) *JobUpdateOne
SetIsRemote sets the "is_remote" field.
func (*JobUpdateOne) SetJobName ¶
func (juo *JobUpdateOne) SetJobName(s string) *JobUpdateOne
SetJobName sets the "job_name" field.
func (*JobUpdateOne) SetNillableCreateTime ¶
func (juo *JobUpdateOne) SetNillableCreateTime(t *time.Time) *JobUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*JobUpdateOne) SetNillableIsExist ¶
func (juo *JobUpdateOne) SetNillableIsExist(b *bool) *JobUpdateOne
SetNillableIsExist sets the "is_exist" field if the given value is not nil.
func (*JobUpdateOne) SetUpdateTime ¶
func (juo *JobUpdateOne) SetUpdateTime(t time.Time) *JobUpdateOne
SetUpdateTime sets the "update_time" field.
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(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Tx ¶
type Tx struct { // Job is the client for interacting with the Job builders. Job *JobClient // User is the client for interacting with the User builders. User *UserClient // User_info is the client for interacting with the User_info builders. User_info *User_infoClient // User_job is the client for interacting with the User_job builders. User_job *User_jobClient // 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"` // role of user 0-user,1-administer Role int8 `json:"role,omitempty"` // user name,unique and not empty UserName string `json:"user_name,omitempty"` // user delete or not IsExist bool `json:"is_exist,omitempty"` // create_time CreateTime time.Time `json:"create_time,omitempty"` // update_time UpdateTime time.Time `json:"update_time,omitempty"` // user title,like software engineer UserTitle string `json:"user_title,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
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 builder for creating a User entity.
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 builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity by its 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) 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) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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) SetIsExist ¶
func (uc *UserCreate) SetIsExist(b bool) *UserCreate
SetIsExist sets the "is_exist" 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) SetNillableIsExist ¶
func (uc *UserCreate) SetNillableIsExist(b *bool) *UserCreate
SetNillableIsExist sets the "is_exist" field if the given value is not nil.
func (*UserCreate) SetNillableRole ¶
func (uc *UserCreate) SetNillableRole(i *int8) *UserCreate
SetNillableRole sets the "role" 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) SetRole ¶
func (uc *UserCreate) SetRole(i int8) *UserCreate
SetRole sets the "role" field.
func (*UserCreate) SetUpdateTime ¶
func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate
SetUpdateTime sets the "update_time" field.
func (*UserCreate) SetUserName ¶
func (uc *UserCreate) SetUserName(s string) *UserCreate
SetUserName sets the "user_name" field.
func (*UserCreate) SetUserTitle ¶
func (uc *UserCreate) SetUserTitle(s string) *UserCreate
SetUserTitle sets the "user_title" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
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 appends a list predicates 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 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 ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserInfoCreate ¶
type UserInfoCreate struct {
// contains filtered or unexported fields
}
UserInfoCreate is the builder for creating a User_info entity.
func (*UserInfoCreate) Exec ¶
func (uic *UserInfoCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserInfoCreate) ExecX ¶
func (uic *UserInfoCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserInfoCreate) Mutation ¶
func (uic *UserInfoCreate) Mutation() *UserInfoMutation
Mutation returns the UserInfoMutation object of the builder.
func (*UserInfoCreate) Save ¶
func (uic *UserInfoCreate) Save(ctx context.Context) (*User_info, error)
Save creates the User_info in the database.
func (*UserInfoCreate) SaveX ¶
func (uic *UserInfoCreate) SaveX(ctx context.Context) *User_info
SaveX calls Save and panics if Save returns an error.
func (*UserInfoCreate) SetPasswdHash ¶
func (uic *UserInfoCreate) SetPasswdHash(s string) *UserInfoCreate
SetPasswdHash sets the "passwd_hash" field.
func (*UserInfoCreate) SetSalt ¶
func (uic *UserInfoCreate) SetSalt(s string) *UserInfoCreate
SetSalt sets the "salt" field.
func (*UserInfoCreate) SetUserName ¶
func (uic *UserInfoCreate) SetUserName(s string) *UserInfoCreate
SetUserName sets the "user_name" field.
type UserInfoCreateBulk ¶
type UserInfoCreateBulk struct {
// contains filtered or unexported fields
}
UserInfoCreateBulk is the builder for creating many User_info entities in bulk.
func (*UserInfoCreateBulk) Exec ¶
func (uicb *UserInfoCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserInfoCreateBulk) ExecX ¶
func (uicb *UserInfoCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserInfoDelete ¶
type UserInfoDelete struct {
// contains filtered or unexported fields
}
UserInfoDelete is the builder for deleting a User_info entity.
func (*UserInfoDelete) Exec ¶
func (uid *UserInfoDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserInfoDelete) ExecX ¶
func (uid *UserInfoDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserInfoDelete) Where ¶
func (uid *UserInfoDelete) Where(ps ...predicate.User_info) *UserInfoDelete
Where appends a list predicates to the UserInfoDelete builder.
type UserInfoDeleteOne ¶
type UserInfoDeleteOne struct {
// contains filtered or unexported fields
}
UserInfoDeleteOne is the builder for deleting a single User_info entity.
func (*UserInfoDeleteOne) Exec ¶
func (uido *UserInfoDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserInfoDeleteOne) ExecX ¶
func (uido *UserInfoDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserInfoGroupBy ¶
type UserInfoGroupBy struct {
// contains filtered or unexported fields
}
UserInfoGroupBy is the group-by builder for User_info entities.
func (*UserInfoGroupBy) Aggregate ¶
func (uigb *UserInfoGroupBy) Aggregate(fns ...AggregateFunc) *UserInfoGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserInfoGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserInfoGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserInfoGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserInfoGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserInfoGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserInfoGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserInfoGroupBy) Scan ¶
func (uigb *UserInfoGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*UserInfoGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserInfoMutation ¶
type UserInfoMutation struct {
// contains filtered or unexported fields
}
UserInfoMutation represents an operation that mutates the User_info nodes in the graph.
func (*UserInfoMutation) AddField ¶
func (m *UserInfoMutation) 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 (*UserInfoMutation) AddedEdges ¶
func (m *UserInfoMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserInfoMutation) AddedField ¶
func (m *UserInfoMutation) 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 (*UserInfoMutation) AddedFields ¶
func (m *UserInfoMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserInfoMutation) AddedIDs ¶
func (m *UserInfoMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserInfoMutation) ClearEdge ¶
func (m *UserInfoMutation) 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 (*UserInfoMutation) ClearField ¶
func (m *UserInfoMutation) 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 (*UserInfoMutation) ClearedEdges ¶
func (m *UserInfoMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserInfoMutation) ClearedFields ¶
func (m *UserInfoMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserInfoMutation) Client ¶
func (m UserInfoMutation) 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 (*UserInfoMutation) EdgeCleared ¶
func (m *UserInfoMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserInfoMutation) Field ¶
func (m *UserInfoMutation) 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 (*UserInfoMutation) FieldCleared ¶
func (m *UserInfoMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserInfoMutation) Fields ¶
func (m *UserInfoMutation) 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 (*UserInfoMutation) ID ¶
func (m *UserInfoMutation) 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 or after it was returned from the database.
func (*UserInfoMutation) IDs ¶
func (m *UserInfoMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserInfoMutation) 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 (*UserInfoMutation) OldPasswdHash ¶
func (m *UserInfoMutation) OldPasswdHash(ctx context.Context) (v string, err error)
OldPasswdHash returns the old "passwd_hash" field's value of the User_info entity. If the User_info 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 (*UserInfoMutation) OldSalt ¶
func (m *UserInfoMutation) OldSalt(ctx context.Context) (v string, err error)
OldSalt returns the old "salt" field's value of the User_info entity. If the User_info 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 (*UserInfoMutation) OldUserName ¶
func (m *UserInfoMutation) OldUserName(ctx context.Context) (v string, err error)
OldUserName returns the old "user_name" field's value of the User_info entity. If the User_info 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 (*UserInfoMutation) PasswdHash ¶
func (m *UserInfoMutation) PasswdHash() (r string, exists bool)
PasswdHash returns the value of the "passwd_hash" field in the mutation.
func (*UserInfoMutation) RemovedEdges ¶
func (m *UserInfoMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserInfoMutation) RemovedIDs ¶
func (m *UserInfoMutation) 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 (*UserInfoMutation) ResetEdge ¶
func (m *UserInfoMutation) 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 (*UserInfoMutation) ResetField ¶
func (m *UserInfoMutation) 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 (*UserInfoMutation) ResetPasswdHash ¶
func (m *UserInfoMutation) ResetPasswdHash()
ResetPasswdHash resets all changes to the "passwd_hash" field.
func (*UserInfoMutation) ResetSalt ¶
func (m *UserInfoMutation) ResetSalt()
ResetSalt resets all changes to the "salt" field.
func (*UserInfoMutation) ResetUserName ¶
func (m *UserInfoMutation) ResetUserName()
ResetUserName resets all changes to the "user_name" field.
func (*UserInfoMutation) Salt ¶
func (m *UserInfoMutation) Salt() (r string, exists bool)
Salt returns the value of the "salt" field in the mutation.
func (*UserInfoMutation) SetField ¶
func (m *UserInfoMutation) 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 (*UserInfoMutation) SetPasswdHash ¶
func (m *UserInfoMutation) SetPasswdHash(s string)
SetPasswdHash sets the "passwd_hash" field.
func (*UserInfoMutation) SetSalt ¶
func (m *UserInfoMutation) SetSalt(s string)
SetSalt sets the "salt" field.
func (*UserInfoMutation) SetUserName ¶
func (m *UserInfoMutation) SetUserName(s string)
SetUserName sets the "user_name" field.
func (UserInfoMutation) Tx ¶
func (m UserInfoMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserInfoMutation) Type ¶
func (m *UserInfoMutation) Type() string
Type returns the node type of this mutation (User_info).
func (*UserInfoMutation) UserName ¶
func (m *UserInfoMutation) UserName() (r string, exists bool)
UserName returns the value of the "user_name" field in the mutation.
func (*UserInfoMutation) Where ¶
func (m *UserInfoMutation) Where(ps ...predicate.User_info)
Where appends a list predicates to the UserInfoMutation builder.
type UserInfoQuery ¶
type UserInfoQuery struct {
// contains filtered or unexported fields
}
UserInfoQuery is the builder for querying User_info entities.
func (*UserInfoQuery) All ¶
func (uiq *UserInfoQuery) All(ctx context.Context) ([]*User_info, error)
All executes the query and returns a list of User_infos.
func (*UserInfoQuery) AllX ¶
func (uiq *UserInfoQuery) AllX(ctx context.Context) []*User_info
AllX is like All, but panics if an error occurs.
func (*UserInfoQuery) Clone ¶
func (uiq *UserInfoQuery) Clone() *UserInfoQuery
Clone returns a duplicate of the UserInfoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserInfoQuery) Count ¶
func (uiq *UserInfoQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserInfoQuery) CountX ¶
func (uiq *UserInfoQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserInfoQuery) Exist ¶
func (uiq *UserInfoQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserInfoQuery) ExistX ¶
func (uiq *UserInfoQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserInfoQuery) First ¶
func (uiq *UserInfoQuery) First(ctx context.Context) (*User_info, error)
First returns the first User_info entity from the query. Returns a *NotFoundError when no User_info was found.
func (*UserInfoQuery) FirstID ¶
func (uiq *UserInfoQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first User_info ID from the query. Returns a *NotFoundError when no User_info ID was found.
func (*UserInfoQuery) FirstIDX ¶
func (uiq *UserInfoQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserInfoQuery) FirstX ¶
func (uiq *UserInfoQuery) FirstX(ctx context.Context) *User_info
FirstX is like First, but panics if an error occurs.
func (*UserInfoQuery) GroupBy ¶
func (uiq *UserInfoQuery) GroupBy(field string, fields ...string) *UserInfoGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UserName string `json:"user_name,omitempty"` Count int `json:"count,omitempty"` } client.UserInfo.Query(). GroupBy(user_info.FieldUserName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserInfoQuery) IDs ¶
func (uiq *UserInfoQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of User_info IDs.
func (*UserInfoQuery) IDsX ¶
func (uiq *UserInfoQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserInfoQuery) Limit ¶
func (uiq *UserInfoQuery) Limit(limit int) *UserInfoQuery
Limit adds a limit step to the query.
func (*UserInfoQuery) Offset ¶
func (uiq *UserInfoQuery) Offset(offset int) *UserInfoQuery
Offset adds an offset step to the query.
func (*UserInfoQuery) Only ¶
func (uiq *UserInfoQuery) Only(ctx context.Context) (*User_info, error)
Only returns a single User_info entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User_info entity is found. Returns a *NotFoundError when no User_info entities are found.
func (*UserInfoQuery) OnlyID ¶
func (uiq *UserInfoQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only User_info ID in the query. Returns a *NotSingularError when more than one User_info ID is found. Returns a *NotFoundError when no entities are found.
func (*UserInfoQuery) OnlyIDX ¶
func (uiq *UserInfoQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserInfoQuery) OnlyX ¶
func (uiq *UserInfoQuery) OnlyX(ctx context.Context) *User_info
OnlyX is like Only, but panics if an error occurs.
func (*UserInfoQuery) Order ¶
func (uiq *UserInfoQuery) Order(o ...OrderFunc) *UserInfoQuery
Order adds an order step to the query.
func (*UserInfoQuery) Select ¶
func (uiq *UserInfoQuery) Select(fields ...string) *UserInfoSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { UserName string `json:"user_name,omitempty"` } client.UserInfo.Query(). Select(user_info.FieldUserName). Scan(ctx, &v)
func (*UserInfoQuery) Unique ¶
func (uiq *UserInfoQuery) Unique(unique bool) *UserInfoQuery
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 (*UserInfoQuery) Where ¶
func (uiq *UserInfoQuery) Where(ps ...predicate.User_info) *UserInfoQuery
Where adds a new predicate for the UserInfoQuery builder.
type UserInfoSelect ¶
type UserInfoSelect struct { *UserInfoQuery // contains filtered or unexported fields }
UserInfoSelect is the builder for selecting fields of UserInfo entities.
func (*UserInfoSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserInfoSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserInfoSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserInfoSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserInfoSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserInfoSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserInfoSelect) Scan ¶
func (uis *UserInfoSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserInfoSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserInfoUpdate ¶
type UserInfoUpdate struct {
// contains filtered or unexported fields
}
UserInfoUpdate is the builder for updating User_info entities.
func (*UserInfoUpdate) Exec ¶
func (uiu *UserInfoUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserInfoUpdate) ExecX ¶
func (uiu *UserInfoUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserInfoUpdate) Mutation ¶
func (uiu *UserInfoUpdate) Mutation() *UserInfoMutation
Mutation returns the UserInfoMutation object of the builder.
func (*UserInfoUpdate) Save ¶
func (uiu *UserInfoUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserInfoUpdate) SaveX ¶
func (uiu *UserInfoUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserInfoUpdate) SetPasswdHash ¶
func (uiu *UserInfoUpdate) SetPasswdHash(s string) *UserInfoUpdate
SetPasswdHash sets the "passwd_hash" field.
func (*UserInfoUpdate) SetSalt ¶
func (uiu *UserInfoUpdate) SetSalt(s string) *UserInfoUpdate
SetSalt sets the "salt" field.
func (*UserInfoUpdate) SetUserName ¶
func (uiu *UserInfoUpdate) SetUserName(s string) *UserInfoUpdate
SetUserName sets the "user_name" field.
func (*UserInfoUpdate) Where ¶
func (uiu *UserInfoUpdate) Where(ps ...predicate.User_info) *UserInfoUpdate
Where appends a list predicates to the UserInfoUpdate builder.
type UserInfoUpdateOne ¶
type UserInfoUpdateOne struct {
// contains filtered or unexported fields
}
UserInfoUpdateOne is the builder for updating a single User_info entity.
func (*UserInfoUpdateOne) Exec ¶
func (uiuo *UserInfoUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserInfoUpdateOne) ExecX ¶
func (uiuo *UserInfoUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserInfoUpdateOne) Mutation ¶
func (uiuo *UserInfoUpdateOne) Mutation() *UserInfoMutation
Mutation returns the UserInfoMutation object of the builder.
func (*UserInfoUpdateOne) Save ¶
func (uiuo *UserInfoUpdateOne) Save(ctx context.Context) (*User_info, error)
Save executes the query and returns the updated User_info entity.
func (*UserInfoUpdateOne) SaveX ¶
func (uiuo *UserInfoUpdateOne) SaveX(ctx context.Context) *User_info
SaveX is like Save, but panics if an error occurs.
func (*UserInfoUpdateOne) Select ¶
func (uiuo *UserInfoUpdateOne) Select(field string, fields ...string) *UserInfoUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserInfoUpdateOne) SetPasswdHash ¶
func (uiuo *UserInfoUpdateOne) SetPasswdHash(s string) *UserInfoUpdateOne
SetPasswdHash sets the "passwd_hash" field.
func (*UserInfoUpdateOne) SetSalt ¶
func (uiuo *UserInfoUpdateOne) SetSalt(s string) *UserInfoUpdateOne
SetSalt sets the "salt" field.
func (*UserInfoUpdateOne) SetUserName ¶
func (uiuo *UserInfoUpdateOne) SetUserName(s string) *UserInfoUpdateOne
SetUserName sets the "user_name" field.
type UserJobCreate ¶
type UserJobCreate struct {
// contains filtered or unexported fields
}
UserJobCreate is the builder for creating a User_job entity.
func (*UserJobCreate) Exec ¶
func (ujc *UserJobCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserJobCreate) ExecX ¶
func (ujc *UserJobCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserJobCreate) Mutation ¶
func (ujc *UserJobCreate) Mutation() *UserJobMutation
Mutation returns the UserJobMutation object of the builder.
func (*UserJobCreate) Save ¶
func (ujc *UserJobCreate) Save(ctx context.Context) (*User_job, error)
Save creates the User_job in the database.
func (*UserJobCreate) SaveX ¶
func (ujc *UserJobCreate) SaveX(ctx context.Context) *User_job
SaveX calls Save and panics if Save returns an error.
func (*UserJobCreate) SetCreateTime ¶
func (ujc *UserJobCreate) SetCreateTime(t time.Time) *UserJobCreate
SetCreateTime sets the "create_time" field.
func (*UserJobCreate) SetJobID ¶
func (ujc *UserJobCreate) SetJobID(i int64) *UserJobCreate
SetJobID sets the "job_id" field.
func (*UserJobCreate) SetNillableCreateTime ¶
func (ujc *UserJobCreate) SetNillableCreateTime(t *time.Time) *UserJobCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserJobCreate) SetNillableUpdateTime ¶
func (ujc *UserJobCreate) SetNillableUpdateTime(t *time.Time) *UserJobCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UserJobCreate) SetUpdateTime ¶
func (ujc *UserJobCreate) SetUpdateTime(t time.Time) *UserJobCreate
SetUpdateTime sets the "update_time" field.
func (*UserJobCreate) SetUserID ¶
func (ujc *UserJobCreate) SetUserID(i int64) *UserJobCreate
SetUserID sets the "user_id" field.
type UserJobCreateBulk ¶
type UserJobCreateBulk struct {
// contains filtered or unexported fields
}
UserJobCreateBulk is the builder for creating many User_job entities in bulk.
func (*UserJobCreateBulk) Exec ¶
func (ujcb *UserJobCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserJobCreateBulk) ExecX ¶
func (ujcb *UserJobCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserJobDelete ¶
type UserJobDelete struct {
// contains filtered or unexported fields
}
UserJobDelete is the builder for deleting a User_job entity.
func (*UserJobDelete) Exec ¶
func (ujd *UserJobDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserJobDelete) ExecX ¶
func (ujd *UserJobDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserJobDelete) Where ¶
func (ujd *UserJobDelete) Where(ps ...predicate.User_job) *UserJobDelete
Where appends a list predicates to the UserJobDelete builder.
type UserJobDeleteOne ¶
type UserJobDeleteOne struct {
// contains filtered or unexported fields
}
UserJobDeleteOne is the builder for deleting a single User_job entity.
func (*UserJobDeleteOne) Exec ¶
func (ujdo *UserJobDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserJobDeleteOne) ExecX ¶
func (ujdo *UserJobDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserJobGroupBy ¶
type UserJobGroupBy struct {
// contains filtered or unexported fields
}
UserJobGroupBy is the group-by builder for User_job entities.
func (*UserJobGroupBy) Aggregate ¶
func (ujgb *UserJobGroupBy) Aggregate(fns ...AggregateFunc) *UserJobGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserJobGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserJobGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserJobGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserJobGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserJobGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserJobGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserJobGroupBy) Scan ¶
func (ujgb *UserJobGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*UserJobGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserJobMutation ¶
type UserJobMutation struct {
// contains filtered or unexported fields
}
UserJobMutation represents an operation that mutates the User_job nodes in the graph.
func (*UserJobMutation) AddField ¶
func (m *UserJobMutation) 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 (*UserJobMutation) AddJobID ¶
func (m *UserJobMutation) AddJobID(i int64)
AddJobID adds i to the "job_id" field.
func (*UserJobMutation) AddUserID ¶
func (m *UserJobMutation) AddUserID(i int64)
AddUserID adds i to the "user_id" field.
func (*UserJobMutation) AddedEdges ¶
func (m *UserJobMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserJobMutation) AddedField ¶
func (m *UserJobMutation) 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 (*UserJobMutation) AddedFields ¶
func (m *UserJobMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserJobMutation) AddedIDs ¶
func (m *UserJobMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserJobMutation) AddedJobID ¶
func (m *UserJobMutation) AddedJobID() (r int64, exists bool)
AddedJobID returns the value that was added to the "job_id" field in this mutation.
func (*UserJobMutation) AddedUserID ¶
func (m *UserJobMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*UserJobMutation) ClearEdge ¶
func (m *UserJobMutation) 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 (*UserJobMutation) ClearField ¶
func (m *UserJobMutation) 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 (*UserJobMutation) ClearedEdges ¶
func (m *UserJobMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserJobMutation) ClearedFields ¶
func (m *UserJobMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserJobMutation) Client ¶
func (m UserJobMutation) 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 (*UserJobMutation) CreateTime ¶
func (m *UserJobMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UserJobMutation) EdgeCleared ¶
func (m *UserJobMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserJobMutation) Field ¶
func (m *UserJobMutation) 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 (*UserJobMutation) FieldCleared ¶
func (m *UserJobMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserJobMutation) Fields ¶
func (m *UserJobMutation) 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 (*UserJobMutation) ID ¶
func (m *UserJobMutation) 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 or after it was returned from the database.
func (*UserJobMutation) IDs ¶
func (m *UserJobMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserJobMutation) JobID ¶
func (m *UserJobMutation) JobID() (r int64, exists bool)
JobID returns the value of the "job_id" field in the mutation.
func (*UserJobMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the User_job entity. If the User_job 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 (*UserJobMutation) 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 (*UserJobMutation) OldJobID ¶
func (m *UserJobMutation) OldJobID(ctx context.Context) (v int64, err error)
OldJobID returns the old "job_id" field's value of the User_job entity. If the User_job 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 (*UserJobMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the User_job entity. If the User_job 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 (*UserJobMutation) OldUserID ¶
func (m *UserJobMutation) OldUserID(ctx context.Context) (v int64, err error)
OldUserID returns the old "user_id" field's value of the User_job entity. If the User_job 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 (*UserJobMutation) RemovedEdges ¶
func (m *UserJobMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserJobMutation) RemovedIDs ¶
func (m *UserJobMutation) 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 (*UserJobMutation) ResetCreateTime ¶
func (m *UserJobMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UserJobMutation) ResetEdge ¶
func (m *UserJobMutation) 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 (*UserJobMutation) ResetField ¶
func (m *UserJobMutation) 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 (*UserJobMutation) ResetJobID ¶
func (m *UserJobMutation) ResetJobID()
ResetJobID resets all changes to the "job_id" field.
func (*UserJobMutation) ResetUpdateTime ¶
func (m *UserJobMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserJobMutation) ResetUserID ¶
func (m *UserJobMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserJobMutation) SetCreateTime ¶
func (m *UserJobMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UserJobMutation) SetField ¶
func (m *UserJobMutation) 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 (*UserJobMutation) SetJobID ¶
func (m *UserJobMutation) SetJobID(i int64)
SetJobID sets the "job_id" field.
func (*UserJobMutation) SetUpdateTime ¶
func (m *UserJobMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserJobMutation) SetUserID ¶
func (m *UserJobMutation) SetUserID(i int64)
SetUserID sets the "user_id" field.
func (UserJobMutation) Tx ¶
func (m UserJobMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserJobMutation) Type ¶
func (m *UserJobMutation) Type() string
Type returns the node type of this mutation (User_job).
func (*UserJobMutation) UpdateTime ¶
func (m *UserJobMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UserJobMutation) UserID ¶
func (m *UserJobMutation) UserID() (r int64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*UserJobMutation) Where ¶
func (m *UserJobMutation) Where(ps ...predicate.User_job)
Where appends a list predicates to the UserJobMutation builder.
type UserJobQuery ¶
type UserJobQuery struct {
// contains filtered or unexported fields
}
UserJobQuery is the builder for querying User_job entities.
func (*UserJobQuery) All ¶
func (ujq *UserJobQuery) All(ctx context.Context) ([]*User_job, error)
All executes the query and returns a list of User_jobs.
func (*UserJobQuery) AllX ¶
func (ujq *UserJobQuery) AllX(ctx context.Context) []*User_job
AllX is like All, but panics if an error occurs.
func (*UserJobQuery) Clone ¶
func (ujq *UserJobQuery) Clone() *UserJobQuery
Clone returns a duplicate of the UserJobQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserJobQuery) Count ¶
func (ujq *UserJobQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserJobQuery) CountX ¶
func (ujq *UserJobQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserJobQuery) Exist ¶
func (ujq *UserJobQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserJobQuery) ExistX ¶
func (ujq *UserJobQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserJobQuery) First ¶
func (ujq *UserJobQuery) First(ctx context.Context) (*User_job, error)
First returns the first User_job entity from the query. Returns a *NotFoundError when no User_job was found.
func (*UserJobQuery) FirstID ¶
func (ujq *UserJobQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first User_job ID from the query. Returns a *NotFoundError when no User_job ID was found.
func (*UserJobQuery) FirstIDX ¶
func (ujq *UserJobQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserJobQuery) FirstX ¶
func (ujq *UserJobQuery) FirstX(ctx context.Context) *User_job
FirstX is like First, but panics if an error occurs.
func (*UserJobQuery) GroupBy ¶
func (ujq *UserJobQuery) GroupBy(field string, fields ...string) *UserJobGroupBy
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 { JobID int64 `json:"job_id,omitempty"` Count int `json:"count,omitempty"` } client.UserJob.Query(). GroupBy(user_job.FieldJobID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserJobQuery) IDs ¶
func (ujq *UserJobQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of User_job IDs.
func (*UserJobQuery) IDsX ¶
func (ujq *UserJobQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserJobQuery) Limit ¶
func (ujq *UserJobQuery) Limit(limit int) *UserJobQuery
Limit adds a limit step to the query.
func (*UserJobQuery) Offset ¶
func (ujq *UserJobQuery) Offset(offset int) *UserJobQuery
Offset adds an offset step to the query.
func (*UserJobQuery) Only ¶
func (ujq *UserJobQuery) Only(ctx context.Context) (*User_job, error)
Only returns a single User_job entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User_job entity is found. Returns a *NotFoundError when no User_job entities are found.
func (*UserJobQuery) OnlyID ¶
func (ujq *UserJobQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only User_job ID in the query. Returns a *NotSingularError when more than one User_job ID is found. Returns a *NotFoundError when no entities are found.
func (*UserJobQuery) OnlyIDX ¶
func (ujq *UserJobQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserJobQuery) OnlyX ¶
func (ujq *UserJobQuery) OnlyX(ctx context.Context) *User_job
OnlyX is like Only, but panics if an error occurs.
func (*UserJobQuery) Order ¶
func (ujq *UserJobQuery) Order(o ...OrderFunc) *UserJobQuery
Order adds an order step to the query.
func (*UserJobQuery) Select ¶
func (ujq *UserJobQuery) Select(fields ...string) *UserJobSelect
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 { JobID int64 `json:"job_id,omitempty"` } client.UserJob.Query(). Select(user_job.FieldJobID). Scan(ctx, &v)
func (*UserJobQuery) Unique ¶
func (ujq *UserJobQuery) Unique(unique bool) *UserJobQuery
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 (*UserJobQuery) Where ¶
func (ujq *UserJobQuery) Where(ps ...predicate.User_job) *UserJobQuery
Where adds a new predicate for the UserJobQuery builder.
type UserJobSelect ¶
type UserJobSelect struct { *UserJobQuery // contains filtered or unexported fields }
UserJobSelect is the builder for selecting fields of UserJob entities.
func (*UserJobSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserJobSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserJobSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserJobSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserJobSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserJobSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserJobSelect) Scan ¶
func (ujs *UserJobSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserJobSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserJobUpdate ¶
type UserJobUpdate struct {
// contains filtered or unexported fields
}
UserJobUpdate is the builder for updating User_job entities.
func (*UserJobUpdate) AddJobID ¶
func (uju *UserJobUpdate) AddJobID(i int64) *UserJobUpdate
AddJobID adds i to the "job_id" field.
func (*UserJobUpdate) AddUserID ¶
func (uju *UserJobUpdate) AddUserID(i int64) *UserJobUpdate
AddUserID adds i to the "user_id" field.
func (*UserJobUpdate) Exec ¶
func (uju *UserJobUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserJobUpdate) ExecX ¶
func (uju *UserJobUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserJobUpdate) Mutation ¶
func (uju *UserJobUpdate) Mutation() *UserJobMutation
Mutation returns the UserJobMutation object of the builder.
func (*UserJobUpdate) Save ¶
func (uju *UserJobUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserJobUpdate) SaveX ¶
func (uju *UserJobUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserJobUpdate) SetCreateTime ¶
func (uju *UserJobUpdate) SetCreateTime(t time.Time) *UserJobUpdate
SetCreateTime sets the "create_time" field.
func (*UserJobUpdate) SetJobID ¶
func (uju *UserJobUpdate) SetJobID(i int64) *UserJobUpdate
SetJobID sets the "job_id" field.
func (*UserJobUpdate) SetNillableCreateTime ¶
func (uju *UserJobUpdate) SetNillableCreateTime(t *time.Time) *UserJobUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserJobUpdate) SetUpdateTime ¶
func (uju *UserJobUpdate) SetUpdateTime(t time.Time) *UserJobUpdate
SetUpdateTime sets the "update_time" field.
func (*UserJobUpdate) SetUserID ¶
func (uju *UserJobUpdate) SetUserID(i int64) *UserJobUpdate
SetUserID sets the "user_id" field.
func (*UserJobUpdate) Where ¶
func (uju *UserJobUpdate) Where(ps ...predicate.User_job) *UserJobUpdate
Where appends a list predicates to the UserJobUpdate builder.
type UserJobUpdateOne ¶
type UserJobUpdateOne struct {
// contains filtered or unexported fields
}
UserJobUpdateOne is the builder for updating a single User_job entity.
func (*UserJobUpdateOne) AddJobID ¶
func (ujuo *UserJobUpdateOne) AddJobID(i int64) *UserJobUpdateOne
AddJobID adds i to the "job_id" field.
func (*UserJobUpdateOne) AddUserID ¶
func (ujuo *UserJobUpdateOne) AddUserID(i int64) *UserJobUpdateOne
AddUserID adds i to the "user_id" field.
func (*UserJobUpdateOne) Exec ¶
func (ujuo *UserJobUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserJobUpdateOne) ExecX ¶
func (ujuo *UserJobUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserJobUpdateOne) Mutation ¶
func (ujuo *UserJobUpdateOne) Mutation() *UserJobMutation
Mutation returns the UserJobMutation object of the builder.
func (*UserJobUpdateOne) Save ¶
func (ujuo *UserJobUpdateOne) Save(ctx context.Context) (*User_job, error)
Save executes the query and returns the updated User_job entity.
func (*UserJobUpdateOne) SaveX ¶
func (ujuo *UserJobUpdateOne) SaveX(ctx context.Context) *User_job
SaveX is like Save, but panics if an error occurs.
func (*UserJobUpdateOne) Select ¶
func (ujuo *UserJobUpdateOne) Select(field string, fields ...string) *UserJobUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserJobUpdateOne) SetCreateTime ¶
func (ujuo *UserJobUpdateOne) SetCreateTime(t time.Time) *UserJobUpdateOne
SetCreateTime sets the "create_time" field.
func (*UserJobUpdateOne) SetJobID ¶
func (ujuo *UserJobUpdateOne) SetJobID(i int64) *UserJobUpdateOne
SetJobID sets the "job_id" field.
func (*UserJobUpdateOne) SetNillableCreateTime ¶
func (ujuo *UserJobUpdateOne) SetNillableCreateTime(t *time.Time) *UserJobUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserJobUpdateOne) SetUpdateTime ¶
func (ujuo *UserJobUpdateOne) SetUpdateTime(t time.Time) *UserJobUpdateOne
SetUpdateTime sets the "update_time" field.
func (*UserJobUpdateOne) SetUserID ¶
func (ujuo *UserJobUpdateOne) SetUserID(i int64) *UserJobUpdateOne
SetUserID sets the "user_id" field.
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) AddRole ¶
func (m *UserMutation) AddRole(i int8)
AddRole adds i to the "role" field.
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) AddedRole ¶
func (m *UserMutation) AddedRole() (r int8, exists bool)
AddedRole returns the value that was added to the "role" field in this mutation.
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) 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) 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 or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) IsExist ¶
func (m *UserMutation) IsExist() (r bool, exists bool)
IsExist returns the value of the "is_exist" 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) 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) OldIsExist ¶
func (m *UserMutation) OldIsExist(ctx context.Context) (v bool, err error)
OldIsExist returns the old "is_exist" 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) OldRole ¶
func (m *UserMutation) OldRole(ctx context.Context) (v int8, err error)
OldRole returns the old "role" 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) OldUserName ¶
func (m *UserMutation) OldUserName(ctx context.Context) (v string, err error)
OldUserName returns the old "user_name" 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) OldUserTitle ¶
func (m *UserMutation) OldUserTitle(ctx context.Context) (v string, err error)
OldUserTitle returns the old "user_title" 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) 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) ResetCreateTime ¶
func (m *UserMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_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) ResetIsExist ¶
func (m *UserMutation) ResetIsExist()
ResetIsExist resets all changes to the "is_exist" field.
func (*UserMutation) ResetRole ¶
func (m *UserMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*UserMutation) ResetUpdateTime ¶
func (m *UserMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UserMutation) ResetUserName ¶
func (m *UserMutation) ResetUserName()
ResetUserName resets all changes to the "user_name" field.
func (*UserMutation) ResetUserTitle ¶
func (m *UserMutation) ResetUserTitle()
ResetUserTitle resets all changes to the "user_title" field.
func (*UserMutation) Role ¶
func (m *UserMutation) Role() (r int8, exists bool)
Role returns the value of the "role" field in the mutation.
func (*UserMutation) SetCreateTime ¶
func (m *UserMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_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) SetIsExist ¶
func (m *UserMutation) SetIsExist(b bool)
SetIsExist sets the "is_exist" field.
func (*UserMutation) SetRole ¶
func (m *UserMutation) SetRole(i int8)
SetRole sets the "role" field.
func (*UserMutation) SetUpdateTime ¶
func (m *UserMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UserMutation) SetUserName ¶
func (m *UserMutation) SetUserName(s string)
SetUserName sets the "user_name" field.
func (*UserMutation) SetUserTitle ¶
func (m *UserMutation) SetUserTitle(s string)
SetUserTitle sets the "user_title" field.
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) UserName ¶
func (m *UserMutation) UserName() (r string, exists bool)
UserName returns the value of the "user_name" field in the mutation.
func (*UserMutation) UserTitle ¶
func (m *UserMutation) UserTitle() (r string, exists bool)
UserTitle returns the value of the "user_title" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
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 { Role int8 `json:"role,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldRole). Aggregate(ent.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 more than one User entity is 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 more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(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 { Role int8 `json:"role,omitempty"` } client.User.Query(). Select(user.FieldRole). Scan(ctx, &v)
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddRole ¶
func (uu *UserUpdate) AddRole(i int8) *UserUpdate
AddRole adds i to the "role" field.
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) 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) SetCreateTime ¶
func (uu *UserUpdate) SetCreateTime(t time.Time) *UserUpdate
SetCreateTime sets the "create_time" field.
func (*UserUpdate) SetIsExist ¶
func (uu *UserUpdate) SetIsExist(b bool) *UserUpdate
SetIsExist sets the "is_exist" field.
func (*UserUpdate) SetNillableCreateTime ¶
func (uu *UserUpdate) SetNillableCreateTime(t *time.Time) *UserUpdate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserUpdate) SetNillableIsExist ¶
func (uu *UserUpdate) SetNillableIsExist(b *bool) *UserUpdate
SetNillableIsExist sets the "is_exist" field if the given value is not nil.
func (*UserUpdate) SetNillableRole ¶
func (uu *UserUpdate) SetNillableRole(i *int8) *UserUpdate
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserUpdate) SetRole ¶
func (uu *UserUpdate) SetRole(i int8) *UserUpdate
SetRole sets the "role" field.
func (*UserUpdate) SetUpdateTime ¶
func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate
SetUpdateTime sets the "update_time" field.
func (*UserUpdate) SetUserName ¶
func (uu *UserUpdate) SetUserName(s string) *UserUpdate
SetUserName sets the "user_name" field.
func (*UserUpdate) SetUserTitle ¶
func (uu *UserUpdate) SetUserTitle(s string) *UserUpdate
SetUserTitle sets the "user_title" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to 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) AddRole ¶
func (uuo *UserUpdateOne) AddRole(i int8) *UserUpdateOne
AddRole adds i to the "role" field.
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) 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) SetCreateTime ¶
func (uuo *UserUpdateOne) SetCreateTime(t time.Time) *UserUpdateOne
SetCreateTime sets the "create_time" field.
func (*UserUpdateOne) SetIsExist ¶
func (uuo *UserUpdateOne) SetIsExist(b bool) *UserUpdateOne
SetIsExist sets the "is_exist" field.
func (*UserUpdateOne) SetNillableCreateTime ¶
func (uuo *UserUpdateOne) SetNillableCreateTime(t *time.Time) *UserUpdateOne
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIsExist ¶
func (uuo *UserUpdateOne) SetNillableIsExist(b *bool) *UserUpdateOne
SetNillableIsExist sets the "is_exist" field if the given value is not nil.
func (*UserUpdateOne) SetNillableRole ¶
func (uuo *UserUpdateOne) SetNillableRole(i *int8) *UserUpdateOne
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserUpdateOne) SetRole ¶
func (uuo *UserUpdateOne) SetRole(i int8) *UserUpdateOne
SetRole sets the "role" field.
func (*UserUpdateOne) SetUpdateTime ¶
func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne
SetUpdateTime sets the "update_time" field.
func (*UserUpdateOne) SetUserName ¶
func (uuo *UserUpdateOne) SetUserName(s string) *UserUpdateOne
SetUserName sets the "user_name" field.
func (*UserUpdateOne) SetUserTitle ¶
func (uuo *UserUpdateOne) SetUserTitle(s string) *UserUpdateOne
SetUserTitle sets the "user_title" field.
type User_info ¶
type User_info struct { // ID of the ent. ID int `json:"id,omitempty"` // user_name UserName string `json:"user_name,omitempty"` // salt will with passwd hash to result Salt string `json:"salt,omitempty"` // passwd hash res PasswdHash string `json:"passwd_hash,omitempty"` // contains filtered or unexported fields }
User_info is the model entity for the User_info schema.
func (*User_info) Unwrap ¶
Unwrap unwraps the User_info 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_info) Update ¶
func (ui *User_info) Update() *UserInfoUpdateOne
Update returns a builder for updating this User_info. Note that you need to call User_info.Unwrap() before calling this method if this User_info was returned from a transaction, and the transaction was committed or rolled back.
type User_infoClient ¶
type User_infoClient struct {
// contains filtered or unexported fields
}
User_infoClient is a client for the User_info schema.
func NewUser_infoClient ¶
func NewUser_infoClient(c config) *User_infoClient
NewUser_infoClient returns a client for the User_info from the given config.
func (*User_infoClient) Create ¶
func (c *User_infoClient) Create() *UserInfoCreate
Create returns a builder for creating a User_info entity.
func (*User_infoClient) CreateBulk ¶
func (c *User_infoClient) CreateBulk(builders ...*UserInfoCreate) *UserInfoCreateBulk
CreateBulk returns a builder for creating a bulk of User_info entities.
func (*User_infoClient) Delete ¶
func (c *User_infoClient) Delete() *UserInfoDelete
Delete returns a delete builder for User_info.
func (*User_infoClient) DeleteOne ¶
func (c *User_infoClient) DeleteOne(ui *User_info) *UserInfoDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*User_infoClient) DeleteOneID ¶
func (c *User_infoClient) DeleteOneID(id int) *UserInfoDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*User_infoClient) GetX ¶
func (c *User_infoClient) GetX(ctx context.Context, id int) *User_info
GetX is like Get, but panics if an error occurs.
func (*User_infoClient) Hooks ¶
func (c *User_infoClient) Hooks() []Hook
Hooks returns the client hooks.
func (*User_infoClient) Query ¶
func (c *User_infoClient) Query() *UserInfoQuery
Query returns a query builder for User_info.
func (*User_infoClient) Update ¶
func (c *User_infoClient) Update() *UserInfoUpdate
Update returns an update builder for User_info.
func (*User_infoClient) UpdateOne ¶
func (c *User_infoClient) UpdateOne(ui *User_info) *UserInfoUpdateOne
UpdateOne returns an update builder for the given entity.
func (*User_infoClient) UpdateOneID ¶
func (c *User_infoClient) UpdateOneID(id int) *UserInfoUpdateOne
UpdateOneID returns an update builder for the given id.
func (*User_infoClient) Use ¶
func (c *User_infoClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user_info.Hooks(f(g(h())))`.
type User_job ¶
type User_job struct { // ID of the ent. ID int `json:"id,omitempty"` // job id,unique for same user id JobID int64 `json:"job_id,omitempty"` // user id UserID int64 `json:"user_id,omitempty"` // create_time CreateTime time.Time `json:"create_time,omitempty"` // update_time UpdateTime time.Time `json:"update_time,omitempty"` // contains filtered or unexported fields }
User_job is the model entity for the User_job schema.
func (*User_job) Unwrap ¶
Unwrap unwraps the User_job 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_job) Update ¶
func (uj *User_job) Update() *UserJobUpdateOne
Update returns a builder for updating this User_job. Note that you need to call User_job.Unwrap() before calling this method if this User_job was returned from a transaction, and the transaction was committed or rolled back.
type User_jobClient ¶
type User_jobClient struct {
// contains filtered or unexported fields
}
User_jobClient is a client for the User_job schema.
func NewUser_jobClient ¶
func NewUser_jobClient(c config) *User_jobClient
NewUser_jobClient returns a client for the User_job from the given config.
func (*User_jobClient) Create ¶
func (c *User_jobClient) Create() *UserJobCreate
Create returns a builder for creating a User_job entity.
func (*User_jobClient) CreateBulk ¶
func (c *User_jobClient) CreateBulk(builders ...*UserJobCreate) *UserJobCreateBulk
CreateBulk returns a builder for creating a bulk of User_job entities.
func (*User_jobClient) Delete ¶
func (c *User_jobClient) Delete() *UserJobDelete
Delete returns a delete builder for User_job.
func (*User_jobClient) DeleteOne ¶
func (c *User_jobClient) DeleteOne(uj *User_job) *UserJobDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*User_jobClient) DeleteOneID ¶
func (c *User_jobClient) DeleteOneID(id int) *UserJobDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*User_jobClient) GetX ¶
func (c *User_jobClient) GetX(ctx context.Context, id int) *User_job
GetX is like Get, but panics if an error occurs.
func (*User_jobClient) Hooks ¶
func (c *User_jobClient) Hooks() []Hook
Hooks returns the client hooks.
func (*User_jobClient) Query ¶
func (c *User_jobClient) Query() *UserJobQuery
Query returns a query builder for User_job.
func (*User_jobClient) Update ¶
func (c *User_jobClient) Update() *UserJobUpdate
Update returns an update builder for User_job.
func (*User_jobClient) UpdateOne ¶
func (c *User_jobClient) UpdateOne(uj *User_job) *UserJobUpdateOne
UpdateOne returns an update builder for the given entity.
func (*User_jobClient) UpdateOneID ¶
func (c *User_jobClient) UpdateOneID(id int) *UserJobUpdateOne
UpdateOneID returns an update builder for the given id.
func (*User_jobClient) Use ¶
func (c *User_jobClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user_job.Hooks(f(g(h())))`.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- job.go
- job_create.go
- job_delete.go
- job_query.go
- job_update.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_info.go
- user_info_create.go
- user_info_delete.go
- user_info_query.go
- user_info_update.go
- user_job.go
- user_job_create.go
- user_job_delete.go
- user_job_query.go
- user_job_update.go
- user_query.go
- user_update.go