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 MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type Resume
- type ResumeClient
- func (c *ResumeClient) Create() *ResumeCreate
- func (c *ResumeClient) CreateBulk(builders ...*ResumeCreate) *ResumeCreateBulk
- func (c *ResumeClient) Delete() *ResumeDelete
- func (c *ResumeClient) DeleteOne(r *Resume) *ResumeDeleteOne
- func (c *ResumeClient) DeleteOneID(id int) *ResumeDeleteOne
- func (c *ResumeClient) Get(ctx context.Context, id int) (*Resume, error)
- func (c *ResumeClient) GetX(ctx context.Context, id int) *Resume
- func (c *ResumeClient) Hooks() []Hook
- func (c *ResumeClient) Query() *ResumeQuery
- func (c *ResumeClient) QueryOwner(r *Resume) *UserQuery
- func (c *ResumeClient) Update() *ResumeUpdate
- func (c *ResumeClient) UpdateOne(r *Resume) *ResumeUpdateOne
- func (c *ResumeClient) UpdateOneID(id int) *ResumeUpdateOne
- func (c *ResumeClient) Use(hooks ...Hook)
- type ResumeCreate
- func (rc *ResumeCreate) Mutation() *ResumeMutation
- func (rc *ResumeCreate) Save(ctx context.Context) (*Resume, error)
- func (rc *ResumeCreate) SaveX(ctx context.Context) *Resume
- func (rc *ResumeCreate) SetActive(b bool) *ResumeCreate
- func (rc *ResumeCreate) SetCreatedAt(t time.Time) *ResumeCreate
- func (rc *ResumeCreate) SetDeletedAt(t time.Time) *ResumeCreate
- func (rc *ResumeCreate) SetNillableActive(b *bool) *ResumeCreate
- func (rc *ResumeCreate) SetNillableCreatedAt(t *time.Time) *ResumeCreate
- func (rc *ResumeCreate) SetNillableDeletedAt(t *time.Time) *ResumeCreate
- func (rc *ResumeCreate) SetNillableURL(f *float64) *ResumeCreate
- func (rc *ResumeCreate) SetNillableUpdatedAt(t *time.Time) *ResumeCreate
- func (rc *ResumeCreate) SetOwner(u *User) *ResumeCreate
- func (rc *ResumeCreate) SetOwnerID(id int) *ResumeCreate
- func (rc *ResumeCreate) SetURL(f float64) *ResumeCreate
- func (rc *ResumeCreate) SetUpdatedAt(t time.Time) *ResumeCreate
- type ResumeCreateBulk
- type ResumeDelete
- type ResumeDeleteOne
- type ResumeEdges
- type ResumeGroupBy
- func (rgb *ResumeGroupBy) Aggregate(fns ...AggregateFunc) *ResumeGroupBy
- func (rgb *ResumeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (rgb *ResumeGroupBy) BoolX(ctx context.Context) bool
- func (rgb *ResumeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (rgb *ResumeGroupBy) BoolsX(ctx context.Context) []bool
- func (rgb *ResumeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (rgb *ResumeGroupBy) Float64X(ctx context.Context) float64
- func (rgb *ResumeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (rgb *ResumeGroupBy) Float64sX(ctx context.Context) []float64
- func (rgb *ResumeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (rgb *ResumeGroupBy) IntX(ctx context.Context) int
- func (rgb *ResumeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (rgb *ResumeGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ResumeGroupBy) Scan(ctx context.Context, v interface{}) error
- func (rgb *ResumeGroupBy) ScanX(ctx context.Context, v interface{})
- func (rgb *ResumeGroupBy) String(ctx context.Context) (_ string, err error)
- func (rgb *ResumeGroupBy) StringX(ctx context.Context) string
- func (rgb *ResumeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (rgb *ResumeGroupBy) StringsX(ctx context.Context) []string
- type ResumeMutation
- func (m *ResumeMutation) Active() (r bool, exists bool)
- func (m *ResumeMutation) AddField(name string, value ent.Value) error
- func (m *ResumeMutation) AddURL(f float64)
- func (m *ResumeMutation) AddedEdges() []string
- func (m *ResumeMutation) AddedField(name string) (ent.Value, bool)
- func (m *ResumeMutation) AddedFields() []string
- func (m *ResumeMutation) AddedIDs(name string) []ent.Value
- func (m *ResumeMutation) AddedURL() (r float64, exists bool)
- func (m *ResumeMutation) ClearEdge(name string) error
- func (m *ResumeMutation) ClearField(name string) error
- func (m *ResumeMutation) ClearOwner()
- func (m *ResumeMutation) ClearURL()
- func (m *ResumeMutation) ClearedEdges() []string
- func (m *ResumeMutation) ClearedFields() []string
- func (m ResumeMutation) Client() *Client
- func (m *ResumeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ResumeMutation) DeletedAt() (r time.Time, exists bool)
- func (m *ResumeMutation) EdgeCleared(name string) bool
- func (m *ResumeMutation) Field(name string) (ent.Value, bool)
- func (m *ResumeMutation) FieldCleared(name string) bool
- func (m *ResumeMutation) Fields() []string
- func (m *ResumeMutation) ID() (id int, exists bool)
- func (m *ResumeMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *ResumeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ResumeMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *ResumeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ResumeMutation) OldURL(ctx context.Context) (v float64, err error)
- func (m *ResumeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ResumeMutation) Op() Op
- func (m *ResumeMutation) OwnerCleared() bool
- func (m *ResumeMutation) OwnerID() (id int, exists bool)
- func (m *ResumeMutation) OwnerIDs() (ids []int)
- func (m *ResumeMutation) RemovedEdges() []string
- func (m *ResumeMutation) RemovedIDs(name string) []ent.Value
- func (m *ResumeMutation) ResetActive()
- func (m *ResumeMutation) ResetCreatedAt()
- func (m *ResumeMutation) ResetDeletedAt()
- func (m *ResumeMutation) ResetEdge(name string) error
- func (m *ResumeMutation) ResetField(name string) error
- func (m *ResumeMutation) ResetOwner()
- func (m *ResumeMutation) ResetURL()
- func (m *ResumeMutation) ResetUpdatedAt()
- func (m *ResumeMutation) SetActive(b bool)
- func (m *ResumeMutation) SetCreatedAt(t time.Time)
- func (m *ResumeMutation) SetDeletedAt(t time.Time)
- func (m *ResumeMutation) SetField(name string, value ent.Value) error
- func (m *ResumeMutation) SetOwnerID(id int)
- func (m *ResumeMutation) SetURL(f float64)
- func (m *ResumeMutation) SetUpdatedAt(t time.Time)
- func (m ResumeMutation) Tx() (*Tx, error)
- func (m *ResumeMutation) Type() string
- func (m *ResumeMutation) URL() (r float64, exists bool)
- func (m *ResumeMutation) URLCleared() bool
- func (m *ResumeMutation) UpdatedAt() (r time.Time, exists bool)
- type ResumeQuery
- func (rq *ResumeQuery) All(ctx context.Context) ([]*Resume, error)
- func (rq *ResumeQuery) AllX(ctx context.Context) []*Resume
- func (rq *ResumeQuery) Clone() *ResumeQuery
- func (rq *ResumeQuery) Count(ctx context.Context) (int, error)
- func (rq *ResumeQuery) CountX(ctx context.Context) int
- func (rq *ResumeQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ResumeQuery) ExistX(ctx context.Context) bool
- func (rq *ResumeQuery) First(ctx context.Context) (*Resume, error)
- func (rq *ResumeQuery) FirstID(ctx context.Context) (id int, err error)
- func (rq *ResumeQuery) FirstIDX(ctx context.Context) int
- func (rq *ResumeQuery) FirstX(ctx context.Context) *Resume
- func (rq *ResumeQuery) GroupBy(field string, fields ...string) *ResumeGroupBy
- func (rq *ResumeQuery) IDs(ctx context.Context) ([]int, error)
- func (rq *ResumeQuery) IDsX(ctx context.Context) []int
- func (rq *ResumeQuery) Limit(limit int) *ResumeQuery
- func (rq *ResumeQuery) Offset(offset int) *ResumeQuery
- func (rq *ResumeQuery) Only(ctx context.Context) (*Resume, error)
- func (rq *ResumeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rq *ResumeQuery) OnlyIDX(ctx context.Context) int
- func (rq *ResumeQuery) OnlyX(ctx context.Context) *Resume
- func (rq *ResumeQuery) Order(o ...OrderFunc) *ResumeQuery
- func (rq *ResumeQuery) QueryOwner() *UserQuery
- func (rq *ResumeQuery) Select(field string, fields ...string) *ResumeSelect
- func (rq *ResumeQuery) Where(ps ...predicate.Resume) *ResumeQuery
- func (rq *ResumeQuery) WithOwner(opts ...func(*UserQuery)) *ResumeQuery
- type ResumeSelect
- func (rs *ResumeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (rs *ResumeSelect) BoolX(ctx context.Context) bool
- func (rs *ResumeSelect) Bools(ctx context.Context) ([]bool, error)
- func (rs *ResumeSelect) BoolsX(ctx context.Context) []bool
- func (rs *ResumeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (rs *ResumeSelect) Float64X(ctx context.Context) float64
- func (rs *ResumeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (rs *ResumeSelect) Float64sX(ctx context.Context) []float64
- func (rs *ResumeSelect) Int(ctx context.Context) (_ int, err error)
- func (rs *ResumeSelect) IntX(ctx context.Context) int
- func (rs *ResumeSelect) Ints(ctx context.Context) ([]int, error)
- func (rs *ResumeSelect) IntsX(ctx context.Context) []int
- func (rs *ResumeSelect) Scan(ctx context.Context, v interface{}) error
- func (rs *ResumeSelect) ScanX(ctx context.Context, v interface{})
- func (rs *ResumeSelect) String(ctx context.Context) (_ string, err error)
- func (rs *ResumeSelect) StringX(ctx context.Context) string
- func (rs *ResumeSelect) Strings(ctx context.Context) ([]string, error)
- func (rs *ResumeSelect) StringsX(ctx context.Context) []string
- type ResumeUpdate
- func (ru *ResumeUpdate) AddURL(f float64) *ResumeUpdate
- func (ru *ResumeUpdate) ClearOwner() *ResumeUpdate
- func (ru *ResumeUpdate) ClearURL() *ResumeUpdate
- func (ru *ResumeUpdate) Exec(ctx context.Context) error
- func (ru *ResumeUpdate) ExecX(ctx context.Context)
- func (ru *ResumeUpdate) Mutation() *ResumeMutation
- func (ru *ResumeUpdate) Save(ctx context.Context) (int, error)
- func (ru *ResumeUpdate) SaveX(ctx context.Context) int
- func (ru *ResumeUpdate) SetActive(b bool) *ResumeUpdate
- func (ru *ResumeUpdate) SetCreatedAt(t time.Time) *ResumeUpdate
- func (ru *ResumeUpdate) SetDeletedAt(t time.Time) *ResumeUpdate
- func (ru *ResumeUpdate) SetNillableActive(b *bool) *ResumeUpdate
- func (ru *ResumeUpdate) SetNillableCreatedAt(t *time.Time) *ResumeUpdate
- func (ru *ResumeUpdate) SetNillableDeletedAt(t *time.Time) *ResumeUpdate
- func (ru *ResumeUpdate) SetNillableURL(f *float64) *ResumeUpdate
- func (ru *ResumeUpdate) SetNillableUpdatedAt(t *time.Time) *ResumeUpdate
- func (ru *ResumeUpdate) SetOwner(u *User) *ResumeUpdate
- func (ru *ResumeUpdate) SetOwnerID(id int) *ResumeUpdate
- func (ru *ResumeUpdate) SetURL(f float64) *ResumeUpdate
- func (ru *ResumeUpdate) SetUpdatedAt(t time.Time) *ResumeUpdate
- func (ru *ResumeUpdate) Where(ps ...predicate.Resume) *ResumeUpdate
- type ResumeUpdateOne
- func (ruo *ResumeUpdateOne) AddURL(f float64) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) ClearOwner() *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) ClearURL() *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) Exec(ctx context.Context) error
- func (ruo *ResumeUpdateOne) ExecX(ctx context.Context)
- func (ruo *ResumeUpdateOne) Mutation() *ResumeMutation
- func (ruo *ResumeUpdateOne) Save(ctx context.Context) (*Resume, error)
- func (ruo *ResumeUpdateOne) SaveX(ctx context.Context) *Resume
- func (ruo *ResumeUpdateOne) SetActive(b bool) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetCreatedAt(t time.Time) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetDeletedAt(t time.Time) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetNillableActive(b *bool) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetNillableCreatedAt(t *time.Time) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetNillableDeletedAt(t *time.Time) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetNillableURL(f *float64) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetNillableUpdatedAt(t *time.Time) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetOwner(u *User) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetOwnerID(id int) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetURL(f float64) *ResumeUpdateOne
- func (ruo *ResumeUpdateOne) SetUpdatedAt(t time.Time) *ResumeUpdateOne
- type Resumes
- 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) QueryResumes(u *User) *ResumeQuery
- 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) AddResumeIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddResumes(r ...*Resume) *UserCreate
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetActive(b bool) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableActive(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableProvider(s *string) *UserCreate
- func (uc *UserCreate) SetNillableRank(f *float64) *UserCreate
- func (uc *UserCreate) SetNillableType(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetProvider(s string) *UserCreate
- func (uc *UserCreate) SetRank(f float64) *UserCreate
- func (uc *UserCreate) SetType(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
- func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
- func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ugb *UserGroupBy) IntX(ctx context.Context) int
- func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
- func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (ugb *UserGroupBy) StringX(ctx context.Context) string
- func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) Active() (r bool, exists bool)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddRank(f float64)
- func (m *UserMutation) AddResumeIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedRank() (r float64, exists bool)
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearProvider()
- func (m *UserMutation) ClearResumes()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists 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) GetType() (r string, exists bool)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldProvider(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldRank(ctx context.Context) (v float64, err error)
- func (m *UserMutation) OldType(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) Provider() (r string, exists bool)
- func (m *UserMutation) ProviderCleared() bool
- func (m *UserMutation) Rank() (r float64, exists bool)
- func (m *UserMutation) RemoveResumeIDs(ids ...int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedResumesIDs() (ids []int)
- func (m *UserMutation) ResetActive()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDeletedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetProvider()
- func (m *UserMutation) ResetRank()
- func (m *UserMutation) ResetResumes()
- func (m *UserMutation) ResetType()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResumesCleared() bool
- func (m *UserMutation) ResumesIDs() (ids []int)
- func (m *UserMutation) SetActive(b bool)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetDeletedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetProvider(s string)
- func (m *UserMutation) SetRank(f float64)
- func (m *UserMutation) SetType(s string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- 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) QueryResumes() *ResumeQuery
- func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithResumes(opts ...func(*ResumeQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (us *UserSelect) BoolX(ctx context.Context) bool
- func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UserSelect) BoolsX(ctx context.Context) []bool
- func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (us *UserSelect) Float64X(ctx context.Context) float64
- func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UserSelect) Float64sX(ctx context.Context) []float64
- func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (us *UserSelect) IntX(ctx context.Context) int
- func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (us *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
- func (us *UserSelect) ScanX(ctx context.Context, v interface{})
- func (us *UserSelect) String(ctx context.Context) (_ string, err error)
- func (us *UserSelect) StringX(ctx context.Context) string
- func (us *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddRank(f float64) *UserUpdate
- func (uu *UserUpdate) AddResumeIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddResumes(r ...*Resume) *UserUpdate
- func (uu *UserUpdate) ClearProvider() *UserUpdate
- func (uu *UserUpdate) ClearResumes() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveResumeIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveResumes(r ...*Resume) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetActive(b bool) *UserUpdate
- func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableActive(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableProvider(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableRank(f *float64) *UserUpdate
- func (uu *UserUpdate) SetNillableType(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableUpdatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetProvider(s string) *UserUpdate
- func (uu *UserUpdate) SetRank(f float64) *UserUpdate
- func (uu *UserUpdate) SetType(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddRank(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddResumeIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddResumes(r ...*Resume) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearProvider() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearResumes() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveResumeIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveResumes(r ...*Resume) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) SetActive(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableActive(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableProvider(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRank(f *float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableType(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetProvider(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRank(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetType(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeResume = "Resume" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validaton error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(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 // Resume is the client for interacting with the Resume builders. Resume *ResumeClient // User is the client for interacting with the User builders. User *UserClient // 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(). Resume. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type 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 Resume ¶
type Resume struct { // ID of the ent. ID int `json:"id,omitempty"` // Active holds the value of the "active" field. Active bool `json:"active,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at,omitempty"` // URL holds the value of the "url" field. URL float64 `json:"url,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ResumeQuery when eager-loading is set. Edges ResumeEdges `json:"edges"` // contains filtered or unexported fields }
Resume is the model entity for the Resume schema.
func (*Resume) QueryOwner ¶
QueryOwner queries the "owner" edge of the Resume entity.
func (*Resume) Unwrap ¶
Unwrap unwraps the Resume 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 (*Resume) Update ¶
func (r *Resume) Update() *ResumeUpdateOne
Update returns a builder for updating this Resume. Note that you need to call Resume.Unwrap() before calling this method if this Resume was returned from a transaction, and the transaction was committed or rolled back.
type ResumeClient ¶
type ResumeClient struct {
// contains filtered or unexported fields
}
ResumeClient is a client for the Resume schema.
func NewResumeClient ¶
func NewResumeClient(c config) *ResumeClient
NewResumeClient returns a client for the Resume from the given config.
func (*ResumeClient) Create ¶
func (c *ResumeClient) Create() *ResumeCreate
Create returns a create builder for Resume.
func (*ResumeClient) CreateBulk ¶
func (c *ResumeClient) CreateBulk(builders ...*ResumeCreate) *ResumeCreateBulk
CreateBulk returns a builder for creating a bulk of Resume entities.
func (*ResumeClient) Delete ¶
func (c *ResumeClient) Delete() *ResumeDelete
Delete returns a delete builder for Resume.
func (*ResumeClient) DeleteOne ¶
func (c *ResumeClient) DeleteOne(r *Resume) *ResumeDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ResumeClient) DeleteOneID ¶
func (c *ResumeClient) DeleteOneID(id int) *ResumeDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ResumeClient) GetX ¶
func (c *ResumeClient) GetX(ctx context.Context, id int) *Resume
GetX is like Get, but panics if an error occurs.
func (*ResumeClient) Query ¶
func (c *ResumeClient) Query() *ResumeQuery
Query returns a query builder for Resume.
func (*ResumeClient) QueryOwner ¶
func (c *ResumeClient) QueryOwner(r *Resume) *UserQuery
QueryOwner queries the owner edge of a Resume.
func (*ResumeClient) Update ¶
func (c *ResumeClient) Update() *ResumeUpdate
Update returns an update builder for Resume.
func (*ResumeClient) UpdateOne ¶
func (c *ResumeClient) UpdateOne(r *Resume) *ResumeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ResumeClient) UpdateOneID ¶
func (c *ResumeClient) UpdateOneID(id int) *ResumeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ResumeClient) Use ¶
func (c *ResumeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `resume.Hooks(f(g(h())))`.
type ResumeCreate ¶
type ResumeCreate struct {
// contains filtered or unexported fields
}
ResumeCreate is the builder for creating a Resume entity.
func (*ResumeCreate) Mutation ¶
func (rc *ResumeCreate) Mutation() *ResumeMutation
Mutation returns the ResumeMutation object of the builder.
func (*ResumeCreate) Save ¶
func (rc *ResumeCreate) Save(ctx context.Context) (*Resume, error)
Save creates the Resume in the database.
func (*ResumeCreate) SaveX ¶
func (rc *ResumeCreate) SaveX(ctx context.Context) *Resume
SaveX calls Save and panics if Save returns an error.
func (*ResumeCreate) SetActive ¶
func (rc *ResumeCreate) SetActive(b bool) *ResumeCreate
SetActive sets the "active" field.
func (*ResumeCreate) SetCreatedAt ¶
func (rc *ResumeCreate) SetCreatedAt(t time.Time) *ResumeCreate
SetCreatedAt sets the "created_at" field.
func (*ResumeCreate) SetDeletedAt ¶
func (rc *ResumeCreate) SetDeletedAt(t time.Time) *ResumeCreate
SetDeletedAt sets the "deleted_at" field.
func (*ResumeCreate) SetNillableActive ¶
func (rc *ResumeCreate) SetNillableActive(b *bool) *ResumeCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*ResumeCreate) SetNillableCreatedAt ¶
func (rc *ResumeCreate) SetNillableCreatedAt(t *time.Time) *ResumeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ResumeCreate) SetNillableDeletedAt ¶
func (rc *ResumeCreate) SetNillableDeletedAt(t *time.Time) *ResumeCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ResumeCreate) SetNillableURL ¶
func (rc *ResumeCreate) SetNillableURL(f *float64) *ResumeCreate
SetNillableURL sets the "url" field if the given value is not nil.
func (*ResumeCreate) SetNillableUpdatedAt ¶
func (rc *ResumeCreate) SetNillableUpdatedAt(t *time.Time) *ResumeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ResumeCreate) SetOwner ¶
func (rc *ResumeCreate) SetOwner(u *User) *ResumeCreate
SetOwner sets the "owner" edge to the User entity.
func (*ResumeCreate) SetOwnerID ¶
func (rc *ResumeCreate) SetOwnerID(id int) *ResumeCreate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*ResumeCreate) SetURL ¶
func (rc *ResumeCreate) SetURL(f float64) *ResumeCreate
SetURL sets the "url" field.
func (*ResumeCreate) SetUpdatedAt ¶
func (rc *ResumeCreate) SetUpdatedAt(t time.Time) *ResumeCreate
SetUpdatedAt sets the "updated_at" field.
type ResumeCreateBulk ¶
type ResumeCreateBulk struct {
// contains filtered or unexported fields
}
ResumeCreateBulk is the builder for creating many Resume entities in bulk.
type ResumeDelete ¶
type ResumeDelete struct {
// contains filtered or unexported fields
}
ResumeDelete is the builder for deleting a Resume entity.
func (*ResumeDelete) Exec ¶
func (rd *ResumeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ResumeDelete) ExecX ¶
func (rd *ResumeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ResumeDelete) Where ¶
func (rd *ResumeDelete) Where(ps ...predicate.Resume) *ResumeDelete
Where adds a new predicate to the ResumeDelete builder.
type ResumeDeleteOne ¶
type ResumeDeleteOne struct {
// contains filtered or unexported fields
}
ResumeDeleteOne is the builder for deleting a single Resume entity.
func (*ResumeDeleteOne) Exec ¶
func (rdo *ResumeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ResumeDeleteOne) ExecX ¶
func (rdo *ResumeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ResumeEdges ¶
type ResumeEdges struct { // Owner holds the value of the owner edge. Owner *User `json:"owner,omitempty"` // contains filtered or unexported fields }
ResumeEdges holds the relations/edges for other nodes in the graph.
func (ResumeEdges) OwnerOrErr ¶
func (e ResumeEdges) OwnerOrErr() (*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ResumeGroupBy ¶
type ResumeGroupBy struct {
// contains filtered or unexported fields
}
ResumeGroupBy is the group-by builder for Resume entities.
func (*ResumeGroupBy) Aggregate ¶
func (rgb *ResumeGroupBy) Aggregate(fns ...AggregateFunc) *ResumeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ResumeGroupBy) Bool ¶
func (rgb *ResumeGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ResumeGroupBy) BoolX ¶
func (rgb *ResumeGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ResumeGroupBy) Bools ¶
func (rgb *ResumeGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*ResumeGroupBy) BoolsX ¶
func (rgb *ResumeGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ResumeGroupBy) Float64 ¶
func (rgb *ResumeGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ResumeGroupBy) Float64X ¶
func (rgb *ResumeGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ResumeGroupBy) Float64s ¶
func (rgb *ResumeGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*ResumeGroupBy) Float64sX ¶
func (rgb *ResumeGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ResumeGroupBy) Int ¶
func (rgb *ResumeGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ResumeGroupBy) IntX ¶
func (rgb *ResumeGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ResumeGroupBy) Ints ¶
func (rgb *ResumeGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*ResumeGroupBy) IntsX ¶
func (rgb *ResumeGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ResumeGroupBy) Scan ¶
func (rgb *ResumeGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ResumeGroupBy) ScanX ¶
func (rgb *ResumeGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ResumeGroupBy) String ¶
func (rgb *ResumeGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ResumeGroupBy) StringX ¶
func (rgb *ResumeGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ResumeMutation ¶
type ResumeMutation struct {
// contains filtered or unexported fields
}
ResumeMutation represents an operation that mutates the Resume nodes in the graph.
func (*ResumeMutation) Active ¶
func (m *ResumeMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*ResumeMutation) AddField ¶
func (m *ResumeMutation) 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 (*ResumeMutation) AddURL ¶
func (m *ResumeMutation) AddURL(f float64)
AddURL adds f to the "url" field.
func (*ResumeMutation) AddedEdges ¶
func (m *ResumeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ResumeMutation) AddedField ¶
func (m *ResumeMutation) 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 (*ResumeMutation) AddedFields ¶
func (m *ResumeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ResumeMutation) AddedIDs ¶
func (m *ResumeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ResumeMutation) AddedURL ¶
func (m *ResumeMutation) AddedURL() (r float64, exists bool)
AddedURL returns the value that was added to the "url" field in this mutation.
func (*ResumeMutation) ClearEdge ¶
func (m *ResumeMutation) 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 (*ResumeMutation) ClearField ¶
func (m *ResumeMutation) 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 (*ResumeMutation) ClearOwner ¶
func (m *ResumeMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*ResumeMutation) ClearURL ¶
func (m *ResumeMutation) ClearURL()
ClearURL clears the value of the "url" field.
func (*ResumeMutation) ClearedEdges ¶
func (m *ResumeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ResumeMutation) ClearedFields ¶
func (m *ResumeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ResumeMutation) Client ¶
func (m ResumeMutation) 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 (*ResumeMutation) CreatedAt ¶
func (m *ResumeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ResumeMutation) DeletedAt ¶
func (m *ResumeMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*ResumeMutation) EdgeCleared ¶
func (m *ResumeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ResumeMutation) Field ¶
func (m *ResumeMutation) 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 (*ResumeMutation) FieldCleared ¶
func (m *ResumeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ResumeMutation) Fields ¶
func (m *ResumeMutation) 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 (*ResumeMutation) ID ¶
func (m *ResumeMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*ResumeMutation) OldActive ¶
func (m *ResumeMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the Resume entity. If the Resume 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 (*ResumeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Resume entity. If the Resume 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 (*ResumeMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Resume entity. If the Resume 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 (*ResumeMutation) 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 (*ResumeMutation) OldURL ¶
func (m *ResumeMutation) OldURL(ctx context.Context) (v float64, err error)
OldURL returns the old "url" field's value of the Resume entity. If the Resume 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 (*ResumeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Resume entity. If the Resume 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 (*ResumeMutation) OwnerCleared ¶
func (m *ResumeMutation) OwnerCleared() bool
OwnerCleared returns if the "owner" edge to the User entity was cleared.
func (*ResumeMutation) OwnerID ¶
func (m *ResumeMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*ResumeMutation) OwnerIDs ¶
func (m *ResumeMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*ResumeMutation) RemovedEdges ¶
func (m *ResumeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ResumeMutation) RemovedIDs ¶
func (m *ResumeMutation) 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 (*ResumeMutation) ResetActive ¶
func (m *ResumeMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*ResumeMutation) ResetCreatedAt ¶
func (m *ResumeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ResumeMutation) ResetDeletedAt ¶
func (m *ResumeMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*ResumeMutation) ResetEdge ¶
func (m *ResumeMutation) 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 (*ResumeMutation) ResetField ¶
func (m *ResumeMutation) 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 (*ResumeMutation) ResetOwner ¶
func (m *ResumeMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*ResumeMutation) ResetURL ¶
func (m *ResumeMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*ResumeMutation) ResetUpdatedAt ¶
func (m *ResumeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ResumeMutation) SetActive ¶
func (m *ResumeMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*ResumeMutation) SetCreatedAt ¶
func (m *ResumeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ResumeMutation) SetDeletedAt ¶
func (m *ResumeMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*ResumeMutation) SetField ¶
func (m *ResumeMutation) 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 (*ResumeMutation) SetOwnerID ¶
func (m *ResumeMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the User entity by id.
func (*ResumeMutation) SetURL ¶
func (m *ResumeMutation) SetURL(f float64)
SetURL sets the "url" field.
func (*ResumeMutation) SetUpdatedAt ¶
func (m *ResumeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ResumeMutation) Tx ¶
func (m ResumeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ResumeMutation) Type ¶
func (m *ResumeMutation) Type() string
Type returns the node type of this mutation (Resume).
func (*ResumeMutation) URL ¶
func (m *ResumeMutation) URL() (r float64, exists bool)
URL returns the value of the "url" field in the mutation.
func (*ResumeMutation) URLCleared ¶
func (m *ResumeMutation) URLCleared() bool
URLCleared returns if the "url" field was cleared in this mutation.
type ResumeQuery ¶
type ResumeQuery struct {
// contains filtered or unexported fields
}
ResumeQuery is the builder for querying Resume entities.
func (*ResumeQuery) All ¶
func (rq *ResumeQuery) All(ctx context.Context) ([]*Resume, error)
All executes the query and returns a list of Resumes.
func (*ResumeQuery) AllX ¶
func (rq *ResumeQuery) AllX(ctx context.Context) []*Resume
AllX is like All, but panics if an error occurs.
func (*ResumeQuery) Clone ¶
func (rq *ResumeQuery) Clone() *ResumeQuery
Clone returns a duplicate of the ResumeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ResumeQuery) Count ¶
func (rq *ResumeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ResumeQuery) CountX ¶
func (rq *ResumeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ResumeQuery) Exist ¶
func (rq *ResumeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ResumeQuery) ExistX ¶
func (rq *ResumeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ResumeQuery) First ¶
func (rq *ResumeQuery) First(ctx context.Context) (*Resume, error)
First returns the first Resume entity from the query. Returns a *NotFoundError when no Resume was found.
func (*ResumeQuery) FirstID ¶
func (rq *ResumeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Resume ID from the query. Returns a *NotFoundError when no Resume ID was found.
func (*ResumeQuery) FirstIDX ¶
func (rq *ResumeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ResumeQuery) FirstX ¶
func (rq *ResumeQuery) FirstX(ctx context.Context) *Resume
FirstX is like First, but panics if an error occurs.
func (*ResumeQuery) GroupBy ¶
func (rq *ResumeQuery) GroupBy(field string, fields ...string) *ResumeGroupBy
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 { Active bool `json:"active,omitempty"` Count int `json:"count,omitempty"` } client.Resume.Query(). GroupBy(resume.FieldActive). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ResumeQuery) IDs ¶
func (rq *ResumeQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Resume IDs.
func (*ResumeQuery) IDsX ¶
func (rq *ResumeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ResumeQuery) Limit ¶
func (rq *ResumeQuery) Limit(limit int) *ResumeQuery
Limit adds a limit step to the query.
func (*ResumeQuery) Offset ¶
func (rq *ResumeQuery) Offset(offset int) *ResumeQuery
Offset adds an offset step to the query.
func (*ResumeQuery) Only ¶
func (rq *ResumeQuery) Only(ctx context.Context) (*Resume, error)
Only returns a single Resume entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Resume entity is not found. Returns a *NotFoundError when no Resume entities are found.
func (*ResumeQuery) OnlyID ¶
func (rq *ResumeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Resume ID in the query. Returns a *NotSingularError when exactly one Resume ID is not found. Returns a *NotFoundError when no entities are found.
func (*ResumeQuery) OnlyIDX ¶
func (rq *ResumeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ResumeQuery) OnlyX ¶
func (rq *ResumeQuery) OnlyX(ctx context.Context) *Resume
OnlyX is like Only, but panics if an error occurs.
func (*ResumeQuery) Order ¶
func (rq *ResumeQuery) Order(o ...OrderFunc) *ResumeQuery
Order adds an order step to the query.
func (*ResumeQuery) QueryOwner ¶
func (rq *ResumeQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*ResumeQuery) Select ¶
func (rq *ResumeQuery) Select(field string, fields ...string) *ResumeSelect
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 { Active bool `json:"active,omitempty"` } client.Resume.Query(). Select(resume.FieldActive). Scan(ctx, &v)
func (*ResumeQuery) Where ¶
func (rq *ResumeQuery) Where(ps ...predicate.Resume) *ResumeQuery
Where adds a new predicate for the ResumeQuery builder.
func (*ResumeQuery) WithOwner ¶
func (rq *ResumeQuery) WithOwner(opts ...func(*UserQuery)) *ResumeQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type ResumeSelect ¶
type ResumeSelect struct { *ResumeQuery // contains filtered or unexported fields }
ResumeSelect is the builder for selecting fields of Resume entities.
func (*ResumeSelect) Bool ¶
func (rs *ResumeSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ResumeSelect) BoolX ¶
func (rs *ResumeSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ResumeSelect) Bools ¶
func (rs *ResumeSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ResumeSelect) BoolsX ¶
func (rs *ResumeSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ResumeSelect) Float64 ¶
func (rs *ResumeSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ResumeSelect) Float64X ¶
func (rs *ResumeSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ResumeSelect) Float64s ¶
func (rs *ResumeSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ResumeSelect) Float64sX ¶
func (rs *ResumeSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ResumeSelect) Int ¶
func (rs *ResumeSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ResumeSelect) IntX ¶
func (rs *ResumeSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ResumeSelect) Ints ¶
func (rs *ResumeSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ResumeSelect) IntsX ¶
func (rs *ResumeSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ResumeSelect) Scan ¶
func (rs *ResumeSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ResumeSelect) ScanX ¶
func (rs *ResumeSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ResumeSelect) String ¶
func (rs *ResumeSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ResumeSelect) StringX ¶
func (rs *ResumeSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ResumeUpdate ¶
type ResumeUpdate struct {
// contains filtered or unexported fields
}
ResumeUpdate is the builder for updating Resume entities.
func (*ResumeUpdate) AddURL ¶
func (ru *ResumeUpdate) AddURL(f float64) *ResumeUpdate
AddURL adds f to the "url" field.
func (*ResumeUpdate) ClearOwner ¶
func (ru *ResumeUpdate) ClearOwner() *ResumeUpdate
ClearOwner clears the "owner" edge to the User entity.
func (*ResumeUpdate) ClearURL ¶
func (ru *ResumeUpdate) ClearURL() *ResumeUpdate
ClearURL clears the value of the "url" field.
func (*ResumeUpdate) Exec ¶
func (ru *ResumeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ResumeUpdate) ExecX ¶
func (ru *ResumeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResumeUpdate) Mutation ¶
func (ru *ResumeUpdate) Mutation() *ResumeMutation
Mutation returns the ResumeMutation object of the builder.
func (*ResumeUpdate) Save ¶
func (ru *ResumeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ResumeUpdate) SaveX ¶
func (ru *ResumeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ResumeUpdate) SetActive ¶
func (ru *ResumeUpdate) SetActive(b bool) *ResumeUpdate
SetActive sets the "active" field.
func (*ResumeUpdate) SetCreatedAt ¶
func (ru *ResumeUpdate) SetCreatedAt(t time.Time) *ResumeUpdate
SetCreatedAt sets the "created_at" field.
func (*ResumeUpdate) SetDeletedAt ¶
func (ru *ResumeUpdate) SetDeletedAt(t time.Time) *ResumeUpdate
SetDeletedAt sets the "deleted_at" field.
func (*ResumeUpdate) SetNillableActive ¶
func (ru *ResumeUpdate) SetNillableActive(b *bool) *ResumeUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*ResumeUpdate) SetNillableCreatedAt ¶
func (ru *ResumeUpdate) SetNillableCreatedAt(t *time.Time) *ResumeUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ResumeUpdate) SetNillableDeletedAt ¶
func (ru *ResumeUpdate) SetNillableDeletedAt(t *time.Time) *ResumeUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ResumeUpdate) SetNillableURL ¶
func (ru *ResumeUpdate) SetNillableURL(f *float64) *ResumeUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*ResumeUpdate) SetNillableUpdatedAt ¶
func (ru *ResumeUpdate) SetNillableUpdatedAt(t *time.Time) *ResumeUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ResumeUpdate) SetOwner ¶
func (ru *ResumeUpdate) SetOwner(u *User) *ResumeUpdate
SetOwner sets the "owner" edge to the User entity.
func (*ResumeUpdate) SetOwnerID ¶
func (ru *ResumeUpdate) SetOwnerID(id int) *ResumeUpdate
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*ResumeUpdate) SetURL ¶
func (ru *ResumeUpdate) SetURL(f float64) *ResumeUpdate
SetURL sets the "url" field.
func (*ResumeUpdate) SetUpdatedAt ¶
func (ru *ResumeUpdate) SetUpdatedAt(t time.Time) *ResumeUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ResumeUpdate) Where ¶
func (ru *ResumeUpdate) Where(ps ...predicate.Resume) *ResumeUpdate
Where adds a new predicate for the ResumeUpdate builder.
type ResumeUpdateOne ¶
type ResumeUpdateOne struct {
// contains filtered or unexported fields
}
ResumeUpdateOne is the builder for updating a single Resume entity.
func (*ResumeUpdateOne) AddURL ¶
func (ruo *ResumeUpdateOne) AddURL(f float64) *ResumeUpdateOne
AddURL adds f to the "url" field.
func (*ResumeUpdateOne) ClearOwner ¶
func (ruo *ResumeUpdateOne) ClearOwner() *ResumeUpdateOne
ClearOwner clears the "owner" edge to the User entity.
func (*ResumeUpdateOne) ClearURL ¶
func (ruo *ResumeUpdateOne) ClearURL() *ResumeUpdateOne
ClearURL clears the value of the "url" field.
func (*ResumeUpdateOne) Exec ¶
func (ruo *ResumeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ResumeUpdateOne) ExecX ¶
func (ruo *ResumeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ResumeUpdateOne) Mutation ¶
func (ruo *ResumeUpdateOne) Mutation() *ResumeMutation
Mutation returns the ResumeMutation object of the builder.
func (*ResumeUpdateOne) Save ¶
func (ruo *ResumeUpdateOne) Save(ctx context.Context) (*Resume, error)
Save executes the query and returns the updated Resume entity.
func (*ResumeUpdateOne) SaveX ¶
func (ruo *ResumeUpdateOne) SaveX(ctx context.Context) *Resume
SaveX is like Save, but panics if an error occurs.
func (*ResumeUpdateOne) SetActive ¶
func (ruo *ResumeUpdateOne) SetActive(b bool) *ResumeUpdateOne
SetActive sets the "active" field.
func (*ResumeUpdateOne) SetCreatedAt ¶
func (ruo *ResumeUpdateOne) SetCreatedAt(t time.Time) *ResumeUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ResumeUpdateOne) SetDeletedAt ¶
func (ruo *ResumeUpdateOne) SetDeletedAt(t time.Time) *ResumeUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*ResumeUpdateOne) SetNillableActive ¶
func (ruo *ResumeUpdateOne) SetNillableActive(b *bool) *ResumeUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*ResumeUpdateOne) SetNillableCreatedAt ¶
func (ruo *ResumeUpdateOne) SetNillableCreatedAt(t *time.Time) *ResumeUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ResumeUpdateOne) SetNillableDeletedAt ¶
func (ruo *ResumeUpdateOne) SetNillableDeletedAt(t *time.Time) *ResumeUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*ResumeUpdateOne) SetNillableURL ¶
func (ruo *ResumeUpdateOne) SetNillableURL(f *float64) *ResumeUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*ResumeUpdateOne) SetNillableUpdatedAt ¶
func (ruo *ResumeUpdateOne) SetNillableUpdatedAt(t *time.Time) *ResumeUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ResumeUpdateOne) SetOwner ¶
func (ruo *ResumeUpdateOne) SetOwner(u *User) *ResumeUpdateOne
SetOwner sets the "owner" edge to the User entity.
func (*ResumeUpdateOne) SetOwnerID ¶
func (ruo *ResumeUpdateOne) SetOwnerID(id int) *ResumeUpdateOne
SetOwnerID sets the "owner" edge to the User entity by ID.
func (*ResumeUpdateOne) SetURL ¶
func (ruo *ResumeUpdateOne) SetURL(f float64) *ResumeUpdateOne
SetURL sets the "url" field.
func (*ResumeUpdateOne) SetUpdatedAt ¶
func (ruo *ResumeUpdateOne) SetUpdatedAt(t time.Time) *ResumeUpdateOne
SetUpdatedAt sets the "updated_at" field.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollbacker method.
type Tx ¶
type Tx struct { // Resume is the client for interacting with the Resume builders. Resume *ResumeClient // User is the client for interacting with the User builders. User *UserClient // 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"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // Active holds the value of the "active" field. Active bool `json:"active,omitempty"` // Rank holds the value of the "rank" field. Rank float64 `json:"rank,omitempty"` // Provider holds the value of the "provider" field. Provider *string `json:"provider,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryResumes ¶
func (u *User) QueryResumes() *ResumeQuery
QueryResumes queries the "resumes" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a create builder for User.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryResumes ¶
func (c *UserClient) QueryResumes(u *User) *ResumeQuery
QueryResumes queries the resumes edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddResumeIDs ¶
func (uc *UserCreate) AddResumeIDs(ids ...int) *UserCreate
AddResumeIDs adds the "resumes" edge to the Resume entity by IDs.
func (*UserCreate) AddResumes ¶
func (uc *UserCreate) AddResumes(r ...*Resume) *UserCreate
AddResumes adds the "resumes" edges to the Resume entity.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetActive ¶
func (uc *UserCreate) SetActive(b bool) *UserCreate
SetActive sets the "active" field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetDeletedAt ¶
func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
SetDeletedAt sets the "deleted_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableActive ¶
func (uc *UserCreate) SetNillableActive(b *bool) *UserCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableDeletedAt ¶
func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserCreate) SetNillableProvider ¶
func (uc *UserCreate) SetNillableProvider(s *string) *UserCreate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*UserCreate) SetNillableRank ¶
func (uc *UserCreate) SetNillableRank(f *float64) *UserCreate
SetNillableRank sets the "rank" field if the given value is not nil.
func (*UserCreate) SetNillableType ¶
func (uc *UserCreate) SetNillableType(s *string) *UserCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetProvider ¶
func (uc *UserCreate) SetProvider(s string) *UserCreate
SetProvider sets the "provider" field.
func (*UserCreate) SetRank ¶
func (uc *UserCreate) SetRank(f float64) *UserCreate
SetRank sets the "rank" field.
func (*UserCreate) SetType ¶
func (uc *UserCreate) SetType(s string) *UserCreate
SetType sets the "type" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where adds a new predicate to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserEdges ¶
type UserEdges struct { // Resumes holds the value of the resumes edge. Resumes []*Resume `json:"resumes,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) ResumesOrErr ¶
ResumesOrErr returns the Resumes value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) BoolX ¶
func (ugb *UserGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserGroupBy) Bools ¶
func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) BoolsX ¶
func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserGroupBy) Float64 ¶
func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) Float64X ¶
func (ugb *UserGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserGroupBy) Float64s ¶
func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) Float64sX ¶
func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserGroupBy) Int ¶
func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) IntX ¶
func (ugb *UserGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserGroupBy) Ints ¶
func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) IntsX ¶
func (ugb *UserGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) ScanX ¶
func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserGroupBy) String ¶
func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UserGroupBy) StringX ¶
func (ugb *UserGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) Active ¶
func (m *UserMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
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) AddRank ¶
func (m *UserMutation) AddRank(f float64)
AddRank adds f to the "rank" field.
func (*UserMutation) AddResumeIDs ¶
func (m *UserMutation) AddResumeIDs(ids ...int)
AddResumeIDs adds the "resumes" edge to the Resume entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AddedRank ¶
func (m *UserMutation) AddedRank() (r float64, exists bool)
AddedRank returns the value that was added to the "rank" 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) ClearProvider ¶
func (m *UserMutation) ClearProvider()
ClearProvider clears the value of the "provider" field.
func (*UserMutation) ClearResumes ¶
func (m *UserMutation) ClearResumes()
ClearResumes clears the "resumes" edge to the Resume entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) DeletedAt ¶
func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" 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) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the 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) GetType ¶
func (m *UserMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldActive ¶
func (m *UserMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" 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) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" 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) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" 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) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" 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) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "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) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldProvider ¶
func (m *UserMutation) OldProvider(ctx context.Context) (v *string, err error)
OldProvider returns the old "provider" 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) OldRank ¶
func (m *UserMutation) OldRank(ctx context.Context) (v float64, err error)
OldRank returns the old "rank" 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) OldType ¶
func (m *UserMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" 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) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) Provider ¶
func (m *UserMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*UserMutation) ProviderCleared ¶
func (m *UserMutation) ProviderCleared() bool
ProviderCleared returns if the "provider" field was cleared in this mutation.
func (*UserMutation) Rank ¶
func (m *UserMutation) Rank() (r float64, exists bool)
Rank returns the value of the "rank" field in the mutation.
func (*UserMutation) RemoveResumeIDs ¶
func (m *UserMutation) RemoveResumeIDs(ids ...int)
RemoveResumeIDs removes the "resumes" edge to the Resume entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedResumesIDs ¶
func (m *UserMutation) RemovedResumesIDs() (ids []int)
RemovedResumes returns the removed IDs of the "resumes" edge to the Resume entity.
func (*UserMutation) ResetActive ¶
func (m *UserMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetDeletedAt ¶
func (m *UserMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" 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) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
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) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetProvider ¶
func (m *UserMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*UserMutation) ResetRank ¶
func (m *UserMutation) ResetRank()
ResetRank resets all changes to the "rank" field.
func (*UserMutation) ResetResumes ¶
func (m *UserMutation) ResetResumes()
ResetResumes resets all changes to the "resumes" edge.
func (*UserMutation) ResetType ¶
func (m *UserMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResumesCleared ¶
func (m *UserMutation) ResumesCleared() bool
ResumesCleared returns if the "resumes" edge to the Resume entity was cleared.
func (*UserMutation) ResumesIDs ¶
func (m *UserMutation) ResumesIDs() (ids []int)
ResumesIDs returns the "resumes" edge IDs in the mutation.
func (*UserMutation) SetActive ¶
func (m *UserMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetDeletedAt ¶
func (m *UserMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" 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) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetProvider ¶
func (m *UserMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*UserMutation) SetRank ¶
func (m *UserMutation) SetRank(f float64)
SetRank sets the "rank" field.
func (*UserMutation) SetType ¶
func (m *UserMutation) SetType(s string)
SetType sets the "type" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" 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).
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 { Email string `json:"email,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldEmail). 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 exactly one User entity is not found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when exactly one User ID is not found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryResumes ¶
func (uq *UserQuery) QueryResumes() *ResumeQuery
QueryResumes chains the current query on the "resumes" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(field string, fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Email string `json:"email,omitempty"` } client.User.Query(). Select(user.FieldEmail). Scan(ctx, &v)
func (*UserQuery) WithResumes ¶
func (uq *UserQuery) WithResumes(opts ...func(*ResumeQuery)) *UserQuery
WithResumes tells the query-builder to eager-load the nodes that are connected to the "resumes" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Bool ¶
func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolX ¶
func (us *UserSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UserSelect) Bools ¶
func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) BoolsX ¶
func (us *UserSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UserSelect) Float64 ¶
func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64X ¶
func (us *UserSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UserSelect) Float64s ¶
func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64sX ¶
func (us *UserSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UserSelect) Int ¶
func (us *UserSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntX ¶
func (us *UserSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UserSelect) Ints ¶
func (us *UserSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) IntsX ¶
func (us *UserSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) ScanX ¶
func (us *UserSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UserSelect) String ¶
func (us *UserSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UserSelect) StringX ¶
func (us *UserSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddRank ¶
func (uu *UserUpdate) AddRank(f float64) *UserUpdate
AddRank adds f to the "rank" field.
func (*UserUpdate) AddResumeIDs ¶
func (uu *UserUpdate) AddResumeIDs(ids ...int) *UserUpdate
AddResumeIDs adds the "resumes" edge to the Resume entity by IDs.
func (*UserUpdate) AddResumes ¶
func (uu *UserUpdate) AddResumes(r ...*Resume) *UserUpdate
AddResumes adds the "resumes" edges to the Resume entity.
func (*UserUpdate) ClearProvider ¶
func (uu *UserUpdate) ClearProvider() *UserUpdate
ClearProvider clears the value of the "provider" field.
func (*UserUpdate) ClearResumes ¶
func (uu *UserUpdate) ClearResumes() *UserUpdate
ClearResumes clears all "resumes" edges to the Resume entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveResumeIDs ¶
func (uu *UserUpdate) RemoveResumeIDs(ids ...int) *UserUpdate
RemoveResumeIDs removes the "resumes" edge to Resume entities by IDs.
func (*UserUpdate) RemoveResumes ¶
func (uu *UserUpdate) RemoveResumes(r ...*Resume) *UserUpdate
RemoveResumes removes "resumes" edges to Resume entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetActive ¶
func (uu *UserUpdate) SetActive(b bool) *UserUpdate
SetActive sets the "active" field.
func (*UserUpdate) SetCreatedAt ¶
func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
SetCreatedAt sets the "created_at" field.
func (*UserUpdate) SetDeletedAt ¶
func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableActive ¶
func (uu *UserUpdate) SetNillableActive(b *bool) *UserUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*UserUpdate) SetNillableCreatedAt ¶
func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdate) SetNillableDeletedAt ¶
func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdate) SetNillableProvider ¶
func (uu *UserUpdate) SetNillableProvider(s *string) *UserUpdate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*UserUpdate) SetNillableRank ¶
func (uu *UserUpdate) SetNillableRank(f *float64) *UserUpdate
SetNillableRank sets the "rank" field if the given value is not nil.
func (*UserUpdate) SetNillableType ¶
func (uu *UserUpdate) SetNillableType(s *string) *UserUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*UserUpdate) SetNillableUpdatedAt ¶
func (uu *UserUpdate) SetNillableUpdatedAt(t *time.Time) *UserUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetProvider ¶
func (uu *UserUpdate) SetProvider(s string) *UserUpdate
SetProvider sets the "provider" field.
func (*UserUpdate) SetRank ¶
func (uu *UserUpdate) SetRank(f float64) *UserUpdate
SetRank sets the "rank" field.
func (*UserUpdate) SetType ¶
func (uu *UserUpdate) SetType(s string) *UserUpdate
SetType sets the "type" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where adds a new predicate for the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddRank ¶
func (uuo *UserUpdateOne) AddRank(f float64) *UserUpdateOne
AddRank adds f to the "rank" field.
func (*UserUpdateOne) AddResumeIDs ¶
func (uuo *UserUpdateOne) AddResumeIDs(ids ...int) *UserUpdateOne
AddResumeIDs adds the "resumes" edge to the Resume entity by IDs.
func (*UserUpdateOne) AddResumes ¶
func (uuo *UserUpdateOne) AddResumes(r ...*Resume) *UserUpdateOne
AddResumes adds the "resumes" edges to the Resume entity.
func (*UserUpdateOne) ClearProvider ¶
func (uuo *UserUpdateOne) ClearProvider() *UserUpdateOne
ClearProvider clears the value of the "provider" field.
func (*UserUpdateOne) ClearResumes ¶
func (uuo *UserUpdateOne) ClearResumes() *UserUpdateOne
ClearResumes clears all "resumes" edges to the Resume entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveResumeIDs ¶
func (uuo *UserUpdateOne) RemoveResumeIDs(ids ...int) *UserUpdateOne
RemoveResumeIDs removes the "resumes" edge to Resume entities by IDs.
func (*UserUpdateOne) RemoveResumes ¶
func (uuo *UserUpdateOne) RemoveResumes(r ...*Resume) *UserUpdateOne
RemoveResumes removes "resumes" edges to Resume entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) SetActive ¶
func (uuo *UserUpdateOne) SetActive(b bool) *UserUpdateOne
SetActive sets the "active" field.
func (*UserUpdateOne) SetCreatedAt ¶
func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserUpdateOne) SetDeletedAt ¶
func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableActive ¶
func (uuo *UserUpdateOne) SetNillableActive(b *bool) *UserUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCreatedAt ¶
func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDeletedAt ¶
func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableProvider ¶
func (uuo *UserUpdateOne) SetNillableProvider(s *string) *UserUpdateOne
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*UserUpdateOne) SetNillableRank ¶
func (uuo *UserUpdateOne) SetNillableRank(f *float64) *UserUpdateOne
SetNillableRank sets the "rank" field if the given value is not nil.
func (*UserUpdateOne) SetNillableType ¶
func (uuo *UserUpdateOne) SetNillableType(s *string) *UserUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUpdatedAt ¶
func (uuo *UserUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetProvider ¶
func (uuo *UserUpdateOne) SetProvider(s string) *UserUpdateOne
SetProvider sets the "provider" field.
func (*UserUpdateOne) SetRank ¶
func (uuo *UserUpdateOne) SetRank(f float64) *UserUpdateOne
SetRank sets the "rank" field.
func (*UserUpdateOne) SetType ¶
func (uuo *UserUpdateOne) SetType(s string) *UserUpdateOne
SetType sets the "type" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.