ent

package
v0.0.0-...-d35ded7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeCareerSkill           = "CareerSkill"
	TypeCareerSkillGroup      = "CareerSkillGroup"
	TypeCareerTask            = "CareerTask"
	TypeCareerTaskDescription = "CareerTaskDescription"
	TypeSkill                 = "Skill"
	TypeSkillTag              = "SkillTag"
	TypeUser                  = "User"
	TypeUserActivity          = "UserActivity"
	TypeUserCareer            = "UserCareer"
	TypeUserCareerDescription = "UserCareerDescription"
	TypeUserCareerGroup       = "UserCareerGroup"
	TypeUserNote              = "UserNote"
	TypeUserNoteItem          = "UserNoteItem"
	TypeUserQualification     = "UserQualification"
)

Variables

This section is empty.

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

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 CareerSkill

type CareerSkill struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Version holds the value of the "version" field.
	Version *string `json:"version,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CareerSkillQuery when eager-loading is set.
	Edges CareerSkillEdges `json:"edges"`
	// contains filtered or unexported fields
}

CareerSkill is the model entity for the CareerSkill schema.

func (*CareerSkill) QueryCareerSkillGroup

func (cs *CareerSkill) QueryCareerSkillGroup() *CareerSkillGroupQuery

QueryCareerSkillGroup queries the "careerSkillGroup" edge of the CareerSkill entity.

func (*CareerSkill) QuerySkill

func (cs *CareerSkill) QuerySkill() *SkillQuery

QuerySkill queries the "skill" edge of the CareerSkill entity.

func (*CareerSkill) String

func (cs *CareerSkill) String() string

String implements the fmt.Stringer.

func (*CareerSkill) Unwrap

func (cs *CareerSkill) Unwrap() *CareerSkill

Unwrap unwraps the CareerSkill 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 (*CareerSkill) Update

func (cs *CareerSkill) Update() *CareerSkillUpdateOne

Update returns a builder for updating this CareerSkill. Note that you need to call CareerSkill.Unwrap() before calling this method if this CareerSkill was returned from a transaction, and the transaction was committed or rolled back.

func (*CareerSkill) Value

func (cs *CareerSkill) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the CareerSkill. This includes values selected through modifiers, order, etc.

type CareerSkillClient

type CareerSkillClient struct {
	// contains filtered or unexported fields
}

CareerSkillClient is a client for the CareerSkill schema.

func NewCareerSkillClient

func NewCareerSkillClient(c config) *CareerSkillClient

NewCareerSkillClient returns a client for the CareerSkill from the given config.

func (*CareerSkillClient) Create

func (c *CareerSkillClient) Create() *CareerSkillCreate

Create returns a builder for creating a CareerSkill entity.

func (*CareerSkillClient) CreateBulk

func (c *CareerSkillClient) CreateBulk(builders ...*CareerSkillCreate) *CareerSkillCreateBulk

CreateBulk returns a builder for creating a bulk of CareerSkill entities.

func (*CareerSkillClient) Delete

func (c *CareerSkillClient) Delete() *CareerSkillDelete

Delete returns a delete builder for CareerSkill.

func (*CareerSkillClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CareerSkillClient) DeleteOneID

func (c *CareerSkillClient) DeleteOneID(id int) *CareerSkillDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CareerSkillClient) Get

func (c *CareerSkillClient) Get(ctx context.Context, id int) (*CareerSkill, error)

Get returns a CareerSkill entity by its id.

func (*CareerSkillClient) GetX

func (c *CareerSkillClient) GetX(ctx context.Context, id int) *CareerSkill

GetX is like Get, but panics if an error occurs.

func (*CareerSkillClient) Hooks

func (c *CareerSkillClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CareerSkillClient) Intercept

func (c *CareerSkillClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `careerskill.Intercept(f(g(h())))`.

func (*CareerSkillClient) Interceptors

func (c *CareerSkillClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CareerSkillClient) Query

func (c *CareerSkillClient) Query() *CareerSkillQuery

Query returns a query builder for CareerSkill.

func (*CareerSkillClient) QueryCareerSkillGroup

func (c *CareerSkillClient) QueryCareerSkillGroup(cs *CareerSkill) *CareerSkillGroupQuery

QueryCareerSkillGroup queries the careerSkillGroup edge of a CareerSkill.

func (*CareerSkillClient) QuerySkill

func (c *CareerSkillClient) QuerySkill(cs *CareerSkill) *SkillQuery

QuerySkill queries the skill edge of a CareerSkill.

func (*CareerSkillClient) Update

func (c *CareerSkillClient) Update() *CareerSkillUpdate

Update returns an update builder for CareerSkill.

func (*CareerSkillClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CareerSkillClient) UpdateOneID

func (c *CareerSkillClient) UpdateOneID(id int) *CareerSkillUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CareerSkillClient) Use

func (c *CareerSkillClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `careerskill.Hooks(f(g(h())))`.

type CareerSkillCreate

type CareerSkillCreate struct {
	// contains filtered or unexported fields
}

CareerSkillCreate is the builder for creating a CareerSkill entity.

func (*CareerSkillCreate) Exec

func (csc *CareerSkillCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CareerSkillCreate) ExecX

func (csc *CareerSkillCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillCreate) Mutation

func (csc *CareerSkillCreate) Mutation() *CareerSkillMutation

Mutation returns the CareerSkillMutation object of the builder.

func (*CareerSkillCreate) OnConflict

func (csc *CareerSkillCreate) OnConflict(opts ...sql.ConflictOption) *CareerSkillUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CareerSkill.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CareerSkillUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*CareerSkillCreate) OnConflictColumns

func (csc *CareerSkillCreate) OnConflictColumns(columns ...string) *CareerSkillUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CareerSkill.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CareerSkillCreate) Save

func (csc *CareerSkillCreate) Save(ctx context.Context) (*CareerSkill, error)

Save creates the CareerSkill in the database.

func (*CareerSkillCreate) SaveX

func (csc *CareerSkillCreate) SaveX(ctx context.Context) *CareerSkill

SaveX calls Save and panics if Save returns an error.

func (*CareerSkillCreate) SetCareerSkillGroup

func (csc *CareerSkillCreate) SetCareerSkillGroup(c *CareerSkillGroup) *CareerSkillCreate

SetCareerSkillGroup sets the "careerSkillGroup" edge to the CareerSkillGroup entity.

func (*CareerSkillCreate) SetCareerSkillGroupID

func (csc *CareerSkillCreate) SetCareerSkillGroupID(id int) *CareerSkillCreate

SetCareerSkillGroupID sets the "careerSkillGroup" edge to the CareerSkillGroup entity by ID.

func (*CareerSkillCreate) SetCreateTime

func (csc *CareerSkillCreate) SetCreateTime(t time.Time) *CareerSkillCreate

SetCreateTime sets the "create_time" field.

func (*CareerSkillCreate) SetNillableCreateTime

func (csc *CareerSkillCreate) SetNillableCreateTime(t *time.Time) *CareerSkillCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*CareerSkillCreate) SetNillableUpdateTime

func (csc *CareerSkillCreate) SetNillableUpdateTime(t *time.Time) *CareerSkillCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*CareerSkillCreate) SetNillableVersion

func (csc *CareerSkillCreate) SetNillableVersion(s *string) *CareerSkillCreate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*CareerSkillCreate) SetSkill

func (csc *CareerSkillCreate) SetSkill(s *Skill) *CareerSkillCreate

SetSkill sets the "skill" edge to the Skill entity.

func (*CareerSkillCreate) SetSkillID

func (csc *CareerSkillCreate) SetSkillID(id int) *CareerSkillCreate

SetSkillID sets the "skill" edge to the Skill entity by ID.

func (*CareerSkillCreate) SetUpdateTime

func (csc *CareerSkillCreate) SetUpdateTime(t time.Time) *CareerSkillCreate

SetUpdateTime sets the "update_time" field.

func (*CareerSkillCreate) SetVersion

func (csc *CareerSkillCreate) SetVersion(s string) *CareerSkillCreate

SetVersion sets the "version" field.

type CareerSkillCreateBulk

type CareerSkillCreateBulk struct {
	// contains filtered or unexported fields
}

CareerSkillCreateBulk is the builder for creating many CareerSkill entities in bulk.

func (*CareerSkillCreateBulk) Exec

func (cscb *CareerSkillCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CareerSkillCreateBulk) ExecX

func (cscb *CareerSkillCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CareerSkill.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CareerSkillUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*CareerSkillCreateBulk) OnConflictColumns

func (cscb *CareerSkillCreateBulk) OnConflictColumns(columns ...string) *CareerSkillUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CareerSkill.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CareerSkillCreateBulk) Save

func (cscb *CareerSkillCreateBulk) Save(ctx context.Context) ([]*CareerSkill, error)

Save creates the CareerSkill entities in the database.

func (*CareerSkillCreateBulk) SaveX

func (cscb *CareerSkillCreateBulk) SaveX(ctx context.Context) []*CareerSkill

SaveX is like Save, but panics if an error occurs.

type CareerSkillDelete

type CareerSkillDelete struct {
	// contains filtered or unexported fields
}

CareerSkillDelete is the builder for deleting a CareerSkill entity.

func (*CareerSkillDelete) Exec

func (csd *CareerSkillDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CareerSkillDelete) ExecX

func (csd *CareerSkillDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillDelete) Where

Where appends a list predicates to the CareerSkillDelete builder.

type CareerSkillDeleteOne

type CareerSkillDeleteOne struct {
	// contains filtered or unexported fields
}

CareerSkillDeleteOne is the builder for deleting a single CareerSkill entity.

func (*CareerSkillDeleteOne) Exec

func (csdo *CareerSkillDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CareerSkillDeleteOne) ExecX

func (csdo *CareerSkillDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillDeleteOne) Where

Where appends a list predicates to the CareerSkillDelete builder.

type CareerSkillEdges

type CareerSkillEdges struct {
	// CareerSkillGroup holds the value of the careerSkillGroup edge.
	CareerSkillGroup *CareerSkillGroup `json:"careerSkillGroup,omitempty"`
	// Skill holds the value of the skill edge.
	Skill *Skill `json:"skill,omitempty"`
	// contains filtered or unexported fields
}

CareerSkillEdges holds the relations/edges for other nodes in the graph.

func (CareerSkillEdges) CareerSkillGroupOrErr

func (e CareerSkillEdges) CareerSkillGroupOrErr() (*CareerSkillGroup, error)

CareerSkillGroupOrErr returns the CareerSkillGroup value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CareerSkillEdges) SkillOrErr

func (e CareerSkillEdges) SkillOrErr() (*Skill, error)

SkillOrErr returns the Skill value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type CareerSkillGroup

type CareerSkillGroup struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Label holds the value of the "label" field.
	Label string `json:"label,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CareerSkillGroupQuery when eager-loading is set.
	Edges CareerSkillGroupEdges `json:"edges"`
	// contains filtered or unexported fields
}

CareerSkillGroup is the model entity for the CareerSkillGroup schema.

func (*CareerSkillGroup) QueryCareer

func (csg *CareerSkillGroup) QueryCareer() *UserCareerQuery

QueryCareer queries the "career" edge of the CareerSkillGroup entity.

func (*CareerSkillGroup) QueryCareerSkills

func (csg *CareerSkillGroup) QueryCareerSkills() *CareerSkillQuery

QueryCareerSkills queries the "careerSkills" edge of the CareerSkillGroup entity.

func (*CareerSkillGroup) String

func (csg *CareerSkillGroup) String() string

String implements the fmt.Stringer.

func (*CareerSkillGroup) Unwrap

func (csg *CareerSkillGroup) Unwrap() *CareerSkillGroup

Unwrap unwraps the CareerSkillGroup 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 (*CareerSkillGroup) Update

Update returns a builder for updating this CareerSkillGroup. Note that you need to call CareerSkillGroup.Unwrap() before calling this method if this CareerSkillGroup was returned from a transaction, and the transaction was committed or rolled back.

func (*CareerSkillGroup) Value

func (csg *CareerSkillGroup) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the CareerSkillGroup. This includes values selected through modifiers, order, etc.

type CareerSkillGroupBy

type CareerSkillGroupBy struct {
	// contains filtered or unexported fields
}

CareerSkillGroupBy is the group-by builder for CareerSkill entities.

func (*CareerSkillGroupBy) Aggregate

func (csgb *CareerSkillGroupBy) Aggregate(fns ...AggregateFunc) *CareerSkillGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*CareerSkillGroupBy) Bool

func (s *CareerSkillGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupBy) BoolX

func (s *CareerSkillGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CareerSkillGroupBy) Bools

func (s *CareerSkillGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupBy) BoolsX

func (s *CareerSkillGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CareerSkillGroupBy) Float64

func (s *CareerSkillGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupBy) Float64X

func (s *CareerSkillGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CareerSkillGroupBy) Float64s

func (s *CareerSkillGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupBy) Float64sX

func (s *CareerSkillGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CareerSkillGroupBy) Int

func (s *CareerSkillGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupBy) IntX

func (s *CareerSkillGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CareerSkillGroupBy) Ints

func (s *CareerSkillGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupBy) IntsX

func (s *CareerSkillGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CareerSkillGroupBy) Scan

func (csgb *CareerSkillGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CareerSkillGroupBy) ScanX

func (s *CareerSkillGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CareerSkillGroupBy) String

func (s *CareerSkillGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupBy) StringX

func (s *CareerSkillGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CareerSkillGroupBy) Strings

func (s *CareerSkillGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupBy) StringsX

func (s *CareerSkillGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CareerSkillGroupClient

type CareerSkillGroupClient struct {
	// contains filtered or unexported fields
}

CareerSkillGroupClient is a client for the CareerSkillGroup schema.

func NewCareerSkillGroupClient

func NewCareerSkillGroupClient(c config) *CareerSkillGroupClient

NewCareerSkillGroupClient returns a client for the CareerSkillGroup from the given config.

func (*CareerSkillGroupClient) Create

Create returns a builder for creating a CareerSkillGroup entity.

func (*CareerSkillGroupClient) CreateBulk

CreateBulk returns a builder for creating a bulk of CareerSkillGroup entities.

func (*CareerSkillGroupClient) Delete

Delete returns a delete builder for CareerSkillGroup.

func (*CareerSkillGroupClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CareerSkillGroupClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CareerSkillGroupClient) Get

Get returns a CareerSkillGroup entity by its id.

func (*CareerSkillGroupClient) GetX

GetX is like Get, but panics if an error occurs.

func (*CareerSkillGroupClient) Hooks

func (c *CareerSkillGroupClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CareerSkillGroupClient) Intercept

func (c *CareerSkillGroupClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `careerskillgroup.Intercept(f(g(h())))`.

func (*CareerSkillGroupClient) Interceptors

func (c *CareerSkillGroupClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CareerSkillGroupClient) Query

Query returns a query builder for CareerSkillGroup.

func (*CareerSkillGroupClient) QueryCareer

QueryCareer queries the career edge of a CareerSkillGroup.

func (*CareerSkillGroupClient) QueryCareerSkills

func (c *CareerSkillGroupClient) QueryCareerSkills(csg *CareerSkillGroup) *CareerSkillQuery

QueryCareerSkills queries the careerSkills edge of a CareerSkillGroup.

func (*CareerSkillGroupClient) Update

Update returns an update builder for CareerSkillGroup.

func (*CareerSkillGroupClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CareerSkillGroupClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*CareerSkillGroupClient) Use

func (c *CareerSkillGroupClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `careerskillgroup.Hooks(f(g(h())))`.

type CareerSkillGroupCreate

type CareerSkillGroupCreate struct {
	// contains filtered or unexported fields
}

CareerSkillGroupCreate is the builder for creating a CareerSkillGroup entity.

func (*CareerSkillGroupCreate) AddCareerSkillIDs

func (csgc *CareerSkillGroupCreate) AddCareerSkillIDs(ids ...int) *CareerSkillGroupCreate

AddCareerSkillIDs adds the "careerSkills" edge to the CareerSkill entity by IDs.

func (*CareerSkillGroupCreate) AddCareerSkills

func (csgc *CareerSkillGroupCreate) AddCareerSkills(c ...*CareerSkill) *CareerSkillGroupCreate

AddCareerSkills adds the "careerSkills" edges to the CareerSkill entity.

func (*CareerSkillGroupCreate) Exec

func (csgc *CareerSkillGroupCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CareerSkillGroupCreate) ExecX

func (csgc *CareerSkillGroupCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillGroupCreate) Mutation

Mutation returns the CareerSkillGroupMutation object of the builder.

func (*CareerSkillGroupCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CareerSkillGroup.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CareerSkillGroupUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*CareerSkillGroupCreate) OnConflictColumns

func (csgc *CareerSkillGroupCreate) OnConflictColumns(columns ...string) *CareerSkillGroupUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CareerSkillGroup.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CareerSkillGroupCreate) Save

Save creates the CareerSkillGroup in the database.

func (*CareerSkillGroupCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*CareerSkillGroupCreate) SetCareer

SetCareer sets the "career" edge to the UserCareer entity.

func (*CareerSkillGroupCreate) SetCareerID

func (csgc *CareerSkillGroupCreate) SetCareerID(id int) *CareerSkillGroupCreate

SetCareerID sets the "career" edge to the UserCareer entity by ID.

func (*CareerSkillGroupCreate) SetCreateTime

func (csgc *CareerSkillGroupCreate) SetCreateTime(t time.Time) *CareerSkillGroupCreate

SetCreateTime sets the "create_time" field.

func (*CareerSkillGroupCreate) SetLabel

SetLabel sets the "label" field.

func (*CareerSkillGroupCreate) SetNillableCreateTime

func (csgc *CareerSkillGroupCreate) SetNillableCreateTime(t *time.Time) *CareerSkillGroupCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*CareerSkillGroupCreate) SetNillableUpdateTime

func (csgc *CareerSkillGroupCreate) SetNillableUpdateTime(t *time.Time) *CareerSkillGroupCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*CareerSkillGroupCreate) SetUpdateTime

func (csgc *CareerSkillGroupCreate) SetUpdateTime(t time.Time) *CareerSkillGroupCreate

SetUpdateTime sets the "update_time" field.

type CareerSkillGroupCreateBulk

type CareerSkillGroupCreateBulk struct {
	// contains filtered or unexported fields
}

CareerSkillGroupCreateBulk is the builder for creating many CareerSkillGroup entities in bulk.

func (*CareerSkillGroupCreateBulk) Exec

Exec executes the query.

func (*CareerSkillGroupCreateBulk) ExecX

func (csgcb *CareerSkillGroupCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillGroupCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CareerSkillGroup.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CareerSkillGroupUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*CareerSkillGroupCreateBulk) OnConflictColumns

func (csgcb *CareerSkillGroupCreateBulk) OnConflictColumns(columns ...string) *CareerSkillGroupUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CareerSkillGroup.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CareerSkillGroupCreateBulk) Save

Save creates the CareerSkillGroup entities in the database.

func (*CareerSkillGroupCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type CareerSkillGroupDelete

type CareerSkillGroupDelete struct {
	// contains filtered or unexported fields
}

CareerSkillGroupDelete is the builder for deleting a CareerSkillGroup entity.

func (*CareerSkillGroupDelete) Exec

func (csgd *CareerSkillGroupDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CareerSkillGroupDelete) ExecX

func (csgd *CareerSkillGroupDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillGroupDelete) Where

Where appends a list predicates to the CareerSkillGroupDelete builder.

type CareerSkillGroupDeleteOne

type CareerSkillGroupDeleteOne struct {
	// contains filtered or unexported fields
}

CareerSkillGroupDeleteOne is the builder for deleting a single CareerSkillGroup entity.

func (*CareerSkillGroupDeleteOne) Exec

Exec executes the deletion query.

func (*CareerSkillGroupDeleteOne) ExecX

func (csgdo *CareerSkillGroupDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillGroupDeleteOne) Where

Where appends a list predicates to the CareerSkillGroupDelete builder.

type CareerSkillGroupEdges

type CareerSkillGroupEdges struct {
	// Career holds the value of the career edge.
	Career *UserCareer `json:"career,omitempty"`
	// CareerSkills holds the value of the careerSkills edge.
	CareerSkills []*CareerSkill `json:"careerSkills,omitempty"`
	// contains filtered or unexported fields
}

CareerSkillGroupEdges holds the relations/edges for other nodes in the graph.

func (CareerSkillGroupEdges) CareerOrErr

func (e CareerSkillGroupEdges) CareerOrErr() (*UserCareer, error)

CareerOrErr returns the Career value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CareerSkillGroupEdges) CareerSkillsOrErr

func (e CareerSkillGroupEdges) CareerSkillsOrErr() ([]*CareerSkill, error)

CareerSkillsOrErr returns the CareerSkills value or an error if the edge was not loaded in eager-loading.

type CareerSkillGroupGroupBy

type CareerSkillGroupGroupBy struct {
	// contains filtered or unexported fields
}

CareerSkillGroupGroupBy is the group-by builder for CareerSkillGroup entities.

func (*CareerSkillGroupGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*CareerSkillGroupGroupBy) Bool

func (s *CareerSkillGroupGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupGroupBy) BoolX

func (s *CareerSkillGroupGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CareerSkillGroupGroupBy) Bools

func (s *CareerSkillGroupGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupGroupBy) BoolsX

func (s *CareerSkillGroupGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CareerSkillGroupGroupBy) Float64

func (s *CareerSkillGroupGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupGroupBy) Float64X

func (s *CareerSkillGroupGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CareerSkillGroupGroupBy) Float64s

func (s *CareerSkillGroupGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupGroupBy) Float64sX

func (s *CareerSkillGroupGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CareerSkillGroupGroupBy) Int

func (s *CareerSkillGroupGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupGroupBy) IntX

func (s *CareerSkillGroupGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CareerSkillGroupGroupBy) Ints

func (s *CareerSkillGroupGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupGroupBy) IntsX

func (s *CareerSkillGroupGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CareerSkillGroupGroupBy) Scan

func (csggb *CareerSkillGroupGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CareerSkillGroupGroupBy) ScanX

func (s *CareerSkillGroupGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CareerSkillGroupGroupBy) String

func (s *CareerSkillGroupGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupGroupBy) StringX

func (s *CareerSkillGroupGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CareerSkillGroupGroupBy) Strings

func (s *CareerSkillGroupGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupGroupBy) StringsX

func (s *CareerSkillGroupGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CareerSkillGroupMutation

type CareerSkillGroupMutation struct {
	// contains filtered or unexported fields
}

CareerSkillGroupMutation represents an operation that mutates the CareerSkillGroup nodes in the graph.

func (*CareerSkillGroupMutation) AddCareerSkillIDs

func (m *CareerSkillGroupMutation) AddCareerSkillIDs(ids ...int)

AddCareerSkillIDs adds the "careerSkills" edge to the CareerSkill entity by ids.

func (*CareerSkillGroupMutation) AddField

func (m *CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) AddedEdges

func (m *CareerSkillGroupMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CareerSkillGroupMutation) AddedField

func (m *CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) AddedFields

func (m *CareerSkillGroupMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CareerSkillGroupMutation) AddedIDs

func (m *CareerSkillGroupMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CareerSkillGroupMutation) CareerCleared

func (m *CareerSkillGroupMutation) CareerCleared() bool

CareerCleared reports if the "career" edge to the UserCareer entity was cleared.

func (*CareerSkillGroupMutation) CareerID

func (m *CareerSkillGroupMutation) CareerID() (id int, exists bool)

CareerID returns the "career" edge ID in the mutation.

func (*CareerSkillGroupMutation) CareerIDs

func (m *CareerSkillGroupMutation) CareerIDs() (ids []int)

CareerIDs returns the "career" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CareerID instead. It exists only for internal usage by the builders.

func (*CareerSkillGroupMutation) CareerSkillsCleared

func (m *CareerSkillGroupMutation) CareerSkillsCleared() bool

CareerSkillsCleared reports if the "careerSkills" edge to the CareerSkill entity was cleared.

func (*CareerSkillGroupMutation) CareerSkillsIDs

func (m *CareerSkillGroupMutation) CareerSkillsIDs() (ids []int)

CareerSkillsIDs returns the "careerSkills" edge IDs in the mutation.

func (*CareerSkillGroupMutation) ClearCareer

func (m *CareerSkillGroupMutation) ClearCareer()

ClearCareer clears the "career" edge to the UserCareer entity.

func (*CareerSkillGroupMutation) ClearCareerSkills

func (m *CareerSkillGroupMutation) ClearCareerSkills()

ClearCareerSkills clears the "careerSkills" edge to the CareerSkill entity.

func (*CareerSkillGroupMutation) ClearEdge

func (m *CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) ClearField

func (m *CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) ClearedEdges

func (m *CareerSkillGroupMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CareerSkillGroupMutation) ClearedFields

func (m *CareerSkillGroupMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CareerSkillGroupMutation) Client

func (m CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) CreateTime

func (m *CareerSkillGroupMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*CareerSkillGroupMutation) EdgeCleared

func (m *CareerSkillGroupMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CareerSkillGroupMutation) Field

func (m *CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) FieldCleared

func (m *CareerSkillGroupMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CareerSkillGroupMutation) Fields

func (m *CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) ID

func (m *CareerSkillGroupMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CareerSkillGroupMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CareerSkillGroupMutation) Label

func (m *CareerSkillGroupMutation) Label() (r string, exists bool)

Label returns the value of the "label" field in the mutation.

func (*CareerSkillGroupMutation) OldCreateTime

func (m *CareerSkillGroupMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the CareerSkillGroup entity. If the CareerSkillGroup 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 (*CareerSkillGroupMutation) OldField

func (m *CareerSkillGroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*CareerSkillGroupMutation) OldLabel

func (m *CareerSkillGroupMutation) OldLabel(ctx context.Context) (v string, err error)

OldLabel returns the old "label" field's value of the CareerSkillGroup entity. If the CareerSkillGroup 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 (*CareerSkillGroupMutation) OldUpdateTime

func (m *CareerSkillGroupMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the CareerSkillGroup entity. If the CareerSkillGroup 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 (*CareerSkillGroupMutation) Op

func (m *CareerSkillGroupMutation) Op() Op

Op returns the operation name.

func (*CareerSkillGroupMutation) RemoveCareerSkillIDs

func (m *CareerSkillGroupMutation) RemoveCareerSkillIDs(ids ...int)

RemoveCareerSkillIDs removes the "careerSkills" edge to the CareerSkill entity by IDs.

func (*CareerSkillGroupMutation) RemovedCareerSkillsIDs

func (m *CareerSkillGroupMutation) RemovedCareerSkillsIDs() (ids []int)

RemovedCareerSkills returns the removed IDs of the "careerSkills" edge to the CareerSkill entity.

func (*CareerSkillGroupMutation) RemovedEdges

func (m *CareerSkillGroupMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CareerSkillGroupMutation) RemovedIDs

func (m *CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) ResetCareer

func (m *CareerSkillGroupMutation) ResetCareer()

ResetCareer resets all changes to the "career" edge.

func (*CareerSkillGroupMutation) ResetCareerSkills

func (m *CareerSkillGroupMutation) ResetCareerSkills()

ResetCareerSkills resets all changes to the "careerSkills" edge.

func (*CareerSkillGroupMutation) ResetCreateTime

func (m *CareerSkillGroupMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*CareerSkillGroupMutation) ResetEdge

func (m *CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) ResetField

func (m *CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) ResetLabel

func (m *CareerSkillGroupMutation) ResetLabel()

ResetLabel resets all changes to the "label" field.

func (*CareerSkillGroupMutation) ResetUpdateTime

func (m *CareerSkillGroupMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*CareerSkillGroupMutation) SetCareerID

func (m *CareerSkillGroupMutation) SetCareerID(id int)

SetCareerID sets the "career" edge to the UserCareer entity by id.

func (*CareerSkillGroupMutation) SetCreateTime

func (m *CareerSkillGroupMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*CareerSkillGroupMutation) SetField

func (m *CareerSkillGroupMutation) 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 (*CareerSkillGroupMutation) SetLabel

func (m *CareerSkillGroupMutation) SetLabel(s string)

SetLabel sets the "label" field.

func (*CareerSkillGroupMutation) SetOp

func (m *CareerSkillGroupMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CareerSkillGroupMutation) SetUpdateTime

func (m *CareerSkillGroupMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (CareerSkillGroupMutation) Tx

func (m CareerSkillGroupMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CareerSkillGroupMutation) Type

func (m *CareerSkillGroupMutation) Type() string

Type returns the node type of this mutation (CareerSkillGroup).

func (*CareerSkillGroupMutation) UpdateTime

func (m *CareerSkillGroupMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*CareerSkillGroupMutation) Where

Where appends a list predicates to the CareerSkillGroupMutation builder.

func (*CareerSkillGroupMutation) WhereP

func (m *CareerSkillGroupMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CareerSkillGroupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CareerSkillGroupQuery

type CareerSkillGroupQuery struct {
	// contains filtered or unexported fields
}

CareerSkillGroupQuery is the builder for querying CareerSkillGroup entities.

func (*CareerSkillGroupQuery) Aggregate

Aggregate returns a CareerSkillGroupSelect configured with the given aggregations.

func (*CareerSkillGroupQuery) All

All executes the query and returns a list of CareerSkillGroups.

func (*CareerSkillGroupQuery) AllX

AllX is like All, but panics if an error occurs.

func (*CareerSkillGroupQuery) Clone

Clone returns a duplicate of the CareerSkillGroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CareerSkillGroupQuery) Count

func (csgq *CareerSkillGroupQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CareerSkillGroupQuery) CountX

func (csgq *CareerSkillGroupQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CareerSkillGroupQuery) Exist

func (csgq *CareerSkillGroupQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CareerSkillGroupQuery) ExistX

func (csgq *CareerSkillGroupQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CareerSkillGroupQuery) First

First returns the first CareerSkillGroup entity from the query. Returns a *NotFoundError when no CareerSkillGroup was found.

func (*CareerSkillGroupQuery) FirstID

func (csgq *CareerSkillGroupQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first CareerSkillGroup ID from the query. Returns a *NotFoundError when no CareerSkillGroup ID was found.

func (*CareerSkillGroupQuery) FirstIDX

func (csgq *CareerSkillGroupQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*CareerSkillGroupQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*CareerSkillGroupQuery) GroupBy

func (csgq *CareerSkillGroupQuery) GroupBy(field string, fields ...string) *CareerSkillGroupGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CareerSkillGroup.Query().
	GroupBy(careerskillgroup.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CareerSkillGroupQuery) IDs

func (csgq *CareerSkillGroupQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of CareerSkillGroup IDs.

func (*CareerSkillGroupQuery) IDsX

func (csgq *CareerSkillGroupQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*CareerSkillGroupQuery) Limit

func (csgq *CareerSkillGroupQuery) Limit(limit int) *CareerSkillGroupQuery

Limit the number of records to be returned by this query.

func (*CareerSkillGroupQuery) Offset

func (csgq *CareerSkillGroupQuery) Offset(offset int) *CareerSkillGroupQuery

Offset to start from.

func (*CareerSkillGroupQuery) Only

Only returns a single CareerSkillGroup entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CareerSkillGroup entity is found. Returns a *NotFoundError when no CareerSkillGroup entities are found.

func (*CareerSkillGroupQuery) OnlyID

func (csgq *CareerSkillGroupQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only CareerSkillGroup ID in the query. Returns a *NotSingularError when more than one CareerSkillGroup ID is found. Returns a *NotFoundError when no entities are found.

func (*CareerSkillGroupQuery) OnlyIDX

func (csgq *CareerSkillGroupQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CareerSkillGroupQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*CareerSkillGroupQuery) Order

Order specifies how the records should be ordered.

func (*CareerSkillGroupQuery) QueryCareer

func (csgq *CareerSkillGroupQuery) QueryCareer() *UserCareerQuery

QueryCareer chains the current query on the "career" edge.

func (*CareerSkillGroupQuery) QueryCareerSkills

func (csgq *CareerSkillGroupQuery) QueryCareerSkills() *CareerSkillQuery

QueryCareerSkills chains the current query on the "careerSkills" edge.

func (*CareerSkillGroupQuery) Select

func (csgq *CareerSkillGroupQuery) Select(fields ...string) *CareerSkillGroupSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.CareerSkillGroup.Query().
	Select(careerskillgroup.FieldCreateTime).
	Scan(ctx, &v)

func (*CareerSkillGroupQuery) Unique

func (csgq *CareerSkillGroupQuery) Unique(unique bool) *CareerSkillGroupQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CareerSkillGroupQuery) Where

Where adds a new predicate for the CareerSkillGroupQuery builder.

func (*CareerSkillGroupQuery) WithCareer

func (csgq *CareerSkillGroupQuery) WithCareer(opts ...func(*UserCareerQuery)) *CareerSkillGroupQuery

WithCareer tells the query-builder to eager-load the nodes that are connected to the "career" edge. The optional arguments are used to configure the query builder of the edge.

func (*CareerSkillGroupQuery) WithCareerSkills

func (csgq *CareerSkillGroupQuery) WithCareerSkills(opts ...func(*CareerSkillQuery)) *CareerSkillGroupQuery

WithCareerSkills tells the query-builder to eager-load the nodes that are connected to the "careerSkills" edge. The optional arguments are used to configure the query builder of the edge.

type CareerSkillGroupSelect

type CareerSkillGroupSelect struct {
	*CareerSkillGroupQuery
	// contains filtered or unexported fields
}

CareerSkillGroupSelect is the builder for selecting fields of CareerSkillGroup entities.

func (*CareerSkillGroupSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*CareerSkillGroupSelect) Bool

func (s *CareerSkillGroupSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupSelect) BoolX

func (s *CareerSkillGroupSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CareerSkillGroupSelect) Bools

func (s *CareerSkillGroupSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupSelect) BoolsX

func (s *CareerSkillGroupSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CareerSkillGroupSelect) Float64

func (s *CareerSkillGroupSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupSelect) Float64X

func (s *CareerSkillGroupSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CareerSkillGroupSelect) Float64s

func (s *CareerSkillGroupSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupSelect) Float64sX

func (s *CareerSkillGroupSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CareerSkillGroupSelect) Int

func (s *CareerSkillGroupSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupSelect) IntX

func (s *CareerSkillGroupSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CareerSkillGroupSelect) Ints

func (s *CareerSkillGroupSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupSelect) IntsX

func (s *CareerSkillGroupSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CareerSkillGroupSelect) Scan

func (csgs *CareerSkillGroupSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CareerSkillGroupSelect) ScanX

func (s *CareerSkillGroupSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CareerSkillGroupSelect) String

func (s *CareerSkillGroupSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupSelect) StringX

func (s *CareerSkillGroupSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CareerSkillGroupSelect) Strings

func (s *CareerSkillGroupSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CareerSkillGroupSelect) StringsX

func (s *CareerSkillGroupSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CareerSkillGroupUpdate

type CareerSkillGroupUpdate struct {
	// contains filtered or unexported fields
}

CareerSkillGroupUpdate is the builder for updating CareerSkillGroup entities.

func (*CareerSkillGroupUpdate) AddCareerSkillIDs

func (csgu *CareerSkillGroupUpdate) AddCareerSkillIDs(ids ...int) *CareerSkillGroupUpdate

AddCareerSkillIDs adds the "careerSkills" edge to the CareerSkill entity by IDs.

func (*CareerSkillGroupUpdate) AddCareerSkills

func (csgu *CareerSkillGroupUpdate) AddCareerSkills(c ...*CareerSkill) *CareerSkillGroupUpdate

AddCareerSkills adds the "careerSkills" edges to the CareerSkill entity.

func (*CareerSkillGroupUpdate) ClearCareer

func (csgu *CareerSkillGroupUpdate) ClearCareer() *CareerSkillGroupUpdate

ClearCareer clears the "career" edge to the UserCareer entity.

func (*CareerSkillGroupUpdate) ClearCareerSkills

func (csgu *CareerSkillGroupUpdate) ClearCareerSkills() *CareerSkillGroupUpdate

ClearCareerSkills clears all "careerSkills" edges to the CareerSkill entity.

func (*CareerSkillGroupUpdate) Exec

func (csgu *CareerSkillGroupUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CareerSkillGroupUpdate) ExecX

func (csgu *CareerSkillGroupUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillGroupUpdate) Mutation

Mutation returns the CareerSkillGroupMutation object of the builder.

func (*CareerSkillGroupUpdate) RemoveCareerSkillIDs

func (csgu *CareerSkillGroupUpdate) RemoveCareerSkillIDs(ids ...int) *CareerSkillGroupUpdate

RemoveCareerSkillIDs removes the "careerSkills" edge to CareerSkill entities by IDs.

func (*CareerSkillGroupUpdate) RemoveCareerSkills

func (csgu *CareerSkillGroupUpdate) RemoveCareerSkills(c ...*CareerSkill) *CareerSkillGroupUpdate

RemoveCareerSkills removes "careerSkills" edges to CareerSkill entities.

func (*CareerSkillGroupUpdate) Save

func (csgu *CareerSkillGroupUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CareerSkillGroupUpdate) SaveX

func (csgu *CareerSkillGroupUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CareerSkillGroupUpdate) SetCareer

SetCareer sets the "career" edge to the UserCareer entity.

func (*CareerSkillGroupUpdate) SetCareerID

func (csgu *CareerSkillGroupUpdate) SetCareerID(id int) *CareerSkillGroupUpdate

SetCareerID sets the "career" edge to the UserCareer entity by ID.

func (*CareerSkillGroupUpdate) SetLabel

SetLabel sets the "label" field.

func (*CareerSkillGroupUpdate) SetUpdateTime

func (csgu *CareerSkillGroupUpdate) SetUpdateTime(t time.Time) *CareerSkillGroupUpdate

SetUpdateTime sets the "update_time" field.

func (*CareerSkillGroupUpdate) Where

Where appends a list predicates to the CareerSkillGroupUpdate builder.

type CareerSkillGroupUpdateOne

type CareerSkillGroupUpdateOne struct {
	// contains filtered or unexported fields
}

CareerSkillGroupUpdateOne is the builder for updating a single CareerSkillGroup entity.

func (*CareerSkillGroupUpdateOne) AddCareerSkillIDs

func (csguo *CareerSkillGroupUpdateOne) AddCareerSkillIDs(ids ...int) *CareerSkillGroupUpdateOne

AddCareerSkillIDs adds the "careerSkills" edge to the CareerSkill entity by IDs.

func (*CareerSkillGroupUpdateOne) AddCareerSkills

func (csguo *CareerSkillGroupUpdateOne) AddCareerSkills(c ...*CareerSkill) *CareerSkillGroupUpdateOne

AddCareerSkills adds the "careerSkills" edges to the CareerSkill entity.

func (*CareerSkillGroupUpdateOne) ClearCareer

ClearCareer clears the "career" edge to the UserCareer entity.

func (*CareerSkillGroupUpdateOne) ClearCareerSkills

func (csguo *CareerSkillGroupUpdateOne) ClearCareerSkills() *CareerSkillGroupUpdateOne

ClearCareerSkills clears all "careerSkills" edges to the CareerSkill entity.

func (*CareerSkillGroupUpdateOne) Exec

Exec executes the query on the entity.

func (*CareerSkillGroupUpdateOne) ExecX

func (csguo *CareerSkillGroupUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillGroupUpdateOne) Mutation

Mutation returns the CareerSkillGroupMutation object of the builder.

func (*CareerSkillGroupUpdateOne) RemoveCareerSkillIDs

func (csguo *CareerSkillGroupUpdateOne) RemoveCareerSkillIDs(ids ...int) *CareerSkillGroupUpdateOne

RemoveCareerSkillIDs removes the "careerSkills" edge to CareerSkill entities by IDs.

func (*CareerSkillGroupUpdateOne) RemoveCareerSkills

func (csguo *CareerSkillGroupUpdateOne) RemoveCareerSkills(c ...*CareerSkill) *CareerSkillGroupUpdateOne

RemoveCareerSkills removes "careerSkills" edges to CareerSkill entities.

func (*CareerSkillGroupUpdateOne) Save

Save executes the query and returns the updated CareerSkillGroup entity.

func (*CareerSkillGroupUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*CareerSkillGroupUpdateOne) Select

func (csguo *CareerSkillGroupUpdateOne) Select(field string, fields ...string) *CareerSkillGroupUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CareerSkillGroupUpdateOne) SetCareer

SetCareer sets the "career" edge to the UserCareer entity.

func (*CareerSkillGroupUpdateOne) SetCareerID

SetCareerID sets the "career" edge to the UserCareer entity by ID.

func (*CareerSkillGroupUpdateOne) SetLabel

SetLabel sets the "label" field.

func (*CareerSkillGroupUpdateOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*CareerSkillGroupUpdateOne) Where

Where appends a list predicates to the CareerSkillGroupUpdate builder.

type CareerSkillGroupUpsert

type CareerSkillGroupUpsert struct {
	*sql.UpdateSet
}

CareerSkillGroupUpsert is the "OnConflict" setter.

func (*CareerSkillGroupUpsert) SetLabel

SetLabel sets the "label" field.

func (*CareerSkillGroupUpsert) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*CareerSkillGroupUpsert) UpdateLabel

UpdateLabel sets the "label" field to the value that was provided on create.

func (*CareerSkillGroupUpsert) UpdateUpdateTime

func (u *CareerSkillGroupUpsert) UpdateUpdateTime() *CareerSkillGroupUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type CareerSkillGroupUpsertBulk

type CareerSkillGroupUpsertBulk struct {
	// contains filtered or unexported fields
}

CareerSkillGroupUpsertBulk is the builder for "upsert"-ing a bulk of CareerSkillGroup nodes.

func (*CareerSkillGroupUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CareerSkillGroupUpsertBulk) Exec

Exec executes the query.

func (*CareerSkillGroupUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillGroupUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CareerSkillGroup.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CareerSkillGroupUpsertBulk) SetLabel

SetLabel sets the "label" field.

func (*CareerSkillGroupUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*CareerSkillGroupUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CareerSkillGroupCreateBulk.OnConflict documentation for more info.

func (*CareerSkillGroupUpsertBulk) UpdateLabel

UpdateLabel sets the "label" field to the value that was provided on create.

func (*CareerSkillGroupUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CareerSkillGroup.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*CareerSkillGroupUpsertBulk) UpdateUpdateTime

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type CareerSkillGroupUpsertOne

type CareerSkillGroupUpsertOne struct {
	// contains filtered or unexported fields
}

CareerSkillGroupUpsertOne is the builder for "upsert"-ing

one CareerSkillGroup node.

func (*CareerSkillGroupUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CareerSkillGroupUpsertOne) Exec

Exec executes the query.

func (*CareerSkillGroupUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillGroupUpsertOne) ID

func (u *CareerSkillGroupUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CareerSkillGroupUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*CareerSkillGroupUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CareerSkillGroup.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CareerSkillGroupUpsertOne) SetLabel

SetLabel sets the "label" field.

func (*CareerSkillGroupUpsertOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*CareerSkillGroupUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CareerSkillGroupCreate.OnConflict documentation for more info.

func (*CareerSkillGroupUpsertOne) UpdateLabel

UpdateLabel sets the "label" field to the value that was provided on create.

func (*CareerSkillGroupUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CareerSkillGroup.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*CareerSkillGroupUpsertOne) UpdateUpdateTime

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type CareerSkillGroups

type CareerSkillGroups []*CareerSkillGroup

CareerSkillGroups is a parsable slice of CareerSkillGroup.

type CareerSkillMutation

type CareerSkillMutation struct {
	// contains filtered or unexported fields
}

CareerSkillMutation represents an operation that mutates the CareerSkill nodes in the graph.

func (*CareerSkillMutation) AddField

func (m *CareerSkillMutation) 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 (*CareerSkillMutation) AddedEdges

func (m *CareerSkillMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CareerSkillMutation) AddedField

func (m *CareerSkillMutation) 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 (*CareerSkillMutation) AddedFields

func (m *CareerSkillMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CareerSkillMutation) AddedIDs

func (m *CareerSkillMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CareerSkillMutation) CareerSkillGroupCleared

func (m *CareerSkillMutation) CareerSkillGroupCleared() bool

CareerSkillGroupCleared reports if the "careerSkillGroup" edge to the CareerSkillGroup entity was cleared.

func (*CareerSkillMutation) CareerSkillGroupID

func (m *CareerSkillMutation) CareerSkillGroupID() (id int, exists bool)

CareerSkillGroupID returns the "careerSkillGroup" edge ID in the mutation.

func (*CareerSkillMutation) CareerSkillGroupIDs

func (m *CareerSkillMutation) CareerSkillGroupIDs() (ids []int)

CareerSkillGroupIDs returns the "careerSkillGroup" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CareerSkillGroupID instead. It exists only for internal usage by the builders.

func (*CareerSkillMutation) ClearCareerSkillGroup

func (m *CareerSkillMutation) ClearCareerSkillGroup()

ClearCareerSkillGroup clears the "careerSkillGroup" edge to the CareerSkillGroup entity.

func (*CareerSkillMutation) ClearEdge

func (m *CareerSkillMutation) 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 (*CareerSkillMutation) ClearField

func (m *CareerSkillMutation) 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 (*CareerSkillMutation) ClearSkill

func (m *CareerSkillMutation) ClearSkill()

ClearSkill clears the "skill" edge to the Skill entity.

func (*CareerSkillMutation) ClearVersion

func (m *CareerSkillMutation) ClearVersion()

ClearVersion clears the value of the "version" field.

func (*CareerSkillMutation) ClearedEdges

func (m *CareerSkillMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CareerSkillMutation) ClearedFields

func (m *CareerSkillMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CareerSkillMutation) Client

func (m CareerSkillMutation) 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 (*CareerSkillMutation) CreateTime

func (m *CareerSkillMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*CareerSkillMutation) EdgeCleared

func (m *CareerSkillMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CareerSkillMutation) Field

func (m *CareerSkillMutation) 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 (*CareerSkillMutation) FieldCleared

func (m *CareerSkillMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CareerSkillMutation) Fields

func (m *CareerSkillMutation) 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 (*CareerSkillMutation) ID

func (m *CareerSkillMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CareerSkillMutation) IDs

func (m *CareerSkillMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CareerSkillMutation) OldCreateTime

func (m *CareerSkillMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the CareerSkill entity. If the CareerSkill 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 (*CareerSkillMutation) OldField

func (m *CareerSkillMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*CareerSkillMutation) OldUpdateTime

func (m *CareerSkillMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the CareerSkill entity. If the CareerSkill 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 (*CareerSkillMutation) OldVersion

func (m *CareerSkillMutation) OldVersion(ctx context.Context) (v *string, err error)

OldVersion returns the old "version" field's value of the CareerSkill entity. If the CareerSkill 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 (*CareerSkillMutation) Op

func (m *CareerSkillMutation) Op() Op

Op returns the operation name.

func (*CareerSkillMutation) RemovedEdges

func (m *CareerSkillMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CareerSkillMutation) RemovedIDs

func (m *CareerSkillMutation) 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 (*CareerSkillMutation) ResetCareerSkillGroup

func (m *CareerSkillMutation) ResetCareerSkillGroup()

ResetCareerSkillGroup resets all changes to the "careerSkillGroup" edge.

func (*CareerSkillMutation) ResetCreateTime

func (m *CareerSkillMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*CareerSkillMutation) ResetEdge

func (m *CareerSkillMutation) 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 (*CareerSkillMutation) ResetField

func (m *CareerSkillMutation) 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 (*CareerSkillMutation) ResetSkill

func (m *CareerSkillMutation) ResetSkill()

ResetSkill resets all changes to the "skill" edge.

func (*CareerSkillMutation) ResetUpdateTime

func (m *CareerSkillMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*CareerSkillMutation) ResetVersion

func (m *CareerSkillMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*CareerSkillMutation) SetCareerSkillGroupID

func (m *CareerSkillMutation) SetCareerSkillGroupID(id int)

SetCareerSkillGroupID sets the "careerSkillGroup" edge to the CareerSkillGroup entity by id.

func (*CareerSkillMutation) SetCreateTime

func (m *CareerSkillMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*CareerSkillMutation) SetField

func (m *CareerSkillMutation) 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 (*CareerSkillMutation) SetOp

func (m *CareerSkillMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CareerSkillMutation) SetSkillID

func (m *CareerSkillMutation) SetSkillID(id int)

SetSkillID sets the "skill" edge to the Skill entity by id.

func (*CareerSkillMutation) SetUpdateTime

func (m *CareerSkillMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*CareerSkillMutation) SetVersion

func (m *CareerSkillMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (*CareerSkillMutation) SkillCleared

func (m *CareerSkillMutation) SkillCleared() bool

SkillCleared reports if the "skill" edge to the Skill entity was cleared.

func (*CareerSkillMutation) SkillID

func (m *CareerSkillMutation) SkillID() (id int, exists bool)

SkillID returns the "skill" edge ID in the mutation.

func (*CareerSkillMutation) SkillIDs

func (m *CareerSkillMutation) SkillIDs() (ids []int)

SkillIDs returns the "skill" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SkillID instead. It exists only for internal usage by the builders.

func (CareerSkillMutation) Tx

func (m CareerSkillMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CareerSkillMutation) Type

func (m *CareerSkillMutation) Type() string

Type returns the node type of this mutation (CareerSkill).

func (*CareerSkillMutation) UpdateTime

func (m *CareerSkillMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*CareerSkillMutation) Version

func (m *CareerSkillMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*CareerSkillMutation) VersionCleared

func (m *CareerSkillMutation) VersionCleared() bool

VersionCleared returns if the "version" field was cleared in this mutation.

func (*CareerSkillMutation) Where

func (m *CareerSkillMutation) Where(ps ...predicate.CareerSkill)

Where appends a list predicates to the CareerSkillMutation builder.

func (*CareerSkillMutation) WhereP

func (m *CareerSkillMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CareerSkillMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CareerSkillQuery

type CareerSkillQuery struct {
	// contains filtered or unexported fields
}

CareerSkillQuery is the builder for querying CareerSkill entities.

func (*CareerSkillQuery) Aggregate

func (csq *CareerSkillQuery) Aggregate(fns ...AggregateFunc) *CareerSkillSelect

Aggregate returns a CareerSkillSelect configured with the given aggregations.

func (*CareerSkillQuery) All

func (csq *CareerSkillQuery) All(ctx context.Context) ([]*CareerSkill, error)

All executes the query and returns a list of CareerSkills.

func (*CareerSkillQuery) AllX

func (csq *CareerSkillQuery) AllX(ctx context.Context) []*CareerSkill

AllX is like All, but panics if an error occurs.

func (*CareerSkillQuery) Clone

func (csq *CareerSkillQuery) Clone() *CareerSkillQuery

Clone returns a duplicate of the CareerSkillQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CareerSkillQuery) Count

func (csq *CareerSkillQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CareerSkillQuery) CountX

func (csq *CareerSkillQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CareerSkillQuery) Exist

func (csq *CareerSkillQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CareerSkillQuery) ExistX

func (csq *CareerSkillQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CareerSkillQuery) First

func (csq *CareerSkillQuery) First(ctx context.Context) (*CareerSkill, error)

First returns the first CareerSkill entity from the query. Returns a *NotFoundError when no CareerSkill was found.

func (*CareerSkillQuery) FirstID

func (csq *CareerSkillQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first CareerSkill ID from the query. Returns a *NotFoundError when no CareerSkill ID was found.

func (*CareerSkillQuery) FirstIDX

func (csq *CareerSkillQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*CareerSkillQuery) FirstX

func (csq *CareerSkillQuery) FirstX(ctx context.Context) *CareerSkill

FirstX is like First, but panics if an error occurs.

func (*CareerSkillQuery) GroupBy

func (csq *CareerSkillQuery) GroupBy(field string, fields ...string) *CareerSkillGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CareerSkill.Query().
	GroupBy(careerskill.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CareerSkillQuery) IDs

func (csq *CareerSkillQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of CareerSkill IDs.

func (*CareerSkillQuery) IDsX

func (csq *CareerSkillQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*CareerSkillQuery) Limit

func (csq *CareerSkillQuery) Limit(limit int) *CareerSkillQuery

Limit the number of records to be returned by this query.

func (*CareerSkillQuery) Offset

func (csq *CareerSkillQuery) Offset(offset int) *CareerSkillQuery

Offset to start from.

func (*CareerSkillQuery) Only

func (csq *CareerSkillQuery) Only(ctx context.Context) (*CareerSkill, error)

Only returns a single CareerSkill entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CareerSkill entity is found. Returns a *NotFoundError when no CareerSkill entities are found.

func (*CareerSkillQuery) OnlyID

func (csq *CareerSkillQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only CareerSkill ID in the query. Returns a *NotSingularError when more than one CareerSkill ID is found. Returns a *NotFoundError when no entities are found.

func (*CareerSkillQuery) OnlyIDX

func (csq *CareerSkillQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CareerSkillQuery) OnlyX

func (csq *CareerSkillQuery) OnlyX(ctx context.Context) *CareerSkill

OnlyX is like Only, but panics if an error occurs.

func (*CareerSkillQuery) Order

Order specifies how the records should be ordered.

func (*CareerSkillQuery) QueryCareerSkillGroup

func (csq *CareerSkillQuery) QueryCareerSkillGroup() *CareerSkillGroupQuery

QueryCareerSkillGroup chains the current query on the "careerSkillGroup" edge.

func (*CareerSkillQuery) QuerySkill

func (csq *CareerSkillQuery) QuerySkill() *SkillQuery

QuerySkill chains the current query on the "skill" edge.

func (*CareerSkillQuery) Select

func (csq *CareerSkillQuery) Select(fields ...string) *CareerSkillSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.CareerSkill.Query().
	Select(careerskill.FieldCreateTime).
	Scan(ctx, &v)

func (*CareerSkillQuery) Unique

func (csq *CareerSkillQuery) Unique(unique bool) *CareerSkillQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CareerSkillQuery) Where

Where adds a new predicate for the CareerSkillQuery builder.

func (*CareerSkillQuery) WithCareerSkillGroup

func (csq *CareerSkillQuery) WithCareerSkillGroup(opts ...func(*CareerSkillGroupQuery)) *CareerSkillQuery

WithCareerSkillGroup tells the query-builder to eager-load the nodes that are connected to the "careerSkillGroup" edge. The optional arguments are used to configure the query builder of the edge.

func (*CareerSkillQuery) WithSkill

func (csq *CareerSkillQuery) WithSkill(opts ...func(*SkillQuery)) *CareerSkillQuery

WithSkill tells the query-builder to eager-load the nodes that are connected to the "skill" edge. The optional arguments are used to configure the query builder of the edge.

type CareerSkillSelect

type CareerSkillSelect struct {
	*CareerSkillQuery
	// contains filtered or unexported fields
}

CareerSkillSelect is the builder for selecting fields of CareerSkill entities.

func (*CareerSkillSelect) Aggregate

func (css *CareerSkillSelect) Aggregate(fns ...AggregateFunc) *CareerSkillSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CareerSkillSelect) Bool

func (s *CareerSkillSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CareerSkillSelect) BoolX

func (s *CareerSkillSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CareerSkillSelect) Bools

func (s *CareerSkillSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CareerSkillSelect) BoolsX

func (s *CareerSkillSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CareerSkillSelect) Float64

func (s *CareerSkillSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CareerSkillSelect) Float64X

func (s *CareerSkillSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CareerSkillSelect) Float64s

func (s *CareerSkillSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CareerSkillSelect) Float64sX

func (s *CareerSkillSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CareerSkillSelect) Int

func (s *CareerSkillSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CareerSkillSelect) IntX

func (s *CareerSkillSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CareerSkillSelect) Ints

func (s *CareerSkillSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CareerSkillSelect) IntsX

func (s *CareerSkillSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CareerSkillSelect) Scan

func (css *CareerSkillSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CareerSkillSelect) ScanX

func (s *CareerSkillSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CareerSkillSelect) String

func (s *CareerSkillSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CareerSkillSelect) StringX

func (s *CareerSkillSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CareerSkillSelect) Strings

func (s *CareerSkillSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CareerSkillSelect) StringsX

func (s *CareerSkillSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CareerSkillUpdate

type CareerSkillUpdate struct {
	// contains filtered or unexported fields
}

CareerSkillUpdate is the builder for updating CareerSkill entities.

func (*CareerSkillUpdate) ClearCareerSkillGroup

func (csu *CareerSkillUpdate) ClearCareerSkillGroup() *CareerSkillUpdate

ClearCareerSkillGroup clears the "careerSkillGroup" edge to the CareerSkillGroup entity.

func (*CareerSkillUpdate) ClearSkill

func (csu *CareerSkillUpdate) ClearSkill() *CareerSkillUpdate

ClearSkill clears the "skill" edge to the Skill entity.

func (*CareerSkillUpdate) ClearVersion

func (csu *CareerSkillUpdate) ClearVersion() *CareerSkillUpdate

ClearVersion clears the value of the "version" field.

func (*CareerSkillUpdate) Exec

func (csu *CareerSkillUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CareerSkillUpdate) ExecX

func (csu *CareerSkillUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillUpdate) Mutation

func (csu *CareerSkillUpdate) Mutation() *CareerSkillMutation

Mutation returns the CareerSkillMutation object of the builder.

func (*CareerSkillUpdate) Save

func (csu *CareerSkillUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CareerSkillUpdate) SaveX

func (csu *CareerSkillUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CareerSkillUpdate) SetCareerSkillGroup

func (csu *CareerSkillUpdate) SetCareerSkillGroup(c *CareerSkillGroup) *CareerSkillUpdate

SetCareerSkillGroup sets the "careerSkillGroup" edge to the CareerSkillGroup entity.

func (*CareerSkillUpdate) SetCareerSkillGroupID

func (csu *CareerSkillUpdate) SetCareerSkillGroupID(id int) *CareerSkillUpdate

SetCareerSkillGroupID sets the "careerSkillGroup" edge to the CareerSkillGroup entity by ID.

func (*CareerSkillUpdate) SetNillableVersion

func (csu *CareerSkillUpdate) SetNillableVersion(s *string) *CareerSkillUpdate

SetNillableVersion sets the "version" field if the given value is not nil.

func (*CareerSkillUpdate) SetSkill

func (csu *CareerSkillUpdate) SetSkill(s *Skill) *CareerSkillUpdate

SetSkill sets the "skill" edge to the Skill entity.

func (*CareerSkillUpdate) SetSkillID

func (csu *CareerSkillUpdate) SetSkillID(id int) *CareerSkillUpdate

SetSkillID sets the "skill" edge to the Skill entity by ID.

func (*CareerSkillUpdate) SetUpdateTime

func (csu *CareerSkillUpdate) SetUpdateTime(t time.Time) *CareerSkillUpdate

SetUpdateTime sets the "update_time" field.

func (*CareerSkillUpdate) SetVersion

func (csu *CareerSkillUpdate) SetVersion(s string) *CareerSkillUpdate

SetVersion sets the "version" field.

func (*CareerSkillUpdate) Where

Where appends a list predicates to the CareerSkillUpdate builder.

type CareerSkillUpdateOne

type CareerSkillUpdateOne struct {
	// contains filtered or unexported fields
}

CareerSkillUpdateOne is the builder for updating a single CareerSkill entity.

func (*CareerSkillUpdateOne) ClearCareerSkillGroup

func (csuo *CareerSkillUpdateOne) ClearCareerSkillGroup() *CareerSkillUpdateOne

ClearCareerSkillGroup clears the "careerSkillGroup" edge to the CareerSkillGroup entity.

func (*CareerSkillUpdateOne) ClearSkill

func (csuo *CareerSkillUpdateOne) ClearSkill() *CareerSkillUpdateOne

ClearSkill clears the "skill" edge to the Skill entity.

func (*CareerSkillUpdateOne) ClearVersion

func (csuo *CareerSkillUpdateOne) ClearVersion() *CareerSkillUpdateOne

ClearVersion clears the value of the "version" field.

func (*CareerSkillUpdateOne) Exec

func (csuo *CareerSkillUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CareerSkillUpdateOne) ExecX

func (csuo *CareerSkillUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillUpdateOne) Mutation

func (csuo *CareerSkillUpdateOne) Mutation() *CareerSkillMutation

Mutation returns the CareerSkillMutation object of the builder.

func (*CareerSkillUpdateOne) Save

Save executes the query and returns the updated CareerSkill entity.

func (*CareerSkillUpdateOne) SaveX

func (csuo *CareerSkillUpdateOne) SaveX(ctx context.Context) *CareerSkill

SaveX is like Save, but panics if an error occurs.

func (*CareerSkillUpdateOne) Select

func (csuo *CareerSkillUpdateOne) Select(field string, fields ...string) *CareerSkillUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CareerSkillUpdateOne) SetCareerSkillGroup

func (csuo *CareerSkillUpdateOne) SetCareerSkillGroup(c *CareerSkillGroup) *CareerSkillUpdateOne

SetCareerSkillGroup sets the "careerSkillGroup" edge to the CareerSkillGroup entity.

func (*CareerSkillUpdateOne) SetCareerSkillGroupID

func (csuo *CareerSkillUpdateOne) SetCareerSkillGroupID(id int) *CareerSkillUpdateOne

SetCareerSkillGroupID sets the "careerSkillGroup" edge to the CareerSkillGroup entity by ID.

func (*CareerSkillUpdateOne) SetNillableVersion

func (csuo *CareerSkillUpdateOne) SetNillableVersion(s *string) *CareerSkillUpdateOne

SetNillableVersion sets the "version" field if the given value is not nil.

func (*CareerSkillUpdateOne) SetSkill

func (csuo *CareerSkillUpdateOne) SetSkill(s *Skill) *CareerSkillUpdateOne

SetSkill sets the "skill" edge to the Skill entity.

func (*CareerSkillUpdateOne) SetSkillID

func (csuo *CareerSkillUpdateOne) SetSkillID(id int) *CareerSkillUpdateOne

SetSkillID sets the "skill" edge to the Skill entity by ID.

func (*CareerSkillUpdateOne) SetUpdateTime

func (csuo *CareerSkillUpdateOne) SetUpdateTime(t time.Time) *CareerSkillUpdateOne

SetUpdateTime sets the "update_time" field.

func (*CareerSkillUpdateOne) SetVersion

func (csuo *CareerSkillUpdateOne) SetVersion(s string) *CareerSkillUpdateOne

SetVersion sets the "version" field.

func (*CareerSkillUpdateOne) Where

Where appends a list predicates to the CareerSkillUpdate builder.

type CareerSkillUpsert

type CareerSkillUpsert struct {
	*sql.UpdateSet
}

CareerSkillUpsert is the "OnConflict" setter.

func (*CareerSkillUpsert) ClearVersion

func (u *CareerSkillUpsert) ClearVersion() *CareerSkillUpsert

ClearVersion clears the value of the "version" field.

func (*CareerSkillUpsert) SetUpdateTime

func (u *CareerSkillUpsert) SetUpdateTime(v time.Time) *CareerSkillUpsert

SetUpdateTime sets the "update_time" field.

func (*CareerSkillUpsert) SetVersion

func (u *CareerSkillUpsert) SetVersion(v string) *CareerSkillUpsert

SetVersion sets the "version" field.

func (*CareerSkillUpsert) UpdateUpdateTime

func (u *CareerSkillUpsert) UpdateUpdateTime() *CareerSkillUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*CareerSkillUpsert) UpdateVersion

func (u *CareerSkillUpsert) UpdateVersion() *CareerSkillUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

type CareerSkillUpsertBulk

type CareerSkillUpsertBulk struct {
	// contains filtered or unexported fields
}

CareerSkillUpsertBulk is the builder for "upsert"-ing a bulk of CareerSkill nodes.

func (*CareerSkillUpsertBulk) ClearVersion

func (u *CareerSkillUpsertBulk) ClearVersion() *CareerSkillUpsertBulk

ClearVersion clears the value of the "version" field.

func (*CareerSkillUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CareerSkillUpsertBulk) Exec

Exec executes the query.

func (*CareerSkillUpsertBulk) ExecX

func (u *CareerSkillUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CareerSkill.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CareerSkillUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*CareerSkillUpsertBulk) SetVersion

SetVersion sets the "version" field.

func (*CareerSkillUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CareerSkillCreateBulk.OnConflict documentation for more info.

func (*CareerSkillUpsertBulk) UpdateNewValues

func (u *CareerSkillUpsertBulk) UpdateNewValues() *CareerSkillUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CareerSkill.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*CareerSkillUpsertBulk) UpdateUpdateTime

func (u *CareerSkillUpsertBulk) UpdateUpdateTime() *CareerSkillUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*CareerSkillUpsertBulk) UpdateVersion

func (u *CareerSkillUpsertBulk) UpdateVersion() *CareerSkillUpsertBulk

UpdateVersion sets the "version" field to the value that was provided on create.

type CareerSkillUpsertOne

type CareerSkillUpsertOne struct {
	// contains filtered or unexported fields
}

CareerSkillUpsertOne is the builder for "upsert"-ing

one CareerSkill node.

func (*CareerSkillUpsertOne) ClearVersion

func (u *CareerSkillUpsertOne) ClearVersion() *CareerSkillUpsertOne

ClearVersion clears the value of the "version" field.

func (*CareerSkillUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CareerSkillUpsertOne) Exec

Exec executes the query.

func (*CareerSkillUpsertOne) ExecX

func (u *CareerSkillUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerSkillUpsertOne) ID

func (u *CareerSkillUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CareerSkillUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*CareerSkillUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CareerSkill.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CareerSkillUpsertOne) SetUpdateTime

func (u *CareerSkillUpsertOne) SetUpdateTime(v time.Time) *CareerSkillUpsertOne

SetUpdateTime sets the "update_time" field.

func (*CareerSkillUpsertOne) SetVersion

SetVersion sets the "version" field.

func (*CareerSkillUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CareerSkillCreate.OnConflict documentation for more info.

func (*CareerSkillUpsertOne) UpdateNewValues

func (u *CareerSkillUpsertOne) UpdateNewValues() *CareerSkillUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CareerSkill.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*CareerSkillUpsertOne) UpdateUpdateTime

func (u *CareerSkillUpsertOne) UpdateUpdateTime() *CareerSkillUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

func (*CareerSkillUpsertOne) UpdateVersion

func (u *CareerSkillUpsertOne) UpdateVersion() *CareerSkillUpsertOne

UpdateVersion sets the "version" field to the value that was provided on create.

type CareerSkills

type CareerSkills []*CareerSkill

CareerSkills is a parsable slice of CareerSkill.

type CareerTask

type CareerTask struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CareerTaskQuery when eager-loading is set.
	Edges CareerTaskEdges `json:"edges"`
	// contains filtered or unexported fields
}

CareerTask is the model entity for the CareerTask schema.

func (*CareerTask) QueryCareer

func (ct *CareerTask) QueryCareer() *UserCareerQuery

QueryCareer queries the "career" edge of the CareerTask entity.

func (*CareerTask) QueryCareerTaskDescriptions

func (ct *CareerTask) QueryCareerTaskDescriptions() *CareerTaskDescriptionQuery

QueryCareerTaskDescriptions queries the "careerTaskDescriptions" edge of the CareerTask entity.

func (*CareerTask) String

func (ct *CareerTask) String() string

String implements the fmt.Stringer.

func (*CareerTask) Unwrap

func (ct *CareerTask) Unwrap() *CareerTask

Unwrap unwraps the CareerTask 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 (*CareerTask) Update

func (ct *CareerTask) Update() *CareerTaskUpdateOne

Update returns a builder for updating this CareerTask. Note that you need to call CareerTask.Unwrap() before calling this method if this CareerTask was returned from a transaction, and the transaction was committed or rolled back.

func (*CareerTask) Value

func (ct *CareerTask) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the CareerTask. This includes values selected through modifiers, order, etc.

type CareerTaskClient

type CareerTaskClient struct {
	// contains filtered or unexported fields
}

CareerTaskClient is a client for the CareerTask schema.

func NewCareerTaskClient

func NewCareerTaskClient(c config) *CareerTaskClient

NewCareerTaskClient returns a client for the CareerTask from the given config.

func (*CareerTaskClient) Create

func (c *CareerTaskClient) Create() *CareerTaskCreate

Create returns a builder for creating a CareerTask entity.

func (*CareerTaskClient) CreateBulk

func (c *CareerTaskClient) CreateBulk(builders ...*CareerTaskCreate) *CareerTaskCreateBulk

CreateBulk returns a builder for creating a bulk of CareerTask entities.

func (*CareerTaskClient) Delete

func (c *CareerTaskClient) Delete() *CareerTaskDelete

Delete returns a delete builder for CareerTask.

func (*CareerTaskClient) DeleteOne

func (c *CareerTaskClient) DeleteOne(ct *CareerTask) *CareerTaskDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CareerTaskClient) DeleteOneID

func (c *CareerTaskClient) DeleteOneID(id int) *CareerTaskDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CareerTaskClient) Get

func (c *CareerTaskClient) Get(ctx context.Context, id int) (*CareerTask, error)

Get returns a CareerTask entity by its id.

func (*CareerTaskClient) GetX

func (c *CareerTaskClient) GetX(ctx context.Context, id int) *CareerTask

GetX is like Get, but panics if an error occurs.

func (*CareerTaskClient) Hooks

func (c *CareerTaskClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CareerTaskClient) Intercept

func (c *CareerTaskClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `careertask.Intercept(f(g(h())))`.

func (*CareerTaskClient) Interceptors

func (c *CareerTaskClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CareerTaskClient) Query

func (c *CareerTaskClient) Query() *CareerTaskQuery

Query returns a query builder for CareerTask.

func (*CareerTaskClient) QueryCareer

func (c *CareerTaskClient) QueryCareer(ct *CareerTask) *UserCareerQuery

QueryCareer queries the career edge of a CareerTask.

func (*CareerTaskClient) QueryCareerTaskDescriptions

func (c *CareerTaskClient) QueryCareerTaskDescriptions(ct *CareerTask) *CareerTaskDescriptionQuery

QueryCareerTaskDescriptions queries the careerTaskDescriptions edge of a CareerTask.

func (*CareerTaskClient) Update

func (c *CareerTaskClient) Update() *CareerTaskUpdate

Update returns an update builder for CareerTask.

func (*CareerTaskClient) UpdateOne

func (c *CareerTaskClient) UpdateOne(ct *CareerTask) *CareerTaskUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CareerTaskClient) UpdateOneID

func (c *CareerTaskClient) UpdateOneID(id int) *CareerTaskUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CareerTaskClient) Use

func (c *CareerTaskClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `careertask.Hooks(f(g(h())))`.

type CareerTaskCreate

type CareerTaskCreate struct {
	// contains filtered or unexported fields
}

CareerTaskCreate is the builder for creating a CareerTask entity.

func (*CareerTaskCreate) AddCareerTaskDescriptionIDs

func (ctc *CareerTaskCreate) AddCareerTaskDescriptionIDs(ids ...int) *CareerTaskCreate

AddCareerTaskDescriptionIDs adds the "careerTaskDescriptions" edge to the CareerTaskDescription entity by IDs.

func (*CareerTaskCreate) AddCareerTaskDescriptions

func (ctc *CareerTaskCreate) AddCareerTaskDescriptions(c ...*CareerTaskDescription) *CareerTaskCreate

AddCareerTaskDescriptions adds the "careerTaskDescriptions" edges to the CareerTaskDescription entity.

func (*CareerTaskCreate) Exec

func (ctc *CareerTaskCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CareerTaskCreate) ExecX

func (ctc *CareerTaskCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskCreate) Mutation

func (ctc *CareerTaskCreate) Mutation() *CareerTaskMutation

Mutation returns the CareerTaskMutation object of the builder.

func (*CareerTaskCreate) OnConflict

func (ctc *CareerTaskCreate) OnConflict(opts ...sql.ConflictOption) *CareerTaskUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CareerTask.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CareerTaskUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*CareerTaskCreate) OnConflictColumns

func (ctc *CareerTaskCreate) OnConflictColumns(columns ...string) *CareerTaskUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CareerTask.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CareerTaskCreate) Save

func (ctc *CareerTaskCreate) Save(ctx context.Context) (*CareerTask, error)

Save creates the CareerTask in the database.

func (*CareerTaskCreate) SaveX

func (ctc *CareerTaskCreate) SaveX(ctx context.Context) *CareerTask

SaveX calls Save and panics if Save returns an error.

func (*CareerTaskCreate) SetCareer

func (ctc *CareerTaskCreate) SetCareer(u *UserCareer) *CareerTaskCreate

SetCareer sets the "career" edge to the UserCareer entity.

func (*CareerTaskCreate) SetCareerID

func (ctc *CareerTaskCreate) SetCareerID(id int) *CareerTaskCreate

SetCareerID sets the "career" edge to the UserCareer entity by ID.

func (*CareerTaskCreate) SetCreateTime

func (ctc *CareerTaskCreate) SetCreateTime(t time.Time) *CareerTaskCreate

SetCreateTime sets the "create_time" field.

func (*CareerTaskCreate) SetName

func (ctc *CareerTaskCreate) SetName(s string) *CareerTaskCreate

SetName sets the "name" field.

func (*CareerTaskCreate) SetNillableCreateTime

func (ctc *CareerTaskCreate) SetNillableCreateTime(t *time.Time) *CareerTaskCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*CareerTaskCreate) SetNillableUpdateTime

func (ctc *CareerTaskCreate) SetNillableUpdateTime(t *time.Time) *CareerTaskCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*CareerTaskCreate) SetUpdateTime

func (ctc *CareerTaskCreate) SetUpdateTime(t time.Time) *CareerTaskCreate

SetUpdateTime sets the "update_time" field.

type CareerTaskCreateBulk

type CareerTaskCreateBulk struct {
	// contains filtered or unexported fields
}

CareerTaskCreateBulk is the builder for creating many CareerTask entities in bulk.

func (*CareerTaskCreateBulk) Exec

func (ctcb *CareerTaskCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CareerTaskCreateBulk) ExecX

func (ctcb *CareerTaskCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskCreateBulk) OnConflict

func (ctcb *CareerTaskCreateBulk) OnConflict(opts ...sql.ConflictOption) *CareerTaskUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CareerTask.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CareerTaskUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*CareerTaskCreateBulk) OnConflictColumns

func (ctcb *CareerTaskCreateBulk) OnConflictColumns(columns ...string) *CareerTaskUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CareerTask.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CareerTaskCreateBulk) Save

func (ctcb *CareerTaskCreateBulk) Save(ctx context.Context) ([]*CareerTask, error)

Save creates the CareerTask entities in the database.

func (*CareerTaskCreateBulk) SaveX

func (ctcb *CareerTaskCreateBulk) SaveX(ctx context.Context) []*CareerTask

SaveX is like Save, but panics if an error occurs.

type CareerTaskDelete

type CareerTaskDelete struct {
	// contains filtered or unexported fields
}

CareerTaskDelete is the builder for deleting a CareerTask entity.

func (*CareerTaskDelete) Exec

func (ctd *CareerTaskDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CareerTaskDelete) ExecX

func (ctd *CareerTaskDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskDelete) Where

Where appends a list predicates to the CareerTaskDelete builder.

type CareerTaskDeleteOne

type CareerTaskDeleteOne struct {
	// contains filtered or unexported fields
}

CareerTaskDeleteOne is the builder for deleting a single CareerTask entity.

func (*CareerTaskDeleteOne) Exec

func (ctdo *CareerTaskDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CareerTaskDeleteOne) ExecX

func (ctdo *CareerTaskDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskDeleteOne) Where

Where appends a list predicates to the CareerTaskDelete builder.

type CareerTaskDescription

type CareerTaskDescription struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CareerTaskDescriptionQuery when eager-loading is set.
	Edges CareerTaskDescriptionEdges `json:"edges"`
	// contains filtered or unexported fields
}

CareerTaskDescription is the model entity for the CareerTaskDescription schema.

func (*CareerTaskDescription) QueryCareerTask

func (ctd *CareerTaskDescription) QueryCareerTask() *CareerTaskQuery

QueryCareerTask queries the "careerTask" edge of the CareerTaskDescription entity.

func (*CareerTaskDescription) String

func (ctd *CareerTaskDescription) String() string

String implements the fmt.Stringer.

func (*CareerTaskDescription) Unwrap

Unwrap unwraps the CareerTaskDescription 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 (*CareerTaskDescription) Update

Update returns a builder for updating this CareerTaskDescription. Note that you need to call CareerTaskDescription.Unwrap() before calling this method if this CareerTaskDescription was returned from a transaction, and the transaction was committed or rolled back.

func (*CareerTaskDescription) Value

func (ctd *CareerTaskDescription) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the CareerTaskDescription. This includes values selected through modifiers, order, etc.

type CareerTaskDescriptionClient

type CareerTaskDescriptionClient struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionClient is a client for the CareerTaskDescription schema.

func NewCareerTaskDescriptionClient

func NewCareerTaskDescriptionClient(c config) *CareerTaskDescriptionClient

NewCareerTaskDescriptionClient returns a client for the CareerTaskDescription from the given config.

func (*CareerTaskDescriptionClient) Create

Create returns a builder for creating a CareerTaskDescription entity.

func (*CareerTaskDescriptionClient) CreateBulk

CreateBulk returns a builder for creating a bulk of CareerTaskDescription entities.

func (*CareerTaskDescriptionClient) Delete

Delete returns a delete builder for CareerTaskDescription.

func (*CareerTaskDescriptionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CareerTaskDescriptionClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CareerTaskDescriptionClient) Get

Get returns a CareerTaskDescription entity by its id.

func (*CareerTaskDescriptionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*CareerTaskDescriptionClient) Hooks

func (c *CareerTaskDescriptionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CareerTaskDescriptionClient) Intercept

func (c *CareerTaskDescriptionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `careertaskdescription.Intercept(f(g(h())))`.

func (*CareerTaskDescriptionClient) Interceptors

func (c *CareerTaskDescriptionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CareerTaskDescriptionClient) Query

Query returns a query builder for CareerTaskDescription.

func (*CareerTaskDescriptionClient) QueryCareerTask

QueryCareerTask queries the careerTask edge of a CareerTaskDescription.

func (*CareerTaskDescriptionClient) Update

Update returns an update builder for CareerTaskDescription.

func (*CareerTaskDescriptionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*CareerTaskDescriptionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*CareerTaskDescriptionClient) Use

func (c *CareerTaskDescriptionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `careertaskdescription.Hooks(f(g(h())))`.

type CareerTaskDescriptionCreate

type CareerTaskDescriptionCreate struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionCreate is the builder for creating a CareerTaskDescription entity.

func (*CareerTaskDescriptionCreate) Exec

Exec executes the query.

func (*CareerTaskDescriptionCreate) ExecX

func (ctdc *CareerTaskDescriptionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskDescriptionCreate) Mutation

Mutation returns the CareerTaskDescriptionMutation object of the builder.

func (*CareerTaskDescriptionCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CareerTaskDescription.Create().
	SetDescription(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CareerTaskDescriptionUpsert) {
		SetDescription(v+v).
	}).
	Exec(ctx)

func (*CareerTaskDescriptionCreate) OnConflictColumns

func (ctdc *CareerTaskDescriptionCreate) OnConflictColumns(columns ...string) *CareerTaskDescriptionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CareerTaskDescription.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CareerTaskDescriptionCreate) Save

Save creates the CareerTaskDescription in the database.

func (*CareerTaskDescriptionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*CareerTaskDescriptionCreate) SetCareerTask

SetCareerTask sets the "careerTask" edge to the CareerTask entity.

func (*CareerTaskDescriptionCreate) SetCareerTaskID

func (ctdc *CareerTaskDescriptionCreate) SetCareerTaskID(id int) *CareerTaskDescriptionCreate

SetCareerTaskID sets the "careerTask" edge to the CareerTask entity by ID.

func (*CareerTaskDescriptionCreate) SetDescription

SetDescription sets the "description" field.

type CareerTaskDescriptionCreateBulk

type CareerTaskDescriptionCreateBulk struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionCreateBulk is the builder for creating many CareerTaskDescription entities in bulk.

func (*CareerTaskDescriptionCreateBulk) Exec

Exec executes the query.

func (*CareerTaskDescriptionCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskDescriptionCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CareerTaskDescription.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CareerTaskDescriptionUpsert) {
		SetDescription(v+v).
	}).
	Exec(ctx)

func (*CareerTaskDescriptionCreateBulk) OnConflictColumns

func (ctdcb *CareerTaskDescriptionCreateBulk) OnConflictColumns(columns ...string) *CareerTaskDescriptionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CareerTaskDescription.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CareerTaskDescriptionCreateBulk) Save

Save creates the CareerTaskDescription entities in the database.

func (*CareerTaskDescriptionCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type CareerTaskDescriptionDelete

type CareerTaskDescriptionDelete struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionDelete is the builder for deleting a CareerTaskDescription entity.

func (*CareerTaskDescriptionDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*CareerTaskDescriptionDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskDescriptionDelete) Where

Where appends a list predicates to the CareerTaskDescriptionDelete builder.

type CareerTaskDescriptionDeleteOne

type CareerTaskDescriptionDeleteOne struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionDeleteOne is the builder for deleting a single CareerTaskDescription entity.

func (*CareerTaskDescriptionDeleteOne) Exec

Exec executes the deletion query.

func (*CareerTaskDescriptionDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskDescriptionDeleteOne) Where

Where appends a list predicates to the CareerTaskDescriptionDelete builder.

type CareerTaskDescriptionEdges

type CareerTaskDescriptionEdges struct {
	// CareerTask holds the value of the careerTask edge.
	CareerTask *CareerTask `json:"careerTask,omitempty"`
	// contains filtered or unexported fields
}

CareerTaskDescriptionEdges holds the relations/edges for other nodes in the graph.

func (CareerTaskDescriptionEdges) CareerTaskOrErr

func (e CareerTaskDescriptionEdges) CareerTaskOrErr() (*CareerTask, error)

CareerTaskOrErr returns the CareerTask value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type CareerTaskDescriptionGroupBy

type CareerTaskDescriptionGroupBy struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionGroupBy is the group-by builder for CareerTaskDescription entities.

func (*CareerTaskDescriptionGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*CareerTaskDescriptionGroupBy) Bool

func (s *CareerTaskDescriptionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionGroupBy) BoolX

func (s *CareerTaskDescriptionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CareerTaskDescriptionGroupBy) Bools

func (s *CareerTaskDescriptionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionGroupBy) BoolsX

func (s *CareerTaskDescriptionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CareerTaskDescriptionGroupBy) Float64

func (s *CareerTaskDescriptionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionGroupBy) Float64X

func (s *CareerTaskDescriptionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CareerTaskDescriptionGroupBy) Float64s

func (s *CareerTaskDescriptionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionGroupBy) Float64sX

func (s *CareerTaskDescriptionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CareerTaskDescriptionGroupBy) Int

func (s *CareerTaskDescriptionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionGroupBy) IntX

func (s *CareerTaskDescriptionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CareerTaskDescriptionGroupBy) Ints

func (s *CareerTaskDescriptionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionGroupBy) IntsX

func (s *CareerTaskDescriptionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CareerTaskDescriptionGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*CareerTaskDescriptionGroupBy) ScanX

func (s *CareerTaskDescriptionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CareerTaskDescriptionGroupBy) String

func (s *CareerTaskDescriptionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionGroupBy) StringX

func (s *CareerTaskDescriptionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CareerTaskDescriptionGroupBy) Strings

func (s *CareerTaskDescriptionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionGroupBy) StringsX

func (s *CareerTaskDescriptionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CareerTaskDescriptionMutation

type CareerTaskDescriptionMutation struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionMutation represents an operation that mutates the CareerTaskDescription nodes in the graph.

func (*CareerTaskDescriptionMutation) AddField

func (m *CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) AddedEdges

func (m *CareerTaskDescriptionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CareerTaskDescriptionMutation) AddedField

func (m *CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) AddedFields

func (m *CareerTaskDescriptionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CareerTaskDescriptionMutation) AddedIDs

func (m *CareerTaskDescriptionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CareerTaskDescriptionMutation) CareerTaskCleared

func (m *CareerTaskDescriptionMutation) CareerTaskCleared() bool

CareerTaskCleared reports if the "careerTask" edge to the CareerTask entity was cleared.

func (*CareerTaskDescriptionMutation) CareerTaskID

func (m *CareerTaskDescriptionMutation) CareerTaskID() (id int, exists bool)

CareerTaskID returns the "careerTask" edge ID in the mutation.

func (*CareerTaskDescriptionMutation) CareerTaskIDs

func (m *CareerTaskDescriptionMutation) CareerTaskIDs() (ids []int)

CareerTaskIDs returns the "careerTask" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CareerTaskID instead. It exists only for internal usage by the builders.

func (*CareerTaskDescriptionMutation) ClearCareerTask

func (m *CareerTaskDescriptionMutation) ClearCareerTask()

ClearCareerTask clears the "careerTask" edge to the CareerTask entity.

func (*CareerTaskDescriptionMutation) ClearEdge

func (m *CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) ClearField

func (m *CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) ClearedEdges

func (m *CareerTaskDescriptionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CareerTaskDescriptionMutation) ClearedFields

func (m *CareerTaskDescriptionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) Description

func (m *CareerTaskDescriptionMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*CareerTaskDescriptionMutation) EdgeCleared

func (m *CareerTaskDescriptionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CareerTaskDescriptionMutation) Field

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 (*CareerTaskDescriptionMutation) FieldCleared

func (m *CareerTaskDescriptionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CareerTaskDescriptionMutation) Fields

func (m *CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) ID

func (m *CareerTaskDescriptionMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CareerTaskDescriptionMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CareerTaskDescriptionMutation) OldDescription

func (m *CareerTaskDescriptionMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the CareerTaskDescription entity. If the CareerTaskDescription 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 (*CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) Op

Op returns the operation name.

func (*CareerTaskDescriptionMutation) RemovedEdges

func (m *CareerTaskDescriptionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CareerTaskDescriptionMutation) RemovedIDs

func (m *CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) ResetCareerTask

func (m *CareerTaskDescriptionMutation) ResetCareerTask()

ResetCareerTask resets all changes to the "careerTask" edge.

func (*CareerTaskDescriptionMutation) ResetDescription

func (m *CareerTaskDescriptionMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*CareerTaskDescriptionMutation) ResetEdge

func (m *CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) ResetField

func (m *CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) SetCareerTaskID

func (m *CareerTaskDescriptionMutation) SetCareerTaskID(id int)

SetCareerTaskID sets the "careerTask" edge to the CareerTask entity by id.

func (*CareerTaskDescriptionMutation) SetDescription

func (m *CareerTaskDescriptionMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*CareerTaskDescriptionMutation) SetField

func (m *CareerTaskDescriptionMutation) 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 (*CareerTaskDescriptionMutation) SetOp

func (m *CareerTaskDescriptionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (CareerTaskDescriptionMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CareerTaskDescriptionMutation) Type

Type returns the node type of this mutation (CareerTaskDescription).

func (*CareerTaskDescriptionMutation) Where

Where appends a list predicates to the CareerTaskDescriptionMutation builder.

func (*CareerTaskDescriptionMutation) WhereP

func (m *CareerTaskDescriptionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CareerTaskDescriptionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CareerTaskDescriptionQuery

type CareerTaskDescriptionQuery struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionQuery is the builder for querying CareerTaskDescription entities.

func (*CareerTaskDescriptionQuery) Aggregate

Aggregate returns a CareerTaskDescriptionSelect configured with the given aggregations.

func (*CareerTaskDescriptionQuery) All

All executes the query and returns a list of CareerTaskDescriptions.

func (*CareerTaskDescriptionQuery) AllX

AllX is like All, but panics if an error occurs.

func (*CareerTaskDescriptionQuery) Clone

Clone returns a duplicate of the CareerTaskDescriptionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CareerTaskDescriptionQuery) Count

func (ctdq *CareerTaskDescriptionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CareerTaskDescriptionQuery) CountX

func (ctdq *CareerTaskDescriptionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CareerTaskDescriptionQuery) Exist

func (ctdq *CareerTaskDescriptionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CareerTaskDescriptionQuery) ExistX

func (ctdq *CareerTaskDescriptionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CareerTaskDescriptionQuery) First

First returns the first CareerTaskDescription entity from the query. Returns a *NotFoundError when no CareerTaskDescription was found.

func (*CareerTaskDescriptionQuery) FirstID

func (ctdq *CareerTaskDescriptionQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first CareerTaskDescription ID from the query. Returns a *NotFoundError when no CareerTaskDescription ID was found.

func (*CareerTaskDescriptionQuery) FirstIDX

func (ctdq *CareerTaskDescriptionQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*CareerTaskDescriptionQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*CareerTaskDescriptionQuery) GroupBy

func (ctdq *CareerTaskDescriptionQuery) GroupBy(field string, fields ...string) *CareerTaskDescriptionGroupBy

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 {
	Description string `json:"description,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CareerTaskDescription.Query().
	GroupBy(careertaskdescription.FieldDescription).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CareerTaskDescriptionQuery) IDs

func (ctdq *CareerTaskDescriptionQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of CareerTaskDescription IDs.

func (*CareerTaskDescriptionQuery) IDsX

func (ctdq *CareerTaskDescriptionQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*CareerTaskDescriptionQuery) Limit

Limit the number of records to be returned by this query.

func (*CareerTaskDescriptionQuery) Offset

Offset to start from.

func (*CareerTaskDescriptionQuery) Only

Only returns a single CareerTaskDescription entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CareerTaskDescription entity is found. Returns a *NotFoundError when no CareerTaskDescription entities are found.

func (*CareerTaskDescriptionQuery) OnlyID

func (ctdq *CareerTaskDescriptionQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only CareerTaskDescription ID in the query. Returns a *NotSingularError when more than one CareerTaskDescription ID is found. Returns a *NotFoundError when no entities are found.

func (*CareerTaskDescriptionQuery) OnlyIDX

func (ctdq *CareerTaskDescriptionQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CareerTaskDescriptionQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*CareerTaskDescriptionQuery) Order

Order specifies how the records should be ordered.

func (*CareerTaskDescriptionQuery) QueryCareerTask

func (ctdq *CareerTaskDescriptionQuery) QueryCareerTask() *CareerTaskQuery

QueryCareerTask chains the current query on the "careerTask" edge.

func (*CareerTaskDescriptionQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Description string `json:"description,omitempty"`
}

client.CareerTaskDescription.Query().
	Select(careertaskdescription.FieldDescription).
	Scan(ctx, &v)

func (*CareerTaskDescriptionQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CareerTaskDescriptionQuery) Where

Where adds a new predicate for the CareerTaskDescriptionQuery builder.

func (*CareerTaskDescriptionQuery) WithCareerTask

func (ctdq *CareerTaskDescriptionQuery) WithCareerTask(opts ...func(*CareerTaskQuery)) *CareerTaskDescriptionQuery

WithCareerTask tells the query-builder to eager-load the nodes that are connected to the "careerTask" edge. The optional arguments are used to configure the query builder of the edge.

type CareerTaskDescriptionSelect

type CareerTaskDescriptionSelect struct {
	*CareerTaskDescriptionQuery
	// contains filtered or unexported fields
}

CareerTaskDescriptionSelect is the builder for selecting fields of CareerTaskDescription entities.

func (*CareerTaskDescriptionSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*CareerTaskDescriptionSelect) Bool

func (s *CareerTaskDescriptionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionSelect) BoolX

func (s *CareerTaskDescriptionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CareerTaskDescriptionSelect) Bools

func (s *CareerTaskDescriptionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionSelect) BoolsX

func (s *CareerTaskDescriptionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CareerTaskDescriptionSelect) Float64

func (s *CareerTaskDescriptionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionSelect) Float64X

func (s *CareerTaskDescriptionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CareerTaskDescriptionSelect) Float64s

func (s *CareerTaskDescriptionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionSelect) Float64sX

func (s *CareerTaskDescriptionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CareerTaskDescriptionSelect) Int

func (s *CareerTaskDescriptionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionSelect) IntX

func (s *CareerTaskDescriptionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CareerTaskDescriptionSelect) Ints

func (s *CareerTaskDescriptionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionSelect) IntsX

func (s *CareerTaskDescriptionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CareerTaskDescriptionSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*CareerTaskDescriptionSelect) ScanX

func (s *CareerTaskDescriptionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CareerTaskDescriptionSelect) String

func (s *CareerTaskDescriptionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionSelect) StringX

func (s *CareerTaskDescriptionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CareerTaskDescriptionSelect) Strings

func (s *CareerTaskDescriptionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CareerTaskDescriptionSelect) StringsX

func (s *CareerTaskDescriptionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CareerTaskDescriptionUpdate

type CareerTaskDescriptionUpdate struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionUpdate is the builder for updating CareerTaskDescription entities.

func (*CareerTaskDescriptionUpdate) ClearCareerTask

ClearCareerTask clears the "careerTask" edge to the CareerTask entity.

func (*CareerTaskDescriptionUpdate) Exec

Exec executes the query.

func (*CareerTaskDescriptionUpdate) ExecX

func (ctdu *CareerTaskDescriptionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskDescriptionUpdate) Mutation

Mutation returns the CareerTaskDescriptionMutation object of the builder.

func (*CareerTaskDescriptionUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*CareerTaskDescriptionUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*CareerTaskDescriptionUpdate) SetCareerTask

SetCareerTask sets the "careerTask" edge to the CareerTask entity.

func (*CareerTaskDescriptionUpdate) SetCareerTaskID

func (ctdu *CareerTaskDescriptionUpdate) SetCareerTaskID(id int) *CareerTaskDescriptionUpdate

SetCareerTaskID sets the "careerTask" edge to the CareerTask entity by ID.

func (*CareerTaskDescriptionUpdate) SetDescription

SetDescription sets the "description" field.

func (*CareerTaskDescriptionUpdate) Where

Where appends a list predicates to the CareerTaskDescriptionUpdate builder.

type CareerTaskDescriptionUpdateOne

type CareerTaskDescriptionUpdateOne struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionUpdateOne is the builder for updating a single CareerTaskDescription entity.

func (*CareerTaskDescriptionUpdateOne) ClearCareerTask

ClearCareerTask clears the "careerTask" edge to the CareerTask entity.

func (*CareerTaskDescriptionUpdateOne) Exec

Exec executes the query on the entity.

func (*CareerTaskDescriptionUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskDescriptionUpdateOne) Mutation

Mutation returns the CareerTaskDescriptionMutation object of the builder.

func (*CareerTaskDescriptionUpdateOne) Save

Save executes the query and returns the updated CareerTaskDescription entity.

func (*CareerTaskDescriptionUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*CareerTaskDescriptionUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CareerTaskDescriptionUpdateOne) SetCareerTask

SetCareerTask sets the "careerTask" edge to the CareerTask entity.

func (*CareerTaskDescriptionUpdateOne) SetCareerTaskID

SetCareerTaskID sets the "careerTask" edge to the CareerTask entity by ID.

func (*CareerTaskDescriptionUpdateOne) SetDescription

SetDescription sets the "description" field.

func (*CareerTaskDescriptionUpdateOne) Where

Where appends a list predicates to the CareerTaskDescriptionUpdate builder.

type CareerTaskDescriptionUpsert

type CareerTaskDescriptionUpsert struct {
	*sql.UpdateSet
}

CareerTaskDescriptionUpsert is the "OnConflict" setter.

func (*CareerTaskDescriptionUpsert) SetDescription

SetDescription sets the "description" field.

func (*CareerTaskDescriptionUpsert) UpdateDescription

UpdateDescription sets the "description" field to the value that was provided on create.

type CareerTaskDescriptionUpsertBulk

type CareerTaskDescriptionUpsertBulk struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionUpsertBulk is the builder for "upsert"-ing a bulk of CareerTaskDescription nodes.

func (*CareerTaskDescriptionUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CareerTaskDescriptionUpsertBulk) Exec

Exec executes the query.

func (*CareerTaskDescriptionUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskDescriptionUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CareerTaskDescription.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CareerTaskDescriptionUpsertBulk) SetDescription

SetDescription sets the "description" field.

func (*CareerTaskDescriptionUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CareerTaskDescriptionCreateBulk.OnConflict documentation for more info.

func (*CareerTaskDescriptionUpsertBulk) UpdateDescription

UpdateDescription sets the "description" field to the value that was provided on create.

func (*CareerTaskDescriptionUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CareerTaskDescription.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type CareerTaskDescriptionUpsertOne

type CareerTaskDescriptionUpsertOne struct {
	// contains filtered or unexported fields
}

CareerTaskDescriptionUpsertOne is the builder for "upsert"-ing

one CareerTaskDescription node.

func (*CareerTaskDescriptionUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CareerTaskDescriptionUpsertOne) Exec

Exec executes the query.

func (*CareerTaskDescriptionUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskDescriptionUpsertOne) ID

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CareerTaskDescriptionUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*CareerTaskDescriptionUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CareerTaskDescription.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CareerTaskDescriptionUpsertOne) SetDescription

SetDescription sets the "description" field.

func (*CareerTaskDescriptionUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CareerTaskDescriptionCreate.OnConflict documentation for more info.

func (*CareerTaskDescriptionUpsertOne) UpdateDescription

UpdateDescription sets the "description" field to the value that was provided on create.

func (*CareerTaskDescriptionUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CareerTaskDescription.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type CareerTaskDescriptions

type CareerTaskDescriptions []*CareerTaskDescription

CareerTaskDescriptions is a parsable slice of CareerTaskDescription.

type CareerTaskEdges

type CareerTaskEdges struct {
	// Career holds the value of the career edge.
	Career *UserCareer `json:"career,omitempty"`
	// CareerTaskDescriptions holds the value of the careerTaskDescriptions edge.
	CareerTaskDescriptions []*CareerTaskDescription `json:"careerTaskDescriptions,omitempty"`
	// contains filtered or unexported fields
}

CareerTaskEdges holds the relations/edges for other nodes in the graph.

func (CareerTaskEdges) CareerOrErr

func (e CareerTaskEdges) CareerOrErr() (*UserCareer, error)

CareerOrErr returns the Career value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (CareerTaskEdges) CareerTaskDescriptionsOrErr

func (e CareerTaskEdges) CareerTaskDescriptionsOrErr() ([]*CareerTaskDescription, error)

CareerTaskDescriptionsOrErr returns the CareerTaskDescriptions value or an error if the edge was not loaded in eager-loading.

type CareerTaskGroupBy

type CareerTaskGroupBy struct {
	// contains filtered or unexported fields
}

CareerTaskGroupBy is the group-by builder for CareerTask entities.

func (*CareerTaskGroupBy) Aggregate

func (ctgb *CareerTaskGroupBy) Aggregate(fns ...AggregateFunc) *CareerTaskGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*CareerTaskGroupBy) Bool

func (s *CareerTaskGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CareerTaskGroupBy) BoolX

func (s *CareerTaskGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CareerTaskGroupBy) Bools

func (s *CareerTaskGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CareerTaskGroupBy) BoolsX

func (s *CareerTaskGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CareerTaskGroupBy) Float64

func (s *CareerTaskGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CareerTaskGroupBy) Float64X

func (s *CareerTaskGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CareerTaskGroupBy) Float64s

func (s *CareerTaskGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CareerTaskGroupBy) Float64sX

func (s *CareerTaskGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CareerTaskGroupBy) Int

func (s *CareerTaskGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CareerTaskGroupBy) IntX

func (s *CareerTaskGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CareerTaskGroupBy) Ints

func (s *CareerTaskGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CareerTaskGroupBy) IntsX

func (s *CareerTaskGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CareerTaskGroupBy) Scan

func (ctgb *CareerTaskGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CareerTaskGroupBy) ScanX

func (s *CareerTaskGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CareerTaskGroupBy) String

func (s *CareerTaskGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CareerTaskGroupBy) StringX

func (s *CareerTaskGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CareerTaskGroupBy) Strings

func (s *CareerTaskGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CareerTaskGroupBy) StringsX

func (s *CareerTaskGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CareerTaskMutation

type CareerTaskMutation struct {
	// contains filtered or unexported fields
}

CareerTaskMutation represents an operation that mutates the CareerTask nodes in the graph.

func (*CareerTaskMutation) AddCareerTaskDescriptionIDs

func (m *CareerTaskMutation) AddCareerTaskDescriptionIDs(ids ...int)

AddCareerTaskDescriptionIDs adds the "careerTaskDescriptions" edge to the CareerTaskDescription entity by ids.

func (*CareerTaskMutation) AddField

func (m *CareerTaskMutation) 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 (*CareerTaskMutation) AddedEdges

func (m *CareerTaskMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CareerTaskMutation) AddedField

func (m *CareerTaskMutation) 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 (*CareerTaskMutation) AddedFields

func (m *CareerTaskMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CareerTaskMutation) AddedIDs

func (m *CareerTaskMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CareerTaskMutation) CareerCleared

func (m *CareerTaskMutation) CareerCleared() bool

CareerCleared reports if the "career" edge to the UserCareer entity was cleared.

func (*CareerTaskMutation) CareerID

func (m *CareerTaskMutation) CareerID() (id int, exists bool)

CareerID returns the "career" edge ID in the mutation.

func (*CareerTaskMutation) CareerIDs

func (m *CareerTaskMutation) CareerIDs() (ids []int)

CareerIDs returns the "career" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CareerID instead. It exists only for internal usage by the builders.

func (*CareerTaskMutation) CareerTaskDescriptionsCleared

func (m *CareerTaskMutation) CareerTaskDescriptionsCleared() bool

CareerTaskDescriptionsCleared reports if the "careerTaskDescriptions" edge to the CareerTaskDescription entity was cleared.

func (*CareerTaskMutation) CareerTaskDescriptionsIDs

func (m *CareerTaskMutation) CareerTaskDescriptionsIDs() (ids []int)

CareerTaskDescriptionsIDs returns the "careerTaskDescriptions" edge IDs in the mutation.

func (*CareerTaskMutation) ClearCareer

func (m *CareerTaskMutation) ClearCareer()

ClearCareer clears the "career" edge to the UserCareer entity.

func (*CareerTaskMutation) ClearCareerTaskDescriptions

func (m *CareerTaskMutation) ClearCareerTaskDescriptions()

ClearCareerTaskDescriptions clears the "careerTaskDescriptions" edge to the CareerTaskDescription entity.

func (*CareerTaskMutation) ClearEdge

func (m *CareerTaskMutation) 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 (*CareerTaskMutation) ClearField

func (m *CareerTaskMutation) 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 (*CareerTaskMutation) ClearedEdges

func (m *CareerTaskMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CareerTaskMutation) ClearedFields

func (m *CareerTaskMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CareerTaskMutation) Client

func (m CareerTaskMutation) 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 (*CareerTaskMutation) CreateTime

func (m *CareerTaskMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*CareerTaskMutation) EdgeCleared

func (m *CareerTaskMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CareerTaskMutation) Field

func (m *CareerTaskMutation) 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 (*CareerTaskMutation) FieldCleared

func (m *CareerTaskMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CareerTaskMutation) Fields

func (m *CareerTaskMutation) 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 (*CareerTaskMutation) ID

func (m *CareerTaskMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*CareerTaskMutation) IDs

func (m *CareerTaskMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*CareerTaskMutation) Name

func (m *CareerTaskMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*CareerTaskMutation) OldCreateTime

func (m *CareerTaskMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the CareerTask entity. If the CareerTask 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 (*CareerTaskMutation) OldField

func (m *CareerTaskMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*CareerTaskMutation) OldName

func (m *CareerTaskMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the CareerTask entity. If the CareerTask 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 (*CareerTaskMutation) OldUpdateTime

func (m *CareerTaskMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the CareerTask entity. If the CareerTask 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 (*CareerTaskMutation) Op

func (m *CareerTaskMutation) Op() Op

Op returns the operation name.

func (*CareerTaskMutation) RemoveCareerTaskDescriptionIDs

func (m *CareerTaskMutation) RemoveCareerTaskDescriptionIDs(ids ...int)

RemoveCareerTaskDescriptionIDs removes the "careerTaskDescriptions" edge to the CareerTaskDescription entity by IDs.

func (*CareerTaskMutation) RemovedCareerTaskDescriptionsIDs

func (m *CareerTaskMutation) RemovedCareerTaskDescriptionsIDs() (ids []int)

RemovedCareerTaskDescriptions returns the removed IDs of the "careerTaskDescriptions" edge to the CareerTaskDescription entity.

func (*CareerTaskMutation) RemovedEdges

func (m *CareerTaskMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CareerTaskMutation) RemovedIDs

func (m *CareerTaskMutation) 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 (*CareerTaskMutation) ResetCareer

func (m *CareerTaskMutation) ResetCareer()

ResetCareer resets all changes to the "career" edge.

func (*CareerTaskMutation) ResetCareerTaskDescriptions

func (m *CareerTaskMutation) ResetCareerTaskDescriptions()

ResetCareerTaskDescriptions resets all changes to the "careerTaskDescriptions" edge.

func (*CareerTaskMutation) ResetCreateTime

func (m *CareerTaskMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*CareerTaskMutation) ResetEdge

func (m *CareerTaskMutation) 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 (*CareerTaskMutation) ResetField

func (m *CareerTaskMutation) 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 (*CareerTaskMutation) ResetName

func (m *CareerTaskMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CareerTaskMutation) ResetUpdateTime

func (m *CareerTaskMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*CareerTaskMutation) SetCareerID

func (m *CareerTaskMutation) SetCareerID(id int)

SetCareerID sets the "career" edge to the UserCareer entity by id.

func (*CareerTaskMutation) SetCreateTime

func (m *CareerTaskMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*CareerTaskMutation) SetField

func (m *CareerTaskMutation) 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 (*CareerTaskMutation) SetName

func (m *CareerTaskMutation) SetName(s string)

SetName sets the "name" field.

func (*CareerTaskMutation) SetOp

func (m *CareerTaskMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CareerTaskMutation) SetUpdateTime

func (m *CareerTaskMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (CareerTaskMutation) Tx

func (m CareerTaskMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CareerTaskMutation) Type

func (m *CareerTaskMutation) Type() string

Type returns the node type of this mutation (CareerTask).

func (*CareerTaskMutation) UpdateTime

func (m *CareerTaskMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*CareerTaskMutation) Where

func (m *CareerTaskMutation) Where(ps ...predicate.CareerTask)

Where appends a list predicates to the CareerTaskMutation builder.

func (*CareerTaskMutation) WhereP

func (m *CareerTaskMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CareerTaskMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CareerTaskQuery

type CareerTaskQuery struct {
	// contains filtered or unexported fields
}

CareerTaskQuery is the builder for querying CareerTask entities.

func (*CareerTaskQuery) Aggregate

func (ctq *CareerTaskQuery) Aggregate(fns ...AggregateFunc) *CareerTaskSelect

Aggregate returns a CareerTaskSelect configured with the given aggregations.

func (*CareerTaskQuery) All

func (ctq *CareerTaskQuery) All(ctx context.Context) ([]*CareerTask, error)

All executes the query and returns a list of CareerTasks.

func (*CareerTaskQuery) AllX

func (ctq *CareerTaskQuery) AllX(ctx context.Context) []*CareerTask

AllX is like All, but panics if an error occurs.

func (*CareerTaskQuery) Clone

func (ctq *CareerTaskQuery) Clone() *CareerTaskQuery

Clone returns a duplicate of the CareerTaskQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CareerTaskQuery) Count

func (ctq *CareerTaskQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CareerTaskQuery) CountX

func (ctq *CareerTaskQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CareerTaskQuery) Exist

func (ctq *CareerTaskQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CareerTaskQuery) ExistX

func (ctq *CareerTaskQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CareerTaskQuery) First

func (ctq *CareerTaskQuery) First(ctx context.Context) (*CareerTask, error)

First returns the first CareerTask entity from the query. Returns a *NotFoundError when no CareerTask was found.

func (*CareerTaskQuery) FirstID

func (ctq *CareerTaskQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first CareerTask ID from the query. Returns a *NotFoundError when no CareerTask ID was found.

func (*CareerTaskQuery) FirstIDX

func (ctq *CareerTaskQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*CareerTaskQuery) FirstX

func (ctq *CareerTaskQuery) FirstX(ctx context.Context) *CareerTask

FirstX is like First, but panics if an error occurs.

func (*CareerTaskQuery) GroupBy

func (ctq *CareerTaskQuery) GroupBy(field string, fields ...string) *CareerTaskGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CareerTask.Query().
	GroupBy(careertask.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CareerTaskQuery) IDs

func (ctq *CareerTaskQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of CareerTask IDs.

func (*CareerTaskQuery) IDsX

func (ctq *CareerTaskQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*CareerTaskQuery) Limit

func (ctq *CareerTaskQuery) Limit(limit int) *CareerTaskQuery

Limit the number of records to be returned by this query.

func (*CareerTaskQuery) Offset

func (ctq *CareerTaskQuery) Offset(offset int) *CareerTaskQuery

Offset to start from.

func (*CareerTaskQuery) Only

func (ctq *CareerTaskQuery) Only(ctx context.Context) (*CareerTask, error)

Only returns a single CareerTask entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CareerTask entity is found. Returns a *NotFoundError when no CareerTask entities are found.

func (*CareerTaskQuery) OnlyID

func (ctq *CareerTaskQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only CareerTask ID in the query. Returns a *NotSingularError when more than one CareerTask ID is found. Returns a *NotFoundError when no entities are found.

func (*CareerTaskQuery) OnlyIDX

func (ctq *CareerTaskQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CareerTaskQuery) OnlyX

func (ctq *CareerTaskQuery) OnlyX(ctx context.Context) *CareerTask

OnlyX is like Only, but panics if an error occurs.

func (*CareerTaskQuery) Order

Order specifies how the records should be ordered.

func (*CareerTaskQuery) QueryCareer

func (ctq *CareerTaskQuery) QueryCareer() *UserCareerQuery

QueryCareer chains the current query on the "career" edge.

func (*CareerTaskQuery) QueryCareerTaskDescriptions

func (ctq *CareerTaskQuery) QueryCareerTaskDescriptions() *CareerTaskDescriptionQuery

QueryCareerTaskDescriptions chains the current query on the "careerTaskDescriptions" edge.

func (*CareerTaskQuery) Select

func (ctq *CareerTaskQuery) Select(fields ...string) *CareerTaskSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.CareerTask.Query().
	Select(careertask.FieldCreateTime).
	Scan(ctx, &v)

func (*CareerTaskQuery) Unique

func (ctq *CareerTaskQuery) Unique(unique bool) *CareerTaskQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*CareerTaskQuery) Where

Where adds a new predicate for the CareerTaskQuery builder.

func (*CareerTaskQuery) WithCareer

func (ctq *CareerTaskQuery) WithCareer(opts ...func(*UserCareerQuery)) *CareerTaskQuery

WithCareer tells the query-builder to eager-load the nodes that are connected to the "career" edge. The optional arguments are used to configure the query builder of the edge.

func (*CareerTaskQuery) WithCareerTaskDescriptions

func (ctq *CareerTaskQuery) WithCareerTaskDescriptions(opts ...func(*CareerTaskDescriptionQuery)) *CareerTaskQuery

WithCareerTaskDescriptions tells the query-builder to eager-load the nodes that are connected to the "careerTaskDescriptions" edge. The optional arguments are used to configure the query builder of the edge.

type CareerTaskSelect

type CareerTaskSelect struct {
	*CareerTaskQuery
	// contains filtered or unexported fields
}

CareerTaskSelect is the builder for selecting fields of CareerTask entities.

func (*CareerTaskSelect) Aggregate

func (cts *CareerTaskSelect) Aggregate(fns ...AggregateFunc) *CareerTaskSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CareerTaskSelect) Bool

func (s *CareerTaskSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CareerTaskSelect) BoolX

func (s *CareerTaskSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CareerTaskSelect) Bools

func (s *CareerTaskSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CareerTaskSelect) BoolsX

func (s *CareerTaskSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CareerTaskSelect) Float64

func (s *CareerTaskSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CareerTaskSelect) Float64X

func (s *CareerTaskSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CareerTaskSelect) Float64s

func (s *CareerTaskSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CareerTaskSelect) Float64sX

func (s *CareerTaskSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CareerTaskSelect) Int

func (s *CareerTaskSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CareerTaskSelect) IntX

func (s *CareerTaskSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CareerTaskSelect) Ints

func (s *CareerTaskSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CareerTaskSelect) IntsX

func (s *CareerTaskSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CareerTaskSelect) Scan

func (cts *CareerTaskSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CareerTaskSelect) ScanX

func (s *CareerTaskSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CareerTaskSelect) String

func (s *CareerTaskSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CareerTaskSelect) StringX

func (s *CareerTaskSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CareerTaskSelect) Strings

func (s *CareerTaskSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CareerTaskSelect) StringsX

func (s *CareerTaskSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CareerTaskUpdate

type CareerTaskUpdate struct {
	// contains filtered or unexported fields
}

CareerTaskUpdate is the builder for updating CareerTask entities.

func (*CareerTaskUpdate) AddCareerTaskDescriptionIDs

func (ctu *CareerTaskUpdate) AddCareerTaskDescriptionIDs(ids ...int) *CareerTaskUpdate

AddCareerTaskDescriptionIDs adds the "careerTaskDescriptions" edge to the CareerTaskDescription entity by IDs.

func (*CareerTaskUpdate) AddCareerTaskDescriptions

func (ctu *CareerTaskUpdate) AddCareerTaskDescriptions(c ...*CareerTaskDescription) *CareerTaskUpdate

AddCareerTaskDescriptions adds the "careerTaskDescriptions" edges to the CareerTaskDescription entity.

func (*CareerTaskUpdate) ClearCareer

func (ctu *CareerTaskUpdate) ClearCareer() *CareerTaskUpdate

ClearCareer clears the "career" edge to the UserCareer entity.

func (*CareerTaskUpdate) ClearCareerTaskDescriptions

func (ctu *CareerTaskUpdate) ClearCareerTaskDescriptions() *CareerTaskUpdate

ClearCareerTaskDescriptions clears all "careerTaskDescriptions" edges to the CareerTaskDescription entity.

func (*CareerTaskUpdate) Exec

func (ctu *CareerTaskUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CareerTaskUpdate) ExecX

func (ctu *CareerTaskUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskUpdate) Mutation

func (ctu *CareerTaskUpdate) Mutation() *CareerTaskMutation

Mutation returns the CareerTaskMutation object of the builder.

func (*CareerTaskUpdate) RemoveCareerTaskDescriptionIDs

func (ctu *CareerTaskUpdate) RemoveCareerTaskDescriptionIDs(ids ...int) *CareerTaskUpdate

RemoveCareerTaskDescriptionIDs removes the "careerTaskDescriptions" edge to CareerTaskDescription entities by IDs.

func (*CareerTaskUpdate) RemoveCareerTaskDescriptions

func (ctu *CareerTaskUpdate) RemoveCareerTaskDescriptions(c ...*CareerTaskDescription) *CareerTaskUpdate

RemoveCareerTaskDescriptions removes "careerTaskDescriptions" edges to CareerTaskDescription entities.

func (*CareerTaskUpdate) Save

func (ctu *CareerTaskUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CareerTaskUpdate) SaveX

func (ctu *CareerTaskUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CareerTaskUpdate) SetCareer

func (ctu *CareerTaskUpdate) SetCareer(u *UserCareer) *CareerTaskUpdate

SetCareer sets the "career" edge to the UserCareer entity.

func (*CareerTaskUpdate) SetCareerID

func (ctu *CareerTaskUpdate) SetCareerID(id int) *CareerTaskUpdate

SetCareerID sets the "career" edge to the UserCareer entity by ID.

func (*CareerTaskUpdate) SetName

func (ctu *CareerTaskUpdate) SetName(s string) *CareerTaskUpdate

SetName sets the "name" field.

func (*CareerTaskUpdate) SetUpdateTime

func (ctu *CareerTaskUpdate) SetUpdateTime(t time.Time) *CareerTaskUpdate

SetUpdateTime sets the "update_time" field.

func (*CareerTaskUpdate) Where

Where appends a list predicates to the CareerTaskUpdate builder.

type CareerTaskUpdateOne

type CareerTaskUpdateOne struct {
	// contains filtered or unexported fields
}

CareerTaskUpdateOne is the builder for updating a single CareerTask entity.

func (*CareerTaskUpdateOne) AddCareerTaskDescriptionIDs

func (ctuo *CareerTaskUpdateOne) AddCareerTaskDescriptionIDs(ids ...int) *CareerTaskUpdateOne

AddCareerTaskDescriptionIDs adds the "careerTaskDescriptions" edge to the CareerTaskDescription entity by IDs.

func (*CareerTaskUpdateOne) AddCareerTaskDescriptions

func (ctuo *CareerTaskUpdateOne) AddCareerTaskDescriptions(c ...*CareerTaskDescription) *CareerTaskUpdateOne

AddCareerTaskDescriptions adds the "careerTaskDescriptions" edges to the CareerTaskDescription entity.

func (*CareerTaskUpdateOne) ClearCareer

func (ctuo *CareerTaskUpdateOne) ClearCareer() *CareerTaskUpdateOne

ClearCareer clears the "career" edge to the UserCareer entity.

func (*CareerTaskUpdateOne) ClearCareerTaskDescriptions

func (ctuo *CareerTaskUpdateOne) ClearCareerTaskDescriptions() *CareerTaskUpdateOne

ClearCareerTaskDescriptions clears all "careerTaskDescriptions" edges to the CareerTaskDescription entity.

func (*CareerTaskUpdateOne) Exec

func (ctuo *CareerTaskUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CareerTaskUpdateOne) ExecX

func (ctuo *CareerTaskUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskUpdateOne) Mutation

func (ctuo *CareerTaskUpdateOne) Mutation() *CareerTaskMutation

Mutation returns the CareerTaskMutation object of the builder.

func (*CareerTaskUpdateOne) RemoveCareerTaskDescriptionIDs

func (ctuo *CareerTaskUpdateOne) RemoveCareerTaskDescriptionIDs(ids ...int) *CareerTaskUpdateOne

RemoveCareerTaskDescriptionIDs removes the "careerTaskDescriptions" edge to CareerTaskDescription entities by IDs.

func (*CareerTaskUpdateOne) RemoveCareerTaskDescriptions

func (ctuo *CareerTaskUpdateOne) RemoveCareerTaskDescriptions(c ...*CareerTaskDescription) *CareerTaskUpdateOne

RemoveCareerTaskDescriptions removes "careerTaskDescriptions" edges to CareerTaskDescription entities.

func (*CareerTaskUpdateOne) Save

func (ctuo *CareerTaskUpdateOne) Save(ctx context.Context) (*CareerTask, error)

Save executes the query and returns the updated CareerTask entity.

func (*CareerTaskUpdateOne) SaveX

func (ctuo *CareerTaskUpdateOne) SaveX(ctx context.Context) *CareerTask

SaveX is like Save, but panics if an error occurs.

func (*CareerTaskUpdateOne) Select

func (ctuo *CareerTaskUpdateOne) Select(field string, fields ...string) *CareerTaskUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CareerTaskUpdateOne) SetCareer

func (ctuo *CareerTaskUpdateOne) SetCareer(u *UserCareer) *CareerTaskUpdateOne

SetCareer sets the "career" edge to the UserCareer entity.

func (*CareerTaskUpdateOne) SetCareerID

func (ctuo *CareerTaskUpdateOne) SetCareerID(id int) *CareerTaskUpdateOne

SetCareerID sets the "career" edge to the UserCareer entity by ID.

func (*CareerTaskUpdateOne) SetName

SetName sets the "name" field.

func (*CareerTaskUpdateOne) SetUpdateTime

func (ctuo *CareerTaskUpdateOne) SetUpdateTime(t time.Time) *CareerTaskUpdateOne

SetUpdateTime sets the "update_time" field.

func (*CareerTaskUpdateOne) Where

Where appends a list predicates to the CareerTaskUpdate builder.

type CareerTaskUpsert

type CareerTaskUpsert struct {
	*sql.UpdateSet
}

CareerTaskUpsert is the "OnConflict" setter.

func (*CareerTaskUpsert) SetName

func (u *CareerTaskUpsert) SetName(v string) *CareerTaskUpsert

SetName sets the "name" field.

func (*CareerTaskUpsert) SetUpdateTime

func (u *CareerTaskUpsert) SetUpdateTime(v time.Time) *CareerTaskUpsert

SetUpdateTime sets the "update_time" field.

func (*CareerTaskUpsert) UpdateName

func (u *CareerTaskUpsert) UpdateName() *CareerTaskUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*CareerTaskUpsert) UpdateUpdateTime

func (u *CareerTaskUpsert) UpdateUpdateTime() *CareerTaskUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type CareerTaskUpsertBulk

type CareerTaskUpsertBulk struct {
	// contains filtered or unexported fields
}

CareerTaskUpsertBulk is the builder for "upsert"-ing a bulk of CareerTask nodes.

func (*CareerTaskUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CareerTaskUpsertBulk) Exec

Exec executes the query.

func (*CareerTaskUpsertBulk) ExecX

func (u *CareerTaskUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CareerTask.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CareerTaskUpsertBulk) SetName

SetName sets the "name" field.

func (*CareerTaskUpsertBulk) SetUpdateTime

func (u *CareerTaskUpsertBulk) SetUpdateTime(v time.Time) *CareerTaskUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*CareerTaskUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CareerTaskCreateBulk.OnConflict documentation for more info.

func (*CareerTaskUpsertBulk) UpdateName

func (u *CareerTaskUpsertBulk) UpdateName() *CareerTaskUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*CareerTaskUpsertBulk) UpdateNewValues

func (u *CareerTaskUpsertBulk) UpdateNewValues() *CareerTaskUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CareerTask.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*CareerTaskUpsertBulk) UpdateUpdateTime

func (u *CareerTaskUpsertBulk) UpdateUpdateTime() *CareerTaskUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type CareerTaskUpsertOne

type CareerTaskUpsertOne struct {
	// contains filtered or unexported fields
}

CareerTaskUpsertOne is the builder for "upsert"-ing

one CareerTask node.

func (*CareerTaskUpsertOne) DoNothing

func (u *CareerTaskUpsertOne) DoNothing() *CareerTaskUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CareerTaskUpsertOne) Exec

Exec executes the query.

func (*CareerTaskUpsertOne) ExecX

func (u *CareerTaskUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CareerTaskUpsertOne) ID

func (u *CareerTaskUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CareerTaskUpsertOne) IDX

func (u *CareerTaskUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*CareerTaskUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CareerTask.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CareerTaskUpsertOne) SetName

SetName sets the "name" field.

func (*CareerTaskUpsertOne) SetUpdateTime

func (u *CareerTaskUpsertOne) SetUpdateTime(v time.Time) *CareerTaskUpsertOne

SetUpdateTime sets the "update_time" field.

func (*CareerTaskUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CareerTaskCreate.OnConflict documentation for more info.

func (*CareerTaskUpsertOne) UpdateName

func (u *CareerTaskUpsertOne) UpdateName() *CareerTaskUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*CareerTaskUpsertOne) UpdateNewValues

func (u *CareerTaskUpsertOne) UpdateNewValues() *CareerTaskUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CareerTask.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*CareerTaskUpsertOne) UpdateUpdateTime

func (u *CareerTaskUpsertOne) UpdateUpdateTime() *CareerTaskUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type CareerTasks

type CareerTasks []*CareerTask

CareerTasks is a parsable slice of CareerTask.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// CareerSkill is the client for interacting with the CareerSkill builders.
	CareerSkill *CareerSkillClient
	// CareerSkillGroup is the client for interacting with the CareerSkillGroup builders.
	CareerSkillGroup *CareerSkillGroupClient
	// CareerTask is the client for interacting with the CareerTask builders.
	CareerTask *CareerTaskClient
	// CareerTaskDescription is the client for interacting with the CareerTaskDescription builders.
	CareerTaskDescription *CareerTaskDescriptionClient
	// Skill is the client for interacting with the Skill builders.
	Skill *SkillClient
	// SkillTag is the client for interacting with the SkillTag builders.
	SkillTag *SkillTagClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UserActivity is the client for interacting with the UserActivity builders.
	UserActivity *UserActivityClient
	// UserCareer is the client for interacting with the UserCareer builders.
	UserCareer *UserCareerClient
	// UserCareerDescription is the client for interacting with the UserCareerDescription builders.
	UserCareerDescription *UserCareerDescriptionClient
	// UserCareerGroup is the client for interacting with the UserCareerGroup builders.
	UserCareerGroup *UserCareerGroupClient
	// UserNote is the client for interacting with the UserNote builders.
	UserNote *UserNoteClient
	// UserNoteItem is the client for interacting with the UserNoteItem builders.
	UserNoteItem *UserNoteItemClient
	// UserQualification is the client for interacting with the UserQualification builders.
	UserQualification *UserQualificationClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

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) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	CareerSkill.
	Query().
	Count(ctx)

func (*Client) Intercept

func (c *Client) Intercept(interceptors ...Interceptor)

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

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.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

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 Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

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 Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

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.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type Skill

type Skill struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Code holds the value of the "code" field.
	Code string `json:"code,omitempty"`
	// URL holds the value of the "url" field.
	URL *string `json:"url,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SkillQuery when eager-loading is set.
	Edges SkillEdges `json:"edges"`
	// contains filtered or unexported fields
}

Skill is the model entity for the Skill schema.

func (*Skill) QueryCareerSkills

func (s *Skill) QueryCareerSkills() *CareerSkillQuery

QueryCareerSkills queries the "careerSkills" edge of the Skill entity.

func (*Skill) QuerySkillTag

func (s *Skill) QuerySkillTag() *SkillTagQuery

QuerySkillTag queries the "skillTag" edge of the Skill entity.

func (*Skill) String

func (s *Skill) String() string

String implements the fmt.Stringer.

func (*Skill) Unwrap

func (s *Skill) Unwrap() *Skill

Unwrap unwraps the Skill 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 (*Skill) Update

func (s *Skill) Update() *SkillUpdateOne

Update returns a builder for updating this Skill. Note that you need to call Skill.Unwrap() before calling this method if this Skill was returned from a transaction, and the transaction was committed or rolled back.

func (*Skill) Value

func (s *Skill) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Skill. This includes values selected through modifiers, order, etc.

type SkillClient

type SkillClient struct {
	// contains filtered or unexported fields
}

SkillClient is a client for the Skill schema.

func NewSkillClient

func NewSkillClient(c config) *SkillClient

NewSkillClient returns a client for the Skill from the given config.

func (*SkillClient) Create

func (c *SkillClient) Create() *SkillCreate

Create returns a builder for creating a Skill entity.

func (*SkillClient) CreateBulk

func (c *SkillClient) CreateBulk(builders ...*SkillCreate) *SkillCreateBulk

CreateBulk returns a builder for creating a bulk of Skill entities.

func (*SkillClient) Delete

func (c *SkillClient) Delete() *SkillDelete

Delete returns a delete builder for Skill.

func (*SkillClient) DeleteOne

func (c *SkillClient) DeleteOne(s *Skill) *SkillDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SkillClient) DeleteOneID

func (c *SkillClient) DeleteOneID(id int) *SkillDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SkillClient) Get

func (c *SkillClient) Get(ctx context.Context, id int) (*Skill, error)

Get returns a Skill entity by its id.

func (*SkillClient) GetX

func (c *SkillClient) GetX(ctx context.Context, id int) *Skill

GetX is like Get, but panics if an error occurs.

func (*SkillClient) Hooks

func (c *SkillClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SkillClient) Intercept

func (c *SkillClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `skill.Intercept(f(g(h())))`.

func (*SkillClient) Interceptors

func (c *SkillClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SkillClient) Query

func (c *SkillClient) Query() *SkillQuery

Query returns a query builder for Skill.

func (*SkillClient) QueryCareerSkills

func (c *SkillClient) QueryCareerSkills(s *Skill) *CareerSkillQuery

QueryCareerSkills queries the careerSkills edge of a Skill.

func (*SkillClient) QuerySkillTag

func (c *SkillClient) QuerySkillTag(s *Skill) *SkillTagQuery

QuerySkillTag queries the skillTag edge of a Skill.

func (*SkillClient) Update

func (c *SkillClient) Update() *SkillUpdate

Update returns an update builder for Skill.

func (*SkillClient) UpdateOne

func (c *SkillClient) UpdateOne(s *Skill) *SkillUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SkillClient) UpdateOneID

func (c *SkillClient) UpdateOneID(id int) *SkillUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SkillClient) Use

func (c *SkillClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `skill.Hooks(f(g(h())))`.

type SkillCreate

type SkillCreate struct {
	// contains filtered or unexported fields
}

SkillCreate is the builder for creating a Skill entity.

func (*SkillCreate) AddCareerSkillIDs

func (sc *SkillCreate) AddCareerSkillIDs(ids ...int) *SkillCreate

AddCareerSkillIDs adds the "careerSkills" edge to the CareerSkill entity by IDs.

func (*SkillCreate) AddCareerSkills

func (sc *SkillCreate) AddCareerSkills(c ...*CareerSkill) *SkillCreate

AddCareerSkills adds the "careerSkills" edges to the CareerSkill entity.

func (*SkillCreate) Exec

func (sc *SkillCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillCreate) ExecX

func (sc *SkillCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillCreate) Mutation

func (sc *SkillCreate) Mutation() *SkillMutation

Mutation returns the SkillMutation object of the builder.

func (*SkillCreate) OnConflict

func (sc *SkillCreate) OnConflict(opts ...sql.ConflictOption) *SkillUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Skill.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SkillUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*SkillCreate) OnConflictColumns

func (sc *SkillCreate) OnConflictColumns(columns ...string) *SkillUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Skill.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SkillCreate) Save

func (sc *SkillCreate) Save(ctx context.Context) (*Skill, error)

Save creates the Skill in the database.

func (*SkillCreate) SaveX

func (sc *SkillCreate) SaveX(ctx context.Context) *Skill

SaveX calls Save and panics if Save returns an error.

func (*SkillCreate) SetCode

func (sc *SkillCreate) SetCode(s string) *SkillCreate

SetCode sets the "code" field.

func (*SkillCreate) SetCreateTime

func (sc *SkillCreate) SetCreateTime(t time.Time) *SkillCreate

SetCreateTime sets the "create_time" field.

func (*SkillCreate) SetName

func (sc *SkillCreate) SetName(s string) *SkillCreate

SetName sets the "name" field.

func (*SkillCreate) SetNillableCreateTime

func (sc *SkillCreate) SetNillableCreateTime(t *time.Time) *SkillCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*SkillCreate) SetNillableURL

func (sc *SkillCreate) SetNillableURL(s *string) *SkillCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*SkillCreate) SetNillableUpdateTime

func (sc *SkillCreate) SetNillableUpdateTime(t *time.Time) *SkillCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*SkillCreate) SetSkillTag

func (sc *SkillCreate) SetSkillTag(s *SkillTag) *SkillCreate

SetSkillTag sets the "skillTag" edge to the SkillTag entity.

func (*SkillCreate) SetSkillTagID

func (sc *SkillCreate) SetSkillTagID(id int) *SkillCreate

SetSkillTagID sets the "skillTag" edge to the SkillTag entity by ID.

func (*SkillCreate) SetURL

func (sc *SkillCreate) SetURL(s string) *SkillCreate

SetURL sets the "url" field.

func (*SkillCreate) SetUpdateTime

func (sc *SkillCreate) SetUpdateTime(t time.Time) *SkillCreate

SetUpdateTime sets the "update_time" field.

type SkillCreateBulk

type SkillCreateBulk struct {
	// contains filtered or unexported fields
}

SkillCreateBulk is the builder for creating many Skill entities in bulk.

func (*SkillCreateBulk) Exec

func (scb *SkillCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillCreateBulk) ExecX

func (scb *SkillCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillCreateBulk) OnConflict

func (scb *SkillCreateBulk) OnConflict(opts ...sql.ConflictOption) *SkillUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Skill.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SkillUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*SkillCreateBulk) OnConflictColumns

func (scb *SkillCreateBulk) OnConflictColumns(columns ...string) *SkillUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Skill.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SkillCreateBulk) Save

func (scb *SkillCreateBulk) Save(ctx context.Context) ([]*Skill, error)

Save creates the Skill entities in the database.

func (*SkillCreateBulk) SaveX

func (scb *SkillCreateBulk) SaveX(ctx context.Context) []*Skill

SaveX is like Save, but panics if an error occurs.

type SkillDelete

type SkillDelete struct {
	// contains filtered or unexported fields
}

SkillDelete is the builder for deleting a Skill entity.

func (*SkillDelete) Exec

func (sd *SkillDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SkillDelete) ExecX

func (sd *SkillDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SkillDelete) Where

func (sd *SkillDelete) Where(ps ...predicate.Skill) *SkillDelete

Where appends a list predicates to the SkillDelete builder.

type SkillDeleteOne

type SkillDeleteOne struct {
	// contains filtered or unexported fields
}

SkillDeleteOne is the builder for deleting a single Skill entity.

func (*SkillDeleteOne) Exec

func (sdo *SkillDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SkillDeleteOne) ExecX

func (sdo *SkillDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillDeleteOne) Where

func (sdo *SkillDeleteOne) Where(ps ...predicate.Skill) *SkillDeleteOne

Where appends a list predicates to the SkillDelete builder.

type SkillEdges

type SkillEdges struct {
	// SkillTag holds the value of the skillTag edge.
	SkillTag *SkillTag `json:"skillTag,omitempty"`
	// CareerSkills holds the value of the careerSkills edge.
	CareerSkills []*CareerSkill `json:"careerSkills,omitempty"`
	// contains filtered or unexported fields
}

SkillEdges holds the relations/edges for other nodes in the graph.

func (SkillEdges) CareerSkillsOrErr

func (e SkillEdges) CareerSkillsOrErr() ([]*CareerSkill, error)

CareerSkillsOrErr returns the CareerSkills value or an error if the edge was not loaded in eager-loading.

func (SkillEdges) SkillTagOrErr

func (e SkillEdges) SkillTagOrErr() (*SkillTag, error)

SkillTagOrErr returns the SkillTag value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SkillGroupBy

type SkillGroupBy struct {
	// contains filtered or unexported fields
}

SkillGroupBy is the group-by builder for Skill entities.

func (*SkillGroupBy) Aggregate

func (sgb *SkillGroupBy) Aggregate(fns ...AggregateFunc) *SkillGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SkillGroupBy) Bool

func (s *SkillGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) BoolX

func (s *SkillGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SkillGroupBy) Bools

func (s *SkillGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) BoolsX

func (s *SkillGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SkillGroupBy) Float64

func (s *SkillGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) Float64X

func (s *SkillGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SkillGroupBy) Float64s

func (s *SkillGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) Float64sX

func (s *SkillGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SkillGroupBy) Int

func (s *SkillGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) IntX

func (s *SkillGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SkillGroupBy) Ints

func (s *SkillGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) IntsX

func (s *SkillGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SkillGroupBy) Scan

func (sgb *SkillGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SkillGroupBy) ScanX

func (s *SkillGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SkillGroupBy) String

func (s *SkillGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) StringX

func (s *SkillGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SkillGroupBy) Strings

func (s *SkillGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SkillGroupBy) StringsX

func (s *SkillGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SkillMutation

type SkillMutation struct {
	// contains filtered or unexported fields
}

SkillMutation represents an operation that mutates the Skill nodes in the graph.

func (*SkillMutation) AddCareerSkillIDs

func (m *SkillMutation) AddCareerSkillIDs(ids ...int)

AddCareerSkillIDs adds the "careerSkills" edge to the CareerSkill entity by ids.

func (*SkillMutation) AddField

func (m *SkillMutation) 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 (*SkillMutation) AddedEdges

func (m *SkillMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SkillMutation) AddedField

func (m *SkillMutation) 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 (*SkillMutation) AddedFields

func (m *SkillMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SkillMutation) AddedIDs

func (m *SkillMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SkillMutation) CareerSkillsCleared

func (m *SkillMutation) CareerSkillsCleared() bool

CareerSkillsCleared reports if the "careerSkills" edge to the CareerSkill entity was cleared.

func (*SkillMutation) CareerSkillsIDs

func (m *SkillMutation) CareerSkillsIDs() (ids []int)

CareerSkillsIDs returns the "careerSkills" edge IDs in the mutation.

func (*SkillMutation) ClearCareerSkills

func (m *SkillMutation) ClearCareerSkills()

ClearCareerSkills clears the "careerSkills" edge to the CareerSkill entity.

func (*SkillMutation) ClearEdge

func (m *SkillMutation) 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 (*SkillMutation) ClearField

func (m *SkillMutation) 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 (*SkillMutation) ClearSkillTag

func (m *SkillMutation) ClearSkillTag()

ClearSkillTag clears the "skillTag" edge to the SkillTag entity.

func (*SkillMutation) ClearURL

func (m *SkillMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*SkillMutation) ClearedEdges

func (m *SkillMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SkillMutation) ClearedFields

func (m *SkillMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SkillMutation) Client

func (m SkillMutation) 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 (*SkillMutation) Code

func (m *SkillMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*SkillMutation) CreateTime

func (m *SkillMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*SkillMutation) EdgeCleared

func (m *SkillMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SkillMutation) Field

func (m *SkillMutation) 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 (*SkillMutation) FieldCleared

func (m *SkillMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SkillMutation) Fields

func (m *SkillMutation) 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 (*SkillMutation) ID

func (m *SkillMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SkillMutation) IDs

func (m *SkillMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SkillMutation) Name

func (m *SkillMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SkillMutation) OldCode

func (m *SkillMutation) OldCode(ctx context.Context) (v string, err error)

OldCode returns the old "code" field's value of the Skill entity. If the Skill 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 (*SkillMutation) OldCreateTime

func (m *SkillMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Skill entity. If the Skill 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 (*SkillMutation) OldField

func (m *SkillMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*SkillMutation) OldName

func (m *SkillMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Skill entity. If the Skill 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 (*SkillMutation) OldURL

func (m *SkillMutation) OldURL(ctx context.Context) (v *string, err error)

OldURL returns the old "url" field's value of the Skill entity. If the Skill 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 (*SkillMutation) OldUpdateTime

func (m *SkillMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Skill entity. If the Skill 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 (*SkillMutation) Op

func (m *SkillMutation) Op() Op

Op returns the operation name.

func (*SkillMutation) RemoveCareerSkillIDs

func (m *SkillMutation) RemoveCareerSkillIDs(ids ...int)

RemoveCareerSkillIDs removes the "careerSkills" edge to the CareerSkill entity by IDs.

func (*SkillMutation) RemovedCareerSkillsIDs

func (m *SkillMutation) RemovedCareerSkillsIDs() (ids []int)

RemovedCareerSkills returns the removed IDs of the "careerSkills" edge to the CareerSkill entity.

func (*SkillMutation) RemovedEdges

func (m *SkillMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SkillMutation) RemovedIDs

func (m *SkillMutation) 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 (*SkillMutation) ResetCareerSkills

func (m *SkillMutation) ResetCareerSkills()

ResetCareerSkills resets all changes to the "careerSkills" edge.

func (*SkillMutation) ResetCode

func (m *SkillMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*SkillMutation) ResetCreateTime

func (m *SkillMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*SkillMutation) ResetEdge

func (m *SkillMutation) 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 (*SkillMutation) ResetField

func (m *SkillMutation) 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 (*SkillMutation) ResetName

func (m *SkillMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SkillMutation) ResetSkillTag

func (m *SkillMutation) ResetSkillTag()

ResetSkillTag resets all changes to the "skillTag" edge.

func (*SkillMutation) ResetURL

func (m *SkillMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*SkillMutation) ResetUpdateTime

func (m *SkillMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*SkillMutation) SetCode

func (m *SkillMutation) SetCode(s string)

SetCode sets the "code" field.

func (*SkillMutation) SetCreateTime

func (m *SkillMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*SkillMutation) SetField

func (m *SkillMutation) 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 (*SkillMutation) SetName

func (m *SkillMutation) SetName(s string)

SetName sets the "name" field.

func (*SkillMutation) SetOp

func (m *SkillMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SkillMutation) SetSkillTagID

func (m *SkillMutation) SetSkillTagID(id int)

SetSkillTagID sets the "skillTag" edge to the SkillTag entity by id.

func (*SkillMutation) SetURL

func (m *SkillMutation) SetURL(s string)

SetURL sets the "url" field.

func (*SkillMutation) SetUpdateTime

func (m *SkillMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*SkillMutation) SkillTagCleared

func (m *SkillMutation) SkillTagCleared() bool

SkillTagCleared reports if the "skillTag" edge to the SkillTag entity was cleared.

func (*SkillMutation) SkillTagID

func (m *SkillMutation) SkillTagID() (id int, exists bool)

SkillTagID returns the "skillTag" edge ID in the mutation.

func (*SkillMutation) SkillTagIDs

func (m *SkillMutation) SkillTagIDs() (ids []int)

SkillTagIDs returns the "skillTag" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SkillTagID instead. It exists only for internal usage by the builders.

func (SkillMutation) Tx

func (m SkillMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SkillMutation) Type

func (m *SkillMutation) Type() string

Type returns the node type of this mutation (Skill).

func (*SkillMutation) URL

func (m *SkillMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*SkillMutation) URLCleared

func (m *SkillMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*SkillMutation) UpdateTime

func (m *SkillMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*SkillMutation) Where

func (m *SkillMutation) Where(ps ...predicate.Skill)

Where appends a list predicates to the SkillMutation builder.

func (*SkillMutation) WhereP

func (m *SkillMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SkillMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SkillQuery

type SkillQuery struct {
	// contains filtered or unexported fields
}

SkillQuery is the builder for querying Skill entities.

func (*SkillQuery) Aggregate

func (sq *SkillQuery) Aggregate(fns ...AggregateFunc) *SkillSelect

Aggregate returns a SkillSelect configured with the given aggregations.

func (*SkillQuery) All

func (sq *SkillQuery) All(ctx context.Context) ([]*Skill, error)

All executes the query and returns a list of Skills.

func (*SkillQuery) AllX

func (sq *SkillQuery) AllX(ctx context.Context) []*Skill

AllX is like All, but panics if an error occurs.

func (*SkillQuery) Clone

func (sq *SkillQuery) Clone() *SkillQuery

Clone returns a duplicate of the SkillQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SkillQuery) Count

func (sq *SkillQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SkillQuery) CountX

func (sq *SkillQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SkillQuery) Exist

func (sq *SkillQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SkillQuery) ExistX

func (sq *SkillQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SkillQuery) First

func (sq *SkillQuery) First(ctx context.Context) (*Skill, error)

First returns the first Skill entity from the query. Returns a *NotFoundError when no Skill was found.

func (*SkillQuery) FirstID

func (sq *SkillQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Skill ID from the query. Returns a *NotFoundError when no Skill ID was found.

func (*SkillQuery) FirstIDX

func (sq *SkillQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SkillQuery) FirstX

func (sq *SkillQuery) FirstX(ctx context.Context) *Skill

FirstX is like First, but panics if an error occurs.

func (*SkillQuery) GroupBy

func (sq *SkillQuery) GroupBy(field string, fields ...string) *SkillGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Skill.Query().
	GroupBy(skill.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SkillQuery) IDs

func (sq *SkillQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Skill IDs.

func (*SkillQuery) IDsX

func (sq *SkillQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SkillQuery) Limit

func (sq *SkillQuery) Limit(limit int) *SkillQuery

Limit the number of records to be returned by this query.

func (*SkillQuery) Offset

func (sq *SkillQuery) Offset(offset int) *SkillQuery

Offset to start from.

func (*SkillQuery) Only

func (sq *SkillQuery) Only(ctx context.Context) (*Skill, error)

Only returns a single Skill entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Skill entity is found. Returns a *NotFoundError when no Skill entities are found.

func (*SkillQuery) OnlyID

func (sq *SkillQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Skill ID in the query. Returns a *NotSingularError when more than one Skill ID is found. Returns a *NotFoundError when no entities are found.

func (*SkillQuery) OnlyIDX

func (sq *SkillQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SkillQuery) OnlyX

func (sq *SkillQuery) OnlyX(ctx context.Context) *Skill

OnlyX is like Only, but panics if an error occurs.

func (*SkillQuery) Order

func (sq *SkillQuery) Order(o ...skill.OrderOption) *SkillQuery

Order specifies how the records should be ordered.

func (*SkillQuery) QueryCareerSkills

func (sq *SkillQuery) QueryCareerSkills() *CareerSkillQuery

QueryCareerSkills chains the current query on the "careerSkills" edge.

func (*SkillQuery) QuerySkillTag

func (sq *SkillQuery) QuerySkillTag() *SkillTagQuery

QuerySkillTag chains the current query on the "skillTag" edge.

func (*SkillQuery) Select

func (sq *SkillQuery) Select(fields ...string) *SkillSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Skill.Query().
	Select(skill.FieldCreateTime).
	Scan(ctx, &v)

func (*SkillQuery) Unique

func (sq *SkillQuery) Unique(unique bool) *SkillQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SkillQuery) Where

func (sq *SkillQuery) Where(ps ...predicate.Skill) *SkillQuery

Where adds a new predicate for the SkillQuery builder.

func (*SkillQuery) WithCareerSkills

func (sq *SkillQuery) WithCareerSkills(opts ...func(*CareerSkillQuery)) *SkillQuery

WithCareerSkills tells the query-builder to eager-load the nodes that are connected to the "careerSkills" edge. The optional arguments are used to configure the query builder of the edge.

func (*SkillQuery) WithSkillTag

func (sq *SkillQuery) WithSkillTag(opts ...func(*SkillTagQuery)) *SkillQuery

WithSkillTag tells the query-builder to eager-load the nodes that are connected to the "skillTag" edge. The optional arguments are used to configure the query builder of the edge.

type SkillSelect

type SkillSelect struct {
	*SkillQuery
	// contains filtered or unexported fields
}

SkillSelect is the builder for selecting fields of Skill entities.

func (*SkillSelect) Aggregate

func (ss *SkillSelect) Aggregate(fns ...AggregateFunc) *SkillSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SkillSelect) Bool

func (s *SkillSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SkillSelect) BoolX

func (s *SkillSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SkillSelect) Bools

func (s *SkillSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SkillSelect) BoolsX

func (s *SkillSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SkillSelect) Float64

func (s *SkillSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SkillSelect) Float64X

func (s *SkillSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SkillSelect) Float64s

func (s *SkillSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SkillSelect) Float64sX

func (s *SkillSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SkillSelect) Int

func (s *SkillSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SkillSelect) IntX

func (s *SkillSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SkillSelect) Ints

func (s *SkillSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SkillSelect) IntsX

func (s *SkillSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SkillSelect) Scan

func (ss *SkillSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SkillSelect) ScanX

func (s *SkillSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SkillSelect) String

func (s *SkillSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SkillSelect) StringX

func (s *SkillSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SkillSelect) Strings

func (s *SkillSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SkillSelect) StringsX

func (s *SkillSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SkillTag

type SkillTag struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Code holds the value of the "code" field.
	Code string `json:"code,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SkillTagQuery when eager-loading is set.
	Edges SkillTagEdges `json:"edges"`
	// contains filtered or unexported fields
}

SkillTag is the model entity for the SkillTag schema.

func (*SkillTag) QuerySkills

func (st *SkillTag) QuerySkills() *SkillQuery

QuerySkills queries the "skills" edge of the SkillTag entity.

func (*SkillTag) String

func (st *SkillTag) String() string

String implements the fmt.Stringer.

func (*SkillTag) Unwrap

func (st *SkillTag) Unwrap() *SkillTag

Unwrap unwraps the SkillTag 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 (*SkillTag) Update

func (st *SkillTag) Update() *SkillTagUpdateOne

Update returns a builder for updating this SkillTag. Note that you need to call SkillTag.Unwrap() before calling this method if this SkillTag was returned from a transaction, and the transaction was committed or rolled back.

func (*SkillTag) Value

func (st *SkillTag) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the SkillTag. This includes values selected through modifiers, order, etc.

type SkillTagClient

type SkillTagClient struct {
	// contains filtered or unexported fields
}

SkillTagClient is a client for the SkillTag schema.

func NewSkillTagClient

func NewSkillTagClient(c config) *SkillTagClient

NewSkillTagClient returns a client for the SkillTag from the given config.

func (*SkillTagClient) Create

func (c *SkillTagClient) Create() *SkillTagCreate

Create returns a builder for creating a SkillTag entity.

func (*SkillTagClient) CreateBulk

func (c *SkillTagClient) CreateBulk(builders ...*SkillTagCreate) *SkillTagCreateBulk

CreateBulk returns a builder for creating a bulk of SkillTag entities.

func (*SkillTagClient) Delete

func (c *SkillTagClient) Delete() *SkillTagDelete

Delete returns a delete builder for SkillTag.

func (*SkillTagClient) DeleteOne

func (c *SkillTagClient) DeleteOne(st *SkillTag) *SkillTagDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SkillTagClient) DeleteOneID

func (c *SkillTagClient) DeleteOneID(id int) *SkillTagDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SkillTagClient) Get

func (c *SkillTagClient) Get(ctx context.Context, id int) (*SkillTag, error)

Get returns a SkillTag entity by its id.

func (*SkillTagClient) GetX

func (c *SkillTagClient) GetX(ctx context.Context, id int) *SkillTag

GetX is like Get, but panics if an error occurs.

func (*SkillTagClient) Hooks

func (c *SkillTagClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SkillTagClient) Intercept

func (c *SkillTagClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `skilltag.Intercept(f(g(h())))`.

func (*SkillTagClient) Interceptors

func (c *SkillTagClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SkillTagClient) Query

func (c *SkillTagClient) Query() *SkillTagQuery

Query returns a query builder for SkillTag.

func (*SkillTagClient) QuerySkills

func (c *SkillTagClient) QuerySkills(st *SkillTag) *SkillQuery

QuerySkills queries the skills edge of a SkillTag.

func (*SkillTagClient) Update

func (c *SkillTagClient) Update() *SkillTagUpdate

Update returns an update builder for SkillTag.

func (*SkillTagClient) UpdateOne

func (c *SkillTagClient) UpdateOne(st *SkillTag) *SkillTagUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SkillTagClient) UpdateOneID

func (c *SkillTagClient) UpdateOneID(id int) *SkillTagUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SkillTagClient) Use

func (c *SkillTagClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `skilltag.Hooks(f(g(h())))`.

type SkillTagCreate

type SkillTagCreate struct {
	// contains filtered or unexported fields
}

SkillTagCreate is the builder for creating a SkillTag entity.

func (*SkillTagCreate) AddSkillIDs

func (stc *SkillTagCreate) AddSkillIDs(ids ...int) *SkillTagCreate

AddSkillIDs adds the "skills" edge to the Skill entity by IDs.

func (*SkillTagCreate) AddSkills

func (stc *SkillTagCreate) AddSkills(s ...*Skill) *SkillTagCreate

AddSkills adds the "skills" edges to the Skill entity.

func (*SkillTagCreate) Exec

func (stc *SkillTagCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillTagCreate) ExecX

func (stc *SkillTagCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillTagCreate) Mutation

func (stc *SkillTagCreate) Mutation() *SkillTagMutation

Mutation returns the SkillTagMutation object of the builder.

func (*SkillTagCreate) OnConflict

func (stc *SkillTagCreate) OnConflict(opts ...sql.ConflictOption) *SkillTagUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SkillTag.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SkillTagUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*SkillTagCreate) OnConflictColumns

func (stc *SkillTagCreate) OnConflictColumns(columns ...string) *SkillTagUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SkillTag.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SkillTagCreate) Save

func (stc *SkillTagCreate) Save(ctx context.Context) (*SkillTag, error)

Save creates the SkillTag in the database.

func (*SkillTagCreate) SaveX

func (stc *SkillTagCreate) SaveX(ctx context.Context) *SkillTag

SaveX calls Save and panics if Save returns an error.

func (*SkillTagCreate) SetCode

func (stc *SkillTagCreate) SetCode(s string) *SkillTagCreate

SetCode sets the "code" field.

func (*SkillTagCreate) SetName

func (stc *SkillTagCreate) SetName(s string) *SkillTagCreate

SetName sets the "name" field.

type SkillTagCreateBulk

type SkillTagCreateBulk struct {
	// contains filtered or unexported fields
}

SkillTagCreateBulk is the builder for creating many SkillTag entities in bulk.

func (*SkillTagCreateBulk) Exec

func (stcb *SkillTagCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillTagCreateBulk) ExecX

func (stcb *SkillTagCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillTagCreateBulk) OnConflict

func (stcb *SkillTagCreateBulk) OnConflict(opts ...sql.ConflictOption) *SkillTagUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.SkillTag.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SkillTagUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*SkillTagCreateBulk) OnConflictColumns

func (stcb *SkillTagCreateBulk) OnConflictColumns(columns ...string) *SkillTagUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.SkillTag.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SkillTagCreateBulk) Save

func (stcb *SkillTagCreateBulk) Save(ctx context.Context) ([]*SkillTag, error)

Save creates the SkillTag entities in the database.

func (*SkillTagCreateBulk) SaveX

func (stcb *SkillTagCreateBulk) SaveX(ctx context.Context) []*SkillTag

SaveX is like Save, but panics if an error occurs.

type SkillTagDelete

type SkillTagDelete struct {
	// contains filtered or unexported fields
}

SkillTagDelete is the builder for deleting a SkillTag entity.

func (*SkillTagDelete) Exec

func (std *SkillTagDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SkillTagDelete) ExecX

func (std *SkillTagDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SkillTagDelete) Where

func (std *SkillTagDelete) Where(ps ...predicate.SkillTag) *SkillTagDelete

Where appends a list predicates to the SkillTagDelete builder.

type SkillTagDeleteOne

type SkillTagDeleteOne struct {
	// contains filtered or unexported fields
}

SkillTagDeleteOne is the builder for deleting a single SkillTag entity.

func (*SkillTagDeleteOne) Exec

func (stdo *SkillTagDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SkillTagDeleteOne) ExecX

func (stdo *SkillTagDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillTagDeleteOne) Where

Where appends a list predicates to the SkillTagDelete builder.

type SkillTagEdges

type SkillTagEdges struct {
	// Skills holds the value of the skills edge.
	Skills []*Skill `json:"skills,omitempty"`
	// contains filtered or unexported fields
}

SkillTagEdges holds the relations/edges for other nodes in the graph.

func (SkillTagEdges) SkillsOrErr

func (e SkillTagEdges) SkillsOrErr() ([]*Skill, error)

SkillsOrErr returns the Skills value or an error if the edge was not loaded in eager-loading.

type SkillTagGroupBy

type SkillTagGroupBy struct {
	// contains filtered or unexported fields
}

SkillTagGroupBy is the group-by builder for SkillTag entities.

func (*SkillTagGroupBy) Aggregate

func (stgb *SkillTagGroupBy) Aggregate(fns ...AggregateFunc) *SkillTagGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SkillTagGroupBy) Bool

func (s *SkillTagGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SkillTagGroupBy) BoolX

func (s *SkillTagGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SkillTagGroupBy) Bools

func (s *SkillTagGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SkillTagGroupBy) BoolsX

func (s *SkillTagGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SkillTagGroupBy) Float64

func (s *SkillTagGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SkillTagGroupBy) Float64X

func (s *SkillTagGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SkillTagGroupBy) Float64s

func (s *SkillTagGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SkillTagGroupBy) Float64sX

func (s *SkillTagGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SkillTagGroupBy) Int

func (s *SkillTagGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SkillTagGroupBy) IntX

func (s *SkillTagGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SkillTagGroupBy) Ints

func (s *SkillTagGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SkillTagGroupBy) IntsX

func (s *SkillTagGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SkillTagGroupBy) Scan

func (stgb *SkillTagGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SkillTagGroupBy) ScanX

func (s *SkillTagGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SkillTagGroupBy) String

func (s *SkillTagGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SkillTagGroupBy) StringX

func (s *SkillTagGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SkillTagGroupBy) Strings

func (s *SkillTagGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SkillTagGroupBy) StringsX

func (s *SkillTagGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SkillTagMutation

type SkillTagMutation struct {
	// contains filtered or unexported fields
}

SkillTagMutation represents an operation that mutates the SkillTag nodes in the graph.

func (*SkillTagMutation) AddField

func (m *SkillTagMutation) 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 (*SkillTagMutation) AddSkillIDs

func (m *SkillTagMutation) AddSkillIDs(ids ...int)

AddSkillIDs adds the "skills" edge to the Skill entity by ids.

func (*SkillTagMutation) AddedEdges

func (m *SkillTagMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SkillTagMutation) AddedField

func (m *SkillTagMutation) 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 (*SkillTagMutation) AddedFields

func (m *SkillTagMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SkillTagMutation) AddedIDs

func (m *SkillTagMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SkillTagMutation) ClearEdge

func (m *SkillTagMutation) 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 (*SkillTagMutation) ClearField

func (m *SkillTagMutation) 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 (*SkillTagMutation) ClearSkills

func (m *SkillTagMutation) ClearSkills()

ClearSkills clears the "skills" edge to the Skill entity.

func (*SkillTagMutation) ClearedEdges

func (m *SkillTagMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SkillTagMutation) ClearedFields

func (m *SkillTagMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SkillTagMutation) Client

func (m SkillTagMutation) 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 (*SkillTagMutation) Code

func (m *SkillTagMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*SkillTagMutation) EdgeCleared

func (m *SkillTagMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SkillTagMutation) Field

func (m *SkillTagMutation) 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 (*SkillTagMutation) FieldCleared

func (m *SkillTagMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SkillTagMutation) Fields

func (m *SkillTagMutation) 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 (*SkillTagMutation) ID

func (m *SkillTagMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SkillTagMutation) IDs

func (m *SkillTagMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SkillTagMutation) Name

func (m *SkillTagMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SkillTagMutation) OldCode

func (m *SkillTagMutation) OldCode(ctx context.Context) (v string, err error)

OldCode returns the old "code" field's value of the SkillTag entity. If the SkillTag 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 (*SkillTagMutation) OldField

func (m *SkillTagMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*SkillTagMutation) OldName

func (m *SkillTagMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the SkillTag entity. If the SkillTag 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 (*SkillTagMutation) Op

func (m *SkillTagMutation) Op() Op

Op returns the operation name.

func (*SkillTagMutation) RemoveSkillIDs

func (m *SkillTagMutation) RemoveSkillIDs(ids ...int)

RemoveSkillIDs removes the "skills" edge to the Skill entity by IDs.

func (*SkillTagMutation) RemovedEdges

func (m *SkillTagMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SkillTagMutation) RemovedIDs

func (m *SkillTagMutation) 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 (*SkillTagMutation) RemovedSkillsIDs

func (m *SkillTagMutation) RemovedSkillsIDs() (ids []int)

RemovedSkills returns the removed IDs of the "skills" edge to the Skill entity.

func (*SkillTagMutation) ResetCode

func (m *SkillTagMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*SkillTagMutation) ResetEdge

func (m *SkillTagMutation) 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 (*SkillTagMutation) ResetField

func (m *SkillTagMutation) 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 (*SkillTagMutation) ResetName

func (m *SkillTagMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SkillTagMutation) ResetSkills

func (m *SkillTagMutation) ResetSkills()

ResetSkills resets all changes to the "skills" edge.

func (*SkillTagMutation) SetCode

func (m *SkillTagMutation) SetCode(s string)

SetCode sets the "code" field.

func (*SkillTagMutation) SetField

func (m *SkillTagMutation) 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 (*SkillTagMutation) SetName

func (m *SkillTagMutation) SetName(s string)

SetName sets the "name" field.

func (*SkillTagMutation) SetOp

func (m *SkillTagMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SkillTagMutation) SkillsCleared

func (m *SkillTagMutation) SkillsCleared() bool

SkillsCleared reports if the "skills" edge to the Skill entity was cleared.

func (*SkillTagMutation) SkillsIDs

func (m *SkillTagMutation) SkillsIDs() (ids []int)

SkillsIDs returns the "skills" edge IDs in the mutation.

func (SkillTagMutation) Tx

func (m SkillTagMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SkillTagMutation) Type

func (m *SkillTagMutation) Type() string

Type returns the node type of this mutation (SkillTag).

func (*SkillTagMutation) Where

func (m *SkillTagMutation) Where(ps ...predicate.SkillTag)

Where appends a list predicates to the SkillTagMutation builder.

func (*SkillTagMutation) WhereP

func (m *SkillTagMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SkillTagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SkillTagQuery

type SkillTagQuery struct {
	// contains filtered or unexported fields
}

SkillTagQuery is the builder for querying SkillTag entities.

func (*SkillTagQuery) Aggregate

func (stq *SkillTagQuery) Aggregate(fns ...AggregateFunc) *SkillTagSelect

Aggregate returns a SkillTagSelect configured with the given aggregations.

func (*SkillTagQuery) All

func (stq *SkillTagQuery) All(ctx context.Context) ([]*SkillTag, error)

All executes the query and returns a list of SkillTags.

func (*SkillTagQuery) AllX

func (stq *SkillTagQuery) AllX(ctx context.Context) []*SkillTag

AllX is like All, but panics if an error occurs.

func (*SkillTagQuery) Clone

func (stq *SkillTagQuery) Clone() *SkillTagQuery

Clone returns a duplicate of the SkillTagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SkillTagQuery) Count

func (stq *SkillTagQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SkillTagQuery) CountX

func (stq *SkillTagQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SkillTagQuery) Exist

func (stq *SkillTagQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SkillTagQuery) ExistX

func (stq *SkillTagQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SkillTagQuery) First

func (stq *SkillTagQuery) First(ctx context.Context) (*SkillTag, error)

First returns the first SkillTag entity from the query. Returns a *NotFoundError when no SkillTag was found.

func (*SkillTagQuery) FirstID

func (stq *SkillTagQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first SkillTag ID from the query. Returns a *NotFoundError when no SkillTag ID was found.

func (*SkillTagQuery) FirstIDX

func (stq *SkillTagQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SkillTagQuery) FirstX

func (stq *SkillTagQuery) FirstX(ctx context.Context) *SkillTag

FirstX is like First, but panics if an error occurs.

func (*SkillTagQuery) GroupBy

func (stq *SkillTagQuery) GroupBy(field string, fields ...string) *SkillTagGroupBy

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 {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SkillTag.Query().
	GroupBy(skilltag.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SkillTagQuery) IDs

func (stq *SkillTagQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of SkillTag IDs.

func (*SkillTagQuery) IDsX

func (stq *SkillTagQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SkillTagQuery) Limit

func (stq *SkillTagQuery) Limit(limit int) *SkillTagQuery

Limit the number of records to be returned by this query.

func (*SkillTagQuery) Offset

func (stq *SkillTagQuery) Offset(offset int) *SkillTagQuery

Offset to start from.

func (*SkillTagQuery) Only

func (stq *SkillTagQuery) Only(ctx context.Context) (*SkillTag, error)

Only returns a single SkillTag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SkillTag entity is found. Returns a *NotFoundError when no SkillTag entities are found.

func (*SkillTagQuery) OnlyID

func (stq *SkillTagQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only SkillTag ID in the query. Returns a *NotSingularError when more than one SkillTag ID is found. Returns a *NotFoundError when no entities are found.

func (*SkillTagQuery) OnlyIDX

func (stq *SkillTagQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SkillTagQuery) OnlyX

func (stq *SkillTagQuery) OnlyX(ctx context.Context) *SkillTag

OnlyX is like Only, but panics if an error occurs.

func (*SkillTagQuery) Order

func (stq *SkillTagQuery) Order(o ...skilltag.OrderOption) *SkillTagQuery

Order specifies how the records should be ordered.

func (*SkillTagQuery) QuerySkills

func (stq *SkillTagQuery) QuerySkills() *SkillQuery

QuerySkills chains the current query on the "skills" edge.

func (*SkillTagQuery) Select

func (stq *SkillTagQuery) Select(fields ...string) *SkillTagSelect

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 {
	Name string `json:"name,omitempty"`
}

client.SkillTag.Query().
	Select(skilltag.FieldName).
	Scan(ctx, &v)

func (*SkillTagQuery) Unique

func (stq *SkillTagQuery) Unique(unique bool) *SkillTagQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SkillTagQuery) Where

func (stq *SkillTagQuery) Where(ps ...predicate.SkillTag) *SkillTagQuery

Where adds a new predicate for the SkillTagQuery builder.

func (*SkillTagQuery) WithSkills

func (stq *SkillTagQuery) WithSkills(opts ...func(*SkillQuery)) *SkillTagQuery

WithSkills tells the query-builder to eager-load the nodes that are connected to the "skills" edge. The optional arguments are used to configure the query builder of the edge.

type SkillTagSelect

type SkillTagSelect struct {
	*SkillTagQuery
	// contains filtered or unexported fields
}

SkillTagSelect is the builder for selecting fields of SkillTag entities.

func (*SkillTagSelect) Aggregate

func (sts *SkillTagSelect) Aggregate(fns ...AggregateFunc) *SkillTagSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SkillTagSelect) Bool

func (s *SkillTagSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SkillTagSelect) BoolX

func (s *SkillTagSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SkillTagSelect) Bools

func (s *SkillTagSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SkillTagSelect) BoolsX

func (s *SkillTagSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SkillTagSelect) Float64

func (s *SkillTagSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SkillTagSelect) Float64X

func (s *SkillTagSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SkillTagSelect) Float64s

func (s *SkillTagSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SkillTagSelect) Float64sX

func (s *SkillTagSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SkillTagSelect) Int

func (s *SkillTagSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SkillTagSelect) IntX

func (s *SkillTagSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SkillTagSelect) Ints

func (s *SkillTagSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SkillTagSelect) IntsX

func (s *SkillTagSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SkillTagSelect) Scan

func (sts *SkillTagSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SkillTagSelect) ScanX

func (s *SkillTagSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SkillTagSelect) String

func (s *SkillTagSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SkillTagSelect) StringX

func (s *SkillTagSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SkillTagSelect) Strings

func (s *SkillTagSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SkillTagSelect) StringsX

func (s *SkillTagSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SkillTagUpdate

type SkillTagUpdate struct {
	// contains filtered or unexported fields
}

SkillTagUpdate is the builder for updating SkillTag entities.

func (*SkillTagUpdate) AddSkillIDs

func (stu *SkillTagUpdate) AddSkillIDs(ids ...int) *SkillTagUpdate

AddSkillIDs adds the "skills" edge to the Skill entity by IDs.

func (*SkillTagUpdate) AddSkills

func (stu *SkillTagUpdate) AddSkills(s ...*Skill) *SkillTagUpdate

AddSkills adds the "skills" edges to the Skill entity.

func (*SkillTagUpdate) ClearSkills

func (stu *SkillTagUpdate) ClearSkills() *SkillTagUpdate

ClearSkills clears all "skills" edges to the Skill entity.

func (*SkillTagUpdate) Exec

func (stu *SkillTagUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillTagUpdate) ExecX

func (stu *SkillTagUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillTagUpdate) Mutation

func (stu *SkillTagUpdate) Mutation() *SkillTagMutation

Mutation returns the SkillTagMutation object of the builder.

func (*SkillTagUpdate) RemoveSkillIDs

func (stu *SkillTagUpdate) RemoveSkillIDs(ids ...int) *SkillTagUpdate

RemoveSkillIDs removes the "skills" edge to Skill entities by IDs.

func (*SkillTagUpdate) RemoveSkills

func (stu *SkillTagUpdate) RemoveSkills(s ...*Skill) *SkillTagUpdate

RemoveSkills removes "skills" edges to Skill entities.

func (*SkillTagUpdate) Save

func (stu *SkillTagUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SkillTagUpdate) SaveX

func (stu *SkillTagUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SkillTagUpdate) SetCode

func (stu *SkillTagUpdate) SetCode(s string) *SkillTagUpdate

SetCode sets the "code" field.

func (*SkillTagUpdate) SetName

func (stu *SkillTagUpdate) SetName(s string) *SkillTagUpdate

SetName sets the "name" field.

func (*SkillTagUpdate) Where

func (stu *SkillTagUpdate) Where(ps ...predicate.SkillTag) *SkillTagUpdate

Where appends a list predicates to the SkillTagUpdate builder.

type SkillTagUpdateOne

type SkillTagUpdateOne struct {
	// contains filtered or unexported fields
}

SkillTagUpdateOne is the builder for updating a single SkillTag entity.

func (*SkillTagUpdateOne) AddSkillIDs

func (stuo *SkillTagUpdateOne) AddSkillIDs(ids ...int) *SkillTagUpdateOne

AddSkillIDs adds the "skills" edge to the Skill entity by IDs.

func (*SkillTagUpdateOne) AddSkills

func (stuo *SkillTagUpdateOne) AddSkills(s ...*Skill) *SkillTagUpdateOne

AddSkills adds the "skills" edges to the Skill entity.

func (*SkillTagUpdateOne) ClearSkills

func (stuo *SkillTagUpdateOne) ClearSkills() *SkillTagUpdateOne

ClearSkills clears all "skills" edges to the Skill entity.

func (*SkillTagUpdateOne) Exec

func (stuo *SkillTagUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SkillTagUpdateOne) ExecX

func (stuo *SkillTagUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillTagUpdateOne) Mutation

func (stuo *SkillTagUpdateOne) Mutation() *SkillTagMutation

Mutation returns the SkillTagMutation object of the builder.

func (*SkillTagUpdateOne) RemoveSkillIDs

func (stuo *SkillTagUpdateOne) RemoveSkillIDs(ids ...int) *SkillTagUpdateOne

RemoveSkillIDs removes the "skills" edge to Skill entities by IDs.

func (*SkillTagUpdateOne) RemoveSkills

func (stuo *SkillTagUpdateOne) RemoveSkills(s ...*Skill) *SkillTagUpdateOne

RemoveSkills removes "skills" edges to Skill entities.

func (*SkillTagUpdateOne) Save

func (stuo *SkillTagUpdateOne) Save(ctx context.Context) (*SkillTag, error)

Save executes the query and returns the updated SkillTag entity.

func (*SkillTagUpdateOne) SaveX

func (stuo *SkillTagUpdateOne) SaveX(ctx context.Context) *SkillTag

SaveX is like Save, but panics if an error occurs.

func (*SkillTagUpdateOne) Select

func (stuo *SkillTagUpdateOne) Select(field string, fields ...string) *SkillTagUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SkillTagUpdateOne) SetCode

func (stuo *SkillTagUpdateOne) SetCode(s string) *SkillTagUpdateOne

SetCode sets the "code" field.

func (*SkillTagUpdateOne) SetName

func (stuo *SkillTagUpdateOne) SetName(s string) *SkillTagUpdateOne

SetName sets the "name" field.

func (*SkillTagUpdateOne) Where

Where appends a list predicates to the SkillTagUpdate builder.

type SkillTagUpsert

type SkillTagUpsert struct {
	*sql.UpdateSet
}

SkillTagUpsert is the "OnConflict" setter.

func (*SkillTagUpsert) SetCode

func (u *SkillTagUpsert) SetCode(v string) *SkillTagUpsert

SetCode sets the "code" field.

func (*SkillTagUpsert) SetName

func (u *SkillTagUpsert) SetName(v string) *SkillTagUpsert

SetName sets the "name" field.

func (*SkillTagUpsert) UpdateCode

func (u *SkillTagUpsert) UpdateCode() *SkillTagUpsert

UpdateCode sets the "code" field to the value that was provided on create.

func (*SkillTagUpsert) UpdateName

func (u *SkillTagUpsert) UpdateName() *SkillTagUpsert

UpdateName sets the "name" field to the value that was provided on create.

type SkillTagUpsertBulk

type SkillTagUpsertBulk struct {
	// contains filtered or unexported fields
}

SkillTagUpsertBulk is the builder for "upsert"-ing a bulk of SkillTag nodes.

func (*SkillTagUpsertBulk) DoNothing

func (u *SkillTagUpsertBulk) DoNothing() *SkillTagUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SkillTagUpsertBulk) Exec

func (u *SkillTagUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillTagUpsertBulk) ExecX

func (u *SkillTagUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillTagUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SkillTag.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SkillTagUpsertBulk) SetCode

SetCode sets the "code" field.

func (*SkillTagUpsertBulk) SetName

SetName sets the "name" field.

func (*SkillTagUpsertBulk) Update

func (u *SkillTagUpsertBulk) Update(set func(*SkillTagUpsert)) *SkillTagUpsertBulk

Update allows overriding fields `UPDATE` values. See the SkillTagCreateBulk.OnConflict documentation for more info.

func (*SkillTagUpsertBulk) UpdateCode

func (u *SkillTagUpsertBulk) UpdateCode() *SkillTagUpsertBulk

UpdateCode sets the "code" field to the value that was provided on create.

func (*SkillTagUpsertBulk) UpdateName

func (u *SkillTagUpsertBulk) UpdateName() *SkillTagUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*SkillTagUpsertBulk) UpdateNewValues

func (u *SkillTagUpsertBulk) UpdateNewValues() *SkillTagUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SkillTag.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type SkillTagUpsertOne

type SkillTagUpsertOne struct {
	// contains filtered or unexported fields
}

SkillTagUpsertOne is the builder for "upsert"-ing

one SkillTag node.

func (*SkillTagUpsertOne) DoNothing

func (u *SkillTagUpsertOne) DoNothing() *SkillTagUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SkillTagUpsertOne) Exec

func (u *SkillTagUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillTagUpsertOne) ExecX

func (u *SkillTagUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillTagUpsertOne) ID

func (u *SkillTagUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SkillTagUpsertOne) IDX

func (u *SkillTagUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*SkillTagUpsertOne) Ignore

func (u *SkillTagUpsertOne) Ignore() *SkillTagUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.SkillTag.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SkillTagUpsertOne) SetCode

SetCode sets the "code" field.

func (*SkillTagUpsertOne) SetName

SetName sets the "name" field.

func (*SkillTagUpsertOne) Update

func (u *SkillTagUpsertOne) Update(set func(*SkillTagUpsert)) *SkillTagUpsertOne

Update allows overriding fields `UPDATE` values. See the SkillTagCreate.OnConflict documentation for more info.

func (*SkillTagUpsertOne) UpdateCode

func (u *SkillTagUpsertOne) UpdateCode() *SkillTagUpsertOne

UpdateCode sets the "code" field to the value that was provided on create.

func (*SkillTagUpsertOne) UpdateName

func (u *SkillTagUpsertOne) UpdateName() *SkillTagUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*SkillTagUpsertOne) UpdateNewValues

func (u *SkillTagUpsertOne) UpdateNewValues() *SkillTagUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.SkillTag.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type SkillTags

type SkillTags []*SkillTag

SkillTags is a parsable slice of SkillTag.

type SkillUpdate

type SkillUpdate struct {
	// contains filtered or unexported fields
}

SkillUpdate is the builder for updating Skill entities.

func (*SkillUpdate) AddCareerSkillIDs

func (su *SkillUpdate) AddCareerSkillIDs(ids ...int) *SkillUpdate

AddCareerSkillIDs adds the "careerSkills" edge to the CareerSkill entity by IDs.

func (*SkillUpdate) AddCareerSkills

func (su *SkillUpdate) AddCareerSkills(c ...*CareerSkill) *SkillUpdate

AddCareerSkills adds the "careerSkills" edges to the CareerSkill entity.

func (*SkillUpdate) ClearCareerSkills

func (su *SkillUpdate) ClearCareerSkills() *SkillUpdate

ClearCareerSkills clears all "careerSkills" edges to the CareerSkill entity.

func (*SkillUpdate) ClearSkillTag

func (su *SkillUpdate) ClearSkillTag() *SkillUpdate

ClearSkillTag clears the "skillTag" edge to the SkillTag entity.

func (*SkillUpdate) ClearURL

func (su *SkillUpdate) ClearURL() *SkillUpdate

ClearURL clears the value of the "url" field.

func (*SkillUpdate) Exec

func (su *SkillUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillUpdate) ExecX

func (su *SkillUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillUpdate) Mutation

func (su *SkillUpdate) Mutation() *SkillMutation

Mutation returns the SkillMutation object of the builder.

func (*SkillUpdate) RemoveCareerSkillIDs

func (su *SkillUpdate) RemoveCareerSkillIDs(ids ...int) *SkillUpdate

RemoveCareerSkillIDs removes the "careerSkills" edge to CareerSkill entities by IDs.

func (*SkillUpdate) RemoveCareerSkills

func (su *SkillUpdate) RemoveCareerSkills(c ...*CareerSkill) *SkillUpdate

RemoveCareerSkills removes "careerSkills" edges to CareerSkill entities.

func (*SkillUpdate) Save

func (su *SkillUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SkillUpdate) SaveX

func (su *SkillUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SkillUpdate) SetCode

func (su *SkillUpdate) SetCode(s string) *SkillUpdate

SetCode sets the "code" field.

func (*SkillUpdate) SetName

func (su *SkillUpdate) SetName(s string) *SkillUpdate

SetName sets the "name" field.

func (*SkillUpdate) SetNillableURL

func (su *SkillUpdate) SetNillableURL(s *string) *SkillUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*SkillUpdate) SetSkillTag

func (su *SkillUpdate) SetSkillTag(s *SkillTag) *SkillUpdate

SetSkillTag sets the "skillTag" edge to the SkillTag entity.

func (*SkillUpdate) SetSkillTagID

func (su *SkillUpdate) SetSkillTagID(id int) *SkillUpdate

SetSkillTagID sets the "skillTag" edge to the SkillTag entity by ID.

func (*SkillUpdate) SetURL

func (su *SkillUpdate) SetURL(s string) *SkillUpdate

SetURL sets the "url" field.

func (*SkillUpdate) SetUpdateTime

func (su *SkillUpdate) SetUpdateTime(t time.Time) *SkillUpdate

SetUpdateTime sets the "update_time" field.

func (*SkillUpdate) Where

func (su *SkillUpdate) Where(ps ...predicate.Skill) *SkillUpdate

Where appends a list predicates to the SkillUpdate builder.

type SkillUpdateOne

type SkillUpdateOne struct {
	// contains filtered or unexported fields
}

SkillUpdateOne is the builder for updating a single Skill entity.

func (*SkillUpdateOne) AddCareerSkillIDs

func (suo *SkillUpdateOne) AddCareerSkillIDs(ids ...int) *SkillUpdateOne

AddCareerSkillIDs adds the "careerSkills" edge to the CareerSkill entity by IDs.

func (*SkillUpdateOne) AddCareerSkills

func (suo *SkillUpdateOne) AddCareerSkills(c ...*CareerSkill) *SkillUpdateOne

AddCareerSkills adds the "careerSkills" edges to the CareerSkill entity.

func (*SkillUpdateOne) ClearCareerSkills

func (suo *SkillUpdateOne) ClearCareerSkills() *SkillUpdateOne

ClearCareerSkills clears all "careerSkills" edges to the CareerSkill entity.

func (*SkillUpdateOne) ClearSkillTag

func (suo *SkillUpdateOne) ClearSkillTag() *SkillUpdateOne

ClearSkillTag clears the "skillTag" edge to the SkillTag entity.

func (*SkillUpdateOne) ClearURL

func (suo *SkillUpdateOne) ClearURL() *SkillUpdateOne

ClearURL clears the value of the "url" field.

func (*SkillUpdateOne) Exec

func (suo *SkillUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SkillUpdateOne) ExecX

func (suo *SkillUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillUpdateOne) Mutation

func (suo *SkillUpdateOne) Mutation() *SkillMutation

Mutation returns the SkillMutation object of the builder.

func (*SkillUpdateOne) RemoveCareerSkillIDs

func (suo *SkillUpdateOne) RemoveCareerSkillIDs(ids ...int) *SkillUpdateOne

RemoveCareerSkillIDs removes the "careerSkills" edge to CareerSkill entities by IDs.

func (*SkillUpdateOne) RemoveCareerSkills

func (suo *SkillUpdateOne) RemoveCareerSkills(c ...*CareerSkill) *SkillUpdateOne

RemoveCareerSkills removes "careerSkills" edges to CareerSkill entities.

func (*SkillUpdateOne) Save

func (suo *SkillUpdateOne) Save(ctx context.Context) (*Skill, error)

Save executes the query and returns the updated Skill entity.

func (*SkillUpdateOne) SaveX

func (suo *SkillUpdateOne) SaveX(ctx context.Context) *Skill

SaveX is like Save, but panics if an error occurs.

func (*SkillUpdateOne) Select

func (suo *SkillUpdateOne) Select(field string, fields ...string) *SkillUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SkillUpdateOne) SetCode

func (suo *SkillUpdateOne) SetCode(s string) *SkillUpdateOne

SetCode sets the "code" field.

func (*SkillUpdateOne) SetName

func (suo *SkillUpdateOne) SetName(s string) *SkillUpdateOne

SetName sets the "name" field.

func (*SkillUpdateOne) SetNillableURL

func (suo *SkillUpdateOne) SetNillableURL(s *string) *SkillUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*SkillUpdateOne) SetSkillTag

func (suo *SkillUpdateOne) SetSkillTag(s *SkillTag) *SkillUpdateOne

SetSkillTag sets the "skillTag" edge to the SkillTag entity.

func (*SkillUpdateOne) SetSkillTagID

func (suo *SkillUpdateOne) SetSkillTagID(id int) *SkillUpdateOne

SetSkillTagID sets the "skillTag" edge to the SkillTag entity by ID.

func (*SkillUpdateOne) SetURL

func (suo *SkillUpdateOne) SetURL(s string) *SkillUpdateOne

SetURL sets the "url" field.

func (*SkillUpdateOne) SetUpdateTime

func (suo *SkillUpdateOne) SetUpdateTime(t time.Time) *SkillUpdateOne

SetUpdateTime sets the "update_time" field.

func (*SkillUpdateOne) Where

func (suo *SkillUpdateOne) Where(ps ...predicate.Skill) *SkillUpdateOne

Where appends a list predicates to the SkillUpdate builder.

type SkillUpsert

type SkillUpsert struct {
	*sql.UpdateSet
}

SkillUpsert is the "OnConflict" setter.

func (*SkillUpsert) ClearURL

func (u *SkillUpsert) ClearURL() *SkillUpsert

ClearURL clears the value of the "url" field.

func (*SkillUpsert) SetCode

func (u *SkillUpsert) SetCode(v string) *SkillUpsert

SetCode sets the "code" field.

func (*SkillUpsert) SetName

func (u *SkillUpsert) SetName(v string) *SkillUpsert

SetName sets the "name" field.

func (*SkillUpsert) SetURL

func (u *SkillUpsert) SetURL(v string) *SkillUpsert

SetURL sets the "url" field.

func (*SkillUpsert) SetUpdateTime

func (u *SkillUpsert) SetUpdateTime(v time.Time) *SkillUpsert

SetUpdateTime sets the "update_time" field.

func (*SkillUpsert) UpdateCode

func (u *SkillUpsert) UpdateCode() *SkillUpsert

UpdateCode sets the "code" field to the value that was provided on create.

func (*SkillUpsert) UpdateName

func (u *SkillUpsert) UpdateName() *SkillUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*SkillUpsert) UpdateURL

func (u *SkillUpsert) UpdateURL() *SkillUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*SkillUpsert) UpdateUpdateTime

func (u *SkillUpsert) UpdateUpdateTime() *SkillUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type SkillUpsertBulk

type SkillUpsertBulk struct {
	// contains filtered or unexported fields
}

SkillUpsertBulk is the builder for "upsert"-ing a bulk of Skill nodes.

func (*SkillUpsertBulk) ClearURL

func (u *SkillUpsertBulk) ClearURL() *SkillUpsertBulk

ClearURL clears the value of the "url" field.

func (*SkillUpsertBulk) DoNothing

func (u *SkillUpsertBulk) DoNothing() *SkillUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SkillUpsertBulk) Exec

func (u *SkillUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillUpsertBulk) ExecX

func (u *SkillUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillUpsertBulk) Ignore

func (u *SkillUpsertBulk) Ignore() *SkillUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Skill.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SkillUpsertBulk) SetCode

func (u *SkillUpsertBulk) SetCode(v string) *SkillUpsertBulk

SetCode sets the "code" field.

func (*SkillUpsertBulk) SetName

func (u *SkillUpsertBulk) SetName(v string) *SkillUpsertBulk

SetName sets the "name" field.

func (*SkillUpsertBulk) SetURL

func (u *SkillUpsertBulk) SetURL(v string) *SkillUpsertBulk

SetURL sets the "url" field.

func (*SkillUpsertBulk) SetUpdateTime

func (u *SkillUpsertBulk) SetUpdateTime(v time.Time) *SkillUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*SkillUpsertBulk) Update

func (u *SkillUpsertBulk) Update(set func(*SkillUpsert)) *SkillUpsertBulk

Update allows overriding fields `UPDATE` values. See the SkillCreateBulk.OnConflict documentation for more info.

func (*SkillUpsertBulk) UpdateCode

func (u *SkillUpsertBulk) UpdateCode() *SkillUpsertBulk

UpdateCode sets the "code" field to the value that was provided on create.

func (*SkillUpsertBulk) UpdateName

func (u *SkillUpsertBulk) UpdateName() *SkillUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*SkillUpsertBulk) UpdateNewValues

func (u *SkillUpsertBulk) UpdateNewValues() *SkillUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Skill.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SkillUpsertBulk) UpdateURL

func (u *SkillUpsertBulk) UpdateURL() *SkillUpsertBulk

UpdateURL sets the "url" field to the value that was provided on create.

func (*SkillUpsertBulk) UpdateUpdateTime

func (u *SkillUpsertBulk) UpdateUpdateTime() *SkillUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type SkillUpsertOne

type SkillUpsertOne struct {
	// contains filtered or unexported fields
}

SkillUpsertOne is the builder for "upsert"-ing

one Skill node.

func (*SkillUpsertOne) ClearURL

func (u *SkillUpsertOne) ClearURL() *SkillUpsertOne

ClearURL clears the value of the "url" field.

func (*SkillUpsertOne) DoNothing

func (u *SkillUpsertOne) DoNothing() *SkillUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SkillUpsertOne) Exec

func (u *SkillUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SkillUpsertOne) ExecX

func (u *SkillUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkillUpsertOne) ID

func (u *SkillUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SkillUpsertOne) IDX

func (u *SkillUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*SkillUpsertOne) Ignore

func (u *SkillUpsertOne) Ignore() *SkillUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Skill.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SkillUpsertOne) SetCode

func (u *SkillUpsertOne) SetCode(v string) *SkillUpsertOne

SetCode sets the "code" field.

func (*SkillUpsertOne) SetName

func (u *SkillUpsertOne) SetName(v string) *SkillUpsertOne

SetName sets the "name" field.

func (*SkillUpsertOne) SetURL

func (u *SkillUpsertOne) SetURL(v string) *SkillUpsertOne

SetURL sets the "url" field.

func (*SkillUpsertOne) SetUpdateTime

func (u *SkillUpsertOne) SetUpdateTime(v time.Time) *SkillUpsertOne

SetUpdateTime sets the "update_time" field.

func (*SkillUpsertOne) Update

func (u *SkillUpsertOne) Update(set func(*SkillUpsert)) *SkillUpsertOne

Update allows overriding fields `UPDATE` values. See the SkillCreate.OnConflict documentation for more info.

func (*SkillUpsertOne) UpdateCode

func (u *SkillUpsertOne) UpdateCode() *SkillUpsertOne

UpdateCode sets the "code" field to the value that was provided on create.

func (*SkillUpsertOne) UpdateName

func (u *SkillUpsertOne) UpdateName() *SkillUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*SkillUpsertOne) UpdateNewValues

func (u *SkillUpsertOne) UpdateNewValues() *SkillUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Skill.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SkillUpsertOne) UpdateURL

func (u *SkillUpsertOne) UpdateURL() *SkillUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

func (*SkillUpsertOne) UpdateUpdateTime

func (u *SkillUpsertOne) UpdateUpdateTime() *SkillUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type Skills

type Skills []*Skill

Skills is a parsable slice of Skill.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// CareerSkill is the client for interacting with the CareerSkill builders.
	CareerSkill *CareerSkillClient
	// CareerSkillGroup is the client for interacting with the CareerSkillGroup builders.
	CareerSkillGroup *CareerSkillGroupClient
	// CareerTask is the client for interacting with the CareerTask builders.
	CareerTask *CareerTaskClient
	// CareerTaskDescription is the client for interacting with the CareerTaskDescription builders.
	CareerTaskDescription *CareerTaskDescriptionClient
	// Skill is the client for interacting with the Skill builders.
	Skill *SkillClient
	// SkillTag is the client for interacting with the SkillTag builders.
	SkillTag *SkillTagClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UserActivity is the client for interacting with the UserActivity builders.
	UserActivity *UserActivityClient
	// UserCareer is the client for interacting with the UserCareer builders.
	UserCareer *UserCareerClient
	// UserCareerDescription is the client for interacting with the UserCareerDescription builders.
	UserCareerDescription *UserCareerDescriptionClient
	// UserCareerGroup is the client for interacting with the UserCareerGroup builders.
	UserCareerGroup *UserCareerGroupClient
	// UserNote is the client for interacting with the UserNote builders.
	UserNote *UserNoteClient
	// UserNoteItem is the client for interacting with the UserNoteItem builders.
	UserNoteItem *UserNoteItemClient
	// UserQualification is the client for interacting with the UserQualification builders.
	UserQualification *UserQualificationClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type User

type User struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Nickname holds the value of the "nickname" field.
	Nickname *string `json:"nickname,omitempty"`
	// AvatarURL holds the value of the "avatar_url" field.
	AvatarURL *string `json:"avatar_url,omitempty"`
	// BirthdayYear holds the value of the "birthday_year" field.
	BirthdayYear int `json:"birthday_year,omitempty"`
	// BirthdayMonth holds the value of the "birthday_month" field.
	BirthdayMonth int `json:"birthday_month,omitempty"`
	// BirthdayDay holds the value of the "birthday_day" field.
	BirthdayDay int `json:"birthday_day,omitempty"`
	// Job holds the value of the "job" field.
	Job *string `json:"job,omitempty"`
	// BelongTo holds the value of the "belong_to" field.
	BelongTo *string `json:"belong_to,omitempty"`
	// Pr holds the value of the "pr" field.
	Pr *string `json:"pr,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) QueryActivities

func (u *User) QueryActivities() *UserActivityQuery

QueryActivities queries the "activities" edge of the User entity.

func (*User) QueryCareerGroups

func (u *User) QueryCareerGroups() *UserCareerGroupQuery

QueryCareerGroups queries the "careerGroups" edge of the User entity.

func (*User) QueryNotes

func (u *User) QueryNotes() *UserNoteQuery

QueryNotes queries the "notes" edge of the User entity.

func (*User) QueryQualifications

func (u *User) QueryQualifications() *UserQualificationQuery

QueryQualifications queries the "qualifications" edge of the User entity.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

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.

func (*User) Value

func (u *User) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.

type UserActivities

type UserActivities []*UserActivity

UserActivities is a parsable slice of UserActivity.

type UserActivity

type UserActivity struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// URL holds the value of the "url" field.
	URL *string `json:"url,omitempty"`
	// Icon holds the value of the "icon" field.
	Icon *string `json:"icon,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserActivityQuery when eager-loading is set.
	Edges UserActivityEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserActivity is the model entity for the UserActivity schema.

func (*UserActivity) QueryUser

func (ua *UserActivity) QueryUser() *UserQuery

QueryUser queries the "user" edge of the UserActivity entity.

func (*UserActivity) String

func (ua *UserActivity) String() string

String implements the fmt.Stringer.

func (*UserActivity) Unwrap

func (ua *UserActivity) Unwrap() *UserActivity

Unwrap unwraps the UserActivity 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 (*UserActivity) Update

func (ua *UserActivity) Update() *UserActivityUpdateOne

Update returns a builder for updating this UserActivity. Note that you need to call UserActivity.Unwrap() before calling this method if this UserActivity was returned from a transaction, and the transaction was committed or rolled back.

func (*UserActivity) Value

func (ua *UserActivity) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserActivity. This includes values selected through modifiers, order, etc.

type UserActivityClient

type UserActivityClient struct {
	// contains filtered or unexported fields
}

UserActivityClient is a client for the UserActivity schema.

func NewUserActivityClient

func NewUserActivityClient(c config) *UserActivityClient

NewUserActivityClient returns a client for the UserActivity from the given config.

func (*UserActivityClient) Create

Create returns a builder for creating a UserActivity entity.

func (*UserActivityClient) CreateBulk

func (c *UserActivityClient) CreateBulk(builders ...*UserActivityCreate) *UserActivityCreateBulk

CreateBulk returns a builder for creating a bulk of UserActivity entities.

func (*UserActivityClient) Delete

Delete returns a delete builder for UserActivity.

func (*UserActivityClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserActivityClient) DeleteOneID

func (c *UserActivityClient) DeleteOneID(id int) *UserActivityDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserActivityClient) Get

Get returns a UserActivity entity by its id.

func (*UserActivityClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UserActivityClient) Hooks

func (c *UserActivityClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserActivityClient) Intercept

func (c *UserActivityClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `useractivity.Intercept(f(g(h())))`.

func (*UserActivityClient) Interceptors

func (c *UserActivityClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserActivityClient) Query

Query returns a query builder for UserActivity.

func (*UserActivityClient) QueryUser

func (c *UserActivityClient) QueryUser(ua *UserActivity) *UserQuery

QueryUser queries the user edge of a UserActivity.

func (*UserActivityClient) Update

Update returns an update builder for UserActivity.

func (*UserActivityClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserActivityClient) UpdateOneID

func (c *UserActivityClient) UpdateOneID(id int) *UserActivityUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserActivityClient) Use

func (c *UserActivityClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `useractivity.Hooks(f(g(h())))`.

type UserActivityCreate

type UserActivityCreate struct {
	// contains filtered or unexported fields
}

UserActivityCreate is the builder for creating a UserActivity entity.

func (*UserActivityCreate) Exec

func (uac *UserActivityCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserActivityCreate) ExecX

func (uac *UserActivityCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserActivityCreate) Mutation

func (uac *UserActivityCreate) Mutation() *UserActivityMutation

Mutation returns the UserActivityMutation object of the builder.

func (*UserActivityCreate) OnConflict

func (uac *UserActivityCreate) OnConflict(opts ...sql.ConflictOption) *UserActivityUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserActivity.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserActivityUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserActivityCreate) OnConflictColumns

func (uac *UserActivityCreate) OnConflictColumns(columns ...string) *UserActivityUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserActivity.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserActivityCreate) Save

Save creates the UserActivity in the database.

func (*UserActivityCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UserActivityCreate) SetCreateTime

func (uac *UserActivityCreate) SetCreateTime(t time.Time) *UserActivityCreate

SetCreateTime sets the "create_time" field.

func (*UserActivityCreate) SetIcon

func (uac *UserActivityCreate) SetIcon(s string) *UserActivityCreate

SetIcon sets the "icon" field.

func (*UserActivityCreate) SetName

func (uac *UserActivityCreate) SetName(s string) *UserActivityCreate

SetName sets the "name" field.

func (*UserActivityCreate) SetNillableCreateTime

func (uac *UserActivityCreate) SetNillableCreateTime(t *time.Time) *UserActivityCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*UserActivityCreate) SetNillableIcon

func (uac *UserActivityCreate) SetNillableIcon(s *string) *UserActivityCreate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*UserActivityCreate) SetNillableURL

func (uac *UserActivityCreate) SetNillableURL(s *string) *UserActivityCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*UserActivityCreate) SetNillableUpdateTime

func (uac *UserActivityCreate) SetNillableUpdateTime(t *time.Time) *UserActivityCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*UserActivityCreate) SetURL

SetURL sets the "url" field.

func (*UserActivityCreate) SetUpdateTime

func (uac *UserActivityCreate) SetUpdateTime(t time.Time) *UserActivityCreate

SetUpdateTime sets the "update_time" field.

func (*UserActivityCreate) SetUser

func (uac *UserActivityCreate) SetUser(u *User) *UserActivityCreate

SetUser sets the "user" edge to the User entity.

func (*UserActivityCreate) SetUserID

func (uac *UserActivityCreate) SetUserID(id int) *UserActivityCreate

SetUserID sets the "user" edge to the User entity by ID.

type UserActivityCreateBulk

type UserActivityCreateBulk struct {
	// contains filtered or unexported fields
}

UserActivityCreateBulk is the builder for creating many UserActivity entities in bulk.

func (*UserActivityCreateBulk) Exec

func (uacb *UserActivityCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserActivityCreateBulk) ExecX

func (uacb *UserActivityCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserActivityCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserActivity.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserActivityUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserActivityCreateBulk) OnConflictColumns

func (uacb *UserActivityCreateBulk) OnConflictColumns(columns ...string) *UserActivityUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserActivity.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserActivityCreateBulk) Save

Save creates the UserActivity entities in the database.

func (*UserActivityCreateBulk) SaveX

func (uacb *UserActivityCreateBulk) SaveX(ctx context.Context) []*UserActivity

SaveX is like Save, but panics if an error occurs.

type UserActivityDelete

type UserActivityDelete struct {
	// contains filtered or unexported fields
}

UserActivityDelete is the builder for deleting a UserActivity entity.

func (*UserActivityDelete) Exec

func (uad *UserActivityDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserActivityDelete) ExecX

func (uad *UserActivityDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserActivityDelete) Where

Where appends a list predicates to the UserActivityDelete builder.

type UserActivityDeleteOne

type UserActivityDeleteOne struct {
	// contains filtered or unexported fields
}

UserActivityDeleteOne is the builder for deleting a single UserActivity entity.

func (*UserActivityDeleteOne) Exec

func (uado *UserActivityDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserActivityDeleteOne) ExecX

func (uado *UserActivityDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserActivityDeleteOne) Where

Where appends a list predicates to the UserActivityDelete builder.

type UserActivityEdges

type UserActivityEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

UserActivityEdges holds the relations/edges for other nodes in the graph.

func (UserActivityEdges) UserOrErr

func (e UserActivityEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserActivityGroupBy

type UserActivityGroupBy struct {
	// contains filtered or unexported fields
}

UserActivityGroupBy is the group-by builder for UserActivity entities.

func (*UserActivityGroupBy) Aggregate

func (uagb *UserActivityGroupBy) Aggregate(fns ...AggregateFunc) *UserActivityGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserActivityGroupBy) Bool

func (s *UserActivityGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserActivityGroupBy) BoolX

func (s *UserActivityGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserActivityGroupBy) Bools

func (s *UserActivityGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserActivityGroupBy) BoolsX

func (s *UserActivityGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserActivityGroupBy) Float64

func (s *UserActivityGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserActivityGroupBy) Float64X

func (s *UserActivityGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserActivityGroupBy) Float64s

func (s *UserActivityGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserActivityGroupBy) Float64sX

func (s *UserActivityGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserActivityGroupBy) Int

func (s *UserActivityGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserActivityGroupBy) IntX

func (s *UserActivityGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserActivityGroupBy) Ints

func (s *UserActivityGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserActivityGroupBy) IntsX

func (s *UserActivityGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserActivityGroupBy) Scan

func (uagb *UserActivityGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserActivityGroupBy) ScanX

func (s *UserActivityGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserActivityGroupBy) String

func (s *UserActivityGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserActivityGroupBy) StringX

func (s *UserActivityGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserActivityGroupBy) Strings

func (s *UserActivityGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserActivityGroupBy) StringsX

func (s *UserActivityGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserActivityMutation

type UserActivityMutation struct {
	// contains filtered or unexported fields
}

UserActivityMutation represents an operation that mutates the UserActivity nodes in the graph.

func (*UserActivityMutation) AddField

func (m *UserActivityMutation) 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 (*UserActivityMutation) AddedEdges

func (m *UserActivityMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserActivityMutation) AddedField

func (m *UserActivityMutation) 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 (*UserActivityMutation) AddedFields

func (m *UserActivityMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserActivityMutation) AddedIDs

func (m *UserActivityMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserActivityMutation) ClearEdge

func (m *UserActivityMutation) 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 (*UserActivityMutation) ClearField

func (m *UserActivityMutation) 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 (*UserActivityMutation) ClearIcon

func (m *UserActivityMutation) ClearIcon()

ClearIcon clears the value of the "icon" field.

func (*UserActivityMutation) ClearURL

func (m *UserActivityMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*UserActivityMutation) ClearUser

func (m *UserActivityMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*UserActivityMutation) ClearedEdges

func (m *UserActivityMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserActivityMutation) ClearedFields

func (m *UserActivityMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserActivityMutation) Client

func (m UserActivityMutation) 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 (*UserActivityMutation) CreateTime

func (m *UserActivityMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*UserActivityMutation) EdgeCleared

func (m *UserActivityMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserActivityMutation) Field

func (m *UserActivityMutation) 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 (*UserActivityMutation) FieldCleared

func (m *UserActivityMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserActivityMutation) Fields

func (m *UserActivityMutation) 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 (*UserActivityMutation) ID

func (m *UserActivityMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserActivityMutation) IDs

func (m *UserActivityMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserActivityMutation) Icon

func (m *UserActivityMutation) Icon() (r string, exists bool)

Icon returns the value of the "icon" field in the mutation.

func (*UserActivityMutation) IconCleared

func (m *UserActivityMutation) IconCleared() bool

IconCleared returns if the "icon" field was cleared in this mutation.

func (*UserActivityMutation) Name

func (m *UserActivityMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*UserActivityMutation) OldCreateTime

func (m *UserActivityMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the UserActivity entity. If the UserActivity 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 (*UserActivityMutation) OldField

func (m *UserActivityMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*UserActivityMutation) OldIcon

func (m *UserActivityMutation) OldIcon(ctx context.Context) (v *string, err error)

OldIcon returns the old "icon" field's value of the UserActivity entity. If the UserActivity 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 (*UserActivityMutation) OldName

func (m *UserActivityMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the UserActivity entity. If the UserActivity 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 (*UserActivityMutation) OldURL

func (m *UserActivityMutation) OldURL(ctx context.Context) (v *string, err error)

OldURL returns the old "url" field's value of the UserActivity entity. If the UserActivity 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 (*UserActivityMutation) OldUpdateTime

func (m *UserActivityMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the UserActivity entity. If the UserActivity 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 (*UserActivityMutation) Op

func (m *UserActivityMutation) Op() Op

Op returns the operation name.

func (*UserActivityMutation) RemovedEdges

func (m *UserActivityMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserActivityMutation) RemovedIDs

func (m *UserActivityMutation) 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 (*UserActivityMutation) ResetCreateTime

func (m *UserActivityMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*UserActivityMutation) ResetEdge

func (m *UserActivityMutation) 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 (*UserActivityMutation) ResetField

func (m *UserActivityMutation) 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 (*UserActivityMutation) ResetIcon

func (m *UserActivityMutation) ResetIcon()

ResetIcon resets all changes to the "icon" field.

func (*UserActivityMutation) ResetName

func (m *UserActivityMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*UserActivityMutation) ResetURL

func (m *UserActivityMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*UserActivityMutation) ResetUpdateTime

func (m *UserActivityMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*UserActivityMutation) ResetUser

func (m *UserActivityMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*UserActivityMutation) SetCreateTime

func (m *UserActivityMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*UserActivityMutation) SetField

func (m *UserActivityMutation) 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 (*UserActivityMutation) SetIcon

func (m *UserActivityMutation) SetIcon(s string)

SetIcon sets the "icon" field.

func (*UserActivityMutation) SetName

func (m *UserActivityMutation) SetName(s string)

SetName sets the "name" field.

func (*UserActivityMutation) SetOp

func (m *UserActivityMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserActivityMutation) SetURL

func (m *UserActivityMutation) SetURL(s string)

SetURL sets the "url" field.

func (*UserActivityMutation) SetUpdateTime

func (m *UserActivityMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*UserActivityMutation) SetUserID

func (m *UserActivityMutation) SetUserID(id int)

SetUserID sets the "user" edge to the User entity by id.

func (UserActivityMutation) Tx

func (m UserActivityMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserActivityMutation) Type

func (m *UserActivityMutation) Type() string

Type returns the node type of this mutation (UserActivity).

func (*UserActivityMutation) URL

func (m *UserActivityMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*UserActivityMutation) URLCleared

func (m *UserActivityMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*UserActivityMutation) UpdateTime

func (m *UserActivityMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*UserActivityMutation) UserCleared

func (m *UserActivityMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*UserActivityMutation) UserID

func (m *UserActivityMutation) UserID() (id int, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*UserActivityMutation) UserIDs

func (m *UserActivityMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*UserActivityMutation) Where

Where appends a list predicates to the UserActivityMutation builder.

func (*UserActivityMutation) WhereP

func (m *UserActivityMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserActivityMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserActivityQuery

type UserActivityQuery struct {
	// contains filtered or unexported fields
}

UserActivityQuery is the builder for querying UserActivity entities.

func (*UserActivityQuery) Aggregate

func (uaq *UserActivityQuery) Aggregate(fns ...AggregateFunc) *UserActivitySelect

Aggregate returns a UserActivitySelect configured with the given aggregations.

func (*UserActivityQuery) All

func (uaq *UserActivityQuery) All(ctx context.Context) ([]*UserActivity, error)

All executes the query and returns a list of UserActivities.

func (*UserActivityQuery) AllX

func (uaq *UserActivityQuery) AllX(ctx context.Context) []*UserActivity

AllX is like All, but panics if an error occurs.

func (*UserActivityQuery) Clone

func (uaq *UserActivityQuery) Clone() *UserActivityQuery

Clone returns a duplicate of the UserActivityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserActivityQuery) Count

func (uaq *UserActivityQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserActivityQuery) CountX

func (uaq *UserActivityQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserActivityQuery) Exist

func (uaq *UserActivityQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserActivityQuery) ExistX

func (uaq *UserActivityQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserActivityQuery) First

func (uaq *UserActivityQuery) First(ctx context.Context) (*UserActivity, error)

First returns the first UserActivity entity from the query. Returns a *NotFoundError when no UserActivity was found.

func (*UserActivityQuery) FirstID

func (uaq *UserActivityQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserActivity ID from the query. Returns a *NotFoundError when no UserActivity ID was found.

func (*UserActivityQuery) FirstIDX

func (uaq *UserActivityQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserActivityQuery) FirstX

func (uaq *UserActivityQuery) FirstX(ctx context.Context) *UserActivity

FirstX is like First, but panics if an error occurs.

func (*UserActivityQuery) GroupBy

func (uaq *UserActivityQuery) GroupBy(field string, fields ...string) *UserActivityGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserActivity.Query().
	GroupBy(useractivity.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserActivityQuery) IDs

func (uaq *UserActivityQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserActivity IDs.

func (*UserActivityQuery) IDsX

func (uaq *UserActivityQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserActivityQuery) Limit

func (uaq *UserActivityQuery) Limit(limit int) *UserActivityQuery

Limit the number of records to be returned by this query.

func (*UserActivityQuery) Offset

func (uaq *UserActivityQuery) Offset(offset int) *UserActivityQuery

Offset to start from.

func (*UserActivityQuery) Only

func (uaq *UserActivityQuery) Only(ctx context.Context) (*UserActivity, error)

Only returns a single UserActivity entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserActivity entity is found. Returns a *NotFoundError when no UserActivity entities are found.

func (*UserActivityQuery) OnlyID

func (uaq *UserActivityQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserActivity ID in the query. Returns a *NotSingularError when more than one UserActivity ID is found. Returns a *NotFoundError when no entities are found.

func (*UserActivityQuery) OnlyIDX

func (uaq *UserActivityQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserActivityQuery) OnlyX

func (uaq *UserActivityQuery) OnlyX(ctx context.Context) *UserActivity

OnlyX is like Only, but panics if an error occurs.

func (*UserActivityQuery) Order

Order specifies how the records should be ordered.

func (*UserActivityQuery) QueryUser

func (uaq *UserActivityQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*UserActivityQuery) Select

func (uaq *UserActivityQuery) Select(fields ...string) *UserActivitySelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.UserActivity.Query().
	Select(useractivity.FieldCreateTime).
	Scan(ctx, &v)

func (*UserActivityQuery) Unique

func (uaq *UserActivityQuery) Unique(unique bool) *UserActivityQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserActivityQuery) Where

Where adds a new predicate for the UserActivityQuery builder.

func (*UserActivityQuery) WithUser

func (uaq *UserActivityQuery) WithUser(opts ...func(*UserQuery)) *UserActivityQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type UserActivitySelect

type UserActivitySelect struct {
	*UserActivityQuery
	// contains filtered or unexported fields
}

UserActivitySelect is the builder for selecting fields of UserActivity entities.

func (*UserActivitySelect) Aggregate

func (uas *UserActivitySelect) Aggregate(fns ...AggregateFunc) *UserActivitySelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserActivitySelect) Bool

func (s *UserActivitySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserActivitySelect) BoolX

func (s *UserActivitySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserActivitySelect) Bools

func (s *UserActivitySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserActivitySelect) BoolsX

func (s *UserActivitySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserActivitySelect) Float64

func (s *UserActivitySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserActivitySelect) Float64X

func (s *UserActivitySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserActivitySelect) Float64s

func (s *UserActivitySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserActivitySelect) Float64sX

func (s *UserActivitySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserActivitySelect) Int

func (s *UserActivitySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserActivitySelect) IntX

func (s *UserActivitySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserActivitySelect) Ints

func (s *UserActivitySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserActivitySelect) IntsX

func (s *UserActivitySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserActivitySelect) Scan

func (uas *UserActivitySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserActivitySelect) ScanX

func (s *UserActivitySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserActivitySelect) String

func (s *UserActivitySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserActivitySelect) StringX

func (s *UserActivitySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserActivitySelect) Strings

func (s *UserActivitySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserActivitySelect) StringsX

func (s *UserActivitySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserActivityUpdate

type UserActivityUpdate struct {
	// contains filtered or unexported fields
}

UserActivityUpdate is the builder for updating UserActivity entities.

func (*UserActivityUpdate) ClearIcon

func (uau *UserActivityUpdate) ClearIcon() *UserActivityUpdate

ClearIcon clears the value of the "icon" field.

func (*UserActivityUpdate) ClearURL

func (uau *UserActivityUpdate) ClearURL() *UserActivityUpdate

ClearURL clears the value of the "url" field.

func (*UserActivityUpdate) ClearUser

func (uau *UserActivityUpdate) ClearUser() *UserActivityUpdate

ClearUser clears the "user" edge to the User entity.

func (*UserActivityUpdate) Exec

func (uau *UserActivityUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserActivityUpdate) ExecX

func (uau *UserActivityUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserActivityUpdate) Mutation

func (uau *UserActivityUpdate) Mutation() *UserActivityMutation

Mutation returns the UserActivityMutation object of the builder.

func (*UserActivityUpdate) Save

func (uau *UserActivityUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserActivityUpdate) SaveX

func (uau *UserActivityUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserActivityUpdate) SetIcon

func (uau *UserActivityUpdate) SetIcon(s string) *UserActivityUpdate

SetIcon sets the "icon" field.

func (*UserActivityUpdate) SetName

func (uau *UserActivityUpdate) SetName(s string) *UserActivityUpdate

SetName sets the "name" field.

func (*UserActivityUpdate) SetNillableIcon

func (uau *UserActivityUpdate) SetNillableIcon(s *string) *UserActivityUpdate

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*UserActivityUpdate) SetNillableURL

func (uau *UserActivityUpdate) SetNillableURL(s *string) *UserActivityUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*UserActivityUpdate) SetURL

SetURL sets the "url" field.

func (*UserActivityUpdate) SetUpdateTime

func (uau *UserActivityUpdate) SetUpdateTime(t time.Time) *UserActivityUpdate

SetUpdateTime sets the "update_time" field.

func (*UserActivityUpdate) SetUser

func (uau *UserActivityUpdate) SetUser(u *User) *UserActivityUpdate

SetUser sets the "user" edge to the User entity.

func (*UserActivityUpdate) SetUserID

func (uau *UserActivityUpdate) SetUserID(id int) *UserActivityUpdate

SetUserID sets the "user" edge to the User entity by ID.

func (*UserActivityUpdate) Where

Where appends a list predicates to the UserActivityUpdate builder.

type UserActivityUpdateOne

type UserActivityUpdateOne struct {
	// contains filtered or unexported fields
}

UserActivityUpdateOne is the builder for updating a single UserActivity entity.

func (*UserActivityUpdateOne) ClearIcon

func (uauo *UserActivityUpdateOne) ClearIcon() *UserActivityUpdateOne

ClearIcon clears the value of the "icon" field.

func (*UserActivityUpdateOne) ClearURL

func (uauo *UserActivityUpdateOne) ClearURL() *UserActivityUpdateOne

ClearURL clears the value of the "url" field.

func (*UserActivityUpdateOne) ClearUser

func (uauo *UserActivityUpdateOne) ClearUser() *UserActivityUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*UserActivityUpdateOne) Exec

func (uauo *UserActivityUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserActivityUpdateOne) ExecX

func (uauo *UserActivityUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserActivityUpdateOne) Mutation

func (uauo *UserActivityUpdateOne) Mutation() *UserActivityMutation

Mutation returns the UserActivityMutation object of the builder.

func (*UserActivityUpdateOne) Save

Save executes the query and returns the updated UserActivity entity.

func (*UserActivityUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserActivityUpdateOne) Select

func (uauo *UserActivityUpdateOne) Select(field string, fields ...string) *UserActivityUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserActivityUpdateOne) SetIcon

SetIcon sets the "icon" field.

func (*UserActivityUpdateOne) SetName

SetName sets the "name" field.

func (*UserActivityUpdateOne) SetNillableIcon

func (uauo *UserActivityUpdateOne) SetNillableIcon(s *string) *UserActivityUpdateOne

SetNillableIcon sets the "icon" field if the given value is not nil.

func (*UserActivityUpdateOne) SetNillableURL

func (uauo *UserActivityUpdateOne) SetNillableURL(s *string) *UserActivityUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*UserActivityUpdateOne) SetURL

SetURL sets the "url" field.

func (*UserActivityUpdateOne) SetUpdateTime

func (uauo *UserActivityUpdateOne) SetUpdateTime(t time.Time) *UserActivityUpdateOne

SetUpdateTime sets the "update_time" field.

func (*UserActivityUpdateOne) SetUser

SetUser sets the "user" edge to the User entity.

func (*UserActivityUpdateOne) SetUserID

func (uauo *UserActivityUpdateOne) SetUserID(id int) *UserActivityUpdateOne

SetUserID sets the "user" edge to the User entity by ID.

func (*UserActivityUpdateOne) Where

Where appends a list predicates to the UserActivityUpdate builder.

type UserActivityUpsert

type UserActivityUpsert struct {
	*sql.UpdateSet
}

UserActivityUpsert is the "OnConflict" setter.

func (*UserActivityUpsert) ClearIcon

func (u *UserActivityUpsert) ClearIcon() *UserActivityUpsert

ClearIcon clears the value of the "icon" field.

func (*UserActivityUpsert) ClearURL

func (u *UserActivityUpsert) ClearURL() *UserActivityUpsert

ClearURL clears the value of the "url" field.

func (*UserActivityUpsert) SetIcon

SetIcon sets the "icon" field.

func (*UserActivityUpsert) SetName

SetName sets the "name" field.

func (*UserActivityUpsert) SetURL

SetURL sets the "url" field.

func (*UserActivityUpsert) SetUpdateTime

func (u *UserActivityUpsert) SetUpdateTime(v time.Time) *UserActivityUpsert

SetUpdateTime sets the "update_time" field.

func (*UserActivityUpsert) UpdateIcon

func (u *UserActivityUpsert) UpdateIcon() *UserActivityUpsert

UpdateIcon sets the "icon" field to the value that was provided on create.

func (*UserActivityUpsert) UpdateName

func (u *UserActivityUpsert) UpdateName() *UserActivityUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*UserActivityUpsert) UpdateURL

func (u *UserActivityUpsert) UpdateURL() *UserActivityUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*UserActivityUpsert) UpdateUpdateTime

func (u *UserActivityUpsert) UpdateUpdateTime() *UserActivityUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserActivityUpsertBulk

type UserActivityUpsertBulk struct {
	// contains filtered or unexported fields
}

UserActivityUpsertBulk is the builder for "upsert"-ing a bulk of UserActivity nodes.

func (*UserActivityUpsertBulk) ClearIcon

ClearIcon clears the value of the "icon" field.

func (*UserActivityUpsertBulk) ClearURL

ClearURL clears the value of the "url" field.

func (*UserActivityUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserActivityUpsertBulk) Exec

Exec executes the query.

func (*UserActivityUpsertBulk) ExecX

func (u *UserActivityUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserActivityUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserActivity.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserActivityUpsertBulk) SetIcon

SetIcon sets the "icon" field.

func (*UserActivityUpsertBulk) SetName

SetName sets the "name" field.

func (*UserActivityUpsertBulk) SetURL

SetURL sets the "url" field.

func (*UserActivityUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserActivityUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserActivityCreateBulk.OnConflict documentation for more info.

func (*UserActivityUpsertBulk) UpdateIcon

UpdateIcon sets the "icon" field to the value that was provided on create.

func (*UserActivityUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*UserActivityUpsertBulk) UpdateNewValues

func (u *UserActivityUpsertBulk) UpdateNewValues() *UserActivityUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserActivity.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserActivityUpsertBulk) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*UserActivityUpsertBulk) UpdateUpdateTime

func (u *UserActivityUpsertBulk) UpdateUpdateTime() *UserActivityUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserActivityUpsertOne

type UserActivityUpsertOne struct {
	// contains filtered or unexported fields
}

UserActivityUpsertOne is the builder for "upsert"-ing

one UserActivity node.

func (*UserActivityUpsertOne) ClearIcon

ClearIcon clears the value of the "icon" field.

func (*UserActivityUpsertOne) ClearURL

ClearURL clears the value of the "url" field.

func (*UserActivityUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserActivityUpsertOne) Exec

Exec executes the query.

func (*UserActivityUpsertOne) ExecX

func (u *UserActivityUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserActivityUpsertOne) ID

func (u *UserActivityUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserActivityUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UserActivityUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserActivity.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserActivityUpsertOne) SetIcon

SetIcon sets the "icon" field.

func (*UserActivityUpsertOne) SetName

SetName sets the "name" field.

func (*UserActivityUpsertOne) SetURL

SetURL sets the "url" field.

func (*UserActivityUpsertOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserActivityUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserActivityCreate.OnConflict documentation for more info.

func (*UserActivityUpsertOne) UpdateIcon

UpdateIcon sets the "icon" field to the value that was provided on create.

func (*UserActivityUpsertOne) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*UserActivityUpsertOne) UpdateNewValues

func (u *UserActivityUpsertOne) UpdateNewValues() *UserActivityUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserActivity.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserActivityUpsertOne) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*UserActivityUpsertOne) UpdateUpdateTime

func (u *UserActivityUpsertOne) UpdateUpdateTime() *UserActivityUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserCareer

type UserCareer struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// From holds the value of the "from" field.
	From string `json:"from,omitempty"`
	// To holds the value of the "to" field.
	To *string `json:"to,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserCareerQuery when eager-loading is set.
	Edges UserCareerEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserCareer is the model entity for the UserCareer schema.

func (*UserCareer) QueryCareerDescriptions

func (uc *UserCareer) QueryCareerDescriptions() *UserCareerDescriptionQuery

QueryCareerDescriptions queries the "careerDescriptions" edge of the UserCareer entity.

func (*UserCareer) QueryCareerGroup

func (uc *UserCareer) QueryCareerGroup() *UserCareerGroupQuery

QueryCareerGroup queries the "careerGroup" edge of the UserCareer entity.

func (*UserCareer) QueryCareerSkillGroups

func (uc *UserCareer) QueryCareerSkillGroups() *CareerSkillGroupQuery

QueryCareerSkillGroups queries the "careerSkillGroups" edge of the UserCareer entity.

func (*UserCareer) QueryCareerTasks

func (uc *UserCareer) QueryCareerTasks() *CareerTaskQuery

QueryCareerTasks queries the "careerTasks" edge of the UserCareer entity.

func (*UserCareer) String

func (uc *UserCareer) String() string

String implements the fmt.Stringer.

func (*UserCareer) Unwrap

func (uc *UserCareer) Unwrap() *UserCareer

Unwrap unwraps the UserCareer 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 (*UserCareer) Update

func (uc *UserCareer) Update() *UserCareerUpdateOne

Update returns a builder for updating this UserCareer. Note that you need to call UserCareer.Unwrap() before calling this method if this UserCareer was returned from a transaction, and the transaction was committed or rolled back.

func (*UserCareer) Value

func (uc *UserCareer) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserCareer. This includes values selected through modifiers, order, etc.

type UserCareerClient

type UserCareerClient struct {
	// contains filtered or unexported fields
}

UserCareerClient is a client for the UserCareer schema.

func NewUserCareerClient

func NewUserCareerClient(c config) *UserCareerClient

NewUserCareerClient returns a client for the UserCareer from the given config.

func (*UserCareerClient) Create

func (c *UserCareerClient) Create() *UserCareerCreate

Create returns a builder for creating a UserCareer entity.

func (*UserCareerClient) CreateBulk

func (c *UserCareerClient) CreateBulk(builders ...*UserCareerCreate) *UserCareerCreateBulk

CreateBulk returns a builder for creating a bulk of UserCareer entities.

func (*UserCareerClient) Delete

func (c *UserCareerClient) Delete() *UserCareerDelete

Delete returns a delete builder for UserCareer.

func (*UserCareerClient) DeleteOne

func (c *UserCareerClient) DeleteOne(uc *UserCareer) *UserCareerDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserCareerClient) DeleteOneID

func (c *UserCareerClient) DeleteOneID(id int) *UserCareerDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserCareerClient) Get

func (c *UserCareerClient) Get(ctx context.Context, id int) (*UserCareer, error)

Get returns a UserCareer entity by its id.

func (*UserCareerClient) GetX

func (c *UserCareerClient) GetX(ctx context.Context, id int) *UserCareer

GetX is like Get, but panics if an error occurs.

func (*UserCareerClient) Hooks

func (c *UserCareerClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserCareerClient) Intercept

func (c *UserCareerClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usercareer.Intercept(f(g(h())))`.

func (*UserCareerClient) Interceptors

func (c *UserCareerClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserCareerClient) Query

func (c *UserCareerClient) Query() *UserCareerQuery

Query returns a query builder for UserCareer.

func (*UserCareerClient) QueryCareerDescriptions

func (c *UserCareerClient) QueryCareerDescriptions(uc *UserCareer) *UserCareerDescriptionQuery

QueryCareerDescriptions queries the careerDescriptions edge of a UserCareer.

func (*UserCareerClient) QueryCareerGroup

func (c *UserCareerClient) QueryCareerGroup(uc *UserCareer) *UserCareerGroupQuery

QueryCareerGroup queries the careerGroup edge of a UserCareer.

func (*UserCareerClient) QueryCareerSkillGroups

func (c *UserCareerClient) QueryCareerSkillGroups(uc *UserCareer) *CareerSkillGroupQuery

QueryCareerSkillGroups queries the careerSkillGroups edge of a UserCareer.

func (*UserCareerClient) QueryCareerTasks

func (c *UserCareerClient) QueryCareerTasks(uc *UserCareer) *CareerTaskQuery

QueryCareerTasks queries the careerTasks edge of a UserCareer.

func (*UserCareerClient) Update

func (c *UserCareerClient) Update() *UserCareerUpdate

Update returns an update builder for UserCareer.

func (*UserCareerClient) UpdateOne

func (c *UserCareerClient) UpdateOne(uc *UserCareer) *UserCareerUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserCareerClient) UpdateOneID

func (c *UserCareerClient) UpdateOneID(id int) *UserCareerUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserCareerClient) Use

func (c *UserCareerClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usercareer.Hooks(f(g(h())))`.

type UserCareerCreate

type UserCareerCreate struct {
	// contains filtered or unexported fields
}

UserCareerCreate is the builder for creating a UserCareer entity.

func (*UserCareerCreate) AddCareerDescriptionIDs

func (ucc *UserCareerCreate) AddCareerDescriptionIDs(ids ...int) *UserCareerCreate

AddCareerDescriptionIDs adds the "careerDescriptions" edge to the UserCareerDescription entity by IDs.

func (*UserCareerCreate) AddCareerDescriptions

func (ucc *UserCareerCreate) AddCareerDescriptions(u ...*UserCareerDescription) *UserCareerCreate

AddCareerDescriptions adds the "careerDescriptions" edges to the UserCareerDescription entity.

func (*UserCareerCreate) AddCareerSkillGroupIDs

func (ucc *UserCareerCreate) AddCareerSkillGroupIDs(ids ...int) *UserCareerCreate

AddCareerSkillGroupIDs adds the "careerSkillGroups" edge to the CareerSkillGroup entity by IDs.

func (*UserCareerCreate) AddCareerSkillGroups

func (ucc *UserCareerCreate) AddCareerSkillGroups(c ...*CareerSkillGroup) *UserCareerCreate

AddCareerSkillGroups adds the "careerSkillGroups" edges to the CareerSkillGroup entity.

func (*UserCareerCreate) AddCareerTaskIDs

func (ucc *UserCareerCreate) AddCareerTaskIDs(ids ...int) *UserCareerCreate

AddCareerTaskIDs adds the "careerTasks" edge to the CareerTask entity by IDs.

func (*UserCareerCreate) AddCareerTasks

func (ucc *UserCareerCreate) AddCareerTasks(c ...*CareerTask) *UserCareerCreate

AddCareerTasks adds the "careerTasks" edges to the CareerTask entity.

func (*UserCareerCreate) Exec

func (ucc *UserCareerCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCareerCreate) ExecX

func (ucc *UserCareerCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerCreate) Mutation

func (ucc *UserCareerCreate) Mutation() *UserCareerMutation

Mutation returns the UserCareerMutation object of the builder.

func (*UserCareerCreate) OnConflict

func (ucc *UserCareerCreate) OnConflict(opts ...sql.ConflictOption) *UserCareerUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserCareer.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserCareerUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserCareerCreate) OnConflictColumns

func (ucc *UserCareerCreate) OnConflictColumns(columns ...string) *UserCareerUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserCareer.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCareerCreate) Save

func (ucc *UserCareerCreate) Save(ctx context.Context) (*UserCareer, error)

Save creates the UserCareer in the database.

func (*UserCareerCreate) SaveX

func (ucc *UserCareerCreate) SaveX(ctx context.Context) *UserCareer

SaveX calls Save and panics if Save returns an error.

func (*UserCareerCreate) SetCareerGroup

func (ucc *UserCareerCreate) SetCareerGroup(u *UserCareerGroup) *UserCareerCreate

SetCareerGroup sets the "careerGroup" edge to the UserCareerGroup entity.

func (*UserCareerCreate) SetCareerGroupID

func (ucc *UserCareerCreate) SetCareerGroupID(id int) *UserCareerCreate

SetCareerGroupID sets the "careerGroup" edge to the UserCareerGroup entity by ID.

func (*UserCareerCreate) SetCreateTime

func (ucc *UserCareerCreate) SetCreateTime(t time.Time) *UserCareerCreate

SetCreateTime sets the "create_time" field.

func (*UserCareerCreate) SetFrom

func (ucc *UserCareerCreate) SetFrom(s string) *UserCareerCreate

SetFrom sets the "from" field.

func (*UserCareerCreate) SetName

func (ucc *UserCareerCreate) SetName(s string) *UserCareerCreate

SetName sets the "name" field.

func (*UserCareerCreate) SetNillableCreateTime

func (ucc *UserCareerCreate) SetNillableCreateTime(t *time.Time) *UserCareerCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*UserCareerCreate) SetNillableTo

func (ucc *UserCareerCreate) SetNillableTo(s *string) *UserCareerCreate

SetNillableTo sets the "to" field if the given value is not nil.

func (*UserCareerCreate) SetNillableUpdateTime

func (ucc *UserCareerCreate) SetNillableUpdateTime(t *time.Time) *UserCareerCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*UserCareerCreate) SetTo

func (ucc *UserCareerCreate) SetTo(s string) *UserCareerCreate

SetTo sets the "to" field.

func (*UserCareerCreate) SetUpdateTime

func (ucc *UserCareerCreate) SetUpdateTime(t time.Time) *UserCareerCreate

SetUpdateTime sets the "update_time" field.

type UserCareerCreateBulk

type UserCareerCreateBulk struct {
	// contains filtered or unexported fields
}

UserCareerCreateBulk is the builder for creating many UserCareer entities in bulk.

func (*UserCareerCreateBulk) Exec

func (uccb *UserCareerCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCareerCreateBulk) ExecX

func (uccb *UserCareerCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerCreateBulk) OnConflict

func (uccb *UserCareerCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserCareerUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserCareer.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserCareerUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserCareerCreateBulk) OnConflictColumns

func (uccb *UserCareerCreateBulk) OnConflictColumns(columns ...string) *UserCareerUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserCareer.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCareerCreateBulk) Save

func (uccb *UserCareerCreateBulk) Save(ctx context.Context) ([]*UserCareer, error)

Save creates the UserCareer entities in the database.

func (*UserCareerCreateBulk) SaveX

func (uccb *UserCareerCreateBulk) SaveX(ctx context.Context) []*UserCareer

SaveX is like Save, but panics if an error occurs.

type UserCareerDelete

type UserCareerDelete struct {
	// contains filtered or unexported fields
}

UserCareerDelete is the builder for deleting a UserCareer entity.

func (*UserCareerDelete) Exec

func (ucd *UserCareerDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserCareerDelete) ExecX

func (ucd *UserCareerDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerDelete) Where

Where appends a list predicates to the UserCareerDelete builder.

type UserCareerDeleteOne

type UserCareerDeleteOne struct {
	// contains filtered or unexported fields
}

UserCareerDeleteOne is the builder for deleting a single UserCareer entity.

func (*UserCareerDeleteOne) Exec

func (ucdo *UserCareerDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserCareerDeleteOne) ExecX

func (ucdo *UserCareerDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerDeleteOne) Where

Where appends a list predicates to the UserCareerDelete builder.

type UserCareerDescription

type UserCareerDescription struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserCareerDescriptionQuery when eager-loading is set.
	Edges UserCareerDescriptionEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserCareerDescription is the model entity for the UserCareerDescription schema.

func (*UserCareerDescription) QueryCareer

func (ucd *UserCareerDescription) QueryCareer() *UserCareerQuery

QueryCareer queries the "career" edge of the UserCareerDescription entity.

func (*UserCareerDescription) String

func (ucd *UserCareerDescription) String() string

String implements the fmt.Stringer.

func (*UserCareerDescription) Unwrap

Unwrap unwraps the UserCareerDescription 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 (*UserCareerDescription) Update

Update returns a builder for updating this UserCareerDescription. Note that you need to call UserCareerDescription.Unwrap() before calling this method if this UserCareerDescription was returned from a transaction, and the transaction was committed or rolled back.

func (*UserCareerDescription) Value

func (ucd *UserCareerDescription) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserCareerDescription. This includes values selected through modifiers, order, etc.

type UserCareerDescriptionClient

type UserCareerDescriptionClient struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionClient is a client for the UserCareerDescription schema.

func NewUserCareerDescriptionClient

func NewUserCareerDescriptionClient(c config) *UserCareerDescriptionClient

NewUserCareerDescriptionClient returns a client for the UserCareerDescription from the given config.

func (*UserCareerDescriptionClient) Create

Create returns a builder for creating a UserCareerDescription entity.

func (*UserCareerDescriptionClient) CreateBulk

CreateBulk returns a builder for creating a bulk of UserCareerDescription entities.

func (*UserCareerDescriptionClient) Delete

Delete returns a delete builder for UserCareerDescription.

func (*UserCareerDescriptionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserCareerDescriptionClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserCareerDescriptionClient) Get

Get returns a UserCareerDescription entity by its id.

func (*UserCareerDescriptionClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UserCareerDescriptionClient) Hooks

func (c *UserCareerDescriptionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserCareerDescriptionClient) Intercept

func (c *UserCareerDescriptionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usercareerdescription.Intercept(f(g(h())))`.

func (*UserCareerDescriptionClient) Interceptors

func (c *UserCareerDescriptionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserCareerDescriptionClient) Query

Query returns a query builder for UserCareerDescription.

func (*UserCareerDescriptionClient) QueryCareer

QueryCareer queries the career edge of a UserCareerDescription.

func (*UserCareerDescriptionClient) Update

Update returns an update builder for UserCareerDescription.

func (*UserCareerDescriptionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserCareerDescriptionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*UserCareerDescriptionClient) Use

func (c *UserCareerDescriptionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usercareerdescription.Hooks(f(g(h())))`.

type UserCareerDescriptionCreate

type UserCareerDescriptionCreate struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionCreate is the builder for creating a UserCareerDescription entity.

func (*UserCareerDescriptionCreate) Exec

Exec executes the query.

func (*UserCareerDescriptionCreate) ExecX

func (ucdc *UserCareerDescriptionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerDescriptionCreate) Mutation

Mutation returns the UserCareerDescriptionMutation object of the builder.

func (*UserCareerDescriptionCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserCareerDescription.Create().
	SetDescription(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserCareerDescriptionUpsert) {
		SetDescription(v+v).
	}).
	Exec(ctx)

func (*UserCareerDescriptionCreate) OnConflictColumns

func (ucdc *UserCareerDescriptionCreate) OnConflictColumns(columns ...string) *UserCareerDescriptionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserCareerDescription.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCareerDescriptionCreate) Save

Save creates the UserCareerDescription in the database.

func (*UserCareerDescriptionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UserCareerDescriptionCreate) SetCareer

SetCareer sets the "career" edge to the UserCareer entity.

func (*UserCareerDescriptionCreate) SetCareerID

SetCareerID sets the "career" edge to the UserCareer entity by ID.

func (*UserCareerDescriptionCreate) SetDescription

SetDescription sets the "description" field.

type UserCareerDescriptionCreateBulk

type UserCareerDescriptionCreateBulk struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionCreateBulk is the builder for creating many UserCareerDescription entities in bulk.

func (*UserCareerDescriptionCreateBulk) Exec

Exec executes the query.

func (*UserCareerDescriptionCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerDescriptionCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserCareerDescription.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserCareerDescriptionUpsert) {
		SetDescription(v+v).
	}).
	Exec(ctx)

func (*UserCareerDescriptionCreateBulk) OnConflictColumns

func (ucdcb *UserCareerDescriptionCreateBulk) OnConflictColumns(columns ...string) *UserCareerDescriptionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserCareerDescription.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCareerDescriptionCreateBulk) Save

Save creates the UserCareerDescription entities in the database.

func (*UserCareerDescriptionCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type UserCareerDescriptionDelete

type UserCareerDescriptionDelete struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionDelete is the builder for deleting a UserCareerDescription entity.

func (*UserCareerDescriptionDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserCareerDescriptionDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerDescriptionDelete) Where

Where appends a list predicates to the UserCareerDescriptionDelete builder.

type UserCareerDescriptionDeleteOne

type UserCareerDescriptionDeleteOne struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionDeleteOne is the builder for deleting a single UserCareerDescription entity.

func (*UserCareerDescriptionDeleteOne) Exec

Exec executes the deletion query.

func (*UserCareerDescriptionDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerDescriptionDeleteOne) Where

Where appends a list predicates to the UserCareerDescriptionDelete builder.

type UserCareerDescriptionEdges

type UserCareerDescriptionEdges struct {
	// Career holds the value of the career edge.
	Career *UserCareer `json:"career,omitempty"`
	// contains filtered or unexported fields
}

UserCareerDescriptionEdges holds the relations/edges for other nodes in the graph.

func (UserCareerDescriptionEdges) CareerOrErr

func (e UserCareerDescriptionEdges) CareerOrErr() (*UserCareer, error)

CareerOrErr returns the Career value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserCareerDescriptionGroupBy

type UserCareerDescriptionGroupBy struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionGroupBy is the group-by builder for UserCareerDescription entities.

func (*UserCareerDescriptionGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*UserCareerDescriptionGroupBy) Bool

func (s *UserCareerDescriptionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionGroupBy) BoolX

func (s *UserCareerDescriptionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserCareerDescriptionGroupBy) Bools

func (s *UserCareerDescriptionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionGroupBy) BoolsX

func (s *UserCareerDescriptionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserCareerDescriptionGroupBy) Float64

func (s *UserCareerDescriptionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionGroupBy) Float64X

func (s *UserCareerDescriptionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserCareerDescriptionGroupBy) Float64s

func (s *UserCareerDescriptionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionGroupBy) Float64sX

func (s *UserCareerDescriptionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserCareerDescriptionGroupBy) Int

func (s *UserCareerDescriptionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionGroupBy) IntX

func (s *UserCareerDescriptionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserCareerDescriptionGroupBy) Ints

func (s *UserCareerDescriptionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionGroupBy) IntsX

func (s *UserCareerDescriptionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserCareerDescriptionGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*UserCareerDescriptionGroupBy) ScanX

func (s *UserCareerDescriptionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserCareerDescriptionGroupBy) String

func (s *UserCareerDescriptionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionGroupBy) StringX

func (s *UserCareerDescriptionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserCareerDescriptionGroupBy) Strings

func (s *UserCareerDescriptionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionGroupBy) StringsX

func (s *UserCareerDescriptionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserCareerDescriptionMutation

type UserCareerDescriptionMutation struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionMutation represents an operation that mutates the UserCareerDescription nodes in the graph.

func (*UserCareerDescriptionMutation) AddField

func (m *UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) AddedEdges

func (m *UserCareerDescriptionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserCareerDescriptionMutation) AddedField

func (m *UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) AddedFields

func (m *UserCareerDescriptionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserCareerDescriptionMutation) AddedIDs

func (m *UserCareerDescriptionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserCareerDescriptionMutation) CareerCleared

func (m *UserCareerDescriptionMutation) CareerCleared() bool

CareerCleared reports if the "career" edge to the UserCareer entity was cleared.

func (*UserCareerDescriptionMutation) CareerID

func (m *UserCareerDescriptionMutation) CareerID() (id int, exists bool)

CareerID returns the "career" edge ID in the mutation.

func (*UserCareerDescriptionMutation) CareerIDs

func (m *UserCareerDescriptionMutation) CareerIDs() (ids []int)

CareerIDs returns the "career" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CareerID instead. It exists only for internal usage by the builders.

func (*UserCareerDescriptionMutation) ClearCareer

func (m *UserCareerDescriptionMutation) ClearCareer()

ClearCareer clears the "career" edge to the UserCareer entity.

func (*UserCareerDescriptionMutation) ClearEdge

func (m *UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) ClearField

func (m *UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) ClearedEdges

func (m *UserCareerDescriptionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserCareerDescriptionMutation) ClearedFields

func (m *UserCareerDescriptionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) Description

func (m *UserCareerDescriptionMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*UserCareerDescriptionMutation) EdgeCleared

func (m *UserCareerDescriptionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserCareerDescriptionMutation) Field

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 (*UserCareerDescriptionMutation) FieldCleared

func (m *UserCareerDescriptionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserCareerDescriptionMutation) Fields

func (m *UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) ID

func (m *UserCareerDescriptionMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserCareerDescriptionMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserCareerDescriptionMutation) OldDescription

func (m *UserCareerDescriptionMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the UserCareerDescription entity. If the UserCareerDescription 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 (*UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) Op

Op returns the operation name.

func (*UserCareerDescriptionMutation) RemovedEdges

func (m *UserCareerDescriptionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserCareerDescriptionMutation) RemovedIDs

func (m *UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) ResetCareer

func (m *UserCareerDescriptionMutation) ResetCareer()

ResetCareer resets all changes to the "career" edge.

func (*UserCareerDescriptionMutation) ResetDescription

func (m *UserCareerDescriptionMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*UserCareerDescriptionMutation) ResetEdge

func (m *UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) ResetField

func (m *UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) SetCareerID

func (m *UserCareerDescriptionMutation) SetCareerID(id int)

SetCareerID sets the "career" edge to the UserCareer entity by id.

func (*UserCareerDescriptionMutation) SetDescription

func (m *UserCareerDescriptionMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*UserCareerDescriptionMutation) SetField

func (m *UserCareerDescriptionMutation) 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 (*UserCareerDescriptionMutation) SetOp

func (m *UserCareerDescriptionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (UserCareerDescriptionMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserCareerDescriptionMutation) Type

Type returns the node type of this mutation (UserCareerDescription).

func (*UserCareerDescriptionMutation) Where

Where appends a list predicates to the UserCareerDescriptionMutation builder.

func (*UserCareerDescriptionMutation) WhereP

func (m *UserCareerDescriptionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserCareerDescriptionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserCareerDescriptionQuery

type UserCareerDescriptionQuery struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionQuery is the builder for querying UserCareerDescription entities.

func (*UserCareerDescriptionQuery) Aggregate

Aggregate returns a UserCareerDescriptionSelect configured with the given aggregations.

func (*UserCareerDescriptionQuery) All

All executes the query and returns a list of UserCareerDescriptions.

func (*UserCareerDescriptionQuery) AllX

AllX is like All, but panics if an error occurs.

func (*UserCareerDescriptionQuery) Clone

Clone returns a duplicate of the UserCareerDescriptionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserCareerDescriptionQuery) Count

func (ucdq *UserCareerDescriptionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserCareerDescriptionQuery) CountX

func (ucdq *UserCareerDescriptionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserCareerDescriptionQuery) Exist

func (ucdq *UserCareerDescriptionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserCareerDescriptionQuery) ExistX

func (ucdq *UserCareerDescriptionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserCareerDescriptionQuery) First

First returns the first UserCareerDescription entity from the query. Returns a *NotFoundError when no UserCareerDescription was found.

func (*UserCareerDescriptionQuery) FirstID

func (ucdq *UserCareerDescriptionQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserCareerDescription ID from the query. Returns a *NotFoundError when no UserCareerDescription ID was found.

func (*UserCareerDescriptionQuery) FirstIDX

func (ucdq *UserCareerDescriptionQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserCareerDescriptionQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*UserCareerDescriptionQuery) GroupBy

func (ucdq *UserCareerDescriptionQuery) GroupBy(field string, fields ...string) *UserCareerDescriptionGroupBy

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 {
	Description string `json:"description,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserCareerDescription.Query().
	GroupBy(usercareerdescription.FieldDescription).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserCareerDescriptionQuery) IDs

func (ucdq *UserCareerDescriptionQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserCareerDescription IDs.

func (*UserCareerDescriptionQuery) IDsX

func (ucdq *UserCareerDescriptionQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserCareerDescriptionQuery) Limit

Limit the number of records to be returned by this query.

func (*UserCareerDescriptionQuery) Offset

Offset to start from.

func (*UserCareerDescriptionQuery) Only

Only returns a single UserCareerDescription entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserCareerDescription entity is found. Returns a *NotFoundError when no UserCareerDescription entities are found.

func (*UserCareerDescriptionQuery) OnlyID

func (ucdq *UserCareerDescriptionQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserCareerDescription ID in the query. Returns a *NotSingularError when more than one UserCareerDescription ID is found. Returns a *NotFoundError when no entities are found.

func (*UserCareerDescriptionQuery) OnlyIDX

func (ucdq *UserCareerDescriptionQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserCareerDescriptionQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*UserCareerDescriptionQuery) Order

Order specifies how the records should be ordered.

func (*UserCareerDescriptionQuery) QueryCareer

func (ucdq *UserCareerDescriptionQuery) QueryCareer() *UserCareerQuery

QueryCareer chains the current query on the "career" edge.

func (*UserCareerDescriptionQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Description string `json:"description,omitempty"`
}

client.UserCareerDescription.Query().
	Select(usercareerdescription.FieldDescription).
	Scan(ctx, &v)

func (*UserCareerDescriptionQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserCareerDescriptionQuery) Where

Where adds a new predicate for the UserCareerDescriptionQuery builder.

func (*UserCareerDescriptionQuery) WithCareer

func (ucdq *UserCareerDescriptionQuery) WithCareer(opts ...func(*UserCareerQuery)) *UserCareerDescriptionQuery

WithCareer tells the query-builder to eager-load the nodes that are connected to the "career" edge. The optional arguments are used to configure the query builder of the edge.

type UserCareerDescriptionSelect

type UserCareerDescriptionSelect struct {
	*UserCareerDescriptionQuery
	// contains filtered or unexported fields
}

UserCareerDescriptionSelect is the builder for selecting fields of UserCareerDescription entities.

func (*UserCareerDescriptionSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*UserCareerDescriptionSelect) Bool

func (s *UserCareerDescriptionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionSelect) BoolX

func (s *UserCareerDescriptionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserCareerDescriptionSelect) Bools

func (s *UserCareerDescriptionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionSelect) BoolsX

func (s *UserCareerDescriptionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserCareerDescriptionSelect) Float64

func (s *UserCareerDescriptionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionSelect) Float64X

func (s *UserCareerDescriptionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserCareerDescriptionSelect) Float64s

func (s *UserCareerDescriptionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionSelect) Float64sX

func (s *UserCareerDescriptionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserCareerDescriptionSelect) Int

func (s *UserCareerDescriptionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionSelect) IntX

func (s *UserCareerDescriptionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserCareerDescriptionSelect) Ints

func (s *UserCareerDescriptionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionSelect) IntsX

func (s *UserCareerDescriptionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserCareerDescriptionSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*UserCareerDescriptionSelect) ScanX

func (s *UserCareerDescriptionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserCareerDescriptionSelect) String

func (s *UserCareerDescriptionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionSelect) StringX

func (s *UserCareerDescriptionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserCareerDescriptionSelect) Strings

func (s *UserCareerDescriptionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserCareerDescriptionSelect) StringsX

func (s *UserCareerDescriptionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserCareerDescriptionUpdate

type UserCareerDescriptionUpdate struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionUpdate is the builder for updating UserCareerDescription entities.

func (*UserCareerDescriptionUpdate) ClearCareer

ClearCareer clears the "career" edge to the UserCareer entity.

func (*UserCareerDescriptionUpdate) Exec

Exec executes the query.

func (*UserCareerDescriptionUpdate) ExecX

func (ucdu *UserCareerDescriptionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerDescriptionUpdate) Mutation

Mutation returns the UserCareerDescriptionMutation object of the builder.

func (*UserCareerDescriptionUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserCareerDescriptionUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserCareerDescriptionUpdate) SetCareer

SetCareer sets the "career" edge to the UserCareer entity.

func (*UserCareerDescriptionUpdate) SetCareerID

SetCareerID sets the "career" edge to the UserCareer entity by ID.

func (*UserCareerDescriptionUpdate) SetDescription

SetDescription sets the "description" field.

func (*UserCareerDescriptionUpdate) Where

Where appends a list predicates to the UserCareerDescriptionUpdate builder.

type UserCareerDescriptionUpdateOne

type UserCareerDescriptionUpdateOne struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionUpdateOne is the builder for updating a single UserCareerDescription entity.

func (*UserCareerDescriptionUpdateOne) ClearCareer

ClearCareer clears the "career" edge to the UserCareer entity.

func (*UserCareerDescriptionUpdateOne) Exec

Exec executes the query on the entity.

func (*UserCareerDescriptionUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerDescriptionUpdateOne) Mutation

Mutation returns the UserCareerDescriptionMutation object of the builder.

func (*UserCareerDescriptionUpdateOne) Save

Save executes the query and returns the updated UserCareerDescription entity.

func (*UserCareerDescriptionUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserCareerDescriptionUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserCareerDescriptionUpdateOne) SetCareer

SetCareer sets the "career" edge to the UserCareer entity.

func (*UserCareerDescriptionUpdateOne) SetCareerID

SetCareerID sets the "career" edge to the UserCareer entity by ID.

func (*UserCareerDescriptionUpdateOne) SetDescription

SetDescription sets the "description" field.

func (*UserCareerDescriptionUpdateOne) Where

Where appends a list predicates to the UserCareerDescriptionUpdate builder.

type UserCareerDescriptionUpsert

type UserCareerDescriptionUpsert struct {
	*sql.UpdateSet
}

UserCareerDescriptionUpsert is the "OnConflict" setter.

func (*UserCareerDescriptionUpsert) SetDescription

SetDescription sets the "description" field.

func (*UserCareerDescriptionUpsert) UpdateDescription

UpdateDescription sets the "description" field to the value that was provided on create.

type UserCareerDescriptionUpsertBulk

type UserCareerDescriptionUpsertBulk struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionUpsertBulk is the builder for "upsert"-ing a bulk of UserCareerDescription nodes.

func (*UserCareerDescriptionUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserCareerDescriptionUpsertBulk) Exec

Exec executes the query.

func (*UserCareerDescriptionUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerDescriptionUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserCareerDescription.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserCareerDescriptionUpsertBulk) SetDescription

SetDescription sets the "description" field.

func (*UserCareerDescriptionUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserCareerDescriptionCreateBulk.OnConflict documentation for more info.

func (*UserCareerDescriptionUpsertBulk) UpdateDescription

UpdateDescription sets the "description" field to the value that was provided on create.

func (*UserCareerDescriptionUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserCareerDescription.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type UserCareerDescriptionUpsertOne

type UserCareerDescriptionUpsertOne struct {
	// contains filtered or unexported fields
}

UserCareerDescriptionUpsertOne is the builder for "upsert"-ing

one UserCareerDescription node.

func (*UserCareerDescriptionUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserCareerDescriptionUpsertOne) Exec

Exec executes the query.

func (*UserCareerDescriptionUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerDescriptionUpsertOne) ID

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserCareerDescriptionUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UserCareerDescriptionUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserCareerDescription.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserCareerDescriptionUpsertOne) SetDescription

SetDescription sets the "description" field.

func (*UserCareerDescriptionUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserCareerDescriptionCreate.OnConflict documentation for more info.

func (*UserCareerDescriptionUpsertOne) UpdateDescription

UpdateDescription sets the "description" field to the value that was provided on create.

func (*UserCareerDescriptionUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserCareerDescription.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type UserCareerDescriptions

type UserCareerDescriptions []*UserCareerDescription

UserCareerDescriptions is a parsable slice of UserCareerDescription.

type UserCareerEdges

type UserCareerEdges struct {
	// CareerGroup holds the value of the careerGroup edge.
	CareerGroup *UserCareerGroup `json:"careerGroup,omitempty"`
	// CareerDescriptions holds the value of the careerDescriptions edge.
	CareerDescriptions []*UserCareerDescription `json:"careerDescriptions,omitempty"`
	// CareerTasks holds the value of the careerTasks edge.
	CareerTasks []*CareerTask `json:"careerTasks,omitempty"`
	// CareerSkillGroups holds the value of the careerSkillGroups edge.
	CareerSkillGroups []*CareerSkillGroup `json:"careerSkillGroups,omitempty"`
	// contains filtered or unexported fields
}

UserCareerEdges holds the relations/edges for other nodes in the graph.

func (UserCareerEdges) CareerDescriptionsOrErr

func (e UserCareerEdges) CareerDescriptionsOrErr() ([]*UserCareerDescription, error)

CareerDescriptionsOrErr returns the CareerDescriptions value or an error if the edge was not loaded in eager-loading.

func (UserCareerEdges) CareerGroupOrErr

func (e UserCareerEdges) CareerGroupOrErr() (*UserCareerGroup, error)

CareerGroupOrErr returns the CareerGroup value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UserCareerEdges) CareerSkillGroupsOrErr

func (e UserCareerEdges) CareerSkillGroupsOrErr() ([]*CareerSkillGroup, error)

CareerSkillGroupsOrErr returns the CareerSkillGroups value or an error if the edge was not loaded in eager-loading.

func (UserCareerEdges) CareerTasksOrErr

func (e UserCareerEdges) CareerTasksOrErr() ([]*CareerTask, error)

CareerTasksOrErr returns the CareerTasks value or an error if the edge was not loaded in eager-loading.

type UserCareerGroup

type UserCareerGroup struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Label holds the value of the "label" field.
	Label string `json:"label,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserCareerGroupQuery when eager-loading is set.
	Edges UserCareerGroupEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserCareerGroup is the model entity for the UserCareerGroup schema.

func (*UserCareerGroup) QueryCareers

func (ucg *UserCareerGroup) QueryCareers() *UserCareerQuery

QueryCareers queries the "careers" edge of the UserCareerGroup entity.

func (*UserCareerGroup) QueryUser

func (ucg *UserCareerGroup) QueryUser() *UserQuery

QueryUser queries the "user" edge of the UserCareerGroup entity.

func (*UserCareerGroup) String

func (ucg *UserCareerGroup) String() string

String implements the fmt.Stringer.

func (*UserCareerGroup) Unwrap

func (ucg *UserCareerGroup) Unwrap() *UserCareerGroup

Unwrap unwraps the UserCareerGroup 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 (*UserCareerGroup) Update

Update returns a builder for updating this UserCareerGroup. Note that you need to call UserCareerGroup.Unwrap() before calling this method if this UserCareerGroup was returned from a transaction, and the transaction was committed or rolled back.

func (*UserCareerGroup) Value

func (ucg *UserCareerGroup) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserCareerGroup. This includes values selected through modifiers, order, etc.

type UserCareerGroupBy

type UserCareerGroupBy struct {
	// contains filtered or unexported fields
}

UserCareerGroupBy is the group-by builder for UserCareer entities.

func (*UserCareerGroupBy) Aggregate

func (ucgb *UserCareerGroupBy) Aggregate(fns ...AggregateFunc) *UserCareerGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserCareerGroupBy) Bool

func (s *UserCareerGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupBy) BoolX

func (s *UserCareerGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserCareerGroupBy) Bools

func (s *UserCareerGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupBy) BoolsX

func (s *UserCareerGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserCareerGroupBy) Float64

func (s *UserCareerGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupBy) Float64X

func (s *UserCareerGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserCareerGroupBy) Float64s

func (s *UserCareerGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupBy) Float64sX

func (s *UserCareerGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserCareerGroupBy) Int

func (s *UserCareerGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupBy) IntX

func (s *UserCareerGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserCareerGroupBy) Ints

func (s *UserCareerGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupBy) IntsX

func (s *UserCareerGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserCareerGroupBy) Scan

func (ucgb *UserCareerGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserCareerGroupBy) ScanX

func (s *UserCareerGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserCareerGroupBy) String

func (s *UserCareerGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupBy) StringX

func (s *UserCareerGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserCareerGroupBy) Strings

func (s *UserCareerGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupBy) StringsX

func (s *UserCareerGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserCareerGroupClient

type UserCareerGroupClient struct {
	// contains filtered or unexported fields
}

UserCareerGroupClient is a client for the UserCareerGroup schema.

func NewUserCareerGroupClient

func NewUserCareerGroupClient(c config) *UserCareerGroupClient

NewUserCareerGroupClient returns a client for the UserCareerGroup from the given config.

func (*UserCareerGroupClient) Create

Create returns a builder for creating a UserCareerGroup entity.

func (*UserCareerGroupClient) CreateBulk

CreateBulk returns a builder for creating a bulk of UserCareerGroup entities.

func (*UserCareerGroupClient) Delete

Delete returns a delete builder for UserCareerGroup.

func (*UserCareerGroupClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserCareerGroupClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserCareerGroupClient) Get

Get returns a UserCareerGroup entity by its id.

func (*UserCareerGroupClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UserCareerGroupClient) Hooks

func (c *UserCareerGroupClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserCareerGroupClient) Intercept

func (c *UserCareerGroupClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usercareergroup.Intercept(f(g(h())))`.

func (*UserCareerGroupClient) Interceptors

func (c *UserCareerGroupClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserCareerGroupClient) Query

Query returns a query builder for UserCareerGroup.

func (*UserCareerGroupClient) QueryCareers

func (c *UserCareerGroupClient) QueryCareers(ucg *UserCareerGroup) *UserCareerQuery

QueryCareers queries the careers edge of a UserCareerGroup.

func (*UserCareerGroupClient) QueryUser

func (c *UserCareerGroupClient) QueryUser(ucg *UserCareerGroup) *UserQuery

QueryUser queries the user edge of a UserCareerGroup.

func (*UserCareerGroupClient) Update

Update returns an update builder for UserCareerGroup.

func (*UserCareerGroupClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserCareerGroupClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*UserCareerGroupClient) Use

func (c *UserCareerGroupClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usercareergroup.Hooks(f(g(h())))`.

type UserCareerGroupCreate

type UserCareerGroupCreate struct {
	// contains filtered or unexported fields
}

UserCareerGroupCreate is the builder for creating a UserCareerGroup entity.

func (*UserCareerGroupCreate) AddCareerIDs

func (ucgc *UserCareerGroupCreate) AddCareerIDs(ids ...int) *UserCareerGroupCreate

AddCareerIDs adds the "careers" edge to the UserCareer entity by IDs.

func (*UserCareerGroupCreate) AddCareers

func (ucgc *UserCareerGroupCreate) AddCareers(u ...*UserCareer) *UserCareerGroupCreate

AddCareers adds the "careers" edges to the UserCareer entity.

func (*UserCareerGroupCreate) Exec

func (ucgc *UserCareerGroupCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCareerGroupCreate) ExecX

func (ucgc *UserCareerGroupCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerGroupCreate) Mutation

Mutation returns the UserCareerGroupMutation object of the builder.

func (*UserCareerGroupCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserCareerGroup.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserCareerGroupUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserCareerGroupCreate) OnConflictColumns

func (ucgc *UserCareerGroupCreate) OnConflictColumns(columns ...string) *UserCareerGroupUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserCareerGroup.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCareerGroupCreate) Save

Save creates the UserCareerGroup in the database.

func (*UserCareerGroupCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UserCareerGroupCreate) SetCreateTime

func (ucgc *UserCareerGroupCreate) SetCreateTime(t time.Time) *UserCareerGroupCreate

SetCreateTime sets the "create_time" field.

func (*UserCareerGroupCreate) SetLabel

SetLabel sets the "label" field.

func (*UserCareerGroupCreate) SetNillableCreateTime

func (ucgc *UserCareerGroupCreate) SetNillableCreateTime(t *time.Time) *UserCareerGroupCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*UserCareerGroupCreate) SetNillableUpdateTime

func (ucgc *UserCareerGroupCreate) SetNillableUpdateTime(t *time.Time) *UserCareerGroupCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*UserCareerGroupCreate) SetUpdateTime

func (ucgc *UserCareerGroupCreate) SetUpdateTime(t time.Time) *UserCareerGroupCreate

SetUpdateTime sets the "update_time" field.

func (*UserCareerGroupCreate) SetUser

SetUser sets the "user" edge to the User entity.

func (*UserCareerGroupCreate) SetUserID

func (ucgc *UserCareerGroupCreate) SetUserID(id int) *UserCareerGroupCreate

SetUserID sets the "user" edge to the User entity by ID.

type UserCareerGroupCreateBulk

type UserCareerGroupCreateBulk struct {
	// contains filtered or unexported fields
}

UserCareerGroupCreateBulk is the builder for creating many UserCareerGroup entities in bulk.

func (*UserCareerGroupCreateBulk) Exec

Exec executes the query.

func (*UserCareerGroupCreateBulk) ExecX

func (ucgcb *UserCareerGroupCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerGroupCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserCareerGroup.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserCareerGroupUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserCareerGroupCreateBulk) OnConflictColumns

func (ucgcb *UserCareerGroupCreateBulk) OnConflictColumns(columns ...string) *UserCareerGroupUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserCareerGroup.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCareerGroupCreateBulk) Save

Save creates the UserCareerGroup entities in the database.

func (*UserCareerGroupCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type UserCareerGroupDelete

type UserCareerGroupDelete struct {
	// contains filtered or unexported fields
}

UserCareerGroupDelete is the builder for deleting a UserCareerGroup entity.

func (*UserCareerGroupDelete) Exec

func (ucgd *UserCareerGroupDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserCareerGroupDelete) ExecX

func (ucgd *UserCareerGroupDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerGroupDelete) Where

Where appends a list predicates to the UserCareerGroupDelete builder.

type UserCareerGroupDeleteOne

type UserCareerGroupDeleteOne struct {
	// contains filtered or unexported fields
}

UserCareerGroupDeleteOne is the builder for deleting a single UserCareerGroup entity.

func (*UserCareerGroupDeleteOne) Exec

func (ucgdo *UserCareerGroupDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserCareerGroupDeleteOne) ExecX

func (ucgdo *UserCareerGroupDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerGroupDeleteOne) Where

Where appends a list predicates to the UserCareerGroupDelete builder.

type UserCareerGroupEdges

type UserCareerGroupEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Careers holds the value of the careers edge.
	Careers []*UserCareer `json:"careers,omitempty"`
	// contains filtered or unexported fields
}

UserCareerGroupEdges holds the relations/edges for other nodes in the graph.

func (UserCareerGroupEdges) CareersOrErr

func (e UserCareerGroupEdges) CareersOrErr() ([]*UserCareer, error)

CareersOrErr returns the Careers value or an error if the edge was not loaded in eager-loading.

func (UserCareerGroupEdges) UserOrErr

func (e UserCareerGroupEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserCareerGroupGroupBy

type UserCareerGroupGroupBy struct {
	// contains filtered or unexported fields
}

UserCareerGroupGroupBy is the group-by builder for UserCareerGroup entities.

func (*UserCareerGroupGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*UserCareerGroupGroupBy) Bool

func (s *UserCareerGroupGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupGroupBy) BoolX

func (s *UserCareerGroupGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserCareerGroupGroupBy) Bools

func (s *UserCareerGroupGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupGroupBy) BoolsX

func (s *UserCareerGroupGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserCareerGroupGroupBy) Float64

func (s *UserCareerGroupGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupGroupBy) Float64X

func (s *UserCareerGroupGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserCareerGroupGroupBy) Float64s

func (s *UserCareerGroupGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupGroupBy) Float64sX

func (s *UserCareerGroupGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserCareerGroupGroupBy) Int

func (s *UserCareerGroupGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupGroupBy) IntX

func (s *UserCareerGroupGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserCareerGroupGroupBy) Ints

func (s *UserCareerGroupGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupGroupBy) IntsX

func (s *UserCareerGroupGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserCareerGroupGroupBy) Scan

func (ucggb *UserCareerGroupGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserCareerGroupGroupBy) ScanX

func (s *UserCareerGroupGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserCareerGroupGroupBy) String

func (s *UserCareerGroupGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupGroupBy) StringX

func (s *UserCareerGroupGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserCareerGroupGroupBy) Strings

func (s *UserCareerGroupGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupGroupBy) StringsX

func (s *UserCareerGroupGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserCareerGroupMutation

type UserCareerGroupMutation struct {
	// contains filtered or unexported fields
}

UserCareerGroupMutation represents an operation that mutates the UserCareerGroup nodes in the graph.

func (*UserCareerGroupMutation) AddCareerIDs

func (m *UserCareerGroupMutation) AddCareerIDs(ids ...int)

AddCareerIDs adds the "careers" edge to the UserCareer entity by ids.

func (*UserCareerGroupMutation) AddField

func (m *UserCareerGroupMutation) 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 (*UserCareerGroupMutation) AddedEdges

func (m *UserCareerGroupMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserCareerGroupMutation) AddedField

func (m *UserCareerGroupMutation) 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 (*UserCareerGroupMutation) AddedFields

func (m *UserCareerGroupMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserCareerGroupMutation) AddedIDs

func (m *UserCareerGroupMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserCareerGroupMutation) CareersCleared

func (m *UserCareerGroupMutation) CareersCleared() bool

CareersCleared reports if the "careers" edge to the UserCareer entity was cleared.

func (*UserCareerGroupMutation) CareersIDs

func (m *UserCareerGroupMutation) CareersIDs() (ids []int)

CareersIDs returns the "careers" edge IDs in the mutation.

func (*UserCareerGroupMutation) ClearCareers

func (m *UserCareerGroupMutation) ClearCareers()

ClearCareers clears the "careers" edge to the UserCareer entity.

func (*UserCareerGroupMutation) ClearEdge

func (m *UserCareerGroupMutation) 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 (*UserCareerGroupMutation) ClearField

func (m *UserCareerGroupMutation) 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 (*UserCareerGroupMutation) ClearUser

func (m *UserCareerGroupMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*UserCareerGroupMutation) ClearedEdges

func (m *UserCareerGroupMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserCareerGroupMutation) ClearedFields

func (m *UserCareerGroupMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserCareerGroupMutation) Client

func (m UserCareerGroupMutation) 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 (*UserCareerGroupMutation) CreateTime

func (m *UserCareerGroupMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*UserCareerGroupMutation) EdgeCleared

func (m *UserCareerGroupMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserCareerGroupMutation) Field

func (m *UserCareerGroupMutation) 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 (*UserCareerGroupMutation) FieldCleared

func (m *UserCareerGroupMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserCareerGroupMutation) Fields

func (m *UserCareerGroupMutation) 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 (*UserCareerGroupMutation) ID

func (m *UserCareerGroupMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserCareerGroupMutation) IDs

func (m *UserCareerGroupMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserCareerGroupMutation) Label

func (m *UserCareerGroupMutation) Label() (r string, exists bool)

Label returns the value of the "label" field in the mutation.

func (*UserCareerGroupMutation) OldCreateTime

func (m *UserCareerGroupMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the UserCareerGroup entity. If the UserCareerGroup 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 (*UserCareerGroupMutation) OldField

func (m *UserCareerGroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*UserCareerGroupMutation) OldLabel

func (m *UserCareerGroupMutation) OldLabel(ctx context.Context) (v string, err error)

OldLabel returns the old "label" field's value of the UserCareerGroup entity. If the UserCareerGroup 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 (*UserCareerGroupMutation) OldUpdateTime

func (m *UserCareerGroupMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the UserCareerGroup entity. If the UserCareerGroup 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 (*UserCareerGroupMutation) Op

func (m *UserCareerGroupMutation) Op() Op

Op returns the operation name.

func (*UserCareerGroupMutation) RemoveCareerIDs

func (m *UserCareerGroupMutation) RemoveCareerIDs(ids ...int)

RemoveCareerIDs removes the "careers" edge to the UserCareer entity by IDs.

func (*UserCareerGroupMutation) RemovedCareersIDs

func (m *UserCareerGroupMutation) RemovedCareersIDs() (ids []int)

RemovedCareers returns the removed IDs of the "careers" edge to the UserCareer entity.

func (*UserCareerGroupMutation) RemovedEdges

func (m *UserCareerGroupMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserCareerGroupMutation) RemovedIDs

func (m *UserCareerGroupMutation) 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 (*UserCareerGroupMutation) ResetCareers

func (m *UserCareerGroupMutation) ResetCareers()

ResetCareers resets all changes to the "careers" edge.

func (*UserCareerGroupMutation) ResetCreateTime

func (m *UserCareerGroupMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*UserCareerGroupMutation) ResetEdge

func (m *UserCareerGroupMutation) 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 (*UserCareerGroupMutation) ResetField

func (m *UserCareerGroupMutation) 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 (*UserCareerGroupMutation) ResetLabel

func (m *UserCareerGroupMutation) ResetLabel()

ResetLabel resets all changes to the "label" field.

func (*UserCareerGroupMutation) ResetUpdateTime

func (m *UserCareerGroupMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*UserCareerGroupMutation) ResetUser

func (m *UserCareerGroupMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*UserCareerGroupMutation) SetCreateTime

func (m *UserCareerGroupMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*UserCareerGroupMutation) SetField

func (m *UserCareerGroupMutation) 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 (*UserCareerGroupMutation) SetLabel

func (m *UserCareerGroupMutation) SetLabel(s string)

SetLabel sets the "label" field.

func (*UserCareerGroupMutation) SetOp

func (m *UserCareerGroupMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserCareerGroupMutation) SetUpdateTime

func (m *UserCareerGroupMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*UserCareerGroupMutation) SetUserID

func (m *UserCareerGroupMutation) SetUserID(id int)

SetUserID sets the "user" edge to the User entity by id.

func (UserCareerGroupMutation) Tx

func (m UserCareerGroupMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserCareerGroupMutation) Type

func (m *UserCareerGroupMutation) Type() string

Type returns the node type of this mutation (UserCareerGroup).

func (*UserCareerGroupMutation) UpdateTime

func (m *UserCareerGroupMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*UserCareerGroupMutation) UserCleared

func (m *UserCareerGroupMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*UserCareerGroupMutation) UserID

func (m *UserCareerGroupMutation) UserID() (id int, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*UserCareerGroupMutation) UserIDs

func (m *UserCareerGroupMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*UserCareerGroupMutation) Where

Where appends a list predicates to the UserCareerGroupMutation builder.

func (*UserCareerGroupMutation) WhereP

func (m *UserCareerGroupMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserCareerGroupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserCareerGroupQuery

type UserCareerGroupQuery struct {
	// contains filtered or unexported fields
}

UserCareerGroupQuery is the builder for querying UserCareerGroup entities.

func (*UserCareerGroupQuery) Aggregate

func (ucgq *UserCareerGroupQuery) Aggregate(fns ...AggregateFunc) *UserCareerGroupSelect

Aggregate returns a UserCareerGroupSelect configured with the given aggregations.

func (*UserCareerGroupQuery) All

All executes the query and returns a list of UserCareerGroups.

func (*UserCareerGroupQuery) AllX

AllX is like All, but panics if an error occurs.

func (*UserCareerGroupQuery) Clone

Clone returns a duplicate of the UserCareerGroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserCareerGroupQuery) Count

func (ucgq *UserCareerGroupQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserCareerGroupQuery) CountX

func (ucgq *UserCareerGroupQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserCareerGroupQuery) Exist

func (ucgq *UserCareerGroupQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserCareerGroupQuery) ExistX

func (ucgq *UserCareerGroupQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserCareerGroupQuery) First

First returns the first UserCareerGroup entity from the query. Returns a *NotFoundError when no UserCareerGroup was found.

func (*UserCareerGroupQuery) FirstID

func (ucgq *UserCareerGroupQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserCareerGroup ID from the query. Returns a *NotFoundError when no UserCareerGroup ID was found.

func (*UserCareerGroupQuery) FirstIDX

func (ucgq *UserCareerGroupQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserCareerGroupQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*UserCareerGroupQuery) GroupBy

func (ucgq *UserCareerGroupQuery) GroupBy(field string, fields ...string) *UserCareerGroupGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserCareerGroup.Query().
	GroupBy(usercareergroup.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserCareerGroupQuery) IDs

func (ucgq *UserCareerGroupQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserCareerGroup IDs.

func (*UserCareerGroupQuery) IDsX

func (ucgq *UserCareerGroupQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserCareerGroupQuery) Limit

func (ucgq *UserCareerGroupQuery) Limit(limit int) *UserCareerGroupQuery

Limit the number of records to be returned by this query.

func (*UserCareerGroupQuery) Offset

func (ucgq *UserCareerGroupQuery) Offset(offset int) *UserCareerGroupQuery

Offset to start from.

func (*UserCareerGroupQuery) Only

Only returns a single UserCareerGroup entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserCareerGroup entity is found. Returns a *NotFoundError when no UserCareerGroup entities are found.

func (*UserCareerGroupQuery) OnlyID

func (ucgq *UserCareerGroupQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserCareerGroup ID in the query. Returns a *NotSingularError when more than one UserCareerGroup ID is found. Returns a *NotFoundError when no entities are found.

func (*UserCareerGroupQuery) OnlyIDX

func (ucgq *UserCareerGroupQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserCareerGroupQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*UserCareerGroupQuery) Order

Order specifies how the records should be ordered.

func (*UserCareerGroupQuery) QueryCareers

func (ucgq *UserCareerGroupQuery) QueryCareers() *UserCareerQuery

QueryCareers chains the current query on the "careers" edge.

func (*UserCareerGroupQuery) QueryUser

func (ucgq *UserCareerGroupQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*UserCareerGroupQuery) Select

func (ucgq *UserCareerGroupQuery) Select(fields ...string) *UserCareerGroupSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.UserCareerGroup.Query().
	Select(usercareergroup.FieldCreateTime).
	Scan(ctx, &v)

func (*UserCareerGroupQuery) Unique

func (ucgq *UserCareerGroupQuery) Unique(unique bool) *UserCareerGroupQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserCareerGroupQuery) Where

Where adds a new predicate for the UserCareerGroupQuery builder.

func (*UserCareerGroupQuery) WithCareers

func (ucgq *UserCareerGroupQuery) WithCareers(opts ...func(*UserCareerQuery)) *UserCareerGroupQuery

WithCareers tells the query-builder to eager-load the nodes that are connected to the "careers" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserCareerGroupQuery) WithUser

func (ucgq *UserCareerGroupQuery) WithUser(opts ...func(*UserQuery)) *UserCareerGroupQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type UserCareerGroupSelect

type UserCareerGroupSelect struct {
	*UserCareerGroupQuery
	// contains filtered or unexported fields
}

UserCareerGroupSelect is the builder for selecting fields of UserCareerGroup entities.

func (*UserCareerGroupSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*UserCareerGroupSelect) Bool

func (s *UserCareerGroupSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupSelect) BoolX

func (s *UserCareerGroupSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserCareerGroupSelect) Bools

func (s *UserCareerGroupSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupSelect) BoolsX

func (s *UserCareerGroupSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserCareerGroupSelect) Float64

func (s *UserCareerGroupSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupSelect) Float64X

func (s *UserCareerGroupSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserCareerGroupSelect) Float64s

func (s *UserCareerGroupSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupSelect) Float64sX

func (s *UserCareerGroupSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserCareerGroupSelect) Int

func (s *UserCareerGroupSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupSelect) IntX

func (s *UserCareerGroupSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserCareerGroupSelect) Ints

func (s *UserCareerGroupSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupSelect) IntsX

func (s *UserCareerGroupSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserCareerGroupSelect) Scan

func (ucgs *UserCareerGroupSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserCareerGroupSelect) ScanX

func (s *UserCareerGroupSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserCareerGroupSelect) String

func (s *UserCareerGroupSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupSelect) StringX

func (s *UserCareerGroupSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserCareerGroupSelect) Strings

func (s *UserCareerGroupSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserCareerGroupSelect) StringsX

func (s *UserCareerGroupSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserCareerGroupUpdate

type UserCareerGroupUpdate struct {
	// contains filtered or unexported fields
}

UserCareerGroupUpdate is the builder for updating UserCareerGroup entities.

func (*UserCareerGroupUpdate) AddCareerIDs

func (ucgu *UserCareerGroupUpdate) AddCareerIDs(ids ...int) *UserCareerGroupUpdate

AddCareerIDs adds the "careers" edge to the UserCareer entity by IDs.

func (*UserCareerGroupUpdate) AddCareers

func (ucgu *UserCareerGroupUpdate) AddCareers(u ...*UserCareer) *UserCareerGroupUpdate

AddCareers adds the "careers" edges to the UserCareer entity.

func (*UserCareerGroupUpdate) ClearCareers

func (ucgu *UserCareerGroupUpdate) ClearCareers() *UserCareerGroupUpdate

ClearCareers clears all "careers" edges to the UserCareer entity.

func (*UserCareerGroupUpdate) ClearUser

func (ucgu *UserCareerGroupUpdate) ClearUser() *UserCareerGroupUpdate

ClearUser clears the "user" edge to the User entity.

func (*UserCareerGroupUpdate) Exec

func (ucgu *UserCareerGroupUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCareerGroupUpdate) ExecX

func (ucgu *UserCareerGroupUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerGroupUpdate) Mutation

Mutation returns the UserCareerGroupMutation object of the builder.

func (*UserCareerGroupUpdate) RemoveCareerIDs

func (ucgu *UserCareerGroupUpdate) RemoveCareerIDs(ids ...int) *UserCareerGroupUpdate

RemoveCareerIDs removes the "careers" edge to UserCareer entities by IDs.

func (*UserCareerGroupUpdate) RemoveCareers

func (ucgu *UserCareerGroupUpdate) RemoveCareers(u ...*UserCareer) *UserCareerGroupUpdate

RemoveCareers removes "careers" edges to UserCareer entities.

func (*UserCareerGroupUpdate) Save

func (ucgu *UserCareerGroupUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserCareerGroupUpdate) SaveX

func (ucgu *UserCareerGroupUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserCareerGroupUpdate) SetLabel

SetLabel sets the "label" field.

func (*UserCareerGroupUpdate) SetUpdateTime

func (ucgu *UserCareerGroupUpdate) SetUpdateTime(t time.Time) *UserCareerGroupUpdate

SetUpdateTime sets the "update_time" field.

func (*UserCareerGroupUpdate) SetUser

SetUser sets the "user" edge to the User entity.

func (*UserCareerGroupUpdate) SetUserID

func (ucgu *UserCareerGroupUpdate) SetUserID(id int) *UserCareerGroupUpdate

SetUserID sets the "user" edge to the User entity by ID.

func (*UserCareerGroupUpdate) Where

Where appends a list predicates to the UserCareerGroupUpdate builder.

type UserCareerGroupUpdateOne

type UserCareerGroupUpdateOne struct {
	// contains filtered or unexported fields
}

UserCareerGroupUpdateOne is the builder for updating a single UserCareerGroup entity.

func (*UserCareerGroupUpdateOne) AddCareerIDs

func (ucguo *UserCareerGroupUpdateOne) AddCareerIDs(ids ...int) *UserCareerGroupUpdateOne

AddCareerIDs adds the "careers" edge to the UserCareer entity by IDs.

func (*UserCareerGroupUpdateOne) AddCareers

AddCareers adds the "careers" edges to the UserCareer entity.

func (*UserCareerGroupUpdateOne) ClearCareers

func (ucguo *UserCareerGroupUpdateOne) ClearCareers() *UserCareerGroupUpdateOne

ClearCareers clears all "careers" edges to the UserCareer entity.

func (*UserCareerGroupUpdateOne) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*UserCareerGroupUpdateOne) Exec

func (ucguo *UserCareerGroupUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserCareerGroupUpdateOne) ExecX

func (ucguo *UserCareerGroupUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerGroupUpdateOne) Mutation

Mutation returns the UserCareerGroupMutation object of the builder.

func (*UserCareerGroupUpdateOne) RemoveCareerIDs

func (ucguo *UserCareerGroupUpdateOne) RemoveCareerIDs(ids ...int) *UserCareerGroupUpdateOne

RemoveCareerIDs removes the "careers" edge to UserCareer entities by IDs.

func (*UserCareerGroupUpdateOne) RemoveCareers

func (ucguo *UserCareerGroupUpdateOne) RemoveCareers(u ...*UserCareer) *UserCareerGroupUpdateOne

RemoveCareers removes "careers" edges to UserCareer entities.

func (*UserCareerGroupUpdateOne) Save

Save executes the query and returns the updated UserCareerGroup entity.

func (*UserCareerGroupUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserCareerGroupUpdateOne) Select

func (ucguo *UserCareerGroupUpdateOne) Select(field string, fields ...string) *UserCareerGroupUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserCareerGroupUpdateOne) SetLabel

SetLabel sets the "label" field.

func (*UserCareerGroupUpdateOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserCareerGroupUpdateOne) SetUser

SetUser sets the "user" edge to the User entity.

func (*UserCareerGroupUpdateOne) SetUserID

SetUserID sets the "user" edge to the User entity by ID.

func (*UserCareerGroupUpdateOne) Where

Where appends a list predicates to the UserCareerGroupUpdate builder.

type UserCareerGroupUpsert

type UserCareerGroupUpsert struct {
	*sql.UpdateSet
}

UserCareerGroupUpsert is the "OnConflict" setter.

func (*UserCareerGroupUpsert) SetLabel

SetLabel sets the "label" field.

func (*UserCareerGroupUpsert) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserCareerGroupUpsert) UpdateLabel

func (u *UserCareerGroupUpsert) UpdateLabel() *UserCareerGroupUpsert

UpdateLabel sets the "label" field to the value that was provided on create.

func (*UserCareerGroupUpsert) UpdateUpdateTime

func (u *UserCareerGroupUpsert) UpdateUpdateTime() *UserCareerGroupUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserCareerGroupUpsertBulk

type UserCareerGroupUpsertBulk struct {
	// contains filtered or unexported fields
}

UserCareerGroupUpsertBulk is the builder for "upsert"-ing a bulk of UserCareerGroup nodes.

func (*UserCareerGroupUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserCareerGroupUpsertBulk) Exec

Exec executes the query.

func (*UserCareerGroupUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerGroupUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserCareerGroup.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserCareerGroupUpsertBulk) SetLabel

SetLabel sets the "label" field.

func (*UserCareerGroupUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserCareerGroupUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserCareerGroupCreateBulk.OnConflict documentation for more info.

func (*UserCareerGroupUpsertBulk) UpdateLabel

UpdateLabel sets the "label" field to the value that was provided on create.

func (*UserCareerGroupUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserCareerGroup.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserCareerGroupUpsertBulk) UpdateUpdateTime

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserCareerGroupUpsertOne

type UserCareerGroupUpsertOne struct {
	// contains filtered or unexported fields
}

UserCareerGroupUpsertOne is the builder for "upsert"-ing

one UserCareerGroup node.

func (*UserCareerGroupUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserCareerGroupUpsertOne) Exec

Exec executes the query.

func (*UserCareerGroupUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerGroupUpsertOne) ID

func (u *UserCareerGroupUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserCareerGroupUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UserCareerGroupUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserCareerGroup.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserCareerGroupUpsertOne) SetLabel

SetLabel sets the "label" field.

func (*UserCareerGroupUpsertOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserCareerGroupUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserCareerGroupCreate.OnConflict documentation for more info.

func (*UserCareerGroupUpsertOne) UpdateLabel

UpdateLabel sets the "label" field to the value that was provided on create.

func (*UserCareerGroupUpsertOne) UpdateNewValues

func (u *UserCareerGroupUpsertOne) UpdateNewValues() *UserCareerGroupUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserCareerGroup.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserCareerGroupUpsertOne) UpdateUpdateTime

func (u *UserCareerGroupUpsertOne) UpdateUpdateTime() *UserCareerGroupUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserCareerGroups

type UserCareerGroups []*UserCareerGroup

UserCareerGroups is a parsable slice of UserCareerGroup.

type UserCareerMutation

type UserCareerMutation struct {
	// contains filtered or unexported fields
}

UserCareerMutation represents an operation that mutates the UserCareer nodes in the graph.

func (*UserCareerMutation) AddCareerDescriptionIDs

func (m *UserCareerMutation) AddCareerDescriptionIDs(ids ...int)

AddCareerDescriptionIDs adds the "careerDescriptions" edge to the UserCareerDescription entity by ids.

func (*UserCareerMutation) AddCareerSkillGroupIDs

func (m *UserCareerMutation) AddCareerSkillGroupIDs(ids ...int)

AddCareerSkillGroupIDs adds the "careerSkillGroups" edge to the CareerSkillGroup entity by ids.

func (*UserCareerMutation) AddCareerTaskIDs

func (m *UserCareerMutation) AddCareerTaskIDs(ids ...int)

AddCareerTaskIDs adds the "careerTasks" edge to the CareerTask entity by ids.

func (*UserCareerMutation) AddField

func (m *UserCareerMutation) 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 (*UserCareerMutation) AddedEdges

func (m *UserCareerMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserCareerMutation) AddedField

func (m *UserCareerMutation) 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 (*UserCareerMutation) AddedFields

func (m *UserCareerMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserCareerMutation) AddedIDs

func (m *UserCareerMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserCareerMutation) CareerDescriptionsCleared

func (m *UserCareerMutation) CareerDescriptionsCleared() bool

CareerDescriptionsCleared reports if the "careerDescriptions" edge to the UserCareerDescription entity was cleared.

func (*UserCareerMutation) CareerDescriptionsIDs

func (m *UserCareerMutation) CareerDescriptionsIDs() (ids []int)

CareerDescriptionsIDs returns the "careerDescriptions" edge IDs in the mutation.

func (*UserCareerMutation) CareerGroupCleared

func (m *UserCareerMutation) CareerGroupCleared() bool

CareerGroupCleared reports if the "careerGroup" edge to the UserCareerGroup entity was cleared.

func (*UserCareerMutation) CareerGroupID

func (m *UserCareerMutation) CareerGroupID() (id int, exists bool)

CareerGroupID returns the "careerGroup" edge ID in the mutation.

func (*UserCareerMutation) CareerGroupIDs

func (m *UserCareerMutation) CareerGroupIDs() (ids []int)

CareerGroupIDs returns the "careerGroup" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CareerGroupID instead. It exists only for internal usage by the builders.

func (*UserCareerMutation) CareerSkillGroupsCleared

func (m *UserCareerMutation) CareerSkillGroupsCleared() bool

CareerSkillGroupsCleared reports if the "careerSkillGroups" edge to the CareerSkillGroup entity was cleared.

func (*UserCareerMutation) CareerSkillGroupsIDs

func (m *UserCareerMutation) CareerSkillGroupsIDs() (ids []int)

CareerSkillGroupsIDs returns the "careerSkillGroups" edge IDs in the mutation.

func (*UserCareerMutation) CareerTasksCleared

func (m *UserCareerMutation) CareerTasksCleared() bool

CareerTasksCleared reports if the "careerTasks" edge to the CareerTask entity was cleared.

func (*UserCareerMutation) CareerTasksIDs

func (m *UserCareerMutation) CareerTasksIDs() (ids []int)

CareerTasksIDs returns the "careerTasks" edge IDs in the mutation.

func (*UserCareerMutation) ClearCareerDescriptions

func (m *UserCareerMutation) ClearCareerDescriptions()

ClearCareerDescriptions clears the "careerDescriptions" edge to the UserCareerDescription entity.

func (*UserCareerMutation) ClearCareerGroup

func (m *UserCareerMutation) ClearCareerGroup()

ClearCareerGroup clears the "careerGroup" edge to the UserCareerGroup entity.

func (*UserCareerMutation) ClearCareerSkillGroups

func (m *UserCareerMutation) ClearCareerSkillGroups()

ClearCareerSkillGroups clears the "careerSkillGroups" edge to the CareerSkillGroup entity.

func (*UserCareerMutation) ClearCareerTasks

func (m *UserCareerMutation) ClearCareerTasks()

ClearCareerTasks clears the "careerTasks" edge to the CareerTask entity.

func (*UserCareerMutation) ClearEdge

func (m *UserCareerMutation) 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 (*UserCareerMutation) ClearField

func (m *UserCareerMutation) 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 (*UserCareerMutation) ClearTo

func (m *UserCareerMutation) ClearTo()

ClearTo clears the value of the "to" field.

func (*UserCareerMutation) ClearedEdges

func (m *UserCareerMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserCareerMutation) ClearedFields

func (m *UserCareerMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserCareerMutation) Client

func (m UserCareerMutation) 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 (*UserCareerMutation) CreateTime

func (m *UserCareerMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*UserCareerMutation) EdgeCleared

func (m *UserCareerMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserCareerMutation) Field

func (m *UserCareerMutation) 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 (*UserCareerMutation) FieldCleared

func (m *UserCareerMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserCareerMutation) Fields

func (m *UserCareerMutation) 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 (*UserCareerMutation) From

func (m *UserCareerMutation) From() (r string, exists bool)

From returns the value of the "from" field in the mutation.

func (*UserCareerMutation) ID

func (m *UserCareerMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserCareerMutation) IDs

func (m *UserCareerMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserCareerMutation) Name

func (m *UserCareerMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*UserCareerMutation) OldCreateTime

func (m *UserCareerMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the UserCareer entity. If the UserCareer 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 (*UserCareerMutation) OldField

func (m *UserCareerMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*UserCareerMutation) OldFrom

func (m *UserCareerMutation) OldFrom(ctx context.Context) (v string, err error)

OldFrom returns the old "from" field's value of the UserCareer entity. If the UserCareer 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 (*UserCareerMutation) OldName

func (m *UserCareerMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the UserCareer entity. If the UserCareer 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 (*UserCareerMutation) OldTo

func (m *UserCareerMutation) OldTo(ctx context.Context) (v *string, err error)

OldTo returns the old "to" field's value of the UserCareer entity. If the UserCareer 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 (*UserCareerMutation) OldUpdateTime

func (m *UserCareerMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the UserCareer entity. If the UserCareer 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 (*UserCareerMutation) Op

func (m *UserCareerMutation) Op() Op

Op returns the operation name.

func (*UserCareerMutation) RemoveCareerDescriptionIDs

func (m *UserCareerMutation) RemoveCareerDescriptionIDs(ids ...int)

RemoveCareerDescriptionIDs removes the "careerDescriptions" edge to the UserCareerDescription entity by IDs.

func (*UserCareerMutation) RemoveCareerSkillGroupIDs

func (m *UserCareerMutation) RemoveCareerSkillGroupIDs(ids ...int)

RemoveCareerSkillGroupIDs removes the "careerSkillGroups" edge to the CareerSkillGroup entity by IDs.

func (*UserCareerMutation) RemoveCareerTaskIDs

func (m *UserCareerMutation) RemoveCareerTaskIDs(ids ...int)

RemoveCareerTaskIDs removes the "careerTasks" edge to the CareerTask entity by IDs.

func (*UserCareerMutation) RemovedCareerDescriptionsIDs

func (m *UserCareerMutation) RemovedCareerDescriptionsIDs() (ids []int)

RemovedCareerDescriptions returns the removed IDs of the "careerDescriptions" edge to the UserCareerDescription entity.

func (*UserCareerMutation) RemovedCareerSkillGroupsIDs

func (m *UserCareerMutation) RemovedCareerSkillGroupsIDs() (ids []int)

RemovedCareerSkillGroups returns the removed IDs of the "careerSkillGroups" edge to the CareerSkillGroup entity.

func (*UserCareerMutation) RemovedCareerTasksIDs

func (m *UserCareerMutation) RemovedCareerTasksIDs() (ids []int)

RemovedCareerTasks returns the removed IDs of the "careerTasks" edge to the CareerTask entity.

func (*UserCareerMutation) RemovedEdges

func (m *UserCareerMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserCareerMutation) RemovedIDs

func (m *UserCareerMutation) 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 (*UserCareerMutation) ResetCareerDescriptions

func (m *UserCareerMutation) ResetCareerDescriptions()

ResetCareerDescriptions resets all changes to the "careerDescriptions" edge.

func (*UserCareerMutation) ResetCareerGroup

func (m *UserCareerMutation) ResetCareerGroup()

ResetCareerGroup resets all changes to the "careerGroup" edge.

func (*UserCareerMutation) ResetCareerSkillGroups

func (m *UserCareerMutation) ResetCareerSkillGroups()

ResetCareerSkillGroups resets all changes to the "careerSkillGroups" edge.

func (*UserCareerMutation) ResetCareerTasks

func (m *UserCareerMutation) ResetCareerTasks()

ResetCareerTasks resets all changes to the "careerTasks" edge.

func (*UserCareerMutation) ResetCreateTime

func (m *UserCareerMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*UserCareerMutation) ResetEdge

func (m *UserCareerMutation) 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 (*UserCareerMutation) ResetField

func (m *UserCareerMutation) 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 (*UserCareerMutation) ResetFrom

func (m *UserCareerMutation) ResetFrom()

ResetFrom resets all changes to the "from" field.

func (*UserCareerMutation) ResetName

func (m *UserCareerMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*UserCareerMutation) ResetTo

func (m *UserCareerMutation) ResetTo()

ResetTo resets all changes to the "to" field.

func (*UserCareerMutation) ResetUpdateTime

func (m *UserCareerMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*UserCareerMutation) SetCareerGroupID

func (m *UserCareerMutation) SetCareerGroupID(id int)

SetCareerGroupID sets the "careerGroup" edge to the UserCareerGroup entity by id.

func (*UserCareerMutation) SetCreateTime

func (m *UserCareerMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*UserCareerMutation) SetField

func (m *UserCareerMutation) 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 (*UserCareerMutation) SetFrom

func (m *UserCareerMutation) SetFrom(s string)

SetFrom sets the "from" field.

func (*UserCareerMutation) SetName

func (m *UserCareerMutation) SetName(s string)

SetName sets the "name" field.

func (*UserCareerMutation) SetOp

func (m *UserCareerMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserCareerMutation) SetTo

func (m *UserCareerMutation) SetTo(s string)

SetTo sets the "to" field.

func (*UserCareerMutation) SetUpdateTime

func (m *UserCareerMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*UserCareerMutation) To

func (m *UserCareerMutation) To() (r string, exists bool)

To returns the value of the "to" field in the mutation.

func (*UserCareerMutation) ToCleared

func (m *UserCareerMutation) ToCleared() bool

ToCleared returns if the "to" field was cleared in this mutation.

func (UserCareerMutation) Tx

func (m UserCareerMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserCareerMutation) Type

func (m *UserCareerMutation) Type() string

Type returns the node type of this mutation (UserCareer).

func (*UserCareerMutation) UpdateTime

func (m *UserCareerMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*UserCareerMutation) Where

func (m *UserCareerMutation) Where(ps ...predicate.UserCareer)

Where appends a list predicates to the UserCareerMutation builder.

func (*UserCareerMutation) WhereP

func (m *UserCareerMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserCareerMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserCareerQuery

type UserCareerQuery struct {
	// contains filtered or unexported fields
}

UserCareerQuery is the builder for querying UserCareer entities.

func (*UserCareerQuery) Aggregate

func (ucq *UserCareerQuery) Aggregate(fns ...AggregateFunc) *UserCareerSelect

Aggregate returns a UserCareerSelect configured with the given aggregations.

func (*UserCareerQuery) All

func (ucq *UserCareerQuery) All(ctx context.Context) ([]*UserCareer, error)

All executes the query and returns a list of UserCareers.

func (*UserCareerQuery) AllX

func (ucq *UserCareerQuery) AllX(ctx context.Context) []*UserCareer

AllX is like All, but panics if an error occurs.

func (*UserCareerQuery) Clone

func (ucq *UserCareerQuery) Clone() *UserCareerQuery

Clone returns a duplicate of the UserCareerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserCareerQuery) Count

func (ucq *UserCareerQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserCareerQuery) CountX

func (ucq *UserCareerQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserCareerQuery) Exist

func (ucq *UserCareerQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserCareerQuery) ExistX

func (ucq *UserCareerQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserCareerQuery) First

func (ucq *UserCareerQuery) First(ctx context.Context) (*UserCareer, error)

First returns the first UserCareer entity from the query. Returns a *NotFoundError when no UserCareer was found.

func (*UserCareerQuery) FirstID

func (ucq *UserCareerQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserCareer ID from the query. Returns a *NotFoundError when no UserCareer ID was found.

func (*UserCareerQuery) FirstIDX

func (ucq *UserCareerQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserCareerQuery) FirstX

func (ucq *UserCareerQuery) FirstX(ctx context.Context) *UserCareer

FirstX is like First, but panics if an error occurs.

func (*UserCareerQuery) GroupBy

func (ucq *UserCareerQuery) GroupBy(field string, fields ...string) *UserCareerGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserCareer.Query().
	GroupBy(usercareer.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserCareerQuery) IDs

func (ucq *UserCareerQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserCareer IDs.

func (*UserCareerQuery) IDsX

func (ucq *UserCareerQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserCareerQuery) Limit

func (ucq *UserCareerQuery) Limit(limit int) *UserCareerQuery

Limit the number of records to be returned by this query.

func (*UserCareerQuery) Offset

func (ucq *UserCareerQuery) Offset(offset int) *UserCareerQuery

Offset to start from.

func (*UserCareerQuery) Only

func (ucq *UserCareerQuery) Only(ctx context.Context) (*UserCareer, error)

Only returns a single UserCareer entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserCareer entity is found. Returns a *NotFoundError when no UserCareer entities are found.

func (*UserCareerQuery) OnlyID

func (ucq *UserCareerQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserCareer ID in the query. Returns a *NotSingularError when more than one UserCareer ID is found. Returns a *NotFoundError when no entities are found.

func (*UserCareerQuery) OnlyIDX

func (ucq *UserCareerQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserCareerQuery) OnlyX

func (ucq *UserCareerQuery) OnlyX(ctx context.Context) *UserCareer

OnlyX is like Only, but panics if an error occurs.

func (*UserCareerQuery) Order

Order specifies how the records should be ordered.

func (*UserCareerQuery) QueryCareerDescriptions

func (ucq *UserCareerQuery) QueryCareerDescriptions() *UserCareerDescriptionQuery

QueryCareerDescriptions chains the current query on the "careerDescriptions" edge.

func (*UserCareerQuery) QueryCareerGroup

func (ucq *UserCareerQuery) QueryCareerGroup() *UserCareerGroupQuery

QueryCareerGroup chains the current query on the "careerGroup" edge.

func (*UserCareerQuery) QueryCareerSkillGroups

func (ucq *UserCareerQuery) QueryCareerSkillGroups() *CareerSkillGroupQuery

QueryCareerSkillGroups chains the current query on the "careerSkillGroups" edge.

func (*UserCareerQuery) QueryCareerTasks

func (ucq *UserCareerQuery) QueryCareerTasks() *CareerTaskQuery

QueryCareerTasks chains the current query on the "careerTasks" edge.

func (*UserCareerQuery) Select

func (ucq *UserCareerQuery) Select(fields ...string) *UserCareerSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.UserCareer.Query().
	Select(usercareer.FieldCreateTime).
	Scan(ctx, &v)

func (*UserCareerQuery) Unique

func (ucq *UserCareerQuery) Unique(unique bool) *UserCareerQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserCareerQuery) Where

Where adds a new predicate for the UserCareerQuery builder.

func (*UserCareerQuery) WithCareerDescriptions

func (ucq *UserCareerQuery) WithCareerDescriptions(opts ...func(*UserCareerDescriptionQuery)) *UserCareerQuery

WithCareerDescriptions tells the query-builder to eager-load the nodes that are connected to the "careerDescriptions" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserCareerQuery) WithCareerGroup

func (ucq *UserCareerQuery) WithCareerGroup(opts ...func(*UserCareerGroupQuery)) *UserCareerQuery

WithCareerGroup tells the query-builder to eager-load the nodes that are connected to the "careerGroup" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserCareerQuery) WithCareerSkillGroups

func (ucq *UserCareerQuery) WithCareerSkillGroups(opts ...func(*CareerSkillGroupQuery)) *UserCareerQuery

WithCareerSkillGroups tells the query-builder to eager-load the nodes that are connected to the "careerSkillGroups" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserCareerQuery) WithCareerTasks

func (ucq *UserCareerQuery) WithCareerTasks(opts ...func(*CareerTaskQuery)) *UserCareerQuery

WithCareerTasks tells the query-builder to eager-load the nodes that are connected to the "careerTasks" edge. The optional arguments are used to configure the query builder of the edge.

type UserCareerSelect

type UserCareerSelect struct {
	*UserCareerQuery
	// contains filtered or unexported fields
}

UserCareerSelect is the builder for selecting fields of UserCareer entities.

func (*UserCareerSelect) Aggregate

func (ucs *UserCareerSelect) Aggregate(fns ...AggregateFunc) *UserCareerSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserCareerSelect) Bool

func (s *UserCareerSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserCareerSelect) BoolX

func (s *UserCareerSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserCareerSelect) Bools

func (s *UserCareerSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserCareerSelect) BoolsX

func (s *UserCareerSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserCareerSelect) Float64

func (s *UserCareerSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserCareerSelect) Float64X

func (s *UserCareerSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserCareerSelect) Float64s

func (s *UserCareerSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserCareerSelect) Float64sX

func (s *UserCareerSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserCareerSelect) Int

func (s *UserCareerSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserCareerSelect) IntX

func (s *UserCareerSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserCareerSelect) Ints

func (s *UserCareerSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserCareerSelect) IntsX

func (s *UserCareerSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserCareerSelect) Scan

func (ucs *UserCareerSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserCareerSelect) ScanX

func (s *UserCareerSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserCareerSelect) String

func (s *UserCareerSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserCareerSelect) StringX

func (s *UserCareerSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserCareerSelect) Strings

func (s *UserCareerSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserCareerSelect) StringsX

func (s *UserCareerSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserCareerUpdate

type UserCareerUpdate struct {
	// contains filtered or unexported fields
}

UserCareerUpdate is the builder for updating UserCareer entities.

func (*UserCareerUpdate) AddCareerDescriptionIDs

func (ucu *UserCareerUpdate) AddCareerDescriptionIDs(ids ...int) *UserCareerUpdate

AddCareerDescriptionIDs adds the "careerDescriptions" edge to the UserCareerDescription entity by IDs.

func (*UserCareerUpdate) AddCareerDescriptions

func (ucu *UserCareerUpdate) AddCareerDescriptions(u ...*UserCareerDescription) *UserCareerUpdate

AddCareerDescriptions adds the "careerDescriptions" edges to the UserCareerDescription entity.

func (*UserCareerUpdate) AddCareerSkillGroupIDs

func (ucu *UserCareerUpdate) AddCareerSkillGroupIDs(ids ...int) *UserCareerUpdate

AddCareerSkillGroupIDs adds the "careerSkillGroups" edge to the CareerSkillGroup entity by IDs.

func (*UserCareerUpdate) AddCareerSkillGroups

func (ucu *UserCareerUpdate) AddCareerSkillGroups(c ...*CareerSkillGroup) *UserCareerUpdate

AddCareerSkillGroups adds the "careerSkillGroups" edges to the CareerSkillGroup entity.

func (*UserCareerUpdate) AddCareerTaskIDs

func (ucu *UserCareerUpdate) AddCareerTaskIDs(ids ...int) *UserCareerUpdate

AddCareerTaskIDs adds the "careerTasks" edge to the CareerTask entity by IDs.

func (*UserCareerUpdate) AddCareerTasks

func (ucu *UserCareerUpdate) AddCareerTasks(c ...*CareerTask) *UserCareerUpdate

AddCareerTasks adds the "careerTasks" edges to the CareerTask entity.

func (*UserCareerUpdate) ClearCareerDescriptions

func (ucu *UserCareerUpdate) ClearCareerDescriptions() *UserCareerUpdate

ClearCareerDescriptions clears all "careerDescriptions" edges to the UserCareerDescription entity.

func (*UserCareerUpdate) ClearCareerGroup

func (ucu *UserCareerUpdate) ClearCareerGroup() *UserCareerUpdate

ClearCareerGroup clears the "careerGroup" edge to the UserCareerGroup entity.

func (*UserCareerUpdate) ClearCareerSkillGroups

func (ucu *UserCareerUpdate) ClearCareerSkillGroups() *UserCareerUpdate

ClearCareerSkillGroups clears all "careerSkillGroups" edges to the CareerSkillGroup entity.

func (*UserCareerUpdate) ClearCareerTasks

func (ucu *UserCareerUpdate) ClearCareerTasks() *UserCareerUpdate

ClearCareerTasks clears all "careerTasks" edges to the CareerTask entity.

func (*UserCareerUpdate) ClearTo

func (ucu *UserCareerUpdate) ClearTo() *UserCareerUpdate

ClearTo clears the value of the "to" field.

func (*UserCareerUpdate) Exec

func (ucu *UserCareerUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCareerUpdate) ExecX

func (ucu *UserCareerUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerUpdate) Mutation

func (ucu *UserCareerUpdate) Mutation() *UserCareerMutation

Mutation returns the UserCareerMutation object of the builder.

func (*UserCareerUpdate) RemoveCareerDescriptionIDs

func (ucu *UserCareerUpdate) RemoveCareerDescriptionIDs(ids ...int) *UserCareerUpdate

RemoveCareerDescriptionIDs removes the "careerDescriptions" edge to UserCareerDescription entities by IDs.

func (*UserCareerUpdate) RemoveCareerDescriptions

func (ucu *UserCareerUpdate) RemoveCareerDescriptions(u ...*UserCareerDescription) *UserCareerUpdate

RemoveCareerDescriptions removes "careerDescriptions" edges to UserCareerDescription entities.

func (*UserCareerUpdate) RemoveCareerSkillGroupIDs

func (ucu *UserCareerUpdate) RemoveCareerSkillGroupIDs(ids ...int) *UserCareerUpdate

RemoveCareerSkillGroupIDs removes the "careerSkillGroups" edge to CareerSkillGroup entities by IDs.

func (*UserCareerUpdate) RemoveCareerSkillGroups

func (ucu *UserCareerUpdate) RemoveCareerSkillGroups(c ...*CareerSkillGroup) *UserCareerUpdate

RemoveCareerSkillGroups removes "careerSkillGroups" edges to CareerSkillGroup entities.

func (*UserCareerUpdate) RemoveCareerTaskIDs

func (ucu *UserCareerUpdate) RemoveCareerTaskIDs(ids ...int) *UserCareerUpdate

RemoveCareerTaskIDs removes the "careerTasks" edge to CareerTask entities by IDs.

func (*UserCareerUpdate) RemoveCareerTasks

func (ucu *UserCareerUpdate) RemoveCareerTasks(c ...*CareerTask) *UserCareerUpdate

RemoveCareerTasks removes "careerTasks" edges to CareerTask entities.

func (*UserCareerUpdate) Save

func (ucu *UserCareerUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserCareerUpdate) SaveX

func (ucu *UserCareerUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserCareerUpdate) SetCareerGroup

func (ucu *UserCareerUpdate) SetCareerGroup(u *UserCareerGroup) *UserCareerUpdate

SetCareerGroup sets the "careerGroup" edge to the UserCareerGroup entity.

func (*UserCareerUpdate) SetCareerGroupID

func (ucu *UserCareerUpdate) SetCareerGroupID(id int) *UserCareerUpdate

SetCareerGroupID sets the "careerGroup" edge to the UserCareerGroup entity by ID.

func (*UserCareerUpdate) SetFrom

func (ucu *UserCareerUpdate) SetFrom(s string) *UserCareerUpdate

SetFrom sets the "from" field.

func (*UserCareerUpdate) SetName

func (ucu *UserCareerUpdate) SetName(s string) *UserCareerUpdate

SetName sets the "name" field.

func (*UserCareerUpdate) SetNillableTo

func (ucu *UserCareerUpdate) SetNillableTo(s *string) *UserCareerUpdate

SetNillableTo sets the "to" field if the given value is not nil.

func (*UserCareerUpdate) SetTo

func (ucu *UserCareerUpdate) SetTo(s string) *UserCareerUpdate

SetTo sets the "to" field.

func (*UserCareerUpdate) SetUpdateTime

func (ucu *UserCareerUpdate) SetUpdateTime(t time.Time) *UserCareerUpdate

SetUpdateTime sets the "update_time" field.

func (*UserCareerUpdate) Where

Where appends a list predicates to the UserCareerUpdate builder.

type UserCareerUpdateOne

type UserCareerUpdateOne struct {
	// contains filtered or unexported fields
}

UserCareerUpdateOne is the builder for updating a single UserCareer entity.

func (*UserCareerUpdateOne) AddCareerDescriptionIDs

func (ucuo *UserCareerUpdateOne) AddCareerDescriptionIDs(ids ...int) *UserCareerUpdateOne

AddCareerDescriptionIDs adds the "careerDescriptions" edge to the UserCareerDescription entity by IDs.

func (*UserCareerUpdateOne) AddCareerDescriptions

func (ucuo *UserCareerUpdateOne) AddCareerDescriptions(u ...*UserCareerDescription) *UserCareerUpdateOne

AddCareerDescriptions adds the "careerDescriptions" edges to the UserCareerDescription entity.

func (*UserCareerUpdateOne) AddCareerSkillGroupIDs

func (ucuo *UserCareerUpdateOne) AddCareerSkillGroupIDs(ids ...int) *UserCareerUpdateOne

AddCareerSkillGroupIDs adds the "careerSkillGroups" edge to the CareerSkillGroup entity by IDs.

func (*UserCareerUpdateOne) AddCareerSkillGroups

func (ucuo *UserCareerUpdateOne) AddCareerSkillGroups(c ...*CareerSkillGroup) *UserCareerUpdateOne

AddCareerSkillGroups adds the "careerSkillGroups" edges to the CareerSkillGroup entity.

func (*UserCareerUpdateOne) AddCareerTaskIDs

func (ucuo *UserCareerUpdateOne) AddCareerTaskIDs(ids ...int) *UserCareerUpdateOne

AddCareerTaskIDs adds the "careerTasks" edge to the CareerTask entity by IDs.

func (*UserCareerUpdateOne) AddCareerTasks

func (ucuo *UserCareerUpdateOne) AddCareerTasks(c ...*CareerTask) *UserCareerUpdateOne

AddCareerTasks adds the "careerTasks" edges to the CareerTask entity.

func (*UserCareerUpdateOne) ClearCareerDescriptions

func (ucuo *UserCareerUpdateOne) ClearCareerDescriptions() *UserCareerUpdateOne

ClearCareerDescriptions clears all "careerDescriptions" edges to the UserCareerDescription entity.

func (*UserCareerUpdateOne) ClearCareerGroup

func (ucuo *UserCareerUpdateOne) ClearCareerGroup() *UserCareerUpdateOne

ClearCareerGroup clears the "careerGroup" edge to the UserCareerGroup entity.

func (*UserCareerUpdateOne) ClearCareerSkillGroups

func (ucuo *UserCareerUpdateOne) ClearCareerSkillGroups() *UserCareerUpdateOne

ClearCareerSkillGroups clears all "careerSkillGroups" edges to the CareerSkillGroup entity.

func (*UserCareerUpdateOne) ClearCareerTasks

func (ucuo *UserCareerUpdateOne) ClearCareerTasks() *UserCareerUpdateOne

ClearCareerTasks clears all "careerTasks" edges to the CareerTask entity.

func (*UserCareerUpdateOne) ClearTo

func (ucuo *UserCareerUpdateOne) ClearTo() *UserCareerUpdateOne

ClearTo clears the value of the "to" field.

func (*UserCareerUpdateOne) Exec

func (ucuo *UserCareerUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserCareerUpdateOne) ExecX

func (ucuo *UserCareerUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerUpdateOne) Mutation

func (ucuo *UserCareerUpdateOne) Mutation() *UserCareerMutation

Mutation returns the UserCareerMutation object of the builder.

func (*UserCareerUpdateOne) RemoveCareerDescriptionIDs

func (ucuo *UserCareerUpdateOne) RemoveCareerDescriptionIDs(ids ...int) *UserCareerUpdateOne

RemoveCareerDescriptionIDs removes the "careerDescriptions" edge to UserCareerDescription entities by IDs.

func (*UserCareerUpdateOne) RemoveCareerDescriptions

func (ucuo *UserCareerUpdateOne) RemoveCareerDescriptions(u ...*UserCareerDescription) *UserCareerUpdateOne

RemoveCareerDescriptions removes "careerDescriptions" edges to UserCareerDescription entities.

func (*UserCareerUpdateOne) RemoveCareerSkillGroupIDs

func (ucuo *UserCareerUpdateOne) RemoveCareerSkillGroupIDs(ids ...int) *UserCareerUpdateOne

RemoveCareerSkillGroupIDs removes the "careerSkillGroups" edge to CareerSkillGroup entities by IDs.

func (*UserCareerUpdateOne) RemoveCareerSkillGroups

func (ucuo *UserCareerUpdateOne) RemoveCareerSkillGroups(c ...*CareerSkillGroup) *UserCareerUpdateOne

RemoveCareerSkillGroups removes "careerSkillGroups" edges to CareerSkillGroup entities.

func (*UserCareerUpdateOne) RemoveCareerTaskIDs

func (ucuo *UserCareerUpdateOne) RemoveCareerTaskIDs(ids ...int) *UserCareerUpdateOne

RemoveCareerTaskIDs removes the "careerTasks" edge to CareerTask entities by IDs.

func (*UserCareerUpdateOne) RemoveCareerTasks

func (ucuo *UserCareerUpdateOne) RemoveCareerTasks(c ...*CareerTask) *UserCareerUpdateOne

RemoveCareerTasks removes "careerTasks" edges to CareerTask entities.

func (*UserCareerUpdateOne) Save

func (ucuo *UserCareerUpdateOne) Save(ctx context.Context) (*UserCareer, error)

Save executes the query and returns the updated UserCareer entity.

func (*UserCareerUpdateOne) SaveX

func (ucuo *UserCareerUpdateOne) SaveX(ctx context.Context) *UserCareer

SaveX is like Save, but panics if an error occurs.

func (*UserCareerUpdateOne) Select

func (ucuo *UserCareerUpdateOne) Select(field string, fields ...string) *UserCareerUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserCareerUpdateOne) SetCareerGroup

func (ucuo *UserCareerUpdateOne) SetCareerGroup(u *UserCareerGroup) *UserCareerUpdateOne

SetCareerGroup sets the "careerGroup" edge to the UserCareerGroup entity.

func (*UserCareerUpdateOne) SetCareerGroupID

func (ucuo *UserCareerUpdateOne) SetCareerGroupID(id int) *UserCareerUpdateOne

SetCareerGroupID sets the "careerGroup" edge to the UserCareerGroup entity by ID.

func (*UserCareerUpdateOne) SetFrom

SetFrom sets the "from" field.

func (*UserCareerUpdateOne) SetName

SetName sets the "name" field.

func (*UserCareerUpdateOne) SetNillableTo

func (ucuo *UserCareerUpdateOne) SetNillableTo(s *string) *UserCareerUpdateOne

SetNillableTo sets the "to" field if the given value is not nil.

func (*UserCareerUpdateOne) SetTo

SetTo sets the "to" field.

func (*UserCareerUpdateOne) SetUpdateTime

func (ucuo *UserCareerUpdateOne) SetUpdateTime(t time.Time) *UserCareerUpdateOne

SetUpdateTime sets the "update_time" field.

func (*UserCareerUpdateOne) Where

Where appends a list predicates to the UserCareerUpdate builder.

type UserCareerUpsert

type UserCareerUpsert struct {
	*sql.UpdateSet
}

UserCareerUpsert is the "OnConflict" setter.

func (*UserCareerUpsert) ClearTo

func (u *UserCareerUpsert) ClearTo() *UserCareerUpsert

ClearTo clears the value of the "to" field.

func (*UserCareerUpsert) SetFrom

func (u *UserCareerUpsert) SetFrom(v string) *UserCareerUpsert

SetFrom sets the "from" field.

func (*UserCareerUpsert) SetName

func (u *UserCareerUpsert) SetName(v string) *UserCareerUpsert

SetName sets the "name" field.

func (*UserCareerUpsert) SetTo

SetTo sets the "to" field.

func (*UserCareerUpsert) SetUpdateTime

func (u *UserCareerUpsert) SetUpdateTime(v time.Time) *UserCareerUpsert

SetUpdateTime sets the "update_time" field.

func (*UserCareerUpsert) UpdateFrom

func (u *UserCareerUpsert) UpdateFrom() *UserCareerUpsert

UpdateFrom sets the "from" field to the value that was provided on create.

func (*UserCareerUpsert) UpdateName

func (u *UserCareerUpsert) UpdateName() *UserCareerUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*UserCareerUpsert) UpdateTo

func (u *UserCareerUpsert) UpdateTo() *UserCareerUpsert

UpdateTo sets the "to" field to the value that was provided on create.

func (*UserCareerUpsert) UpdateUpdateTime

func (u *UserCareerUpsert) UpdateUpdateTime() *UserCareerUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserCareerUpsertBulk

type UserCareerUpsertBulk struct {
	// contains filtered or unexported fields
}

UserCareerUpsertBulk is the builder for "upsert"-ing a bulk of UserCareer nodes.

func (*UserCareerUpsertBulk) ClearTo

ClearTo clears the value of the "to" field.

func (*UserCareerUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserCareerUpsertBulk) Exec

Exec executes the query.

func (*UserCareerUpsertBulk) ExecX

func (u *UserCareerUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserCareer.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserCareerUpsertBulk) SetFrom

SetFrom sets the "from" field.

func (*UserCareerUpsertBulk) SetName

SetName sets the "name" field.

func (*UserCareerUpsertBulk) SetTo

SetTo sets the "to" field.

func (*UserCareerUpsertBulk) SetUpdateTime

func (u *UserCareerUpsertBulk) SetUpdateTime(v time.Time) *UserCareerUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*UserCareerUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserCareerCreateBulk.OnConflict documentation for more info.

func (*UserCareerUpsertBulk) UpdateFrom

func (u *UserCareerUpsertBulk) UpdateFrom() *UserCareerUpsertBulk

UpdateFrom sets the "from" field to the value that was provided on create.

func (*UserCareerUpsertBulk) UpdateName

func (u *UserCareerUpsertBulk) UpdateName() *UserCareerUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*UserCareerUpsertBulk) UpdateNewValues

func (u *UserCareerUpsertBulk) UpdateNewValues() *UserCareerUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserCareer.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserCareerUpsertBulk) UpdateTo

UpdateTo sets the "to" field to the value that was provided on create.

func (*UserCareerUpsertBulk) UpdateUpdateTime

func (u *UserCareerUpsertBulk) UpdateUpdateTime() *UserCareerUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserCareerUpsertOne

type UserCareerUpsertOne struct {
	// contains filtered or unexported fields
}

UserCareerUpsertOne is the builder for "upsert"-ing

one UserCareer node.

func (*UserCareerUpsertOne) ClearTo

ClearTo clears the value of the "to" field.

func (*UserCareerUpsertOne) DoNothing

func (u *UserCareerUpsertOne) DoNothing() *UserCareerUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserCareerUpsertOne) Exec

Exec executes the query.

func (*UserCareerUpsertOne) ExecX

func (u *UserCareerUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCareerUpsertOne) ID

func (u *UserCareerUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserCareerUpsertOne) IDX

func (u *UserCareerUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UserCareerUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserCareer.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserCareerUpsertOne) SetFrom

SetFrom sets the "from" field.

func (*UserCareerUpsertOne) SetName

SetName sets the "name" field.

func (*UserCareerUpsertOne) SetTo

SetTo sets the "to" field.

func (*UserCareerUpsertOne) SetUpdateTime

func (u *UserCareerUpsertOne) SetUpdateTime(v time.Time) *UserCareerUpsertOne

SetUpdateTime sets the "update_time" field.

func (*UserCareerUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserCareerCreate.OnConflict documentation for more info.

func (*UserCareerUpsertOne) UpdateFrom

func (u *UserCareerUpsertOne) UpdateFrom() *UserCareerUpsertOne

UpdateFrom sets the "from" field to the value that was provided on create.

func (*UserCareerUpsertOne) UpdateName

func (u *UserCareerUpsertOne) UpdateName() *UserCareerUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*UserCareerUpsertOne) UpdateNewValues

func (u *UserCareerUpsertOne) UpdateNewValues() *UserCareerUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserCareer.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserCareerUpsertOne) UpdateTo

UpdateTo sets the "to" field to the value that was provided on create.

func (*UserCareerUpsertOne) UpdateUpdateTime

func (u *UserCareerUpsertOne) UpdateUpdateTime() *UserCareerUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserCareers

type UserCareers []*UserCareer

UserCareers is a parsable slice of UserCareer.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept

func (c *UserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryActivities

func (c *UserClient) QueryActivities(u *User) *UserActivityQuery

QueryActivities queries the activities edge of a User.

func (*UserClient) QueryCareerGroups

func (c *UserClient) QueryCareerGroups(u *User) *UserCareerGroupQuery

QueryCareerGroups queries the careerGroups edge of a User.

func (*UserClient) QueryNotes

func (c *UserClient) QueryNotes(u *User) *UserNoteQuery

QueryNotes queries the notes edge of a User.

func (*UserClient) QueryQualifications

func (c *UserClient) QueryQualifications(u *User) *UserQualificationQuery

QueryQualifications queries the qualifications 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) AddActivities

func (uc *UserCreate) AddActivities(u ...*UserActivity) *UserCreate

AddActivities adds the "activities" edges to the UserActivity entity.

func (*UserCreate) AddActivityIDs

func (uc *UserCreate) AddActivityIDs(ids ...int) *UserCreate

AddActivityIDs adds the "activities" edge to the UserActivity entity by IDs.

func (*UserCreate) AddCareerGroupIDs

func (uc *UserCreate) AddCareerGroupIDs(ids ...int) *UserCreate

AddCareerGroupIDs adds the "careerGroups" edge to the UserCareerGroup entity by IDs.

func (*UserCreate) AddCareerGroups

func (uc *UserCreate) AddCareerGroups(u ...*UserCareerGroup) *UserCreate

AddCareerGroups adds the "careerGroups" edges to the UserCareerGroup entity.

func (*UserCreate) AddNoteIDs

func (uc *UserCreate) AddNoteIDs(ids ...int) *UserCreate

AddNoteIDs adds the "notes" edge to the UserNote entity by IDs.

func (*UserCreate) AddNotes

func (uc *UserCreate) AddNotes(u ...*UserNote) *UserCreate

AddNotes adds the "notes" edges to the UserNote entity.

func (*UserCreate) AddQualificationIDs

func (uc *UserCreate) AddQualificationIDs(ids ...int) *UserCreate

AddQualificationIDs adds the "qualifications" edge to the UserQualification entity by IDs.

func (*UserCreate) AddQualifications

func (uc *UserCreate) AddQualifications(u ...*UserQualification) *UserCreate

AddQualifications adds the "qualifications" edges to the UserQualification entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) OnConflict

func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns

func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

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) SetAvatarURL

func (uc *UserCreate) SetAvatarURL(s string) *UserCreate

SetAvatarURL sets the "avatar_url" field.

func (*UserCreate) SetBelongTo

func (uc *UserCreate) SetBelongTo(s string) *UserCreate

SetBelongTo sets the "belong_to" field.

func (*UserCreate) SetBirthdayDay

func (uc *UserCreate) SetBirthdayDay(i int) *UserCreate

SetBirthdayDay sets the "birthday_day" field.

func (*UserCreate) SetBirthdayMonth

func (uc *UserCreate) SetBirthdayMonth(i int) *UserCreate

SetBirthdayMonth sets the "birthday_month" field.

func (*UserCreate) SetBirthdayYear

func (uc *UserCreate) SetBirthdayYear(i int) *UserCreate

SetBirthdayYear sets the "birthday_year" field.

func (*UserCreate) SetCreateTime

func (uc *UserCreate) SetCreateTime(t time.Time) *UserCreate

SetCreateTime sets the "create_time" field.

func (*UserCreate) SetJob

func (uc *UserCreate) SetJob(s string) *UserCreate

SetJob sets the "job" field.

func (*UserCreate) SetName

func (uc *UserCreate) SetName(s string) *UserCreate

SetName sets the "name" field.

func (*UserCreate) SetNickname

func (uc *UserCreate) SetNickname(s string) *UserCreate

SetNickname sets the "nickname" field.

func (*UserCreate) SetNillableAvatarURL

func (uc *UserCreate) SetNillableAvatarURL(s *string) *UserCreate

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*UserCreate) SetNillableBelongTo

func (uc *UserCreate) SetNillableBelongTo(s *string) *UserCreate

SetNillableBelongTo sets the "belong_to" field if the given value is not nil.

func (*UserCreate) SetNillableCreateTime

func (uc *UserCreate) SetNillableCreateTime(t *time.Time) *UserCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*UserCreate) SetNillableJob

func (uc *UserCreate) SetNillableJob(s *string) *UserCreate

SetNillableJob sets the "job" field if the given value is not nil.

func (*UserCreate) SetNillableNickname

func (uc *UserCreate) SetNillableNickname(s *string) *UserCreate

SetNillableNickname sets the "nickname" field if the given value is not nil.

func (*UserCreate) SetNillablePr

func (uc *UserCreate) SetNillablePr(s *string) *UserCreate

SetNillablePr sets the "pr" field if the given value is not nil.

func (*UserCreate) SetNillableUpdateTime

func (uc *UserCreate) SetNillableUpdateTime(t *time.Time) *UserCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*UserCreate) SetPr

func (uc *UserCreate) SetPr(s string) *UserCreate

SetPr sets the "pr" field.

func (*UserCreate) SetUpdateTime

func (uc *UserCreate) SetUpdateTime(t time.Time) *UserCreate

SetUpdateTime sets the "update_time" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) OnConflict

func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns

func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where

func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserEdges

type UserEdges struct {
	// Activities holds the value of the activities edge.
	Activities []*UserActivity `json:"activities,omitempty"`
	// Qualifications holds the value of the qualifications edge.
	Qualifications []*UserQualification `json:"qualifications,omitempty"`
	// CareerGroups holds the value of the careerGroups edge.
	CareerGroups []*UserCareerGroup `json:"careerGroups,omitempty"`
	// Notes holds the value of the notes edge.
	Notes []*UserNote `json:"notes,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) ActivitiesOrErr

func (e UserEdges) ActivitiesOrErr() ([]*UserActivity, error)

ActivitiesOrErr returns the Activities value or an error if the edge was not loaded in eager-loading.

func (UserEdges) CareerGroupsOrErr

func (e UserEdges) CareerGroupsOrErr() ([]*UserCareerGroup, error)

CareerGroupsOrErr returns the CareerGroups value or an error if the edge was not loaded in eager-loading.

func (UserEdges) NotesOrErr

func (e UserEdges) NotesOrErr() ([]*UserNote, error)

NotesOrErr returns the Notes value or an error if the edge was not loaded in eager-loading.

func (UserEdges) QualificationsOrErr

func (e UserEdges) QualificationsOrErr() ([]*UserQualification, error)

QualificationsOrErr returns the Qualifications 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 (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *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 any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, 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) ActivitiesCleared

func (m *UserMutation) ActivitiesCleared() bool

ActivitiesCleared reports if the "activities" edge to the UserActivity entity was cleared.

func (*UserMutation) ActivitiesIDs

func (m *UserMutation) ActivitiesIDs() (ids []int)

ActivitiesIDs returns the "activities" edge IDs in the mutation.

func (*UserMutation) AddActivityIDs

func (m *UserMutation) AddActivityIDs(ids ...int)

AddActivityIDs adds the "activities" edge to the UserActivity entity by ids.

func (*UserMutation) AddBirthdayDay

func (m *UserMutation) AddBirthdayDay(i int)

AddBirthdayDay adds i to the "birthday_day" field.

func (*UserMutation) AddBirthdayMonth

func (m *UserMutation) AddBirthdayMonth(i int)

AddBirthdayMonth adds i to the "birthday_month" field.

func (*UserMutation) AddBirthdayYear

func (m *UserMutation) AddBirthdayYear(i int)

AddBirthdayYear adds i to the "birthday_year" field.

func (*UserMutation) AddCareerGroupIDs

func (m *UserMutation) AddCareerGroupIDs(ids ...int)

AddCareerGroupIDs adds the "careerGroups" edge to the UserCareerGroup entity by ids.

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) AddNoteIDs

func (m *UserMutation) AddNoteIDs(ids ...int)

AddNoteIDs adds the "notes" edge to the UserNote entity by ids.

func (*UserMutation) AddQualificationIDs

func (m *UserMutation) AddQualificationIDs(ids ...int)

AddQualificationIDs adds the "qualifications" edge to the UserQualification entity by ids.

func (*UserMutation) AddedBirthdayDay

func (m *UserMutation) AddedBirthdayDay() (r int, exists bool)

AddedBirthdayDay returns the value that was added to the "birthday_day" field in this mutation.

func (*UserMutation) AddedBirthdayMonth

func (m *UserMutation) AddedBirthdayMonth() (r int, exists bool)

AddedBirthdayMonth returns the value that was added to the "birthday_month" field in this mutation.

func (*UserMutation) AddedBirthdayYear

func (m *UserMutation) AddedBirthdayYear() (r int, exists bool)

AddedBirthdayYear returns the value that was added to the "birthday_year" field in this mutation.

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) AvatarURL

func (m *UserMutation) AvatarURL() (r string, exists bool)

AvatarURL returns the value of the "avatar_url" field in the mutation.

func (*UserMutation) AvatarURLCleared

func (m *UserMutation) AvatarURLCleared() bool

AvatarURLCleared returns if the "avatar_url" field was cleared in this mutation.

func (*UserMutation) BelongTo

func (m *UserMutation) BelongTo() (r string, exists bool)

BelongTo returns the value of the "belong_to" field in the mutation.

func (*UserMutation) BelongToCleared

func (m *UserMutation) BelongToCleared() bool

BelongToCleared returns if the "belong_to" field was cleared in this mutation.

func (*UserMutation) BirthdayDay

func (m *UserMutation) BirthdayDay() (r int, exists bool)

BirthdayDay returns the value of the "birthday_day" field in the mutation.

func (*UserMutation) BirthdayMonth

func (m *UserMutation) BirthdayMonth() (r int, exists bool)

BirthdayMonth returns the value of the "birthday_month" field in the mutation.

func (*UserMutation) BirthdayYear

func (m *UserMutation) BirthdayYear() (r int, exists bool)

BirthdayYear returns the value of the "birthday_year" field in the mutation.

func (*UserMutation) CareerGroupsCleared

func (m *UserMutation) CareerGroupsCleared() bool

CareerGroupsCleared reports if the "careerGroups" edge to the UserCareerGroup entity was cleared.

func (*UserMutation) CareerGroupsIDs

func (m *UserMutation) CareerGroupsIDs() (ids []int)

CareerGroupsIDs returns the "careerGroups" edge IDs in the mutation.

func (*UserMutation) ClearActivities

func (m *UserMutation) ClearActivities()

ClearActivities clears the "activities" edge to the UserActivity entity.

func (*UserMutation) ClearAvatarURL

func (m *UserMutation) ClearAvatarURL()

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserMutation) ClearBelongTo

func (m *UserMutation) ClearBelongTo()

ClearBelongTo clears the value of the "belong_to" field.

func (*UserMutation) ClearCareerGroups

func (m *UserMutation) ClearCareerGroups()

ClearCareerGroups clears the "careerGroups" edge to the UserCareerGroup entity.

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) ClearJob

func (m *UserMutation) ClearJob()

ClearJob clears the value of the "job" field.

func (*UserMutation) ClearNickname

func (m *UserMutation) ClearNickname()

ClearNickname clears the value of the "nickname" field.

func (*UserMutation) ClearNotes

func (m *UserMutation) ClearNotes()

ClearNotes clears the "notes" edge to the UserNote entity.

func (*UserMutation) ClearPr

func (m *UserMutation) ClearPr()

ClearPr clears the value of the "pr" field.

func (*UserMutation) ClearQualifications

func (m *UserMutation) ClearQualifications()

ClearQualifications clears the "qualifications" edge to the UserQualification entity.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreateTime

func (m *UserMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) ID

func (m *UserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserMutation) Job

func (m *UserMutation) Job() (r string, exists bool)

Job returns the value of the "job" field in the mutation.

func (*UserMutation) JobCleared

func (m *UserMutation) JobCleared() bool

JobCleared returns if the "job" field was cleared in this mutation.

func (*UserMutation) Name

func (m *UserMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*UserMutation) Nickname

func (m *UserMutation) Nickname() (r string, exists bool)

Nickname returns the value of the "nickname" field in the mutation.

func (*UserMutation) NicknameCleared

func (m *UserMutation) NicknameCleared() bool

NicknameCleared returns if the "nickname" field was cleared in this mutation.

func (*UserMutation) NotesCleared

func (m *UserMutation) NotesCleared() bool

NotesCleared reports if the "notes" edge to the UserNote entity was cleared.

func (*UserMutation) NotesIDs

func (m *UserMutation) NotesIDs() (ids []int)

NotesIDs returns the "notes" edge IDs in the mutation.

func (*UserMutation) OldAvatarURL

func (m *UserMutation) OldAvatarURL(ctx context.Context) (v *string, err error)

OldAvatarURL returns the old "avatar_url" 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) OldBelongTo

func (m *UserMutation) OldBelongTo(ctx context.Context) (v *string, err error)

OldBelongTo returns the old "belong_to" 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) OldBirthdayDay

func (m *UserMutation) OldBirthdayDay(ctx context.Context) (v int, err error)

OldBirthdayDay returns the old "birthday_day" 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) OldBirthdayMonth

func (m *UserMutation) OldBirthdayMonth(ctx context.Context) (v int, err error)

OldBirthdayMonth returns the old "birthday_month" 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) OldBirthdayYear

func (m *UserMutation) OldBirthdayYear(ctx context.Context) (v int, err error)

OldBirthdayYear returns the old "birthday_year" 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) OldCreateTime

func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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) OldJob

func (m *UserMutation) OldJob(ctx context.Context) (v *string, err error)

OldJob returns the old "job" 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) 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) OldNickname

func (m *UserMutation) OldNickname(ctx context.Context) (v *string, err error)

OldNickname returns the old "nickname" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldPr

func (m *UserMutation) OldPr(ctx context.Context) (v *string, err error)

OldPr returns the old "pr" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUpdateTime

func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) Pr

func (m *UserMutation) Pr() (r string, exists bool)

Pr returns the value of the "pr" field in the mutation.

func (*UserMutation) PrCleared

func (m *UserMutation) PrCleared() bool

PrCleared returns if the "pr" field was cleared in this mutation.

func (*UserMutation) QualificationsCleared

func (m *UserMutation) QualificationsCleared() bool

QualificationsCleared reports if the "qualifications" edge to the UserQualification entity was cleared.

func (*UserMutation) QualificationsIDs

func (m *UserMutation) QualificationsIDs() (ids []int)

QualificationsIDs returns the "qualifications" edge IDs in the mutation.

func (*UserMutation) RemoveActivityIDs

func (m *UserMutation) RemoveActivityIDs(ids ...int)

RemoveActivityIDs removes the "activities" edge to the UserActivity entity by IDs.

func (*UserMutation) RemoveCareerGroupIDs

func (m *UserMutation) RemoveCareerGroupIDs(ids ...int)

RemoveCareerGroupIDs removes the "careerGroups" edge to the UserCareerGroup entity by IDs.

func (*UserMutation) RemoveNoteIDs

func (m *UserMutation) RemoveNoteIDs(ids ...int)

RemoveNoteIDs removes the "notes" edge to the UserNote entity by IDs.

func (*UserMutation) RemoveQualificationIDs

func (m *UserMutation) RemoveQualificationIDs(ids ...int)

RemoveQualificationIDs removes the "qualifications" edge to the UserQualification entity by IDs.

func (*UserMutation) RemovedActivitiesIDs

func (m *UserMutation) RemovedActivitiesIDs() (ids []int)

RemovedActivities returns the removed IDs of the "activities" edge to the UserActivity entity.

func (*UserMutation) RemovedCareerGroupsIDs

func (m *UserMutation) RemovedCareerGroupsIDs() (ids []int)

RemovedCareerGroups returns the removed IDs of the "careerGroups" edge to the UserCareerGroup entity.

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) RemovedNotesIDs

func (m *UserMutation) RemovedNotesIDs() (ids []int)

RemovedNotes returns the removed IDs of the "notes" edge to the UserNote entity.

func (*UserMutation) RemovedQualificationsIDs

func (m *UserMutation) RemovedQualificationsIDs() (ids []int)

RemovedQualifications returns the removed IDs of the "qualifications" edge to the UserQualification entity.

func (*UserMutation) ResetActivities

func (m *UserMutation) ResetActivities()

ResetActivities resets all changes to the "activities" edge.

func (*UserMutation) ResetAvatarURL

func (m *UserMutation) ResetAvatarURL()

ResetAvatarURL resets all changes to the "avatar_url" field.

func (*UserMutation) ResetBelongTo

func (m *UserMutation) ResetBelongTo()

ResetBelongTo resets all changes to the "belong_to" field.

func (*UserMutation) ResetBirthdayDay

func (m *UserMutation) ResetBirthdayDay()

ResetBirthdayDay resets all changes to the "birthday_day" field.

func (*UserMutation) ResetBirthdayMonth

func (m *UserMutation) ResetBirthdayMonth()

ResetBirthdayMonth resets all changes to the "birthday_month" field.

func (*UserMutation) ResetBirthdayYear

func (m *UserMutation) ResetBirthdayYear()

ResetBirthdayYear resets all changes to the "birthday_year" field.

func (*UserMutation) ResetCareerGroups

func (m *UserMutation) ResetCareerGroups()

ResetCareerGroups resets all changes to the "careerGroups" edge.

func (*UserMutation) ResetCreateTime

func (m *UserMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetJob

func (m *UserMutation) ResetJob()

ResetJob resets all changes to the "job" field.

func (*UserMutation) ResetName

func (m *UserMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*UserMutation) ResetNickname

func (m *UserMutation) ResetNickname()

ResetNickname resets all changes to the "nickname" field.

func (*UserMutation) ResetNotes

func (m *UserMutation) ResetNotes()

ResetNotes resets all changes to the "notes" edge.

func (*UserMutation) ResetPr

func (m *UserMutation) ResetPr()

ResetPr resets all changes to the "pr" field.

func (*UserMutation) ResetQualifications

func (m *UserMutation) ResetQualifications()

ResetQualifications resets all changes to the "qualifications" edge.

func (*UserMutation) ResetUpdateTime

func (m *UserMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*UserMutation) SetAvatarURL

func (m *UserMutation) SetAvatarURL(s string)

SetAvatarURL sets the "avatar_url" field.

func (*UserMutation) SetBelongTo

func (m *UserMutation) SetBelongTo(s string)

SetBelongTo sets the "belong_to" field.

func (*UserMutation) SetBirthdayDay

func (m *UserMutation) SetBirthdayDay(i int)

SetBirthdayDay sets the "birthday_day" field.

func (*UserMutation) SetBirthdayMonth

func (m *UserMutation) SetBirthdayMonth(i int)

SetBirthdayMonth sets the "birthday_month" field.

func (*UserMutation) SetBirthdayYear

func (m *UserMutation) SetBirthdayYear(i int)

SetBirthdayYear sets the "birthday_year" field.

func (*UserMutation) SetCreateTime

func (m *UserMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetJob

func (m *UserMutation) SetJob(s string)

SetJob sets the "job" field.

func (*UserMutation) SetName

func (m *UserMutation) SetName(s string)

SetName sets the "name" field.

func (*UserMutation) SetNickname

func (m *UserMutation) SetNickname(s string)

SetNickname sets the "nickname" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetPr

func (m *UserMutation) SetPr(s string)

SetPr sets the "pr" field.

func (*UserMutation) SetUpdateTime

func (m *UserMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) UpdateTime

func (m *UserMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserNote

type UserNote struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Label holds the value of the "label" field.
	Label string `json:"label,omitempty"`
	// Memo holds the value of the "memo" field.
	Memo *string `json:"memo,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserNoteQuery when eager-loading is set.
	Edges UserNoteEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserNote is the model entity for the UserNote schema.

func (*UserNote) QueryNoteItems

func (un *UserNote) QueryNoteItems() *UserNoteItemQuery

QueryNoteItems queries the "noteItems" edge of the UserNote entity.

func (*UserNote) QueryUser

func (un *UserNote) QueryUser() *UserQuery

QueryUser queries the "user" edge of the UserNote entity.

func (*UserNote) String

func (un *UserNote) String() string

String implements the fmt.Stringer.

func (*UserNote) Unwrap

func (un *UserNote) Unwrap() *UserNote

Unwrap unwraps the UserNote 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 (*UserNote) Update

func (un *UserNote) Update() *UserNoteUpdateOne

Update returns a builder for updating this UserNote. Note that you need to call UserNote.Unwrap() before calling this method if this UserNote was returned from a transaction, and the transaction was committed or rolled back.

func (*UserNote) Value

func (un *UserNote) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserNote. This includes values selected through modifiers, order, etc.

type UserNoteClient

type UserNoteClient struct {
	// contains filtered or unexported fields
}

UserNoteClient is a client for the UserNote schema.

func NewUserNoteClient

func NewUserNoteClient(c config) *UserNoteClient

NewUserNoteClient returns a client for the UserNote from the given config.

func (*UserNoteClient) Create

func (c *UserNoteClient) Create() *UserNoteCreate

Create returns a builder for creating a UserNote entity.

func (*UserNoteClient) CreateBulk

func (c *UserNoteClient) CreateBulk(builders ...*UserNoteCreate) *UserNoteCreateBulk

CreateBulk returns a builder for creating a bulk of UserNote entities.

func (*UserNoteClient) Delete

func (c *UserNoteClient) Delete() *UserNoteDelete

Delete returns a delete builder for UserNote.

func (*UserNoteClient) DeleteOne

func (c *UserNoteClient) DeleteOne(un *UserNote) *UserNoteDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserNoteClient) DeleteOneID

func (c *UserNoteClient) DeleteOneID(id int) *UserNoteDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserNoteClient) Get

func (c *UserNoteClient) Get(ctx context.Context, id int) (*UserNote, error)

Get returns a UserNote entity by its id.

func (*UserNoteClient) GetX

func (c *UserNoteClient) GetX(ctx context.Context, id int) *UserNote

GetX is like Get, but panics if an error occurs.

func (*UserNoteClient) Hooks

func (c *UserNoteClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserNoteClient) Intercept

func (c *UserNoteClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usernote.Intercept(f(g(h())))`.

func (*UserNoteClient) Interceptors

func (c *UserNoteClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserNoteClient) Query

func (c *UserNoteClient) Query() *UserNoteQuery

Query returns a query builder for UserNote.

func (*UserNoteClient) QueryNoteItems

func (c *UserNoteClient) QueryNoteItems(un *UserNote) *UserNoteItemQuery

QueryNoteItems queries the noteItems edge of a UserNote.

func (*UserNoteClient) QueryUser

func (c *UserNoteClient) QueryUser(un *UserNote) *UserQuery

QueryUser queries the user edge of a UserNote.

func (*UserNoteClient) Update

func (c *UserNoteClient) Update() *UserNoteUpdate

Update returns an update builder for UserNote.

func (*UserNoteClient) UpdateOne

func (c *UserNoteClient) UpdateOne(un *UserNote) *UserNoteUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserNoteClient) UpdateOneID

func (c *UserNoteClient) UpdateOneID(id int) *UserNoteUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserNoteClient) Use

func (c *UserNoteClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usernote.Hooks(f(g(h())))`.

type UserNoteCreate

type UserNoteCreate struct {
	// contains filtered or unexported fields
}

UserNoteCreate is the builder for creating a UserNote entity.

func (*UserNoteCreate) AddNoteItemIDs

func (unc *UserNoteCreate) AddNoteItemIDs(ids ...int) *UserNoteCreate

AddNoteItemIDs adds the "noteItems" edge to the UserNoteItem entity by IDs.

func (*UserNoteCreate) AddNoteItems

func (unc *UserNoteCreate) AddNoteItems(u ...*UserNoteItem) *UserNoteCreate

AddNoteItems adds the "noteItems" edges to the UserNoteItem entity.

func (*UserNoteCreate) Exec

func (unc *UserNoteCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserNoteCreate) ExecX

func (unc *UserNoteCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteCreate) Mutation

func (unc *UserNoteCreate) Mutation() *UserNoteMutation

Mutation returns the UserNoteMutation object of the builder.

func (*UserNoteCreate) OnConflict

func (unc *UserNoteCreate) OnConflict(opts ...sql.ConflictOption) *UserNoteUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserNote.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserNoteUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserNoteCreate) OnConflictColumns

func (unc *UserNoteCreate) OnConflictColumns(columns ...string) *UserNoteUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserNote.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserNoteCreate) Save

func (unc *UserNoteCreate) Save(ctx context.Context) (*UserNote, error)

Save creates the UserNote in the database.

func (*UserNoteCreate) SaveX

func (unc *UserNoteCreate) SaveX(ctx context.Context) *UserNote

SaveX calls Save and panics if Save returns an error.

func (*UserNoteCreate) SetCreateTime

func (unc *UserNoteCreate) SetCreateTime(t time.Time) *UserNoteCreate

SetCreateTime sets the "create_time" field.

func (*UserNoteCreate) SetLabel

func (unc *UserNoteCreate) SetLabel(s string) *UserNoteCreate

SetLabel sets the "label" field.

func (*UserNoteCreate) SetMemo

func (unc *UserNoteCreate) SetMemo(s string) *UserNoteCreate

SetMemo sets the "memo" field.

func (*UserNoteCreate) SetNillableCreateTime

func (unc *UserNoteCreate) SetNillableCreateTime(t *time.Time) *UserNoteCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*UserNoteCreate) SetNillableMemo

func (unc *UserNoteCreate) SetNillableMemo(s *string) *UserNoteCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*UserNoteCreate) SetNillableUpdateTime

func (unc *UserNoteCreate) SetNillableUpdateTime(t *time.Time) *UserNoteCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*UserNoteCreate) SetUpdateTime

func (unc *UserNoteCreate) SetUpdateTime(t time.Time) *UserNoteCreate

SetUpdateTime sets the "update_time" field.

func (*UserNoteCreate) SetUser

func (unc *UserNoteCreate) SetUser(u *User) *UserNoteCreate

SetUser sets the "user" edge to the User entity.

func (*UserNoteCreate) SetUserID

func (unc *UserNoteCreate) SetUserID(id int) *UserNoteCreate

SetUserID sets the "user" edge to the User entity by ID.

type UserNoteCreateBulk

type UserNoteCreateBulk struct {
	// contains filtered or unexported fields
}

UserNoteCreateBulk is the builder for creating many UserNote entities in bulk.

func (*UserNoteCreateBulk) Exec

func (uncb *UserNoteCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserNoteCreateBulk) ExecX

func (uncb *UserNoteCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteCreateBulk) OnConflict

func (uncb *UserNoteCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserNoteUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserNote.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserNoteUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserNoteCreateBulk) OnConflictColumns

func (uncb *UserNoteCreateBulk) OnConflictColumns(columns ...string) *UserNoteUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserNote.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserNoteCreateBulk) Save

func (uncb *UserNoteCreateBulk) Save(ctx context.Context) ([]*UserNote, error)

Save creates the UserNote entities in the database.

func (*UserNoteCreateBulk) SaveX

func (uncb *UserNoteCreateBulk) SaveX(ctx context.Context) []*UserNote

SaveX is like Save, but panics if an error occurs.

type UserNoteDelete

type UserNoteDelete struct {
	// contains filtered or unexported fields
}

UserNoteDelete is the builder for deleting a UserNote entity.

func (*UserNoteDelete) Exec

func (und *UserNoteDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserNoteDelete) ExecX

func (und *UserNoteDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteDelete) Where

func (und *UserNoteDelete) Where(ps ...predicate.UserNote) *UserNoteDelete

Where appends a list predicates to the UserNoteDelete builder.

type UserNoteDeleteOne

type UserNoteDeleteOne struct {
	// contains filtered or unexported fields
}

UserNoteDeleteOne is the builder for deleting a single UserNote entity.

func (*UserNoteDeleteOne) Exec

func (undo *UserNoteDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserNoteDeleteOne) ExecX

func (undo *UserNoteDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteDeleteOne) Where

Where appends a list predicates to the UserNoteDelete builder.

type UserNoteEdges

type UserNoteEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// NoteItems holds the value of the noteItems edge.
	NoteItems []*UserNoteItem `json:"noteItems,omitempty"`
	// contains filtered or unexported fields
}

UserNoteEdges holds the relations/edges for other nodes in the graph.

func (UserNoteEdges) NoteItemsOrErr

func (e UserNoteEdges) NoteItemsOrErr() ([]*UserNoteItem, error)

NoteItemsOrErr returns the NoteItems value or an error if the edge was not loaded in eager-loading.

func (UserNoteEdges) UserOrErr

func (e UserNoteEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserNoteGroupBy

type UserNoteGroupBy struct {
	// contains filtered or unexported fields
}

UserNoteGroupBy is the group-by builder for UserNote entities.

func (*UserNoteGroupBy) Aggregate

func (ungb *UserNoteGroupBy) Aggregate(fns ...AggregateFunc) *UserNoteGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserNoteGroupBy) Bool

func (s *UserNoteGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserNoteGroupBy) BoolX

func (s *UserNoteGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserNoteGroupBy) Bools

func (s *UserNoteGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserNoteGroupBy) BoolsX

func (s *UserNoteGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserNoteGroupBy) Float64

func (s *UserNoteGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserNoteGroupBy) Float64X

func (s *UserNoteGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserNoteGroupBy) Float64s

func (s *UserNoteGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserNoteGroupBy) Float64sX

func (s *UserNoteGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserNoteGroupBy) Int

func (s *UserNoteGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserNoteGroupBy) IntX

func (s *UserNoteGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserNoteGroupBy) Ints

func (s *UserNoteGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserNoteGroupBy) IntsX

func (s *UserNoteGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserNoteGroupBy) Scan

func (ungb *UserNoteGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserNoteGroupBy) ScanX

func (s *UserNoteGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserNoteGroupBy) String

func (s *UserNoteGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserNoteGroupBy) StringX

func (s *UserNoteGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserNoteGroupBy) Strings

func (s *UserNoteGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserNoteGroupBy) StringsX

func (s *UserNoteGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserNoteItem

type UserNoteItem struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Text holds the value of the "text" field.
	Text string `json:"text,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserNoteItemQuery when eager-loading is set.
	Edges UserNoteItemEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserNoteItem is the model entity for the UserNoteItem schema.

func (*UserNoteItem) QueryNote

func (uni *UserNoteItem) QueryNote() *UserNoteQuery

QueryNote queries the "note" edge of the UserNoteItem entity.

func (*UserNoteItem) String

func (uni *UserNoteItem) String() string

String implements the fmt.Stringer.

func (*UserNoteItem) Unwrap

func (uni *UserNoteItem) Unwrap() *UserNoteItem

Unwrap unwraps the UserNoteItem 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 (*UserNoteItem) Update

func (uni *UserNoteItem) Update() *UserNoteItemUpdateOne

Update returns a builder for updating this UserNoteItem. Note that you need to call UserNoteItem.Unwrap() before calling this method if this UserNoteItem was returned from a transaction, and the transaction was committed or rolled back.

func (*UserNoteItem) Value

func (uni *UserNoteItem) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserNoteItem. This includes values selected through modifiers, order, etc.

type UserNoteItemClient

type UserNoteItemClient struct {
	// contains filtered or unexported fields
}

UserNoteItemClient is a client for the UserNoteItem schema.

func NewUserNoteItemClient

func NewUserNoteItemClient(c config) *UserNoteItemClient

NewUserNoteItemClient returns a client for the UserNoteItem from the given config.

func (*UserNoteItemClient) Create

Create returns a builder for creating a UserNoteItem entity.

func (*UserNoteItemClient) CreateBulk

func (c *UserNoteItemClient) CreateBulk(builders ...*UserNoteItemCreate) *UserNoteItemCreateBulk

CreateBulk returns a builder for creating a bulk of UserNoteItem entities.

func (*UserNoteItemClient) Delete

Delete returns a delete builder for UserNoteItem.

func (*UserNoteItemClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserNoteItemClient) DeleteOneID

func (c *UserNoteItemClient) DeleteOneID(id int) *UserNoteItemDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserNoteItemClient) Get

Get returns a UserNoteItem entity by its id.

func (*UserNoteItemClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UserNoteItemClient) Hooks

func (c *UserNoteItemClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserNoteItemClient) Intercept

func (c *UserNoteItemClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usernoteitem.Intercept(f(g(h())))`.

func (*UserNoteItemClient) Interceptors

func (c *UserNoteItemClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserNoteItemClient) Query

Query returns a query builder for UserNoteItem.

func (*UserNoteItemClient) QueryNote

func (c *UserNoteItemClient) QueryNote(uni *UserNoteItem) *UserNoteQuery

QueryNote queries the note edge of a UserNoteItem.

func (*UserNoteItemClient) Update

Update returns an update builder for UserNoteItem.

func (*UserNoteItemClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserNoteItemClient) UpdateOneID

func (c *UserNoteItemClient) UpdateOneID(id int) *UserNoteItemUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserNoteItemClient) Use

func (c *UserNoteItemClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usernoteitem.Hooks(f(g(h())))`.

type UserNoteItemCreate

type UserNoteItemCreate struct {
	// contains filtered or unexported fields
}

UserNoteItemCreate is the builder for creating a UserNoteItem entity.

func (*UserNoteItemCreate) Exec

func (unic *UserNoteItemCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserNoteItemCreate) ExecX

func (unic *UserNoteItemCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteItemCreate) Mutation

func (unic *UserNoteItemCreate) Mutation() *UserNoteItemMutation

Mutation returns the UserNoteItemMutation object of the builder.

func (*UserNoteItemCreate) OnConflict

func (unic *UserNoteItemCreate) OnConflict(opts ...sql.ConflictOption) *UserNoteItemUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserNoteItem.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserNoteItemUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserNoteItemCreate) OnConflictColumns

func (unic *UserNoteItemCreate) OnConflictColumns(columns ...string) *UserNoteItemUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserNoteItem.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserNoteItemCreate) Save

func (unic *UserNoteItemCreate) Save(ctx context.Context) (*UserNoteItem, error)

Save creates the UserNoteItem in the database.

func (*UserNoteItemCreate) SaveX

func (unic *UserNoteItemCreate) SaveX(ctx context.Context) *UserNoteItem

SaveX calls Save and panics if Save returns an error.

func (*UserNoteItemCreate) SetCreateTime

func (unic *UserNoteItemCreate) SetCreateTime(t time.Time) *UserNoteItemCreate

SetCreateTime sets the "create_time" field.

func (*UserNoteItemCreate) SetNillableCreateTime

func (unic *UserNoteItemCreate) SetNillableCreateTime(t *time.Time) *UserNoteItemCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*UserNoteItemCreate) SetNillableUpdateTime

func (unic *UserNoteItemCreate) SetNillableUpdateTime(t *time.Time) *UserNoteItemCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*UserNoteItemCreate) SetNote

func (unic *UserNoteItemCreate) SetNote(u *UserNote) *UserNoteItemCreate

SetNote sets the "note" edge to the UserNote entity.

func (*UserNoteItemCreate) SetNoteID

func (unic *UserNoteItemCreate) SetNoteID(id int) *UserNoteItemCreate

SetNoteID sets the "note" edge to the UserNote entity by ID.

func (*UserNoteItemCreate) SetText

func (unic *UserNoteItemCreate) SetText(s string) *UserNoteItemCreate

SetText sets the "text" field.

func (*UserNoteItemCreate) SetUpdateTime

func (unic *UserNoteItemCreate) SetUpdateTime(t time.Time) *UserNoteItemCreate

SetUpdateTime sets the "update_time" field.

type UserNoteItemCreateBulk

type UserNoteItemCreateBulk struct {
	// contains filtered or unexported fields
}

UserNoteItemCreateBulk is the builder for creating many UserNoteItem entities in bulk.

func (*UserNoteItemCreateBulk) Exec

func (unicb *UserNoteItemCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserNoteItemCreateBulk) ExecX

func (unicb *UserNoteItemCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteItemCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserNoteItem.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserNoteItemUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserNoteItemCreateBulk) OnConflictColumns

func (unicb *UserNoteItemCreateBulk) OnConflictColumns(columns ...string) *UserNoteItemUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserNoteItem.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserNoteItemCreateBulk) Save

func (unicb *UserNoteItemCreateBulk) Save(ctx context.Context) ([]*UserNoteItem, error)

Save creates the UserNoteItem entities in the database.

func (*UserNoteItemCreateBulk) SaveX

func (unicb *UserNoteItemCreateBulk) SaveX(ctx context.Context) []*UserNoteItem

SaveX is like Save, but panics if an error occurs.

type UserNoteItemDelete

type UserNoteItemDelete struct {
	// contains filtered or unexported fields
}

UserNoteItemDelete is the builder for deleting a UserNoteItem entity.

func (*UserNoteItemDelete) Exec

func (unid *UserNoteItemDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserNoteItemDelete) ExecX

func (unid *UserNoteItemDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteItemDelete) Where

Where appends a list predicates to the UserNoteItemDelete builder.

type UserNoteItemDeleteOne

type UserNoteItemDeleteOne struct {
	// contains filtered or unexported fields
}

UserNoteItemDeleteOne is the builder for deleting a single UserNoteItem entity.

func (*UserNoteItemDeleteOne) Exec

func (unido *UserNoteItemDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserNoteItemDeleteOne) ExecX

func (unido *UserNoteItemDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteItemDeleteOne) Where

Where appends a list predicates to the UserNoteItemDelete builder.

type UserNoteItemEdges

type UserNoteItemEdges struct {
	// Note holds the value of the note edge.
	Note *UserNote `json:"note,omitempty"`
	// contains filtered or unexported fields
}

UserNoteItemEdges holds the relations/edges for other nodes in the graph.

func (UserNoteItemEdges) NoteOrErr

func (e UserNoteItemEdges) NoteOrErr() (*UserNote, error)

NoteOrErr returns the Note value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserNoteItemGroupBy

type UserNoteItemGroupBy struct {
	// contains filtered or unexported fields
}

UserNoteItemGroupBy is the group-by builder for UserNoteItem entities.

func (*UserNoteItemGroupBy) Aggregate

func (unigb *UserNoteItemGroupBy) Aggregate(fns ...AggregateFunc) *UserNoteItemGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserNoteItemGroupBy) Bool

func (s *UserNoteItemGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserNoteItemGroupBy) BoolX

func (s *UserNoteItemGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserNoteItemGroupBy) Bools

func (s *UserNoteItemGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserNoteItemGroupBy) BoolsX

func (s *UserNoteItemGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserNoteItemGroupBy) Float64

func (s *UserNoteItemGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserNoteItemGroupBy) Float64X

func (s *UserNoteItemGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserNoteItemGroupBy) Float64s

func (s *UserNoteItemGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserNoteItemGroupBy) Float64sX

func (s *UserNoteItemGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserNoteItemGroupBy) Int

func (s *UserNoteItemGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserNoteItemGroupBy) IntX

func (s *UserNoteItemGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserNoteItemGroupBy) Ints

func (s *UserNoteItemGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserNoteItemGroupBy) IntsX

func (s *UserNoteItemGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserNoteItemGroupBy) Scan

func (unigb *UserNoteItemGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserNoteItemGroupBy) ScanX

func (s *UserNoteItemGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserNoteItemGroupBy) String

func (s *UserNoteItemGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserNoteItemGroupBy) StringX

func (s *UserNoteItemGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserNoteItemGroupBy) Strings

func (s *UserNoteItemGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserNoteItemGroupBy) StringsX

func (s *UserNoteItemGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserNoteItemMutation

type UserNoteItemMutation struct {
	// contains filtered or unexported fields
}

UserNoteItemMutation represents an operation that mutates the UserNoteItem nodes in the graph.

func (*UserNoteItemMutation) AddField

func (m *UserNoteItemMutation) 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 (*UserNoteItemMutation) AddedEdges

func (m *UserNoteItemMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserNoteItemMutation) AddedField

func (m *UserNoteItemMutation) 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 (*UserNoteItemMutation) AddedFields

func (m *UserNoteItemMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserNoteItemMutation) AddedIDs

func (m *UserNoteItemMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserNoteItemMutation) ClearEdge

func (m *UserNoteItemMutation) 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 (*UserNoteItemMutation) ClearField

func (m *UserNoteItemMutation) 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 (*UserNoteItemMutation) ClearNote

func (m *UserNoteItemMutation) ClearNote()

ClearNote clears the "note" edge to the UserNote entity.

func (*UserNoteItemMutation) ClearedEdges

func (m *UserNoteItemMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserNoteItemMutation) ClearedFields

func (m *UserNoteItemMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserNoteItemMutation) Client

func (m UserNoteItemMutation) 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 (*UserNoteItemMutation) CreateTime

func (m *UserNoteItemMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*UserNoteItemMutation) EdgeCleared

func (m *UserNoteItemMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserNoteItemMutation) Field

func (m *UserNoteItemMutation) 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 (*UserNoteItemMutation) FieldCleared

func (m *UserNoteItemMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserNoteItemMutation) Fields

func (m *UserNoteItemMutation) 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 (*UserNoteItemMutation) ID

func (m *UserNoteItemMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserNoteItemMutation) IDs

func (m *UserNoteItemMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserNoteItemMutation) NoteCleared

func (m *UserNoteItemMutation) NoteCleared() bool

NoteCleared reports if the "note" edge to the UserNote entity was cleared.

func (*UserNoteItemMutation) NoteID

func (m *UserNoteItemMutation) NoteID() (id int, exists bool)

NoteID returns the "note" edge ID in the mutation.

func (*UserNoteItemMutation) NoteIDs

func (m *UserNoteItemMutation) NoteIDs() (ids []int)

NoteIDs returns the "note" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NoteID instead. It exists only for internal usage by the builders.

func (*UserNoteItemMutation) OldCreateTime

func (m *UserNoteItemMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the UserNoteItem entity. If the UserNoteItem 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 (*UserNoteItemMutation) OldField

func (m *UserNoteItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*UserNoteItemMutation) OldText

func (m *UserNoteItemMutation) OldText(ctx context.Context) (v string, err error)

OldText returns the old "text" field's value of the UserNoteItem entity. If the UserNoteItem 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 (*UserNoteItemMutation) OldUpdateTime

func (m *UserNoteItemMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the UserNoteItem entity. If the UserNoteItem 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 (*UserNoteItemMutation) Op

func (m *UserNoteItemMutation) Op() Op

Op returns the operation name.

func (*UserNoteItemMutation) RemovedEdges

func (m *UserNoteItemMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserNoteItemMutation) RemovedIDs

func (m *UserNoteItemMutation) 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 (*UserNoteItemMutation) ResetCreateTime

func (m *UserNoteItemMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*UserNoteItemMutation) ResetEdge

func (m *UserNoteItemMutation) 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 (*UserNoteItemMutation) ResetField

func (m *UserNoteItemMutation) 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 (*UserNoteItemMutation) ResetNote

func (m *UserNoteItemMutation) ResetNote()

ResetNote resets all changes to the "note" edge.

func (*UserNoteItemMutation) ResetText

func (m *UserNoteItemMutation) ResetText()

ResetText resets all changes to the "text" field.

func (*UserNoteItemMutation) ResetUpdateTime

func (m *UserNoteItemMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*UserNoteItemMutation) SetCreateTime

func (m *UserNoteItemMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*UserNoteItemMutation) SetField

func (m *UserNoteItemMutation) 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 (*UserNoteItemMutation) SetNoteID

func (m *UserNoteItemMutation) SetNoteID(id int)

SetNoteID sets the "note" edge to the UserNote entity by id.

func (*UserNoteItemMutation) SetOp

func (m *UserNoteItemMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserNoteItemMutation) SetText

func (m *UserNoteItemMutation) SetText(s string)

SetText sets the "text" field.

func (*UserNoteItemMutation) SetUpdateTime

func (m *UserNoteItemMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*UserNoteItemMutation) Text

func (m *UserNoteItemMutation) Text() (r string, exists bool)

Text returns the value of the "text" field in the mutation.

func (UserNoteItemMutation) Tx

func (m UserNoteItemMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserNoteItemMutation) Type

func (m *UserNoteItemMutation) Type() string

Type returns the node type of this mutation (UserNoteItem).

func (*UserNoteItemMutation) UpdateTime

func (m *UserNoteItemMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*UserNoteItemMutation) Where

Where appends a list predicates to the UserNoteItemMutation builder.

func (*UserNoteItemMutation) WhereP

func (m *UserNoteItemMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserNoteItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserNoteItemQuery

type UserNoteItemQuery struct {
	// contains filtered or unexported fields
}

UserNoteItemQuery is the builder for querying UserNoteItem entities.

func (*UserNoteItemQuery) Aggregate

func (uniq *UserNoteItemQuery) Aggregate(fns ...AggregateFunc) *UserNoteItemSelect

Aggregate returns a UserNoteItemSelect configured with the given aggregations.

func (*UserNoteItemQuery) All

func (uniq *UserNoteItemQuery) All(ctx context.Context) ([]*UserNoteItem, error)

All executes the query and returns a list of UserNoteItems.

func (*UserNoteItemQuery) AllX

func (uniq *UserNoteItemQuery) AllX(ctx context.Context) []*UserNoteItem

AllX is like All, but panics if an error occurs.

func (*UserNoteItemQuery) Clone

func (uniq *UserNoteItemQuery) Clone() *UserNoteItemQuery

Clone returns a duplicate of the UserNoteItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserNoteItemQuery) Count

func (uniq *UserNoteItemQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserNoteItemQuery) CountX

func (uniq *UserNoteItemQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserNoteItemQuery) Exist

func (uniq *UserNoteItemQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserNoteItemQuery) ExistX

func (uniq *UserNoteItemQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserNoteItemQuery) First

func (uniq *UserNoteItemQuery) First(ctx context.Context) (*UserNoteItem, error)

First returns the first UserNoteItem entity from the query. Returns a *NotFoundError when no UserNoteItem was found.

func (*UserNoteItemQuery) FirstID

func (uniq *UserNoteItemQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserNoteItem ID from the query. Returns a *NotFoundError when no UserNoteItem ID was found.

func (*UserNoteItemQuery) FirstIDX

func (uniq *UserNoteItemQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserNoteItemQuery) FirstX

func (uniq *UserNoteItemQuery) FirstX(ctx context.Context) *UserNoteItem

FirstX is like First, but panics if an error occurs.

func (*UserNoteItemQuery) GroupBy

func (uniq *UserNoteItemQuery) GroupBy(field string, fields ...string) *UserNoteItemGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserNoteItem.Query().
	GroupBy(usernoteitem.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserNoteItemQuery) IDs

func (uniq *UserNoteItemQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserNoteItem IDs.

func (*UserNoteItemQuery) IDsX

func (uniq *UserNoteItemQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserNoteItemQuery) Limit

func (uniq *UserNoteItemQuery) Limit(limit int) *UserNoteItemQuery

Limit the number of records to be returned by this query.

func (*UserNoteItemQuery) Offset

func (uniq *UserNoteItemQuery) Offset(offset int) *UserNoteItemQuery

Offset to start from.

func (*UserNoteItemQuery) Only

func (uniq *UserNoteItemQuery) Only(ctx context.Context) (*UserNoteItem, error)

Only returns a single UserNoteItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserNoteItem entity is found. Returns a *NotFoundError when no UserNoteItem entities are found.

func (*UserNoteItemQuery) OnlyID

func (uniq *UserNoteItemQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserNoteItem ID in the query. Returns a *NotSingularError when more than one UserNoteItem ID is found. Returns a *NotFoundError when no entities are found.

func (*UserNoteItemQuery) OnlyIDX

func (uniq *UserNoteItemQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserNoteItemQuery) OnlyX

func (uniq *UserNoteItemQuery) OnlyX(ctx context.Context) *UserNoteItem

OnlyX is like Only, but panics if an error occurs.

func (*UserNoteItemQuery) Order

Order specifies how the records should be ordered.

func (*UserNoteItemQuery) QueryNote

func (uniq *UserNoteItemQuery) QueryNote() *UserNoteQuery

QueryNote chains the current query on the "note" edge.

func (*UserNoteItemQuery) Select

func (uniq *UserNoteItemQuery) Select(fields ...string) *UserNoteItemSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.UserNoteItem.Query().
	Select(usernoteitem.FieldCreateTime).
	Scan(ctx, &v)

func (*UserNoteItemQuery) Unique

func (uniq *UserNoteItemQuery) Unique(unique bool) *UserNoteItemQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserNoteItemQuery) Where

Where adds a new predicate for the UserNoteItemQuery builder.

func (*UserNoteItemQuery) WithNote

func (uniq *UserNoteItemQuery) WithNote(opts ...func(*UserNoteQuery)) *UserNoteItemQuery

WithNote tells the query-builder to eager-load the nodes that are connected to the "note" edge. The optional arguments are used to configure the query builder of the edge.

type UserNoteItemSelect

type UserNoteItemSelect struct {
	*UserNoteItemQuery
	// contains filtered or unexported fields
}

UserNoteItemSelect is the builder for selecting fields of UserNoteItem entities.

func (*UserNoteItemSelect) Aggregate

func (unis *UserNoteItemSelect) Aggregate(fns ...AggregateFunc) *UserNoteItemSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserNoteItemSelect) Bool

func (s *UserNoteItemSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserNoteItemSelect) BoolX

func (s *UserNoteItemSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserNoteItemSelect) Bools

func (s *UserNoteItemSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserNoteItemSelect) BoolsX

func (s *UserNoteItemSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserNoteItemSelect) Float64

func (s *UserNoteItemSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserNoteItemSelect) Float64X

func (s *UserNoteItemSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserNoteItemSelect) Float64s

func (s *UserNoteItemSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserNoteItemSelect) Float64sX

func (s *UserNoteItemSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserNoteItemSelect) Int

func (s *UserNoteItemSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserNoteItemSelect) IntX

func (s *UserNoteItemSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserNoteItemSelect) Ints

func (s *UserNoteItemSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserNoteItemSelect) IntsX

func (s *UserNoteItemSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserNoteItemSelect) Scan

func (unis *UserNoteItemSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserNoteItemSelect) ScanX

func (s *UserNoteItemSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserNoteItemSelect) String

func (s *UserNoteItemSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserNoteItemSelect) StringX

func (s *UserNoteItemSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserNoteItemSelect) Strings

func (s *UserNoteItemSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserNoteItemSelect) StringsX

func (s *UserNoteItemSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserNoteItemUpdate

type UserNoteItemUpdate struct {
	// contains filtered or unexported fields
}

UserNoteItemUpdate is the builder for updating UserNoteItem entities.

func (*UserNoteItemUpdate) ClearNote

func (uniu *UserNoteItemUpdate) ClearNote() *UserNoteItemUpdate

ClearNote clears the "note" edge to the UserNote entity.

func (*UserNoteItemUpdate) Exec

func (uniu *UserNoteItemUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserNoteItemUpdate) ExecX

func (uniu *UserNoteItemUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteItemUpdate) Mutation

func (uniu *UserNoteItemUpdate) Mutation() *UserNoteItemMutation

Mutation returns the UserNoteItemMutation object of the builder.

func (*UserNoteItemUpdate) Save

func (uniu *UserNoteItemUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserNoteItemUpdate) SaveX

func (uniu *UserNoteItemUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserNoteItemUpdate) SetNote

func (uniu *UserNoteItemUpdate) SetNote(u *UserNote) *UserNoteItemUpdate

SetNote sets the "note" edge to the UserNote entity.

func (*UserNoteItemUpdate) SetNoteID

func (uniu *UserNoteItemUpdate) SetNoteID(id int) *UserNoteItemUpdate

SetNoteID sets the "note" edge to the UserNote entity by ID.

func (*UserNoteItemUpdate) SetText

func (uniu *UserNoteItemUpdate) SetText(s string) *UserNoteItemUpdate

SetText sets the "text" field.

func (*UserNoteItemUpdate) SetUpdateTime

func (uniu *UserNoteItemUpdate) SetUpdateTime(t time.Time) *UserNoteItemUpdate

SetUpdateTime sets the "update_time" field.

func (*UserNoteItemUpdate) Where

Where appends a list predicates to the UserNoteItemUpdate builder.

type UserNoteItemUpdateOne

type UserNoteItemUpdateOne struct {
	// contains filtered or unexported fields
}

UserNoteItemUpdateOne is the builder for updating a single UserNoteItem entity.

func (*UserNoteItemUpdateOne) ClearNote

func (uniuo *UserNoteItemUpdateOne) ClearNote() *UserNoteItemUpdateOne

ClearNote clears the "note" edge to the UserNote entity.

func (*UserNoteItemUpdateOne) Exec

func (uniuo *UserNoteItemUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserNoteItemUpdateOne) ExecX

func (uniuo *UserNoteItemUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteItemUpdateOne) Mutation

func (uniuo *UserNoteItemUpdateOne) Mutation() *UserNoteItemMutation

Mutation returns the UserNoteItemMutation object of the builder.

func (*UserNoteItemUpdateOne) Save

Save executes the query and returns the updated UserNoteItem entity.

func (*UserNoteItemUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserNoteItemUpdateOne) Select

func (uniuo *UserNoteItemUpdateOne) Select(field string, fields ...string) *UserNoteItemUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserNoteItemUpdateOne) SetNote

SetNote sets the "note" edge to the UserNote entity.

func (*UserNoteItemUpdateOne) SetNoteID

func (uniuo *UserNoteItemUpdateOne) SetNoteID(id int) *UserNoteItemUpdateOne

SetNoteID sets the "note" edge to the UserNote entity by ID.

func (*UserNoteItemUpdateOne) SetText

SetText sets the "text" field.

func (*UserNoteItemUpdateOne) SetUpdateTime

func (uniuo *UserNoteItemUpdateOne) SetUpdateTime(t time.Time) *UserNoteItemUpdateOne

SetUpdateTime sets the "update_time" field.

func (*UserNoteItemUpdateOne) Where

Where appends a list predicates to the UserNoteItemUpdate builder.

type UserNoteItemUpsert

type UserNoteItemUpsert struct {
	*sql.UpdateSet
}

UserNoteItemUpsert is the "OnConflict" setter.

func (*UserNoteItemUpsert) SetText

SetText sets the "text" field.

func (*UserNoteItemUpsert) SetUpdateTime

func (u *UserNoteItemUpsert) SetUpdateTime(v time.Time) *UserNoteItemUpsert

SetUpdateTime sets the "update_time" field.

func (*UserNoteItemUpsert) UpdateText

func (u *UserNoteItemUpsert) UpdateText() *UserNoteItemUpsert

UpdateText sets the "text" field to the value that was provided on create.

func (*UserNoteItemUpsert) UpdateUpdateTime

func (u *UserNoteItemUpsert) UpdateUpdateTime() *UserNoteItemUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserNoteItemUpsertBulk

type UserNoteItemUpsertBulk struct {
	// contains filtered or unexported fields
}

UserNoteItemUpsertBulk is the builder for "upsert"-ing a bulk of UserNoteItem nodes.

func (*UserNoteItemUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserNoteItemUpsertBulk) Exec

Exec executes the query.

func (*UserNoteItemUpsertBulk) ExecX

func (u *UserNoteItemUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteItemUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserNoteItem.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserNoteItemUpsertBulk) SetText

SetText sets the "text" field.

func (*UserNoteItemUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserNoteItemUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserNoteItemCreateBulk.OnConflict documentation for more info.

func (*UserNoteItemUpsertBulk) UpdateNewValues

func (u *UserNoteItemUpsertBulk) UpdateNewValues() *UserNoteItemUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserNoteItem.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserNoteItemUpsertBulk) UpdateText

UpdateText sets the "text" field to the value that was provided on create.

func (*UserNoteItemUpsertBulk) UpdateUpdateTime

func (u *UserNoteItemUpsertBulk) UpdateUpdateTime() *UserNoteItemUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserNoteItemUpsertOne

type UserNoteItemUpsertOne struct {
	// contains filtered or unexported fields
}

UserNoteItemUpsertOne is the builder for "upsert"-ing

one UserNoteItem node.

func (*UserNoteItemUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserNoteItemUpsertOne) Exec

Exec executes the query.

func (*UserNoteItemUpsertOne) ExecX

func (u *UserNoteItemUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteItemUpsertOne) ID

func (u *UserNoteItemUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserNoteItemUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UserNoteItemUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserNoteItem.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserNoteItemUpsertOne) SetText

SetText sets the "text" field.

func (*UserNoteItemUpsertOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserNoteItemUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserNoteItemCreate.OnConflict documentation for more info.

func (*UserNoteItemUpsertOne) UpdateNewValues

func (u *UserNoteItemUpsertOne) UpdateNewValues() *UserNoteItemUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserNoteItem.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserNoteItemUpsertOne) UpdateText

UpdateText sets the "text" field to the value that was provided on create.

func (*UserNoteItemUpsertOne) UpdateUpdateTime

func (u *UserNoteItemUpsertOne) UpdateUpdateTime() *UserNoteItemUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserNoteItems

type UserNoteItems []*UserNoteItem

UserNoteItems is a parsable slice of UserNoteItem.

type UserNoteMutation

type UserNoteMutation struct {
	// contains filtered or unexported fields
}

UserNoteMutation represents an operation that mutates the UserNote nodes in the graph.

func (*UserNoteMutation) AddField

func (m *UserNoteMutation) 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 (*UserNoteMutation) AddNoteItemIDs

func (m *UserNoteMutation) AddNoteItemIDs(ids ...int)

AddNoteItemIDs adds the "noteItems" edge to the UserNoteItem entity by ids.

func (*UserNoteMutation) AddedEdges

func (m *UserNoteMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserNoteMutation) AddedField

func (m *UserNoteMutation) 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 (*UserNoteMutation) AddedFields

func (m *UserNoteMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserNoteMutation) AddedIDs

func (m *UserNoteMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserNoteMutation) ClearEdge

func (m *UserNoteMutation) 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 (*UserNoteMutation) ClearField

func (m *UserNoteMutation) 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 (*UserNoteMutation) ClearMemo

func (m *UserNoteMutation) ClearMemo()

ClearMemo clears the value of the "memo" field.

func (*UserNoteMutation) ClearNoteItems

func (m *UserNoteMutation) ClearNoteItems()

ClearNoteItems clears the "noteItems" edge to the UserNoteItem entity.

func (*UserNoteMutation) ClearUser

func (m *UserNoteMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*UserNoteMutation) ClearedEdges

func (m *UserNoteMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserNoteMutation) ClearedFields

func (m *UserNoteMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserNoteMutation) Client

func (m UserNoteMutation) 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 (*UserNoteMutation) CreateTime

func (m *UserNoteMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*UserNoteMutation) EdgeCleared

func (m *UserNoteMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserNoteMutation) Field

func (m *UserNoteMutation) 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 (*UserNoteMutation) FieldCleared

func (m *UserNoteMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserNoteMutation) Fields

func (m *UserNoteMutation) 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 (*UserNoteMutation) ID

func (m *UserNoteMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserNoteMutation) IDs

func (m *UserNoteMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserNoteMutation) Label

func (m *UserNoteMutation) Label() (r string, exists bool)

Label returns the value of the "label" field in the mutation.

func (*UserNoteMutation) Memo

func (m *UserNoteMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*UserNoteMutation) MemoCleared

func (m *UserNoteMutation) MemoCleared() bool

MemoCleared returns if the "memo" field was cleared in this mutation.

func (*UserNoteMutation) NoteItemsCleared

func (m *UserNoteMutation) NoteItemsCleared() bool

NoteItemsCleared reports if the "noteItems" edge to the UserNoteItem entity was cleared.

func (*UserNoteMutation) NoteItemsIDs

func (m *UserNoteMutation) NoteItemsIDs() (ids []int)

NoteItemsIDs returns the "noteItems" edge IDs in the mutation.

func (*UserNoteMutation) OldCreateTime

func (m *UserNoteMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the UserNote entity. If the UserNote 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 (*UserNoteMutation) OldField

func (m *UserNoteMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*UserNoteMutation) OldLabel

func (m *UserNoteMutation) OldLabel(ctx context.Context) (v string, err error)

OldLabel returns the old "label" field's value of the UserNote entity. If the UserNote 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 (*UserNoteMutation) OldMemo

func (m *UserNoteMutation) OldMemo(ctx context.Context) (v *string, err error)

OldMemo returns the old "memo" field's value of the UserNote entity. If the UserNote 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 (*UserNoteMutation) OldUpdateTime

func (m *UserNoteMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the UserNote entity. If the UserNote 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 (*UserNoteMutation) Op

func (m *UserNoteMutation) Op() Op

Op returns the operation name.

func (*UserNoteMutation) RemoveNoteItemIDs

func (m *UserNoteMutation) RemoveNoteItemIDs(ids ...int)

RemoveNoteItemIDs removes the "noteItems" edge to the UserNoteItem entity by IDs.

func (*UserNoteMutation) RemovedEdges

func (m *UserNoteMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserNoteMutation) RemovedIDs

func (m *UserNoteMutation) 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 (*UserNoteMutation) RemovedNoteItemsIDs

func (m *UserNoteMutation) RemovedNoteItemsIDs() (ids []int)

RemovedNoteItems returns the removed IDs of the "noteItems" edge to the UserNoteItem entity.

func (*UserNoteMutation) ResetCreateTime

func (m *UserNoteMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*UserNoteMutation) ResetEdge

func (m *UserNoteMutation) 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 (*UserNoteMutation) ResetField

func (m *UserNoteMutation) 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 (*UserNoteMutation) ResetLabel

func (m *UserNoteMutation) ResetLabel()

ResetLabel resets all changes to the "label" field.

func (*UserNoteMutation) ResetMemo

func (m *UserNoteMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*UserNoteMutation) ResetNoteItems

func (m *UserNoteMutation) ResetNoteItems()

ResetNoteItems resets all changes to the "noteItems" edge.

func (*UserNoteMutation) ResetUpdateTime

func (m *UserNoteMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*UserNoteMutation) ResetUser

func (m *UserNoteMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*UserNoteMutation) SetCreateTime

func (m *UserNoteMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*UserNoteMutation) SetField

func (m *UserNoteMutation) 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 (*UserNoteMutation) SetLabel

func (m *UserNoteMutation) SetLabel(s string)

SetLabel sets the "label" field.

func (*UserNoteMutation) SetMemo

func (m *UserNoteMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*UserNoteMutation) SetOp

func (m *UserNoteMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserNoteMutation) SetUpdateTime

func (m *UserNoteMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*UserNoteMutation) SetUserID

func (m *UserNoteMutation) SetUserID(id int)

SetUserID sets the "user" edge to the User entity by id.

func (UserNoteMutation) Tx

func (m UserNoteMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserNoteMutation) Type

func (m *UserNoteMutation) Type() string

Type returns the node type of this mutation (UserNote).

func (*UserNoteMutation) UpdateTime

func (m *UserNoteMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*UserNoteMutation) UserCleared

func (m *UserNoteMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*UserNoteMutation) UserID

func (m *UserNoteMutation) UserID() (id int, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*UserNoteMutation) UserIDs

func (m *UserNoteMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*UserNoteMutation) Where

func (m *UserNoteMutation) Where(ps ...predicate.UserNote)

Where appends a list predicates to the UserNoteMutation builder.

func (*UserNoteMutation) WhereP

func (m *UserNoteMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserNoteMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserNoteQuery

type UserNoteQuery struct {
	// contains filtered or unexported fields
}

UserNoteQuery is the builder for querying UserNote entities.

func (*UserNoteQuery) Aggregate

func (unq *UserNoteQuery) Aggregate(fns ...AggregateFunc) *UserNoteSelect

Aggregate returns a UserNoteSelect configured with the given aggregations.

func (*UserNoteQuery) All

func (unq *UserNoteQuery) All(ctx context.Context) ([]*UserNote, error)

All executes the query and returns a list of UserNotes.

func (*UserNoteQuery) AllX

func (unq *UserNoteQuery) AllX(ctx context.Context) []*UserNote

AllX is like All, but panics if an error occurs.

func (*UserNoteQuery) Clone

func (unq *UserNoteQuery) Clone() *UserNoteQuery

Clone returns a duplicate of the UserNoteQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserNoteQuery) Count

func (unq *UserNoteQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserNoteQuery) CountX

func (unq *UserNoteQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserNoteQuery) Exist

func (unq *UserNoteQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserNoteQuery) ExistX

func (unq *UserNoteQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserNoteQuery) First

func (unq *UserNoteQuery) First(ctx context.Context) (*UserNote, error)

First returns the first UserNote entity from the query. Returns a *NotFoundError when no UserNote was found.

func (*UserNoteQuery) FirstID

func (unq *UserNoteQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserNote ID from the query. Returns a *NotFoundError when no UserNote ID was found.

func (*UserNoteQuery) FirstIDX

func (unq *UserNoteQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserNoteQuery) FirstX

func (unq *UserNoteQuery) FirstX(ctx context.Context) *UserNote

FirstX is like First, but panics if an error occurs.

func (*UserNoteQuery) GroupBy

func (unq *UserNoteQuery) GroupBy(field string, fields ...string) *UserNoteGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserNote.Query().
	GroupBy(usernote.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserNoteQuery) IDs

func (unq *UserNoteQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserNote IDs.

func (*UserNoteQuery) IDsX

func (unq *UserNoteQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserNoteQuery) Limit

func (unq *UserNoteQuery) Limit(limit int) *UserNoteQuery

Limit the number of records to be returned by this query.

func (*UserNoteQuery) Offset

func (unq *UserNoteQuery) Offset(offset int) *UserNoteQuery

Offset to start from.

func (*UserNoteQuery) Only

func (unq *UserNoteQuery) Only(ctx context.Context) (*UserNote, error)

Only returns a single UserNote entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserNote entity is found. Returns a *NotFoundError when no UserNote entities are found.

func (*UserNoteQuery) OnlyID

func (unq *UserNoteQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserNote ID in the query. Returns a *NotSingularError when more than one UserNote ID is found. Returns a *NotFoundError when no entities are found.

func (*UserNoteQuery) OnlyIDX

func (unq *UserNoteQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserNoteQuery) OnlyX

func (unq *UserNoteQuery) OnlyX(ctx context.Context) *UserNote

OnlyX is like Only, but panics if an error occurs.

func (*UserNoteQuery) Order

func (unq *UserNoteQuery) Order(o ...usernote.OrderOption) *UserNoteQuery

Order specifies how the records should be ordered.

func (*UserNoteQuery) QueryNoteItems

func (unq *UserNoteQuery) QueryNoteItems() *UserNoteItemQuery

QueryNoteItems chains the current query on the "noteItems" edge.

func (*UserNoteQuery) QueryUser

func (unq *UserNoteQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*UserNoteQuery) Select

func (unq *UserNoteQuery) Select(fields ...string) *UserNoteSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.UserNote.Query().
	Select(usernote.FieldCreateTime).
	Scan(ctx, &v)

func (*UserNoteQuery) Unique

func (unq *UserNoteQuery) Unique(unique bool) *UserNoteQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserNoteQuery) Where

func (unq *UserNoteQuery) Where(ps ...predicate.UserNote) *UserNoteQuery

Where adds a new predicate for the UserNoteQuery builder.

func (*UserNoteQuery) WithNoteItems

func (unq *UserNoteQuery) WithNoteItems(opts ...func(*UserNoteItemQuery)) *UserNoteQuery

WithNoteItems tells the query-builder to eager-load the nodes that are connected to the "noteItems" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserNoteQuery) WithUser

func (unq *UserNoteQuery) WithUser(opts ...func(*UserQuery)) *UserNoteQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type UserNoteSelect

type UserNoteSelect struct {
	*UserNoteQuery
	// contains filtered or unexported fields
}

UserNoteSelect is the builder for selecting fields of UserNote entities.

func (*UserNoteSelect) Aggregate

func (uns *UserNoteSelect) Aggregate(fns ...AggregateFunc) *UserNoteSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserNoteSelect) Bool

func (s *UserNoteSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserNoteSelect) BoolX

func (s *UserNoteSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserNoteSelect) Bools

func (s *UserNoteSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserNoteSelect) BoolsX

func (s *UserNoteSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserNoteSelect) Float64

func (s *UserNoteSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserNoteSelect) Float64X

func (s *UserNoteSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserNoteSelect) Float64s

func (s *UserNoteSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserNoteSelect) Float64sX

func (s *UserNoteSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserNoteSelect) Int

func (s *UserNoteSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserNoteSelect) IntX

func (s *UserNoteSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserNoteSelect) Ints

func (s *UserNoteSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserNoteSelect) IntsX

func (s *UserNoteSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserNoteSelect) Scan

func (uns *UserNoteSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserNoteSelect) ScanX

func (s *UserNoteSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserNoteSelect) String

func (s *UserNoteSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserNoteSelect) StringX

func (s *UserNoteSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserNoteSelect) Strings

func (s *UserNoteSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserNoteSelect) StringsX

func (s *UserNoteSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserNoteUpdate

type UserNoteUpdate struct {
	// contains filtered or unexported fields
}

UserNoteUpdate is the builder for updating UserNote entities.

func (*UserNoteUpdate) AddNoteItemIDs

func (unu *UserNoteUpdate) AddNoteItemIDs(ids ...int) *UserNoteUpdate

AddNoteItemIDs adds the "noteItems" edge to the UserNoteItem entity by IDs.

func (*UserNoteUpdate) AddNoteItems

func (unu *UserNoteUpdate) AddNoteItems(u ...*UserNoteItem) *UserNoteUpdate

AddNoteItems adds the "noteItems" edges to the UserNoteItem entity.

func (*UserNoteUpdate) ClearMemo

func (unu *UserNoteUpdate) ClearMemo() *UserNoteUpdate

ClearMemo clears the value of the "memo" field.

func (*UserNoteUpdate) ClearNoteItems

func (unu *UserNoteUpdate) ClearNoteItems() *UserNoteUpdate

ClearNoteItems clears all "noteItems" edges to the UserNoteItem entity.

func (*UserNoteUpdate) ClearUser

func (unu *UserNoteUpdate) ClearUser() *UserNoteUpdate

ClearUser clears the "user" edge to the User entity.

func (*UserNoteUpdate) Exec

func (unu *UserNoteUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserNoteUpdate) ExecX

func (unu *UserNoteUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteUpdate) Mutation

func (unu *UserNoteUpdate) Mutation() *UserNoteMutation

Mutation returns the UserNoteMutation object of the builder.

func (*UserNoteUpdate) RemoveNoteItemIDs

func (unu *UserNoteUpdate) RemoveNoteItemIDs(ids ...int) *UserNoteUpdate

RemoveNoteItemIDs removes the "noteItems" edge to UserNoteItem entities by IDs.

func (*UserNoteUpdate) RemoveNoteItems

func (unu *UserNoteUpdate) RemoveNoteItems(u ...*UserNoteItem) *UserNoteUpdate

RemoveNoteItems removes "noteItems" edges to UserNoteItem entities.

func (*UserNoteUpdate) Save

func (unu *UserNoteUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserNoteUpdate) SaveX

func (unu *UserNoteUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserNoteUpdate) SetLabel

func (unu *UserNoteUpdate) SetLabel(s string) *UserNoteUpdate

SetLabel sets the "label" field.

func (*UserNoteUpdate) SetMemo

func (unu *UserNoteUpdate) SetMemo(s string) *UserNoteUpdate

SetMemo sets the "memo" field.

func (*UserNoteUpdate) SetNillableMemo

func (unu *UserNoteUpdate) SetNillableMemo(s *string) *UserNoteUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*UserNoteUpdate) SetUpdateTime

func (unu *UserNoteUpdate) SetUpdateTime(t time.Time) *UserNoteUpdate

SetUpdateTime sets the "update_time" field.

func (*UserNoteUpdate) SetUser

func (unu *UserNoteUpdate) SetUser(u *User) *UserNoteUpdate

SetUser sets the "user" edge to the User entity.

func (*UserNoteUpdate) SetUserID

func (unu *UserNoteUpdate) SetUserID(id int) *UserNoteUpdate

SetUserID sets the "user" edge to the User entity by ID.

func (*UserNoteUpdate) Where

func (unu *UserNoteUpdate) Where(ps ...predicate.UserNote) *UserNoteUpdate

Where appends a list predicates to the UserNoteUpdate builder.

type UserNoteUpdateOne

type UserNoteUpdateOne struct {
	// contains filtered or unexported fields
}

UserNoteUpdateOne is the builder for updating a single UserNote entity.

func (*UserNoteUpdateOne) AddNoteItemIDs

func (unuo *UserNoteUpdateOne) AddNoteItemIDs(ids ...int) *UserNoteUpdateOne

AddNoteItemIDs adds the "noteItems" edge to the UserNoteItem entity by IDs.

func (*UserNoteUpdateOne) AddNoteItems

func (unuo *UserNoteUpdateOne) AddNoteItems(u ...*UserNoteItem) *UserNoteUpdateOne

AddNoteItems adds the "noteItems" edges to the UserNoteItem entity.

func (*UserNoteUpdateOne) ClearMemo

func (unuo *UserNoteUpdateOne) ClearMemo() *UserNoteUpdateOne

ClearMemo clears the value of the "memo" field.

func (*UserNoteUpdateOne) ClearNoteItems

func (unuo *UserNoteUpdateOne) ClearNoteItems() *UserNoteUpdateOne

ClearNoteItems clears all "noteItems" edges to the UserNoteItem entity.

func (*UserNoteUpdateOne) ClearUser

func (unuo *UserNoteUpdateOne) ClearUser() *UserNoteUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*UserNoteUpdateOne) Exec

func (unuo *UserNoteUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserNoteUpdateOne) ExecX

func (unuo *UserNoteUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteUpdateOne) Mutation

func (unuo *UserNoteUpdateOne) Mutation() *UserNoteMutation

Mutation returns the UserNoteMutation object of the builder.

func (*UserNoteUpdateOne) RemoveNoteItemIDs

func (unuo *UserNoteUpdateOne) RemoveNoteItemIDs(ids ...int) *UserNoteUpdateOne

RemoveNoteItemIDs removes the "noteItems" edge to UserNoteItem entities by IDs.

func (*UserNoteUpdateOne) RemoveNoteItems

func (unuo *UserNoteUpdateOne) RemoveNoteItems(u ...*UserNoteItem) *UserNoteUpdateOne

RemoveNoteItems removes "noteItems" edges to UserNoteItem entities.

func (*UserNoteUpdateOne) Save

func (unuo *UserNoteUpdateOne) Save(ctx context.Context) (*UserNote, error)

Save executes the query and returns the updated UserNote entity.

func (*UserNoteUpdateOne) SaveX

func (unuo *UserNoteUpdateOne) SaveX(ctx context.Context) *UserNote

SaveX is like Save, but panics if an error occurs.

func (*UserNoteUpdateOne) Select

func (unuo *UserNoteUpdateOne) Select(field string, fields ...string) *UserNoteUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserNoteUpdateOne) SetLabel

func (unuo *UserNoteUpdateOne) SetLabel(s string) *UserNoteUpdateOne

SetLabel sets the "label" field.

func (*UserNoteUpdateOne) SetMemo

func (unuo *UserNoteUpdateOne) SetMemo(s string) *UserNoteUpdateOne

SetMemo sets the "memo" field.

func (*UserNoteUpdateOne) SetNillableMemo

func (unuo *UserNoteUpdateOne) SetNillableMemo(s *string) *UserNoteUpdateOne

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*UserNoteUpdateOne) SetUpdateTime

func (unuo *UserNoteUpdateOne) SetUpdateTime(t time.Time) *UserNoteUpdateOne

SetUpdateTime sets the "update_time" field.

func (*UserNoteUpdateOne) SetUser

func (unuo *UserNoteUpdateOne) SetUser(u *User) *UserNoteUpdateOne

SetUser sets the "user" edge to the User entity.

func (*UserNoteUpdateOne) SetUserID

func (unuo *UserNoteUpdateOne) SetUserID(id int) *UserNoteUpdateOne

SetUserID sets the "user" edge to the User entity by ID.

func (*UserNoteUpdateOne) Where

Where appends a list predicates to the UserNoteUpdate builder.

type UserNoteUpsert

type UserNoteUpsert struct {
	*sql.UpdateSet
}

UserNoteUpsert is the "OnConflict" setter.

func (*UserNoteUpsert) ClearMemo

func (u *UserNoteUpsert) ClearMemo() *UserNoteUpsert

ClearMemo clears the value of the "memo" field.

func (*UserNoteUpsert) SetLabel

func (u *UserNoteUpsert) SetLabel(v string) *UserNoteUpsert

SetLabel sets the "label" field.

func (*UserNoteUpsert) SetMemo

func (u *UserNoteUpsert) SetMemo(v string) *UserNoteUpsert

SetMemo sets the "memo" field.

func (*UserNoteUpsert) SetUpdateTime

func (u *UserNoteUpsert) SetUpdateTime(v time.Time) *UserNoteUpsert

SetUpdateTime sets the "update_time" field.

func (*UserNoteUpsert) UpdateLabel

func (u *UserNoteUpsert) UpdateLabel() *UserNoteUpsert

UpdateLabel sets the "label" field to the value that was provided on create.

func (*UserNoteUpsert) UpdateMemo

func (u *UserNoteUpsert) UpdateMemo() *UserNoteUpsert

UpdateMemo sets the "memo" field to the value that was provided on create.

func (*UserNoteUpsert) UpdateUpdateTime

func (u *UserNoteUpsert) UpdateUpdateTime() *UserNoteUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserNoteUpsertBulk

type UserNoteUpsertBulk struct {
	// contains filtered or unexported fields
}

UserNoteUpsertBulk is the builder for "upsert"-ing a bulk of UserNote nodes.

func (*UserNoteUpsertBulk) ClearMemo

func (u *UserNoteUpsertBulk) ClearMemo() *UserNoteUpsertBulk

ClearMemo clears the value of the "memo" field.

func (*UserNoteUpsertBulk) DoNothing

func (u *UserNoteUpsertBulk) DoNothing() *UserNoteUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserNoteUpsertBulk) Exec

func (u *UserNoteUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserNoteUpsertBulk) ExecX

func (u *UserNoteUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserNote.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserNoteUpsertBulk) SetLabel

SetLabel sets the "label" field.

func (*UserNoteUpsertBulk) SetMemo

SetMemo sets the "memo" field.

func (*UserNoteUpsertBulk) SetUpdateTime

func (u *UserNoteUpsertBulk) SetUpdateTime(v time.Time) *UserNoteUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*UserNoteUpsertBulk) Update

func (u *UserNoteUpsertBulk) Update(set func(*UserNoteUpsert)) *UserNoteUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserNoteCreateBulk.OnConflict documentation for more info.

func (*UserNoteUpsertBulk) UpdateLabel

func (u *UserNoteUpsertBulk) UpdateLabel() *UserNoteUpsertBulk

UpdateLabel sets the "label" field to the value that was provided on create.

func (*UserNoteUpsertBulk) UpdateMemo

func (u *UserNoteUpsertBulk) UpdateMemo() *UserNoteUpsertBulk

UpdateMemo sets the "memo" field to the value that was provided on create.

func (*UserNoteUpsertBulk) UpdateNewValues

func (u *UserNoteUpsertBulk) UpdateNewValues() *UserNoteUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserNote.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserNoteUpsertBulk) UpdateUpdateTime

func (u *UserNoteUpsertBulk) UpdateUpdateTime() *UserNoteUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserNoteUpsertOne

type UserNoteUpsertOne struct {
	// contains filtered or unexported fields
}

UserNoteUpsertOne is the builder for "upsert"-ing

one UserNote node.

func (*UserNoteUpsertOne) ClearMemo

func (u *UserNoteUpsertOne) ClearMemo() *UserNoteUpsertOne

ClearMemo clears the value of the "memo" field.

func (*UserNoteUpsertOne) DoNothing

func (u *UserNoteUpsertOne) DoNothing() *UserNoteUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserNoteUpsertOne) Exec

func (u *UserNoteUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserNoteUpsertOne) ExecX

func (u *UserNoteUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserNoteUpsertOne) ID

func (u *UserNoteUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserNoteUpsertOne) IDX

func (u *UserNoteUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UserNoteUpsertOne) Ignore

func (u *UserNoteUpsertOne) Ignore() *UserNoteUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserNote.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserNoteUpsertOne) SetLabel

func (u *UserNoteUpsertOne) SetLabel(v string) *UserNoteUpsertOne

SetLabel sets the "label" field.

func (*UserNoteUpsertOne) SetMemo

SetMemo sets the "memo" field.

func (*UserNoteUpsertOne) SetUpdateTime

func (u *UserNoteUpsertOne) SetUpdateTime(v time.Time) *UserNoteUpsertOne

SetUpdateTime sets the "update_time" field.

func (*UserNoteUpsertOne) Update

func (u *UserNoteUpsertOne) Update(set func(*UserNoteUpsert)) *UserNoteUpsertOne

Update allows overriding fields `UPDATE` values. See the UserNoteCreate.OnConflict documentation for more info.

func (*UserNoteUpsertOne) UpdateLabel

func (u *UserNoteUpsertOne) UpdateLabel() *UserNoteUpsertOne

UpdateLabel sets the "label" field to the value that was provided on create.

func (*UserNoteUpsertOne) UpdateMemo

func (u *UserNoteUpsertOne) UpdateMemo() *UserNoteUpsertOne

UpdateMemo sets the "memo" field to the value that was provided on create.

func (*UserNoteUpsertOne) UpdateNewValues

func (u *UserNoteUpsertOne) UpdateNewValues() *UserNoteUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserNote.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserNoteUpsertOne) UpdateUpdateTime

func (u *UserNoteUpsertOne) UpdateUpdateTime() *UserNoteUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserNotes

type UserNotes []*UserNote

UserNotes is a parsable slice of UserNote.

type UserQualification

type UserQualification struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Organization holds the value of the "organization" field.
	Organization *string `json:"organization,omitempty"`
	// URL holds the value of the "url" field.
	URL *string `json:"url,omitempty"`
	// GotDate holds the value of the "got_date" field.
	GotDate *string `json:"got_date,omitempty"`
	// Memo holds the value of the "memo" field.
	Memo *string `json:"memo,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQualificationQuery when eager-loading is set.
	Edges UserQualificationEdges `json:"edges"`
	// contains filtered or unexported fields
}

UserQualification is the model entity for the UserQualification schema.

func (*UserQualification) QueryUser

func (uq *UserQualification) QueryUser() *UserQuery

QueryUser queries the "user" edge of the UserQualification entity.

func (*UserQualification) String

func (uq *UserQualification) String() string

String implements the fmt.Stringer.

func (*UserQualification) Unwrap

func (uq *UserQualification) Unwrap() *UserQualification

Unwrap unwraps the UserQualification 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 (*UserQualification) Update

Update returns a builder for updating this UserQualification. Note that you need to call UserQualification.Unwrap() before calling this method if this UserQualification was returned from a transaction, and the transaction was committed or rolled back.

func (*UserQualification) Value

func (uq *UserQualification) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the UserQualification. This includes values selected through modifiers, order, etc.

type UserQualificationClient

type UserQualificationClient struct {
	// contains filtered or unexported fields
}

UserQualificationClient is a client for the UserQualification schema.

func NewUserQualificationClient

func NewUserQualificationClient(c config) *UserQualificationClient

NewUserQualificationClient returns a client for the UserQualification from the given config.

func (*UserQualificationClient) Create

Create returns a builder for creating a UserQualification entity.

func (*UserQualificationClient) CreateBulk

CreateBulk returns a builder for creating a bulk of UserQualification entities.

func (*UserQualificationClient) Delete

Delete returns a delete builder for UserQualification.

func (*UserQualificationClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserQualificationClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserQualificationClient) Get

Get returns a UserQualification entity by its id.

func (*UserQualificationClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UserQualificationClient) Hooks

func (c *UserQualificationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserQualificationClient) Intercept

func (c *UserQualificationClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userqualification.Intercept(f(g(h())))`.

func (*UserQualificationClient) Interceptors

func (c *UserQualificationClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserQualificationClient) Query

Query returns a query builder for UserQualification.

func (*UserQualificationClient) QueryUser

QueryUser queries the user edge of a UserQualification.

func (*UserQualificationClient) Update

Update returns an update builder for UserQualification.

func (*UserQualificationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserQualificationClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*UserQualificationClient) Use

func (c *UserQualificationClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userqualification.Hooks(f(g(h())))`.

type UserQualificationCreate

type UserQualificationCreate struct {
	// contains filtered or unexported fields
}

UserQualificationCreate is the builder for creating a UserQualification entity.

func (*UserQualificationCreate) Exec

Exec executes the query.

func (*UserQualificationCreate) ExecX

func (uqc *UserQualificationCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserQualificationCreate) Mutation

Mutation returns the UserQualificationMutation object of the builder.

func (*UserQualificationCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserQualification.Create().
	SetCreateTime(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserQualificationUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserQualificationCreate) OnConflictColumns

func (uqc *UserQualificationCreate) OnConflictColumns(columns ...string) *UserQualificationUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserQualification.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserQualificationCreate) Save

Save creates the UserQualification in the database.

func (*UserQualificationCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UserQualificationCreate) SetCreateTime

SetCreateTime sets the "create_time" field.

func (*UserQualificationCreate) SetGotDate

SetGotDate sets the "got_date" field.

func (*UserQualificationCreate) SetMemo

SetMemo sets the "memo" field.

func (*UserQualificationCreate) SetName

SetName sets the "name" field.

func (*UserQualificationCreate) SetNillableCreateTime

func (uqc *UserQualificationCreate) SetNillableCreateTime(t *time.Time) *UserQualificationCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*UserQualificationCreate) SetNillableGotDate

func (uqc *UserQualificationCreate) SetNillableGotDate(s *string) *UserQualificationCreate

SetNillableGotDate sets the "got_date" field if the given value is not nil.

func (*UserQualificationCreate) SetNillableMemo

func (uqc *UserQualificationCreate) SetNillableMemo(s *string) *UserQualificationCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*UserQualificationCreate) SetNillableOrganization

func (uqc *UserQualificationCreate) SetNillableOrganization(s *string) *UserQualificationCreate

SetNillableOrganization sets the "organization" field if the given value is not nil.

func (*UserQualificationCreate) SetNillableURL

func (uqc *UserQualificationCreate) SetNillableURL(s *string) *UserQualificationCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*UserQualificationCreate) SetNillableUpdateTime

func (uqc *UserQualificationCreate) SetNillableUpdateTime(t *time.Time) *UserQualificationCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*UserQualificationCreate) SetOrganization

func (uqc *UserQualificationCreate) SetOrganization(s string) *UserQualificationCreate

SetOrganization sets the "organization" field.

func (*UserQualificationCreate) SetURL

SetURL sets the "url" field.

func (*UserQualificationCreate) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserQualificationCreate) SetUser

SetUser sets the "user" edge to the User entity.

func (*UserQualificationCreate) SetUserID

SetUserID sets the "user" edge to the User entity by ID.

type UserQualificationCreateBulk

type UserQualificationCreateBulk struct {
	// contains filtered or unexported fields
}

UserQualificationCreateBulk is the builder for creating many UserQualification entities in bulk.

func (*UserQualificationCreateBulk) Exec

Exec executes the query.

func (*UserQualificationCreateBulk) ExecX

func (uqcb *UserQualificationCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserQualificationCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UserQualification.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserQualificationUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*UserQualificationCreateBulk) OnConflictColumns

func (uqcb *UserQualificationCreateBulk) OnConflictColumns(columns ...string) *UserQualificationUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UserQualification.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserQualificationCreateBulk) Save

Save creates the UserQualification entities in the database.

func (*UserQualificationCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type UserQualificationDelete

type UserQualificationDelete struct {
	// contains filtered or unexported fields
}

UserQualificationDelete is the builder for deleting a UserQualification entity.

func (*UserQualificationDelete) Exec

func (uqd *UserQualificationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserQualificationDelete) ExecX

func (uqd *UserQualificationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserQualificationDelete) Where

Where appends a list predicates to the UserQualificationDelete builder.

type UserQualificationDeleteOne

type UserQualificationDeleteOne struct {
	// contains filtered or unexported fields
}

UserQualificationDeleteOne is the builder for deleting a single UserQualification entity.

func (*UserQualificationDeleteOne) Exec

Exec executes the deletion query.

func (*UserQualificationDeleteOne) ExecX

func (uqdo *UserQualificationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserQualificationDeleteOne) Where

Where appends a list predicates to the UserQualificationDelete builder.

type UserQualificationEdges

type UserQualificationEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

UserQualificationEdges holds the relations/edges for other nodes in the graph.

func (UserQualificationEdges) UserOrErr

func (e UserQualificationEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserQualificationGroupBy

type UserQualificationGroupBy struct {
	// contains filtered or unexported fields
}

UserQualificationGroupBy is the group-by builder for UserQualification entities.

func (*UserQualificationGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*UserQualificationGroupBy) Bool

func (s *UserQualificationGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserQualificationGroupBy) BoolX

func (s *UserQualificationGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserQualificationGroupBy) Bools

func (s *UserQualificationGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserQualificationGroupBy) BoolsX

func (s *UserQualificationGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserQualificationGroupBy) Float64

func (s *UserQualificationGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserQualificationGroupBy) Float64X

func (s *UserQualificationGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserQualificationGroupBy) Float64s

func (s *UserQualificationGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserQualificationGroupBy) Float64sX

func (s *UserQualificationGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserQualificationGroupBy) Int

func (s *UserQualificationGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserQualificationGroupBy) IntX

func (s *UserQualificationGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserQualificationGroupBy) Ints

func (s *UserQualificationGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserQualificationGroupBy) IntsX

func (s *UserQualificationGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserQualificationGroupBy) Scan

func (uqgb *UserQualificationGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserQualificationGroupBy) ScanX

func (s *UserQualificationGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserQualificationGroupBy) String

func (s *UserQualificationGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserQualificationGroupBy) StringX

func (s *UserQualificationGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserQualificationGroupBy) Strings

func (s *UserQualificationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserQualificationGroupBy) StringsX

func (s *UserQualificationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserQualificationMutation

type UserQualificationMutation struct {
	// contains filtered or unexported fields
}

UserQualificationMutation represents an operation that mutates the UserQualification nodes in the graph.

func (*UserQualificationMutation) AddField

func (m *UserQualificationMutation) 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 (*UserQualificationMutation) AddedEdges

func (m *UserQualificationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserQualificationMutation) AddedField

func (m *UserQualificationMutation) 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 (*UserQualificationMutation) AddedFields

func (m *UserQualificationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserQualificationMutation) AddedIDs

func (m *UserQualificationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserQualificationMutation) ClearEdge

func (m *UserQualificationMutation) 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 (*UserQualificationMutation) ClearField

func (m *UserQualificationMutation) 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 (*UserQualificationMutation) ClearGotDate

func (m *UserQualificationMutation) ClearGotDate()

ClearGotDate clears the value of the "got_date" field.

func (*UserQualificationMutation) ClearMemo

func (m *UserQualificationMutation) ClearMemo()

ClearMemo clears the value of the "memo" field.

func (*UserQualificationMutation) ClearOrganization

func (m *UserQualificationMutation) ClearOrganization()

ClearOrganization clears the value of the "organization" field.

func (*UserQualificationMutation) ClearURL

func (m *UserQualificationMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*UserQualificationMutation) ClearUser

func (m *UserQualificationMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*UserQualificationMutation) ClearedEdges

func (m *UserQualificationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserQualificationMutation) ClearedFields

func (m *UserQualificationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserQualificationMutation) Client

func (m UserQualificationMutation) 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 (*UserQualificationMutation) CreateTime

func (m *UserQualificationMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*UserQualificationMutation) EdgeCleared

func (m *UserQualificationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserQualificationMutation) Field

func (m *UserQualificationMutation) 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 (*UserQualificationMutation) FieldCleared

func (m *UserQualificationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserQualificationMutation) Fields

func (m *UserQualificationMutation) 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 (*UserQualificationMutation) GotDate

func (m *UserQualificationMutation) GotDate() (r string, exists bool)

GotDate returns the value of the "got_date" field in the mutation.

func (*UserQualificationMutation) GotDateCleared

func (m *UserQualificationMutation) GotDateCleared() bool

GotDateCleared returns if the "got_date" field was cleared in this mutation.

func (*UserQualificationMutation) ID

func (m *UserQualificationMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserQualificationMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserQualificationMutation) Memo

func (m *UserQualificationMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*UserQualificationMutation) MemoCleared

func (m *UserQualificationMutation) MemoCleared() bool

MemoCleared returns if the "memo" field was cleared in this mutation.

func (*UserQualificationMutation) Name

func (m *UserQualificationMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*UserQualificationMutation) OldCreateTime

func (m *UserQualificationMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the UserQualification entity. If the UserQualification 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 (*UserQualificationMutation) OldField

func (m *UserQualificationMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*UserQualificationMutation) OldGotDate

func (m *UserQualificationMutation) OldGotDate(ctx context.Context) (v *string, err error)

OldGotDate returns the old "got_date" field's value of the UserQualification entity. If the UserQualification 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 (*UserQualificationMutation) OldMemo

func (m *UserQualificationMutation) OldMemo(ctx context.Context) (v *string, err error)

OldMemo returns the old "memo" field's value of the UserQualification entity. If the UserQualification 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 (*UserQualificationMutation) OldName

func (m *UserQualificationMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the UserQualification entity. If the UserQualification 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 (*UserQualificationMutation) OldOrganization

func (m *UserQualificationMutation) OldOrganization(ctx context.Context) (v *string, err error)

OldOrganization returns the old "organization" field's value of the UserQualification entity. If the UserQualification 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 (*UserQualificationMutation) OldURL

func (m *UserQualificationMutation) OldURL(ctx context.Context) (v *string, err error)

OldURL returns the old "url" field's value of the UserQualification entity. If the UserQualification 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 (*UserQualificationMutation) OldUpdateTime

func (m *UserQualificationMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the UserQualification entity. If the UserQualification 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 (*UserQualificationMutation) Op

func (m *UserQualificationMutation) Op() Op

Op returns the operation name.

func (*UserQualificationMutation) Organization

func (m *UserQualificationMutation) Organization() (r string, exists bool)

Organization returns the value of the "organization" field in the mutation.

func (*UserQualificationMutation) OrganizationCleared

func (m *UserQualificationMutation) OrganizationCleared() bool

OrganizationCleared returns if the "organization" field was cleared in this mutation.

func (*UserQualificationMutation) RemovedEdges

func (m *UserQualificationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserQualificationMutation) RemovedIDs

func (m *UserQualificationMutation) 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 (*UserQualificationMutation) ResetCreateTime

func (m *UserQualificationMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*UserQualificationMutation) ResetEdge

func (m *UserQualificationMutation) 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 (*UserQualificationMutation) ResetField

func (m *UserQualificationMutation) 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 (*UserQualificationMutation) ResetGotDate

func (m *UserQualificationMutation) ResetGotDate()

ResetGotDate resets all changes to the "got_date" field.

func (*UserQualificationMutation) ResetMemo

func (m *UserQualificationMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*UserQualificationMutation) ResetName

func (m *UserQualificationMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*UserQualificationMutation) ResetOrganization

func (m *UserQualificationMutation) ResetOrganization()

ResetOrganization resets all changes to the "organization" field.

func (*UserQualificationMutation) ResetURL

func (m *UserQualificationMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*UserQualificationMutation) ResetUpdateTime

func (m *UserQualificationMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*UserQualificationMutation) ResetUser

func (m *UserQualificationMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*UserQualificationMutation) SetCreateTime

func (m *UserQualificationMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*UserQualificationMutation) SetField

func (m *UserQualificationMutation) 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 (*UserQualificationMutation) SetGotDate

func (m *UserQualificationMutation) SetGotDate(s string)

SetGotDate sets the "got_date" field.

func (*UserQualificationMutation) SetMemo

func (m *UserQualificationMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*UserQualificationMutation) SetName

func (m *UserQualificationMutation) SetName(s string)

SetName sets the "name" field.

func (*UserQualificationMutation) SetOp

func (m *UserQualificationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserQualificationMutation) SetOrganization

func (m *UserQualificationMutation) SetOrganization(s string)

SetOrganization sets the "organization" field.

func (*UserQualificationMutation) SetURL

func (m *UserQualificationMutation) SetURL(s string)

SetURL sets the "url" field.

func (*UserQualificationMutation) SetUpdateTime

func (m *UserQualificationMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*UserQualificationMutation) SetUserID

func (m *UserQualificationMutation) SetUserID(id int)

SetUserID sets the "user" edge to the User entity by id.

func (UserQualificationMutation) Tx

func (m UserQualificationMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserQualificationMutation) Type

Type returns the node type of this mutation (UserQualification).

func (*UserQualificationMutation) URL

func (m *UserQualificationMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*UserQualificationMutation) URLCleared

func (m *UserQualificationMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*UserQualificationMutation) UpdateTime

func (m *UserQualificationMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*UserQualificationMutation) UserCleared

func (m *UserQualificationMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*UserQualificationMutation) UserID

func (m *UserQualificationMutation) UserID() (id int, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*UserQualificationMutation) UserIDs

func (m *UserQualificationMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*UserQualificationMutation) Where

Where appends a list predicates to the UserQualificationMutation builder.

func (*UserQualificationMutation) WhereP

func (m *UserQualificationMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserQualificationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserQualificationQuery

type UserQualificationQuery struct {
	// contains filtered or unexported fields
}

UserQualificationQuery is the builder for querying UserQualification entities.

func (*UserQualificationQuery) Aggregate

Aggregate returns a UserQualificationSelect configured with the given aggregations.

func (*UserQualificationQuery) All

All executes the query and returns a list of UserQualifications.

func (*UserQualificationQuery) AllX

AllX is like All, but panics if an error occurs.

func (*UserQualificationQuery) Clone

Clone returns a duplicate of the UserQualificationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQualificationQuery) Count

func (uqq *UserQualificationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQualificationQuery) CountX

func (uqq *UserQualificationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQualificationQuery) Exist

func (uqq *UserQualificationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQualificationQuery) ExistX

func (uqq *UserQualificationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQualificationQuery) First

First returns the first UserQualification entity from the query. Returns a *NotFoundError when no UserQualification was found.

func (*UserQualificationQuery) FirstID

func (uqq *UserQualificationQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first UserQualification ID from the query. Returns a *NotFoundError when no UserQualification ID was found.

func (*UserQualificationQuery) FirstIDX

func (uqq *UserQualificationQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQualificationQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*UserQualificationQuery) GroupBy

func (uqq *UserQualificationQuery) GroupBy(field string, fields ...string) *UserQualificationGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UserQualification.Query().
	GroupBy(userqualification.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQualificationQuery) IDs

func (uqq *UserQualificationQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of UserQualification IDs.

func (*UserQualificationQuery) IDsX

func (uqq *UserQualificationQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserQualificationQuery) Limit

Limit the number of records to be returned by this query.

func (*UserQualificationQuery) Offset

func (uqq *UserQualificationQuery) Offset(offset int) *UserQualificationQuery

Offset to start from.

func (*UserQualificationQuery) Only

Only returns a single UserQualification entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserQualification entity is found. Returns a *NotFoundError when no UserQualification entities are found.

func (*UserQualificationQuery) OnlyID

func (uqq *UserQualificationQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only UserQualification ID in the query. Returns a *NotSingularError when more than one UserQualification ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQualificationQuery) OnlyIDX

func (uqq *UserQualificationQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQualificationQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*UserQualificationQuery) Order

Order specifies how the records should be ordered.

func (*UserQualificationQuery) QueryUser

func (uqq *UserQualificationQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*UserQualificationQuery) Select

func (uqq *UserQualificationQuery) Select(fields ...string) *UserQualificationSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.UserQualification.Query().
	Select(userqualification.FieldCreateTime).
	Scan(ctx, &v)

func (*UserQualificationQuery) Unique

func (uqq *UserQualificationQuery) Unique(unique bool) *UserQualificationQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQualificationQuery) Where

Where adds a new predicate for the UserQualificationQuery builder.

func (*UserQualificationQuery) WithUser

func (uqq *UserQualificationQuery) WithUser(opts ...func(*UserQuery)) *UserQualificationQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type UserQualificationSelect

type UserQualificationSelect struct {
	*UserQualificationQuery
	// contains filtered or unexported fields
}

UserQualificationSelect is the builder for selecting fields of UserQualification entities.

func (*UserQualificationSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*UserQualificationSelect) Bool

func (s *UserQualificationSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserQualificationSelect) BoolX

func (s *UserQualificationSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserQualificationSelect) Bools

func (s *UserQualificationSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserQualificationSelect) BoolsX

func (s *UserQualificationSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserQualificationSelect) Float64

func (s *UserQualificationSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserQualificationSelect) Float64X

func (s *UserQualificationSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserQualificationSelect) Float64s

func (s *UserQualificationSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserQualificationSelect) Float64sX

func (s *UserQualificationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserQualificationSelect) Int

func (s *UserQualificationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserQualificationSelect) IntX

func (s *UserQualificationSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserQualificationSelect) Ints

func (s *UserQualificationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserQualificationSelect) IntsX

func (s *UserQualificationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserQualificationSelect) Scan

func (uqs *UserQualificationSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserQualificationSelect) ScanX

func (s *UserQualificationSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserQualificationSelect) String

func (s *UserQualificationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserQualificationSelect) StringX

func (s *UserQualificationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserQualificationSelect) Strings

func (s *UserQualificationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserQualificationSelect) StringsX

func (s *UserQualificationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserQualificationUpdate

type UserQualificationUpdate struct {
	// contains filtered or unexported fields
}

UserQualificationUpdate is the builder for updating UserQualification entities.

func (*UserQualificationUpdate) ClearGotDate

func (uqu *UserQualificationUpdate) ClearGotDate() *UserQualificationUpdate

ClearGotDate clears the value of the "got_date" field.

func (*UserQualificationUpdate) ClearMemo

ClearMemo clears the value of the "memo" field.

func (*UserQualificationUpdate) ClearOrganization

func (uqu *UserQualificationUpdate) ClearOrganization() *UserQualificationUpdate

ClearOrganization clears the value of the "organization" field.

func (*UserQualificationUpdate) ClearURL

ClearURL clears the value of the "url" field.

func (*UserQualificationUpdate) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*UserQualificationUpdate) Exec

Exec executes the query.

func (*UserQualificationUpdate) ExecX

func (uqu *UserQualificationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserQualificationUpdate) Mutation

Mutation returns the UserQualificationMutation object of the builder.

func (*UserQualificationUpdate) Save

func (uqu *UserQualificationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserQualificationUpdate) SaveX

func (uqu *UserQualificationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserQualificationUpdate) SetGotDate

SetGotDate sets the "got_date" field.

func (*UserQualificationUpdate) SetMemo

SetMemo sets the "memo" field.

func (*UserQualificationUpdate) SetName

SetName sets the "name" field.

func (*UserQualificationUpdate) SetNillableGotDate

func (uqu *UserQualificationUpdate) SetNillableGotDate(s *string) *UserQualificationUpdate

SetNillableGotDate sets the "got_date" field if the given value is not nil.

func (*UserQualificationUpdate) SetNillableMemo

func (uqu *UserQualificationUpdate) SetNillableMemo(s *string) *UserQualificationUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*UserQualificationUpdate) SetNillableOrganization

func (uqu *UserQualificationUpdate) SetNillableOrganization(s *string) *UserQualificationUpdate

SetNillableOrganization sets the "organization" field if the given value is not nil.

func (*UserQualificationUpdate) SetNillableURL

func (uqu *UserQualificationUpdate) SetNillableURL(s *string) *UserQualificationUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*UserQualificationUpdate) SetOrganization

func (uqu *UserQualificationUpdate) SetOrganization(s string) *UserQualificationUpdate

SetOrganization sets the "organization" field.

func (*UserQualificationUpdate) SetURL

SetURL sets the "url" field.

func (*UserQualificationUpdate) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserQualificationUpdate) SetUser

SetUser sets the "user" edge to the User entity.

func (*UserQualificationUpdate) SetUserID

SetUserID sets the "user" edge to the User entity by ID.

func (*UserQualificationUpdate) Where

Where appends a list predicates to the UserQualificationUpdate builder.

type UserQualificationUpdateOne

type UserQualificationUpdateOne struct {
	// contains filtered or unexported fields
}

UserQualificationUpdateOne is the builder for updating a single UserQualification entity.

func (*UserQualificationUpdateOne) ClearGotDate

ClearGotDate clears the value of the "got_date" field.

func (*UserQualificationUpdateOne) ClearMemo

ClearMemo clears the value of the "memo" field.

func (*UserQualificationUpdateOne) ClearOrganization

func (uquo *UserQualificationUpdateOne) ClearOrganization() *UserQualificationUpdateOne

ClearOrganization clears the value of the "organization" field.

func (*UserQualificationUpdateOne) ClearURL

ClearURL clears the value of the "url" field.

func (*UserQualificationUpdateOne) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*UserQualificationUpdateOne) Exec

Exec executes the query on the entity.

func (*UserQualificationUpdateOne) ExecX

func (uquo *UserQualificationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserQualificationUpdateOne) Mutation

Mutation returns the UserQualificationMutation object of the builder.

func (*UserQualificationUpdateOne) Save

Save executes the query and returns the updated UserQualification entity.

func (*UserQualificationUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UserQualificationUpdateOne) Select

func (uquo *UserQualificationUpdateOne) Select(field string, fields ...string) *UserQualificationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserQualificationUpdateOne) SetGotDate

SetGotDate sets the "got_date" field.

func (*UserQualificationUpdateOne) SetMemo

SetMemo sets the "memo" field.

func (*UserQualificationUpdateOne) SetName

SetName sets the "name" field.

func (*UserQualificationUpdateOne) SetNillableGotDate

func (uquo *UserQualificationUpdateOne) SetNillableGotDate(s *string) *UserQualificationUpdateOne

SetNillableGotDate sets the "got_date" field if the given value is not nil.

func (*UserQualificationUpdateOne) SetNillableMemo

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*UserQualificationUpdateOne) SetNillableOrganization

func (uquo *UserQualificationUpdateOne) SetNillableOrganization(s *string) *UserQualificationUpdateOne

SetNillableOrganization sets the "organization" field if the given value is not nil.

func (*UserQualificationUpdateOne) SetNillableURL

SetNillableURL sets the "url" field if the given value is not nil.

func (*UserQualificationUpdateOne) SetOrganization

SetOrganization sets the "organization" field.

func (*UserQualificationUpdateOne) SetURL

SetURL sets the "url" field.

func (*UserQualificationUpdateOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserQualificationUpdateOne) SetUser

SetUser sets the "user" edge to the User entity.

func (*UserQualificationUpdateOne) SetUserID

SetUserID sets the "user" edge to the User entity by ID.

func (*UserQualificationUpdateOne) Where

Where appends a list predicates to the UserQualificationUpdate builder.

type UserQualificationUpsert

type UserQualificationUpsert struct {
	*sql.UpdateSet
}

UserQualificationUpsert is the "OnConflict" setter.

func (*UserQualificationUpsert) ClearGotDate

ClearGotDate clears the value of the "got_date" field.

func (*UserQualificationUpsert) ClearMemo

ClearMemo clears the value of the "memo" field.

func (*UserQualificationUpsert) ClearOrganization

func (u *UserQualificationUpsert) ClearOrganization() *UserQualificationUpsert

ClearOrganization clears the value of the "organization" field.

func (*UserQualificationUpsert) ClearURL

ClearURL clears the value of the "url" field.

func (*UserQualificationUpsert) SetGotDate

SetGotDate sets the "got_date" field.

func (*UserQualificationUpsert) SetMemo

SetMemo sets the "memo" field.

func (*UserQualificationUpsert) SetName

SetName sets the "name" field.

func (*UserQualificationUpsert) SetOrganization

SetOrganization sets the "organization" field.

func (*UserQualificationUpsert) SetURL

SetURL sets the "url" field.

func (*UserQualificationUpsert) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserQualificationUpsert) UpdateGotDate

UpdateGotDate sets the "got_date" field to the value that was provided on create.

func (*UserQualificationUpsert) UpdateMemo

UpdateMemo sets the "memo" field to the value that was provided on create.

func (*UserQualificationUpsert) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*UserQualificationUpsert) UpdateOrganization

func (u *UserQualificationUpsert) UpdateOrganization() *UserQualificationUpsert

UpdateOrganization sets the "organization" field to the value that was provided on create.

func (*UserQualificationUpsert) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*UserQualificationUpsert) UpdateUpdateTime

func (u *UserQualificationUpsert) UpdateUpdateTime() *UserQualificationUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserQualificationUpsertBulk

type UserQualificationUpsertBulk struct {
	// contains filtered or unexported fields
}

UserQualificationUpsertBulk is the builder for "upsert"-ing a bulk of UserQualification nodes.

func (*UserQualificationUpsertBulk) ClearGotDate

ClearGotDate clears the value of the "got_date" field.

func (*UserQualificationUpsertBulk) ClearMemo

ClearMemo clears the value of the "memo" field.

func (*UserQualificationUpsertBulk) ClearOrganization

ClearOrganization clears the value of the "organization" field.

func (*UserQualificationUpsertBulk) ClearURL

ClearURL clears the value of the "url" field.

func (*UserQualificationUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserQualificationUpsertBulk) Exec

Exec executes the query.

func (*UserQualificationUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserQualificationUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserQualification.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserQualificationUpsertBulk) SetGotDate

SetGotDate sets the "got_date" field.

func (*UserQualificationUpsertBulk) SetMemo

SetMemo sets the "memo" field.

func (*UserQualificationUpsertBulk) SetName

SetName sets the "name" field.

func (*UserQualificationUpsertBulk) SetOrganization

SetOrganization sets the "organization" field.

func (*UserQualificationUpsertBulk) SetURL

SetURL sets the "url" field.

func (*UserQualificationUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserQualificationUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UserQualificationCreateBulk.OnConflict documentation for more info.

func (*UserQualificationUpsertBulk) UpdateGotDate

UpdateGotDate sets the "got_date" field to the value that was provided on create.

func (*UserQualificationUpsertBulk) UpdateMemo

UpdateMemo sets the "memo" field to the value that was provided on create.

func (*UserQualificationUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*UserQualificationUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserQualification.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserQualificationUpsertBulk) UpdateOrganization

UpdateOrganization sets the "organization" field to the value that was provided on create.

func (*UserQualificationUpsertBulk) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*UserQualificationUpsertBulk) UpdateUpdateTime

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserQualificationUpsertOne

type UserQualificationUpsertOne struct {
	// contains filtered or unexported fields
}

UserQualificationUpsertOne is the builder for "upsert"-ing

one UserQualification node.

func (*UserQualificationUpsertOne) ClearGotDate

ClearGotDate clears the value of the "got_date" field.

func (*UserQualificationUpsertOne) ClearMemo

ClearMemo clears the value of the "memo" field.

func (*UserQualificationUpsertOne) ClearOrganization

ClearOrganization clears the value of the "organization" field.

func (*UserQualificationUpsertOne) ClearURL

ClearURL clears the value of the "url" field.

func (*UserQualificationUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserQualificationUpsertOne) Exec

Exec executes the query.

func (*UserQualificationUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UserQualificationUpsertOne) ID

func (u *UserQualificationUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserQualificationUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UserQualificationUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UserQualification.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserQualificationUpsertOne) SetGotDate

SetGotDate sets the "got_date" field.

func (*UserQualificationUpsertOne) SetMemo

SetMemo sets the "memo" field.

func (*UserQualificationUpsertOne) SetName

SetName sets the "name" field.

func (*UserQualificationUpsertOne) SetOrganization

SetOrganization sets the "organization" field.

func (*UserQualificationUpsertOne) SetURL

SetURL sets the "url" field.

func (*UserQualificationUpsertOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*UserQualificationUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UserQualificationCreate.OnConflict documentation for more info.

func (*UserQualificationUpsertOne) UpdateGotDate

UpdateGotDate sets the "got_date" field to the value that was provided on create.

func (*UserQualificationUpsertOne) UpdateMemo

UpdateMemo sets the "memo" field to the value that was provided on create.

func (*UserQualificationUpsertOne) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*UserQualificationUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UserQualification.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserQualificationUpsertOne) UpdateOrganization

func (u *UserQualificationUpsertOne) UpdateOrganization() *UserQualificationUpsertOne

UpdateOrganization sets the "organization" field to the value that was provided on create.

func (*UserQualificationUpsertOne) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

func (*UserQualificationUpsertOne) UpdateUpdateTime

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserQualifications

type UserQualifications []*UserQualification

UserQualifications is a parsable slice of UserQualification.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

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) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) QueryActivities

func (uq *UserQuery) QueryActivities() *UserActivityQuery

QueryActivities chains the current query on the "activities" edge.

func (*UserQuery) QueryCareerGroups

func (uq *UserQuery) QueryCareerGroups() *UserCareerGroupQuery

QueryCareerGroups chains the current query on the "careerGroups" edge.

func (*UserQuery) QueryNotes

func (uq *UserQuery) QueryNotes() *UserNoteQuery

QueryNotes chains the current query on the "notes" edge.

func (*UserQuery) QueryQualifications

func (uq *UserQuery) QueryQualifications() *UserQualificationQuery

QueryQualifications chains the current query on the "qualifications" edge.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.User.Query().
	Select(user.FieldCreateTime).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithActivities

func (uq *UserQuery) WithActivities(opts ...func(*UserActivityQuery)) *UserQuery

WithActivities tells the query-builder to eager-load the nodes that are connected to the "activities" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithCareerGroups

func (uq *UserQuery) WithCareerGroups(opts ...func(*UserCareerGroupQuery)) *UserQuery

WithCareerGroups tells the query-builder to eager-load the nodes that are connected to the "careerGroups" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithNotes

func (uq *UserQuery) WithNotes(opts ...func(*UserNoteQuery)) *UserQuery

WithNotes tells the query-builder to eager-load the nodes that are connected to the "notes" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithQualifications

func (uq *UserQuery) WithQualifications(opts ...func(*UserQualificationQuery)) *UserQuery

WithQualifications tells the query-builder to eager-load the nodes that are connected to the "qualifications" 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) Aggregate

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *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 (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *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 (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *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 (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *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 (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *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 (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *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 (s *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 any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *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 (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, 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) AddActivities

func (uu *UserUpdate) AddActivities(u ...*UserActivity) *UserUpdate

AddActivities adds the "activities" edges to the UserActivity entity.

func (*UserUpdate) AddActivityIDs

func (uu *UserUpdate) AddActivityIDs(ids ...int) *UserUpdate

AddActivityIDs adds the "activities" edge to the UserActivity entity by IDs.

func (*UserUpdate) AddBirthdayDay

func (uu *UserUpdate) AddBirthdayDay(i int) *UserUpdate

AddBirthdayDay adds i to the "birthday_day" field.

func (*UserUpdate) AddBirthdayMonth

func (uu *UserUpdate) AddBirthdayMonth(i int) *UserUpdate

AddBirthdayMonth adds i to the "birthday_month" field.

func (*UserUpdate) AddBirthdayYear

func (uu *UserUpdate) AddBirthdayYear(i int) *UserUpdate

AddBirthdayYear adds i to the "birthday_year" field.

func (*UserUpdate) AddCareerGroupIDs

func (uu *UserUpdate) AddCareerGroupIDs(ids ...int) *UserUpdate

AddCareerGroupIDs adds the "careerGroups" edge to the UserCareerGroup entity by IDs.

func (*UserUpdate) AddCareerGroups

func (uu *UserUpdate) AddCareerGroups(u ...*UserCareerGroup) *UserUpdate

AddCareerGroups adds the "careerGroups" edges to the UserCareerGroup entity.

func (*UserUpdate) AddNoteIDs

func (uu *UserUpdate) AddNoteIDs(ids ...int) *UserUpdate

AddNoteIDs adds the "notes" edge to the UserNote entity by IDs.

func (*UserUpdate) AddNotes

func (uu *UserUpdate) AddNotes(u ...*UserNote) *UserUpdate

AddNotes adds the "notes" edges to the UserNote entity.

func (*UserUpdate) AddQualificationIDs

func (uu *UserUpdate) AddQualificationIDs(ids ...int) *UserUpdate

AddQualificationIDs adds the "qualifications" edge to the UserQualification entity by IDs.

func (*UserUpdate) AddQualifications

func (uu *UserUpdate) AddQualifications(u ...*UserQualification) *UserUpdate

AddQualifications adds the "qualifications" edges to the UserQualification entity.

func (*UserUpdate) ClearActivities

func (uu *UserUpdate) ClearActivities() *UserUpdate

ClearActivities clears all "activities" edges to the UserActivity entity.

func (*UserUpdate) ClearAvatarURL

func (uu *UserUpdate) ClearAvatarURL() *UserUpdate

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserUpdate) ClearBelongTo

func (uu *UserUpdate) ClearBelongTo() *UserUpdate

ClearBelongTo clears the value of the "belong_to" field.

func (*UserUpdate) ClearCareerGroups

func (uu *UserUpdate) ClearCareerGroups() *UserUpdate

ClearCareerGroups clears all "careerGroups" edges to the UserCareerGroup entity.

func (*UserUpdate) ClearJob

func (uu *UserUpdate) ClearJob() *UserUpdate

ClearJob clears the value of the "job" field.

func (*UserUpdate) ClearNickname

func (uu *UserUpdate) ClearNickname() *UserUpdate

ClearNickname clears the value of the "nickname" field.

func (*UserUpdate) ClearNotes

func (uu *UserUpdate) ClearNotes() *UserUpdate

ClearNotes clears all "notes" edges to the UserNote entity.

func (*UserUpdate) ClearPr

func (uu *UserUpdate) ClearPr() *UserUpdate

ClearPr clears the value of the "pr" field.

func (*UserUpdate) ClearQualifications

func (uu *UserUpdate) ClearQualifications() *UserUpdate

ClearQualifications clears all "qualifications" edges to the UserQualification 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) RemoveActivities

func (uu *UserUpdate) RemoveActivities(u ...*UserActivity) *UserUpdate

RemoveActivities removes "activities" edges to UserActivity entities.

func (*UserUpdate) RemoveActivityIDs

func (uu *UserUpdate) RemoveActivityIDs(ids ...int) *UserUpdate

RemoveActivityIDs removes the "activities" edge to UserActivity entities by IDs.

func (*UserUpdate) RemoveCareerGroupIDs

func (uu *UserUpdate) RemoveCareerGroupIDs(ids ...int) *UserUpdate

RemoveCareerGroupIDs removes the "careerGroups" edge to UserCareerGroup entities by IDs.

func (*UserUpdate) RemoveCareerGroups

func (uu *UserUpdate) RemoveCareerGroups(u ...*UserCareerGroup) *UserUpdate

RemoveCareerGroups removes "careerGroups" edges to UserCareerGroup entities.

func (*UserUpdate) RemoveNoteIDs

func (uu *UserUpdate) RemoveNoteIDs(ids ...int) *UserUpdate

RemoveNoteIDs removes the "notes" edge to UserNote entities by IDs.

func (*UserUpdate) RemoveNotes

func (uu *UserUpdate) RemoveNotes(u ...*UserNote) *UserUpdate

RemoveNotes removes "notes" edges to UserNote entities.

func (*UserUpdate) RemoveQualificationIDs

func (uu *UserUpdate) RemoveQualificationIDs(ids ...int) *UserUpdate

RemoveQualificationIDs removes the "qualifications" edge to UserQualification entities by IDs.

func (*UserUpdate) RemoveQualifications

func (uu *UserUpdate) RemoveQualifications(u ...*UserQualification) *UserUpdate

RemoveQualifications removes "qualifications" edges to UserQualification 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) SetAvatarURL

func (uu *UserUpdate) SetAvatarURL(s string) *UserUpdate

SetAvatarURL sets the "avatar_url" field.

func (*UserUpdate) SetBelongTo

func (uu *UserUpdate) SetBelongTo(s string) *UserUpdate

SetBelongTo sets the "belong_to" field.

func (*UserUpdate) SetBirthdayDay

func (uu *UserUpdate) SetBirthdayDay(i int) *UserUpdate

SetBirthdayDay sets the "birthday_day" field.

func (*UserUpdate) SetBirthdayMonth

func (uu *UserUpdate) SetBirthdayMonth(i int) *UserUpdate

SetBirthdayMonth sets the "birthday_month" field.

func (*UserUpdate) SetBirthdayYear

func (uu *UserUpdate) SetBirthdayYear(i int) *UserUpdate

SetBirthdayYear sets the "birthday_year" field.

func (*UserUpdate) SetJob

func (uu *UserUpdate) SetJob(s string) *UserUpdate

SetJob sets the "job" field.

func (*UserUpdate) SetName

func (uu *UserUpdate) SetName(s string) *UserUpdate

SetName sets the "name" field.

func (*UserUpdate) SetNickname

func (uu *UserUpdate) SetNickname(s string) *UserUpdate

SetNickname sets the "nickname" field.

func (*UserUpdate) SetNillableAvatarURL

func (uu *UserUpdate) SetNillableAvatarURL(s *string) *UserUpdate

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*UserUpdate) SetNillableBelongTo

func (uu *UserUpdate) SetNillableBelongTo(s *string) *UserUpdate

SetNillableBelongTo sets the "belong_to" field if the given value is not nil.

func (*UserUpdate) SetNillableJob

func (uu *UserUpdate) SetNillableJob(s *string) *UserUpdate

SetNillableJob sets the "job" field if the given value is not nil.

func (*UserUpdate) SetNillableNickname

func (uu *UserUpdate) SetNillableNickname(s *string) *UserUpdate

SetNillableNickname sets the "nickname" field if the given value is not nil.

func (*UserUpdate) SetNillablePr

func (uu *UserUpdate) SetNillablePr(s *string) *UserUpdate

SetNillablePr sets the "pr" field if the given value is not nil.

func (*UserUpdate) SetPr

func (uu *UserUpdate) SetPr(s string) *UserUpdate

SetPr sets the "pr" field.

func (*UserUpdate) SetUpdateTime

func (uu *UserUpdate) SetUpdateTime(t time.Time) *UserUpdate

SetUpdateTime sets the "update_time" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddActivities

func (uuo *UserUpdateOne) AddActivities(u ...*UserActivity) *UserUpdateOne

AddActivities adds the "activities" edges to the UserActivity entity.

func (*UserUpdateOne) AddActivityIDs

func (uuo *UserUpdateOne) AddActivityIDs(ids ...int) *UserUpdateOne

AddActivityIDs adds the "activities" edge to the UserActivity entity by IDs.

func (*UserUpdateOne) AddBirthdayDay

func (uuo *UserUpdateOne) AddBirthdayDay(i int) *UserUpdateOne

AddBirthdayDay adds i to the "birthday_day" field.

func (*UserUpdateOne) AddBirthdayMonth

func (uuo *UserUpdateOne) AddBirthdayMonth(i int) *UserUpdateOne

AddBirthdayMonth adds i to the "birthday_month" field.

func (*UserUpdateOne) AddBirthdayYear

func (uuo *UserUpdateOne) AddBirthdayYear(i int) *UserUpdateOne

AddBirthdayYear adds i to the "birthday_year" field.

func (*UserUpdateOne) AddCareerGroupIDs

func (uuo *UserUpdateOne) AddCareerGroupIDs(ids ...int) *UserUpdateOne

AddCareerGroupIDs adds the "careerGroups" edge to the UserCareerGroup entity by IDs.

func (*UserUpdateOne) AddCareerGroups

func (uuo *UserUpdateOne) AddCareerGroups(u ...*UserCareerGroup) *UserUpdateOne

AddCareerGroups adds the "careerGroups" edges to the UserCareerGroup entity.

func (*UserUpdateOne) AddNoteIDs

func (uuo *UserUpdateOne) AddNoteIDs(ids ...int) *UserUpdateOne

AddNoteIDs adds the "notes" edge to the UserNote entity by IDs.

func (*UserUpdateOne) AddNotes

func (uuo *UserUpdateOne) AddNotes(u ...*UserNote) *UserUpdateOne

AddNotes adds the "notes" edges to the UserNote entity.

func (*UserUpdateOne) AddQualificationIDs

func (uuo *UserUpdateOne) AddQualificationIDs(ids ...int) *UserUpdateOne

AddQualificationIDs adds the "qualifications" edge to the UserQualification entity by IDs.

func (*UserUpdateOne) AddQualifications

func (uuo *UserUpdateOne) AddQualifications(u ...*UserQualification) *UserUpdateOne

AddQualifications adds the "qualifications" edges to the UserQualification entity.

func (*UserUpdateOne) ClearActivities

func (uuo *UserUpdateOne) ClearActivities() *UserUpdateOne

ClearActivities clears all "activities" edges to the UserActivity entity.

func (*UserUpdateOne) ClearAvatarURL

func (uuo *UserUpdateOne) ClearAvatarURL() *UserUpdateOne

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserUpdateOne) ClearBelongTo

func (uuo *UserUpdateOne) ClearBelongTo() *UserUpdateOne

ClearBelongTo clears the value of the "belong_to" field.

func (*UserUpdateOne) ClearCareerGroups

func (uuo *UserUpdateOne) ClearCareerGroups() *UserUpdateOne

ClearCareerGroups clears all "careerGroups" edges to the UserCareerGroup entity.

func (*UserUpdateOne) ClearJob

func (uuo *UserUpdateOne) ClearJob() *UserUpdateOne

ClearJob clears the value of the "job" field.

func (*UserUpdateOne) ClearNickname

func (uuo *UserUpdateOne) ClearNickname() *UserUpdateOne

ClearNickname clears the value of the "nickname" field.

func (*UserUpdateOne) ClearNotes

func (uuo *UserUpdateOne) ClearNotes() *UserUpdateOne

ClearNotes clears all "notes" edges to the UserNote entity.

func (*UserUpdateOne) ClearPr

func (uuo *UserUpdateOne) ClearPr() *UserUpdateOne

ClearPr clears the value of the "pr" field.

func (*UserUpdateOne) ClearQualifications

func (uuo *UserUpdateOne) ClearQualifications() *UserUpdateOne

ClearQualifications clears all "qualifications" edges to the UserQualification 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) RemoveActivities

func (uuo *UserUpdateOne) RemoveActivities(u ...*UserActivity) *UserUpdateOne

RemoveActivities removes "activities" edges to UserActivity entities.

func (*UserUpdateOne) RemoveActivityIDs

func (uuo *UserUpdateOne) RemoveActivityIDs(ids ...int) *UserUpdateOne

RemoveActivityIDs removes the "activities" edge to UserActivity entities by IDs.

func (*UserUpdateOne) RemoveCareerGroupIDs

func (uuo *UserUpdateOne) RemoveCareerGroupIDs(ids ...int) *UserUpdateOne

RemoveCareerGroupIDs removes the "careerGroups" edge to UserCareerGroup entities by IDs.

func (*UserUpdateOne) RemoveCareerGroups

func (uuo *UserUpdateOne) RemoveCareerGroups(u ...*UserCareerGroup) *UserUpdateOne

RemoveCareerGroups removes "careerGroups" edges to UserCareerGroup entities.

func (*UserUpdateOne) RemoveNoteIDs

func (uuo *UserUpdateOne) RemoveNoteIDs(ids ...int) *UserUpdateOne

RemoveNoteIDs removes the "notes" edge to UserNote entities by IDs.

func (*UserUpdateOne) RemoveNotes

func (uuo *UserUpdateOne) RemoveNotes(u ...*UserNote) *UserUpdateOne

RemoveNotes removes "notes" edges to UserNote entities.

func (*UserUpdateOne) RemoveQualificationIDs

func (uuo *UserUpdateOne) RemoveQualificationIDs(ids ...int) *UserUpdateOne

RemoveQualificationIDs removes the "qualifications" edge to UserQualification entities by IDs.

func (*UserUpdateOne) RemoveQualifications

func (uuo *UserUpdateOne) RemoveQualifications(u ...*UserQualification) *UserUpdateOne

RemoveQualifications removes "qualifications" edges to UserQualification entities.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetAvatarURL

func (uuo *UserUpdateOne) SetAvatarURL(s string) *UserUpdateOne

SetAvatarURL sets the "avatar_url" field.

func (*UserUpdateOne) SetBelongTo

func (uuo *UserUpdateOne) SetBelongTo(s string) *UserUpdateOne

SetBelongTo sets the "belong_to" field.

func (*UserUpdateOne) SetBirthdayDay

func (uuo *UserUpdateOne) SetBirthdayDay(i int) *UserUpdateOne

SetBirthdayDay sets the "birthday_day" field.

func (*UserUpdateOne) SetBirthdayMonth

func (uuo *UserUpdateOne) SetBirthdayMonth(i int) *UserUpdateOne

SetBirthdayMonth sets the "birthday_month" field.

func (*UserUpdateOne) SetBirthdayYear

func (uuo *UserUpdateOne) SetBirthdayYear(i int) *UserUpdateOne

SetBirthdayYear sets the "birthday_year" field.

func (*UserUpdateOne) SetJob

func (uuo *UserUpdateOne) SetJob(s string) *UserUpdateOne

SetJob sets the "job" field.

func (*UserUpdateOne) SetName

func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne

SetName sets the "name" field.

func (*UserUpdateOne) SetNickname

func (uuo *UserUpdateOne) SetNickname(s string) *UserUpdateOne

SetNickname sets the "nickname" field.

func (*UserUpdateOne) SetNillableAvatarURL

func (uuo *UserUpdateOne) SetNillableAvatarURL(s *string) *UserUpdateOne

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*UserUpdateOne) SetNillableBelongTo

func (uuo *UserUpdateOne) SetNillableBelongTo(s *string) *UserUpdateOne

SetNillableBelongTo sets the "belong_to" field if the given value is not nil.

func (*UserUpdateOne) SetNillableJob

func (uuo *UserUpdateOne) SetNillableJob(s *string) *UserUpdateOne

SetNillableJob sets the "job" field if the given value is not nil.

func (*UserUpdateOne) SetNillableNickname

func (uuo *UserUpdateOne) SetNillableNickname(s *string) *UserUpdateOne

SetNillableNickname sets the "nickname" field if the given value is not nil.

func (*UserUpdateOne) SetNillablePr

func (uuo *UserUpdateOne) SetNillablePr(s *string) *UserUpdateOne

SetNillablePr sets the "pr" field if the given value is not nil.

func (*UserUpdateOne) SetPr

func (uuo *UserUpdateOne) SetPr(s string) *UserUpdateOne

SetPr sets the "pr" field.

func (*UserUpdateOne) SetUpdateTime

func (uuo *UserUpdateOne) SetUpdateTime(t time.Time) *UserUpdateOne

SetUpdateTime sets the "update_time" field.

func (*UserUpdateOne) Where

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type UserUpsert

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) AddBirthdayDay

func (u *UserUpsert) AddBirthdayDay(v int) *UserUpsert

AddBirthdayDay adds v to the "birthday_day" field.

func (*UserUpsert) AddBirthdayMonth

func (u *UserUpsert) AddBirthdayMonth(v int) *UserUpsert

AddBirthdayMonth adds v to the "birthday_month" field.

func (*UserUpsert) AddBirthdayYear

func (u *UserUpsert) AddBirthdayYear(v int) *UserUpsert

AddBirthdayYear adds v to the "birthday_year" field.

func (*UserUpsert) ClearAvatarURL

func (u *UserUpsert) ClearAvatarURL() *UserUpsert

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserUpsert) ClearBelongTo

func (u *UserUpsert) ClearBelongTo() *UserUpsert

ClearBelongTo clears the value of the "belong_to" field.

func (*UserUpsert) ClearJob

func (u *UserUpsert) ClearJob() *UserUpsert

ClearJob clears the value of the "job" field.

func (*UserUpsert) ClearNickname

func (u *UserUpsert) ClearNickname() *UserUpsert

ClearNickname clears the value of the "nickname" field.

func (*UserUpsert) ClearPr

func (u *UserUpsert) ClearPr() *UserUpsert

ClearPr clears the value of the "pr" field.

func (*UserUpsert) SetAvatarURL

func (u *UserUpsert) SetAvatarURL(v string) *UserUpsert

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsert) SetBelongTo

func (u *UserUpsert) SetBelongTo(v string) *UserUpsert

SetBelongTo sets the "belong_to" field.

func (*UserUpsert) SetBirthdayDay

func (u *UserUpsert) SetBirthdayDay(v int) *UserUpsert

SetBirthdayDay sets the "birthday_day" field.

func (*UserUpsert) SetBirthdayMonth

func (u *UserUpsert) SetBirthdayMonth(v int) *UserUpsert

SetBirthdayMonth sets the "birthday_month" field.

func (*UserUpsert) SetBirthdayYear

func (u *UserUpsert) SetBirthdayYear(v int) *UserUpsert

SetBirthdayYear sets the "birthday_year" field.

func (*UserUpsert) SetJob

func (u *UserUpsert) SetJob(v string) *UserUpsert

SetJob sets the "job" field.

func (*UserUpsert) SetName

func (u *UserUpsert) SetName(v string) *UserUpsert

SetName sets the "name" field.

func (*UserUpsert) SetNickname

func (u *UserUpsert) SetNickname(v string) *UserUpsert

SetNickname sets the "nickname" field.

func (*UserUpsert) SetPr

func (u *UserUpsert) SetPr(v string) *UserUpsert

SetPr sets the "pr" field.

func (*UserUpsert) SetUpdateTime

func (u *UserUpsert) SetUpdateTime(v time.Time) *UserUpsert

SetUpdateTime sets the "update_time" field.

func (*UserUpsert) UpdateAvatarURL

func (u *UserUpsert) UpdateAvatarURL() *UserUpsert

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsert) UpdateBelongTo

func (u *UserUpsert) UpdateBelongTo() *UserUpsert

UpdateBelongTo sets the "belong_to" field to the value that was provided on create.

func (*UserUpsert) UpdateBirthdayDay

func (u *UserUpsert) UpdateBirthdayDay() *UserUpsert

UpdateBirthdayDay sets the "birthday_day" field to the value that was provided on create.

func (*UserUpsert) UpdateBirthdayMonth

func (u *UserUpsert) UpdateBirthdayMonth() *UserUpsert

UpdateBirthdayMonth sets the "birthday_month" field to the value that was provided on create.

func (*UserUpsert) UpdateBirthdayYear

func (u *UserUpsert) UpdateBirthdayYear() *UserUpsert

UpdateBirthdayYear sets the "birthday_year" field to the value that was provided on create.

func (*UserUpsert) UpdateJob

func (u *UserUpsert) UpdateJob() *UserUpsert

UpdateJob sets the "job" field to the value that was provided on create.

func (*UserUpsert) UpdateName

func (u *UserUpsert) UpdateName() *UserUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsert) UpdateNickname

func (u *UserUpsert) UpdateNickname() *UserUpsert

UpdateNickname sets the "nickname" field to the value that was provided on create.

func (*UserUpsert) UpdatePr

func (u *UserUpsert) UpdatePr() *UserUpsert

UpdatePr sets the "pr" field to the value that was provided on create.

func (*UserUpsert) UpdateUpdateTime

func (u *UserUpsert) UpdateUpdateTime() *UserUpsert

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserUpsertBulk

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) AddBirthdayDay

func (u *UserUpsertBulk) AddBirthdayDay(v int) *UserUpsertBulk

AddBirthdayDay adds v to the "birthday_day" field.

func (*UserUpsertBulk) AddBirthdayMonth

func (u *UserUpsertBulk) AddBirthdayMonth(v int) *UserUpsertBulk

AddBirthdayMonth adds v to the "birthday_month" field.

func (*UserUpsertBulk) AddBirthdayYear

func (u *UserUpsertBulk) AddBirthdayYear(v int) *UserUpsertBulk

AddBirthdayYear adds v to the "birthday_year" field.

func (*UserUpsertBulk) ClearAvatarURL

func (u *UserUpsertBulk) ClearAvatarURL() *UserUpsertBulk

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserUpsertBulk) ClearBelongTo

func (u *UserUpsertBulk) ClearBelongTo() *UserUpsertBulk

ClearBelongTo clears the value of the "belong_to" field.

func (*UserUpsertBulk) ClearJob

func (u *UserUpsertBulk) ClearJob() *UserUpsertBulk

ClearJob clears the value of the "job" field.

func (*UserUpsertBulk) ClearNickname

func (u *UserUpsertBulk) ClearNickname() *UserUpsertBulk

ClearNickname clears the value of the "nickname" field.

func (*UserUpsertBulk) ClearPr

func (u *UserUpsertBulk) ClearPr() *UserUpsertBulk

ClearPr clears the value of the "pr" field.

func (*UserUpsertBulk) DoNothing

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetAvatarURL

func (u *UserUpsertBulk) SetAvatarURL(v string) *UserUpsertBulk

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsertBulk) SetBelongTo

func (u *UserUpsertBulk) SetBelongTo(v string) *UserUpsertBulk

SetBelongTo sets the "belong_to" field.

func (*UserUpsertBulk) SetBirthdayDay

func (u *UserUpsertBulk) SetBirthdayDay(v int) *UserUpsertBulk

SetBirthdayDay sets the "birthday_day" field.

func (*UserUpsertBulk) SetBirthdayMonth

func (u *UserUpsertBulk) SetBirthdayMonth(v int) *UserUpsertBulk

SetBirthdayMonth sets the "birthday_month" field.

func (*UserUpsertBulk) SetBirthdayYear

func (u *UserUpsertBulk) SetBirthdayYear(v int) *UserUpsertBulk

SetBirthdayYear sets the "birthday_year" field.

func (*UserUpsertBulk) SetJob

func (u *UserUpsertBulk) SetJob(v string) *UserUpsertBulk

SetJob sets the "job" field.

func (*UserUpsertBulk) SetName

func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk

SetName sets the "name" field.

func (*UserUpsertBulk) SetNickname

func (u *UserUpsertBulk) SetNickname(v string) *UserUpsertBulk

SetNickname sets the "nickname" field.

func (*UserUpsertBulk) SetPr

func (u *UserUpsertBulk) SetPr(v string) *UserUpsertBulk

SetPr sets the "pr" field.

func (*UserUpsertBulk) SetUpdateTime

func (u *UserUpsertBulk) SetUpdateTime(v time.Time) *UserUpsertBulk

SetUpdateTime sets the "update_time" field.

func (*UserUpsertBulk) Update

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateAvatarURL

func (u *UserUpsertBulk) UpdateAvatarURL() *UserUpsertBulk

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateBelongTo

func (u *UserUpsertBulk) UpdateBelongTo() *UserUpsertBulk

UpdateBelongTo sets the "belong_to" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateBirthdayDay

func (u *UserUpsertBulk) UpdateBirthdayDay() *UserUpsertBulk

UpdateBirthdayDay sets the "birthday_day" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateBirthdayMonth

func (u *UserUpsertBulk) UpdateBirthdayMonth() *UserUpsertBulk

UpdateBirthdayMonth sets the "birthday_month" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateBirthdayYear

func (u *UserUpsertBulk) UpdateBirthdayYear() *UserUpsertBulk

UpdateBirthdayYear sets the "birthday_year" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateJob

func (u *UserUpsertBulk) UpdateJob() *UserUpsertBulk

UpdateJob sets the "job" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateName

func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserUpsertBulk) UpdateNickname

func (u *UserUpsertBulk) UpdateNickname() *UserUpsertBulk

UpdateNickname sets the "nickname" field to the value that was provided on create.

func (*UserUpsertBulk) UpdatePr

func (u *UserUpsertBulk) UpdatePr() *UserUpsertBulk

UpdatePr sets the "pr" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUpdateTime

func (u *UserUpsertBulk) UpdateUpdateTime() *UserUpsertBulk

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type UserUpsertOne

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) AddBirthdayDay

func (u *UserUpsertOne) AddBirthdayDay(v int) *UserUpsertOne

AddBirthdayDay adds v to the "birthday_day" field.

func (*UserUpsertOne) AddBirthdayMonth

func (u *UserUpsertOne) AddBirthdayMonth(v int) *UserUpsertOne

AddBirthdayMonth adds v to the "birthday_month" field.

func (*UserUpsertOne) AddBirthdayYear

func (u *UserUpsertOne) AddBirthdayYear(v int) *UserUpsertOne

AddBirthdayYear adds v to the "birthday_year" field.

func (*UserUpsertOne) ClearAvatarURL

func (u *UserUpsertOne) ClearAvatarURL() *UserUpsertOne

ClearAvatarURL clears the value of the "avatar_url" field.

func (*UserUpsertOne) ClearBelongTo

func (u *UserUpsertOne) ClearBelongTo() *UserUpsertOne

ClearBelongTo clears the value of the "belong_to" field.

func (*UserUpsertOne) ClearJob

func (u *UserUpsertOne) ClearJob() *UserUpsertOne

ClearJob clears the value of the "job" field.

func (*UserUpsertOne) ClearNickname

func (u *UserUpsertOne) ClearNickname() *UserUpsertOne

ClearNickname clears the value of the "nickname" field.

func (*UserUpsertOne) ClearPr

func (u *UserUpsertOne) ClearPr() *UserUpsertOne

ClearPr clears the value of the "pr" field.

func (*UserUpsertOne) DoNothing

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID

func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX

func (u *UserUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetAvatarURL

func (u *UserUpsertOne) SetAvatarURL(v string) *UserUpsertOne

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsertOne) SetBelongTo

func (u *UserUpsertOne) SetBelongTo(v string) *UserUpsertOne

SetBelongTo sets the "belong_to" field.

func (*UserUpsertOne) SetBirthdayDay

func (u *UserUpsertOne) SetBirthdayDay(v int) *UserUpsertOne

SetBirthdayDay sets the "birthday_day" field.

func (*UserUpsertOne) SetBirthdayMonth

func (u *UserUpsertOne) SetBirthdayMonth(v int) *UserUpsertOne

SetBirthdayMonth sets the "birthday_month" field.

func (*UserUpsertOne) SetBirthdayYear

func (u *UserUpsertOne) SetBirthdayYear(v int) *UserUpsertOne

SetBirthdayYear sets the "birthday_year" field.

func (*UserUpsertOne) SetJob

func (u *UserUpsertOne) SetJob(v string) *UserUpsertOne

SetJob sets the "job" field.

func (*UserUpsertOne) SetName

func (u *UserUpsertOne) SetName(v string) *UserUpsertOne

SetName sets the "name" field.

func (*UserUpsertOne) SetNickname

func (u *UserUpsertOne) SetNickname(v string) *UserUpsertOne

SetNickname sets the "nickname" field.

func (*UserUpsertOne) SetPr

func (u *UserUpsertOne) SetPr(v string) *UserUpsertOne

SetPr sets the "pr" field.

func (*UserUpsertOne) SetUpdateTime

func (u *UserUpsertOne) SetUpdateTime(v time.Time) *UserUpsertOne

SetUpdateTime sets the "update_time" field.

func (*UserUpsertOne) Update

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateAvatarURL

func (u *UserUpsertOne) UpdateAvatarURL() *UserUpsertOne

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsertOne) UpdateBelongTo

func (u *UserUpsertOne) UpdateBelongTo() *UserUpsertOne

UpdateBelongTo sets the "belong_to" field to the value that was provided on create.

func (*UserUpsertOne) UpdateBirthdayDay

func (u *UserUpsertOne) UpdateBirthdayDay() *UserUpsertOne

UpdateBirthdayDay sets the "birthday_day" field to the value that was provided on create.

func (*UserUpsertOne) UpdateBirthdayMonth

func (u *UserUpsertOne) UpdateBirthdayMonth() *UserUpsertOne

UpdateBirthdayMonth sets the "birthday_month" field to the value that was provided on create.

func (*UserUpsertOne) UpdateBirthdayYear

func (u *UserUpsertOne) UpdateBirthdayYear() *UserUpsertOne

UpdateBirthdayYear sets the "birthday_year" field to the value that was provided on create.

func (*UserUpsertOne) UpdateJob

func (u *UserUpsertOne) UpdateJob() *UserUpsertOne

UpdateJob sets the "job" field to the value that was provided on create.

func (*UserUpsertOne) UpdateName

func (u *UserUpsertOne) UpdateName() *UserUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserUpsertOne) UpdateNickname

func (u *UserUpsertOne) UpdateNickname() *UserUpsertOne

UpdateNickname sets the "nickname" field to the value that was provided on create.

func (*UserUpsertOne) UpdatePr

func (u *UserUpsertOne) UpdatePr() *UserUpsertOne

UpdatePr sets the "pr" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUpdateTime

func (u *UserUpsertOne) UpdateUpdateTime() *UserUpsertOne

UpdateUpdateTime sets the "update_time" field to the value that was provided on create.

type Users

type Users []*User

Users is a parsable slice of User.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL