ent

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: Apache-2.0 Imports: 37 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.
	TypeCard      = "Card"
	TypeComment   = "Comment"
	TypeFieldType = "FieldType"
	TypeFile      = "File"
	TypeFileType  = "FileType"
	TypeGoods     = "Goods"
	TypeGroup     = "Group"
	TypeGroupInfo = "GroupInfo"
	TypeItem      = "Item"
	TypeNode      = "Node"
	TypePet       = "Pet"
	TypeSpec      = "Spec"
	TypeTask      = "Task"
	TypeUser      = "User"
)

Variables

This section is empty.

Functions

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 Card

type Card struct {

	// ID of the ent.
	ID int `json:"-"`
	// 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"`
	// Balance holds the value of the "balance" field.
	Balance float64 `json:"balance,omitempty"`
	// Number holds the value of the "number" field.
	Number string `json:"-"`
	// Name holds the value of the "name" field.
	// Exact name written on card
	Name string `json:"name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CardQuery when eager-loading is set.
	Edges CardEdges `json:"edges" mashraki:"edges"`

	// StaticField defined by templates.
	StaticField string `json:"boring,omitempty"`
	// contains filtered or unexported fields
}

Card is the model entity for the Card schema.

func (*Card) QueryOwner

func (c *Card) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the Card entity.

func (*Card) QuerySpec

func (c *Card) QuerySpec() *SpecQuery

QuerySpec queries the "spec" edge of the Card entity.

func (*Card) String

func (c *Card) String() string

String implements the fmt.Stringer.

func (*Card) Unwrap

func (c *Card) Unwrap() *Card

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

func (c *Card) Update() *CardUpdateOne

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

type CardClient

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

CardClient is a client for the Card schema.

func NewCardClient

func NewCardClient(c config) *CardClient

NewCardClient returns a client for the Card from the given config.

func (*CardClient) Create

func (c *CardClient) Create() *CardCreate

Create returns a create builder for Card.

func (*CardClient) CreateBulk

func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk

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

func (*CardClient) Delete

func (c *CardClient) Delete() *CardDelete

Delete returns a delete builder for Card.

func (*CardClient) DeleteOne

func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*CardClient) DeleteOneID

func (c *CardClient) DeleteOneID(id int) *CardDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*CardClient) Get

func (c *CardClient) Get(ctx context.Context, id int) (*Card, error)

Get returns a Card entity by its id.

func (*CardClient) GetX

func (c *CardClient) GetX(ctx context.Context, id int) *Card

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

func (*CardClient) Hooks

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

Hooks returns the client hooks.

func (*CardClient) Query

func (c *CardClient) Query() *CardQuery

Query returns a query builder for Card.

func (*CardClient) QueryOwner

func (c *CardClient) QueryOwner(ca *Card) *UserQuery

QueryOwner queries the owner edge of a Card.

func (*CardClient) QuerySpec

func (c *CardClient) QuerySpec(ca *Card) *SpecQuery

QuerySpec queries the spec edge of a Card.

func (*CardClient) Update

func (c *CardClient) Update() *CardUpdate

Update returns an update builder for Card.

func (*CardClient) UpdateOne

func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CardClient) UpdateOneID

func (c *CardClient) UpdateOneID(id int) *CardUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CardClient) Use

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

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

type CardCreate

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

CardCreate is the builder for creating a Card entity.

func (*CardCreate) AddSpec

func (cc *CardCreate) AddSpec(s ...*Spec) *CardCreate

AddSpec adds the "spec" edges to the Spec entity.

func (*CardCreate) AddSpecIDs

func (cc *CardCreate) AddSpecIDs(ids ...int) *CardCreate

AddSpecIDs adds the "spec" edge to the Spec entity by IDs.

func (*CardCreate) Exec added in v0.9.0

func (cc *CardCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CardCreate) ExecX added in v0.9.0

func (cc *CardCreate) ExecX(ctx context.Context)

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

func (*CardCreate) Mutation

func (cc *CardCreate) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardCreate) OnConflict added in v0.9.0

func (cc *CardCreate) OnConflict(opts ...sql.ConflictOption) *CardUpsertOne

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

client.Card.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.CardUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*CardCreate) OnConflictColumns added in v0.9.0

func (cc *CardCreate) OnConflictColumns(columns ...string) *CardUpsertOne

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

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

func (*CardCreate) Save

func (cc *CardCreate) Save(ctx context.Context) (*Card, error)

Save creates the Card in the database.

func (*CardCreate) SaveX

func (cc *CardCreate) SaveX(ctx context.Context) *Card

SaveX calls Save and panics if Save returns an error.

func (*CardCreate) SetBalance added in v0.7.0

func (cc *CardCreate) SetBalance(f float64) *CardCreate

SetBalance sets the "balance" field.

func (*CardCreate) SetCreateTime

func (cc *CardCreate) SetCreateTime(t time.Time) *CardCreate

SetCreateTime sets the "create_time" field.

func (*CardCreate) SetName

func (cc *CardCreate) SetName(s string) *CardCreate

SetName sets the "name" field.

func (*CardCreate) SetNillableBalance added in v0.7.0

func (cc *CardCreate) SetNillableBalance(f *float64) *CardCreate

SetNillableBalance sets the "balance" field if the given value is not nil.

func (*CardCreate) SetNillableCreateTime

func (cc *CardCreate) SetNillableCreateTime(t *time.Time) *CardCreate

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

func (*CardCreate) SetNillableName

func (cc *CardCreate) SetNillableName(s *string) *CardCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*CardCreate) SetNillableOwnerID

func (cc *CardCreate) SetNillableOwnerID(id *int) *CardCreate

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*CardCreate) SetNillableUpdateTime

func (cc *CardCreate) SetNillableUpdateTime(t *time.Time) *CardCreate

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

func (*CardCreate) SetNumber

func (cc *CardCreate) SetNumber(s string) *CardCreate

SetNumber sets the "number" field.

func (*CardCreate) SetOwner

func (cc *CardCreate) SetOwner(u *User) *CardCreate

SetOwner sets the "owner" edge to the User entity.

func (*CardCreate) SetOwnerID

func (cc *CardCreate) SetOwnerID(id int) *CardCreate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*CardCreate) SetUpdateTime

func (cc *CardCreate) SetUpdateTime(t time.Time) *CardCreate

SetUpdateTime sets the "update_time" field.

type CardCreateBulk

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

CardCreateBulk is the builder for creating many Card entities in bulk.

func (*CardCreateBulk) Exec added in v0.9.0

func (ccb *CardCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CardCreateBulk) ExecX added in v0.9.0

func (ccb *CardCreateBulk) ExecX(ctx context.Context)

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

func (*CardCreateBulk) OnConflict added in v0.9.0

func (ccb *CardCreateBulk) OnConflict(opts ...sql.ConflictOption) *CardUpsertBulk

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

client.Card.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.CardUpsert) {
		SetCreateTime(v+v).
	}).
	Exec(ctx)

func (*CardCreateBulk) OnConflictColumns added in v0.9.0

func (ccb *CardCreateBulk) OnConflictColumns(columns ...string) *CardUpsertBulk

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

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

func (*CardCreateBulk) Save

func (ccb *CardCreateBulk) Save(ctx context.Context) ([]*Card, error)

Save creates the Card entities in the database.

func (*CardCreateBulk) SaveX

func (ccb *CardCreateBulk) SaveX(ctx context.Context) []*Card

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

type CardDelete

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

CardDelete is the builder for deleting a Card entity.

func (*CardDelete) Exec

func (cd *CardDelete) Exec(ctx context.Context) (int, error)

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

func (*CardDelete) ExecX

func (cd *CardDelete) ExecX(ctx context.Context) int

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

func (*CardDelete) Where

func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete

Where appends a list predicates to the CardDelete builder.

type CardDeleteOne

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

CardDeleteOne is the builder for deleting a single Card entity.

func (*CardDeleteOne) Exec

func (cdo *CardDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CardDeleteOne) ExecX

func (cdo *CardDeleteOne) ExecX(ctx context.Context)

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

type CardEdges

type CardEdges struct {
	// Owner holds the value of the owner edge.
	Owner *User `json:"owner,omitempty"`
	// Spec holds the value of the spec edge.
	Spec []*Spec `json:"spec,omitempty"`
	// contains filtered or unexported fields
}

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

func (CardEdges) OwnerOrErr

func (e CardEdges) OwnerOrErr() (*User, error)

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

func (CardEdges) SpecOrErr

func (e CardEdges) SpecOrErr() ([]*Spec, error)

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

type CardExtension

type CardExtension struct {
	Number string
	Name   string
	Spec   int
}

CardExtension is a type for holding the extension information defined in the schema.

type CardFilter

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

CardFilter provides a generic filtering capability at runtime for CardQuery.

func (*CardFilter) Where

func (f *CardFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*CardFilter) WhereBalance added in v0.7.0

func (f *CardFilter) WhereBalance(p entql.Float64P)

WhereBalance applies the entql float64 predicate on the balance field.

func (*CardFilter) WhereCreateTime

func (f *CardFilter) WhereCreateTime(p entql.TimeP)

WhereCreateTime applies the entql time.Time predicate on the create_time field.

func (*CardFilter) WhereHasOwner

func (f *CardFilter) WhereHasOwner()

WhereHasOwner applies a predicate to check if query has an edge owner.

func (*CardFilter) WhereHasOwnerWith

func (f *CardFilter) WhereHasOwnerWith(preds ...predicate.User)

WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).

func (*CardFilter) WhereHasSpec

func (f *CardFilter) WhereHasSpec()

WhereHasSpec applies a predicate to check if query has an edge spec.

func (*CardFilter) WhereHasSpecWith

func (f *CardFilter) WhereHasSpecWith(preds ...predicate.Spec)

WhereHasSpecWith applies a predicate to check if query has an edge spec with a given conditions (other predicates).

func (*CardFilter) WhereID

func (f *CardFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*CardFilter) WhereName

func (f *CardFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*CardFilter) WhereNumber

func (f *CardFilter) WhereNumber(p entql.StringP)

WhereNumber applies the entql string predicate on the number field.

func (*CardFilter) WhereUpdateTime

func (f *CardFilter) WhereUpdateTime(p entql.TimeP)

WhereUpdateTime applies the entql time.Time predicate on the update_time field.

type CardGroupBy

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

CardGroupBy is the group-by builder for Card entities.

func (*CardGroupBy) Aggregate

func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy

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

func (*CardGroupBy) Bool

func (cgb *CardGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) BoolX

func (cgb *CardGroupBy) BoolX(ctx context.Context) bool

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

func (*CardGroupBy) Bools

func (cgb *CardGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) BoolsX

func (cgb *CardGroupBy) BoolsX(ctx context.Context) []bool

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

func (*CardGroupBy) Float64

func (cgb *CardGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) Float64X

func (cgb *CardGroupBy) Float64X(ctx context.Context) float64

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

func (*CardGroupBy) Float64s

func (cgb *CardGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) Float64sX

func (cgb *CardGroupBy) Float64sX(ctx context.Context) []float64

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

func (*CardGroupBy) Int

func (cgb *CardGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) IntX

func (cgb *CardGroupBy) IntX(ctx context.Context) int

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

func (*CardGroupBy) Ints

func (cgb *CardGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) IntsX

func (cgb *CardGroupBy) IntsX(ctx context.Context) []int

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

func (*CardGroupBy) Scan

func (cgb *CardGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*CardGroupBy) ScanX

func (cgb *CardGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*CardGroupBy) String

func (cgb *CardGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) StringX

func (cgb *CardGroupBy) StringX(ctx context.Context) string

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

func (*CardGroupBy) Strings

func (cgb *CardGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*CardGroupBy) StringsX

func (cgb *CardGroupBy) StringsX(ctx context.Context) []string

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

type CardMutation

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

CardMutation represents an operation that mutates the Card nodes in the graph.

func (*CardMutation) AddBalance added in v0.7.0

func (m *CardMutation) AddBalance(f float64)

AddBalance adds f to the "balance" field.

func (*CardMutation) AddField

func (m *CardMutation) 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 (*CardMutation) AddSpecIDs

func (m *CardMutation) AddSpecIDs(ids ...int)

AddSpecIDs adds the "spec" edge to the Spec entity by ids.

func (*CardMutation) AddedBalance added in v0.7.0

func (m *CardMutation) AddedBalance() (r float64, exists bool)

AddedBalance returns the value that was added to the "balance" field in this mutation.

func (*CardMutation) AddedEdges

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

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

func (*CardMutation) AddedField

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

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

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

func (*CardMutation) AddedIDs

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

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

func (*CardMutation) Balance added in v0.7.0

func (m *CardMutation) Balance() (r float64, exists bool)

Balance returns the value of the "balance" field in the mutation.

func (*CardMutation) ClearEdge

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

func (m *CardMutation) 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 (*CardMutation) ClearName

func (m *CardMutation) ClearName()

ClearName clears the value of the "name" field.

func (*CardMutation) ClearOwner

func (m *CardMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*CardMutation) ClearSpec

func (m *CardMutation) ClearSpec()

ClearSpec clears the "spec" edge to the Spec entity.

func (*CardMutation) ClearedEdges

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

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

func (*CardMutation) ClearedFields

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

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

func (CardMutation) Client

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

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

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

func (*CardMutation) EdgeCleared

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

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

func (*CardMutation) Field

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

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

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

func (*CardMutation) Fields

func (m *CardMutation) 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 (*CardMutation) Filter

func (m *CardMutation) Filter() *CardFilter

Filter returns an entql.Where implementation to apply filters on the CardMutation builder.

func (*CardMutation) ID

func (m *CardMutation) 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 (*CardMutation) IDs added in v0.10.0

func (m *CardMutation) 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 (*CardMutation) Name

func (m *CardMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*CardMutation) NameCleared

func (m *CardMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*CardMutation) Number

func (m *CardMutation) Number() (r string, exists bool)

Number returns the value of the "number" field in the mutation.

func (*CardMutation) OldBalance added in v0.7.0

func (m *CardMutation) OldBalance(ctx context.Context) (v float64, err error)

OldBalance returns the old "balance" field's value of the Card entity. If the Card 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 (*CardMutation) OldCreateTime

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

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

func (m *CardMutation) 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 (*CardMutation) OldName

func (m *CardMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Card entity. If the Card 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 (*CardMutation) OldNumber

func (m *CardMutation) OldNumber(ctx context.Context) (v string, err error)

OldNumber returns the old "number" field's value of the Card entity. If the Card 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 (*CardMutation) OldUpdateTime

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

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

func (m *CardMutation) Op() Op

Op returns the operation name.

func (*CardMutation) OwnerCleared

func (m *CardMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*CardMutation) OwnerID

func (m *CardMutation) OwnerID() (id int, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*CardMutation) OwnerIDs

func (m *CardMutation) OwnerIDs() (ids []int)

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

func (*CardMutation) RemoveSpecIDs

func (m *CardMutation) RemoveSpecIDs(ids ...int)

RemoveSpecIDs removes the "spec" edge to the Spec entity by IDs.

func (*CardMutation) RemovedEdges

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

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

func (*CardMutation) RemovedIDs

func (m *CardMutation) 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 (*CardMutation) RemovedSpecIDs

func (m *CardMutation) RemovedSpecIDs() (ids []int)

RemovedSpec returns the removed IDs of the "spec" edge to the Spec entity.

func (*CardMutation) ResetBalance added in v0.7.0

func (m *CardMutation) ResetBalance()

ResetBalance resets all changes to the "balance" field.

func (*CardMutation) ResetCreateTime

func (m *CardMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*CardMutation) ResetEdge

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

func (m *CardMutation) 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 (*CardMutation) ResetName

func (m *CardMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CardMutation) ResetNumber

func (m *CardMutation) ResetNumber()

ResetNumber resets all changes to the "number" field.

func (*CardMutation) ResetOwner

func (m *CardMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*CardMutation) ResetSpec

func (m *CardMutation) ResetSpec()

ResetSpec resets all changes to the "spec" edge.

func (*CardMutation) ResetUpdateTime

func (m *CardMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*CardMutation) SetBalance added in v0.7.0

func (m *CardMutation) SetBalance(f float64)

SetBalance sets the "balance" field.

func (*CardMutation) SetCreateTime

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

SetCreateTime sets the "create_time" field.

func (*CardMutation) SetField

func (m *CardMutation) 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 (*CardMutation) SetName

func (m *CardMutation) SetName(s string)

SetName sets the "name" field.

func (*CardMutation) SetNumber

func (m *CardMutation) SetNumber(s string)

SetNumber sets the "number" field.

func (*CardMutation) SetOwnerID

func (m *CardMutation) SetOwnerID(id int)

SetOwnerID sets the "owner" edge to the User entity by id.

func (*CardMutation) SetUpdateTime

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

SetUpdateTime sets the "update_time" field.

func (*CardMutation) SpecCleared

func (m *CardMutation) SpecCleared() bool

SpecCleared reports if the "spec" edge to the Spec entity was cleared.

func (*CardMutation) SpecIDs

func (m *CardMutation) SpecIDs() (ids []int)

SpecIDs returns the "spec" edge IDs in the mutation.

func (CardMutation) Tx

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

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

func (*CardMutation) Type

func (m *CardMutation) Type() string

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

func (*CardMutation) UpdateTime

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

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

func (*CardMutation) Where added in v0.9.0

func (m *CardMutation) Where(ps ...predicate.Card)

Where appends a list predicates to the CardMutation builder.

type CardQuery

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

CardQuery is the builder for querying Card entities.

func (*CardQuery) All

func (cq *CardQuery) All(ctx context.Context) ([]*Card, error)

All executes the query and returns a list of Cards.

func (*CardQuery) AllX

func (cq *CardQuery) AllX(ctx context.Context) []*Card

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

func (*CardQuery) Clone

func (cq *CardQuery) Clone() *CardQuery

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

func (*CardQuery) Count

func (cq *CardQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CardQuery) CountX

func (cq *CardQuery) CountX(ctx context.Context) int

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

func (*CardQuery) Exist

func (cq *CardQuery) Exist(ctx context.Context) (bool, error)

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

func (*CardQuery) ExistX

func (cq *CardQuery) ExistX(ctx context.Context) bool

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

func (*CardQuery) Filter

func (cq *CardQuery) Filter() *CardFilter

Filter returns a Filter implementation to apply filters on the CardQuery builder.

func (*CardQuery) First

func (cq *CardQuery) First(ctx context.Context) (*Card, error)

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

func (*CardQuery) FirstID

func (cq *CardQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CardQuery) FirstIDX

func (cq *CardQuery) FirstIDX(ctx context.Context) int

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

func (*CardQuery) FirstX

func (cq *CardQuery) FirstX(ctx context.Context) *Card

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

func (*CardQuery) ForShare added in v0.9.0

func (cq *CardQuery) ForShare(opts ...sql.LockOption) *CardQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*CardQuery) ForUpdate added in v0.9.0

func (cq *CardQuery) ForUpdate(opts ...sql.LockOption) *CardQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*CardQuery) GroupBy

func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy

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.Card.Query().
	GroupBy(card.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CardQuery) IDs

func (cq *CardQuery) IDs(ctx context.Context) ([]int, error)

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

func (*CardQuery) IDsX

func (cq *CardQuery) IDsX(ctx context.Context) []int

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

func (*CardQuery) Limit

func (cq *CardQuery) Limit(limit int) *CardQuery

Limit adds a limit step to the query.

func (*CardQuery) Modify added in v0.9.0

func (cq *CardQuery) Modify(modifiers ...func(s *sql.Selector)) *CardSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CardQuery) Offset

func (cq *CardQuery) Offset(offset int) *CardQuery

Offset adds an offset step to the query.

func (*CardQuery) Only

func (cq *CardQuery) Only(ctx context.Context) (*Card, error)

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

func (*CardQuery) OnlyID

func (cq *CardQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CardQuery) OnlyIDX

func (cq *CardQuery) OnlyIDX(ctx context.Context) int

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

func (*CardQuery) OnlyX

func (cq *CardQuery) OnlyX(ctx context.Context) *Card

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

func (*CardQuery) Order

func (cq *CardQuery) Order(o ...OrderFunc) *CardQuery

Order adds an order step to the query.

func (*CardQuery) QueryOwner

func (cq *CardQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*CardQuery) QuerySpec

func (cq *CardQuery) QuerySpec() *SpecQuery

QuerySpec chains the current query on the "spec" edge.

func (*CardQuery) Select

func (cq *CardQuery) Select(fields ...string) *CardSelect

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.Card.Query().
	Select(card.FieldCreateTime).
	Scan(ctx, &v)

func (*CardQuery) Unique added in v0.8.0

func (cq *CardQuery) Unique(unique bool) *CardQuery

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 (*CardQuery) Where

func (cq *CardQuery) Where(ps ...predicate.Card) *CardQuery

Where adds a new predicate for the CardQuery builder.

func (*CardQuery) WithOwner

func (cq *CardQuery) WithOwner(opts ...func(*UserQuery)) *CardQuery

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

func (*CardQuery) WithSpec

func (cq *CardQuery) WithSpec(opts ...func(*SpecQuery)) *CardQuery

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

type CardSelect

type CardSelect struct {
	*CardQuery
	// contains filtered or unexported fields
}

CardSelect is the builder for selecting fields of Card entities.

func (*CardSelect) Bool

func (cs *CardSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*CardSelect) BoolX

func (cs *CardSelect) BoolX(ctx context.Context) bool

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

func (*CardSelect) Bools

func (cs *CardSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*CardSelect) BoolsX

func (cs *CardSelect) BoolsX(ctx context.Context) []bool

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

func (*CardSelect) Float64

func (cs *CardSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*CardSelect) Float64X

func (cs *CardSelect) Float64X(ctx context.Context) float64

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

func (*CardSelect) Float64s

func (cs *CardSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*CardSelect) Float64sX

func (cs *CardSelect) Float64sX(ctx context.Context) []float64

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

func (*CardSelect) Int

func (cs *CardSelect) Int(ctx context.Context) (_ int, err error)

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

func (*CardSelect) IntX

func (cs *CardSelect) IntX(ctx context.Context) int

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

func (*CardSelect) Ints

func (cs *CardSelect) Ints(ctx context.Context) ([]int, error)

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

func (*CardSelect) IntsX

func (cs *CardSelect) IntsX(ctx context.Context) []int

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

func (*CardSelect) Modify added in v0.9.0

func (cs *CardSelect) Modify(modifiers ...func(s *sql.Selector)) *CardSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CardSelect) Scan

func (cs *CardSelect) Scan(ctx context.Context, v interface{}) error

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

func (*CardSelect) ScanX

func (cs *CardSelect) ScanX(ctx context.Context, v interface{})

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

func (*CardSelect) String

func (cs *CardSelect) String(ctx context.Context) (_ string, err error)

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

func (*CardSelect) StringX

func (cs *CardSelect) StringX(ctx context.Context) string

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

func (*CardSelect) Strings

func (cs *CardSelect) Strings(ctx context.Context) ([]string, error)

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

func (*CardSelect) StringsX

func (cs *CardSelect) StringsX(ctx context.Context) []string

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

type CardUpdate

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

CardUpdate is the builder for updating Card entities.

func (*CardUpdate) AddBalance added in v0.7.0

func (cu *CardUpdate) AddBalance(f float64) *CardUpdate

AddBalance adds f to the "balance" field.

func (*CardUpdate) AddSpec

func (cu *CardUpdate) AddSpec(s ...*Spec) *CardUpdate

AddSpec adds the "spec" edges to the Spec entity.

func (*CardUpdate) AddSpecIDs

func (cu *CardUpdate) AddSpecIDs(ids ...int) *CardUpdate

AddSpecIDs adds the "spec" edge to the Spec entity by IDs.

func (*CardUpdate) ClearName

func (cu *CardUpdate) ClearName() *CardUpdate

ClearName clears the value of the "name" field.

func (*CardUpdate) ClearOwner

func (cu *CardUpdate) ClearOwner() *CardUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*CardUpdate) ClearSpec

func (cu *CardUpdate) ClearSpec() *CardUpdate

ClearSpec clears all "spec" edges to the Spec entity.

func (*CardUpdate) Exec

func (cu *CardUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CardUpdate) ExecX

func (cu *CardUpdate) ExecX(ctx context.Context)

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

func (*CardUpdate) Mutation

func (cu *CardUpdate) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardUpdate) RemoveSpec

func (cu *CardUpdate) RemoveSpec(s ...*Spec) *CardUpdate

RemoveSpec removes "spec" edges to Spec entities.

func (*CardUpdate) RemoveSpecIDs

func (cu *CardUpdate) RemoveSpecIDs(ids ...int) *CardUpdate

RemoveSpecIDs removes the "spec" edge to Spec entities by IDs.

func (*CardUpdate) Save

func (cu *CardUpdate) Save(ctx context.Context) (int, error)

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

func (*CardUpdate) SaveX

func (cu *CardUpdate) SaveX(ctx context.Context) int

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

func (*CardUpdate) SetBalance added in v0.7.0

func (cu *CardUpdate) SetBalance(f float64) *CardUpdate

SetBalance sets the "balance" field.

func (*CardUpdate) SetName

func (cu *CardUpdate) SetName(s string) *CardUpdate

SetName sets the "name" field.

func (*CardUpdate) SetNillableBalance added in v0.7.0

func (cu *CardUpdate) SetNillableBalance(f *float64) *CardUpdate

SetNillableBalance sets the "balance" field if the given value is not nil.

func (*CardUpdate) SetNillableName

func (cu *CardUpdate) SetNillableName(s *string) *CardUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*CardUpdate) SetNillableOwnerID

func (cu *CardUpdate) SetNillableOwnerID(id *int) *CardUpdate

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*CardUpdate) SetOwner

func (cu *CardUpdate) SetOwner(u *User) *CardUpdate

SetOwner sets the "owner" edge to the User entity.

func (*CardUpdate) SetOwnerID

func (cu *CardUpdate) SetOwnerID(id int) *CardUpdate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*CardUpdate) SetUpdateTime added in v0.10.0

func (cu *CardUpdate) SetUpdateTime(t time.Time) *CardUpdate

SetUpdateTime sets the "update_time" field.

func (*CardUpdate) Where

func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate

Where appends a list predicates to the CardUpdate builder.

type CardUpdateOne

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

CardUpdateOne is the builder for updating a single Card entity.

func (*CardUpdateOne) AddBalance added in v0.7.0

func (cuo *CardUpdateOne) AddBalance(f float64) *CardUpdateOne

AddBalance adds f to the "balance" field.

func (*CardUpdateOne) AddSpec

func (cuo *CardUpdateOne) AddSpec(s ...*Spec) *CardUpdateOne

AddSpec adds the "spec" edges to the Spec entity.

func (*CardUpdateOne) AddSpecIDs

func (cuo *CardUpdateOne) AddSpecIDs(ids ...int) *CardUpdateOne

AddSpecIDs adds the "spec" edge to the Spec entity by IDs.

func (*CardUpdateOne) ClearName

func (cuo *CardUpdateOne) ClearName() *CardUpdateOne

ClearName clears the value of the "name" field.

func (*CardUpdateOne) ClearOwner

func (cuo *CardUpdateOne) ClearOwner() *CardUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*CardUpdateOne) ClearSpec

func (cuo *CardUpdateOne) ClearSpec() *CardUpdateOne

ClearSpec clears all "spec" edges to the Spec entity.

func (*CardUpdateOne) Exec

func (cuo *CardUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CardUpdateOne) ExecX

func (cuo *CardUpdateOne) ExecX(ctx context.Context)

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

func (*CardUpdateOne) Mutation

func (cuo *CardUpdateOne) Mutation() *CardMutation

Mutation returns the CardMutation object of the builder.

func (*CardUpdateOne) RemoveSpec

func (cuo *CardUpdateOne) RemoveSpec(s ...*Spec) *CardUpdateOne

RemoveSpec removes "spec" edges to Spec entities.

func (*CardUpdateOne) RemoveSpecIDs

func (cuo *CardUpdateOne) RemoveSpecIDs(ids ...int) *CardUpdateOne

RemoveSpecIDs removes the "spec" edge to Spec entities by IDs.

func (*CardUpdateOne) Save

func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error)

Save executes the query and returns the updated Card entity.

func (*CardUpdateOne) SaveX

func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card

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

func (*CardUpdateOne) Select added in v0.8.0

func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne

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

func (*CardUpdateOne) SetBalance added in v0.7.0

func (cuo *CardUpdateOne) SetBalance(f float64) *CardUpdateOne

SetBalance sets the "balance" field.

func (*CardUpdateOne) SetName

func (cuo *CardUpdateOne) SetName(s string) *CardUpdateOne

SetName sets the "name" field.

func (*CardUpdateOne) SetNillableBalance added in v0.7.0

func (cuo *CardUpdateOne) SetNillableBalance(f *float64) *CardUpdateOne

SetNillableBalance sets the "balance" field if the given value is not nil.

func (*CardUpdateOne) SetNillableName

func (cuo *CardUpdateOne) SetNillableName(s *string) *CardUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*CardUpdateOne) SetNillableOwnerID

func (cuo *CardUpdateOne) SetNillableOwnerID(id *int) *CardUpdateOne

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*CardUpdateOne) SetOwner

func (cuo *CardUpdateOne) SetOwner(u *User) *CardUpdateOne

SetOwner sets the "owner" edge to the User entity.

func (*CardUpdateOne) SetOwnerID

func (cuo *CardUpdateOne) SetOwnerID(id int) *CardUpdateOne

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*CardUpdateOne) SetUpdateTime added in v0.10.0

func (cuo *CardUpdateOne) SetUpdateTime(t time.Time) *CardUpdateOne

SetUpdateTime sets the "update_time" field.

type CardUpsert added in v0.9.0

type CardUpsert struct {
	*sql.UpdateSet
}

CardUpsert is the "OnConflict" setter.

func (*CardUpsert) AddBalance added in v0.10.0

func (u *CardUpsert) AddBalance(v float64) *CardUpsert

AddBalance adds v to the "balance" field.

func (*CardUpsert) ClearName added in v0.9.0

func (u *CardUpsert) ClearName() *CardUpsert

ClearName clears the value of the "name" field.

func (*CardUpsert) SetBalance added in v0.9.0

func (u *CardUpsert) SetBalance(v float64) *CardUpsert

SetBalance sets the "balance" field.

func (*CardUpsert) SetCreateTime added in v0.9.0

func (u *CardUpsert) SetCreateTime(v time.Time) *CardUpsert

SetCreateTime sets the "create_time" field.

func (*CardUpsert) SetName added in v0.9.0

func (u *CardUpsert) SetName(v string) *CardUpsert

SetName sets the "name" field.

func (*CardUpsert) SetNumber added in v0.9.0

func (u *CardUpsert) SetNumber(v string) *CardUpsert

SetNumber sets the "number" field.

func (*CardUpsert) SetUpdateTime added in v0.9.0

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

SetUpdateTime sets the "update_time" field.

func (*CardUpsert) UpdateBalance added in v0.9.0

func (u *CardUpsert) UpdateBalance() *CardUpsert

UpdateBalance sets the "balance" field to the value that was provided on create.

func (*CardUpsert) UpdateCreateTime added in v0.9.0

func (u *CardUpsert) UpdateCreateTime() *CardUpsert

UpdateCreateTime sets the "create_time" field to the value that was provided on create.

func (*CardUpsert) UpdateName added in v0.9.0

func (u *CardUpsert) UpdateName() *CardUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*CardUpsert) UpdateNumber added in v0.9.0

func (u *CardUpsert) UpdateNumber() *CardUpsert

UpdateNumber sets the "number" field to the value that was provided on create.

func (*CardUpsert) UpdateUpdateTime added in v0.9.0

func (u *CardUpsert) UpdateUpdateTime() *CardUpsert

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

type CardUpsertBulk added in v0.9.0

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

CardUpsertBulk is the builder for "upsert"-ing a bulk of Card nodes.

func (*CardUpsertBulk) AddBalance added in v0.10.0

func (u *CardUpsertBulk) AddBalance(v float64) *CardUpsertBulk

AddBalance adds v to the "balance" field.

func (*CardUpsertBulk) ClearName added in v0.9.0

func (u *CardUpsertBulk) ClearName() *CardUpsertBulk

ClearName clears the value of the "name" field.

func (*CardUpsertBulk) DoNothing added in v0.9.0

func (u *CardUpsertBulk) DoNothing() *CardUpsertBulk

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

func (*CardUpsertBulk) Exec added in v0.9.0

func (u *CardUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CardUpsertBulk) ExecX added in v0.9.0

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

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

func (*CardUpsertBulk) Ignore added in v0.9.0

func (u *CardUpsertBulk) Ignore() *CardUpsertBulk

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

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

func (*CardUpsertBulk) SetBalance added in v0.9.0

func (u *CardUpsertBulk) SetBalance(v float64) *CardUpsertBulk

SetBalance sets the "balance" field.

func (*CardUpsertBulk) SetCreateTime added in v0.9.0

func (u *CardUpsertBulk) SetCreateTime(v time.Time) *CardUpsertBulk

SetCreateTime sets the "create_time" field.

func (*CardUpsertBulk) SetName added in v0.9.0

func (u *CardUpsertBulk) SetName(v string) *CardUpsertBulk

SetName sets the "name" field.

func (*CardUpsertBulk) SetNumber added in v0.9.0

func (u *CardUpsertBulk) SetNumber(v string) *CardUpsertBulk

SetNumber sets the "number" field.

func (*CardUpsertBulk) SetUpdateTime added in v0.9.0

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

SetUpdateTime sets the "update_time" field.

func (*CardUpsertBulk) Update added in v0.9.0

func (u *CardUpsertBulk) Update(set func(*CardUpsert)) *CardUpsertBulk

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

func (*CardUpsertBulk) UpdateBalance added in v0.9.0

func (u *CardUpsertBulk) UpdateBalance() *CardUpsertBulk

UpdateBalance sets the "balance" field to the value that was provided on create.

func (*CardUpsertBulk) UpdateCreateTime added in v0.9.0

func (u *CardUpsertBulk) UpdateCreateTime() *CardUpsertBulk

UpdateCreateTime sets the "create_time" field to the value that was provided on create.

func (*CardUpsertBulk) UpdateName added in v0.9.0

func (u *CardUpsertBulk) UpdateName() *CardUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*CardUpsertBulk) UpdateNewValues added in v0.9.0

func (u *CardUpsertBulk) UpdateNewValues() *CardUpsertBulk

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

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

func (*CardUpsertBulk) UpdateNumber added in v0.9.0

func (u *CardUpsertBulk) UpdateNumber() *CardUpsertBulk

UpdateNumber sets the "number" field to the value that was provided on create.

func (*CardUpsertBulk) UpdateUpdateTime added in v0.9.0

func (u *CardUpsertBulk) UpdateUpdateTime() *CardUpsertBulk

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

type CardUpsertOne added in v0.9.0

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

CardUpsertOne is the builder for "upsert"-ing

one Card node.

func (*CardUpsertOne) AddBalance added in v0.10.0

func (u *CardUpsertOne) AddBalance(v float64) *CardUpsertOne

AddBalance adds v to the "balance" field.

func (*CardUpsertOne) ClearName added in v0.9.0

func (u *CardUpsertOne) ClearName() *CardUpsertOne

ClearName clears the value of the "name" field.

func (*CardUpsertOne) DoNothing added in v0.9.0

func (u *CardUpsertOne) DoNothing() *CardUpsertOne

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

func (*CardUpsertOne) Exec added in v0.9.0

func (u *CardUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*CardUpsertOne) ExecX added in v0.9.0

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

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

func (*CardUpsertOne) ID added in v0.9.0

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

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

func (*CardUpsertOne) IDX added in v0.9.0

func (u *CardUpsertOne) IDX(ctx context.Context) int

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

func (*CardUpsertOne) Ignore added in v0.9.0

func (u *CardUpsertOne) Ignore() *CardUpsertOne

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

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

func (*CardUpsertOne) SetBalance added in v0.9.0

func (u *CardUpsertOne) SetBalance(v float64) *CardUpsertOne

SetBalance sets the "balance" field.

func (*CardUpsertOne) SetCreateTime added in v0.9.0

func (u *CardUpsertOne) SetCreateTime(v time.Time) *CardUpsertOne

SetCreateTime sets the "create_time" field.

func (*CardUpsertOne) SetName added in v0.9.0

func (u *CardUpsertOne) SetName(v string) *CardUpsertOne

SetName sets the "name" field.

func (*CardUpsertOne) SetNumber added in v0.9.0

func (u *CardUpsertOne) SetNumber(v string) *CardUpsertOne

SetNumber sets the "number" field.

func (*CardUpsertOne) SetUpdateTime added in v0.9.0

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

SetUpdateTime sets the "update_time" field.

func (*CardUpsertOne) Update added in v0.9.0

func (u *CardUpsertOne) Update(set func(*CardUpsert)) *CardUpsertOne

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

func (*CardUpsertOne) UpdateBalance added in v0.9.0

func (u *CardUpsertOne) UpdateBalance() *CardUpsertOne

UpdateBalance sets the "balance" field to the value that was provided on create.

func (*CardUpsertOne) UpdateCreateTime added in v0.9.0

func (u *CardUpsertOne) UpdateCreateTime() *CardUpsertOne

UpdateCreateTime sets the "create_time" field to the value that was provided on create.

func (*CardUpsertOne) UpdateName added in v0.9.0

func (u *CardUpsertOne) UpdateName() *CardUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*CardUpsertOne) UpdateNewValues added in v0.9.0

func (u *CardUpsertOne) UpdateNewValues() *CardUpsertOne

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

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

func (*CardUpsertOne) UpdateNumber added in v0.9.0

func (u *CardUpsertOne) UpdateNumber() *CardUpsertOne

UpdateNumber sets the "number" field to the value that was provided on create.

func (*CardUpsertOne) UpdateUpdateTime added in v0.9.0

func (u *CardUpsertOne) UpdateUpdateTime() *CardUpsertOne

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

type Cards

type Cards []*Card

Cards is a parsable slice of Card.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Card is the client for interacting with the Card builders.
	Card *CardClient
	// Comment is the client for interacting with the Comment builders.
	Comment *CommentClient
	// FieldType is the client for interacting with the FieldType builders.
	FieldType *FieldTypeClient
	// File is the client for interacting with the File builders.
	File *FileClient
	// FileType is the client for interacting with the FileType builders.
	FileType *FileTypeClient
	// Goods is the client for interacting with the Goods builders.
	Goods *GoodsClient
	// Group is the client for interacting with the Group builders.
	Group *GroupClient
	// GroupInfo is the client for interacting with the GroupInfo builders.
	GroupInfo *GroupInfoClient
	// Item is the client for interacting with the Item builders.
	Item *ItemClient
	// Node is the client for interacting with the Node builders.
	Node *NodeClient
	// Pet is the client for interacting with the Pet builders.
	Pet *PetClient
	// Spec is the client for interacting with the Spec builders.
	Spec *SpecClient
	// Task is the client for interacting with the Task builders.
	Task *TaskClient
	// User is the client for interacting with the User builders.
	User          *UserClient
	TemplateField struct{}
	// 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().
	Card.
	Query().
	Count(ctx)

func (*Client) Dialect added in v0.9.0

func (c *Client) Dialect() string

Dialect returns the driver dialect.

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 Comment

type Comment struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// UniqueInt holds the value of the "unique_int" field.
	UniqueInt int `json:"unique_int,omitempty"`
	// UniqueFloat holds the value of the "unique_float" field.
	UniqueFloat float64 `json:"unique_float,omitempty"`
	// NillableInt holds the value of the "nillable_int" field.
	NillableInt *int `json:"nillable_int,omitempty"`
	// contains filtered or unexported fields
}

Comment is the model entity for the Comment schema.

func (*Comment) String

func (c *Comment) String() string

String implements the fmt.Stringer.

func (*Comment) Unwrap

func (c *Comment) Unwrap() *Comment

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

func (c *Comment) Update() *CommentUpdateOne

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

type CommentClient

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

CommentClient is a client for the Comment schema.

func NewCommentClient

func NewCommentClient(c config) *CommentClient

NewCommentClient returns a client for the Comment from the given config.

func (*CommentClient) Create

func (c *CommentClient) Create() *CommentCreate

Create returns a create builder for Comment.

func (*CommentClient) CreateBulk

func (c *CommentClient) CreateBulk(builders ...*CommentCreate) *CommentCreateBulk

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

func (*CommentClient) Delete

func (c *CommentClient) Delete() *CommentDelete

Delete returns a delete builder for Comment.

func (*CommentClient) DeleteOne

func (c *CommentClient) DeleteOne(co *Comment) *CommentDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*CommentClient) DeleteOneID

func (c *CommentClient) DeleteOneID(id int) *CommentDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*CommentClient) Get

func (c *CommentClient) Get(ctx context.Context, id int) (*Comment, error)

Get returns a Comment entity by its id.

func (*CommentClient) GetX

func (c *CommentClient) GetX(ctx context.Context, id int) *Comment

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

func (*CommentClient) Hooks

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

Hooks returns the client hooks.

func (*CommentClient) Query

func (c *CommentClient) Query() *CommentQuery

Query returns a query builder for Comment.

func (*CommentClient) Update

func (c *CommentClient) Update() *CommentUpdate

Update returns an update builder for Comment.

func (*CommentClient) UpdateOne

func (c *CommentClient) UpdateOne(co *Comment) *CommentUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CommentClient) UpdateOneID

func (c *CommentClient) UpdateOneID(id int) *CommentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CommentClient) Use

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

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

type CommentCreate

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

CommentCreate is the builder for creating a Comment entity.

func (*CommentCreate) Exec added in v0.9.0

func (cc *CommentCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentCreate) ExecX added in v0.9.0

func (cc *CommentCreate) ExecX(ctx context.Context)

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

func (*CommentCreate) Mutation

func (cc *CommentCreate) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentCreate) OnConflict added in v0.9.0

func (cc *CommentCreate) OnConflict(opts ...sql.ConflictOption) *CommentUpsertOne

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

client.Comment.Create().
	SetUniqueInt(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.CommentUpsert) {
		SetUniqueInt(v+v).
	}).
	Exec(ctx)

func (*CommentCreate) OnConflictColumns added in v0.9.0

func (cc *CommentCreate) OnConflictColumns(columns ...string) *CommentUpsertOne

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

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

func (*CommentCreate) Save

func (cc *CommentCreate) Save(ctx context.Context) (*Comment, error)

Save creates the Comment in the database.

func (*CommentCreate) SaveX

func (cc *CommentCreate) SaveX(ctx context.Context) *Comment

SaveX calls Save and panics if Save returns an error.

func (*CommentCreate) SetNillableInt

func (cc *CommentCreate) SetNillableInt(i int) *CommentCreate

SetNillableInt sets the "nillable_int" field.

func (*CommentCreate) SetNillableNillableInt

func (cc *CommentCreate) SetNillableNillableInt(i *int) *CommentCreate

SetNillableNillableInt sets the "nillable_int" field if the given value is not nil.

func (*CommentCreate) SetUniqueFloat

func (cc *CommentCreate) SetUniqueFloat(f float64) *CommentCreate

SetUniqueFloat sets the "unique_float" field.

func (*CommentCreate) SetUniqueInt

func (cc *CommentCreate) SetUniqueInt(i int) *CommentCreate

SetUniqueInt sets the "unique_int" field.

type CommentCreateBulk

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

CommentCreateBulk is the builder for creating many Comment entities in bulk.

func (*CommentCreateBulk) Exec added in v0.9.0

func (ccb *CommentCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentCreateBulk) ExecX added in v0.9.0

func (ccb *CommentCreateBulk) ExecX(ctx context.Context)

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

func (*CommentCreateBulk) OnConflict added in v0.9.0

func (ccb *CommentCreateBulk) OnConflict(opts ...sql.ConflictOption) *CommentUpsertBulk

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

client.Comment.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.CommentUpsert) {
		SetUniqueInt(v+v).
	}).
	Exec(ctx)

func (*CommentCreateBulk) OnConflictColumns added in v0.9.0

func (ccb *CommentCreateBulk) OnConflictColumns(columns ...string) *CommentUpsertBulk

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

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

func (*CommentCreateBulk) Save

func (ccb *CommentCreateBulk) Save(ctx context.Context) ([]*Comment, error)

Save creates the Comment entities in the database.

func (*CommentCreateBulk) SaveX

func (ccb *CommentCreateBulk) SaveX(ctx context.Context) []*Comment

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

type CommentDelete

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

CommentDelete is the builder for deleting a Comment entity.

func (*CommentDelete) Exec

func (cd *CommentDelete) Exec(ctx context.Context) (int, error)

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

func (*CommentDelete) ExecX

func (cd *CommentDelete) ExecX(ctx context.Context) int

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

func (*CommentDelete) Where

func (cd *CommentDelete) Where(ps ...predicate.Comment) *CommentDelete

Where appends a list predicates to the CommentDelete builder.

type CommentDeleteOne

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

CommentDeleteOne is the builder for deleting a single Comment entity.

func (*CommentDeleteOne) Exec

func (cdo *CommentDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CommentDeleteOne) ExecX

func (cdo *CommentDeleteOne) ExecX(ctx context.Context)

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

type CommentFilter

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

CommentFilter provides a generic filtering capability at runtime for CommentQuery.

func (*CommentFilter) Where

func (f *CommentFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*CommentFilter) WhereID

func (f *CommentFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*CommentFilter) WhereNillableInt

func (f *CommentFilter) WhereNillableInt(p entql.IntP)

WhereNillableInt applies the entql int predicate on the nillable_int field.

func (*CommentFilter) WhereUniqueFloat

func (f *CommentFilter) WhereUniqueFloat(p entql.Float64P)

WhereUniqueFloat applies the entql float64 predicate on the unique_float field.

func (*CommentFilter) WhereUniqueInt

func (f *CommentFilter) WhereUniqueInt(p entql.IntP)

WhereUniqueInt applies the entql int predicate on the unique_int field.

type CommentGroupBy

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

CommentGroupBy is the group-by builder for Comment entities.

func (*CommentGroupBy) Aggregate

func (cgb *CommentGroupBy) Aggregate(fns ...AggregateFunc) *CommentGroupBy

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

func (*CommentGroupBy) Bool

func (cgb *CommentGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CommentGroupBy) BoolX

func (cgb *CommentGroupBy) BoolX(ctx context.Context) bool

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

func (*CommentGroupBy) Bools

func (cgb *CommentGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*CommentGroupBy) BoolsX

func (cgb *CommentGroupBy) BoolsX(ctx context.Context) []bool

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

func (*CommentGroupBy) Float64

func (cgb *CommentGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CommentGroupBy) Float64X

func (cgb *CommentGroupBy) Float64X(ctx context.Context) float64

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

func (*CommentGroupBy) Float64s

func (cgb *CommentGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*CommentGroupBy) Float64sX

func (cgb *CommentGroupBy) Float64sX(ctx context.Context) []float64

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

func (*CommentGroupBy) Int

func (cgb *CommentGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CommentGroupBy) IntX

func (cgb *CommentGroupBy) IntX(ctx context.Context) int

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

func (*CommentGroupBy) Ints

func (cgb *CommentGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*CommentGroupBy) IntsX

func (cgb *CommentGroupBy) IntsX(ctx context.Context) []int

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

func (*CommentGroupBy) Scan

func (cgb *CommentGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*CommentGroupBy) ScanX

func (cgb *CommentGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*CommentGroupBy) String

func (cgb *CommentGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*CommentGroupBy) StringX

func (cgb *CommentGroupBy) StringX(ctx context.Context) string

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

func (*CommentGroupBy) Strings

func (cgb *CommentGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*CommentGroupBy) StringsX

func (cgb *CommentGroupBy) StringsX(ctx context.Context) []string

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

type CommentMutation

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

CommentMutation represents an operation that mutates the Comment nodes in the graph.

func (*CommentMutation) AddField

func (m *CommentMutation) 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 (*CommentMutation) AddNillableInt

func (m *CommentMutation) AddNillableInt(i int)

AddNillableInt adds i to the "nillable_int" field.

func (*CommentMutation) AddUniqueFloat

func (m *CommentMutation) AddUniqueFloat(f float64)

AddUniqueFloat adds f to the "unique_float" field.

func (*CommentMutation) AddUniqueInt

func (m *CommentMutation) AddUniqueInt(i int)

AddUniqueInt adds i to the "unique_int" field.

func (*CommentMutation) AddedEdges

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

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

func (*CommentMutation) AddedField

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

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

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

func (*CommentMutation) AddedIDs

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

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

func (*CommentMutation) AddedNillableInt

func (m *CommentMutation) AddedNillableInt() (r int, exists bool)

AddedNillableInt returns the value that was added to the "nillable_int" field in this mutation.

func (*CommentMutation) AddedUniqueFloat

func (m *CommentMutation) AddedUniqueFloat() (r float64, exists bool)

AddedUniqueFloat returns the value that was added to the "unique_float" field in this mutation.

func (*CommentMutation) AddedUniqueInt

func (m *CommentMutation) AddedUniqueInt() (r int, exists bool)

AddedUniqueInt returns the value that was added to the "unique_int" field in this mutation.

func (*CommentMutation) ClearEdge

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

func (m *CommentMutation) 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 (*CommentMutation) ClearNillableInt

func (m *CommentMutation) ClearNillableInt()

ClearNillableInt clears the value of the "nillable_int" field.

func (*CommentMutation) ClearedEdges

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

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

func (*CommentMutation) ClearedFields

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

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

func (CommentMutation) Client

func (m CommentMutation) 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 (*CommentMutation) EdgeCleared

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

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

func (*CommentMutation) Field

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

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

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

func (*CommentMutation) Fields

func (m *CommentMutation) 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 (*CommentMutation) Filter

func (m *CommentMutation) Filter() *CommentFilter

Filter returns an entql.Where implementation to apply filters on the CommentMutation builder.

func (*CommentMutation) ID

func (m *CommentMutation) 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 (*CommentMutation) IDs added in v0.10.0

func (m *CommentMutation) 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 (*CommentMutation) NillableInt

func (m *CommentMutation) NillableInt() (r int, exists bool)

NillableInt returns the value of the "nillable_int" field in the mutation.

func (*CommentMutation) NillableIntCleared

func (m *CommentMutation) NillableIntCleared() bool

NillableIntCleared returns if the "nillable_int" field was cleared in this mutation.

func (*CommentMutation) OldField

func (m *CommentMutation) 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 (*CommentMutation) OldNillableInt

func (m *CommentMutation) OldNillableInt(ctx context.Context) (v *int, err error)

OldNillableInt returns the old "nillable_int" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldUniqueFloat

func (m *CommentMutation) OldUniqueFloat(ctx context.Context) (v float64, err error)

OldUniqueFloat returns the old "unique_float" field's value of the Comment entity. If the Comment 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 (*CommentMutation) OldUniqueInt

func (m *CommentMutation) OldUniqueInt(ctx context.Context) (v int, err error)

OldUniqueInt returns the old "unique_int" field's value of the Comment entity. If the Comment 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 (*CommentMutation) Op

func (m *CommentMutation) Op() Op

Op returns the operation name.

func (*CommentMutation) RemovedEdges

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

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

func (*CommentMutation) RemovedIDs

func (m *CommentMutation) 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 (*CommentMutation) ResetEdge

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

func (m *CommentMutation) 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 (*CommentMutation) ResetNillableInt

func (m *CommentMutation) ResetNillableInt()

ResetNillableInt resets all changes to the "nillable_int" field.

func (*CommentMutation) ResetUniqueFloat

func (m *CommentMutation) ResetUniqueFloat()

ResetUniqueFloat resets all changes to the "unique_float" field.

func (*CommentMutation) ResetUniqueInt

func (m *CommentMutation) ResetUniqueInt()

ResetUniqueInt resets all changes to the "unique_int" field.

func (*CommentMutation) SetField

func (m *CommentMutation) 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 (*CommentMutation) SetNillableInt

func (m *CommentMutation) SetNillableInt(i int)

SetNillableInt sets the "nillable_int" field.

func (*CommentMutation) SetUniqueFloat

func (m *CommentMutation) SetUniqueFloat(f float64)

SetUniqueFloat sets the "unique_float" field.

func (*CommentMutation) SetUniqueInt

func (m *CommentMutation) SetUniqueInt(i int)

SetUniqueInt sets the "unique_int" field.

func (CommentMutation) Tx

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

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

func (*CommentMutation) Type

func (m *CommentMutation) Type() string

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

func (*CommentMutation) UniqueFloat

func (m *CommentMutation) UniqueFloat() (r float64, exists bool)

UniqueFloat returns the value of the "unique_float" field in the mutation.

func (*CommentMutation) UniqueInt

func (m *CommentMutation) UniqueInt() (r int, exists bool)

UniqueInt returns the value of the "unique_int" field in the mutation.

func (*CommentMutation) Where added in v0.9.0

func (m *CommentMutation) Where(ps ...predicate.Comment)

Where appends a list predicates to the CommentMutation builder.

type CommentQuery

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

CommentQuery is the builder for querying Comment entities.

func (*CommentQuery) All

func (cq *CommentQuery) All(ctx context.Context) ([]*Comment, error)

All executes the query and returns a list of Comments.

func (*CommentQuery) AllX

func (cq *CommentQuery) AllX(ctx context.Context) []*Comment

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

func (*CommentQuery) Clone

func (cq *CommentQuery) Clone() *CommentQuery

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

func (*CommentQuery) Count

func (cq *CommentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CommentQuery) CountX

func (cq *CommentQuery) CountX(ctx context.Context) int

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

func (*CommentQuery) Exist

func (cq *CommentQuery) Exist(ctx context.Context) (bool, error)

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

func (*CommentQuery) ExistX

func (cq *CommentQuery) ExistX(ctx context.Context) bool

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

func (*CommentQuery) Filter

func (cq *CommentQuery) Filter() *CommentFilter

Filter returns a Filter implementation to apply filters on the CommentQuery builder.

func (*CommentQuery) First

func (cq *CommentQuery) First(ctx context.Context) (*Comment, error)

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

func (*CommentQuery) FirstID

func (cq *CommentQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*CommentQuery) FirstIDX

func (cq *CommentQuery) FirstIDX(ctx context.Context) int

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

func (*CommentQuery) FirstX

func (cq *CommentQuery) FirstX(ctx context.Context) *Comment

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

func (*CommentQuery) ForShare added in v0.9.0

func (cq *CommentQuery) ForShare(opts ...sql.LockOption) *CommentQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*CommentQuery) ForUpdate added in v0.9.0

func (cq *CommentQuery) ForUpdate(opts ...sql.LockOption) *CommentQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*CommentQuery) GroupBy

func (cq *CommentQuery) GroupBy(field string, fields ...string) *CommentGroupBy

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 {
	UniqueInt int `json:"unique_int,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Comment.Query().
	GroupBy(comment.FieldUniqueInt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CommentQuery) IDs

func (cq *CommentQuery) IDs(ctx context.Context) ([]int, error)

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

func (*CommentQuery) IDsX

func (cq *CommentQuery) IDsX(ctx context.Context) []int

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

func (*CommentQuery) Limit

func (cq *CommentQuery) Limit(limit int) *CommentQuery

Limit adds a limit step to the query.

func (*CommentQuery) Modify added in v0.9.0

func (cq *CommentQuery) Modify(modifiers ...func(s *sql.Selector)) *CommentSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CommentQuery) Offset

func (cq *CommentQuery) Offset(offset int) *CommentQuery

Offset adds an offset step to the query.

func (*CommentQuery) Only

func (cq *CommentQuery) Only(ctx context.Context) (*Comment, error)

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

func (*CommentQuery) OnlyID

func (cq *CommentQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*CommentQuery) OnlyIDX

func (cq *CommentQuery) OnlyIDX(ctx context.Context) int

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

func (*CommentQuery) OnlyX

func (cq *CommentQuery) OnlyX(ctx context.Context) *Comment

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

func (*CommentQuery) Order

func (cq *CommentQuery) Order(o ...OrderFunc) *CommentQuery

Order adds an order step to the query.

func (*CommentQuery) Select

func (cq *CommentQuery) Select(fields ...string) *CommentSelect

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 {
	UniqueInt int `json:"unique_int,omitempty"`
}

client.Comment.Query().
	Select(comment.FieldUniqueInt).
	Scan(ctx, &v)

func (*CommentQuery) Unique added in v0.8.0

func (cq *CommentQuery) Unique(unique bool) *CommentQuery

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 (*CommentQuery) Where

func (cq *CommentQuery) Where(ps ...predicate.Comment) *CommentQuery

Where adds a new predicate for the CommentQuery builder.

type CommentSelect

type CommentSelect struct {
	*CommentQuery
	// contains filtered or unexported fields
}

CommentSelect is the builder for selecting fields of Comment entities.

func (*CommentSelect) Bool

func (cs *CommentSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*CommentSelect) BoolX

func (cs *CommentSelect) BoolX(ctx context.Context) bool

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

func (*CommentSelect) Bools

func (cs *CommentSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*CommentSelect) BoolsX

func (cs *CommentSelect) BoolsX(ctx context.Context) []bool

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

func (*CommentSelect) Float64

func (cs *CommentSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*CommentSelect) Float64X

func (cs *CommentSelect) Float64X(ctx context.Context) float64

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

func (*CommentSelect) Float64s

func (cs *CommentSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*CommentSelect) Float64sX

func (cs *CommentSelect) Float64sX(ctx context.Context) []float64

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

func (*CommentSelect) Int

func (cs *CommentSelect) Int(ctx context.Context) (_ int, err error)

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

func (*CommentSelect) IntX

func (cs *CommentSelect) IntX(ctx context.Context) int

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

func (*CommentSelect) Ints

func (cs *CommentSelect) Ints(ctx context.Context) ([]int, error)

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

func (*CommentSelect) IntsX

func (cs *CommentSelect) IntsX(ctx context.Context) []int

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

func (*CommentSelect) Modify added in v0.9.0

func (cs *CommentSelect) Modify(modifiers ...func(s *sql.Selector)) *CommentSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CommentSelect) Scan

func (cs *CommentSelect) Scan(ctx context.Context, v interface{}) error

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

func (*CommentSelect) ScanX

func (cs *CommentSelect) ScanX(ctx context.Context, v interface{})

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

func (*CommentSelect) String

func (cs *CommentSelect) String(ctx context.Context) (_ string, err error)

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

func (*CommentSelect) StringX

func (cs *CommentSelect) StringX(ctx context.Context) string

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

func (*CommentSelect) Strings

func (cs *CommentSelect) Strings(ctx context.Context) ([]string, error)

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

func (*CommentSelect) StringsX

func (cs *CommentSelect) StringsX(ctx context.Context) []string

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

type CommentUpdate

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

CommentUpdate is the builder for updating Comment entities.

func (*CommentUpdate) AddNillableInt

func (cu *CommentUpdate) AddNillableInt(i int) *CommentUpdate

AddNillableInt adds i to the "nillable_int" field.

func (*CommentUpdate) AddUniqueFloat

func (cu *CommentUpdate) AddUniqueFloat(f float64) *CommentUpdate

AddUniqueFloat adds f to the "unique_float" field.

func (*CommentUpdate) AddUniqueInt

func (cu *CommentUpdate) AddUniqueInt(i int) *CommentUpdate

AddUniqueInt adds i to the "unique_int" field.

func (*CommentUpdate) ClearNillableInt

func (cu *CommentUpdate) ClearNillableInt() *CommentUpdate

ClearNillableInt clears the value of the "nillable_int" field.

func (*CommentUpdate) Exec

func (cu *CommentUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentUpdate) ExecX

func (cu *CommentUpdate) ExecX(ctx context.Context)

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

func (*CommentUpdate) Mutation

func (cu *CommentUpdate) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentUpdate) Save

func (cu *CommentUpdate) Save(ctx context.Context) (int, error)

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

func (*CommentUpdate) SaveX

func (cu *CommentUpdate) SaveX(ctx context.Context) int

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

func (*CommentUpdate) SetNillableInt

func (cu *CommentUpdate) SetNillableInt(i int) *CommentUpdate

SetNillableInt sets the "nillable_int" field.

func (*CommentUpdate) SetNillableNillableInt

func (cu *CommentUpdate) SetNillableNillableInt(i *int) *CommentUpdate

SetNillableNillableInt sets the "nillable_int" field if the given value is not nil.

func (*CommentUpdate) SetUniqueFloat

func (cu *CommentUpdate) SetUniqueFloat(f float64) *CommentUpdate

SetUniqueFloat sets the "unique_float" field.

func (*CommentUpdate) SetUniqueInt

func (cu *CommentUpdate) SetUniqueInt(i int) *CommentUpdate

SetUniqueInt sets the "unique_int" field.

func (*CommentUpdate) Where

func (cu *CommentUpdate) Where(ps ...predicate.Comment) *CommentUpdate

Where appends a list predicates to the CommentUpdate builder.

type CommentUpdateOne

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

CommentUpdateOne is the builder for updating a single Comment entity.

func (*CommentUpdateOne) AddNillableInt

func (cuo *CommentUpdateOne) AddNillableInt(i int) *CommentUpdateOne

AddNillableInt adds i to the "nillable_int" field.

func (*CommentUpdateOne) AddUniqueFloat

func (cuo *CommentUpdateOne) AddUniqueFloat(f float64) *CommentUpdateOne

AddUniqueFloat adds f to the "unique_float" field.

func (*CommentUpdateOne) AddUniqueInt

func (cuo *CommentUpdateOne) AddUniqueInt(i int) *CommentUpdateOne

AddUniqueInt adds i to the "unique_int" field.

func (*CommentUpdateOne) ClearNillableInt

func (cuo *CommentUpdateOne) ClearNillableInt() *CommentUpdateOne

ClearNillableInt clears the value of the "nillable_int" field.

func (*CommentUpdateOne) Exec

func (cuo *CommentUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CommentUpdateOne) ExecX

func (cuo *CommentUpdateOne) ExecX(ctx context.Context)

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

func (*CommentUpdateOne) Mutation

func (cuo *CommentUpdateOne) Mutation() *CommentMutation

Mutation returns the CommentMutation object of the builder.

func (*CommentUpdateOne) Save

func (cuo *CommentUpdateOne) Save(ctx context.Context) (*Comment, error)

Save executes the query and returns the updated Comment entity.

func (*CommentUpdateOne) SaveX

func (cuo *CommentUpdateOne) SaveX(ctx context.Context) *Comment

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

func (*CommentUpdateOne) Select added in v0.8.0

func (cuo *CommentUpdateOne) Select(field string, fields ...string) *CommentUpdateOne

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

func (*CommentUpdateOne) SetNillableInt

func (cuo *CommentUpdateOne) SetNillableInt(i int) *CommentUpdateOne

SetNillableInt sets the "nillable_int" field.

func (*CommentUpdateOne) SetNillableNillableInt

func (cuo *CommentUpdateOne) SetNillableNillableInt(i *int) *CommentUpdateOne

SetNillableNillableInt sets the "nillable_int" field if the given value is not nil.

func (*CommentUpdateOne) SetUniqueFloat

func (cuo *CommentUpdateOne) SetUniqueFloat(f float64) *CommentUpdateOne

SetUniqueFloat sets the "unique_float" field.

func (*CommentUpdateOne) SetUniqueInt

func (cuo *CommentUpdateOne) SetUniqueInt(i int) *CommentUpdateOne

SetUniqueInt sets the "unique_int" field.

type CommentUpsert added in v0.9.0

type CommentUpsert struct {
	*sql.UpdateSet
}

CommentUpsert is the "OnConflict" setter.

func (*CommentUpsert) AddNillableInt added in v0.10.0

func (u *CommentUpsert) AddNillableInt(v int) *CommentUpsert

AddNillableInt adds v to the "nillable_int" field.

func (*CommentUpsert) AddUniqueFloat added in v0.10.0

func (u *CommentUpsert) AddUniqueFloat(v float64) *CommentUpsert

AddUniqueFloat adds v to the "unique_float" field.

func (*CommentUpsert) AddUniqueInt added in v0.10.0

func (u *CommentUpsert) AddUniqueInt(v int) *CommentUpsert

AddUniqueInt adds v to the "unique_int" field.

func (*CommentUpsert) ClearNillableInt added in v0.9.0

func (u *CommentUpsert) ClearNillableInt() *CommentUpsert

ClearNillableInt clears the value of the "nillable_int" field.

func (*CommentUpsert) SetNillableInt added in v0.9.0

func (u *CommentUpsert) SetNillableInt(v int) *CommentUpsert

SetNillableInt sets the "nillable_int" field.

func (*CommentUpsert) SetUniqueFloat added in v0.9.0

func (u *CommentUpsert) SetUniqueFloat(v float64) *CommentUpsert

SetUniqueFloat sets the "unique_float" field.

func (*CommentUpsert) SetUniqueInt added in v0.9.0

func (u *CommentUpsert) SetUniqueInt(v int) *CommentUpsert

SetUniqueInt sets the "unique_int" field.

func (*CommentUpsert) UpdateNillableInt added in v0.9.0

func (u *CommentUpsert) UpdateNillableInt() *CommentUpsert

UpdateNillableInt sets the "nillable_int" field to the value that was provided on create.

func (*CommentUpsert) UpdateUniqueFloat added in v0.9.0

func (u *CommentUpsert) UpdateUniqueFloat() *CommentUpsert

UpdateUniqueFloat sets the "unique_float" field to the value that was provided on create.

func (*CommentUpsert) UpdateUniqueInt added in v0.9.0

func (u *CommentUpsert) UpdateUniqueInt() *CommentUpsert

UpdateUniqueInt sets the "unique_int" field to the value that was provided on create.

type CommentUpsertBulk added in v0.9.0

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

CommentUpsertBulk is the builder for "upsert"-ing a bulk of Comment nodes.

func (*CommentUpsertBulk) AddNillableInt added in v0.10.0

func (u *CommentUpsertBulk) AddNillableInt(v int) *CommentUpsertBulk

AddNillableInt adds v to the "nillable_int" field.

func (*CommentUpsertBulk) AddUniqueFloat added in v0.10.0

func (u *CommentUpsertBulk) AddUniqueFloat(v float64) *CommentUpsertBulk

AddUniqueFloat adds v to the "unique_float" field.

func (*CommentUpsertBulk) AddUniqueInt added in v0.10.0

func (u *CommentUpsertBulk) AddUniqueInt(v int) *CommentUpsertBulk

AddUniqueInt adds v to the "unique_int" field.

func (*CommentUpsertBulk) ClearNillableInt added in v0.9.0

func (u *CommentUpsertBulk) ClearNillableInt() *CommentUpsertBulk

ClearNillableInt clears the value of the "nillable_int" field.

func (*CommentUpsertBulk) DoNothing added in v0.9.0

func (u *CommentUpsertBulk) DoNothing() *CommentUpsertBulk

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

func (*CommentUpsertBulk) Exec added in v0.9.0

func (u *CommentUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentUpsertBulk) ExecX added in v0.9.0

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

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

func (*CommentUpsertBulk) Ignore added in v0.9.0

func (u *CommentUpsertBulk) Ignore() *CommentUpsertBulk

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

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

func (*CommentUpsertBulk) SetNillableInt added in v0.9.0

func (u *CommentUpsertBulk) SetNillableInt(v int) *CommentUpsertBulk

SetNillableInt sets the "nillable_int" field.

func (*CommentUpsertBulk) SetUniqueFloat added in v0.9.0

func (u *CommentUpsertBulk) SetUniqueFloat(v float64) *CommentUpsertBulk

SetUniqueFloat sets the "unique_float" field.

func (*CommentUpsertBulk) SetUniqueInt added in v0.9.0

func (u *CommentUpsertBulk) SetUniqueInt(v int) *CommentUpsertBulk

SetUniqueInt sets the "unique_int" field.

func (*CommentUpsertBulk) Update added in v0.9.0

func (u *CommentUpsertBulk) Update(set func(*CommentUpsert)) *CommentUpsertBulk

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

func (*CommentUpsertBulk) UpdateNewValues added in v0.9.0

func (u *CommentUpsertBulk) UpdateNewValues() *CommentUpsertBulk

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

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

func (*CommentUpsertBulk) UpdateNillableInt added in v0.9.0

func (u *CommentUpsertBulk) UpdateNillableInt() *CommentUpsertBulk

UpdateNillableInt sets the "nillable_int" field to the value that was provided on create.

func (*CommentUpsertBulk) UpdateUniqueFloat added in v0.9.0

func (u *CommentUpsertBulk) UpdateUniqueFloat() *CommentUpsertBulk

UpdateUniqueFloat sets the "unique_float" field to the value that was provided on create.

func (*CommentUpsertBulk) UpdateUniqueInt added in v0.9.0

func (u *CommentUpsertBulk) UpdateUniqueInt() *CommentUpsertBulk

UpdateUniqueInt sets the "unique_int" field to the value that was provided on create.

type CommentUpsertOne added in v0.9.0

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

CommentUpsertOne is the builder for "upsert"-ing

one Comment node.

func (*CommentUpsertOne) AddNillableInt added in v0.10.0

func (u *CommentUpsertOne) AddNillableInt(v int) *CommentUpsertOne

AddNillableInt adds v to the "nillable_int" field.

func (*CommentUpsertOne) AddUniqueFloat added in v0.10.0

func (u *CommentUpsertOne) AddUniqueFloat(v float64) *CommentUpsertOne

AddUniqueFloat adds v to the "unique_float" field.

func (*CommentUpsertOne) AddUniqueInt added in v0.10.0

func (u *CommentUpsertOne) AddUniqueInt(v int) *CommentUpsertOne

AddUniqueInt adds v to the "unique_int" field.

func (*CommentUpsertOne) ClearNillableInt added in v0.9.0

func (u *CommentUpsertOne) ClearNillableInt() *CommentUpsertOne

ClearNillableInt clears the value of the "nillable_int" field.

func (*CommentUpsertOne) DoNothing added in v0.9.0

func (u *CommentUpsertOne) DoNothing() *CommentUpsertOne

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

func (*CommentUpsertOne) Exec added in v0.9.0

func (u *CommentUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*CommentUpsertOne) ExecX added in v0.9.0

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

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

func (*CommentUpsertOne) ID added in v0.9.0

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

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

func (*CommentUpsertOne) IDX added in v0.9.0

func (u *CommentUpsertOne) IDX(ctx context.Context) int

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

func (*CommentUpsertOne) Ignore added in v0.9.0

func (u *CommentUpsertOne) Ignore() *CommentUpsertOne

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

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

func (*CommentUpsertOne) SetNillableInt added in v0.9.0

func (u *CommentUpsertOne) SetNillableInt(v int) *CommentUpsertOne

SetNillableInt sets the "nillable_int" field.

func (*CommentUpsertOne) SetUniqueFloat added in v0.9.0

func (u *CommentUpsertOne) SetUniqueFloat(v float64) *CommentUpsertOne

SetUniqueFloat sets the "unique_float" field.

func (*CommentUpsertOne) SetUniqueInt added in v0.9.0

func (u *CommentUpsertOne) SetUniqueInt(v int) *CommentUpsertOne

SetUniqueInt sets the "unique_int" field.

func (*CommentUpsertOne) Update added in v0.9.0

func (u *CommentUpsertOne) Update(set func(*CommentUpsert)) *CommentUpsertOne

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

func (*CommentUpsertOne) UpdateNewValues added in v0.9.0

func (u *CommentUpsertOne) UpdateNewValues() *CommentUpsertOne

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

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

func (*CommentUpsertOne) UpdateNillableInt added in v0.9.0

func (u *CommentUpsertOne) UpdateNillableInt() *CommentUpsertOne

UpdateNillableInt sets the "nillable_int" field to the value that was provided on create.

func (*CommentUpsertOne) UpdateUniqueFloat added in v0.9.0

func (u *CommentUpsertOne) UpdateUniqueFloat() *CommentUpsertOne

UpdateUniqueFloat sets the "unique_float" field to the value that was provided on create.

func (*CommentUpsertOne) UpdateUniqueInt added in v0.9.0

func (u *CommentUpsertOne) UpdateUniqueInt() *CommentUpsertOne

UpdateUniqueInt sets the "unique_int" field to the value that was provided on create.

type Comments

type Comments []*Comment

Comments is a parsable slice of Comment.

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 FieldType

type FieldType struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Int holds the value of the "int" field.
	Int int `json:"int,omitempty"`
	// Int8 holds the value of the "int8" field.
	Int8 int8 `json:"int8,omitempty"`
	// Int16 holds the value of the "int16" field.
	Int16 int16 `json:"int16,omitempty"`
	// Int32 holds the value of the "int32" field.
	Int32 int32 `json:"int32,omitempty"`
	// Int64 holds the value of the "int64" field.
	Int64 int64 `json:"int64,omitempty"`
	// OptionalInt holds the value of the "optional_int" field.
	OptionalInt int `json:"optional_int,omitempty"`
	// OptionalInt8 holds the value of the "optional_int8" field.
	OptionalInt8 int8 `json:"optional_int8,omitempty"`
	// OptionalInt16 holds the value of the "optional_int16" field.
	OptionalInt16 int16 `json:"optional_int16,omitempty"`
	// OptionalInt32 holds the value of the "optional_int32" field.
	OptionalInt32 int32 `json:"optional_int32,omitempty"`
	// OptionalInt64 holds the value of the "optional_int64" field.
	OptionalInt64 int64 `json:"optional_int64,omitempty"`
	// NillableInt holds the value of the "nillable_int" field.
	NillableInt *int `json:"nillable_int,omitempty"`
	// NillableInt8 holds the value of the "nillable_int8" field.
	NillableInt8 *int8 `json:"nillable_int8,omitempty"`
	// NillableInt16 holds the value of the "nillable_int16" field.
	NillableInt16 *int16 `json:"nillable_int16,omitempty"`
	// NillableInt32 holds the value of the "nillable_int32" field.
	NillableInt32 *int32 `json:"nillable_int32,omitempty"`
	// NillableInt64 holds the value of the "nillable_int64" field.
	NillableInt64 *int64 `json:"nillable_int64,omitempty"`
	// ValidateOptionalInt32 holds the value of the "validate_optional_int32" field.
	ValidateOptionalInt32 int32 `json:"validate_optional_int32,omitempty"`
	// OptionalUint holds the value of the "optional_uint" field.
	OptionalUint uint `json:"optional_uint,omitempty"`
	// OptionalUint8 holds the value of the "optional_uint8" field.
	OptionalUint8 uint8 `json:"optional_uint8,omitempty"`
	// OptionalUint16 holds the value of the "optional_uint16" field.
	OptionalUint16 uint16 `json:"optional_uint16,omitempty"`
	// OptionalUint32 holds the value of the "optional_uint32" field.
	OptionalUint32 uint32 `json:"optional_uint32,omitempty"`
	// OptionalUint64 holds the value of the "optional_uint64" field.
	OptionalUint64 uint64 `json:"optional_uint64,omitempty"`
	// State holds the value of the "state" field.
	State fieldtype.State `json:"state,omitempty"`
	// OptionalFloat holds the value of the "optional_float" field.
	OptionalFloat float64 `json:"optional_float,omitempty"`
	// OptionalFloat32 holds the value of the "optional_float32" field.
	OptionalFloat32 float32 `json:"optional_float32,omitempty"`
	// Text holds the value of the "text" field.
	Text string `json:"text,omitempty"`
	// Datetime holds the value of the "datetime" field.
	Datetime time.Time `json:"datetime,omitempty"`
	// Decimal holds the value of the "decimal" field.
	Decimal float64 `json:"decimal,omitempty"`
	// LinkOther holds the value of the "link_other" field.
	LinkOther *schema.Link `json:"link_other,omitempty"`
	// LinkOtherFunc holds the value of the "link_other_func" field.
	LinkOtherFunc *schema.Link `json:"link_other_func,omitempty"`
	// MAC holds the value of the "mac" field.
	MAC schema.MAC `json:"mac,omitempty"`
	// StringArray holds the value of the "string_array" field.
	StringArray schema.Strings `json:"string_array,omitempty"`
	// Password holds the value of the "password" field.
	Password string `json:"-"`
	// StringScanner holds the value of the "string_scanner" field.
	StringScanner *schema.StringScanner `json:"string_scanner,omitempty"`
	// Duration holds the value of the "duration" field.
	Duration time.Duration `json:"duration,omitempty"`
	// Dir holds the value of the "dir" field.
	Dir http.Dir `json:"dir,omitempty"`
	// Ndir holds the value of the "ndir" field.
	Ndir *http.Dir `json:"ndir,omitempty"`
	// Str holds the value of the "str" field.
	Str sql.NullString `json:"str,omitempty"`
	// NullStr holds the value of the "null_str" field.
	NullStr *sql.NullString `json:"null_str,omitempty"`
	// Link holds the value of the "link" field.
	Link schema.Link `json:"link,omitempty"`
	// NullLink holds the value of the "null_link" field.
	NullLink *schema.Link `json:"null_link,omitempty"`
	// Active holds the value of the "active" field.
	Active schema.Status `json:"active,omitempty"`
	// NullActive holds the value of the "null_active" field.
	NullActive *schema.Status `json:"null_active,omitempty"`
	// Deleted holds the value of the "deleted" field.
	Deleted *sql.NullBool `json:"deleted,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *sql.NullTime `json:"deleted_at,omitempty"`
	// RawData holds the value of the "raw_data" field.
	RawData []byte `json:"raw_data,omitempty"`
	// Sensitive holds the value of the "sensitive" field.
	Sensitive []byte `json:"-"`
	// IP holds the value of the "ip" field.
	IP net.IP `json:"ip,omitempty"`
	// NullInt64 holds the value of the "null_int64" field.
	NullInt64 *sql.NullInt64 `json:"null_int64,omitempty"`
	// SchemaInt holds the value of the "schema_int" field.
	SchemaInt schema.Int `json:"schema_int,omitempty"`
	// SchemaInt8 holds the value of the "schema_int8" field.
	SchemaInt8 schema.Int8 `json:"schema_int8,omitempty"`
	// SchemaInt64 holds the value of the "schema_int64" field.
	SchemaInt64 schema.Int64 `json:"schema_int64,omitempty"`
	// SchemaFloat holds the value of the "schema_float" field.
	SchemaFloat schema.Float64 `json:"schema_float,omitempty"`
	// SchemaFloat32 holds the value of the "schema_float32" field.
	SchemaFloat32 schema.Float32 `json:"schema_float32,omitempty"`
	// NullFloat holds the value of the "null_float" field.
	NullFloat *sql.NullFloat64 `json:"null_float,omitempty"`
	// Role holds the value of the "role" field.
	Role role.Role `json:"role,omitempty"`
	// Priority holds the value of the "priority" field.
	Priority role.Priority `json:"priority,omitempty"`
	// OptionalUUID holds the value of the "optional_uuid" field.
	OptionalUUID uuid.UUID `json:"optional_uuid,omitempty"`
	// NillableUUID holds the value of the "nillable_uuid" field.
	NillableUUID *uuid.UUID `json:"nillable_uuid,omitempty"`
	// Strings holds the value of the "strings" field.
	Strings []string `json:"strings,omitempty"`
	// Pair holds the value of the "pair" field.
	Pair schema.Pair `json:"pair,omitempty"`
	// NilPair holds the value of the "nil_pair" field.
	NilPair *schema.Pair `json:"nil_pair,omitempty"`
	// Vstring holds the value of the "vstring" field.
	Vstring schema.VString `json:"vstring,omitempty"`
	// Triple holds the value of the "triple" field.
	Triple schema.Triple `json:"triple,omitempty"`
	// BigInt holds the value of the "big_int" field.
	BigInt schema.BigInt `json:"big_int,omitempty"`
	// PasswordOther holds the value of the "password_other" field.
	PasswordOther schema.Password `json:"-"`
	// contains filtered or unexported fields
}

FieldType is the model entity for the FieldType schema.

func (*FieldType) String

func (ft *FieldType) String() string

String implements the fmt.Stringer.

func (*FieldType) Unwrap

func (ft *FieldType) Unwrap() *FieldType

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

func (ft *FieldType) Update() *FieldTypeUpdateOne

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

type FieldTypeClient

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

FieldTypeClient is a client for the FieldType schema.

func NewFieldTypeClient

func NewFieldTypeClient(c config) *FieldTypeClient

NewFieldTypeClient returns a client for the FieldType from the given config.

func (*FieldTypeClient) Create

func (c *FieldTypeClient) Create() *FieldTypeCreate

Create returns a create builder for FieldType.

func (*FieldTypeClient) CreateBulk

func (c *FieldTypeClient) CreateBulk(builders ...*FieldTypeCreate) *FieldTypeCreateBulk

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

func (*FieldTypeClient) Delete

func (c *FieldTypeClient) Delete() *FieldTypeDelete

Delete returns a delete builder for FieldType.

func (*FieldTypeClient) DeleteOne

func (c *FieldTypeClient) DeleteOne(ft *FieldType) *FieldTypeDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*FieldTypeClient) DeleteOneID

func (c *FieldTypeClient) DeleteOneID(id int) *FieldTypeDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*FieldTypeClient) Get

func (c *FieldTypeClient) Get(ctx context.Context, id int) (*FieldType, error)

Get returns a FieldType entity by its id.

func (*FieldTypeClient) GetX

func (c *FieldTypeClient) GetX(ctx context.Context, id int) *FieldType

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

func (*FieldTypeClient) Hooks

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

Hooks returns the client hooks.

func (*FieldTypeClient) Query

func (c *FieldTypeClient) Query() *FieldTypeQuery

Query returns a query builder for FieldType.

func (*FieldTypeClient) Update

func (c *FieldTypeClient) Update() *FieldTypeUpdate

Update returns an update builder for FieldType.

func (*FieldTypeClient) UpdateOne

func (c *FieldTypeClient) UpdateOne(ft *FieldType) *FieldTypeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FieldTypeClient) UpdateOneID

func (c *FieldTypeClient) UpdateOneID(id int) *FieldTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FieldTypeClient) Use

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

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

type FieldTypeCreate

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

FieldTypeCreate is the builder for creating a FieldType entity.

func (*FieldTypeCreate) Exec added in v0.9.0

func (ftc *FieldTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FieldTypeCreate) ExecX added in v0.9.0

func (ftc *FieldTypeCreate) ExecX(ctx context.Context)

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

func (*FieldTypeCreate) Mutation

func (ftc *FieldTypeCreate) Mutation() *FieldTypeMutation

Mutation returns the FieldTypeMutation object of the builder.

func (*FieldTypeCreate) OnConflict added in v0.9.0

func (ftc *FieldTypeCreate) OnConflict(opts ...sql.ConflictOption) *FieldTypeUpsertOne

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

client.FieldType.Create().
	SetInt(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.FieldTypeUpsert) {
		SetInt(v+v).
	}).
	Exec(ctx)

func (*FieldTypeCreate) OnConflictColumns added in v0.9.0

func (ftc *FieldTypeCreate) OnConflictColumns(columns ...string) *FieldTypeUpsertOne

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

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

func (*FieldTypeCreate) Save

func (ftc *FieldTypeCreate) Save(ctx context.Context) (*FieldType, error)

Save creates the FieldType in the database.

func (*FieldTypeCreate) SaveX

func (ftc *FieldTypeCreate) SaveX(ctx context.Context) *FieldType

SaveX calls Save and panics if Save returns an error.

func (*FieldTypeCreate) SetActive

func (ftc *FieldTypeCreate) SetActive(s schema.Status) *FieldTypeCreate

SetActive sets the "active" field.

func (*FieldTypeCreate) SetBigInt added in v0.9.0

func (ftc *FieldTypeCreate) SetBigInt(si schema.BigInt) *FieldTypeCreate

SetBigInt sets the "big_int" field.

func (*FieldTypeCreate) SetDatetime

func (ftc *FieldTypeCreate) SetDatetime(t time.Time) *FieldTypeCreate

SetDatetime sets the "datetime" field.

func (*FieldTypeCreate) SetDecimal

func (ftc *FieldTypeCreate) SetDecimal(f float64) *FieldTypeCreate

SetDecimal sets the "decimal" field.

func (*FieldTypeCreate) SetDeleted

func (ftc *FieldTypeCreate) SetDeleted(sb *sql.NullBool) *FieldTypeCreate

SetDeleted sets the "deleted" field.

func (*FieldTypeCreate) SetDeletedAt

func (ftc *FieldTypeCreate) SetDeletedAt(st *sql.NullTime) *FieldTypeCreate

SetDeletedAt sets the "deleted_at" field.

func (*FieldTypeCreate) SetDir

func (ftc *FieldTypeCreate) SetDir(h http.Dir) *FieldTypeCreate

SetDir sets the "dir" field.

func (*FieldTypeCreate) SetDuration

func (ftc *FieldTypeCreate) SetDuration(t time.Duration) *FieldTypeCreate

SetDuration sets the "duration" field.

func (*FieldTypeCreate) SetIP

func (ftc *FieldTypeCreate) SetIP(n net.IP) *FieldTypeCreate

SetIP sets the "ip" field.

func (*FieldTypeCreate) SetInt

func (ftc *FieldTypeCreate) SetInt(i int) *FieldTypeCreate

SetInt sets the "int" field.

func (*FieldTypeCreate) SetInt16

func (ftc *FieldTypeCreate) SetInt16(i int16) *FieldTypeCreate

SetInt16 sets the "int16" field.

func (*FieldTypeCreate) SetInt32

func (ftc *FieldTypeCreate) SetInt32(i int32) *FieldTypeCreate

SetInt32 sets the "int32" field.

func (*FieldTypeCreate) SetInt64

func (ftc *FieldTypeCreate) SetInt64(i int64) *FieldTypeCreate

SetInt64 sets the "int64" field.

func (*FieldTypeCreate) SetInt8

func (ftc *FieldTypeCreate) SetInt8(i int8) *FieldTypeCreate

SetInt8 sets the "int8" field.

func (ftc *FieldTypeCreate) SetLink(s schema.Link) *FieldTypeCreate

SetLink sets the "link" field.

func (*FieldTypeCreate) SetLinkOther

func (ftc *FieldTypeCreate) SetLinkOther(s *schema.Link) *FieldTypeCreate

SetLinkOther sets the "link_other" field.

func (*FieldTypeCreate) SetLinkOtherFunc added in v0.10.0

func (ftc *FieldTypeCreate) SetLinkOtherFunc(s *schema.Link) *FieldTypeCreate

SetLinkOtherFunc sets the "link_other_func" field.

func (*FieldTypeCreate) SetMAC

func (ftc *FieldTypeCreate) SetMAC(s schema.MAC) *FieldTypeCreate

SetMAC sets the "mac" field.

func (*FieldTypeCreate) SetNdir

func (ftc *FieldTypeCreate) SetNdir(h http.Dir) *FieldTypeCreate

SetNdir sets the "ndir" field.

func (*FieldTypeCreate) SetNilPair added in v0.8.0

func (ftc *FieldTypeCreate) SetNilPair(s *schema.Pair) *FieldTypeCreate

SetNilPair sets the "nil_pair" field.

func (*FieldTypeCreate) SetNillableActive

func (ftc *FieldTypeCreate) SetNillableActive(s *schema.Status) *FieldTypeCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableBigInt added in v0.9.0

func (ftc *FieldTypeCreate) SetNillableBigInt(si *schema.BigInt) *FieldTypeCreate

SetNillableBigInt sets the "big_int" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableDatetime

func (ftc *FieldTypeCreate) SetNillableDatetime(t *time.Time) *FieldTypeCreate

SetNillableDatetime sets the "datetime" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableDecimal

func (ftc *FieldTypeCreate) SetNillableDecimal(f *float64) *FieldTypeCreate

SetNillableDecimal sets the "decimal" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableDir

func (ftc *FieldTypeCreate) SetNillableDir(h *http.Dir) *FieldTypeCreate

SetNillableDir sets the "dir" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableDuration

func (ftc *FieldTypeCreate) SetNillableDuration(t *time.Duration) *FieldTypeCreate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableInt

func (ftc *FieldTypeCreate) SetNillableInt(i int) *FieldTypeCreate

SetNillableInt sets the "nillable_int" field.

func (*FieldTypeCreate) SetNillableInt16

func (ftc *FieldTypeCreate) SetNillableInt16(i int16) *FieldTypeCreate

SetNillableInt16 sets the "nillable_int16" field.

func (*FieldTypeCreate) SetNillableInt32

func (ftc *FieldTypeCreate) SetNillableInt32(i int32) *FieldTypeCreate

SetNillableInt32 sets the "nillable_int32" field.

func (*FieldTypeCreate) SetNillableInt64

func (ftc *FieldTypeCreate) SetNillableInt64(i int64) *FieldTypeCreate

SetNillableInt64 sets the "nillable_int64" field.

func (*FieldTypeCreate) SetNillableInt8

func (ftc *FieldTypeCreate) SetNillableInt8(i int8) *FieldTypeCreate

SetNillableInt8 sets the "nillable_int8" field.

func (ftc *FieldTypeCreate) SetNillableLink(s *schema.Link) *FieldTypeCreate

SetNillableLink sets the "link" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableMAC added in v0.8.0

func (ftc *FieldTypeCreate) SetNillableMAC(s *schema.MAC) *FieldTypeCreate

SetNillableMAC sets the "mac" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNdir

func (ftc *FieldTypeCreate) SetNillableNdir(h *http.Dir) *FieldTypeCreate

SetNillableNdir sets the "ndir" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableInt

func (ftc *FieldTypeCreate) SetNillableNillableInt(i *int) *FieldTypeCreate

SetNillableNillableInt sets the "nillable_int" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableInt16

func (ftc *FieldTypeCreate) SetNillableNillableInt16(i *int16) *FieldTypeCreate

SetNillableNillableInt16 sets the "nillable_int16" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableInt32

func (ftc *FieldTypeCreate) SetNillableNillableInt32(i *int32) *FieldTypeCreate

SetNillableNillableInt32 sets the "nillable_int32" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableInt64

func (ftc *FieldTypeCreate) SetNillableNillableInt64(i *int64) *FieldTypeCreate

SetNillableNillableInt64 sets the "nillable_int64" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableInt8

func (ftc *FieldTypeCreate) SetNillableNillableInt8(i *int8) *FieldTypeCreate

SetNillableNillableInt8 sets the "nillable_int8" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNillableUUID added in v0.10.0

func (ftc *FieldTypeCreate) SetNillableNillableUUID(u *uuid.UUID) *FieldTypeCreate

SetNillableNillableUUID sets the "nillable_uuid" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableNullActive

func (ftc *FieldTypeCreate) SetNillableNullActive(s *schema.Status) *FieldTypeCreate

SetNillableNullActive sets the "null_active" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalFloat

func (ftc *FieldTypeCreate) SetNillableOptionalFloat(f *float64) *FieldTypeCreate

SetNillableOptionalFloat sets the "optional_float" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalFloat32

func (ftc *FieldTypeCreate) SetNillableOptionalFloat32(f *float32) *FieldTypeCreate

SetNillableOptionalFloat32 sets the "optional_float32" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalInt

func (ftc *FieldTypeCreate) SetNillableOptionalInt(i *int) *FieldTypeCreate

SetNillableOptionalInt sets the "optional_int" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalInt16

func (ftc *FieldTypeCreate) SetNillableOptionalInt16(i *int16) *FieldTypeCreate

SetNillableOptionalInt16 sets the "optional_int16" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalInt32

func (ftc *FieldTypeCreate) SetNillableOptionalInt32(i *int32) *FieldTypeCreate

SetNillableOptionalInt32 sets the "optional_int32" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalInt64

func (ftc *FieldTypeCreate) SetNillableOptionalInt64(i *int64) *FieldTypeCreate

SetNillableOptionalInt64 sets the "optional_int64" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalInt8

func (ftc *FieldTypeCreate) SetNillableOptionalInt8(i *int8) *FieldTypeCreate

SetNillableOptionalInt8 sets the "optional_int8" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUUID added in v0.10.0

func (ftc *FieldTypeCreate) SetNillableOptionalUUID(u *uuid.UUID) *FieldTypeCreate

SetNillableOptionalUUID sets the "optional_uuid" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUint

func (ftc *FieldTypeCreate) SetNillableOptionalUint(u *uint) *FieldTypeCreate

SetNillableOptionalUint sets the "optional_uint" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUint16

func (ftc *FieldTypeCreate) SetNillableOptionalUint16(u *uint16) *FieldTypeCreate

SetNillableOptionalUint16 sets the "optional_uint16" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUint32

func (ftc *FieldTypeCreate) SetNillableOptionalUint32(u *uint32) *FieldTypeCreate

SetNillableOptionalUint32 sets the "optional_uint32" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUint64

func (ftc *FieldTypeCreate) SetNillableOptionalUint64(u *uint64) *FieldTypeCreate

SetNillableOptionalUint64 sets the "optional_uint64" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableOptionalUint8

func (ftc *FieldTypeCreate) SetNillableOptionalUint8(u *uint8) *FieldTypeCreate

SetNillableOptionalUint8 sets the "optional_uint8" field if the given value is not nil.

func (*FieldTypeCreate) SetNillablePair added in v0.8.0

func (ftc *FieldTypeCreate) SetNillablePair(s *schema.Pair) *FieldTypeCreate

SetNillablePair sets the "pair" field if the given value is not nil.

func (*FieldTypeCreate) SetNillablePassword added in v0.9.0

func (ftc *FieldTypeCreate) SetNillablePassword(s *string) *FieldTypeCreate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*FieldTypeCreate) SetNillablePasswordOther added in v0.9.0

func (ftc *FieldTypeCreate) SetNillablePasswordOther(s *schema.Password) *FieldTypeCreate

SetNillablePasswordOther sets the "password_other" field if the given value is not nil.

func (*FieldTypeCreate) SetNillablePriority added in v0.9.0

func (ftc *FieldTypeCreate) SetNillablePriority(r *role.Priority) *FieldTypeCreate

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableRole

func (ftc *FieldTypeCreate) SetNillableRole(r *role.Role) *FieldTypeCreate

SetNillableRole sets the "role" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableSchemaFloat

func (ftc *FieldTypeCreate) SetNillableSchemaFloat(s *schema.Float64) *FieldTypeCreate

SetNillableSchemaFloat sets the "schema_float" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableSchemaFloat32

func (ftc *FieldTypeCreate) SetNillableSchemaFloat32(s *schema.Float32) *FieldTypeCreate

SetNillableSchemaFloat32 sets the "schema_float32" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableSchemaInt

func (ftc *FieldTypeCreate) SetNillableSchemaInt(s *schema.Int) *FieldTypeCreate

SetNillableSchemaInt sets the "schema_int" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableSchemaInt64

func (ftc *FieldTypeCreate) SetNillableSchemaInt64(s *schema.Int64) *FieldTypeCreate

SetNillableSchemaInt64 sets the "schema_int64" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableSchemaInt8

func (ftc *FieldTypeCreate) SetNillableSchemaInt8(s *schema.Int8) *FieldTypeCreate

SetNillableSchemaInt8 sets the "schema_int8" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableState

func (ftc *FieldTypeCreate) SetNillableState(f *fieldtype.State) *FieldTypeCreate

SetNillableState sets the "state" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableStr added in v0.8.0

func (ftc *FieldTypeCreate) SetNillableStr(ss *sql.NullString) *FieldTypeCreate

SetNillableStr sets the "str" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableStringScanner added in v0.9.0

func (ftc *FieldTypeCreate) SetNillableStringScanner(ss *schema.StringScanner) *FieldTypeCreate

SetNillableStringScanner sets the "string_scanner" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableText added in v0.10.0

func (ftc *FieldTypeCreate) SetNillableText(s *string) *FieldTypeCreate

SetNillableText sets the "text" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableTriple added in v0.8.0

func (ftc *FieldTypeCreate) SetNillableTriple(s *schema.Triple) *FieldTypeCreate

SetNillableTriple sets the "triple" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableUUID added in v0.9.0

func (ftc *FieldTypeCreate) SetNillableUUID(u uuid.UUID) *FieldTypeCreate

SetNillableUUID sets the "nillable_uuid" field.

func (*FieldTypeCreate) SetNillableValidateOptionalInt32

func (ftc *FieldTypeCreate) SetNillableValidateOptionalInt32(i *int32) *FieldTypeCreate

SetNillableValidateOptionalInt32 sets the "validate_optional_int32" field if the given value is not nil.

func (*FieldTypeCreate) SetNillableVstring added in v0.8.0

func (ftc *FieldTypeCreate) SetNillableVstring(ss *schema.VString) *FieldTypeCreate

SetNillableVstring sets the "vstring" field if the given value is not nil.

func (*FieldTypeCreate) SetNullActive

func (ftc *FieldTypeCreate) SetNullActive(s schema.Status) *FieldTypeCreate

SetNullActive sets the "null_active" field.

func (*FieldTypeCreate) SetNullFloat

func (ftc *FieldTypeCreate) SetNullFloat(sf *sql.NullFloat64) *FieldTypeCreate

SetNullFloat sets the "null_float" field.

func (*FieldTypeCreate) SetNullInt64

func (ftc *FieldTypeCreate) SetNullInt64(si *sql.NullInt64) *FieldTypeCreate

SetNullInt64 sets the "null_int64" field.

func (ftc *FieldTypeCreate) SetNullLink(s *schema.Link) *FieldTypeCreate

SetNullLink sets the "null_link" field.

func (*FieldTypeCreate) SetNullStr

func (ftc *FieldTypeCreate) SetNullStr(ss *sql.NullString) *FieldTypeCreate

SetNullStr sets the "null_str" field.

func (*FieldTypeCreate) SetOptionalFloat

func (ftc *FieldTypeCreate) SetOptionalFloat(f float64) *FieldTypeCreate

SetOptionalFloat sets the "optional_float" field.

func (*FieldTypeCreate) SetOptionalFloat32

func (ftc *FieldTypeCreate) SetOptionalFloat32(f float32) *FieldTypeCreate

SetOptionalFloat32 sets the "optional_float32" field.

func (*FieldTypeCreate) SetOptionalInt

func (ftc *FieldTypeCreate) SetOptionalInt(i int) *FieldTypeCreate

SetOptionalInt sets the "optional_int" field.

func (*FieldTypeCreate) SetOptionalInt16

func (ftc *FieldTypeCreate) SetOptionalInt16(i int16) *FieldTypeCreate

SetOptionalInt16 sets the "optional_int16" field.

func (*FieldTypeCreate) SetOptionalInt32

func (ftc *FieldTypeCreate) SetOptionalInt32(i int32) *FieldTypeCreate

SetOptionalInt32 sets the "optional_int32" field.

func (*FieldTypeCreate) SetOptionalInt64

func (ftc *FieldTypeCreate) SetOptionalInt64(i int64) *FieldTypeCreate

SetOptionalInt64 sets the "optional_int64" field.

func (*FieldTypeCreate) SetOptionalInt8

func (ftc *FieldTypeCreate) SetOptionalInt8(i int8) *FieldTypeCreate

SetOptionalInt8 sets the "optional_int8" field.

func (*FieldTypeCreate) SetOptionalUUID added in v0.10.0

func (ftc *FieldTypeCreate) SetOptionalUUID(u uuid.UUID) *FieldTypeCreate

SetOptionalUUID sets the "optional_uuid" field.

func (*FieldTypeCreate) SetOptionalUint

func (ftc *FieldTypeCreate) SetOptionalUint(u uint) *FieldTypeCreate

SetOptionalUint sets the "optional_uint" field.

func (*FieldTypeCreate) SetOptionalUint16

func (ftc *FieldTypeCreate) SetOptionalUint16(u uint16) *FieldTypeCreate

SetOptionalUint16 sets the "optional_uint16" field.

func (*FieldTypeCreate) SetOptionalUint32

func (ftc *FieldTypeCreate) SetOptionalUint32(u uint32) *FieldTypeCreate

SetOptionalUint32 sets the "optional_uint32" field.

func (*FieldTypeCreate) SetOptionalUint64

func (ftc *FieldTypeCreate) SetOptionalUint64(u uint64) *FieldTypeCreate

SetOptionalUint64 sets the "optional_uint64" field.

func (*FieldTypeCreate) SetOptionalUint8

func (ftc *FieldTypeCreate) SetOptionalUint8(u uint8) *FieldTypeCreate

SetOptionalUint8 sets the "optional_uint8" field.

func (*FieldTypeCreate) SetPair added in v0.8.0

func (ftc *FieldTypeCreate) SetPair(s schema.Pair) *FieldTypeCreate

SetPair sets the "pair" field.

func (*FieldTypeCreate) SetPassword added in v0.9.0

func (ftc *FieldTypeCreate) SetPassword(s string) *FieldTypeCreate

SetPassword sets the "password" field.

func (*FieldTypeCreate) SetPasswordOther added in v0.9.0

func (ftc *FieldTypeCreate) SetPasswordOther(s schema.Password) *FieldTypeCreate

SetPasswordOther sets the "password_other" field.

func (*FieldTypeCreate) SetPriority added in v0.9.0

func (ftc *FieldTypeCreate) SetPriority(r role.Priority) *FieldTypeCreate

SetPriority sets the "priority" field.

func (*FieldTypeCreate) SetRawData added in v0.10.0

func (ftc *FieldTypeCreate) SetRawData(b []byte) *FieldTypeCreate

SetRawData sets the "raw_data" field.

func (*FieldTypeCreate) SetRole

func (ftc *FieldTypeCreate) SetRole(r role.Role) *FieldTypeCreate

SetRole sets the "role" field.

func (*FieldTypeCreate) SetSchemaFloat

func (ftc *FieldTypeCreate) SetSchemaFloat(s schema.Float64) *FieldTypeCreate

SetSchemaFloat sets the "schema_float" field.

func (*FieldTypeCreate) SetSchemaFloat32

func (ftc *FieldTypeCreate) SetSchemaFloat32(s schema.Float32) *FieldTypeCreate

SetSchemaFloat32 sets the "schema_float32" field.

func (*FieldTypeCreate) SetSchemaInt

func (ftc *FieldTypeCreate) SetSchemaInt(s schema.Int) *FieldTypeCreate

SetSchemaInt sets the "schema_int" field.

func (*FieldTypeCreate) SetSchemaInt64

func (ftc *FieldTypeCreate) SetSchemaInt64(s schema.Int64) *FieldTypeCreate

SetSchemaInt64 sets the "schema_int64" field.

func (*FieldTypeCreate) SetSchemaInt8

func (ftc *FieldTypeCreate) SetSchemaInt8(s schema.Int8) *FieldTypeCreate

SetSchemaInt8 sets the "schema_int8" field.

func (*FieldTypeCreate) SetSensitive added in v0.10.0

func (ftc *FieldTypeCreate) SetSensitive(b []byte) *FieldTypeCreate

SetSensitive sets the "sensitive" field.

func (*FieldTypeCreate) SetState

func (ftc *FieldTypeCreate) SetState(f fieldtype.State) *FieldTypeCreate

SetState sets the "state" field.

func (*FieldTypeCreate) SetStr

func (ftc *FieldTypeCreate) SetStr(ss sql.NullString) *FieldTypeCreate

SetStr sets the "str" field.

func (*FieldTypeCreate) SetStringArray added in v0.8.0

func (ftc *FieldTypeCreate) SetStringArray(s schema.Strings) *FieldTypeCreate

SetStringArray sets the "string_array" field.

func (*FieldTypeCreate) SetStringScanner added in v0.9.0

func (ftc *FieldTypeCreate) SetStringScanner(ss schema.StringScanner) *FieldTypeCreate

SetStringScanner sets the "string_scanner" field.

func (*FieldTypeCreate) SetStrings added in v0.8.0

func (ftc *FieldTypeCreate) SetStrings(s []string) *FieldTypeCreate

SetStrings sets the "strings" field.

func (*FieldTypeCreate) SetText added in v0.10.0

func (ftc *FieldTypeCreate) SetText(s string) *FieldTypeCreate

SetText sets the "text" field.

func (*FieldTypeCreate) SetTriple added in v0.8.0

func (ftc *FieldTypeCreate) SetTriple(s schema.Triple) *FieldTypeCreate

SetTriple sets the "triple" field.

func (*FieldTypeCreate) SetValidateOptionalInt32

func (ftc *FieldTypeCreate) SetValidateOptionalInt32(i int32) *FieldTypeCreate

SetValidateOptionalInt32 sets the "validate_optional_int32" field.

func (*FieldTypeCreate) SetVstring added in v0.8.0

func (ftc *FieldTypeCreate) SetVstring(ss schema.VString) *FieldTypeCreate

SetVstring sets the "vstring" field.

type FieldTypeCreateBulk

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

FieldTypeCreateBulk is the builder for creating many FieldType entities in bulk.

func (*FieldTypeCreateBulk) Exec added in v0.9.0

func (ftcb *FieldTypeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FieldTypeCreateBulk) ExecX added in v0.9.0

func (ftcb *FieldTypeCreateBulk) ExecX(ctx context.Context)

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

func (*FieldTypeCreateBulk) OnConflict added in v0.9.0

func (ftcb *FieldTypeCreateBulk) OnConflict(opts ...sql.ConflictOption) *FieldTypeUpsertBulk

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

client.FieldType.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.FieldTypeUpsert) {
		SetInt(v+v).
	}).
	Exec(ctx)

func (*FieldTypeCreateBulk) OnConflictColumns added in v0.9.0

func (ftcb *FieldTypeCreateBulk) OnConflictColumns(columns ...string) *FieldTypeUpsertBulk

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

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

func (*FieldTypeCreateBulk) Save

func (ftcb *FieldTypeCreateBulk) Save(ctx context.Context) ([]*FieldType, error)

Save creates the FieldType entities in the database.

func (*FieldTypeCreateBulk) SaveX

func (ftcb *FieldTypeCreateBulk) SaveX(ctx context.Context) []*FieldType

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

type FieldTypeDelete

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

FieldTypeDelete is the builder for deleting a FieldType entity.

func (*FieldTypeDelete) Exec

func (ftd *FieldTypeDelete) Exec(ctx context.Context) (int, error)

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

func (*FieldTypeDelete) ExecX

func (ftd *FieldTypeDelete) ExecX(ctx context.Context) int

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

func (*FieldTypeDelete) Where

Where appends a list predicates to the FieldTypeDelete builder.

type FieldTypeDeleteOne

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

FieldTypeDeleteOne is the builder for deleting a single FieldType entity.

func (*FieldTypeDeleteOne) Exec

func (ftdo *FieldTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FieldTypeDeleteOne) ExecX

func (ftdo *FieldTypeDeleteOne) ExecX(ctx context.Context)

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

type FieldTypeFilter

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

FieldTypeFilter provides a generic filtering capability at runtime for FieldTypeQuery.

func (*FieldTypeFilter) Where

func (f *FieldTypeFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*FieldTypeFilter) WhereActive

func (f *FieldTypeFilter) WhereActive(p entql.BoolP)

WhereActive applies the entql bool predicate on the active field.

func (*FieldTypeFilter) WhereBigInt added in v0.9.0

func (f *FieldTypeFilter) WhereBigInt(p entql.IntP)

WhereBigInt applies the entql int predicate on the big_int field.

func (*FieldTypeFilter) WhereDatetime

func (f *FieldTypeFilter) WhereDatetime(p entql.TimeP)

WhereDatetime applies the entql time.Time predicate on the datetime field.

func (*FieldTypeFilter) WhereDecimal

func (f *FieldTypeFilter) WhereDecimal(p entql.Float64P)

WhereDecimal applies the entql float64 predicate on the decimal field.

func (*FieldTypeFilter) WhereDeleted

func (f *FieldTypeFilter) WhereDeleted(p entql.BoolP)

WhereDeleted applies the entql bool predicate on the deleted field.

func (*FieldTypeFilter) WhereDeletedAt

func (f *FieldTypeFilter) WhereDeletedAt(p entql.TimeP)

WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.

func (*FieldTypeFilter) WhereDir

func (f *FieldTypeFilter) WhereDir(p entql.StringP)

WhereDir applies the entql string predicate on the dir field.

func (*FieldTypeFilter) WhereDuration

func (f *FieldTypeFilter) WhereDuration(p entql.Int64P)

WhereDuration applies the entql int64 predicate on the duration field.

func (*FieldTypeFilter) WhereID

func (f *FieldTypeFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*FieldTypeFilter) WhereIP

func (f *FieldTypeFilter) WhereIP(p entql.BytesP)

WhereIP applies the entql []byte predicate on the ip field.

func (*FieldTypeFilter) WhereInt

func (f *FieldTypeFilter) WhereInt(p entql.IntP)

WhereInt applies the entql int predicate on the int field.

func (*FieldTypeFilter) WhereInt16

func (f *FieldTypeFilter) WhereInt16(p entql.Int16P)

WhereInt16 applies the entql int16 predicate on the int16 field.

func (*FieldTypeFilter) WhereInt32

func (f *FieldTypeFilter) WhereInt32(p entql.Int32P)

WhereInt32 applies the entql int32 predicate on the int32 field.

func (*FieldTypeFilter) WhereInt64

func (f *FieldTypeFilter) WhereInt64(p entql.Int64P)

WhereInt64 applies the entql int64 predicate on the int64 field.

func (*FieldTypeFilter) WhereInt8

func (f *FieldTypeFilter) WhereInt8(p entql.Int8P)

WhereInt8 applies the entql int8 predicate on the int8 field.

func (f *FieldTypeFilter) WhereLink(p entql.StringP)

WhereLink applies the entql string predicate on the link field.

func (*FieldTypeFilter) WhereLinkOther

func (f *FieldTypeFilter) WhereLinkOther(p entql.OtherP)

WhereLinkOther applies the entql other predicate on the link_other field.

func (*FieldTypeFilter) WhereLinkOtherFunc added in v0.10.0

func (f *FieldTypeFilter) WhereLinkOtherFunc(p entql.OtherP)

WhereLinkOtherFunc applies the entql other predicate on the link_other_func field.

func (*FieldTypeFilter) WhereMAC

func (f *FieldTypeFilter) WhereMAC(p entql.StringP)

WhereMAC applies the entql string predicate on the mac field.

func (*FieldTypeFilter) WhereNdir

func (f *FieldTypeFilter) WhereNdir(p entql.StringP)

WhereNdir applies the entql string predicate on the ndir field.

func (*FieldTypeFilter) WhereNilPair added in v0.8.0

func (f *FieldTypeFilter) WhereNilPair(p entql.BytesP)

WhereNilPair applies the entql []byte predicate on the nil_pair field.

func (*FieldTypeFilter) WhereNillableInt

func (f *FieldTypeFilter) WhereNillableInt(p entql.IntP)

WhereNillableInt applies the entql int predicate on the nillable_int field.

func (*FieldTypeFilter) WhereNillableInt16

func (f *FieldTypeFilter) WhereNillableInt16(p entql.Int16P)

WhereNillableInt16 applies the entql int16 predicate on the nillable_int16 field.

func (*FieldTypeFilter) WhereNillableInt32

func (f *FieldTypeFilter) WhereNillableInt32(p entql.Int32P)

WhereNillableInt32 applies the entql int32 predicate on the nillable_int32 field.

func (*FieldTypeFilter) WhereNillableInt64

func (f *FieldTypeFilter) WhereNillableInt64(p entql.Int64P)

WhereNillableInt64 applies the entql int64 predicate on the nillable_int64 field.

func (*FieldTypeFilter) WhereNillableInt8

func (f *FieldTypeFilter) WhereNillableInt8(p entql.Int8P)

WhereNillableInt8 applies the entql int8 predicate on the nillable_int8 field.

func (*FieldTypeFilter) WhereNillableUUID added in v0.9.0

func (f *FieldTypeFilter) WhereNillableUUID(p entql.ValueP)

WhereNillableUUID applies the entql [16]byte predicate on the nillable_uuid field.

func (*FieldTypeFilter) WhereNullActive

func (f *FieldTypeFilter) WhereNullActive(p entql.BoolP)

WhereNullActive applies the entql bool predicate on the null_active field.

func (*FieldTypeFilter) WhereNullFloat

func (f *FieldTypeFilter) WhereNullFloat(p entql.Float64P)

WhereNullFloat applies the entql float64 predicate on the null_float field.

func (*FieldTypeFilter) WhereNullInt64

func (f *FieldTypeFilter) WhereNullInt64(p entql.IntP)

WhereNullInt64 applies the entql int predicate on the null_int64 field.

func (f *FieldTypeFilter) WhereNullLink(p entql.StringP)

WhereNullLink applies the entql string predicate on the null_link field.

func (*FieldTypeFilter) WhereNullStr

func (f *FieldTypeFilter) WhereNullStr(p entql.StringP)

WhereNullStr applies the entql string predicate on the null_str field.

func (*FieldTypeFilter) WhereOptionalFloat

func (f *FieldTypeFilter) WhereOptionalFloat(p entql.Float64P)

WhereOptionalFloat applies the entql float64 predicate on the optional_float field.

func (*FieldTypeFilter) WhereOptionalFloat32

func (f *FieldTypeFilter) WhereOptionalFloat32(p entql.Float32P)

WhereOptionalFloat32 applies the entql float32 predicate on the optional_float32 field.

func (*FieldTypeFilter) WhereOptionalInt

func (f *FieldTypeFilter) WhereOptionalInt(p entql.IntP)

WhereOptionalInt applies the entql int predicate on the optional_int field.

func (*FieldTypeFilter) WhereOptionalInt16

func (f *FieldTypeFilter) WhereOptionalInt16(p entql.Int16P)

WhereOptionalInt16 applies the entql int16 predicate on the optional_int16 field.

func (*FieldTypeFilter) WhereOptionalInt32

func (f *FieldTypeFilter) WhereOptionalInt32(p entql.Int32P)

WhereOptionalInt32 applies the entql int32 predicate on the optional_int32 field.

func (*FieldTypeFilter) WhereOptionalInt64

func (f *FieldTypeFilter) WhereOptionalInt64(p entql.Int64P)

WhereOptionalInt64 applies the entql int64 predicate on the optional_int64 field.

func (*FieldTypeFilter) WhereOptionalInt8

func (f *FieldTypeFilter) WhereOptionalInt8(p entql.Int8P)

WhereOptionalInt8 applies the entql int8 predicate on the optional_int8 field.

func (*FieldTypeFilter) WhereOptionalUUID added in v0.10.0

func (f *FieldTypeFilter) WhereOptionalUUID(p entql.ValueP)

WhereOptionalUUID applies the entql [16]byte predicate on the optional_uuid field.

func (*FieldTypeFilter) WhereOptionalUint

func (f *FieldTypeFilter) WhereOptionalUint(p entql.UintP)

WhereOptionalUint applies the entql uint predicate on the optional_uint field.

func (*FieldTypeFilter) WhereOptionalUint16

func (f *FieldTypeFilter) WhereOptionalUint16(p entql.Uint16P)

WhereOptionalUint16 applies the entql uint16 predicate on the optional_uint16 field.

func (*FieldTypeFilter) WhereOptionalUint32

func (f *FieldTypeFilter) WhereOptionalUint32(p entql.Uint32P)

WhereOptionalUint32 applies the entql uint32 predicate on the optional_uint32 field.

func (*FieldTypeFilter) WhereOptionalUint64

func (f *FieldTypeFilter) WhereOptionalUint64(p entql.Uint64P)

WhereOptionalUint64 applies the entql uint64 predicate on the optional_uint64 field.

func (*FieldTypeFilter) WhereOptionalUint8

func (f *FieldTypeFilter) WhereOptionalUint8(p entql.Uint8P)

WhereOptionalUint8 applies the entql uint8 predicate on the optional_uint8 field.

func (*FieldTypeFilter) WherePair added in v0.8.0

func (f *FieldTypeFilter) WherePair(p entql.BytesP)

WherePair applies the entql []byte predicate on the pair field.

func (*FieldTypeFilter) WherePassword added in v0.9.0

func (f *FieldTypeFilter) WherePassword(p entql.StringP)

WherePassword applies the entql string predicate on the password field.

func (*FieldTypeFilter) WherePasswordOther added in v0.9.0

func (f *FieldTypeFilter) WherePasswordOther(p entql.OtherP)

WherePasswordOther applies the entql other predicate on the password_other field.

func (*FieldTypeFilter) WherePriority added in v0.9.0

func (f *FieldTypeFilter) WherePriority(p entql.StringP)

WherePriority applies the entql string predicate on the priority field.

func (*FieldTypeFilter) WhereRawData added in v0.10.0

func (f *FieldTypeFilter) WhereRawData(p entql.BytesP)

WhereRawData applies the entql []byte predicate on the raw_data field.

func (*FieldTypeFilter) WhereRole

func (f *FieldTypeFilter) WhereRole(p entql.StringP)

WhereRole applies the entql string predicate on the role field.

func (*FieldTypeFilter) WhereSchemaFloat

func (f *FieldTypeFilter) WhereSchemaFloat(p entql.Float64P)

WhereSchemaFloat applies the entql float64 predicate on the schema_float field.

func (*FieldTypeFilter) WhereSchemaFloat32

func (f *FieldTypeFilter) WhereSchemaFloat32(p entql.Float32P)

WhereSchemaFloat32 applies the entql float32 predicate on the schema_float32 field.

func (*FieldTypeFilter) WhereSchemaInt

func (f *FieldTypeFilter) WhereSchemaInt(p entql.IntP)

WhereSchemaInt applies the entql int predicate on the schema_int field.

func (*FieldTypeFilter) WhereSchemaInt64

func (f *FieldTypeFilter) WhereSchemaInt64(p entql.Int64P)

WhereSchemaInt64 applies the entql int64 predicate on the schema_int64 field.

func (*FieldTypeFilter) WhereSchemaInt8

func (f *FieldTypeFilter) WhereSchemaInt8(p entql.Int8P)

WhereSchemaInt8 applies the entql int8 predicate on the schema_int8 field.

func (*FieldTypeFilter) WhereSensitive added in v0.10.0

func (f *FieldTypeFilter) WhereSensitive(p entql.BytesP)

WhereSensitive applies the entql []byte predicate on the sensitive field.

func (*FieldTypeFilter) WhereState

func (f *FieldTypeFilter) WhereState(p entql.StringP)

WhereState applies the entql string predicate on the state field.

func (*FieldTypeFilter) WhereStr

func (f *FieldTypeFilter) WhereStr(p entql.StringP)

WhereStr applies the entql string predicate on the str field.

func (*FieldTypeFilter) WhereStringArray added in v0.8.0

func (f *FieldTypeFilter) WhereStringArray(p entql.OtherP)

WhereStringArray applies the entql other predicate on the string_array field.

func (*FieldTypeFilter) WhereStringScanner added in v0.9.0

func (f *FieldTypeFilter) WhereStringScanner(p entql.StringP)

WhereStringScanner applies the entql string predicate on the string_scanner field.

func (*FieldTypeFilter) WhereStrings added in v0.8.0

func (f *FieldTypeFilter) WhereStrings(p entql.BytesP)

WhereStrings applies the entql json.RawMessage predicate on the strings field.

func (*FieldTypeFilter) WhereText added in v0.10.0

func (f *FieldTypeFilter) WhereText(p entql.StringP)

WhereText applies the entql string predicate on the text field.

func (*FieldTypeFilter) WhereTriple added in v0.8.0

func (f *FieldTypeFilter) WhereTriple(p entql.StringP)

WhereTriple applies the entql string predicate on the triple field.

func (*FieldTypeFilter) WhereValidateOptionalInt32

func (f *FieldTypeFilter) WhereValidateOptionalInt32(p entql.Int32P)

WhereValidateOptionalInt32 applies the entql int32 predicate on the validate_optional_int32 field.

func (*FieldTypeFilter) WhereVstring added in v0.8.0

func (f *FieldTypeFilter) WhereVstring(p entql.StringP)

WhereVstring applies the entql string predicate on the vstring field.

type FieldTypeGroupBy

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

FieldTypeGroupBy is the group-by builder for FieldType entities.

func (*FieldTypeGroupBy) Aggregate

func (ftgb *FieldTypeGroupBy) Aggregate(fns ...AggregateFunc) *FieldTypeGroupBy

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

func (*FieldTypeGroupBy) Bool

func (ftgb *FieldTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FieldTypeGroupBy) BoolX

func (ftgb *FieldTypeGroupBy) BoolX(ctx context.Context) bool

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

func (*FieldTypeGroupBy) Bools

func (ftgb *FieldTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*FieldTypeGroupBy) BoolsX

func (ftgb *FieldTypeGroupBy) BoolsX(ctx context.Context) []bool

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

func (*FieldTypeGroupBy) Float64

func (ftgb *FieldTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FieldTypeGroupBy) Float64X

func (ftgb *FieldTypeGroupBy) Float64X(ctx context.Context) float64

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

func (*FieldTypeGroupBy) Float64s

func (ftgb *FieldTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*FieldTypeGroupBy) Float64sX

func (ftgb *FieldTypeGroupBy) Float64sX(ctx context.Context) []float64

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

func (*FieldTypeGroupBy) Int

func (ftgb *FieldTypeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FieldTypeGroupBy) IntX

func (ftgb *FieldTypeGroupBy) IntX(ctx context.Context) int

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

func (*FieldTypeGroupBy) Ints

func (ftgb *FieldTypeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*FieldTypeGroupBy) IntsX

func (ftgb *FieldTypeGroupBy) IntsX(ctx context.Context) []int

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

func (*FieldTypeGroupBy) Scan

func (ftgb *FieldTypeGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*FieldTypeGroupBy) ScanX

func (ftgb *FieldTypeGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*FieldTypeGroupBy) String

func (ftgb *FieldTypeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FieldTypeGroupBy) StringX

func (ftgb *FieldTypeGroupBy) StringX(ctx context.Context) string

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

func (*FieldTypeGroupBy) Strings

func (ftgb *FieldTypeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*FieldTypeGroupBy) StringsX

func (ftgb *FieldTypeGroupBy) StringsX(ctx context.Context) []string

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

type FieldTypeMutation

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

FieldTypeMutation represents an operation that mutates the FieldType nodes in the graph.

func (*FieldTypeMutation) Active

func (m *FieldTypeMutation) Active() (r schema.Status, exists bool)

Active returns the value of the "active" field in the mutation.

func (*FieldTypeMutation) ActiveCleared

func (m *FieldTypeMutation) ActiveCleared() bool

ActiveCleared returns if the "active" field was cleared in this mutation.

func (*FieldTypeMutation) AddBigInt added in v0.9.0

func (m *FieldTypeMutation) AddBigInt(si schema.BigInt)

AddBigInt adds si to the "big_int" field.

func (*FieldTypeMutation) AddDecimal

func (m *FieldTypeMutation) AddDecimal(f float64)

AddDecimal adds f to the "decimal" field.

func (*FieldTypeMutation) AddDuration

func (m *FieldTypeMutation) AddDuration(t time.Duration)

AddDuration adds t to the "duration" field.

func (*FieldTypeMutation) AddField

func (m *FieldTypeMutation) 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 (*FieldTypeMutation) AddInt

func (m *FieldTypeMutation) AddInt(i int)

AddInt adds i to the "int" field.

func (*FieldTypeMutation) AddInt16

func (m *FieldTypeMutation) AddInt16(i int16)

AddInt16 adds i to the "int16" field.

func (*FieldTypeMutation) AddInt32

func (m *FieldTypeMutation) AddInt32(i int32)

AddInt32 adds i to the "int32" field.

func (*FieldTypeMutation) AddInt64

func (m *FieldTypeMutation) AddInt64(i int64)

AddInt64 adds i to the "int64" field.

func (*FieldTypeMutation) AddInt8

func (m *FieldTypeMutation) AddInt8(i int8)

AddInt8 adds i to the "int8" field.

func (*FieldTypeMutation) AddNillableInt

func (m *FieldTypeMutation) AddNillableInt(i int)

AddNillableInt adds i to the "nillable_int" field.

func (*FieldTypeMutation) AddNillableInt16

func (m *FieldTypeMutation) AddNillableInt16(i int16)

AddNillableInt16 adds i to the "nillable_int16" field.

func (*FieldTypeMutation) AddNillableInt32

func (m *FieldTypeMutation) AddNillableInt32(i int32)

AddNillableInt32 adds i to the "nillable_int32" field.

func (*FieldTypeMutation) AddNillableInt64

func (m *FieldTypeMutation) AddNillableInt64(i int64)

AddNillableInt64 adds i to the "nillable_int64" field.

func (*FieldTypeMutation) AddNillableInt8

func (m *FieldTypeMutation) AddNillableInt8(i int8)

AddNillableInt8 adds i to the "nillable_int8" field.

func (*FieldTypeMutation) AddOptionalFloat

func (m *FieldTypeMutation) AddOptionalFloat(f float64)

AddOptionalFloat adds f to the "optional_float" field.

func (*FieldTypeMutation) AddOptionalFloat32

func (m *FieldTypeMutation) AddOptionalFloat32(f float32)

AddOptionalFloat32 adds f to the "optional_float32" field.

func (*FieldTypeMutation) AddOptionalInt

func (m *FieldTypeMutation) AddOptionalInt(i int)

AddOptionalInt adds i to the "optional_int" field.

func (*FieldTypeMutation) AddOptionalInt16

func (m *FieldTypeMutation) AddOptionalInt16(i int16)

AddOptionalInt16 adds i to the "optional_int16" field.

func (*FieldTypeMutation) AddOptionalInt32

func (m *FieldTypeMutation) AddOptionalInt32(i int32)

AddOptionalInt32 adds i to the "optional_int32" field.

func (*FieldTypeMutation) AddOptionalInt64

func (m *FieldTypeMutation) AddOptionalInt64(i int64)

AddOptionalInt64 adds i to the "optional_int64" field.

func (*FieldTypeMutation) AddOptionalInt8

func (m *FieldTypeMutation) AddOptionalInt8(i int8)

AddOptionalInt8 adds i to the "optional_int8" field.

func (*FieldTypeMutation) AddOptionalUint

func (m *FieldTypeMutation) AddOptionalUint(u int)

AddOptionalUint adds u to the "optional_uint" field.

func (*FieldTypeMutation) AddOptionalUint16

func (m *FieldTypeMutation) AddOptionalUint16(u int16)

AddOptionalUint16 adds u to the "optional_uint16" field.

func (*FieldTypeMutation) AddOptionalUint32

func (m *FieldTypeMutation) AddOptionalUint32(u int32)

AddOptionalUint32 adds u to the "optional_uint32" field.

func (*FieldTypeMutation) AddOptionalUint64

func (m *FieldTypeMutation) AddOptionalUint64(u int64)

AddOptionalUint64 adds u to the "optional_uint64" field.

func (*FieldTypeMutation) AddOptionalUint8

func (m *FieldTypeMutation) AddOptionalUint8(u int8)

AddOptionalUint8 adds u to the "optional_uint8" field.

func (*FieldTypeMutation) AddSchemaFloat

func (m *FieldTypeMutation) AddSchemaFloat(s schema.Float64)

AddSchemaFloat adds s to the "schema_float" field.

func (*FieldTypeMutation) AddSchemaFloat32

func (m *FieldTypeMutation) AddSchemaFloat32(s schema.Float32)

AddSchemaFloat32 adds s to the "schema_float32" field.

func (*FieldTypeMutation) AddSchemaInt

func (m *FieldTypeMutation) AddSchemaInt(s schema.Int)

AddSchemaInt adds s to the "schema_int" field.

func (*FieldTypeMutation) AddSchemaInt64

func (m *FieldTypeMutation) AddSchemaInt64(s schema.Int64)

AddSchemaInt64 adds s to the "schema_int64" field.

func (*FieldTypeMutation) AddSchemaInt8

func (m *FieldTypeMutation) AddSchemaInt8(s schema.Int8)

AddSchemaInt8 adds s to the "schema_int8" field.

func (*FieldTypeMutation) AddValidateOptionalInt32

func (m *FieldTypeMutation) AddValidateOptionalInt32(i int32)

AddValidateOptionalInt32 adds i to the "validate_optional_int32" field.

func (*FieldTypeMutation) AddedBigInt added in v0.9.0

func (m *FieldTypeMutation) AddedBigInt() (r schema.BigInt, exists bool)

AddedBigInt returns the value that was added to the "big_int" field in this mutation.

func (*FieldTypeMutation) AddedDecimal

func (m *FieldTypeMutation) AddedDecimal() (r float64, exists bool)

AddedDecimal returns the value that was added to the "decimal" field in this mutation.

func (*FieldTypeMutation) AddedDuration

func (m *FieldTypeMutation) AddedDuration() (r time.Duration, exists bool)

AddedDuration returns the value that was added to the "duration" field in this mutation.

func (*FieldTypeMutation) AddedEdges

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

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

func (*FieldTypeMutation) AddedField

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

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

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

func (*FieldTypeMutation) AddedIDs

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

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

func (*FieldTypeMutation) AddedInt

func (m *FieldTypeMutation) AddedInt() (r int, exists bool)

AddedInt returns the value that was added to the "int" field in this mutation.

func (*FieldTypeMutation) AddedInt16

func (m *FieldTypeMutation) AddedInt16() (r int16, exists bool)

AddedInt16 returns the value that was added to the "int16" field in this mutation.

func (*FieldTypeMutation) AddedInt32

func (m *FieldTypeMutation) AddedInt32() (r int32, exists bool)

AddedInt32 returns the value that was added to the "int32" field in this mutation.

func (*FieldTypeMutation) AddedInt64

func (m *FieldTypeMutation) AddedInt64() (r int64, exists bool)

AddedInt64 returns the value that was added to the "int64" field in this mutation.

func (*FieldTypeMutation) AddedInt8

func (m *FieldTypeMutation) AddedInt8() (r int8, exists bool)

AddedInt8 returns the value that was added to the "int8" field in this mutation.

func (*FieldTypeMutation) AddedNillableInt

func (m *FieldTypeMutation) AddedNillableInt() (r int, exists bool)

AddedNillableInt returns the value that was added to the "nillable_int" field in this mutation.

func (*FieldTypeMutation) AddedNillableInt16

func (m *FieldTypeMutation) AddedNillableInt16() (r int16, exists bool)

AddedNillableInt16 returns the value that was added to the "nillable_int16" field in this mutation.

func (*FieldTypeMutation) AddedNillableInt32

func (m *FieldTypeMutation) AddedNillableInt32() (r int32, exists bool)

AddedNillableInt32 returns the value that was added to the "nillable_int32" field in this mutation.

func (*FieldTypeMutation) AddedNillableInt64

func (m *FieldTypeMutation) AddedNillableInt64() (r int64, exists bool)

AddedNillableInt64 returns the value that was added to the "nillable_int64" field in this mutation.

func (*FieldTypeMutation) AddedNillableInt8

func (m *FieldTypeMutation) AddedNillableInt8() (r int8, exists bool)

AddedNillableInt8 returns the value that was added to the "nillable_int8" field in this mutation.

func (*FieldTypeMutation) AddedOptionalFloat

func (m *FieldTypeMutation) AddedOptionalFloat() (r float64, exists bool)

AddedOptionalFloat returns the value that was added to the "optional_float" field in this mutation.

func (*FieldTypeMutation) AddedOptionalFloat32

func (m *FieldTypeMutation) AddedOptionalFloat32() (r float32, exists bool)

AddedOptionalFloat32 returns the value that was added to the "optional_float32" field in this mutation.

func (*FieldTypeMutation) AddedOptionalInt

func (m *FieldTypeMutation) AddedOptionalInt() (r int, exists bool)

AddedOptionalInt returns the value that was added to the "optional_int" field in this mutation.

func (*FieldTypeMutation) AddedOptionalInt16

func (m *FieldTypeMutation) AddedOptionalInt16() (r int16, exists bool)

AddedOptionalInt16 returns the value that was added to the "optional_int16" field in this mutation.

func (*FieldTypeMutation) AddedOptionalInt32

func (m *FieldTypeMutation) AddedOptionalInt32() (r int32, exists bool)

AddedOptionalInt32 returns the value that was added to the "optional_int32" field in this mutation.

func (*FieldTypeMutation) AddedOptionalInt64

func (m *FieldTypeMutation) AddedOptionalInt64() (r int64, exists bool)

AddedOptionalInt64 returns the value that was added to the "optional_int64" field in this mutation.

func (*FieldTypeMutation) AddedOptionalInt8

func (m *FieldTypeMutation) AddedOptionalInt8() (r int8, exists bool)

AddedOptionalInt8 returns the value that was added to the "optional_int8" field in this mutation.

func (*FieldTypeMutation) AddedOptionalUint

func (m *FieldTypeMutation) AddedOptionalUint() (r int, exists bool)

AddedOptionalUint returns the value that was added to the "optional_uint" field in this mutation.

func (*FieldTypeMutation) AddedOptionalUint16

func (m *FieldTypeMutation) AddedOptionalUint16() (r int16, exists bool)

AddedOptionalUint16 returns the value that was added to the "optional_uint16" field in this mutation.

func (*FieldTypeMutation) AddedOptionalUint32

func (m *FieldTypeMutation) AddedOptionalUint32() (r int32, exists bool)

AddedOptionalUint32 returns the value that was added to the "optional_uint32" field in this mutation.

func (*FieldTypeMutation) AddedOptionalUint64

func (m *FieldTypeMutation) AddedOptionalUint64() (r int64, exists bool)

AddedOptionalUint64 returns the value that was added to the "optional_uint64" field in this mutation.

func (*FieldTypeMutation) AddedOptionalUint8

func (m *FieldTypeMutation) AddedOptionalUint8() (r int8, exists bool)

AddedOptionalUint8 returns the value that was added to the "optional_uint8" field in this mutation.

func (*FieldTypeMutation) AddedSchemaFloat

func (m *FieldTypeMutation) AddedSchemaFloat() (r schema.Float64, exists bool)

AddedSchemaFloat returns the value that was added to the "schema_float" field in this mutation.

func (*FieldTypeMutation) AddedSchemaFloat32

func (m *FieldTypeMutation) AddedSchemaFloat32() (r schema.Float32, exists bool)

AddedSchemaFloat32 returns the value that was added to the "schema_float32" field in this mutation.

func (*FieldTypeMutation) AddedSchemaInt

func (m *FieldTypeMutation) AddedSchemaInt() (r schema.Int, exists bool)

AddedSchemaInt returns the value that was added to the "schema_int" field in this mutation.

func (*FieldTypeMutation) AddedSchemaInt64

func (m *FieldTypeMutation) AddedSchemaInt64() (r schema.Int64, exists bool)

AddedSchemaInt64 returns the value that was added to the "schema_int64" field in this mutation.

func (*FieldTypeMutation) AddedSchemaInt8

func (m *FieldTypeMutation) AddedSchemaInt8() (r schema.Int8, exists bool)

AddedSchemaInt8 returns the value that was added to the "schema_int8" field in this mutation.

func (*FieldTypeMutation) AddedValidateOptionalInt32

func (m *FieldTypeMutation) AddedValidateOptionalInt32() (r int32, exists bool)

AddedValidateOptionalInt32 returns the value that was added to the "validate_optional_int32" field in this mutation.

func (*FieldTypeMutation) BigInt added in v0.9.0

func (m *FieldTypeMutation) BigInt() (r schema.BigInt, exists bool)

BigInt returns the value of the "big_int" field in the mutation.

func (*FieldTypeMutation) BigIntCleared added in v0.9.0

func (m *FieldTypeMutation) BigIntCleared() bool

BigIntCleared returns if the "big_int" field was cleared in this mutation.

func (*FieldTypeMutation) ClearActive

func (m *FieldTypeMutation) ClearActive()

ClearActive clears the value of the "active" field.

func (*FieldTypeMutation) ClearBigInt added in v0.9.0

func (m *FieldTypeMutation) ClearBigInt()

ClearBigInt clears the value of the "big_int" field.

func (*FieldTypeMutation) ClearDatetime

func (m *FieldTypeMutation) ClearDatetime()

ClearDatetime clears the value of the "datetime" field.

func (*FieldTypeMutation) ClearDecimal

func (m *FieldTypeMutation) ClearDecimal()

ClearDecimal clears the value of the "decimal" field.

func (*FieldTypeMutation) ClearDeleted

func (m *FieldTypeMutation) ClearDeleted()

ClearDeleted clears the value of the "deleted" field.

func (*FieldTypeMutation) ClearDeletedAt

func (m *FieldTypeMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FieldTypeMutation) ClearDuration

func (m *FieldTypeMutation) ClearDuration()

ClearDuration clears the value of the "duration" field.

func (*FieldTypeMutation) ClearEdge

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

func (m *FieldTypeMutation) 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 (*FieldTypeMutation) ClearIP

func (m *FieldTypeMutation) ClearIP()

ClearIP clears the value of the "ip" field.

func (m *FieldTypeMutation) ClearLink()

ClearLink clears the value of the "link" field.

func (*FieldTypeMutation) ClearLinkOther

func (m *FieldTypeMutation) ClearLinkOther()

ClearLinkOther clears the value of the "link_other" field.

func (*FieldTypeMutation) ClearLinkOtherFunc added in v0.10.0

func (m *FieldTypeMutation) ClearLinkOtherFunc()

ClearLinkOtherFunc clears the value of the "link_other_func" field.

func (*FieldTypeMutation) ClearMAC

func (m *FieldTypeMutation) ClearMAC()

ClearMAC clears the value of the "mac" field.

func (*FieldTypeMutation) ClearNdir

func (m *FieldTypeMutation) ClearNdir()

ClearNdir clears the value of the "ndir" field.

func (*FieldTypeMutation) ClearNilPair added in v0.8.0

func (m *FieldTypeMutation) ClearNilPair()

ClearNilPair clears the value of the "nil_pair" field.

func (*FieldTypeMutation) ClearNillableInt

func (m *FieldTypeMutation) ClearNillableInt()

ClearNillableInt clears the value of the "nillable_int" field.

func (*FieldTypeMutation) ClearNillableInt16

func (m *FieldTypeMutation) ClearNillableInt16()

ClearNillableInt16 clears the value of the "nillable_int16" field.

func (*FieldTypeMutation) ClearNillableInt32

func (m *FieldTypeMutation) ClearNillableInt32()

ClearNillableInt32 clears the value of the "nillable_int32" field.

func (*FieldTypeMutation) ClearNillableInt64

func (m *FieldTypeMutation) ClearNillableInt64()

ClearNillableInt64 clears the value of the "nillable_int64" field.

func (*FieldTypeMutation) ClearNillableInt8

func (m *FieldTypeMutation) ClearNillableInt8()

ClearNillableInt8 clears the value of the "nillable_int8" field.

func (*FieldTypeMutation) ClearNillableUUID added in v0.9.0

func (m *FieldTypeMutation) ClearNillableUUID()

ClearNillableUUID clears the value of the "nillable_uuid" field.

func (*FieldTypeMutation) ClearNullActive

func (m *FieldTypeMutation) ClearNullActive()

ClearNullActive clears the value of the "null_active" field.

func (*FieldTypeMutation) ClearNullFloat

func (m *FieldTypeMutation) ClearNullFloat()

ClearNullFloat clears the value of the "null_float" field.

func (*FieldTypeMutation) ClearNullInt64

func (m *FieldTypeMutation) ClearNullInt64()

ClearNullInt64 clears the value of the "null_int64" field.

func (m *FieldTypeMutation) ClearNullLink()

ClearNullLink clears the value of the "null_link" field.

func (*FieldTypeMutation) ClearNullStr

func (m *FieldTypeMutation) ClearNullStr()

ClearNullStr clears the value of the "null_str" field.

func (*FieldTypeMutation) ClearOptionalFloat

func (m *FieldTypeMutation) ClearOptionalFloat()

ClearOptionalFloat clears the value of the "optional_float" field.

func (*FieldTypeMutation) ClearOptionalFloat32

func (m *FieldTypeMutation) ClearOptionalFloat32()

ClearOptionalFloat32 clears the value of the "optional_float32" field.

func (*FieldTypeMutation) ClearOptionalInt

func (m *FieldTypeMutation) ClearOptionalInt()

ClearOptionalInt clears the value of the "optional_int" field.

func (*FieldTypeMutation) ClearOptionalInt16

func (m *FieldTypeMutation) ClearOptionalInt16()

ClearOptionalInt16 clears the value of the "optional_int16" field.

func (*FieldTypeMutation) ClearOptionalInt32

func (m *FieldTypeMutation) ClearOptionalInt32()

ClearOptionalInt32 clears the value of the "optional_int32" field.

func (*FieldTypeMutation) ClearOptionalInt64

func (m *FieldTypeMutation) ClearOptionalInt64()

ClearOptionalInt64 clears the value of the "optional_int64" field.

func (*FieldTypeMutation) ClearOptionalInt8

func (m *FieldTypeMutation) ClearOptionalInt8()

ClearOptionalInt8 clears the value of the "optional_int8" field.

func (*FieldTypeMutation) ClearOptionalUUID added in v0.10.0

func (m *FieldTypeMutation) ClearOptionalUUID()

ClearOptionalUUID clears the value of the "optional_uuid" field.

func (*FieldTypeMutation) ClearOptionalUint

func (m *FieldTypeMutation) ClearOptionalUint()

ClearOptionalUint clears the value of the "optional_uint" field.

func (*FieldTypeMutation) ClearOptionalUint16

func (m *FieldTypeMutation) ClearOptionalUint16()

ClearOptionalUint16 clears the value of the "optional_uint16" field.

func (*FieldTypeMutation) ClearOptionalUint32

func (m *FieldTypeMutation) ClearOptionalUint32()

ClearOptionalUint32 clears the value of the "optional_uint32" field.

func (*FieldTypeMutation) ClearOptionalUint64

func (m *FieldTypeMutation) ClearOptionalUint64()

ClearOptionalUint64 clears the value of the "optional_uint64" field.

func (*FieldTypeMutation) ClearOptionalUint8

func (m *FieldTypeMutation) ClearOptionalUint8()

ClearOptionalUint8 clears the value of the "optional_uint8" field.

func (*FieldTypeMutation) ClearPassword added in v0.9.0

func (m *FieldTypeMutation) ClearPassword()

ClearPassword clears the value of the "password" field.

func (*FieldTypeMutation) ClearPasswordOther added in v0.9.0

func (m *FieldTypeMutation) ClearPasswordOther()

ClearPasswordOther clears the value of the "password_other" field.

func (*FieldTypeMutation) ClearPriority added in v0.9.0

func (m *FieldTypeMutation) ClearPriority()

ClearPriority clears the value of the "priority" field.

func (*FieldTypeMutation) ClearRawData added in v0.10.0

func (m *FieldTypeMutation) ClearRawData()

ClearRawData clears the value of the "raw_data" field.

func (*FieldTypeMutation) ClearSchemaFloat

func (m *FieldTypeMutation) ClearSchemaFloat()

ClearSchemaFloat clears the value of the "schema_float" field.

func (*FieldTypeMutation) ClearSchemaFloat32

func (m *FieldTypeMutation) ClearSchemaFloat32()

ClearSchemaFloat32 clears the value of the "schema_float32" field.

func (*FieldTypeMutation) ClearSchemaInt

func (m *FieldTypeMutation) ClearSchemaInt()

ClearSchemaInt clears the value of the "schema_int" field.

func (*FieldTypeMutation) ClearSchemaInt64

func (m *FieldTypeMutation) ClearSchemaInt64()

ClearSchemaInt64 clears the value of the "schema_int64" field.

func (*FieldTypeMutation) ClearSchemaInt8

func (m *FieldTypeMutation) ClearSchemaInt8()

ClearSchemaInt8 clears the value of the "schema_int8" field.

func (*FieldTypeMutation) ClearSensitive added in v0.10.0

func (m *FieldTypeMutation) ClearSensitive()

ClearSensitive clears the value of the "sensitive" field.

func (*FieldTypeMutation) ClearState

func (m *FieldTypeMutation) ClearState()

ClearState clears the value of the "state" field.

func (*FieldTypeMutation) ClearStr

func (m *FieldTypeMutation) ClearStr()

ClearStr clears the value of the "str" field.

func (*FieldTypeMutation) ClearStringArray added in v0.8.0

func (m *FieldTypeMutation) ClearStringArray()

ClearStringArray clears the value of the "string_array" field.

func (*FieldTypeMutation) ClearStringScanner added in v0.9.0

func (m *FieldTypeMutation) ClearStringScanner()

ClearStringScanner clears the value of the "string_scanner" field.

func (*FieldTypeMutation) ClearStrings added in v0.8.0

func (m *FieldTypeMutation) ClearStrings()

ClearStrings clears the value of the "strings" field.

func (*FieldTypeMutation) ClearText added in v0.10.0

func (m *FieldTypeMutation) ClearText()

ClearText clears the value of the "text" field.

func (*FieldTypeMutation) ClearValidateOptionalInt32

func (m *FieldTypeMutation) ClearValidateOptionalInt32()

ClearValidateOptionalInt32 clears the value of the "validate_optional_int32" field.

func (*FieldTypeMutation) ClearedEdges

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

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

func (*FieldTypeMutation) ClearedFields

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

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

func (FieldTypeMutation) Client

func (m FieldTypeMutation) 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 (*FieldTypeMutation) Datetime

func (m *FieldTypeMutation) Datetime() (r time.Time, exists bool)

Datetime returns the value of the "datetime" field in the mutation.

func (*FieldTypeMutation) DatetimeCleared

func (m *FieldTypeMutation) DatetimeCleared() bool

DatetimeCleared returns if the "datetime" field was cleared in this mutation.

func (*FieldTypeMutation) Decimal

func (m *FieldTypeMutation) Decimal() (r float64, exists bool)

Decimal returns the value of the "decimal" field in the mutation.

func (*FieldTypeMutation) DecimalCleared

func (m *FieldTypeMutation) DecimalCleared() bool

DecimalCleared returns if the "decimal" field was cleared in this mutation.

func (*FieldTypeMutation) Deleted

func (m *FieldTypeMutation) Deleted() (r *sql.NullBool, exists bool)

Deleted returns the value of the "deleted" field in the mutation.

func (*FieldTypeMutation) DeletedAt

func (m *FieldTypeMutation) DeletedAt() (r *sql.NullTime, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*FieldTypeMutation) DeletedAtCleared

func (m *FieldTypeMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*FieldTypeMutation) DeletedCleared

func (m *FieldTypeMutation) DeletedCleared() bool

DeletedCleared returns if the "deleted" field was cleared in this mutation.

func (*FieldTypeMutation) Dir

func (m *FieldTypeMutation) Dir() (r http.Dir, exists bool)

Dir returns the value of the "dir" field in the mutation.

func (*FieldTypeMutation) Duration

func (m *FieldTypeMutation) Duration() (r time.Duration, exists bool)

Duration returns the value of the "duration" field in the mutation.

func (*FieldTypeMutation) DurationCleared

func (m *FieldTypeMutation) DurationCleared() bool

DurationCleared returns if the "duration" field was cleared in this mutation.

func (*FieldTypeMutation) EdgeCleared

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

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

func (*FieldTypeMutation) Field

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

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

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

func (*FieldTypeMutation) Fields

func (m *FieldTypeMutation) 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 (*FieldTypeMutation) Filter

func (m *FieldTypeMutation) Filter() *FieldTypeFilter

Filter returns an entql.Where implementation to apply filters on the FieldTypeMutation builder.

func (*FieldTypeMutation) ID

func (m *FieldTypeMutation) 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 (*FieldTypeMutation) IDs added in v0.10.0

func (m *FieldTypeMutation) 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 (*FieldTypeMutation) IP

func (m *FieldTypeMutation) IP() (r net.IP, exists bool)

IP returns the value of the "ip" field in the mutation.

func (*FieldTypeMutation) IPCleared

func (m *FieldTypeMutation) IPCleared() bool

IPCleared returns if the "ip" field was cleared in this mutation.

func (*FieldTypeMutation) Int

func (m *FieldTypeMutation) Int() (r int, exists bool)

Int returns the value of the "int" field in the mutation.

func (*FieldTypeMutation) Int16

func (m *FieldTypeMutation) Int16() (r int16, exists bool)

Int16 returns the value of the "int16" field in the mutation.

func (*FieldTypeMutation) Int32

func (m *FieldTypeMutation) Int32() (r int32, exists bool)

Int32 returns the value of the "int32" field in the mutation.

func (*FieldTypeMutation) Int64

func (m *FieldTypeMutation) Int64() (r int64, exists bool)

Int64 returns the value of the "int64" field in the mutation.

func (*FieldTypeMutation) Int8

func (m *FieldTypeMutation) Int8() (r int8, exists bool)

Int8 returns the value of the "int8" field in the mutation.

func (m *FieldTypeMutation) Link() (r schema.Link, exists bool)

Link returns the value of the "link" field in the mutation.

func (*FieldTypeMutation) LinkCleared

func (m *FieldTypeMutation) LinkCleared() bool

LinkCleared returns if the "link" field was cleared in this mutation.

func (*FieldTypeMutation) LinkOther

func (m *FieldTypeMutation) LinkOther() (r *schema.Link, exists bool)

LinkOther returns the value of the "link_other" field in the mutation.

func (*FieldTypeMutation) LinkOtherCleared

func (m *FieldTypeMutation) LinkOtherCleared() bool

LinkOtherCleared returns if the "link_other" field was cleared in this mutation.

func (*FieldTypeMutation) LinkOtherFunc added in v0.10.0

func (m *FieldTypeMutation) LinkOtherFunc() (r *schema.Link, exists bool)

LinkOtherFunc returns the value of the "link_other_func" field in the mutation.

func (*FieldTypeMutation) LinkOtherFuncCleared added in v0.10.0

func (m *FieldTypeMutation) LinkOtherFuncCleared() bool

LinkOtherFuncCleared returns if the "link_other_func" field was cleared in this mutation.

func (*FieldTypeMutation) MAC

func (m *FieldTypeMutation) MAC() (r schema.MAC, exists bool)

MAC returns the value of the "mac" field in the mutation.

func (*FieldTypeMutation) MACCleared

func (m *FieldTypeMutation) MACCleared() bool

MACCleared returns if the "mac" field was cleared in this mutation.

func (*FieldTypeMutation) Ndir

func (m *FieldTypeMutation) Ndir() (r http.Dir, exists bool)

Ndir returns the value of the "ndir" field in the mutation.

func (*FieldTypeMutation) NdirCleared

func (m *FieldTypeMutation) NdirCleared() bool

NdirCleared returns if the "ndir" field was cleared in this mutation.

func (*FieldTypeMutation) NilPair added in v0.8.0

func (m *FieldTypeMutation) NilPair() (r *schema.Pair, exists bool)

NilPair returns the value of the "nil_pair" field in the mutation.

func (*FieldTypeMutation) NilPairCleared added in v0.8.0

func (m *FieldTypeMutation) NilPairCleared() bool

NilPairCleared returns if the "nil_pair" field was cleared in this mutation.

func (*FieldTypeMutation) NillableInt

func (m *FieldTypeMutation) NillableInt() (r int, exists bool)

NillableInt returns the value of the "nillable_int" field in the mutation.

func (*FieldTypeMutation) NillableInt16

func (m *FieldTypeMutation) NillableInt16() (r int16, exists bool)

NillableInt16 returns the value of the "nillable_int16" field in the mutation.

func (*FieldTypeMutation) NillableInt16Cleared

func (m *FieldTypeMutation) NillableInt16Cleared() bool

NillableInt16Cleared returns if the "nillable_int16" field was cleared in this mutation.

func (*FieldTypeMutation) NillableInt32

func (m *FieldTypeMutation) NillableInt32() (r int32, exists bool)

NillableInt32 returns the value of the "nillable_int32" field in the mutation.

func (*FieldTypeMutation) NillableInt32Cleared

func (m *FieldTypeMutation) NillableInt32Cleared() bool

NillableInt32Cleared returns if the "nillable_int32" field was cleared in this mutation.

func (*FieldTypeMutation) NillableInt64

func (m *FieldTypeMutation) NillableInt64() (r int64, exists bool)

NillableInt64 returns the value of the "nillable_int64" field in the mutation.

func (*FieldTypeMutation) NillableInt64Cleared

func (m *FieldTypeMutation) NillableInt64Cleared() bool

NillableInt64Cleared returns if the "nillable_int64" field was cleared in this mutation.

func (*FieldTypeMutation) NillableInt8

func (m *FieldTypeMutation) NillableInt8() (r int8, exists bool)

NillableInt8 returns the value of the "nillable_int8" field in the mutation.

func (*FieldTypeMutation) NillableInt8Cleared

func (m *FieldTypeMutation) NillableInt8Cleared() bool

NillableInt8Cleared returns if the "nillable_int8" field was cleared in this mutation.

func (*FieldTypeMutation) NillableIntCleared

func (m *FieldTypeMutation) NillableIntCleared() bool

NillableIntCleared returns if the "nillable_int" field was cleared in this mutation.

func (*FieldTypeMutation) NillableUUID added in v0.9.0

func (m *FieldTypeMutation) NillableUUID() (r uuid.UUID, exists bool)

NillableUUID returns the value of the "nillable_uuid" field in the mutation.

func (*FieldTypeMutation) NillableUUIDCleared added in v0.9.0

func (m *FieldTypeMutation) NillableUUIDCleared() bool

NillableUUIDCleared returns if the "nillable_uuid" field was cleared in this mutation.

func (*FieldTypeMutation) NullActive

func (m *FieldTypeMutation) NullActive() (r schema.Status, exists bool)

NullActive returns the value of the "null_active" field in the mutation.

func (*FieldTypeMutation) NullActiveCleared

func (m *FieldTypeMutation) NullActiveCleared() bool

NullActiveCleared returns if the "null_active" field was cleared in this mutation.

func (*FieldTypeMutation) NullFloat

func (m *FieldTypeMutation) NullFloat() (r *sql.NullFloat64, exists bool)

NullFloat returns the value of the "null_float" field in the mutation.

func (*FieldTypeMutation) NullFloatCleared

func (m *FieldTypeMutation) NullFloatCleared() bool

NullFloatCleared returns if the "null_float" field was cleared in this mutation.

func (*FieldTypeMutation) NullInt64

func (m *FieldTypeMutation) NullInt64() (r *sql.NullInt64, exists bool)

NullInt64 returns the value of the "null_int64" field in the mutation.

func (*FieldTypeMutation) NullInt64Cleared

func (m *FieldTypeMutation) NullInt64Cleared() bool

NullInt64Cleared returns if the "null_int64" field was cleared in this mutation.

func (m *FieldTypeMutation) NullLink() (r *schema.Link, exists bool)

NullLink returns the value of the "null_link" field in the mutation.

func (*FieldTypeMutation) NullLinkCleared

func (m *FieldTypeMutation) NullLinkCleared() bool

NullLinkCleared returns if the "null_link" field was cleared in this mutation.

func (*FieldTypeMutation) NullStr

func (m *FieldTypeMutation) NullStr() (r *sql.NullString, exists bool)

NullStr returns the value of the "null_str" field in the mutation.

func (*FieldTypeMutation) NullStrCleared

func (m *FieldTypeMutation) NullStrCleared() bool

NullStrCleared returns if the "null_str" field was cleared in this mutation.

func (*FieldTypeMutation) OldActive

func (m *FieldTypeMutation) OldActive(ctx context.Context) (v schema.Status, err error)

OldActive returns the old "active" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldBigInt added in v0.9.0

func (m *FieldTypeMutation) OldBigInt(ctx context.Context) (v schema.BigInt, err error)

OldBigInt returns the old "big_int" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldDatetime

func (m *FieldTypeMutation) OldDatetime(ctx context.Context) (v time.Time, err error)

OldDatetime returns the old "datetime" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldDecimal

func (m *FieldTypeMutation) OldDecimal(ctx context.Context) (v float64, err error)

OldDecimal returns the old "decimal" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldDeleted

func (m *FieldTypeMutation) OldDeleted(ctx context.Context) (v *sql.NullBool, err error)

OldDeleted returns the old "deleted" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldDeletedAt

func (m *FieldTypeMutation) OldDeletedAt(ctx context.Context) (v *sql.NullTime, err error)

OldDeletedAt returns the old "deleted_at" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldDir

func (m *FieldTypeMutation) OldDir(ctx context.Context) (v http.Dir, err error)

OldDir returns the old "dir" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldDuration

func (m *FieldTypeMutation) OldDuration(ctx context.Context) (v time.Duration, err error)

OldDuration returns the old "duration" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldField

func (m *FieldTypeMutation) 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 (*FieldTypeMutation) OldIP

func (m *FieldTypeMutation) OldIP(ctx context.Context) (v net.IP, err error)

OldIP returns the old "ip" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldInt

func (m *FieldTypeMutation) OldInt(ctx context.Context) (v int, err error)

OldInt returns the old "int" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldInt16

func (m *FieldTypeMutation) OldInt16(ctx context.Context) (v int16, err error)

OldInt16 returns the old "int16" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldInt32

func (m *FieldTypeMutation) OldInt32(ctx context.Context) (v int32, err error)

OldInt32 returns the old "int32" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldInt64

func (m *FieldTypeMutation) OldInt64(ctx context.Context) (v int64, err error)

OldInt64 returns the old "int64" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldInt8

func (m *FieldTypeMutation) OldInt8(ctx context.Context) (v int8, err error)

OldInt8 returns the old "int8" field's value of the FieldType entity. If the FieldType 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 (m *FieldTypeMutation) OldLink(ctx context.Context) (v schema.Link, err error)

OldLink returns the old "link" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldLinkOther

func (m *FieldTypeMutation) OldLinkOther(ctx context.Context) (v *schema.Link, err error)

OldLinkOther returns the old "link_other" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldLinkOtherFunc added in v0.10.0

func (m *FieldTypeMutation) OldLinkOtherFunc(ctx context.Context) (v *schema.Link, err error)

OldLinkOtherFunc returns the old "link_other_func" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldMAC

func (m *FieldTypeMutation) OldMAC(ctx context.Context) (v schema.MAC, err error)

OldMAC returns the old "mac" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNdir

func (m *FieldTypeMutation) OldNdir(ctx context.Context) (v *http.Dir, err error)

OldNdir returns the old "ndir" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNilPair added in v0.8.0

func (m *FieldTypeMutation) OldNilPair(ctx context.Context) (v *schema.Pair, err error)

OldNilPair returns the old "nil_pair" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNillableInt

func (m *FieldTypeMutation) OldNillableInt(ctx context.Context) (v *int, err error)

OldNillableInt returns the old "nillable_int" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNillableInt16

func (m *FieldTypeMutation) OldNillableInt16(ctx context.Context) (v *int16, err error)

OldNillableInt16 returns the old "nillable_int16" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNillableInt32

func (m *FieldTypeMutation) OldNillableInt32(ctx context.Context) (v *int32, err error)

OldNillableInt32 returns the old "nillable_int32" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNillableInt64

func (m *FieldTypeMutation) OldNillableInt64(ctx context.Context) (v *int64, err error)

OldNillableInt64 returns the old "nillable_int64" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNillableInt8

func (m *FieldTypeMutation) OldNillableInt8(ctx context.Context) (v *int8, err error)

OldNillableInt8 returns the old "nillable_int8" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNillableUUID added in v0.9.0

func (m *FieldTypeMutation) OldNillableUUID(ctx context.Context) (v *uuid.UUID, err error)

OldNillableUUID returns the old "nillable_uuid" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNullActive

func (m *FieldTypeMutation) OldNullActive(ctx context.Context) (v *schema.Status, err error)

OldNullActive returns the old "null_active" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNullFloat

func (m *FieldTypeMutation) OldNullFloat(ctx context.Context) (v *sql.NullFloat64, err error)

OldNullFloat returns the old "null_float" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNullInt64

func (m *FieldTypeMutation) OldNullInt64(ctx context.Context) (v *sql.NullInt64, err error)

OldNullInt64 returns the old "null_int64" field's value of the FieldType entity. If the FieldType 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 (m *FieldTypeMutation) OldNullLink(ctx context.Context) (v *schema.Link, err error)

OldNullLink returns the old "null_link" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldNullStr

func (m *FieldTypeMutation) OldNullStr(ctx context.Context) (v *sql.NullString, err error)

OldNullStr returns the old "null_str" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalFloat

func (m *FieldTypeMutation) OldOptionalFloat(ctx context.Context) (v float64, err error)

OldOptionalFloat returns the old "optional_float" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalFloat32

func (m *FieldTypeMutation) OldOptionalFloat32(ctx context.Context) (v float32, err error)

OldOptionalFloat32 returns the old "optional_float32" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalInt

func (m *FieldTypeMutation) OldOptionalInt(ctx context.Context) (v int, err error)

OldOptionalInt returns the old "optional_int" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalInt16

func (m *FieldTypeMutation) OldOptionalInt16(ctx context.Context) (v int16, err error)

OldOptionalInt16 returns the old "optional_int16" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalInt32

func (m *FieldTypeMutation) OldOptionalInt32(ctx context.Context) (v int32, err error)

OldOptionalInt32 returns the old "optional_int32" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalInt64

func (m *FieldTypeMutation) OldOptionalInt64(ctx context.Context) (v int64, err error)

OldOptionalInt64 returns the old "optional_int64" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalInt8

func (m *FieldTypeMutation) OldOptionalInt8(ctx context.Context) (v int8, err error)

OldOptionalInt8 returns the old "optional_int8" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalUUID added in v0.10.0

func (m *FieldTypeMutation) OldOptionalUUID(ctx context.Context) (v uuid.UUID, err error)

OldOptionalUUID returns the old "optional_uuid" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalUint

func (m *FieldTypeMutation) OldOptionalUint(ctx context.Context) (v uint, err error)

OldOptionalUint returns the old "optional_uint" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalUint16

func (m *FieldTypeMutation) OldOptionalUint16(ctx context.Context) (v uint16, err error)

OldOptionalUint16 returns the old "optional_uint16" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalUint32

func (m *FieldTypeMutation) OldOptionalUint32(ctx context.Context) (v uint32, err error)

OldOptionalUint32 returns the old "optional_uint32" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalUint64

func (m *FieldTypeMutation) OldOptionalUint64(ctx context.Context) (v uint64, err error)

OldOptionalUint64 returns the old "optional_uint64" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldOptionalUint8

func (m *FieldTypeMutation) OldOptionalUint8(ctx context.Context) (v uint8, err error)

OldOptionalUint8 returns the old "optional_uint8" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldPair added in v0.8.0

func (m *FieldTypeMutation) OldPair(ctx context.Context) (v schema.Pair, err error)

OldPair returns the old "pair" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldPassword added in v0.9.0

func (m *FieldTypeMutation) OldPassword(ctx context.Context) (v string, err error)

OldPassword returns the old "password" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldPasswordOther added in v0.9.0

func (m *FieldTypeMutation) OldPasswordOther(ctx context.Context) (v schema.Password, err error)

OldPasswordOther returns the old "password_other" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldPriority added in v0.9.0

func (m *FieldTypeMutation) OldPriority(ctx context.Context) (v role.Priority, err error)

OldPriority returns the old "priority" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldRawData added in v0.10.0

func (m *FieldTypeMutation) OldRawData(ctx context.Context) (v []byte, err error)

OldRawData returns the old "raw_data" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldRole

func (m *FieldTypeMutation) OldRole(ctx context.Context) (v role.Role, err error)

OldRole returns the old "role" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldSchemaFloat

func (m *FieldTypeMutation) OldSchemaFloat(ctx context.Context) (v schema.Float64, err error)

OldSchemaFloat returns the old "schema_float" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldSchemaFloat32

func (m *FieldTypeMutation) OldSchemaFloat32(ctx context.Context) (v schema.Float32, err error)

OldSchemaFloat32 returns the old "schema_float32" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldSchemaInt

func (m *FieldTypeMutation) OldSchemaInt(ctx context.Context) (v schema.Int, err error)

OldSchemaInt returns the old "schema_int" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldSchemaInt64

func (m *FieldTypeMutation) OldSchemaInt64(ctx context.Context) (v schema.Int64, err error)

OldSchemaInt64 returns the old "schema_int64" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldSchemaInt8

func (m *FieldTypeMutation) OldSchemaInt8(ctx context.Context) (v schema.Int8, err error)

OldSchemaInt8 returns the old "schema_int8" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldSensitive added in v0.10.0

func (m *FieldTypeMutation) OldSensitive(ctx context.Context) (v []byte, err error)

OldSensitive returns the old "sensitive" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldState

func (m *FieldTypeMutation) OldState(ctx context.Context) (v fieldtype.State, err error)

OldState returns the old "state" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldStr

func (m *FieldTypeMutation) OldStr(ctx context.Context) (v sql.NullString, err error)

OldStr returns the old "str" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldStringArray added in v0.8.0

func (m *FieldTypeMutation) OldStringArray(ctx context.Context) (v schema.Strings, err error)

OldStringArray returns the old "string_array" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldStringScanner added in v0.9.0

func (m *FieldTypeMutation) OldStringScanner(ctx context.Context) (v *schema.StringScanner, err error)

OldStringScanner returns the old "string_scanner" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldStrings added in v0.8.0

func (m *FieldTypeMutation) OldStrings(ctx context.Context) (v []string, err error)

OldStrings returns the old "strings" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldText added in v0.10.0

func (m *FieldTypeMutation) OldText(ctx context.Context) (v string, err error)

OldText returns the old "text" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldTriple added in v0.8.0

func (m *FieldTypeMutation) OldTriple(ctx context.Context) (v schema.Triple, err error)

OldTriple returns the old "triple" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldValidateOptionalInt32

func (m *FieldTypeMutation) OldValidateOptionalInt32(ctx context.Context) (v int32, err error)

OldValidateOptionalInt32 returns the old "validate_optional_int32" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) OldVstring added in v0.8.0

func (m *FieldTypeMutation) OldVstring(ctx context.Context) (v schema.VString, err error)

OldVstring returns the old "vstring" field's value of the FieldType entity. If the FieldType 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 (*FieldTypeMutation) Op

func (m *FieldTypeMutation) Op() Op

Op returns the operation name.

func (*FieldTypeMutation) OptionalFloat

func (m *FieldTypeMutation) OptionalFloat() (r float64, exists bool)

OptionalFloat returns the value of the "optional_float" field in the mutation.

func (*FieldTypeMutation) OptionalFloat32

func (m *FieldTypeMutation) OptionalFloat32() (r float32, exists bool)

OptionalFloat32 returns the value of the "optional_float32" field in the mutation.

func (*FieldTypeMutation) OptionalFloat32Cleared

func (m *FieldTypeMutation) OptionalFloat32Cleared() bool

OptionalFloat32Cleared returns if the "optional_float32" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalFloatCleared

func (m *FieldTypeMutation) OptionalFloatCleared() bool

OptionalFloatCleared returns if the "optional_float" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalInt

func (m *FieldTypeMutation) OptionalInt() (r int, exists bool)

OptionalInt returns the value of the "optional_int" field in the mutation.

func (*FieldTypeMutation) OptionalInt16

func (m *FieldTypeMutation) OptionalInt16() (r int16, exists bool)

OptionalInt16 returns the value of the "optional_int16" field in the mutation.

func (*FieldTypeMutation) OptionalInt16Cleared

func (m *FieldTypeMutation) OptionalInt16Cleared() bool

OptionalInt16Cleared returns if the "optional_int16" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalInt32

func (m *FieldTypeMutation) OptionalInt32() (r int32, exists bool)

OptionalInt32 returns the value of the "optional_int32" field in the mutation.

func (*FieldTypeMutation) OptionalInt32Cleared

func (m *FieldTypeMutation) OptionalInt32Cleared() bool

OptionalInt32Cleared returns if the "optional_int32" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalInt64

func (m *FieldTypeMutation) OptionalInt64() (r int64, exists bool)

OptionalInt64 returns the value of the "optional_int64" field in the mutation.

func (*FieldTypeMutation) OptionalInt64Cleared

func (m *FieldTypeMutation) OptionalInt64Cleared() bool

OptionalInt64Cleared returns if the "optional_int64" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalInt8

func (m *FieldTypeMutation) OptionalInt8() (r int8, exists bool)

OptionalInt8 returns the value of the "optional_int8" field in the mutation.

func (*FieldTypeMutation) OptionalInt8Cleared

func (m *FieldTypeMutation) OptionalInt8Cleared() bool

OptionalInt8Cleared returns if the "optional_int8" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalIntCleared

func (m *FieldTypeMutation) OptionalIntCleared() bool

OptionalIntCleared returns if the "optional_int" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalUUID added in v0.10.0

func (m *FieldTypeMutation) OptionalUUID() (r uuid.UUID, exists bool)

OptionalUUID returns the value of the "optional_uuid" field in the mutation.

func (*FieldTypeMutation) OptionalUUIDCleared added in v0.10.0

func (m *FieldTypeMutation) OptionalUUIDCleared() bool

OptionalUUIDCleared returns if the "optional_uuid" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalUint

func (m *FieldTypeMutation) OptionalUint() (r uint, exists bool)

OptionalUint returns the value of the "optional_uint" field in the mutation.

func (*FieldTypeMutation) OptionalUint16

func (m *FieldTypeMutation) OptionalUint16() (r uint16, exists bool)

OptionalUint16 returns the value of the "optional_uint16" field in the mutation.

func (*FieldTypeMutation) OptionalUint16Cleared

func (m *FieldTypeMutation) OptionalUint16Cleared() bool

OptionalUint16Cleared returns if the "optional_uint16" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalUint32

func (m *FieldTypeMutation) OptionalUint32() (r uint32, exists bool)

OptionalUint32 returns the value of the "optional_uint32" field in the mutation.

func (*FieldTypeMutation) OptionalUint32Cleared

func (m *FieldTypeMutation) OptionalUint32Cleared() bool

OptionalUint32Cleared returns if the "optional_uint32" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalUint64

func (m *FieldTypeMutation) OptionalUint64() (r uint64, exists bool)

OptionalUint64 returns the value of the "optional_uint64" field in the mutation.

func (*FieldTypeMutation) OptionalUint64Cleared

func (m *FieldTypeMutation) OptionalUint64Cleared() bool

OptionalUint64Cleared returns if the "optional_uint64" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalUint8

func (m *FieldTypeMutation) OptionalUint8() (r uint8, exists bool)

OptionalUint8 returns the value of the "optional_uint8" field in the mutation.

func (*FieldTypeMutation) OptionalUint8Cleared

func (m *FieldTypeMutation) OptionalUint8Cleared() bool

OptionalUint8Cleared returns if the "optional_uint8" field was cleared in this mutation.

func (*FieldTypeMutation) OptionalUintCleared

func (m *FieldTypeMutation) OptionalUintCleared() bool

OptionalUintCleared returns if the "optional_uint" field was cleared in this mutation.

func (*FieldTypeMutation) Pair added in v0.8.0

func (m *FieldTypeMutation) Pair() (r schema.Pair, exists bool)

Pair returns the value of the "pair" field in the mutation.

func (*FieldTypeMutation) Password added in v0.9.0

func (m *FieldTypeMutation) Password() (r string, exists bool)

Password returns the value of the "password" field in the mutation.

func (*FieldTypeMutation) PasswordCleared added in v0.9.0

func (m *FieldTypeMutation) PasswordCleared() bool

PasswordCleared returns if the "password" field was cleared in this mutation.

func (*FieldTypeMutation) PasswordOther added in v0.9.0

func (m *FieldTypeMutation) PasswordOther() (r schema.Password, exists bool)

PasswordOther returns the value of the "password_other" field in the mutation.

func (*FieldTypeMutation) PasswordOtherCleared added in v0.9.0

func (m *FieldTypeMutation) PasswordOtherCleared() bool

PasswordOtherCleared returns if the "password_other" field was cleared in this mutation.

func (*FieldTypeMutation) Priority added in v0.9.0

func (m *FieldTypeMutation) Priority() (r role.Priority, exists bool)

Priority returns the value of the "priority" field in the mutation.

func (*FieldTypeMutation) PriorityCleared added in v0.9.0

func (m *FieldTypeMutation) PriorityCleared() bool

PriorityCleared returns if the "priority" field was cleared in this mutation.

func (*FieldTypeMutation) RawData added in v0.10.0

func (m *FieldTypeMutation) RawData() (r []byte, exists bool)

RawData returns the value of the "raw_data" field in the mutation.

func (*FieldTypeMutation) RawDataCleared added in v0.10.0

func (m *FieldTypeMutation) RawDataCleared() bool

RawDataCleared returns if the "raw_data" field was cleared in this mutation.

func (*FieldTypeMutation) RemovedEdges

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

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

func (*FieldTypeMutation) RemovedIDs

func (m *FieldTypeMutation) 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 (*FieldTypeMutation) ResetActive

func (m *FieldTypeMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*FieldTypeMutation) ResetBigInt added in v0.9.0

func (m *FieldTypeMutation) ResetBigInt()

ResetBigInt resets all changes to the "big_int" field.

func (*FieldTypeMutation) ResetDatetime

func (m *FieldTypeMutation) ResetDatetime()

ResetDatetime resets all changes to the "datetime" field.

func (*FieldTypeMutation) ResetDecimal

func (m *FieldTypeMutation) ResetDecimal()

ResetDecimal resets all changes to the "decimal" field.

func (*FieldTypeMutation) ResetDeleted

func (m *FieldTypeMutation) ResetDeleted()

ResetDeleted resets all changes to the "deleted" field.

func (*FieldTypeMutation) ResetDeletedAt

func (m *FieldTypeMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*FieldTypeMutation) ResetDir

func (m *FieldTypeMutation) ResetDir()

ResetDir resets all changes to the "dir" field.

func (*FieldTypeMutation) ResetDuration

func (m *FieldTypeMutation) ResetDuration()

ResetDuration resets all changes to the "duration" field.

func (*FieldTypeMutation) ResetEdge

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

func (m *FieldTypeMutation) 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 (*FieldTypeMutation) ResetIP

func (m *FieldTypeMutation) ResetIP()

ResetIP resets all changes to the "ip" field.

func (*FieldTypeMutation) ResetInt

func (m *FieldTypeMutation) ResetInt()

ResetInt resets all changes to the "int" field.

func (*FieldTypeMutation) ResetInt16

func (m *FieldTypeMutation) ResetInt16()

ResetInt16 resets all changes to the "int16" field.

func (*FieldTypeMutation) ResetInt32

func (m *FieldTypeMutation) ResetInt32()

ResetInt32 resets all changes to the "int32" field.

func (*FieldTypeMutation) ResetInt64

func (m *FieldTypeMutation) ResetInt64()

ResetInt64 resets all changes to the "int64" field.

func (*FieldTypeMutation) ResetInt8

func (m *FieldTypeMutation) ResetInt8()

ResetInt8 resets all changes to the "int8" field.

func (m *FieldTypeMutation) ResetLink()

ResetLink resets all changes to the "link" field.

func (*FieldTypeMutation) ResetLinkOther

func (m *FieldTypeMutation) ResetLinkOther()

ResetLinkOther resets all changes to the "link_other" field.

func (*FieldTypeMutation) ResetLinkOtherFunc added in v0.10.0

func (m *FieldTypeMutation) ResetLinkOtherFunc()

ResetLinkOtherFunc resets all changes to the "link_other_func" field.

func (*FieldTypeMutation) ResetMAC

func (m *FieldTypeMutation) ResetMAC()

ResetMAC resets all changes to the "mac" field.

func (*FieldTypeMutation) ResetNdir

func (m *FieldTypeMutation) ResetNdir()

ResetNdir resets all changes to the "ndir" field.

func (*FieldTypeMutation) ResetNilPair added in v0.8.0

func (m *FieldTypeMutation) ResetNilPair()

ResetNilPair resets all changes to the "nil_pair" field.

func (*FieldTypeMutation) ResetNillableInt

func (m *FieldTypeMutation) ResetNillableInt()

ResetNillableInt resets all changes to the "nillable_int" field.

func (*FieldTypeMutation) ResetNillableInt16

func (m *FieldTypeMutation) ResetNillableInt16()

ResetNillableInt16 resets all changes to the "nillable_int16" field.

func (*FieldTypeMutation) ResetNillableInt32

func (m *FieldTypeMutation) ResetNillableInt32()

ResetNillableInt32 resets all changes to the "nillable_int32" field.

func (*FieldTypeMutation) ResetNillableInt64

func (m *FieldTypeMutation) ResetNillableInt64()

ResetNillableInt64 resets all changes to the "nillable_int64" field.

func (*FieldTypeMutation) ResetNillableInt8

func (m *FieldTypeMutation) ResetNillableInt8()

ResetNillableInt8 resets all changes to the "nillable_int8" field.

func (*FieldTypeMutation) ResetNillableUUID added in v0.9.0

func (m *FieldTypeMutation) ResetNillableUUID()

ResetNillableUUID resets all changes to the "nillable_uuid" field.

func (*FieldTypeMutation) ResetNullActive

func (m *FieldTypeMutation) ResetNullActive()

ResetNullActive resets all changes to the "null_active" field.

func (*FieldTypeMutation) ResetNullFloat

func (m *FieldTypeMutation) ResetNullFloat()

ResetNullFloat resets all changes to the "null_float" field.

func (*FieldTypeMutation) ResetNullInt64

func (m *FieldTypeMutation) ResetNullInt64()

ResetNullInt64 resets all changes to the "null_int64" field.

func (m *FieldTypeMutation) ResetNullLink()

ResetNullLink resets all changes to the "null_link" field.

func (*FieldTypeMutation) ResetNullStr

func (m *FieldTypeMutation) ResetNullStr()

ResetNullStr resets all changes to the "null_str" field.

func (*FieldTypeMutation) ResetOptionalFloat

func (m *FieldTypeMutation) ResetOptionalFloat()

ResetOptionalFloat resets all changes to the "optional_float" field.

func (*FieldTypeMutation) ResetOptionalFloat32

func (m *FieldTypeMutation) ResetOptionalFloat32()

ResetOptionalFloat32 resets all changes to the "optional_float32" field.

func (*FieldTypeMutation) ResetOptionalInt

func (m *FieldTypeMutation) ResetOptionalInt()

ResetOptionalInt resets all changes to the "optional_int" field.

func (*FieldTypeMutation) ResetOptionalInt16

func (m *FieldTypeMutation) ResetOptionalInt16()

ResetOptionalInt16 resets all changes to the "optional_int16" field.

func (*FieldTypeMutation) ResetOptionalInt32

func (m *FieldTypeMutation) ResetOptionalInt32()

ResetOptionalInt32 resets all changes to the "optional_int32" field.

func (*FieldTypeMutation) ResetOptionalInt64

func (m *FieldTypeMutation) ResetOptionalInt64()

ResetOptionalInt64 resets all changes to the "optional_int64" field.

func (*FieldTypeMutation) ResetOptionalInt8

func (m *FieldTypeMutation) ResetOptionalInt8()

ResetOptionalInt8 resets all changes to the "optional_int8" field.

func (*FieldTypeMutation) ResetOptionalUUID added in v0.10.0

func (m *FieldTypeMutation) ResetOptionalUUID()

ResetOptionalUUID resets all changes to the "optional_uuid" field.

func (*FieldTypeMutation) ResetOptionalUint

func (m *FieldTypeMutation) ResetOptionalUint()

ResetOptionalUint resets all changes to the "optional_uint" field.

func (*FieldTypeMutation) ResetOptionalUint16

func (m *FieldTypeMutation) ResetOptionalUint16()

ResetOptionalUint16 resets all changes to the "optional_uint16" field.

func (*FieldTypeMutation) ResetOptionalUint32

func (m *FieldTypeMutation) ResetOptionalUint32()

ResetOptionalUint32 resets all changes to the "optional_uint32" field.

func (*FieldTypeMutation) ResetOptionalUint64

func (m *FieldTypeMutation) ResetOptionalUint64()

ResetOptionalUint64 resets all changes to the "optional_uint64" field.

func (*FieldTypeMutation) ResetOptionalUint8

func (m *FieldTypeMutation) ResetOptionalUint8()

ResetOptionalUint8 resets all changes to the "optional_uint8" field.

func (*FieldTypeMutation) ResetPair added in v0.8.0

func (m *FieldTypeMutation) ResetPair()

ResetPair resets all changes to the "pair" field.

func (*FieldTypeMutation) ResetPassword added in v0.9.0

func (m *FieldTypeMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*FieldTypeMutation) ResetPasswordOther added in v0.9.0

func (m *FieldTypeMutation) ResetPasswordOther()

ResetPasswordOther resets all changes to the "password_other" field.

func (*FieldTypeMutation) ResetPriority added in v0.9.0

func (m *FieldTypeMutation) ResetPriority()

ResetPriority resets all changes to the "priority" field.

func (*FieldTypeMutation) ResetRawData added in v0.10.0

func (m *FieldTypeMutation) ResetRawData()

ResetRawData resets all changes to the "raw_data" field.

func (*FieldTypeMutation) ResetRole

func (m *FieldTypeMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*FieldTypeMutation) ResetSchemaFloat

func (m *FieldTypeMutation) ResetSchemaFloat()

ResetSchemaFloat resets all changes to the "schema_float" field.

func (*FieldTypeMutation) ResetSchemaFloat32

func (m *FieldTypeMutation) ResetSchemaFloat32()

ResetSchemaFloat32 resets all changes to the "schema_float32" field.

func (*FieldTypeMutation) ResetSchemaInt

func (m *FieldTypeMutation) ResetSchemaInt()

ResetSchemaInt resets all changes to the "schema_int" field.

func (*FieldTypeMutation) ResetSchemaInt64

func (m *FieldTypeMutation) ResetSchemaInt64()

ResetSchemaInt64 resets all changes to the "schema_int64" field.

func (*FieldTypeMutation) ResetSchemaInt8

func (m *FieldTypeMutation) ResetSchemaInt8()

ResetSchemaInt8 resets all changes to the "schema_int8" field.

func (*FieldTypeMutation) ResetSensitive added in v0.10.0

func (m *FieldTypeMutation) ResetSensitive()

ResetSensitive resets all changes to the "sensitive" field.

func (*FieldTypeMutation) ResetState

func (m *FieldTypeMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*FieldTypeMutation) ResetStr

func (m *FieldTypeMutation) ResetStr()

ResetStr resets all changes to the "str" field.

func (*FieldTypeMutation) ResetStringArray added in v0.8.0

func (m *FieldTypeMutation) ResetStringArray()

ResetStringArray resets all changes to the "string_array" field.

func (*FieldTypeMutation) ResetStringScanner added in v0.9.0

func (m *FieldTypeMutation) ResetStringScanner()

ResetStringScanner resets all changes to the "string_scanner" field.

func (*FieldTypeMutation) ResetStrings added in v0.8.0

func (m *FieldTypeMutation) ResetStrings()

ResetStrings resets all changes to the "strings" field.

func (*FieldTypeMutation) ResetText added in v0.10.0

func (m *FieldTypeMutation) ResetText()

ResetText resets all changes to the "text" field.

func (*FieldTypeMutation) ResetTriple added in v0.8.0

func (m *FieldTypeMutation) ResetTriple()

ResetTriple resets all changes to the "triple" field.

func (*FieldTypeMutation) ResetValidateOptionalInt32

func (m *FieldTypeMutation) ResetValidateOptionalInt32()

ResetValidateOptionalInt32 resets all changes to the "validate_optional_int32" field.

func (*FieldTypeMutation) ResetVstring added in v0.8.0

func (m *FieldTypeMutation) ResetVstring()

ResetVstring resets all changes to the "vstring" field.

func (*FieldTypeMutation) Role

func (m *FieldTypeMutation) Role() (r role.Role, exists bool)

Role returns the value of the "role" field in the mutation.

func (*FieldTypeMutation) SchemaFloat

func (m *FieldTypeMutation) SchemaFloat() (r schema.Float64, exists bool)

SchemaFloat returns the value of the "schema_float" field in the mutation.

func (*FieldTypeMutation) SchemaFloat32

func (m *FieldTypeMutation) SchemaFloat32() (r schema.Float32, exists bool)

SchemaFloat32 returns the value of the "schema_float32" field in the mutation.

func (*FieldTypeMutation) SchemaFloat32Cleared

func (m *FieldTypeMutation) SchemaFloat32Cleared() bool

SchemaFloat32Cleared returns if the "schema_float32" field was cleared in this mutation.

func (*FieldTypeMutation) SchemaFloatCleared

func (m *FieldTypeMutation) SchemaFloatCleared() bool

SchemaFloatCleared returns if the "schema_float" field was cleared in this mutation.

func (*FieldTypeMutation) SchemaInt

func (m *FieldTypeMutation) SchemaInt() (r schema.Int, exists bool)

SchemaInt returns the value of the "schema_int" field in the mutation.

func (*FieldTypeMutation) SchemaInt64

func (m *FieldTypeMutation) SchemaInt64() (r schema.Int64, exists bool)

SchemaInt64 returns the value of the "schema_int64" field in the mutation.

func (*FieldTypeMutation) SchemaInt64Cleared

func (m *FieldTypeMutation) SchemaInt64Cleared() bool

SchemaInt64Cleared returns if the "schema_int64" field was cleared in this mutation.

func (*FieldTypeMutation) SchemaInt8

func (m *FieldTypeMutation) SchemaInt8() (r schema.Int8, exists bool)

SchemaInt8 returns the value of the "schema_int8" field in the mutation.

func (*FieldTypeMutation) SchemaInt8Cleared

func (m *FieldTypeMutation) SchemaInt8Cleared() bool

SchemaInt8Cleared returns if the "schema_int8" field was cleared in this mutation.

func (*FieldTypeMutation) SchemaIntCleared

func (m *FieldTypeMutation) SchemaIntCleared() bool

SchemaIntCleared returns if the "schema_int" field was cleared in this mutation.

func (*FieldTypeMutation) Sensitive added in v0.10.0

func (m *FieldTypeMutation) Sensitive() (r []byte, exists bool)

Sensitive returns the value of the "sensitive" field in the mutation.

func (*FieldTypeMutation) SensitiveCleared added in v0.10.0

func (m *FieldTypeMutation) SensitiveCleared() bool

SensitiveCleared returns if the "sensitive" field was cleared in this mutation.

func (*FieldTypeMutation) SetActive

func (m *FieldTypeMutation) SetActive(s schema.Status)

SetActive sets the "active" field.

func (*FieldTypeMutation) SetBigInt added in v0.9.0

func (m *FieldTypeMutation) SetBigInt(si schema.BigInt)

SetBigInt sets the "big_int" field.

func (*FieldTypeMutation) SetDatetime

func (m *FieldTypeMutation) SetDatetime(t time.Time)

SetDatetime sets the "datetime" field.

func (*FieldTypeMutation) SetDecimal

func (m *FieldTypeMutation) SetDecimal(f float64)

SetDecimal sets the "decimal" field.

func (*FieldTypeMutation) SetDeleted

func (m *FieldTypeMutation) SetDeleted(sb *sql.NullBool)

SetDeleted sets the "deleted" field.

func (*FieldTypeMutation) SetDeletedAt

func (m *FieldTypeMutation) SetDeletedAt(st *sql.NullTime)

SetDeletedAt sets the "deleted_at" field.

func (*FieldTypeMutation) SetDir

func (m *FieldTypeMutation) SetDir(h http.Dir)

SetDir sets the "dir" field.

func (*FieldTypeMutation) SetDuration

func (m *FieldTypeMutation) SetDuration(t time.Duration)

SetDuration sets the "duration" field.

func (*FieldTypeMutation) SetField

func (m *FieldTypeMutation) 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 (*FieldTypeMutation) SetIP

func (m *FieldTypeMutation) SetIP(n net.IP)

SetIP sets the "ip" field.

func (*FieldTypeMutation) SetInt

func (m *FieldTypeMutation) SetInt(i int)

SetInt sets the "int" field.

func (*FieldTypeMutation) SetInt16

func (m *FieldTypeMutation) SetInt16(i int16)

SetInt16 sets the "int16" field.

func (*FieldTypeMutation) SetInt32

func (m *FieldTypeMutation) SetInt32(i int32)

SetInt32 sets the "int32" field.

func (*FieldTypeMutation) SetInt64

func (m *FieldTypeMutation) SetInt64(i int64)

SetInt64 sets the "int64" field.

func (*FieldTypeMutation) SetInt8

func (m *FieldTypeMutation) SetInt8(i int8)

SetInt8 sets the "int8" field.

func (m *FieldTypeMutation) SetLink(s schema.Link)

SetLink sets the "link" field.

func (*FieldTypeMutation) SetLinkOther

func (m *FieldTypeMutation) SetLinkOther(s *schema.Link)

SetLinkOther sets the "link_other" field.

func (*FieldTypeMutation) SetLinkOtherFunc added in v0.10.0

func (m *FieldTypeMutation) SetLinkOtherFunc(s *schema.Link)

SetLinkOtherFunc sets the "link_other_func" field.

func (*FieldTypeMutation) SetMAC

func (m *FieldTypeMutation) SetMAC(s schema.MAC)

SetMAC sets the "mac" field.

func (*FieldTypeMutation) SetNdir

func (m *FieldTypeMutation) SetNdir(h http.Dir)

SetNdir sets the "ndir" field.

func (*FieldTypeMutation) SetNilPair added in v0.8.0

func (m *FieldTypeMutation) SetNilPair(s *schema.Pair)

SetNilPair sets the "nil_pair" field.

func (*FieldTypeMutation) SetNillableInt

func (m *FieldTypeMutation) SetNillableInt(i int)

SetNillableInt sets the "nillable_int" field.

func (*FieldTypeMutation) SetNillableInt16

func (m *FieldTypeMutation) SetNillableInt16(i int16)

SetNillableInt16 sets the "nillable_int16" field.

func (*FieldTypeMutation) SetNillableInt32

func (m *FieldTypeMutation) SetNillableInt32(i int32)

SetNillableInt32 sets the "nillable_int32" field.

func (*FieldTypeMutation) SetNillableInt64

func (m *FieldTypeMutation) SetNillableInt64(i int64)

SetNillableInt64 sets the "nillable_int64" field.

func (*FieldTypeMutation) SetNillableInt8

func (m *FieldTypeMutation) SetNillableInt8(i int8)

SetNillableInt8 sets the "nillable_int8" field.

func (*FieldTypeMutation) SetNillableUUID added in v0.9.0

func (m *FieldTypeMutation) SetNillableUUID(u uuid.UUID)

SetNillableUUID sets the "nillable_uuid" field.

func (*FieldTypeMutation) SetNullActive

func (m *FieldTypeMutation) SetNullActive(s schema.Status)

SetNullActive sets the "null_active" field.

func (*FieldTypeMutation) SetNullFloat

func (m *FieldTypeMutation) SetNullFloat(sf *sql.NullFloat64)

SetNullFloat sets the "null_float" field.

func (*FieldTypeMutation) SetNullInt64

func (m *FieldTypeMutation) SetNullInt64(si *sql.NullInt64)

SetNullInt64 sets the "null_int64" field.

func (m *FieldTypeMutation) SetNullLink(s *schema.Link)

SetNullLink sets the "null_link" field.

func (*FieldTypeMutation) SetNullStr

func (m *FieldTypeMutation) SetNullStr(ss *sql.NullString)

SetNullStr sets the "null_str" field.

func (*FieldTypeMutation) SetOptionalFloat

func (m *FieldTypeMutation) SetOptionalFloat(f float64)

SetOptionalFloat sets the "optional_float" field.

func (*FieldTypeMutation) SetOptionalFloat32

func (m *FieldTypeMutation) SetOptionalFloat32(f float32)

SetOptionalFloat32 sets the "optional_float32" field.

func (*FieldTypeMutation) SetOptionalInt

func (m *FieldTypeMutation) SetOptionalInt(i int)

SetOptionalInt sets the "optional_int" field.

func (*FieldTypeMutation) SetOptionalInt16

func (m *FieldTypeMutation) SetOptionalInt16(i int16)

SetOptionalInt16 sets the "optional_int16" field.

func (*FieldTypeMutation) SetOptionalInt32

func (m *FieldTypeMutation) SetOptionalInt32(i int32)

SetOptionalInt32 sets the "optional_int32" field.

func (*FieldTypeMutation) SetOptionalInt64

func (m *FieldTypeMutation) SetOptionalInt64(i int64)

SetOptionalInt64 sets the "optional_int64" field.

func (*FieldTypeMutation) SetOptionalInt8

func (m *FieldTypeMutation) SetOptionalInt8(i int8)

SetOptionalInt8 sets the "optional_int8" field.

func (*FieldTypeMutation) SetOptionalUUID added in v0.10.0

func (m *FieldTypeMutation) SetOptionalUUID(u uuid.UUID)

SetOptionalUUID sets the "optional_uuid" field.

func (*FieldTypeMutation) SetOptionalUint

func (m *FieldTypeMutation) SetOptionalUint(u uint)

SetOptionalUint sets the "optional_uint" field.

func (*FieldTypeMutation) SetOptionalUint16

func (m *FieldTypeMutation) SetOptionalUint16(u uint16)

SetOptionalUint16 sets the "optional_uint16" field.

func (*FieldTypeMutation) SetOptionalUint32

func (m *FieldTypeMutation) SetOptionalUint32(u uint32)

SetOptionalUint32 sets the "optional_uint32" field.

func (*FieldTypeMutation) SetOptionalUint64

func (m *FieldTypeMutation) SetOptionalUint64(u uint64)

SetOptionalUint64 sets the "optional_uint64" field.

func (*FieldTypeMutation) SetOptionalUint8

func (m *FieldTypeMutation) SetOptionalUint8(u uint8)

SetOptionalUint8 sets the "optional_uint8" field.

func (*FieldTypeMutation) SetPair added in v0.8.0

func (m *FieldTypeMutation) SetPair(s schema.Pair)

SetPair sets the "pair" field.

func (*FieldTypeMutation) SetPassword added in v0.9.0

func (m *FieldTypeMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*FieldTypeMutation) SetPasswordOther added in v0.9.0

func (m *FieldTypeMutation) SetPasswordOther(s schema.Password)

SetPasswordOther sets the "password_other" field.

func (*FieldTypeMutation) SetPriority added in v0.9.0

func (m *FieldTypeMutation) SetPriority(r role.Priority)

SetPriority sets the "priority" field.

func (*FieldTypeMutation) SetRawData added in v0.10.0

func (m *FieldTypeMutation) SetRawData(b []byte)

SetRawData sets the "raw_data" field.

func (*FieldTypeMutation) SetRole

func (m *FieldTypeMutation) SetRole(r role.Role)

SetRole sets the "role" field.

func (*FieldTypeMutation) SetSchemaFloat

func (m *FieldTypeMutation) SetSchemaFloat(s schema.Float64)

SetSchemaFloat sets the "schema_float" field.

func (*FieldTypeMutation) SetSchemaFloat32

func (m *FieldTypeMutation) SetSchemaFloat32(s schema.Float32)

SetSchemaFloat32 sets the "schema_float32" field.

func (*FieldTypeMutation) SetSchemaInt

func (m *FieldTypeMutation) SetSchemaInt(s schema.Int)

SetSchemaInt sets the "schema_int" field.

func (*FieldTypeMutation) SetSchemaInt64

func (m *FieldTypeMutation) SetSchemaInt64(s schema.Int64)

SetSchemaInt64 sets the "schema_int64" field.

func (*FieldTypeMutation) SetSchemaInt8

func (m *FieldTypeMutation) SetSchemaInt8(s schema.Int8)

SetSchemaInt8 sets the "schema_int8" field.

func (*FieldTypeMutation) SetSensitive added in v0.10.0

func (m *FieldTypeMutation) SetSensitive(b []byte)

SetSensitive sets the "sensitive" field.

func (*FieldTypeMutation) SetState

func (m *FieldTypeMutation) SetState(f fieldtype.State)

SetState sets the "state" field.

func (*FieldTypeMutation) SetStr

func (m *FieldTypeMutation) SetStr(ss sql.NullString)

SetStr sets the "str" field.

func (*FieldTypeMutation) SetStringArray added in v0.8.0

func (m *FieldTypeMutation) SetStringArray(s schema.Strings)

SetStringArray sets the "string_array" field.

func (*FieldTypeMutation) SetStringScanner added in v0.9.0

func (m *FieldTypeMutation) SetStringScanner(ss schema.StringScanner)

SetStringScanner sets the "string_scanner" field.

func (*FieldTypeMutation) SetStrings added in v0.8.0

func (m *FieldTypeMutation) SetStrings(s []string)

SetStrings sets the "strings" field.

func (*FieldTypeMutation) SetText added in v0.10.0

func (m *FieldTypeMutation) SetText(s string)

SetText sets the "text" field.

func (*FieldTypeMutation) SetTriple added in v0.8.0

func (m *FieldTypeMutation) SetTriple(s schema.Triple)

SetTriple sets the "triple" field.

func (*FieldTypeMutation) SetValidateOptionalInt32

func (m *FieldTypeMutation) SetValidateOptionalInt32(i int32)

SetValidateOptionalInt32 sets the "validate_optional_int32" field.

func (*FieldTypeMutation) SetVstring added in v0.8.0

func (m *FieldTypeMutation) SetVstring(ss schema.VString)

SetVstring sets the "vstring" field.

func (*FieldTypeMutation) State

func (m *FieldTypeMutation) State() (r fieldtype.State, exists bool)

State returns the value of the "state" field in the mutation.

func (*FieldTypeMutation) StateCleared

func (m *FieldTypeMutation) StateCleared() bool

StateCleared returns if the "state" field was cleared in this mutation.

func (*FieldTypeMutation) Str

func (m *FieldTypeMutation) Str() (r sql.NullString, exists bool)

Str returns the value of the "str" field in the mutation.

func (*FieldTypeMutation) StrCleared

func (m *FieldTypeMutation) StrCleared() bool

StrCleared returns if the "str" field was cleared in this mutation.

func (*FieldTypeMutation) StringArray added in v0.8.0

func (m *FieldTypeMutation) StringArray() (r schema.Strings, exists bool)

StringArray returns the value of the "string_array" field in the mutation.

func (*FieldTypeMutation) StringArrayCleared added in v0.8.0

func (m *FieldTypeMutation) StringArrayCleared() bool

StringArrayCleared returns if the "string_array" field was cleared in this mutation.

func (*FieldTypeMutation) StringScanner added in v0.9.0

func (m *FieldTypeMutation) StringScanner() (r schema.StringScanner, exists bool)

StringScanner returns the value of the "string_scanner" field in the mutation.

func (*FieldTypeMutation) StringScannerCleared added in v0.9.0

func (m *FieldTypeMutation) StringScannerCleared() bool

StringScannerCleared returns if the "string_scanner" field was cleared in this mutation.

func (*FieldTypeMutation) Strings added in v0.8.0

func (m *FieldTypeMutation) Strings() (r []string, exists bool)

Strings returns the value of the "strings" field in the mutation.

func (*FieldTypeMutation) StringsCleared added in v0.8.0

func (m *FieldTypeMutation) StringsCleared() bool

StringsCleared returns if the "strings" field was cleared in this mutation.

func (*FieldTypeMutation) Text added in v0.10.0

func (m *FieldTypeMutation) Text() (r string, exists bool)

Text returns the value of the "text" field in the mutation.

func (*FieldTypeMutation) TextCleared added in v0.10.0

func (m *FieldTypeMutation) TextCleared() bool

TextCleared returns if the "text" field was cleared in this mutation.

func (*FieldTypeMutation) Triple added in v0.8.0

func (m *FieldTypeMutation) Triple() (r schema.Triple, exists bool)

Triple returns the value of the "triple" field in the mutation.

func (FieldTypeMutation) Tx

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

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

func (*FieldTypeMutation) Type

func (m *FieldTypeMutation) Type() string

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

func (*FieldTypeMutation) ValidateOptionalInt32

func (m *FieldTypeMutation) ValidateOptionalInt32() (r int32, exists bool)

ValidateOptionalInt32 returns the value of the "validate_optional_int32" field in the mutation.

func (*FieldTypeMutation) ValidateOptionalInt32Cleared

func (m *FieldTypeMutation) ValidateOptionalInt32Cleared() bool

ValidateOptionalInt32Cleared returns if the "validate_optional_int32" field was cleared in this mutation.

func (*FieldTypeMutation) Vstring added in v0.8.0

func (m *FieldTypeMutation) Vstring() (r schema.VString, exists bool)

Vstring returns the value of the "vstring" field in the mutation.

func (*FieldTypeMutation) Where added in v0.9.0

func (m *FieldTypeMutation) Where(ps ...predicate.FieldType)

Where appends a list predicates to the FieldTypeMutation builder.

type FieldTypeQuery

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

FieldTypeQuery is the builder for querying FieldType entities.

func (*FieldTypeQuery) All

func (ftq *FieldTypeQuery) All(ctx context.Context) ([]*FieldType, error)

All executes the query and returns a list of FieldTypes.

func (*FieldTypeQuery) AllX

func (ftq *FieldTypeQuery) AllX(ctx context.Context) []*FieldType

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

func (*FieldTypeQuery) Clone

func (ftq *FieldTypeQuery) Clone() *FieldTypeQuery

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

func (*FieldTypeQuery) Count

func (ftq *FieldTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FieldTypeQuery) CountX

func (ftq *FieldTypeQuery) CountX(ctx context.Context) int

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

func (*FieldTypeQuery) Exist

func (ftq *FieldTypeQuery) Exist(ctx context.Context) (bool, error)

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

func (*FieldTypeQuery) ExistX

func (ftq *FieldTypeQuery) ExistX(ctx context.Context) bool

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

func (*FieldTypeQuery) Filter

func (ftq *FieldTypeQuery) Filter() *FieldTypeFilter

Filter returns a Filter implementation to apply filters on the FieldTypeQuery builder.

func (*FieldTypeQuery) First

func (ftq *FieldTypeQuery) First(ctx context.Context) (*FieldType, error)

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

func (*FieldTypeQuery) FirstID

func (ftq *FieldTypeQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*FieldTypeQuery) FirstIDX

func (ftq *FieldTypeQuery) FirstIDX(ctx context.Context) int

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

func (*FieldTypeQuery) FirstX

func (ftq *FieldTypeQuery) FirstX(ctx context.Context) *FieldType

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

func (*FieldTypeQuery) ForShare added in v0.9.0

func (ftq *FieldTypeQuery) ForShare(opts ...sql.LockOption) *FieldTypeQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*FieldTypeQuery) ForUpdate added in v0.9.0

func (ftq *FieldTypeQuery) ForUpdate(opts ...sql.LockOption) *FieldTypeQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*FieldTypeQuery) GroupBy

func (ftq *FieldTypeQuery) GroupBy(field string, fields ...string) *FieldTypeGroupBy

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 {
	Int int `json:"int,omitempty"`
	Count int `json:"count,omitempty"`
}

client.FieldType.Query().
	GroupBy(fieldtype.FieldInt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FieldTypeQuery) IDs

func (ftq *FieldTypeQuery) IDs(ctx context.Context) ([]int, error)

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

func (*FieldTypeQuery) IDsX

func (ftq *FieldTypeQuery) IDsX(ctx context.Context) []int

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

func (*FieldTypeQuery) Limit

func (ftq *FieldTypeQuery) Limit(limit int) *FieldTypeQuery

Limit adds a limit step to the query.

func (*FieldTypeQuery) Modify added in v0.9.0

func (ftq *FieldTypeQuery) Modify(modifiers ...func(s *sql.Selector)) *FieldTypeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*FieldTypeQuery) Offset

func (ftq *FieldTypeQuery) Offset(offset int) *FieldTypeQuery

Offset adds an offset step to the query.

func (*FieldTypeQuery) Only

func (ftq *FieldTypeQuery) Only(ctx context.Context) (*FieldType, error)

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

func (*FieldTypeQuery) OnlyID

func (ftq *FieldTypeQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*FieldTypeQuery) OnlyIDX

func (ftq *FieldTypeQuery) OnlyIDX(ctx context.Context) int

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

func (*FieldTypeQuery) OnlyX

func (ftq *FieldTypeQuery) OnlyX(ctx context.Context) *FieldType

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

func (*FieldTypeQuery) Order

func (ftq *FieldTypeQuery) Order(o ...OrderFunc) *FieldTypeQuery

Order adds an order step to the query.

func (*FieldTypeQuery) Select

func (ftq *FieldTypeQuery) Select(fields ...string) *FieldTypeSelect

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 {
	Int int `json:"int,omitempty"`
}

client.FieldType.Query().
	Select(fieldtype.FieldInt).
	Scan(ctx, &v)

func (*FieldTypeQuery) Unique added in v0.8.0

func (ftq *FieldTypeQuery) Unique(unique bool) *FieldTypeQuery

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 (*FieldTypeQuery) Where

func (ftq *FieldTypeQuery) Where(ps ...predicate.FieldType) *FieldTypeQuery

Where adds a new predicate for the FieldTypeQuery builder.

type FieldTypeSelect

type FieldTypeSelect struct {
	*FieldTypeQuery
	// contains filtered or unexported fields
}

FieldTypeSelect is the builder for selecting fields of FieldType entities.

func (*FieldTypeSelect) Bool

func (fts *FieldTypeSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*FieldTypeSelect) BoolX

func (fts *FieldTypeSelect) BoolX(ctx context.Context) bool

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

func (*FieldTypeSelect) Bools

func (fts *FieldTypeSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*FieldTypeSelect) BoolsX

func (fts *FieldTypeSelect) BoolsX(ctx context.Context) []bool

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

func (*FieldTypeSelect) Float64

func (fts *FieldTypeSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*FieldTypeSelect) Float64X

func (fts *FieldTypeSelect) Float64X(ctx context.Context) float64

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

func (*FieldTypeSelect) Float64s

func (fts *FieldTypeSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*FieldTypeSelect) Float64sX

func (fts *FieldTypeSelect) Float64sX(ctx context.Context) []float64

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

func (*FieldTypeSelect) Int

func (fts *FieldTypeSelect) Int(ctx context.Context) (_ int, err error)

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

func (*FieldTypeSelect) IntX

func (fts *FieldTypeSelect) IntX(ctx context.Context) int

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

func (*FieldTypeSelect) Ints

func (fts *FieldTypeSelect) Ints(ctx context.Context) ([]int, error)

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

func (*FieldTypeSelect) IntsX

func (fts *FieldTypeSelect) IntsX(ctx context.Context) []int

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

func (*FieldTypeSelect) Modify added in v0.9.0

func (fts *FieldTypeSelect) Modify(modifiers ...func(s *sql.Selector)) *FieldTypeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*FieldTypeSelect) Scan

func (fts *FieldTypeSelect) Scan(ctx context.Context, v interface{}) error

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

func (*FieldTypeSelect) ScanX

func (fts *FieldTypeSelect) ScanX(ctx context.Context, v interface{})

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

func (*FieldTypeSelect) String

func (fts *FieldTypeSelect) String(ctx context.Context) (_ string, err error)

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

func (*FieldTypeSelect) StringX

func (fts *FieldTypeSelect) StringX(ctx context.Context) string

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

func (*FieldTypeSelect) Strings

func (fts *FieldTypeSelect) Strings(ctx context.Context) ([]string, error)

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

func (*FieldTypeSelect) StringsX

func (fts *FieldTypeSelect) StringsX(ctx context.Context) []string

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

type FieldTypeUpdate

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

FieldTypeUpdate is the builder for updating FieldType entities.

func (*FieldTypeUpdate) AddBigInt added in v0.9.0

func (ftu *FieldTypeUpdate) AddBigInt(si schema.BigInt) *FieldTypeUpdate

AddBigInt adds si to the "big_int" field.

func (*FieldTypeUpdate) AddDecimal

func (ftu *FieldTypeUpdate) AddDecimal(f float64) *FieldTypeUpdate

AddDecimal adds f to the "decimal" field.

func (*FieldTypeUpdate) AddDuration

func (ftu *FieldTypeUpdate) AddDuration(t time.Duration) *FieldTypeUpdate

AddDuration adds t to the "duration" field.

func (*FieldTypeUpdate) AddInt

func (ftu *FieldTypeUpdate) AddInt(i int) *FieldTypeUpdate

AddInt adds i to the "int" field.

func (*FieldTypeUpdate) AddInt16

func (ftu *FieldTypeUpdate) AddInt16(i int16) *FieldTypeUpdate

AddInt16 adds i to the "int16" field.

func (*FieldTypeUpdate) AddInt32

func (ftu *FieldTypeUpdate) AddInt32(i int32) *FieldTypeUpdate

AddInt32 adds i to the "int32" field.

func (*FieldTypeUpdate) AddInt64

func (ftu *FieldTypeUpdate) AddInt64(i int64) *FieldTypeUpdate

AddInt64 adds i to the "int64" field.

func (*FieldTypeUpdate) AddInt8

func (ftu *FieldTypeUpdate) AddInt8(i int8) *FieldTypeUpdate

AddInt8 adds i to the "int8" field.

func (*FieldTypeUpdate) AddNillableInt

func (ftu *FieldTypeUpdate) AddNillableInt(i int) *FieldTypeUpdate

AddNillableInt adds i to the "nillable_int" field.

func (*FieldTypeUpdate) AddNillableInt16

func (ftu *FieldTypeUpdate) AddNillableInt16(i int16) *FieldTypeUpdate

AddNillableInt16 adds i to the "nillable_int16" field.

func (*FieldTypeUpdate) AddNillableInt32

func (ftu *FieldTypeUpdate) AddNillableInt32(i int32) *FieldTypeUpdate

AddNillableInt32 adds i to the "nillable_int32" field.

func (*FieldTypeUpdate) AddNillableInt64

func (ftu *FieldTypeUpdate) AddNillableInt64(i int64) *FieldTypeUpdate

AddNillableInt64 adds i to the "nillable_int64" field.

func (*FieldTypeUpdate) AddNillableInt8

func (ftu *FieldTypeUpdate) AddNillableInt8(i int8) *FieldTypeUpdate

AddNillableInt8 adds i to the "nillable_int8" field.

func (*FieldTypeUpdate) AddOptionalFloat

func (ftu *FieldTypeUpdate) AddOptionalFloat(f float64) *FieldTypeUpdate

AddOptionalFloat adds f to the "optional_float" field.

func (*FieldTypeUpdate) AddOptionalFloat32

func (ftu *FieldTypeUpdate) AddOptionalFloat32(f float32) *FieldTypeUpdate

AddOptionalFloat32 adds f to the "optional_float32" field.

func (*FieldTypeUpdate) AddOptionalInt

func (ftu *FieldTypeUpdate) AddOptionalInt(i int) *FieldTypeUpdate

AddOptionalInt adds i to the "optional_int" field.

func (*FieldTypeUpdate) AddOptionalInt16

func (ftu *FieldTypeUpdate) AddOptionalInt16(i int16) *FieldTypeUpdate

AddOptionalInt16 adds i to the "optional_int16" field.

func (*FieldTypeUpdate) AddOptionalInt32

func (ftu *FieldTypeUpdate) AddOptionalInt32(i int32) *FieldTypeUpdate

AddOptionalInt32 adds i to the "optional_int32" field.

func (*FieldTypeUpdate) AddOptionalInt64

func (ftu *FieldTypeUpdate) AddOptionalInt64(i int64) *FieldTypeUpdate

AddOptionalInt64 adds i to the "optional_int64" field.

func (*FieldTypeUpdate) AddOptionalInt8

func (ftu *FieldTypeUpdate) AddOptionalInt8(i int8) *FieldTypeUpdate

AddOptionalInt8 adds i to the "optional_int8" field.

func (*FieldTypeUpdate) AddOptionalUint

func (ftu *FieldTypeUpdate) AddOptionalUint(u int) *FieldTypeUpdate

AddOptionalUint adds u to the "optional_uint" field.

func (*FieldTypeUpdate) AddOptionalUint16

func (ftu *FieldTypeUpdate) AddOptionalUint16(u int16) *FieldTypeUpdate

AddOptionalUint16 adds u to the "optional_uint16" field.

func (*FieldTypeUpdate) AddOptionalUint32

func (ftu *FieldTypeUpdate) AddOptionalUint32(u int32) *FieldTypeUpdate

AddOptionalUint32 adds u to the "optional_uint32" field.

func (*FieldTypeUpdate) AddOptionalUint64

func (ftu *FieldTypeUpdate) AddOptionalUint64(u int64) *FieldTypeUpdate

AddOptionalUint64 adds u to the "optional_uint64" field.

func (*FieldTypeUpdate) AddOptionalUint8

func (ftu *FieldTypeUpdate) AddOptionalUint8(u int8) *FieldTypeUpdate

AddOptionalUint8 adds u to the "optional_uint8" field.

func (*FieldTypeUpdate) AddSchemaFloat

func (ftu *FieldTypeUpdate) AddSchemaFloat(s schema.Float64) *FieldTypeUpdate

AddSchemaFloat adds s to the "schema_float" field.

func (*FieldTypeUpdate) AddSchemaFloat32

func (ftu *FieldTypeUpdate) AddSchemaFloat32(s schema.Float32) *FieldTypeUpdate

AddSchemaFloat32 adds s to the "schema_float32" field.

func (*FieldTypeUpdate) AddSchemaInt

func (ftu *FieldTypeUpdate) AddSchemaInt(s schema.Int) *FieldTypeUpdate

AddSchemaInt adds s to the "schema_int" field.

func (*FieldTypeUpdate) AddSchemaInt64

func (ftu *FieldTypeUpdate) AddSchemaInt64(s schema.Int64) *FieldTypeUpdate

AddSchemaInt64 adds s to the "schema_int64" field.

func (*FieldTypeUpdate) AddSchemaInt8

func (ftu *FieldTypeUpdate) AddSchemaInt8(s schema.Int8) *FieldTypeUpdate

AddSchemaInt8 adds s to the "schema_int8" field.

func (*FieldTypeUpdate) AddValidateOptionalInt32

func (ftu *FieldTypeUpdate) AddValidateOptionalInt32(i int32) *FieldTypeUpdate

AddValidateOptionalInt32 adds i to the "validate_optional_int32" field.

func (*FieldTypeUpdate) ClearActive

func (ftu *FieldTypeUpdate) ClearActive() *FieldTypeUpdate

ClearActive clears the value of the "active" field.

func (*FieldTypeUpdate) ClearBigInt added in v0.9.0

func (ftu *FieldTypeUpdate) ClearBigInt() *FieldTypeUpdate

ClearBigInt clears the value of the "big_int" field.

func (*FieldTypeUpdate) ClearDatetime

func (ftu *FieldTypeUpdate) ClearDatetime() *FieldTypeUpdate

ClearDatetime clears the value of the "datetime" field.

func (*FieldTypeUpdate) ClearDecimal

func (ftu *FieldTypeUpdate) ClearDecimal() *FieldTypeUpdate

ClearDecimal clears the value of the "decimal" field.

func (*FieldTypeUpdate) ClearDeleted

func (ftu *FieldTypeUpdate) ClearDeleted() *FieldTypeUpdate

ClearDeleted clears the value of the "deleted" field.

func (*FieldTypeUpdate) ClearDeletedAt

func (ftu *FieldTypeUpdate) ClearDeletedAt() *FieldTypeUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FieldTypeUpdate) ClearDuration

func (ftu *FieldTypeUpdate) ClearDuration() *FieldTypeUpdate

ClearDuration clears the value of the "duration" field.

func (*FieldTypeUpdate) ClearIP

func (ftu *FieldTypeUpdate) ClearIP() *FieldTypeUpdate

ClearIP clears the value of the "ip" field.

func (ftu *FieldTypeUpdate) ClearLink() *FieldTypeUpdate

ClearLink clears the value of the "link" field.

func (*FieldTypeUpdate) ClearLinkOther

func (ftu *FieldTypeUpdate) ClearLinkOther() *FieldTypeUpdate

ClearLinkOther clears the value of the "link_other" field.

func (*FieldTypeUpdate) ClearLinkOtherFunc added in v0.10.0

func (ftu *FieldTypeUpdate) ClearLinkOtherFunc() *FieldTypeUpdate

ClearLinkOtherFunc clears the value of the "link_other_func" field.

func (*FieldTypeUpdate) ClearMAC

func (ftu *FieldTypeUpdate) ClearMAC() *FieldTypeUpdate

ClearMAC clears the value of the "mac" field.

func (*FieldTypeUpdate) ClearNdir

func (ftu *FieldTypeUpdate) ClearNdir() *FieldTypeUpdate

ClearNdir clears the value of the "ndir" field.

func (*FieldTypeUpdate) ClearNilPair added in v0.8.0

func (ftu *FieldTypeUpdate) ClearNilPair() *FieldTypeUpdate

ClearNilPair clears the value of the "nil_pair" field.

func (*FieldTypeUpdate) ClearNillableInt

func (ftu *FieldTypeUpdate) ClearNillableInt() *FieldTypeUpdate

ClearNillableInt clears the value of the "nillable_int" field.

func (*FieldTypeUpdate) ClearNillableInt16

func (ftu *FieldTypeUpdate) ClearNillableInt16() *FieldTypeUpdate

ClearNillableInt16 clears the value of the "nillable_int16" field.

func (*FieldTypeUpdate) ClearNillableInt32

func (ftu *FieldTypeUpdate) ClearNillableInt32() *FieldTypeUpdate

ClearNillableInt32 clears the value of the "nillable_int32" field.

func (*FieldTypeUpdate) ClearNillableInt64

func (ftu *FieldTypeUpdate) ClearNillableInt64() *FieldTypeUpdate

ClearNillableInt64 clears the value of the "nillable_int64" field.

func (*FieldTypeUpdate) ClearNillableInt8

func (ftu *FieldTypeUpdate) ClearNillableInt8() *FieldTypeUpdate

ClearNillableInt8 clears the value of the "nillable_int8" field.

func (*FieldTypeUpdate) ClearNillableUUID added in v0.9.0

func (ftu *FieldTypeUpdate) ClearNillableUUID() *FieldTypeUpdate

ClearNillableUUID clears the value of the "nillable_uuid" field.

func (*FieldTypeUpdate) ClearNullActive

func (ftu *FieldTypeUpdate) ClearNullActive() *FieldTypeUpdate

ClearNullActive clears the value of the "null_active" field.

func (*FieldTypeUpdate) ClearNullFloat

func (ftu *FieldTypeUpdate) ClearNullFloat() *FieldTypeUpdate

ClearNullFloat clears the value of the "null_float" field.

func (*FieldTypeUpdate) ClearNullInt64

func (ftu *FieldTypeUpdate) ClearNullInt64() *FieldTypeUpdate

ClearNullInt64 clears the value of the "null_int64" field.

func (ftu *FieldTypeUpdate) ClearNullLink() *FieldTypeUpdate

ClearNullLink clears the value of the "null_link" field.

func (*FieldTypeUpdate) ClearNullStr

func (ftu *FieldTypeUpdate) ClearNullStr() *FieldTypeUpdate

ClearNullStr clears the value of the "null_str" field.

func (*FieldTypeUpdate) ClearOptionalFloat

func (ftu *FieldTypeUpdate) ClearOptionalFloat() *FieldTypeUpdate

ClearOptionalFloat clears the value of the "optional_float" field.

func (*FieldTypeUpdate) ClearOptionalFloat32

func (ftu *FieldTypeUpdate) ClearOptionalFloat32() *FieldTypeUpdate

ClearOptionalFloat32 clears the value of the "optional_float32" field.

func (*FieldTypeUpdate) ClearOptionalInt

func (ftu *FieldTypeUpdate) ClearOptionalInt() *FieldTypeUpdate

ClearOptionalInt clears the value of the "optional_int" field.

func (*FieldTypeUpdate) ClearOptionalInt16

func (ftu *FieldTypeUpdate) ClearOptionalInt16() *FieldTypeUpdate

ClearOptionalInt16 clears the value of the "optional_int16" field.

func (*FieldTypeUpdate) ClearOptionalInt32

func (ftu *FieldTypeUpdate) ClearOptionalInt32() *FieldTypeUpdate

ClearOptionalInt32 clears the value of the "optional_int32" field.

func (*FieldTypeUpdate) ClearOptionalInt64

func (ftu *FieldTypeUpdate) ClearOptionalInt64() *FieldTypeUpdate

ClearOptionalInt64 clears the value of the "optional_int64" field.

func (*FieldTypeUpdate) ClearOptionalInt8

func (ftu *FieldTypeUpdate) ClearOptionalInt8() *FieldTypeUpdate

ClearOptionalInt8 clears the value of the "optional_int8" field.

func (*FieldTypeUpdate) ClearOptionalUUID added in v0.10.0

func (ftu *FieldTypeUpdate) ClearOptionalUUID() *FieldTypeUpdate

ClearOptionalUUID clears the value of the "optional_uuid" field.

func (*FieldTypeUpdate) ClearOptionalUint

func (ftu *FieldTypeUpdate) ClearOptionalUint() *FieldTypeUpdate

ClearOptionalUint clears the value of the "optional_uint" field.

func (*FieldTypeUpdate) ClearOptionalUint16

func (ftu *FieldTypeUpdate) ClearOptionalUint16() *FieldTypeUpdate

ClearOptionalUint16 clears the value of the "optional_uint16" field.

func (*FieldTypeUpdate) ClearOptionalUint32

func (ftu *FieldTypeUpdate) ClearOptionalUint32() *FieldTypeUpdate

ClearOptionalUint32 clears the value of the "optional_uint32" field.

func (*FieldTypeUpdate) ClearOptionalUint64

func (ftu *FieldTypeUpdate) ClearOptionalUint64() *FieldTypeUpdate

ClearOptionalUint64 clears the value of the "optional_uint64" field.

func (*FieldTypeUpdate) ClearOptionalUint8

func (ftu *FieldTypeUpdate) ClearOptionalUint8() *FieldTypeUpdate

ClearOptionalUint8 clears the value of the "optional_uint8" field.

func (*FieldTypeUpdate) ClearPassword added in v0.9.0

func (ftu *FieldTypeUpdate) ClearPassword() *FieldTypeUpdate

ClearPassword clears the value of the "password" field.

func (*FieldTypeUpdate) ClearPasswordOther added in v0.9.0

func (ftu *FieldTypeUpdate) ClearPasswordOther() *FieldTypeUpdate

ClearPasswordOther clears the value of the "password_other" field.

func (*FieldTypeUpdate) ClearPriority added in v0.9.0

func (ftu *FieldTypeUpdate) ClearPriority() *FieldTypeUpdate

ClearPriority clears the value of the "priority" field.

func (*FieldTypeUpdate) ClearRawData added in v0.10.0

func (ftu *FieldTypeUpdate) ClearRawData() *FieldTypeUpdate

ClearRawData clears the value of the "raw_data" field.

func (*FieldTypeUpdate) ClearSchemaFloat

func (ftu *FieldTypeUpdate) ClearSchemaFloat() *FieldTypeUpdate

ClearSchemaFloat clears the value of the "schema_float" field.

func (*FieldTypeUpdate) ClearSchemaFloat32

func (ftu *FieldTypeUpdate) ClearSchemaFloat32() *FieldTypeUpdate

ClearSchemaFloat32 clears the value of the "schema_float32" field.

func (*FieldTypeUpdate) ClearSchemaInt

func (ftu *FieldTypeUpdate) ClearSchemaInt() *FieldTypeUpdate

ClearSchemaInt clears the value of the "schema_int" field.

func (*FieldTypeUpdate) ClearSchemaInt64

func (ftu *FieldTypeUpdate) ClearSchemaInt64() *FieldTypeUpdate

ClearSchemaInt64 clears the value of the "schema_int64" field.

func (*FieldTypeUpdate) ClearSchemaInt8

func (ftu *FieldTypeUpdate) ClearSchemaInt8() *FieldTypeUpdate

ClearSchemaInt8 clears the value of the "schema_int8" field.

func (*FieldTypeUpdate) ClearSensitive added in v0.10.0

func (ftu *FieldTypeUpdate) ClearSensitive() *FieldTypeUpdate

ClearSensitive clears the value of the "sensitive" field.

func (*FieldTypeUpdate) ClearState

func (ftu *FieldTypeUpdate) ClearState() *FieldTypeUpdate

ClearState clears the value of the "state" field.

func (*FieldTypeUpdate) ClearStr

func (ftu *FieldTypeUpdate) ClearStr() *FieldTypeUpdate

ClearStr clears the value of the "str" field.

func (*FieldTypeUpdate) ClearStringArray added in v0.8.0

func (ftu *FieldTypeUpdate) ClearStringArray() *FieldTypeUpdate

ClearStringArray clears the value of the "string_array" field.

func (*FieldTypeUpdate) ClearStringScanner added in v0.9.0

func (ftu *FieldTypeUpdate) ClearStringScanner() *FieldTypeUpdate

ClearStringScanner clears the value of the "string_scanner" field.

func (*FieldTypeUpdate) ClearStrings added in v0.8.0

func (ftu *FieldTypeUpdate) ClearStrings() *FieldTypeUpdate

ClearStrings clears the value of the "strings" field.

func (*FieldTypeUpdate) ClearText added in v0.10.0

func (ftu *FieldTypeUpdate) ClearText() *FieldTypeUpdate

ClearText clears the value of the "text" field.

func (*FieldTypeUpdate) ClearValidateOptionalInt32

func (ftu *FieldTypeUpdate) ClearValidateOptionalInt32() *FieldTypeUpdate

ClearValidateOptionalInt32 clears the value of the "validate_optional_int32" field.

func (*FieldTypeUpdate) Exec

func (ftu *FieldTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FieldTypeUpdate) ExecX

func (ftu *FieldTypeUpdate) ExecX(ctx context.Context)

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

func (*FieldTypeUpdate) Mutation

func (ftu *FieldTypeUpdate) Mutation() *FieldTypeMutation

Mutation returns the FieldTypeMutation object of the builder.

func (*FieldTypeUpdate) Save

func (ftu *FieldTypeUpdate) Save(ctx context.Context) (int, error)

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

func (*FieldTypeUpdate) SaveX

func (ftu *FieldTypeUpdate) SaveX(ctx context.Context) int

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

func (*FieldTypeUpdate) SetActive

func (ftu *FieldTypeUpdate) SetActive(s schema.Status) *FieldTypeUpdate

SetActive sets the "active" field.

func (*FieldTypeUpdate) SetBigInt added in v0.9.0

func (ftu *FieldTypeUpdate) SetBigInt(si schema.BigInt) *FieldTypeUpdate

SetBigInt sets the "big_int" field.

func (*FieldTypeUpdate) SetDatetime

func (ftu *FieldTypeUpdate) SetDatetime(t time.Time) *FieldTypeUpdate

SetDatetime sets the "datetime" field.

func (*FieldTypeUpdate) SetDecimal

func (ftu *FieldTypeUpdate) SetDecimal(f float64) *FieldTypeUpdate

SetDecimal sets the "decimal" field.

func (*FieldTypeUpdate) SetDeleted

func (ftu *FieldTypeUpdate) SetDeleted(sb *sql.NullBool) *FieldTypeUpdate

SetDeleted sets the "deleted" field.

func (*FieldTypeUpdate) SetDeletedAt

func (ftu *FieldTypeUpdate) SetDeletedAt(st *sql.NullTime) *FieldTypeUpdate

SetDeletedAt sets the "deleted_at" field.

func (*FieldTypeUpdate) SetDir

func (ftu *FieldTypeUpdate) SetDir(h http.Dir) *FieldTypeUpdate

SetDir sets the "dir" field.

func (*FieldTypeUpdate) SetDuration

func (ftu *FieldTypeUpdate) SetDuration(t time.Duration) *FieldTypeUpdate

SetDuration sets the "duration" field.

func (*FieldTypeUpdate) SetIP

func (ftu *FieldTypeUpdate) SetIP(n net.IP) *FieldTypeUpdate

SetIP sets the "ip" field.

func (*FieldTypeUpdate) SetInt

func (ftu *FieldTypeUpdate) SetInt(i int) *FieldTypeUpdate

SetInt sets the "int" field.

func (*FieldTypeUpdate) SetInt16

func (ftu *FieldTypeUpdate) SetInt16(i int16) *FieldTypeUpdate

SetInt16 sets the "int16" field.

func (*FieldTypeUpdate) SetInt32

func (ftu *FieldTypeUpdate) SetInt32(i int32) *FieldTypeUpdate

SetInt32 sets the "int32" field.

func (*FieldTypeUpdate) SetInt64

func (ftu *FieldTypeUpdate) SetInt64(i int64) *FieldTypeUpdate

SetInt64 sets the "int64" field.

func (*FieldTypeUpdate) SetInt8

func (ftu *FieldTypeUpdate) SetInt8(i int8) *FieldTypeUpdate

SetInt8 sets the "int8" field.

func (ftu *FieldTypeUpdate) SetLink(s schema.Link) *FieldTypeUpdate

SetLink sets the "link" field.

func (*FieldTypeUpdate) SetLinkOther

func (ftu *FieldTypeUpdate) SetLinkOther(s *schema.Link) *FieldTypeUpdate

SetLinkOther sets the "link_other" field.

func (*FieldTypeUpdate) SetLinkOtherFunc added in v0.10.0

func (ftu *FieldTypeUpdate) SetLinkOtherFunc(s *schema.Link) *FieldTypeUpdate

SetLinkOtherFunc sets the "link_other_func" field.

func (*FieldTypeUpdate) SetMAC

func (ftu *FieldTypeUpdate) SetMAC(s schema.MAC) *FieldTypeUpdate

SetMAC sets the "mac" field.

func (*FieldTypeUpdate) SetNdir

func (ftu *FieldTypeUpdate) SetNdir(h http.Dir) *FieldTypeUpdate

SetNdir sets the "ndir" field.

func (*FieldTypeUpdate) SetNilPair added in v0.8.0

func (ftu *FieldTypeUpdate) SetNilPair(s *schema.Pair) *FieldTypeUpdate

SetNilPair sets the "nil_pair" field.

func (*FieldTypeUpdate) SetNillableActive

func (ftu *FieldTypeUpdate) SetNillableActive(s *schema.Status) *FieldTypeUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableBigInt added in v0.9.0

func (ftu *FieldTypeUpdate) SetNillableBigInt(si *schema.BigInt) *FieldTypeUpdate

SetNillableBigInt sets the "big_int" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableDatetime

func (ftu *FieldTypeUpdate) SetNillableDatetime(t *time.Time) *FieldTypeUpdate

SetNillableDatetime sets the "datetime" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableDecimal

func (ftu *FieldTypeUpdate) SetNillableDecimal(f *float64) *FieldTypeUpdate

SetNillableDecimal sets the "decimal" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableDir

func (ftu *FieldTypeUpdate) SetNillableDir(h *http.Dir) *FieldTypeUpdate

SetNillableDir sets the "dir" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableInt

func (ftu *FieldTypeUpdate) SetNillableInt(i int) *FieldTypeUpdate

SetNillableInt sets the "nillable_int" field.

func (*FieldTypeUpdate) SetNillableInt16

func (ftu *FieldTypeUpdate) SetNillableInt16(i int16) *FieldTypeUpdate

SetNillableInt16 sets the "nillable_int16" field.

func (*FieldTypeUpdate) SetNillableInt32

func (ftu *FieldTypeUpdate) SetNillableInt32(i int32) *FieldTypeUpdate

SetNillableInt32 sets the "nillable_int32" field.

func (*FieldTypeUpdate) SetNillableInt64

func (ftu *FieldTypeUpdate) SetNillableInt64(i int64) *FieldTypeUpdate

SetNillableInt64 sets the "nillable_int64" field.

func (*FieldTypeUpdate) SetNillableInt8

func (ftu *FieldTypeUpdate) SetNillableInt8(i int8) *FieldTypeUpdate

SetNillableInt8 sets the "nillable_int8" field.

func (ftu *FieldTypeUpdate) SetNillableLink(s *schema.Link) *FieldTypeUpdate

SetNillableLink sets the "link" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableMAC added in v0.8.0

func (ftu *FieldTypeUpdate) SetNillableMAC(s *schema.MAC) *FieldTypeUpdate

SetNillableMAC sets the "mac" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableNdir

func (ftu *FieldTypeUpdate) SetNillableNdir(h *http.Dir) *FieldTypeUpdate

SetNillableNdir sets the "ndir" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableNillableInt

func (ftu *FieldTypeUpdate) SetNillableNillableInt(i *int) *FieldTypeUpdate

SetNillableNillableInt sets the "nillable_int" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableNillableInt16

func (ftu *FieldTypeUpdate) SetNillableNillableInt16(i *int16) *FieldTypeUpdate

SetNillableNillableInt16 sets the "nillable_int16" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableNillableInt32

func (ftu *FieldTypeUpdate) SetNillableNillableInt32(i *int32) *FieldTypeUpdate

SetNillableNillableInt32 sets the "nillable_int32" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableNillableInt64

func (ftu *FieldTypeUpdate) SetNillableNillableInt64(i *int64) *FieldTypeUpdate

SetNillableNillableInt64 sets the "nillable_int64" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableNillableInt8

func (ftu *FieldTypeUpdate) SetNillableNillableInt8(i *int8) *FieldTypeUpdate

SetNillableNillableInt8 sets the "nillable_int8" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableNillableUUID added in v0.10.0

func (ftu *FieldTypeUpdate) SetNillableNillableUUID(u *uuid.UUID) *FieldTypeUpdate

SetNillableNillableUUID sets the "nillable_uuid" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableNullActive

func (ftu *FieldTypeUpdate) SetNillableNullActive(s *schema.Status) *FieldTypeUpdate

SetNillableNullActive sets the "null_active" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalFloat

func (ftu *FieldTypeUpdate) SetNillableOptionalFloat(f *float64) *FieldTypeUpdate

SetNillableOptionalFloat sets the "optional_float" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalFloat32

func (ftu *FieldTypeUpdate) SetNillableOptionalFloat32(f *float32) *FieldTypeUpdate

SetNillableOptionalFloat32 sets the "optional_float32" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalInt

func (ftu *FieldTypeUpdate) SetNillableOptionalInt(i *int) *FieldTypeUpdate

SetNillableOptionalInt sets the "optional_int" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalInt16

func (ftu *FieldTypeUpdate) SetNillableOptionalInt16(i *int16) *FieldTypeUpdate

SetNillableOptionalInt16 sets the "optional_int16" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalInt32

func (ftu *FieldTypeUpdate) SetNillableOptionalInt32(i *int32) *FieldTypeUpdate

SetNillableOptionalInt32 sets the "optional_int32" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalInt64

func (ftu *FieldTypeUpdate) SetNillableOptionalInt64(i *int64) *FieldTypeUpdate

SetNillableOptionalInt64 sets the "optional_int64" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalInt8

func (ftu *FieldTypeUpdate) SetNillableOptionalInt8(i *int8) *FieldTypeUpdate

SetNillableOptionalInt8 sets the "optional_int8" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalUUID added in v0.10.0

func (ftu *FieldTypeUpdate) SetNillableOptionalUUID(u *uuid.UUID) *FieldTypeUpdate

SetNillableOptionalUUID sets the "optional_uuid" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalUint

func (ftu *FieldTypeUpdate) SetNillableOptionalUint(u *uint) *FieldTypeUpdate

SetNillableOptionalUint sets the "optional_uint" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalUint16

func (ftu *FieldTypeUpdate) SetNillableOptionalUint16(u *uint16) *FieldTypeUpdate

SetNillableOptionalUint16 sets the "optional_uint16" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalUint32

func (ftu *FieldTypeUpdate) SetNillableOptionalUint32(u *uint32) *FieldTypeUpdate

SetNillableOptionalUint32 sets the "optional_uint32" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalUint64

func (ftu *FieldTypeUpdate) SetNillableOptionalUint64(u *uint64) *FieldTypeUpdate

SetNillableOptionalUint64 sets the "optional_uint64" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableOptionalUint8

func (ftu *FieldTypeUpdate) SetNillableOptionalUint8(u *uint8) *FieldTypeUpdate

SetNillableOptionalUint8 sets the "optional_uint8" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillablePair added in v0.8.0

func (ftu *FieldTypeUpdate) SetNillablePair(s *schema.Pair) *FieldTypeUpdate

SetNillablePair sets the "pair" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillablePassword added in v0.9.0

func (ftu *FieldTypeUpdate) SetNillablePassword(s *string) *FieldTypeUpdate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillablePasswordOther added in v0.9.0

func (ftu *FieldTypeUpdate) SetNillablePasswordOther(s *schema.Password) *FieldTypeUpdate

SetNillablePasswordOther sets the "password_other" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillablePriority added in v0.9.0

func (ftu *FieldTypeUpdate) SetNillablePriority(r *role.Priority) *FieldTypeUpdate

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableRole

func (ftu *FieldTypeUpdate) SetNillableRole(r *role.Role) *FieldTypeUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableSchemaFloat

func (ftu *FieldTypeUpdate) SetNillableSchemaFloat(s *schema.Float64) *FieldTypeUpdate

SetNillableSchemaFloat sets the "schema_float" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableSchemaFloat32

func (ftu *FieldTypeUpdate) SetNillableSchemaFloat32(s *schema.Float32) *FieldTypeUpdate

SetNillableSchemaFloat32 sets the "schema_float32" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableSchemaInt

func (ftu *FieldTypeUpdate) SetNillableSchemaInt(s *schema.Int) *FieldTypeUpdate

SetNillableSchemaInt sets the "schema_int" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableSchemaInt64

func (ftu *FieldTypeUpdate) SetNillableSchemaInt64(s *schema.Int64) *FieldTypeUpdate

SetNillableSchemaInt64 sets the "schema_int64" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableSchemaInt8

func (ftu *FieldTypeUpdate) SetNillableSchemaInt8(s *schema.Int8) *FieldTypeUpdate

SetNillableSchemaInt8 sets the "schema_int8" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableState

func (ftu *FieldTypeUpdate) SetNillableState(f *fieldtype.State) *FieldTypeUpdate

SetNillableState sets the "state" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableStr added in v0.8.0

func (ftu *FieldTypeUpdate) SetNillableStr(ss *sql.NullString) *FieldTypeUpdate

SetNillableStr sets the "str" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableStringScanner added in v0.9.0

func (ftu *FieldTypeUpdate) SetNillableStringScanner(ss *schema.StringScanner) *FieldTypeUpdate

SetNillableStringScanner sets the "string_scanner" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableText added in v0.10.0

func (ftu *FieldTypeUpdate) SetNillableText(s *string) *FieldTypeUpdate

SetNillableText sets the "text" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableTriple added in v0.8.0

func (ftu *FieldTypeUpdate) SetNillableTriple(s *schema.Triple) *FieldTypeUpdate

SetNillableTriple sets the "triple" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableUUID added in v0.9.0

func (ftu *FieldTypeUpdate) SetNillableUUID(u uuid.UUID) *FieldTypeUpdate

SetNillableUUID sets the "nillable_uuid" field.

func (*FieldTypeUpdate) SetNillableValidateOptionalInt32

func (ftu *FieldTypeUpdate) SetNillableValidateOptionalInt32(i *int32) *FieldTypeUpdate

SetNillableValidateOptionalInt32 sets the "validate_optional_int32" field if the given value is not nil.

func (*FieldTypeUpdate) SetNillableVstring added in v0.8.0

func (ftu *FieldTypeUpdate) SetNillableVstring(ss *schema.VString) *FieldTypeUpdate

SetNillableVstring sets the "vstring" field if the given value is not nil.

func (*FieldTypeUpdate) SetNullActive

func (ftu *FieldTypeUpdate) SetNullActive(s schema.Status) *FieldTypeUpdate

SetNullActive sets the "null_active" field.

func (*FieldTypeUpdate) SetNullFloat

func (ftu *FieldTypeUpdate) SetNullFloat(sf *sql.NullFloat64) *FieldTypeUpdate

SetNullFloat sets the "null_float" field.

func (*FieldTypeUpdate) SetNullInt64

func (ftu *FieldTypeUpdate) SetNullInt64(si *sql.NullInt64) *FieldTypeUpdate

SetNullInt64 sets the "null_int64" field.

func (ftu *FieldTypeUpdate) SetNullLink(s *schema.Link) *FieldTypeUpdate

SetNullLink sets the "null_link" field.

func (*FieldTypeUpdate) SetNullStr

func (ftu *FieldTypeUpdate) SetNullStr(ss *sql.NullString) *FieldTypeUpdate

SetNullStr sets the "null_str" field.

func (*FieldTypeUpdate) SetOptionalFloat

func (ftu *FieldTypeUpdate) SetOptionalFloat(f float64) *FieldTypeUpdate

SetOptionalFloat sets the "optional_float" field.

func (*FieldTypeUpdate) SetOptionalFloat32

func (ftu *FieldTypeUpdate) SetOptionalFloat32(f float32) *FieldTypeUpdate

SetOptionalFloat32 sets the "optional_float32" field.

func (*FieldTypeUpdate) SetOptionalInt

func (ftu *FieldTypeUpdate) SetOptionalInt(i int) *FieldTypeUpdate

SetOptionalInt sets the "optional_int" field.

func (*FieldTypeUpdate) SetOptionalInt16

func (ftu *FieldTypeUpdate) SetOptionalInt16(i int16) *FieldTypeUpdate

SetOptionalInt16 sets the "optional_int16" field.

func (*FieldTypeUpdate) SetOptionalInt32

func (ftu *FieldTypeUpdate) SetOptionalInt32(i int32) *FieldTypeUpdate

SetOptionalInt32 sets the "optional_int32" field.

func (*FieldTypeUpdate) SetOptionalInt64

func (ftu *FieldTypeUpdate) SetOptionalInt64(i int64) *FieldTypeUpdate

SetOptionalInt64 sets the "optional_int64" field.

func (*FieldTypeUpdate) SetOptionalInt8

func (ftu *FieldTypeUpdate) SetOptionalInt8(i int8) *FieldTypeUpdate

SetOptionalInt8 sets the "optional_int8" field.

func (*FieldTypeUpdate) SetOptionalUUID added in v0.10.0

func (ftu *FieldTypeUpdate) SetOptionalUUID(u uuid.UUID) *FieldTypeUpdate

SetOptionalUUID sets the "optional_uuid" field.

func (*FieldTypeUpdate) SetOptionalUint

func (ftu *FieldTypeUpdate) SetOptionalUint(u uint) *FieldTypeUpdate

SetOptionalUint sets the "optional_uint" field.

func (*FieldTypeUpdate) SetOptionalUint16

func (ftu *FieldTypeUpdate) SetOptionalUint16(u uint16) *FieldTypeUpdate

SetOptionalUint16 sets the "optional_uint16" field.

func (*FieldTypeUpdate) SetOptionalUint32

func (ftu *FieldTypeUpdate) SetOptionalUint32(u uint32) *FieldTypeUpdate

SetOptionalUint32 sets the "optional_uint32" field.

func (*FieldTypeUpdate) SetOptionalUint64

func (ftu *FieldTypeUpdate) SetOptionalUint64(u uint64) *FieldTypeUpdate

SetOptionalUint64 sets the "optional_uint64" field.

func (*FieldTypeUpdate) SetOptionalUint8

func (ftu *FieldTypeUpdate) SetOptionalUint8(u uint8) *FieldTypeUpdate

SetOptionalUint8 sets the "optional_uint8" field.

func (*FieldTypeUpdate) SetPair added in v0.8.0

func (ftu *FieldTypeUpdate) SetPair(s schema.Pair) *FieldTypeUpdate

SetPair sets the "pair" field.

func (*FieldTypeUpdate) SetPassword added in v0.9.0

func (ftu *FieldTypeUpdate) SetPassword(s string) *FieldTypeUpdate

SetPassword sets the "password" field.

func (*FieldTypeUpdate) SetPasswordOther added in v0.9.0

func (ftu *FieldTypeUpdate) SetPasswordOther(s schema.Password) *FieldTypeUpdate

SetPasswordOther sets the "password_other" field.

func (*FieldTypeUpdate) SetPriority added in v0.9.0

func (ftu *FieldTypeUpdate) SetPriority(r role.Priority) *FieldTypeUpdate

SetPriority sets the "priority" field.

func (*FieldTypeUpdate) SetRawData added in v0.10.0

func (ftu *FieldTypeUpdate) SetRawData(b []byte) *FieldTypeUpdate

SetRawData sets the "raw_data" field.

func (*FieldTypeUpdate) SetRole

func (ftu *FieldTypeUpdate) SetRole(r role.Role) *FieldTypeUpdate

SetRole sets the "role" field.

func (*FieldTypeUpdate) SetSchemaFloat

func (ftu *FieldTypeUpdate) SetSchemaFloat(s schema.Float64) *FieldTypeUpdate

SetSchemaFloat sets the "schema_float" field.

func (*FieldTypeUpdate) SetSchemaFloat32

func (ftu *FieldTypeUpdate) SetSchemaFloat32(s schema.Float32) *FieldTypeUpdate

SetSchemaFloat32 sets the "schema_float32" field.

func (*FieldTypeUpdate) SetSchemaInt

func (ftu *FieldTypeUpdate) SetSchemaInt(s schema.Int) *FieldTypeUpdate

SetSchemaInt sets the "schema_int" field.

func (*FieldTypeUpdate) SetSchemaInt64

func (ftu *FieldTypeUpdate) SetSchemaInt64(s schema.Int64) *FieldTypeUpdate

SetSchemaInt64 sets the "schema_int64" field.

func (*FieldTypeUpdate) SetSchemaInt8

func (ftu *FieldTypeUpdate) SetSchemaInt8(s schema.Int8) *FieldTypeUpdate

SetSchemaInt8 sets the "schema_int8" field.

func (*FieldTypeUpdate) SetSensitive added in v0.10.0

func (ftu *FieldTypeUpdate) SetSensitive(b []byte) *FieldTypeUpdate

SetSensitive sets the "sensitive" field.

func (*FieldTypeUpdate) SetState

func (ftu *FieldTypeUpdate) SetState(f fieldtype.State) *FieldTypeUpdate

SetState sets the "state" field.

func (*FieldTypeUpdate) SetStr

func (ftu *FieldTypeUpdate) SetStr(ss sql.NullString) *FieldTypeUpdate

SetStr sets the "str" field.

func (*FieldTypeUpdate) SetStringArray added in v0.8.0

func (ftu *FieldTypeUpdate) SetStringArray(s schema.Strings) *FieldTypeUpdate

SetStringArray sets the "string_array" field.

func (*FieldTypeUpdate) SetStringScanner added in v0.9.0

func (ftu *FieldTypeUpdate) SetStringScanner(ss schema.StringScanner) *FieldTypeUpdate

SetStringScanner sets the "string_scanner" field.

func (*FieldTypeUpdate) SetStrings added in v0.8.0

func (ftu *FieldTypeUpdate) SetStrings(s []string) *FieldTypeUpdate

SetStrings sets the "strings" field.

func (*FieldTypeUpdate) SetText added in v0.10.0

func (ftu *FieldTypeUpdate) SetText(s string) *FieldTypeUpdate

SetText sets the "text" field.

func (*FieldTypeUpdate) SetTriple added in v0.8.0

func (ftu *FieldTypeUpdate) SetTriple(s schema.Triple) *FieldTypeUpdate

SetTriple sets the "triple" field.

func (*FieldTypeUpdate) SetValidateOptionalInt32

func (ftu *FieldTypeUpdate) SetValidateOptionalInt32(i int32) *FieldTypeUpdate

SetValidateOptionalInt32 sets the "validate_optional_int32" field.

func (*FieldTypeUpdate) SetVstring added in v0.8.0

func (ftu *FieldTypeUpdate) SetVstring(ss schema.VString) *FieldTypeUpdate

SetVstring sets the "vstring" field.

func (*FieldTypeUpdate) Where

Where appends a list predicates to the FieldTypeUpdate builder.

type FieldTypeUpdateOne

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

FieldTypeUpdateOne is the builder for updating a single FieldType entity.

func (*FieldTypeUpdateOne) AddBigInt added in v0.9.0

func (ftuo *FieldTypeUpdateOne) AddBigInt(si schema.BigInt) *FieldTypeUpdateOne

AddBigInt adds si to the "big_int" field.

func (*FieldTypeUpdateOne) AddDecimal

func (ftuo *FieldTypeUpdateOne) AddDecimal(f float64) *FieldTypeUpdateOne

AddDecimal adds f to the "decimal" field.

func (*FieldTypeUpdateOne) AddDuration

func (ftuo *FieldTypeUpdateOne) AddDuration(t time.Duration) *FieldTypeUpdateOne

AddDuration adds t to the "duration" field.

func (*FieldTypeUpdateOne) AddInt

func (ftuo *FieldTypeUpdateOne) AddInt(i int) *FieldTypeUpdateOne

AddInt adds i to the "int" field.

func (*FieldTypeUpdateOne) AddInt16

func (ftuo *FieldTypeUpdateOne) AddInt16(i int16) *FieldTypeUpdateOne

AddInt16 adds i to the "int16" field.

func (*FieldTypeUpdateOne) AddInt32

func (ftuo *FieldTypeUpdateOne) AddInt32(i int32) *FieldTypeUpdateOne

AddInt32 adds i to the "int32" field.

func (*FieldTypeUpdateOne) AddInt64

func (ftuo *FieldTypeUpdateOne) AddInt64(i int64) *FieldTypeUpdateOne

AddInt64 adds i to the "int64" field.

func (*FieldTypeUpdateOne) AddInt8

func (ftuo *FieldTypeUpdateOne) AddInt8(i int8) *FieldTypeUpdateOne

AddInt8 adds i to the "int8" field.

func (*FieldTypeUpdateOne) AddNillableInt

func (ftuo *FieldTypeUpdateOne) AddNillableInt(i int) *FieldTypeUpdateOne

AddNillableInt adds i to the "nillable_int" field.

func (*FieldTypeUpdateOne) AddNillableInt16

func (ftuo *FieldTypeUpdateOne) AddNillableInt16(i int16) *FieldTypeUpdateOne

AddNillableInt16 adds i to the "nillable_int16" field.

func (*FieldTypeUpdateOne) AddNillableInt32

func (ftuo *FieldTypeUpdateOne) AddNillableInt32(i int32) *FieldTypeUpdateOne

AddNillableInt32 adds i to the "nillable_int32" field.

func (*FieldTypeUpdateOne) AddNillableInt64

func (ftuo *FieldTypeUpdateOne) AddNillableInt64(i int64) *FieldTypeUpdateOne

AddNillableInt64 adds i to the "nillable_int64" field.

func (*FieldTypeUpdateOne) AddNillableInt8

func (ftuo *FieldTypeUpdateOne) AddNillableInt8(i int8) *FieldTypeUpdateOne

AddNillableInt8 adds i to the "nillable_int8" field.

func (*FieldTypeUpdateOne) AddOptionalFloat

func (ftuo *FieldTypeUpdateOne) AddOptionalFloat(f float64) *FieldTypeUpdateOne

AddOptionalFloat adds f to the "optional_float" field.

func (*FieldTypeUpdateOne) AddOptionalFloat32

func (ftuo *FieldTypeUpdateOne) AddOptionalFloat32(f float32) *FieldTypeUpdateOne

AddOptionalFloat32 adds f to the "optional_float32" field.

func (*FieldTypeUpdateOne) AddOptionalInt

func (ftuo *FieldTypeUpdateOne) AddOptionalInt(i int) *FieldTypeUpdateOne

AddOptionalInt adds i to the "optional_int" field.

func (*FieldTypeUpdateOne) AddOptionalInt16

func (ftuo *FieldTypeUpdateOne) AddOptionalInt16(i int16) *FieldTypeUpdateOne

AddOptionalInt16 adds i to the "optional_int16" field.

func (*FieldTypeUpdateOne) AddOptionalInt32

func (ftuo *FieldTypeUpdateOne) AddOptionalInt32(i int32) *FieldTypeUpdateOne

AddOptionalInt32 adds i to the "optional_int32" field.

func (*FieldTypeUpdateOne) AddOptionalInt64

func (ftuo *FieldTypeUpdateOne) AddOptionalInt64(i int64) *FieldTypeUpdateOne

AddOptionalInt64 adds i to the "optional_int64" field.

func (*FieldTypeUpdateOne) AddOptionalInt8

func (ftuo *FieldTypeUpdateOne) AddOptionalInt8(i int8) *FieldTypeUpdateOne

AddOptionalInt8 adds i to the "optional_int8" field.

func (*FieldTypeUpdateOne) AddOptionalUint

func (ftuo *FieldTypeUpdateOne) AddOptionalUint(u int) *FieldTypeUpdateOne

AddOptionalUint adds u to the "optional_uint" field.

func (*FieldTypeUpdateOne) AddOptionalUint16

func (ftuo *FieldTypeUpdateOne) AddOptionalUint16(u int16) *FieldTypeUpdateOne

AddOptionalUint16 adds u to the "optional_uint16" field.

func (*FieldTypeUpdateOne) AddOptionalUint32

func (ftuo *FieldTypeUpdateOne) AddOptionalUint32(u int32) *FieldTypeUpdateOne

AddOptionalUint32 adds u to the "optional_uint32" field.

func (*FieldTypeUpdateOne) AddOptionalUint64

func (ftuo *FieldTypeUpdateOne) AddOptionalUint64(u int64) *FieldTypeUpdateOne

AddOptionalUint64 adds u to the "optional_uint64" field.

func (*FieldTypeUpdateOne) AddOptionalUint8

func (ftuo *FieldTypeUpdateOne) AddOptionalUint8(u int8) *FieldTypeUpdateOne

AddOptionalUint8 adds u to the "optional_uint8" field.

func (*FieldTypeUpdateOne) AddSchemaFloat

func (ftuo *FieldTypeUpdateOne) AddSchemaFloat(s schema.Float64) *FieldTypeUpdateOne

AddSchemaFloat adds s to the "schema_float" field.

func (*FieldTypeUpdateOne) AddSchemaFloat32

func (ftuo *FieldTypeUpdateOne) AddSchemaFloat32(s schema.Float32) *FieldTypeUpdateOne

AddSchemaFloat32 adds s to the "schema_float32" field.

func (*FieldTypeUpdateOne) AddSchemaInt

func (ftuo *FieldTypeUpdateOne) AddSchemaInt(s schema.Int) *FieldTypeUpdateOne

AddSchemaInt adds s to the "schema_int" field.

func (*FieldTypeUpdateOne) AddSchemaInt64

func (ftuo *FieldTypeUpdateOne) AddSchemaInt64(s schema.Int64) *FieldTypeUpdateOne

AddSchemaInt64 adds s to the "schema_int64" field.

func (*FieldTypeUpdateOne) AddSchemaInt8

func (ftuo *FieldTypeUpdateOne) AddSchemaInt8(s schema.Int8) *FieldTypeUpdateOne

AddSchemaInt8 adds s to the "schema_int8" field.

func (*FieldTypeUpdateOne) AddValidateOptionalInt32

func (ftuo *FieldTypeUpdateOne) AddValidateOptionalInt32(i int32) *FieldTypeUpdateOne

AddValidateOptionalInt32 adds i to the "validate_optional_int32" field.

func (*FieldTypeUpdateOne) ClearActive

func (ftuo *FieldTypeUpdateOne) ClearActive() *FieldTypeUpdateOne

ClearActive clears the value of the "active" field.

func (*FieldTypeUpdateOne) ClearBigInt added in v0.9.0

func (ftuo *FieldTypeUpdateOne) ClearBigInt() *FieldTypeUpdateOne

ClearBigInt clears the value of the "big_int" field.

func (*FieldTypeUpdateOne) ClearDatetime

func (ftuo *FieldTypeUpdateOne) ClearDatetime() *FieldTypeUpdateOne

ClearDatetime clears the value of the "datetime" field.

func (*FieldTypeUpdateOne) ClearDecimal

func (ftuo *FieldTypeUpdateOne) ClearDecimal() *FieldTypeUpdateOne

ClearDecimal clears the value of the "decimal" field.

func (*FieldTypeUpdateOne) ClearDeleted

func (ftuo *FieldTypeUpdateOne) ClearDeleted() *FieldTypeUpdateOne

ClearDeleted clears the value of the "deleted" field.

func (*FieldTypeUpdateOne) ClearDeletedAt

func (ftuo *FieldTypeUpdateOne) ClearDeletedAt() *FieldTypeUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FieldTypeUpdateOne) ClearDuration

func (ftuo *FieldTypeUpdateOne) ClearDuration() *FieldTypeUpdateOne

ClearDuration clears the value of the "duration" field.

func (*FieldTypeUpdateOne) ClearIP

func (ftuo *FieldTypeUpdateOne) ClearIP() *FieldTypeUpdateOne

ClearIP clears the value of the "ip" field.

func (ftuo *FieldTypeUpdateOne) ClearLink() *FieldTypeUpdateOne

ClearLink clears the value of the "link" field.

func (*FieldTypeUpdateOne) ClearLinkOther

func (ftuo *FieldTypeUpdateOne) ClearLinkOther() *FieldTypeUpdateOne

ClearLinkOther clears the value of the "link_other" field.

func (*FieldTypeUpdateOne) ClearLinkOtherFunc added in v0.10.0

func (ftuo *FieldTypeUpdateOne) ClearLinkOtherFunc() *FieldTypeUpdateOne

ClearLinkOtherFunc clears the value of the "link_other_func" field.

func (*FieldTypeUpdateOne) ClearMAC

func (ftuo *FieldTypeUpdateOne) ClearMAC() *FieldTypeUpdateOne

ClearMAC clears the value of the "mac" field.

func (*FieldTypeUpdateOne) ClearNdir

func (ftuo *FieldTypeUpdateOne) ClearNdir() *FieldTypeUpdateOne

ClearNdir clears the value of the "ndir" field.

func (*FieldTypeUpdateOne) ClearNilPair added in v0.8.0

func (ftuo *FieldTypeUpdateOne) ClearNilPair() *FieldTypeUpdateOne

ClearNilPair clears the value of the "nil_pair" field.

func (*FieldTypeUpdateOne) ClearNillableInt

func (ftuo *FieldTypeUpdateOne) ClearNillableInt() *FieldTypeUpdateOne

ClearNillableInt clears the value of the "nillable_int" field.

func (*FieldTypeUpdateOne) ClearNillableInt16

func (ftuo *FieldTypeUpdateOne) ClearNillableInt16() *FieldTypeUpdateOne

ClearNillableInt16 clears the value of the "nillable_int16" field.

func (*FieldTypeUpdateOne) ClearNillableInt32

func (ftuo *FieldTypeUpdateOne) ClearNillableInt32() *FieldTypeUpdateOne

ClearNillableInt32 clears the value of the "nillable_int32" field.

func (*FieldTypeUpdateOne) ClearNillableInt64

func (ftuo *FieldTypeUpdateOne) ClearNillableInt64() *FieldTypeUpdateOne

ClearNillableInt64 clears the value of the "nillable_int64" field.

func (*FieldTypeUpdateOne) ClearNillableInt8

func (ftuo *FieldTypeUpdateOne) ClearNillableInt8() *FieldTypeUpdateOne

ClearNillableInt8 clears the value of the "nillable_int8" field.

func (*FieldTypeUpdateOne) ClearNillableUUID added in v0.9.0

func (ftuo *FieldTypeUpdateOne) ClearNillableUUID() *FieldTypeUpdateOne

ClearNillableUUID clears the value of the "nillable_uuid" field.

func (*FieldTypeUpdateOne) ClearNullActive

func (ftuo *FieldTypeUpdateOne) ClearNullActive() *FieldTypeUpdateOne

ClearNullActive clears the value of the "null_active" field.

func (*FieldTypeUpdateOne) ClearNullFloat

func (ftuo *FieldTypeUpdateOne) ClearNullFloat() *FieldTypeUpdateOne

ClearNullFloat clears the value of the "null_float" field.

func (*FieldTypeUpdateOne) ClearNullInt64

func (ftuo *FieldTypeUpdateOne) ClearNullInt64() *FieldTypeUpdateOne

ClearNullInt64 clears the value of the "null_int64" field.

func (ftuo *FieldTypeUpdateOne) ClearNullLink() *FieldTypeUpdateOne

ClearNullLink clears the value of the "null_link" field.

func (*FieldTypeUpdateOne) ClearNullStr

func (ftuo *FieldTypeUpdateOne) ClearNullStr() *FieldTypeUpdateOne

ClearNullStr clears the value of the "null_str" field.

func (*FieldTypeUpdateOne) ClearOptionalFloat

func (ftuo *FieldTypeUpdateOne) ClearOptionalFloat() *FieldTypeUpdateOne

ClearOptionalFloat clears the value of the "optional_float" field.

func (*FieldTypeUpdateOne) ClearOptionalFloat32

func (ftuo *FieldTypeUpdateOne) ClearOptionalFloat32() *FieldTypeUpdateOne

ClearOptionalFloat32 clears the value of the "optional_float32" field.

func (*FieldTypeUpdateOne) ClearOptionalInt

func (ftuo *FieldTypeUpdateOne) ClearOptionalInt() *FieldTypeUpdateOne

ClearOptionalInt clears the value of the "optional_int" field.

func (*FieldTypeUpdateOne) ClearOptionalInt16

func (ftuo *FieldTypeUpdateOne) ClearOptionalInt16() *FieldTypeUpdateOne

ClearOptionalInt16 clears the value of the "optional_int16" field.

func (*FieldTypeUpdateOne) ClearOptionalInt32

func (ftuo *FieldTypeUpdateOne) ClearOptionalInt32() *FieldTypeUpdateOne

ClearOptionalInt32 clears the value of the "optional_int32" field.

func (*FieldTypeUpdateOne) ClearOptionalInt64

func (ftuo *FieldTypeUpdateOne) ClearOptionalInt64() *FieldTypeUpdateOne

ClearOptionalInt64 clears the value of the "optional_int64" field.

func (*FieldTypeUpdateOne) ClearOptionalInt8

func (ftuo *FieldTypeUpdateOne) ClearOptionalInt8() *FieldTypeUpdateOne

ClearOptionalInt8 clears the value of the "optional_int8" field.

func (*FieldTypeUpdateOne) ClearOptionalUUID added in v0.10.0

func (ftuo *FieldTypeUpdateOne) ClearOptionalUUID() *FieldTypeUpdateOne

ClearOptionalUUID clears the value of the "optional_uuid" field.

func (*FieldTypeUpdateOne) ClearOptionalUint

func (ftuo *FieldTypeUpdateOne) ClearOptionalUint() *FieldTypeUpdateOne

ClearOptionalUint clears the value of the "optional_uint" field.

func (*FieldTypeUpdateOne) ClearOptionalUint16

func (ftuo *FieldTypeUpdateOne) ClearOptionalUint16() *FieldTypeUpdateOne

ClearOptionalUint16 clears the value of the "optional_uint16" field.

func (*FieldTypeUpdateOne) ClearOptionalUint32

func (ftuo *FieldTypeUpdateOne) ClearOptionalUint32() *FieldTypeUpdateOne

ClearOptionalUint32 clears the value of the "optional_uint32" field.

func (*FieldTypeUpdateOne) ClearOptionalUint64

func (ftuo *FieldTypeUpdateOne) ClearOptionalUint64() *FieldTypeUpdateOne

ClearOptionalUint64 clears the value of the "optional_uint64" field.

func (*FieldTypeUpdateOne) ClearOptionalUint8

func (ftuo *FieldTypeUpdateOne) ClearOptionalUint8() *FieldTypeUpdateOne

ClearOptionalUint8 clears the value of the "optional_uint8" field.

func (*FieldTypeUpdateOne) ClearPassword added in v0.9.0

func (ftuo *FieldTypeUpdateOne) ClearPassword() *FieldTypeUpdateOne

ClearPassword clears the value of the "password" field.

func (*FieldTypeUpdateOne) ClearPasswordOther added in v0.9.0

func (ftuo *FieldTypeUpdateOne) ClearPasswordOther() *FieldTypeUpdateOne

ClearPasswordOther clears the value of the "password_other" field.

func (*FieldTypeUpdateOne) ClearPriority added in v0.9.0

func (ftuo *FieldTypeUpdateOne) ClearPriority() *FieldTypeUpdateOne

ClearPriority clears the value of the "priority" field.

func (*FieldTypeUpdateOne) ClearRawData added in v0.10.0

func (ftuo *FieldTypeUpdateOne) ClearRawData() *FieldTypeUpdateOne

ClearRawData clears the value of the "raw_data" field.

func (*FieldTypeUpdateOne) ClearSchemaFloat

func (ftuo *FieldTypeUpdateOne) ClearSchemaFloat() *FieldTypeUpdateOne

ClearSchemaFloat clears the value of the "schema_float" field.

func (*FieldTypeUpdateOne) ClearSchemaFloat32

func (ftuo *FieldTypeUpdateOne) ClearSchemaFloat32() *FieldTypeUpdateOne

ClearSchemaFloat32 clears the value of the "schema_float32" field.

func (*FieldTypeUpdateOne) ClearSchemaInt

func (ftuo *FieldTypeUpdateOne) ClearSchemaInt() *FieldTypeUpdateOne

ClearSchemaInt clears the value of the "schema_int" field.

func (*FieldTypeUpdateOne) ClearSchemaInt64

func (ftuo *FieldTypeUpdateOne) ClearSchemaInt64() *FieldTypeUpdateOne

ClearSchemaInt64 clears the value of the "schema_int64" field.

func (*FieldTypeUpdateOne) ClearSchemaInt8

func (ftuo *FieldTypeUpdateOne) ClearSchemaInt8() *FieldTypeUpdateOne

ClearSchemaInt8 clears the value of the "schema_int8" field.

func (*FieldTypeUpdateOne) ClearSensitive added in v0.10.0

func (ftuo *FieldTypeUpdateOne) ClearSensitive() *FieldTypeUpdateOne

ClearSensitive clears the value of the "sensitive" field.

func (*FieldTypeUpdateOne) ClearState

func (ftuo *FieldTypeUpdateOne) ClearState() *FieldTypeUpdateOne

ClearState clears the value of the "state" field.

func (*FieldTypeUpdateOne) ClearStr

func (ftuo *FieldTypeUpdateOne) ClearStr() *FieldTypeUpdateOne

ClearStr clears the value of the "str" field.

func (*FieldTypeUpdateOne) ClearStringArray added in v0.8.0

func (ftuo *FieldTypeUpdateOne) ClearStringArray() *FieldTypeUpdateOne

ClearStringArray clears the value of the "string_array" field.

func (*FieldTypeUpdateOne) ClearStringScanner added in v0.9.0

func (ftuo *FieldTypeUpdateOne) ClearStringScanner() *FieldTypeUpdateOne

ClearStringScanner clears the value of the "string_scanner" field.

func (*FieldTypeUpdateOne) ClearStrings added in v0.8.0

func (ftuo *FieldTypeUpdateOne) ClearStrings() *FieldTypeUpdateOne

ClearStrings clears the value of the "strings" field.

func (*FieldTypeUpdateOne) ClearText added in v0.10.0

func (ftuo *FieldTypeUpdateOne) ClearText() *FieldTypeUpdateOne

ClearText clears the value of the "text" field.

func (*FieldTypeUpdateOne) ClearValidateOptionalInt32

func (ftuo *FieldTypeUpdateOne) ClearValidateOptionalInt32() *FieldTypeUpdateOne

ClearValidateOptionalInt32 clears the value of the "validate_optional_int32" field.

func (*FieldTypeUpdateOne) Exec

func (ftuo *FieldTypeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FieldTypeUpdateOne) ExecX

func (ftuo *FieldTypeUpdateOne) ExecX(ctx context.Context)

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

func (*FieldTypeUpdateOne) Mutation

func (ftuo *FieldTypeUpdateOne) Mutation() *FieldTypeMutation

Mutation returns the FieldTypeMutation object of the builder.

func (*FieldTypeUpdateOne) Save

func (ftuo *FieldTypeUpdateOne) Save(ctx context.Context) (*FieldType, error)

Save executes the query and returns the updated FieldType entity.

func (*FieldTypeUpdateOne) SaveX

func (ftuo *FieldTypeUpdateOne) SaveX(ctx context.Context) *FieldType

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

func (*FieldTypeUpdateOne) Select added in v0.8.0

func (ftuo *FieldTypeUpdateOne) Select(field string, fields ...string) *FieldTypeUpdateOne

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

func (*FieldTypeUpdateOne) SetActive

func (ftuo *FieldTypeUpdateOne) SetActive(s schema.Status) *FieldTypeUpdateOne

SetActive sets the "active" field.

func (*FieldTypeUpdateOne) SetBigInt added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetBigInt(si schema.BigInt) *FieldTypeUpdateOne

SetBigInt sets the "big_int" field.

func (*FieldTypeUpdateOne) SetDatetime

func (ftuo *FieldTypeUpdateOne) SetDatetime(t time.Time) *FieldTypeUpdateOne

SetDatetime sets the "datetime" field.

func (*FieldTypeUpdateOne) SetDecimal

func (ftuo *FieldTypeUpdateOne) SetDecimal(f float64) *FieldTypeUpdateOne

SetDecimal sets the "decimal" field.

func (*FieldTypeUpdateOne) SetDeleted

func (ftuo *FieldTypeUpdateOne) SetDeleted(sb *sql.NullBool) *FieldTypeUpdateOne

SetDeleted sets the "deleted" field.

func (*FieldTypeUpdateOne) SetDeletedAt

func (ftuo *FieldTypeUpdateOne) SetDeletedAt(st *sql.NullTime) *FieldTypeUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*FieldTypeUpdateOne) SetDir

func (ftuo *FieldTypeUpdateOne) SetDir(h http.Dir) *FieldTypeUpdateOne

SetDir sets the "dir" field.

func (*FieldTypeUpdateOne) SetDuration

func (ftuo *FieldTypeUpdateOne) SetDuration(t time.Duration) *FieldTypeUpdateOne

SetDuration sets the "duration" field.

func (*FieldTypeUpdateOne) SetIP

func (ftuo *FieldTypeUpdateOne) SetIP(n net.IP) *FieldTypeUpdateOne

SetIP sets the "ip" field.

func (*FieldTypeUpdateOne) SetInt

func (ftuo *FieldTypeUpdateOne) SetInt(i int) *FieldTypeUpdateOne

SetInt sets the "int" field.

func (*FieldTypeUpdateOne) SetInt16

func (ftuo *FieldTypeUpdateOne) SetInt16(i int16) *FieldTypeUpdateOne

SetInt16 sets the "int16" field.

func (*FieldTypeUpdateOne) SetInt32

func (ftuo *FieldTypeUpdateOne) SetInt32(i int32) *FieldTypeUpdateOne

SetInt32 sets the "int32" field.

func (*FieldTypeUpdateOne) SetInt64

func (ftuo *FieldTypeUpdateOne) SetInt64(i int64) *FieldTypeUpdateOne

SetInt64 sets the "int64" field.

func (*FieldTypeUpdateOne) SetInt8

func (ftuo *FieldTypeUpdateOne) SetInt8(i int8) *FieldTypeUpdateOne

SetInt8 sets the "int8" field.

SetLink sets the "link" field.

func (*FieldTypeUpdateOne) SetLinkOther

func (ftuo *FieldTypeUpdateOne) SetLinkOther(s *schema.Link) *FieldTypeUpdateOne

SetLinkOther sets the "link_other" field.

func (*FieldTypeUpdateOne) SetLinkOtherFunc added in v0.10.0

func (ftuo *FieldTypeUpdateOne) SetLinkOtherFunc(s *schema.Link) *FieldTypeUpdateOne

SetLinkOtherFunc sets the "link_other_func" field.

func (*FieldTypeUpdateOne) SetMAC

SetMAC sets the "mac" field.

func (*FieldTypeUpdateOne) SetNdir

func (ftuo *FieldTypeUpdateOne) SetNdir(h http.Dir) *FieldTypeUpdateOne

SetNdir sets the "ndir" field.

func (*FieldTypeUpdateOne) SetNilPair added in v0.8.0

func (ftuo *FieldTypeUpdateOne) SetNilPair(s *schema.Pair) *FieldTypeUpdateOne

SetNilPair sets the "nil_pair" field.

func (*FieldTypeUpdateOne) SetNillableActive

func (ftuo *FieldTypeUpdateOne) SetNillableActive(s *schema.Status) *FieldTypeUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableBigInt added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetNillableBigInt(si *schema.BigInt) *FieldTypeUpdateOne

SetNillableBigInt sets the "big_int" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableDatetime

func (ftuo *FieldTypeUpdateOne) SetNillableDatetime(t *time.Time) *FieldTypeUpdateOne

SetNillableDatetime sets the "datetime" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableDecimal

func (ftuo *FieldTypeUpdateOne) SetNillableDecimal(f *float64) *FieldTypeUpdateOne

SetNillableDecimal sets the "decimal" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableDir

func (ftuo *FieldTypeUpdateOne) SetNillableDir(h *http.Dir) *FieldTypeUpdateOne

SetNillableDir sets the "dir" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableInt

func (ftuo *FieldTypeUpdateOne) SetNillableInt(i int) *FieldTypeUpdateOne

SetNillableInt sets the "nillable_int" field.

func (*FieldTypeUpdateOne) SetNillableInt16

func (ftuo *FieldTypeUpdateOne) SetNillableInt16(i int16) *FieldTypeUpdateOne

SetNillableInt16 sets the "nillable_int16" field.

func (*FieldTypeUpdateOne) SetNillableInt32

func (ftuo *FieldTypeUpdateOne) SetNillableInt32(i int32) *FieldTypeUpdateOne

SetNillableInt32 sets the "nillable_int32" field.

func (*FieldTypeUpdateOne) SetNillableInt64

func (ftuo *FieldTypeUpdateOne) SetNillableInt64(i int64) *FieldTypeUpdateOne

SetNillableInt64 sets the "nillable_int64" field.

func (*FieldTypeUpdateOne) SetNillableInt8

func (ftuo *FieldTypeUpdateOne) SetNillableInt8(i int8) *FieldTypeUpdateOne

SetNillableInt8 sets the "nillable_int8" field.

func (ftuo *FieldTypeUpdateOne) SetNillableLink(s *schema.Link) *FieldTypeUpdateOne

SetNillableLink sets the "link" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableMAC added in v0.8.0

func (ftuo *FieldTypeUpdateOne) SetNillableMAC(s *schema.MAC) *FieldTypeUpdateOne

SetNillableMAC sets the "mac" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableNdir

func (ftuo *FieldTypeUpdateOne) SetNillableNdir(h *http.Dir) *FieldTypeUpdateOne

SetNillableNdir sets the "ndir" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableNillableInt

func (ftuo *FieldTypeUpdateOne) SetNillableNillableInt(i *int) *FieldTypeUpdateOne

SetNillableNillableInt sets the "nillable_int" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableNillableInt16

func (ftuo *FieldTypeUpdateOne) SetNillableNillableInt16(i *int16) *FieldTypeUpdateOne

SetNillableNillableInt16 sets the "nillable_int16" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableNillableInt32

func (ftuo *FieldTypeUpdateOne) SetNillableNillableInt32(i *int32) *FieldTypeUpdateOne

SetNillableNillableInt32 sets the "nillable_int32" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableNillableInt64

func (ftuo *FieldTypeUpdateOne) SetNillableNillableInt64(i *int64) *FieldTypeUpdateOne

SetNillableNillableInt64 sets the "nillable_int64" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableNillableInt8

func (ftuo *FieldTypeUpdateOne) SetNillableNillableInt8(i *int8) *FieldTypeUpdateOne

SetNillableNillableInt8 sets the "nillable_int8" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableNillableUUID added in v0.10.0

func (ftuo *FieldTypeUpdateOne) SetNillableNillableUUID(u *uuid.UUID) *FieldTypeUpdateOne

SetNillableNillableUUID sets the "nillable_uuid" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableNullActive

func (ftuo *FieldTypeUpdateOne) SetNillableNullActive(s *schema.Status) *FieldTypeUpdateOne

SetNillableNullActive sets the "null_active" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalFloat

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalFloat(f *float64) *FieldTypeUpdateOne

SetNillableOptionalFloat sets the "optional_float" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalFloat32

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalFloat32(f *float32) *FieldTypeUpdateOne

SetNillableOptionalFloat32 sets the "optional_float32" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalInt

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalInt(i *int) *FieldTypeUpdateOne

SetNillableOptionalInt sets the "optional_int" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalInt16

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalInt16(i *int16) *FieldTypeUpdateOne

SetNillableOptionalInt16 sets the "optional_int16" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalInt32

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalInt32(i *int32) *FieldTypeUpdateOne

SetNillableOptionalInt32 sets the "optional_int32" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalInt64

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalInt64(i *int64) *FieldTypeUpdateOne

SetNillableOptionalInt64 sets the "optional_int64" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalInt8

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalInt8(i *int8) *FieldTypeUpdateOne

SetNillableOptionalInt8 sets the "optional_int8" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalUUID added in v0.10.0

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalUUID(u *uuid.UUID) *FieldTypeUpdateOne

SetNillableOptionalUUID sets the "optional_uuid" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalUint

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalUint(u *uint) *FieldTypeUpdateOne

SetNillableOptionalUint sets the "optional_uint" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalUint16

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalUint16(u *uint16) *FieldTypeUpdateOne

SetNillableOptionalUint16 sets the "optional_uint16" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalUint32

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalUint32(u *uint32) *FieldTypeUpdateOne

SetNillableOptionalUint32 sets the "optional_uint32" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalUint64

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalUint64(u *uint64) *FieldTypeUpdateOne

SetNillableOptionalUint64 sets the "optional_uint64" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableOptionalUint8

func (ftuo *FieldTypeUpdateOne) SetNillableOptionalUint8(u *uint8) *FieldTypeUpdateOne

SetNillableOptionalUint8 sets the "optional_uint8" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillablePair added in v0.8.0

func (ftuo *FieldTypeUpdateOne) SetNillablePair(s *schema.Pair) *FieldTypeUpdateOne

SetNillablePair sets the "pair" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillablePassword added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetNillablePassword(s *string) *FieldTypeUpdateOne

SetNillablePassword sets the "password" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillablePasswordOther added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetNillablePasswordOther(s *schema.Password) *FieldTypeUpdateOne

SetNillablePasswordOther sets the "password_other" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillablePriority added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetNillablePriority(r *role.Priority) *FieldTypeUpdateOne

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableRole

func (ftuo *FieldTypeUpdateOne) SetNillableRole(r *role.Role) *FieldTypeUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableSchemaFloat

func (ftuo *FieldTypeUpdateOne) SetNillableSchemaFloat(s *schema.Float64) *FieldTypeUpdateOne

SetNillableSchemaFloat sets the "schema_float" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableSchemaFloat32

func (ftuo *FieldTypeUpdateOne) SetNillableSchemaFloat32(s *schema.Float32) *FieldTypeUpdateOne

SetNillableSchemaFloat32 sets the "schema_float32" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableSchemaInt

func (ftuo *FieldTypeUpdateOne) SetNillableSchemaInt(s *schema.Int) *FieldTypeUpdateOne

SetNillableSchemaInt sets the "schema_int" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableSchemaInt64

func (ftuo *FieldTypeUpdateOne) SetNillableSchemaInt64(s *schema.Int64) *FieldTypeUpdateOne

SetNillableSchemaInt64 sets the "schema_int64" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableSchemaInt8

func (ftuo *FieldTypeUpdateOne) SetNillableSchemaInt8(s *schema.Int8) *FieldTypeUpdateOne

SetNillableSchemaInt8 sets the "schema_int8" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableState

func (ftuo *FieldTypeUpdateOne) SetNillableState(f *fieldtype.State) *FieldTypeUpdateOne

SetNillableState sets the "state" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableStr added in v0.8.0

func (ftuo *FieldTypeUpdateOne) SetNillableStr(ss *sql.NullString) *FieldTypeUpdateOne

SetNillableStr sets the "str" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableStringScanner added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetNillableStringScanner(ss *schema.StringScanner) *FieldTypeUpdateOne

SetNillableStringScanner sets the "string_scanner" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableText added in v0.10.0

func (ftuo *FieldTypeUpdateOne) SetNillableText(s *string) *FieldTypeUpdateOne

SetNillableText sets the "text" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableTriple added in v0.8.0

func (ftuo *FieldTypeUpdateOne) SetNillableTriple(s *schema.Triple) *FieldTypeUpdateOne

SetNillableTriple sets the "triple" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableUUID added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetNillableUUID(u uuid.UUID) *FieldTypeUpdateOne

SetNillableUUID sets the "nillable_uuid" field.

func (*FieldTypeUpdateOne) SetNillableValidateOptionalInt32

func (ftuo *FieldTypeUpdateOne) SetNillableValidateOptionalInt32(i *int32) *FieldTypeUpdateOne

SetNillableValidateOptionalInt32 sets the "validate_optional_int32" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNillableVstring added in v0.8.0

func (ftuo *FieldTypeUpdateOne) SetNillableVstring(ss *schema.VString) *FieldTypeUpdateOne

SetNillableVstring sets the "vstring" field if the given value is not nil.

func (*FieldTypeUpdateOne) SetNullActive

func (ftuo *FieldTypeUpdateOne) SetNullActive(s schema.Status) *FieldTypeUpdateOne

SetNullActive sets the "null_active" field.

func (*FieldTypeUpdateOne) SetNullFloat

func (ftuo *FieldTypeUpdateOne) SetNullFloat(sf *sql.NullFloat64) *FieldTypeUpdateOne

SetNullFloat sets the "null_float" field.

func (*FieldTypeUpdateOne) SetNullInt64

func (ftuo *FieldTypeUpdateOne) SetNullInt64(si *sql.NullInt64) *FieldTypeUpdateOne

SetNullInt64 sets the "null_int64" field.

func (ftuo *FieldTypeUpdateOne) SetNullLink(s *schema.Link) *FieldTypeUpdateOne

SetNullLink sets the "null_link" field.

func (*FieldTypeUpdateOne) SetNullStr

func (ftuo *FieldTypeUpdateOne) SetNullStr(ss *sql.NullString) *FieldTypeUpdateOne

SetNullStr sets the "null_str" field.

func (*FieldTypeUpdateOne) SetOptionalFloat

func (ftuo *FieldTypeUpdateOne) SetOptionalFloat(f float64) *FieldTypeUpdateOne

SetOptionalFloat sets the "optional_float" field.

func (*FieldTypeUpdateOne) SetOptionalFloat32

func (ftuo *FieldTypeUpdateOne) SetOptionalFloat32(f float32) *FieldTypeUpdateOne

SetOptionalFloat32 sets the "optional_float32" field.

func (*FieldTypeUpdateOne) SetOptionalInt

func (ftuo *FieldTypeUpdateOne) SetOptionalInt(i int) *FieldTypeUpdateOne

SetOptionalInt sets the "optional_int" field.

func (*FieldTypeUpdateOne) SetOptionalInt16

func (ftuo *FieldTypeUpdateOne) SetOptionalInt16(i int16) *FieldTypeUpdateOne

SetOptionalInt16 sets the "optional_int16" field.

func (*FieldTypeUpdateOne) SetOptionalInt32

func (ftuo *FieldTypeUpdateOne) SetOptionalInt32(i int32) *FieldTypeUpdateOne

SetOptionalInt32 sets the "optional_int32" field.

func (*FieldTypeUpdateOne) SetOptionalInt64

func (ftuo *FieldTypeUpdateOne) SetOptionalInt64(i int64) *FieldTypeUpdateOne

SetOptionalInt64 sets the "optional_int64" field.

func (*FieldTypeUpdateOne) SetOptionalInt8

func (ftuo *FieldTypeUpdateOne) SetOptionalInt8(i int8) *FieldTypeUpdateOne

SetOptionalInt8 sets the "optional_int8" field.

func (*FieldTypeUpdateOne) SetOptionalUUID added in v0.10.0

func (ftuo *FieldTypeUpdateOne) SetOptionalUUID(u uuid.UUID) *FieldTypeUpdateOne

SetOptionalUUID sets the "optional_uuid" field.

func (*FieldTypeUpdateOne) SetOptionalUint

func (ftuo *FieldTypeUpdateOne) SetOptionalUint(u uint) *FieldTypeUpdateOne

SetOptionalUint sets the "optional_uint" field.

func (*FieldTypeUpdateOne) SetOptionalUint16

func (ftuo *FieldTypeUpdateOne) SetOptionalUint16(u uint16) *FieldTypeUpdateOne

SetOptionalUint16 sets the "optional_uint16" field.

func (*FieldTypeUpdateOne) SetOptionalUint32

func (ftuo *FieldTypeUpdateOne) SetOptionalUint32(u uint32) *FieldTypeUpdateOne

SetOptionalUint32 sets the "optional_uint32" field.

func (*FieldTypeUpdateOne) SetOptionalUint64

func (ftuo *FieldTypeUpdateOne) SetOptionalUint64(u uint64) *FieldTypeUpdateOne

SetOptionalUint64 sets the "optional_uint64" field.

func (*FieldTypeUpdateOne) SetOptionalUint8

func (ftuo *FieldTypeUpdateOne) SetOptionalUint8(u uint8) *FieldTypeUpdateOne

SetOptionalUint8 sets the "optional_uint8" field.

func (*FieldTypeUpdateOne) SetPair added in v0.8.0

SetPair sets the "pair" field.

func (*FieldTypeUpdateOne) SetPassword added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetPassword(s string) *FieldTypeUpdateOne

SetPassword sets the "password" field.

func (*FieldTypeUpdateOne) SetPasswordOther added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetPasswordOther(s schema.Password) *FieldTypeUpdateOne

SetPasswordOther sets the "password_other" field.

func (*FieldTypeUpdateOne) SetPriority added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetPriority(r role.Priority) *FieldTypeUpdateOne

SetPriority sets the "priority" field.

func (*FieldTypeUpdateOne) SetRawData added in v0.10.0

func (ftuo *FieldTypeUpdateOne) SetRawData(b []byte) *FieldTypeUpdateOne

SetRawData sets the "raw_data" field.

func (*FieldTypeUpdateOne) SetRole

func (ftuo *FieldTypeUpdateOne) SetRole(r role.Role) *FieldTypeUpdateOne

SetRole sets the "role" field.

func (*FieldTypeUpdateOne) SetSchemaFloat

func (ftuo *FieldTypeUpdateOne) SetSchemaFloat(s schema.Float64) *FieldTypeUpdateOne

SetSchemaFloat sets the "schema_float" field.

func (*FieldTypeUpdateOne) SetSchemaFloat32

func (ftuo *FieldTypeUpdateOne) SetSchemaFloat32(s schema.Float32) *FieldTypeUpdateOne

SetSchemaFloat32 sets the "schema_float32" field.

func (*FieldTypeUpdateOne) SetSchemaInt

func (ftuo *FieldTypeUpdateOne) SetSchemaInt(s schema.Int) *FieldTypeUpdateOne

SetSchemaInt sets the "schema_int" field.

func (*FieldTypeUpdateOne) SetSchemaInt64

func (ftuo *FieldTypeUpdateOne) SetSchemaInt64(s schema.Int64) *FieldTypeUpdateOne

SetSchemaInt64 sets the "schema_int64" field.

func (*FieldTypeUpdateOne) SetSchemaInt8

func (ftuo *FieldTypeUpdateOne) SetSchemaInt8(s schema.Int8) *FieldTypeUpdateOne

SetSchemaInt8 sets the "schema_int8" field.

func (*FieldTypeUpdateOne) SetSensitive added in v0.10.0

func (ftuo *FieldTypeUpdateOne) SetSensitive(b []byte) *FieldTypeUpdateOne

SetSensitive sets the "sensitive" field.

func (*FieldTypeUpdateOne) SetState

SetState sets the "state" field.

func (*FieldTypeUpdateOne) SetStr

SetStr sets the "str" field.

func (*FieldTypeUpdateOne) SetStringArray added in v0.8.0

func (ftuo *FieldTypeUpdateOne) SetStringArray(s schema.Strings) *FieldTypeUpdateOne

SetStringArray sets the "string_array" field.

func (*FieldTypeUpdateOne) SetStringScanner added in v0.9.0

func (ftuo *FieldTypeUpdateOne) SetStringScanner(ss schema.StringScanner) *FieldTypeUpdateOne

SetStringScanner sets the "string_scanner" field.

func (*FieldTypeUpdateOne) SetStrings added in v0.8.0

func (ftuo *FieldTypeUpdateOne) SetStrings(s []string) *FieldTypeUpdateOne

SetStrings sets the "strings" field.

func (*FieldTypeUpdateOne) SetText added in v0.10.0

func (ftuo *FieldTypeUpdateOne) SetText(s string) *FieldTypeUpdateOne

SetText sets the "text" field.

func (*FieldTypeUpdateOne) SetTriple added in v0.8.0

func (ftuo *FieldTypeUpdateOne) SetTriple(s schema.Triple) *FieldTypeUpdateOne

SetTriple sets the "triple" field.

func (*FieldTypeUpdateOne) SetValidateOptionalInt32

func (ftuo *FieldTypeUpdateOne) SetValidateOptionalInt32(i int32) *FieldTypeUpdateOne

SetValidateOptionalInt32 sets the "validate_optional_int32" field.

func (*FieldTypeUpdateOne) SetVstring added in v0.8.0

func (ftuo *FieldTypeUpdateOne) SetVstring(ss schema.VString) *FieldTypeUpdateOne

SetVstring sets the "vstring" field.

type FieldTypeUpsert added in v0.9.0

type FieldTypeUpsert struct {
	*sql.UpdateSet
}

FieldTypeUpsert is the "OnConflict" setter.

func (*FieldTypeUpsert) AddBigInt added in v0.10.0

func (u *FieldTypeUpsert) AddBigInt(v schema.BigInt) *FieldTypeUpsert

AddBigInt adds v to the "big_int" field.

func (*FieldTypeUpsert) AddDecimal added in v0.10.0

func (u *FieldTypeUpsert) AddDecimal(v float64) *FieldTypeUpsert

AddDecimal adds v to the "decimal" field.

func (*FieldTypeUpsert) AddDuration added in v0.10.0

func (u *FieldTypeUpsert) AddDuration(v time.Duration) *FieldTypeUpsert

AddDuration adds v to the "duration" field.

func (*FieldTypeUpsert) AddInt added in v0.10.0

func (u *FieldTypeUpsert) AddInt(v int) *FieldTypeUpsert

AddInt adds v to the "int" field.

func (*FieldTypeUpsert) AddInt16 added in v0.10.0

func (u *FieldTypeUpsert) AddInt16(v int16) *FieldTypeUpsert

AddInt16 adds v to the "int16" field.

func (*FieldTypeUpsert) AddInt32 added in v0.10.0

func (u *FieldTypeUpsert) AddInt32(v int32) *FieldTypeUpsert

AddInt32 adds v to the "int32" field.

func (*FieldTypeUpsert) AddInt64 added in v0.10.0

func (u *FieldTypeUpsert) AddInt64(v int64) *FieldTypeUpsert

AddInt64 adds v to the "int64" field.

func (*FieldTypeUpsert) AddInt8 added in v0.10.0

func (u *FieldTypeUpsert) AddInt8(v int8) *FieldTypeUpsert

AddInt8 adds v to the "int8" field.

func (*FieldTypeUpsert) AddNillableInt added in v0.10.0

func (u *FieldTypeUpsert) AddNillableInt(v int) *FieldTypeUpsert

AddNillableInt adds v to the "nillable_int" field.

func (*FieldTypeUpsert) AddNillableInt16 added in v0.10.0

func (u *FieldTypeUpsert) AddNillableInt16(v int16) *FieldTypeUpsert

AddNillableInt16 adds v to the "nillable_int16" field.

func (*FieldTypeUpsert) AddNillableInt32 added in v0.10.0

func (u *FieldTypeUpsert) AddNillableInt32(v int32) *FieldTypeUpsert

AddNillableInt32 adds v to the "nillable_int32" field.

func (*FieldTypeUpsert) AddNillableInt64 added in v0.10.0

func (u *FieldTypeUpsert) AddNillableInt64(v int64) *FieldTypeUpsert

AddNillableInt64 adds v to the "nillable_int64" field.

func (*FieldTypeUpsert) AddNillableInt8 added in v0.10.0

func (u *FieldTypeUpsert) AddNillableInt8(v int8) *FieldTypeUpsert

AddNillableInt8 adds v to the "nillable_int8" field.

func (*FieldTypeUpsert) AddOptionalFloat added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalFloat(v float64) *FieldTypeUpsert

AddOptionalFloat adds v to the "optional_float" field.

func (*FieldTypeUpsert) AddOptionalFloat32 added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalFloat32(v float32) *FieldTypeUpsert

AddOptionalFloat32 adds v to the "optional_float32" field.

func (*FieldTypeUpsert) AddOptionalInt added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalInt(v int) *FieldTypeUpsert

AddOptionalInt adds v to the "optional_int" field.

func (*FieldTypeUpsert) AddOptionalInt16 added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalInt16(v int16) *FieldTypeUpsert

AddOptionalInt16 adds v to the "optional_int16" field.

func (*FieldTypeUpsert) AddOptionalInt32 added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalInt32(v int32) *FieldTypeUpsert

AddOptionalInt32 adds v to the "optional_int32" field.

func (*FieldTypeUpsert) AddOptionalInt64 added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalInt64(v int64) *FieldTypeUpsert

AddOptionalInt64 adds v to the "optional_int64" field.

func (*FieldTypeUpsert) AddOptionalInt8 added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalInt8(v int8) *FieldTypeUpsert

AddOptionalInt8 adds v to the "optional_int8" field.

func (*FieldTypeUpsert) AddOptionalUint added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalUint(v uint) *FieldTypeUpsert

AddOptionalUint adds v to the "optional_uint" field.

func (*FieldTypeUpsert) AddOptionalUint16 added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalUint16(v uint16) *FieldTypeUpsert

AddOptionalUint16 adds v to the "optional_uint16" field.

func (*FieldTypeUpsert) AddOptionalUint32 added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalUint32(v uint32) *FieldTypeUpsert

AddOptionalUint32 adds v to the "optional_uint32" field.

func (*FieldTypeUpsert) AddOptionalUint64 added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalUint64(v uint64) *FieldTypeUpsert

AddOptionalUint64 adds v to the "optional_uint64" field.

func (*FieldTypeUpsert) AddOptionalUint8 added in v0.10.0

func (u *FieldTypeUpsert) AddOptionalUint8(v uint8) *FieldTypeUpsert

AddOptionalUint8 adds v to the "optional_uint8" field.

func (*FieldTypeUpsert) AddSchemaFloat added in v0.10.0

func (u *FieldTypeUpsert) AddSchemaFloat(v schema.Float64) *FieldTypeUpsert

AddSchemaFloat adds v to the "schema_float" field.

func (*FieldTypeUpsert) AddSchemaFloat32 added in v0.10.0

func (u *FieldTypeUpsert) AddSchemaFloat32(v schema.Float32) *FieldTypeUpsert

AddSchemaFloat32 adds v to the "schema_float32" field.

func (*FieldTypeUpsert) AddSchemaInt added in v0.10.0

func (u *FieldTypeUpsert) AddSchemaInt(v schema.Int) *FieldTypeUpsert

AddSchemaInt adds v to the "schema_int" field.

func (*FieldTypeUpsert) AddSchemaInt64 added in v0.10.0

func (u *FieldTypeUpsert) AddSchemaInt64(v schema.Int64) *FieldTypeUpsert

AddSchemaInt64 adds v to the "schema_int64" field.

func (*FieldTypeUpsert) AddSchemaInt8 added in v0.10.0

func (u *FieldTypeUpsert) AddSchemaInt8(v schema.Int8) *FieldTypeUpsert

AddSchemaInt8 adds v to the "schema_int8" field.

func (*FieldTypeUpsert) AddValidateOptionalInt32 added in v0.10.0

func (u *FieldTypeUpsert) AddValidateOptionalInt32(v int32) *FieldTypeUpsert

AddValidateOptionalInt32 adds v to the "validate_optional_int32" field.

func (*FieldTypeUpsert) ClearActive added in v0.9.0

func (u *FieldTypeUpsert) ClearActive() *FieldTypeUpsert

ClearActive clears the value of the "active" field.

func (*FieldTypeUpsert) ClearBigInt added in v0.9.0

func (u *FieldTypeUpsert) ClearBigInt() *FieldTypeUpsert

ClearBigInt clears the value of the "big_int" field.

func (*FieldTypeUpsert) ClearDatetime added in v0.9.0

func (u *FieldTypeUpsert) ClearDatetime() *FieldTypeUpsert

ClearDatetime clears the value of the "datetime" field.

func (*FieldTypeUpsert) ClearDecimal added in v0.9.0

func (u *FieldTypeUpsert) ClearDecimal() *FieldTypeUpsert

ClearDecimal clears the value of the "decimal" field.

func (*FieldTypeUpsert) ClearDeleted added in v0.9.0

func (u *FieldTypeUpsert) ClearDeleted() *FieldTypeUpsert

ClearDeleted clears the value of the "deleted" field.

func (*FieldTypeUpsert) ClearDeletedAt added in v0.9.0

func (u *FieldTypeUpsert) ClearDeletedAt() *FieldTypeUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FieldTypeUpsert) ClearDuration added in v0.9.0

func (u *FieldTypeUpsert) ClearDuration() *FieldTypeUpsert

ClearDuration clears the value of the "duration" field.

func (*FieldTypeUpsert) ClearIP added in v0.9.0

func (u *FieldTypeUpsert) ClearIP() *FieldTypeUpsert

ClearIP clears the value of the "ip" field.

func (u *FieldTypeUpsert) ClearLink() *FieldTypeUpsert

ClearLink clears the value of the "link" field.

func (*FieldTypeUpsert) ClearLinkOther added in v0.9.0

func (u *FieldTypeUpsert) ClearLinkOther() *FieldTypeUpsert

ClearLinkOther clears the value of the "link_other" field.

func (*FieldTypeUpsert) ClearLinkOtherFunc added in v0.10.0

func (u *FieldTypeUpsert) ClearLinkOtherFunc() *FieldTypeUpsert

ClearLinkOtherFunc clears the value of the "link_other_func" field.

func (*FieldTypeUpsert) ClearMAC added in v0.9.0

func (u *FieldTypeUpsert) ClearMAC() *FieldTypeUpsert

ClearMAC clears the value of the "mac" field.

func (*FieldTypeUpsert) ClearNdir added in v0.9.0

func (u *FieldTypeUpsert) ClearNdir() *FieldTypeUpsert

ClearNdir clears the value of the "ndir" field.

func (*FieldTypeUpsert) ClearNilPair added in v0.9.0

func (u *FieldTypeUpsert) ClearNilPair() *FieldTypeUpsert

ClearNilPair clears the value of the "nil_pair" field.

func (*FieldTypeUpsert) ClearNillableInt added in v0.9.0

func (u *FieldTypeUpsert) ClearNillableInt() *FieldTypeUpsert

ClearNillableInt clears the value of the "nillable_int" field.

func (*FieldTypeUpsert) ClearNillableInt16 added in v0.9.0

func (u *FieldTypeUpsert) ClearNillableInt16() *FieldTypeUpsert

ClearNillableInt16 clears the value of the "nillable_int16" field.

func (*FieldTypeUpsert) ClearNillableInt32 added in v0.9.0

func (u *FieldTypeUpsert) ClearNillableInt32() *FieldTypeUpsert

ClearNillableInt32 clears the value of the "nillable_int32" field.

func (*FieldTypeUpsert) ClearNillableInt64 added in v0.9.0

func (u *FieldTypeUpsert) ClearNillableInt64() *FieldTypeUpsert

ClearNillableInt64 clears the value of the "nillable_int64" field.

func (*FieldTypeUpsert) ClearNillableInt8 added in v0.9.0

func (u *FieldTypeUpsert) ClearNillableInt8() *FieldTypeUpsert

ClearNillableInt8 clears the value of the "nillable_int8" field.

func (*FieldTypeUpsert) ClearNillableUUID added in v0.9.0

func (u *FieldTypeUpsert) ClearNillableUUID() *FieldTypeUpsert

ClearNillableUUID clears the value of the "nillable_uuid" field.

func (*FieldTypeUpsert) ClearNullActive added in v0.9.0

func (u *FieldTypeUpsert) ClearNullActive() *FieldTypeUpsert

ClearNullActive clears the value of the "null_active" field.

func (*FieldTypeUpsert) ClearNullFloat added in v0.9.0

func (u *FieldTypeUpsert) ClearNullFloat() *FieldTypeUpsert

ClearNullFloat clears the value of the "null_float" field.

func (*FieldTypeUpsert) ClearNullInt64 added in v0.9.0

func (u *FieldTypeUpsert) ClearNullInt64() *FieldTypeUpsert

ClearNullInt64 clears the value of the "null_int64" field.

func (u *FieldTypeUpsert) ClearNullLink() *FieldTypeUpsert

ClearNullLink clears the value of the "null_link" field.

func (*FieldTypeUpsert) ClearNullStr added in v0.9.0

func (u *FieldTypeUpsert) ClearNullStr() *FieldTypeUpsert

ClearNullStr clears the value of the "null_str" field.

func (*FieldTypeUpsert) ClearOptionalFloat added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalFloat() *FieldTypeUpsert

ClearOptionalFloat clears the value of the "optional_float" field.

func (*FieldTypeUpsert) ClearOptionalFloat32 added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalFloat32() *FieldTypeUpsert

ClearOptionalFloat32 clears the value of the "optional_float32" field.

func (*FieldTypeUpsert) ClearOptionalInt added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalInt() *FieldTypeUpsert

ClearOptionalInt clears the value of the "optional_int" field.

func (*FieldTypeUpsert) ClearOptionalInt16 added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalInt16() *FieldTypeUpsert

ClearOptionalInt16 clears the value of the "optional_int16" field.

func (*FieldTypeUpsert) ClearOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalInt32() *FieldTypeUpsert

ClearOptionalInt32 clears the value of the "optional_int32" field.

func (*FieldTypeUpsert) ClearOptionalInt64 added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalInt64() *FieldTypeUpsert

ClearOptionalInt64 clears the value of the "optional_int64" field.

func (*FieldTypeUpsert) ClearOptionalInt8 added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalInt8() *FieldTypeUpsert

ClearOptionalInt8 clears the value of the "optional_int8" field.

func (*FieldTypeUpsert) ClearOptionalUUID added in v0.10.0

func (u *FieldTypeUpsert) ClearOptionalUUID() *FieldTypeUpsert

ClearOptionalUUID clears the value of the "optional_uuid" field.

func (*FieldTypeUpsert) ClearOptionalUint added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalUint() *FieldTypeUpsert

ClearOptionalUint clears the value of the "optional_uint" field.

func (*FieldTypeUpsert) ClearOptionalUint16 added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalUint16() *FieldTypeUpsert

ClearOptionalUint16 clears the value of the "optional_uint16" field.

func (*FieldTypeUpsert) ClearOptionalUint32 added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalUint32() *FieldTypeUpsert

ClearOptionalUint32 clears the value of the "optional_uint32" field.

func (*FieldTypeUpsert) ClearOptionalUint64 added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalUint64() *FieldTypeUpsert

ClearOptionalUint64 clears the value of the "optional_uint64" field.

func (*FieldTypeUpsert) ClearOptionalUint8 added in v0.9.0

func (u *FieldTypeUpsert) ClearOptionalUint8() *FieldTypeUpsert

ClearOptionalUint8 clears the value of the "optional_uint8" field.

func (*FieldTypeUpsert) ClearPassword added in v0.9.0

func (u *FieldTypeUpsert) ClearPassword() *FieldTypeUpsert

ClearPassword clears the value of the "password" field.

func (*FieldTypeUpsert) ClearPasswordOther added in v0.9.0

func (u *FieldTypeUpsert) ClearPasswordOther() *FieldTypeUpsert

ClearPasswordOther clears the value of the "password_other" field.

func (*FieldTypeUpsert) ClearPriority added in v0.9.0

func (u *FieldTypeUpsert) ClearPriority() *FieldTypeUpsert

ClearPriority clears the value of the "priority" field.

func (*FieldTypeUpsert) ClearRawData added in v0.10.0

func (u *FieldTypeUpsert) ClearRawData() *FieldTypeUpsert

ClearRawData clears the value of the "raw_data" field.

func (*FieldTypeUpsert) ClearSchemaFloat added in v0.9.0

func (u *FieldTypeUpsert) ClearSchemaFloat() *FieldTypeUpsert

ClearSchemaFloat clears the value of the "schema_float" field.

func (*FieldTypeUpsert) ClearSchemaFloat32 added in v0.9.0

func (u *FieldTypeUpsert) ClearSchemaFloat32() *FieldTypeUpsert

ClearSchemaFloat32 clears the value of the "schema_float32" field.

func (*FieldTypeUpsert) ClearSchemaInt added in v0.9.0

func (u *FieldTypeUpsert) ClearSchemaInt() *FieldTypeUpsert

ClearSchemaInt clears the value of the "schema_int" field.

func (*FieldTypeUpsert) ClearSchemaInt64 added in v0.9.0

func (u *FieldTypeUpsert) ClearSchemaInt64() *FieldTypeUpsert

ClearSchemaInt64 clears the value of the "schema_int64" field.

func (*FieldTypeUpsert) ClearSchemaInt8 added in v0.9.0

func (u *FieldTypeUpsert) ClearSchemaInt8() *FieldTypeUpsert

ClearSchemaInt8 clears the value of the "schema_int8" field.

func (*FieldTypeUpsert) ClearSensitive added in v0.10.0

func (u *FieldTypeUpsert) ClearSensitive() *FieldTypeUpsert

ClearSensitive clears the value of the "sensitive" field.

func (*FieldTypeUpsert) ClearState added in v0.9.0

func (u *FieldTypeUpsert) ClearState() *FieldTypeUpsert

ClearState clears the value of the "state" field.

func (*FieldTypeUpsert) ClearStr added in v0.9.0

func (u *FieldTypeUpsert) ClearStr() *FieldTypeUpsert

ClearStr clears the value of the "str" field.

func (*FieldTypeUpsert) ClearStringArray added in v0.9.0

func (u *FieldTypeUpsert) ClearStringArray() *FieldTypeUpsert

ClearStringArray clears the value of the "string_array" field.

func (*FieldTypeUpsert) ClearStringScanner added in v0.9.0

func (u *FieldTypeUpsert) ClearStringScanner() *FieldTypeUpsert

ClearStringScanner clears the value of the "string_scanner" field.

func (*FieldTypeUpsert) ClearStrings added in v0.9.0

func (u *FieldTypeUpsert) ClearStrings() *FieldTypeUpsert

ClearStrings clears the value of the "strings" field.

func (*FieldTypeUpsert) ClearText added in v0.10.0

func (u *FieldTypeUpsert) ClearText() *FieldTypeUpsert

ClearText clears the value of the "text" field.

func (*FieldTypeUpsert) ClearValidateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsert) ClearValidateOptionalInt32() *FieldTypeUpsert

ClearValidateOptionalInt32 clears the value of the "validate_optional_int32" field.

func (*FieldTypeUpsert) SetActive added in v0.9.0

func (u *FieldTypeUpsert) SetActive(v schema.Status) *FieldTypeUpsert

SetActive sets the "active" field.

func (*FieldTypeUpsert) SetBigInt added in v0.9.0

func (u *FieldTypeUpsert) SetBigInt(v schema.BigInt) *FieldTypeUpsert

SetBigInt sets the "big_int" field.

func (*FieldTypeUpsert) SetDatetime added in v0.9.0

func (u *FieldTypeUpsert) SetDatetime(v time.Time) *FieldTypeUpsert

SetDatetime sets the "datetime" field.

func (*FieldTypeUpsert) SetDecimal added in v0.9.0

func (u *FieldTypeUpsert) SetDecimal(v float64) *FieldTypeUpsert

SetDecimal sets the "decimal" field.

func (*FieldTypeUpsert) SetDeleted added in v0.9.0

func (u *FieldTypeUpsert) SetDeleted(v *sql.NullBool) *FieldTypeUpsert

SetDeleted sets the "deleted" field.

func (*FieldTypeUpsert) SetDeletedAt added in v0.9.0

func (u *FieldTypeUpsert) SetDeletedAt(v *sql.NullTime) *FieldTypeUpsert

SetDeletedAt sets the "deleted_at" field.

func (*FieldTypeUpsert) SetDir added in v0.9.0

func (u *FieldTypeUpsert) SetDir(v http.Dir) *FieldTypeUpsert

SetDir sets the "dir" field.

func (*FieldTypeUpsert) SetDuration added in v0.9.0

func (u *FieldTypeUpsert) SetDuration(v time.Duration) *FieldTypeUpsert

SetDuration sets the "duration" field.

func (*FieldTypeUpsert) SetIP added in v0.9.0

func (u *FieldTypeUpsert) SetIP(v net.IP) *FieldTypeUpsert

SetIP sets the "ip" field.

func (*FieldTypeUpsert) SetInt added in v0.9.0

func (u *FieldTypeUpsert) SetInt(v int) *FieldTypeUpsert

SetInt sets the "int" field.

func (*FieldTypeUpsert) SetInt16 added in v0.9.0

func (u *FieldTypeUpsert) SetInt16(v int16) *FieldTypeUpsert

SetInt16 sets the "int16" field.

func (*FieldTypeUpsert) SetInt32 added in v0.9.0

func (u *FieldTypeUpsert) SetInt32(v int32) *FieldTypeUpsert

SetInt32 sets the "int32" field.

func (*FieldTypeUpsert) SetInt64 added in v0.9.0

func (u *FieldTypeUpsert) SetInt64(v int64) *FieldTypeUpsert

SetInt64 sets the "int64" field.

func (*FieldTypeUpsert) SetInt8 added in v0.9.0

func (u *FieldTypeUpsert) SetInt8(v int8) *FieldTypeUpsert

SetInt8 sets the "int8" field.

func (u *FieldTypeUpsert) SetLink(v schema.Link) *FieldTypeUpsert

SetLink sets the "link" field.

func (*FieldTypeUpsert) SetLinkOther added in v0.9.0

func (u *FieldTypeUpsert) SetLinkOther(v *schema.Link) *FieldTypeUpsert

SetLinkOther sets the "link_other" field.

func (*FieldTypeUpsert) SetLinkOtherFunc added in v0.10.0

func (u *FieldTypeUpsert) SetLinkOtherFunc(v *schema.Link) *FieldTypeUpsert

SetLinkOtherFunc sets the "link_other_func" field.

func (*FieldTypeUpsert) SetMAC added in v0.9.0

func (u *FieldTypeUpsert) SetMAC(v schema.MAC) *FieldTypeUpsert

SetMAC sets the "mac" field.

func (*FieldTypeUpsert) SetNdir added in v0.9.0

func (u *FieldTypeUpsert) SetNdir(v http.Dir) *FieldTypeUpsert

SetNdir sets the "ndir" field.

func (*FieldTypeUpsert) SetNilPair added in v0.9.0

func (u *FieldTypeUpsert) SetNilPair(v *schema.Pair) *FieldTypeUpsert

SetNilPair sets the "nil_pair" field.

func (*FieldTypeUpsert) SetNillableInt added in v0.9.0

func (u *FieldTypeUpsert) SetNillableInt(v int) *FieldTypeUpsert

SetNillableInt sets the "nillable_int" field.

func (*FieldTypeUpsert) SetNillableInt16 added in v0.9.0

func (u *FieldTypeUpsert) SetNillableInt16(v int16) *FieldTypeUpsert

SetNillableInt16 sets the "nillable_int16" field.

func (*FieldTypeUpsert) SetNillableInt32 added in v0.9.0

func (u *FieldTypeUpsert) SetNillableInt32(v int32) *FieldTypeUpsert

SetNillableInt32 sets the "nillable_int32" field.

func (*FieldTypeUpsert) SetNillableInt64 added in v0.9.0

func (u *FieldTypeUpsert) SetNillableInt64(v int64) *FieldTypeUpsert

SetNillableInt64 sets the "nillable_int64" field.

func (*FieldTypeUpsert) SetNillableInt8 added in v0.9.0

func (u *FieldTypeUpsert) SetNillableInt8(v int8) *FieldTypeUpsert

SetNillableInt8 sets the "nillable_int8" field.

func (*FieldTypeUpsert) SetNillableUUID added in v0.9.0

func (u *FieldTypeUpsert) SetNillableUUID(v uuid.UUID) *FieldTypeUpsert

SetNillableUUID sets the "nillable_uuid" field.

func (*FieldTypeUpsert) SetNullActive added in v0.9.0

func (u *FieldTypeUpsert) SetNullActive(v schema.Status) *FieldTypeUpsert

SetNullActive sets the "null_active" field.

func (*FieldTypeUpsert) SetNullFloat added in v0.9.0

func (u *FieldTypeUpsert) SetNullFloat(v *sql.NullFloat64) *FieldTypeUpsert

SetNullFloat sets the "null_float" field.

func (*FieldTypeUpsert) SetNullInt64 added in v0.9.0

func (u *FieldTypeUpsert) SetNullInt64(v *sql.NullInt64) *FieldTypeUpsert

SetNullInt64 sets the "null_int64" field.

func (u *FieldTypeUpsert) SetNullLink(v *schema.Link) *FieldTypeUpsert

SetNullLink sets the "null_link" field.

func (*FieldTypeUpsert) SetNullStr added in v0.9.0

func (u *FieldTypeUpsert) SetNullStr(v *sql.NullString) *FieldTypeUpsert

SetNullStr sets the "null_str" field.

func (*FieldTypeUpsert) SetOptionalFloat added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalFloat(v float64) *FieldTypeUpsert

SetOptionalFloat sets the "optional_float" field.

func (*FieldTypeUpsert) SetOptionalFloat32 added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalFloat32(v float32) *FieldTypeUpsert

SetOptionalFloat32 sets the "optional_float32" field.

func (*FieldTypeUpsert) SetOptionalInt added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalInt(v int) *FieldTypeUpsert

SetOptionalInt sets the "optional_int" field.

func (*FieldTypeUpsert) SetOptionalInt16 added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalInt16(v int16) *FieldTypeUpsert

SetOptionalInt16 sets the "optional_int16" field.

func (*FieldTypeUpsert) SetOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalInt32(v int32) *FieldTypeUpsert

SetOptionalInt32 sets the "optional_int32" field.

func (*FieldTypeUpsert) SetOptionalInt64 added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalInt64(v int64) *FieldTypeUpsert

SetOptionalInt64 sets the "optional_int64" field.

func (*FieldTypeUpsert) SetOptionalInt8 added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalInt8(v int8) *FieldTypeUpsert

SetOptionalInt8 sets the "optional_int8" field.

func (*FieldTypeUpsert) SetOptionalUUID added in v0.10.0

func (u *FieldTypeUpsert) SetOptionalUUID(v uuid.UUID) *FieldTypeUpsert

SetOptionalUUID sets the "optional_uuid" field.

func (*FieldTypeUpsert) SetOptionalUint added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalUint(v uint) *FieldTypeUpsert

SetOptionalUint sets the "optional_uint" field.

func (*FieldTypeUpsert) SetOptionalUint16 added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalUint16(v uint16) *FieldTypeUpsert

SetOptionalUint16 sets the "optional_uint16" field.

func (*FieldTypeUpsert) SetOptionalUint32 added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalUint32(v uint32) *FieldTypeUpsert

SetOptionalUint32 sets the "optional_uint32" field.

func (*FieldTypeUpsert) SetOptionalUint64 added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalUint64(v uint64) *FieldTypeUpsert

SetOptionalUint64 sets the "optional_uint64" field.

func (*FieldTypeUpsert) SetOptionalUint8 added in v0.9.0

func (u *FieldTypeUpsert) SetOptionalUint8(v uint8) *FieldTypeUpsert

SetOptionalUint8 sets the "optional_uint8" field.

func (*FieldTypeUpsert) SetPair added in v0.9.0

func (u *FieldTypeUpsert) SetPair(v schema.Pair) *FieldTypeUpsert

SetPair sets the "pair" field.

func (*FieldTypeUpsert) SetPassword added in v0.9.0

func (u *FieldTypeUpsert) SetPassword(v string) *FieldTypeUpsert

SetPassword sets the "password" field.

func (*FieldTypeUpsert) SetPasswordOther added in v0.9.0

func (u *FieldTypeUpsert) SetPasswordOther(v schema.Password) *FieldTypeUpsert

SetPasswordOther sets the "password_other" field.

func (*FieldTypeUpsert) SetPriority added in v0.9.0

func (u *FieldTypeUpsert) SetPriority(v role.Priority) *FieldTypeUpsert

SetPriority sets the "priority" field.

func (*FieldTypeUpsert) SetRawData added in v0.10.0

func (u *FieldTypeUpsert) SetRawData(v []byte) *FieldTypeUpsert

SetRawData sets the "raw_data" field.

func (*FieldTypeUpsert) SetRole added in v0.9.0

func (u *FieldTypeUpsert) SetRole(v role.Role) *FieldTypeUpsert

SetRole sets the "role" field.

func (*FieldTypeUpsert) SetSchemaFloat added in v0.9.0

func (u *FieldTypeUpsert) SetSchemaFloat(v schema.Float64) *FieldTypeUpsert

SetSchemaFloat sets the "schema_float" field.

func (*FieldTypeUpsert) SetSchemaFloat32 added in v0.9.0

func (u *FieldTypeUpsert) SetSchemaFloat32(v schema.Float32) *FieldTypeUpsert

SetSchemaFloat32 sets the "schema_float32" field.

func (*FieldTypeUpsert) SetSchemaInt added in v0.9.0

func (u *FieldTypeUpsert) SetSchemaInt(v schema.Int) *FieldTypeUpsert

SetSchemaInt sets the "schema_int" field.

func (*FieldTypeUpsert) SetSchemaInt64 added in v0.9.0

func (u *FieldTypeUpsert) SetSchemaInt64(v schema.Int64) *FieldTypeUpsert

SetSchemaInt64 sets the "schema_int64" field.

func (*FieldTypeUpsert) SetSchemaInt8 added in v0.9.0

func (u *FieldTypeUpsert) SetSchemaInt8(v schema.Int8) *FieldTypeUpsert

SetSchemaInt8 sets the "schema_int8" field.

func (*FieldTypeUpsert) SetSensitive added in v0.10.0

func (u *FieldTypeUpsert) SetSensitive(v []byte) *FieldTypeUpsert

SetSensitive sets the "sensitive" field.

func (*FieldTypeUpsert) SetState added in v0.9.0

SetState sets the "state" field.

func (*FieldTypeUpsert) SetStr added in v0.9.0

SetStr sets the "str" field.

func (*FieldTypeUpsert) SetStringArray added in v0.9.0

func (u *FieldTypeUpsert) SetStringArray(v schema.Strings) *FieldTypeUpsert

SetStringArray sets the "string_array" field.

func (*FieldTypeUpsert) SetStringScanner added in v0.9.0

func (u *FieldTypeUpsert) SetStringScanner(v schema.StringScanner) *FieldTypeUpsert

SetStringScanner sets the "string_scanner" field.

func (*FieldTypeUpsert) SetStrings added in v0.9.0

func (u *FieldTypeUpsert) SetStrings(v []string) *FieldTypeUpsert

SetStrings sets the "strings" field.

func (*FieldTypeUpsert) SetText added in v0.10.0

func (u *FieldTypeUpsert) SetText(v string) *FieldTypeUpsert

SetText sets the "text" field.

func (*FieldTypeUpsert) SetTriple added in v0.9.0

func (u *FieldTypeUpsert) SetTriple(v schema.Triple) *FieldTypeUpsert

SetTriple sets the "triple" field.

func (*FieldTypeUpsert) SetValidateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsert) SetValidateOptionalInt32(v int32) *FieldTypeUpsert

SetValidateOptionalInt32 sets the "validate_optional_int32" field.

func (*FieldTypeUpsert) SetVstring added in v0.9.0

func (u *FieldTypeUpsert) SetVstring(v schema.VString) *FieldTypeUpsert

SetVstring sets the "vstring" field.

func (*FieldTypeUpsert) UpdateActive added in v0.9.0

func (u *FieldTypeUpsert) UpdateActive() *FieldTypeUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateBigInt added in v0.9.0

func (u *FieldTypeUpsert) UpdateBigInt() *FieldTypeUpsert

UpdateBigInt sets the "big_int" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateDatetime added in v0.9.0

func (u *FieldTypeUpsert) UpdateDatetime() *FieldTypeUpsert

UpdateDatetime sets the "datetime" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateDecimal added in v0.9.0

func (u *FieldTypeUpsert) UpdateDecimal() *FieldTypeUpsert

UpdateDecimal sets the "decimal" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateDeleted added in v0.9.0

func (u *FieldTypeUpsert) UpdateDeleted() *FieldTypeUpsert

UpdateDeleted sets the "deleted" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateDeletedAt added in v0.9.0

func (u *FieldTypeUpsert) UpdateDeletedAt() *FieldTypeUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateDir added in v0.9.0

func (u *FieldTypeUpsert) UpdateDir() *FieldTypeUpsert

UpdateDir sets the "dir" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateDuration added in v0.9.0

func (u *FieldTypeUpsert) UpdateDuration() *FieldTypeUpsert

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateIP added in v0.9.0

func (u *FieldTypeUpsert) UpdateIP() *FieldTypeUpsert

UpdateIP sets the "ip" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateInt added in v0.9.0

func (u *FieldTypeUpsert) UpdateInt() *FieldTypeUpsert

UpdateInt sets the "int" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateInt16 added in v0.9.0

func (u *FieldTypeUpsert) UpdateInt16() *FieldTypeUpsert

UpdateInt16 sets the "int16" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateInt32 added in v0.9.0

func (u *FieldTypeUpsert) UpdateInt32() *FieldTypeUpsert

UpdateInt32 sets the "int32" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateInt64 added in v0.9.0

func (u *FieldTypeUpsert) UpdateInt64() *FieldTypeUpsert

UpdateInt64 sets the "int64" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateInt8 added in v0.9.0

func (u *FieldTypeUpsert) UpdateInt8() *FieldTypeUpsert

UpdateInt8 sets the "int8" field to the value that was provided on create.

func (u *FieldTypeUpsert) UpdateLink() *FieldTypeUpsert

UpdateLink sets the "link" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateLinkOther added in v0.9.0

func (u *FieldTypeUpsert) UpdateLinkOther() *FieldTypeUpsert

UpdateLinkOther sets the "link_other" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateLinkOtherFunc added in v0.10.0

func (u *FieldTypeUpsert) UpdateLinkOtherFunc() *FieldTypeUpsert

UpdateLinkOtherFunc sets the "link_other_func" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateMAC added in v0.9.0

func (u *FieldTypeUpsert) UpdateMAC() *FieldTypeUpsert

UpdateMAC sets the "mac" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNdir added in v0.9.0

func (u *FieldTypeUpsert) UpdateNdir() *FieldTypeUpsert

UpdateNdir sets the "ndir" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNilPair added in v0.9.0

func (u *FieldTypeUpsert) UpdateNilPair() *FieldTypeUpsert

UpdateNilPair sets the "nil_pair" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNillableInt added in v0.9.0

func (u *FieldTypeUpsert) UpdateNillableInt() *FieldTypeUpsert

UpdateNillableInt sets the "nillable_int" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNillableInt16 added in v0.9.0

func (u *FieldTypeUpsert) UpdateNillableInt16() *FieldTypeUpsert

UpdateNillableInt16 sets the "nillable_int16" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNillableInt32 added in v0.9.0

func (u *FieldTypeUpsert) UpdateNillableInt32() *FieldTypeUpsert

UpdateNillableInt32 sets the "nillable_int32" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNillableInt64 added in v0.9.0

func (u *FieldTypeUpsert) UpdateNillableInt64() *FieldTypeUpsert

UpdateNillableInt64 sets the "nillable_int64" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNillableInt8 added in v0.9.0

func (u *FieldTypeUpsert) UpdateNillableInt8() *FieldTypeUpsert

UpdateNillableInt8 sets the "nillable_int8" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNillableUUID added in v0.9.0

func (u *FieldTypeUpsert) UpdateNillableUUID() *FieldTypeUpsert

UpdateNillableUUID sets the "nillable_uuid" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNullActive added in v0.9.0

func (u *FieldTypeUpsert) UpdateNullActive() *FieldTypeUpsert

UpdateNullActive sets the "null_active" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNullFloat added in v0.9.0

func (u *FieldTypeUpsert) UpdateNullFloat() *FieldTypeUpsert

UpdateNullFloat sets the "null_float" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNullInt64 added in v0.9.0

func (u *FieldTypeUpsert) UpdateNullInt64() *FieldTypeUpsert

UpdateNullInt64 sets the "null_int64" field to the value that was provided on create.

func (u *FieldTypeUpsert) UpdateNullLink() *FieldTypeUpsert

UpdateNullLink sets the "null_link" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateNullStr added in v0.9.0

func (u *FieldTypeUpsert) UpdateNullStr() *FieldTypeUpsert

UpdateNullStr sets the "null_str" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalFloat added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalFloat() *FieldTypeUpsert

UpdateOptionalFloat sets the "optional_float" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalFloat32 added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalFloat32() *FieldTypeUpsert

UpdateOptionalFloat32 sets the "optional_float32" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalInt added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalInt() *FieldTypeUpsert

UpdateOptionalInt sets the "optional_int" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalInt16 added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalInt16() *FieldTypeUpsert

UpdateOptionalInt16 sets the "optional_int16" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalInt32() *FieldTypeUpsert

UpdateOptionalInt32 sets the "optional_int32" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalInt64 added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalInt64() *FieldTypeUpsert

UpdateOptionalInt64 sets the "optional_int64" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalInt8 added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalInt8() *FieldTypeUpsert

UpdateOptionalInt8 sets the "optional_int8" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalUUID added in v0.10.0

func (u *FieldTypeUpsert) UpdateOptionalUUID() *FieldTypeUpsert

UpdateOptionalUUID sets the "optional_uuid" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalUint added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalUint() *FieldTypeUpsert

UpdateOptionalUint sets the "optional_uint" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalUint16 added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalUint16() *FieldTypeUpsert

UpdateOptionalUint16 sets the "optional_uint16" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalUint32 added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalUint32() *FieldTypeUpsert

UpdateOptionalUint32 sets the "optional_uint32" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalUint64 added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalUint64() *FieldTypeUpsert

UpdateOptionalUint64 sets the "optional_uint64" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateOptionalUint8 added in v0.9.0

func (u *FieldTypeUpsert) UpdateOptionalUint8() *FieldTypeUpsert

UpdateOptionalUint8 sets the "optional_uint8" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdatePair added in v0.9.0

func (u *FieldTypeUpsert) UpdatePair() *FieldTypeUpsert

UpdatePair sets the "pair" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdatePassword added in v0.9.0

func (u *FieldTypeUpsert) UpdatePassword() *FieldTypeUpsert

UpdatePassword sets the "password" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdatePasswordOther added in v0.9.0

func (u *FieldTypeUpsert) UpdatePasswordOther() *FieldTypeUpsert

UpdatePasswordOther sets the "password_other" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdatePriority added in v0.9.0

func (u *FieldTypeUpsert) UpdatePriority() *FieldTypeUpsert

UpdatePriority sets the "priority" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateRawData added in v0.10.0

func (u *FieldTypeUpsert) UpdateRawData() *FieldTypeUpsert

UpdateRawData sets the "raw_data" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateRole added in v0.9.0

func (u *FieldTypeUpsert) UpdateRole() *FieldTypeUpsert

UpdateRole sets the "role" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateSchemaFloat added in v0.9.0

func (u *FieldTypeUpsert) UpdateSchemaFloat() *FieldTypeUpsert

UpdateSchemaFloat sets the "schema_float" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateSchemaFloat32 added in v0.9.0

func (u *FieldTypeUpsert) UpdateSchemaFloat32() *FieldTypeUpsert

UpdateSchemaFloat32 sets the "schema_float32" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateSchemaInt added in v0.9.0

func (u *FieldTypeUpsert) UpdateSchemaInt() *FieldTypeUpsert

UpdateSchemaInt sets the "schema_int" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateSchemaInt64 added in v0.9.0

func (u *FieldTypeUpsert) UpdateSchemaInt64() *FieldTypeUpsert

UpdateSchemaInt64 sets the "schema_int64" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateSchemaInt8 added in v0.9.0

func (u *FieldTypeUpsert) UpdateSchemaInt8() *FieldTypeUpsert

UpdateSchemaInt8 sets the "schema_int8" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateSensitive added in v0.10.0

func (u *FieldTypeUpsert) UpdateSensitive() *FieldTypeUpsert

UpdateSensitive sets the "sensitive" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateState added in v0.9.0

func (u *FieldTypeUpsert) UpdateState() *FieldTypeUpsert

UpdateState sets the "state" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateStr added in v0.9.0

func (u *FieldTypeUpsert) UpdateStr() *FieldTypeUpsert

UpdateStr sets the "str" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateStringArray added in v0.9.0

func (u *FieldTypeUpsert) UpdateStringArray() *FieldTypeUpsert

UpdateStringArray sets the "string_array" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateStringScanner added in v0.9.0

func (u *FieldTypeUpsert) UpdateStringScanner() *FieldTypeUpsert

UpdateStringScanner sets the "string_scanner" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateStrings added in v0.9.0

func (u *FieldTypeUpsert) UpdateStrings() *FieldTypeUpsert

UpdateStrings sets the "strings" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateText added in v0.10.0

func (u *FieldTypeUpsert) UpdateText() *FieldTypeUpsert

UpdateText sets the "text" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateTriple added in v0.9.0

func (u *FieldTypeUpsert) UpdateTriple() *FieldTypeUpsert

UpdateTriple sets the "triple" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateValidateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsert) UpdateValidateOptionalInt32() *FieldTypeUpsert

UpdateValidateOptionalInt32 sets the "validate_optional_int32" field to the value that was provided on create.

func (*FieldTypeUpsert) UpdateVstring added in v0.9.0

func (u *FieldTypeUpsert) UpdateVstring() *FieldTypeUpsert

UpdateVstring sets the "vstring" field to the value that was provided on create.

type FieldTypeUpsertBulk added in v0.9.0

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

FieldTypeUpsertBulk is the builder for "upsert"-ing a bulk of FieldType nodes.

func (*FieldTypeUpsertBulk) AddBigInt added in v0.10.0

AddBigInt adds v to the "big_int" field.

func (*FieldTypeUpsertBulk) AddDecimal added in v0.10.0

AddDecimal adds v to the "decimal" field.

func (*FieldTypeUpsertBulk) AddDuration added in v0.10.0

AddDuration adds v to the "duration" field.

func (*FieldTypeUpsertBulk) AddInt added in v0.10.0

AddInt adds v to the "int" field.

func (*FieldTypeUpsertBulk) AddInt16 added in v0.10.0

AddInt16 adds v to the "int16" field.

func (*FieldTypeUpsertBulk) AddInt32 added in v0.10.0

AddInt32 adds v to the "int32" field.

func (*FieldTypeUpsertBulk) AddInt64 added in v0.10.0

AddInt64 adds v to the "int64" field.

func (*FieldTypeUpsertBulk) AddInt8 added in v0.10.0

AddInt8 adds v to the "int8" field.

func (*FieldTypeUpsertBulk) AddNillableInt added in v0.10.0

func (u *FieldTypeUpsertBulk) AddNillableInt(v int) *FieldTypeUpsertBulk

AddNillableInt adds v to the "nillable_int" field.

func (*FieldTypeUpsertBulk) AddNillableInt16 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddNillableInt16(v int16) *FieldTypeUpsertBulk

AddNillableInt16 adds v to the "nillable_int16" field.

func (*FieldTypeUpsertBulk) AddNillableInt32 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddNillableInt32(v int32) *FieldTypeUpsertBulk

AddNillableInt32 adds v to the "nillable_int32" field.

func (*FieldTypeUpsertBulk) AddNillableInt64 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddNillableInt64(v int64) *FieldTypeUpsertBulk

AddNillableInt64 adds v to the "nillable_int64" field.

func (*FieldTypeUpsertBulk) AddNillableInt8 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddNillableInt8(v int8) *FieldTypeUpsertBulk

AddNillableInt8 adds v to the "nillable_int8" field.

func (*FieldTypeUpsertBulk) AddOptionalFloat added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalFloat(v float64) *FieldTypeUpsertBulk

AddOptionalFloat adds v to the "optional_float" field.

func (*FieldTypeUpsertBulk) AddOptionalFloat32 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalFloat32(v float32) *FieldTypeUpsertBulk

AddOptionalFloat32 adds v to the "optional_float32" field.

func (*FieldTypeUpsertBulk) AddOptionalInt added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalInt(v int) *FieldTypeUpsertBulk

AddOptionalInt adds v to the "optional_int" field.

func (*FieldTypeUpsertBulk) AddOptionalInt16 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalInt16(v int16) *FieldTypeUpsertBulk

AddOptionalInt16 adds v to the "optional_int16" field.

func (*FieldTypeUpsertBulk) AddOptionalInt32 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalInt32(v int32) *FieldTypeUpsertBulk

AddOptionalInt32 adds v to the "optional_int32" field.

func (*FieldTypeUpsertBulk) AddOptionalInt64 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalInt64(v int64) *FieldTypeUpsertBulk

AddOptionalInt64 adds v to the "optional_int64" field.

func (*FieldTypeUpsertBulk) AddOptionalInt8 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalInt8(v int8) *FieldTypeUpsertBulk

AddOptionalInt8 adds v to the "optional_int8" field.

func (*FieldTypeUpsertBulk) AddOptionalUint added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalUint(v uint) *FieldTypeUpsertBulk

AddOptionalUint adds v to the "optional_uint" field.

func (*FieldTypeUpsertBulk) AddOptionalUint16 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalUint16(v uint16) *FieldTypeUpsertBulk

AddOptionalUint16 adds v to the "optional_uint16" field.

func (*FieldTypeUpsertBulk) AddOptionalUint32 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalUint32(v uint32) *FieldTypeUpsertBulk

AddOptionalUint32 adds v to the "optional_uint32" field.

func (*FieldTypeUpsertBulk) AddOptionalUint64 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalUint64(v uint64) *FieldTypeUpsertBulk

AddOptionalUint64 adds v to the "optional_uint64" field.

func (*FieldTypeUpsertBulk) AddOptionalUint8 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddOptionalUint8(v uint8) *FieldTypeUpsertBulk

AddOptionalUint8 adds v to the "optional_uint8" field.

func (*FieldTypeUpsertBulk) AddSchemaFloat added in v0.10.0

func (u *FieldTypeUpsertBulk) AddSchemaFloat(v schema.Float64) *FieldTypeUpsertBulk

AddSchemaFloat adds v to the "schema_float" field.

func (*FieldTypeUpsertBulk) AddSchemaFloat32 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddSchemaFloat32(v schema.Float32) *FieldTypeUpsertBulk

AddSchemaFloat32 adds v to the "schema_float32" field.

func (*FieldTypeUpsertBulk) AddSchemaInt added in v0.10.0

func (u *FieldTypeUpsertBulk) AddSchemaInt(v schema.Int) *FieldTypeUpsertBulk

AddSchemaInt adds v to the "schema_int" field.

func (*FieldTypeUpsertBulk) AddSchemaInt64 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddSchemaInt64(v schema.Int64) *FieldTypeUpsertBulk

AddSchemaInt64 adds v to the "schema_int64" field.

func (*FieldTypeUpsertBulk) AddSchemaInt8 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddSchemaInt8(v schema.Int8) *FieldTypeUpsertBulk

AddSchemaInt8 adds v to the "schema_int8" field.

func (*FieldTypeUpsertBulk) AddValidateOptionalInt32 added in v0.10.0

func (u *FieldTypeUpsertBulk) AddValidateOptionalInt32(v int32) *FieldTypeUpsertBulk

AddValidateOptionalInt32 adds v to the "validate_optional_int32" field.

func (*FieldTypeUpsertBulk) ClearActive added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearActive() *FieldTypeUpsertBulk

ClearActive clears the value of the "active" field.

func (*FieldTypeUpsertBulk) ClearBigInt added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearBigInt() *FieldTypeUpsertBulk

ClearBigInt clears the value of the "big_int" field.

func (*FieldTypeUpsertBulk) ClearDatetime added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearDatetime() *FieldTypeUpsertBulk

ClearDatetime clears the value of the "datetime" field.

func (*FieldTypeUpsertBulk) ClearDecimal added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearDecimal() *FieldTypeUpsertBulk

ClearDecimal clears the value of the "decimal" field.

func (*FieldTypeUpsertBulk) ClearDeleted added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearDeleted() *FieldTypeUpsertBulk

ClearDeleted clears the value of the "deleted" field.

func (*FieldTypeUpsertBulk) ClearDeletedAt added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearDeletedAt() *FieldTypeUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FieldTypeUpsertBulk) ClearDuration added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearDuration() *FieldTypeUpsertBulk

ClearDuration clears the value of the "duration" field.

func (*FieldTypeUpsertBulk) ClearIP added in v0.9.0

ClearIP clears the value of the "ip" field.

func (u *FieldTypeUpsertBulk) ClearLink() *FieldTypeUpsertBulk

ClearLink clears the value of the "link" field.

func (*FieldTypeUpsertBulk) ClearLinkOther added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearLinkOther() *FieldTypeUpsertBulk

ClearLinkOther clears the value of the "link_other" field.

func (*FieldTypeUpsertBulk) ClearLinkOtherFunc added in v0.10.0

func (u *FieldTypeUpsertBulk) ClearLinkOtherFunc() *FieldTypeUpsertBulk

ClearLinkOtherFunc clears the value of the "link_other_func" field.

func (*FieldTypeUpsertBulk) ClearMAC added in v0.9.0

ClearMAC clears the value of the "mac" field.

func (*FieldTypeUpsertBulk) ClearNdir added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNdir() *FieldTypeUpsertBulk

ClearNdir clears the value of the "ndir" field.

func (*FieldTypeUpsertBulk) ClearNilPair added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNilPair() *FieldTypeUpsertBulk

ClearNilPair clears the value of the "nil_pair" field.

func (*FieldTypeUpsertBulk) ClearNillableInt added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNillableInt() *FieldTypeUpsertBulk

ClearNillableInt clears the value of the "nillable_int" field.

func (*FieldTypeUpsertBulk) ClearNillableInt16 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNillableInt16() *FieldTypeUpsertBulk

ClearNillableInt16 clears the value of the "nillable_int16" field.

func (*FieldTypeUpsertBulk) ClearNillableInt32 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNillableInt32() *FieldTypeUpsertBulk

ClearNillableInt32 clears the value of the "nillable_int32" field.

func (*FieldTypeUpsertBulk) ClearNillableInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNillableInt64() *FieldTypeUpsertBulk

ClearNillableInt64 clears the value of the "nillable_int64" field.

func (*FieldTypeUpsertBulk) ClearNillableInt8 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNillableInt8() *FieldTypeUpsertBulk

ClearNillableInt8 clears the value of the "nillable_int8" field.

func (*FieldTypeUpsertBulk) ClearNillableUUID added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNillableUUID() *FieldTypeUpsertBulk

ClearNillableUUID clears the value of the "nillable_uuid" field.

func (*FieldTypeUpsertBulk) ClearNullActive added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNullActive() *FieldTypeUpsertBulk

ClearNullActive clears the value of the "null_active" field.

func (*FieldTypeUpsertBulk) ClearNullFloat added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNullFloat() *FieldTypeUpsertBulk

ClearNullFloat clears the value of the "null_float" field.

func (*FieldTypeUpsertBulk) ClearNullInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNullInt64() *FieldTypeUpsertBulk

ClearNullInt64 clears the value of the "null_int64" field.

func (u *FieldTypeUpsertBulk) ClearNullLink() *FieldTypeUpsertBulk

ClearNullLink clears the value of the "null_link" field.

func (*FieldTypeUpsertBulk) ClearNullStr added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearNullStr() *FieldTypeUpsertBulk

ClearNullStr clears the value of the "null_str" field.

func (*FieldTypeUpsertBulk) ClearOptionalFloat added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalFloat() *FieldTypeUpsertBulk

ClearOptionalFloat clears the value of the "optional_float" field.

func (*FieldTypeUpsertBulk) ClearOptionalFloat32 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalFloat32() *FieldTypeUpsertBulk

ClearOptionalFloat32 clears the value of the "optional_float32" field.

func (*FieldTypeUpsertBulk) ClearOptionalInt added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalInt() *FieldTypeUpsertBulk

ClearOptionalInt clears the value of the "optional_int" field.

func (*FieldTypeUpsertBulk) ClearOptionalInt16 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalInt16() *FieldTypeUpsertBulk

ClearOptionalInt16 clears the value of the "optional_int16" field.

func (*FieldTypeUpsertBulk) ClearOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalInt32() *FieldTypeUpsertBulk

ClearOptionalInt32 clears the value of the "optional_int32" field.

func (*FieldTypeUpsertBulk) ClearOptionalInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalInt64() *FieldTypeUpsertBulk

ClearOptionalInt64 clears the value of the "optional_int64" field.

func (*FieldTypeUpsertBulk) ClearOptionalInt8 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalInt8() *FieldTypeUpsertBulk

ClearOptionalInt8 clears the value of the "optional_int8" field.

func (*FieldTypeUpsertBulk) ClearOptionalUUID added in v0.10.0

func (u *FieldTypeUpsertBulk) ClearOptionalUUID() *FieldTypeUpsertBulk

ClearOptionalUUID clears the value of the "optional_uuid" field.

func (*FieldTypeUpsertBulk) ClearOptionalUint added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalUint() *FieldTypeUpsertBulk

ClearOptionalUint clears the value of the "optional_uint" field.

func (*FieldTypeUpsertBulk) ClearOptionalUint16 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalUint16() *FieldTypeUpsertBulk

ClearOptionalUint16 clears the value of the "optional_uint16" field.

func (*FieldTypeUpsertBulk) ClearOptionalUint32 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalUint32() *FieldTypeUpsertBulk

ClearOptionalUint32 clears the value of the "optional_uint32" field.

func (*FieldTypeUpsertBulk) ClearOptionalUint64 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalUint64() *FieldTypeUpsertBulk

ClearOptionalUint64 clears the value of the "optional_uint64" field.

func (*FieldTypeUpsertBulk) ClearOptionalUint8 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearOptionalUint8() *FieldTypeUpsertBulk

ClearOptionalUint8 clears the value of the "optional_uint8" field.

func (*FieldTypeUpsertBulk) ClearPassword added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearPassword() *FieldTypeUpsertBulk

ClearPassword clears the value of the "password" field.

func (*FieldTypeUpsertBulk) ClearPasswordOther added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearPasswordOther() *FieldTypeUpsertBulk

ClearPasswordOther clears the value of the "password_other" field.

func (*FieldTypeUpsertBulk) ClearPriority added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearPriority() *FieldTypeUpsertBulk

ClearPriority clears the value of the "priority" field.

func (*FieldTypeUpsertBulk) ClearRawData added in v0.10.0

func (u *FieldTypeUpsertBulk) ClearRawData() *FieldTypeUpsertBulk

ClearRawData clears the value of the "raw_data" field.

func (*FieldTypeUpsertBulk) ClearSchemaFloat added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearSchemaFloat() *FieldTypeUpsertBulk

ClearSchemaFloat clears the value of the "schema_float" field.

func (*FieldTypeUpsertBulk) ClearSchemaFloat32 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearSchemaFloat32() *FieldTypeUpsertBulk

ClearSchemaFloat32 clears the value of the "schema_float32" field.

func (*FieldTypeUpsertBulk) ClearSchemaInt added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearSchemaInt() *FieldTypeUpsertBulk

ClearSchemaInt clears the value of the "schema_int" field.

func (*FieldTypeUpsertBulk) ClearSchemaInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearSchemaInt64() *FieldTypeUpsertBulk

ClearSchemaInt64 clears the value of the "schema_int64" field.

func (*FieldTypeUpsertBulk) ClearSchemaInt8 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearSchemaInt8() *FieldTypeUpsertBulk

ClearSchemaInt8 clears the value of the "schema_int8" field.

func (*FieldTypeUpsertBulk) ClearSensitive added in v0.10.0

func (u *FieldTypeUpsertBulk) ClearSensitive() *FieldTypeUpsertBulk

ClearSensitive clears the value of the "sensitive" field.

func (*FieldTypeUpsertBulk) ClearState added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearState() *FieldTypeUpsertBulk

ClearState clears the value of the "state" field.

func (*FieldTypeUpsertBulk) ClearStr added in v0.9.0

ClearStr clears the value of the "str" field.

func (*FieldTypeUpsertBulk) ClearStringArray added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearStringArray() *FieldTypeUpsertBulk

ClearStringArray clears the value of the "string_array" field.

func (*FieldTypeUpsertBulk) ClearStringScanner added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearStringScanner() *FieldTypeUpsertBulk

ClearStringScanner clears the value of the "string_scanner" field.

func (*FieldTypeUpsertBulk) ClearStrings added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearStrings() *FieldTypeUpsertBulk

ClearStrings clears the value of the "strings" field.

func (*FieldTypeUpsertBulk) ClearText added in v0.10.0

func (u *FieldTypeUpsertBulk) ClearText() *FieldTypeUpsertBulk

ClearText clears the value of the "text" field.

func (*FieldTypeUpsertBulk) ClearValidateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertBulk) ClearValidateOptionalInt32() *FieldTypeUpsertBulk

ClearValidateOptionalInt32 clears the value of the "validate_optional_int32" field.

func (*FieldTypeUpsertBulk) DoNothing added in v0.9.0

func (u *FieldTypeUpsertBulk) DoNothing() *FieldTypeUpsertBulk

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

func (*FieldTypeUpsertBulk) Exec added in v0.9.0

Exec executes the query.

func (*FieldTypeUpsertBulk) ExecX added in v0.9.0

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

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

func (*FieldTypeUpsertBulk) Ignore added in v0.9.0

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

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

func (*FieldTypeUpsertBulk) SetActive added in v0.9.0

SetActive sets the "active" field.

func (*FieldTypeUpsertBulk) SetBigInt added in v0.9.0

SetBigInt sets the "big_int" field.

func (*FieldTypeUpsertBulk) SetDatetime added in v0.9.0

func (u *FieldTypeUpsertBulk) SetDatetime(v time.Time) *FieldTypeUpsertBulk

SetDatetime sets the "datetime" field.

func (*FieldTypeUpsertBulk) SetDecimal added in v0.9.0

SetDecimal sets the "decimal" field.

func (*FieldTypeUpsertBulk) SetDeleted added in v0.9.0

SetDeleted sets the "deleted" field.

func (*FieldTypeUpsertBulk) SetDeletedAt added in v0.9.0

func (u *FieldTypeUpsertBulk) SetDeletedAt(v *sql.NullTime) *FieldTypeUpsertBulk

SetDeletedAt sets the "deleted_at" field.

func (*FieldTypeUpsertBulk) SetDir added in v0.9.0

SetDir sets the "dir" field.

func (*FieldTypeUpsertBulk) SetDuration added in v0.9.0

SetDuration sets the "duration" field.

func (*FieldTypeUpsertBulk) SetIP added in v0.9.0

SetIP sets the "ip" field.

func (*FieldTypeUpsertBulk) SetInt added in v0.9.0

SetInt sets the "int" field.

func (*FieldTypeUpsertBulk) SetInt16 added in v0.9.0

SetInt16 sets the "int16" field.

func (*FieldTypeUpsertBulk) SetInt32 added in v0.9.0

SetInt32 sets the "int32" field.

func (*FieldTypeUpsertBulk) SetInt64 added in v0.9.0

SetInt64 sets the "int64" field.

func (*FieldTypeUpsertBulk) SetInt8 added in v0.9.0

SetInt8 sets the "int8" field.

SetLink sets the "link" field.

func (*FieldTypeUpsertBulk) SetLinkOther added in v0.9.0

func (u *FieldTypeUpsertBulk) SetLinkOther(v *schema.Link) *FieldTypeUpsertBulk

SetLinkOther sets the "link_other" field.

func (*FieldTypeUpsertBulk) SetLinkOtherFunc added in v0.10.0

func (u *FieldTypeUpsertBulk) SetLinkOtherFunc(v *schema.Link) *FieldTypeUpsertBulk

SetLinkOtherFunc sets the "link_other_func" field.

func (*FieldTypeUpsertBulk) SetMAC added in v0.9.0

SetMAC sets the "mac" field.

func (*FieldTypeUpsertBulk) SetNdir added in v0.9.0

SetNdir sets the "ndir" field.

func (*FieldTypeUpsertBulk) SetNilPair added in v0.9.0

SetNilPair sets the "nil_pair" field.

func (*FieldTypeUpsertBulk) SetNillableInt added in v0.9.0

func (u *FieldTypeUpsertBulk) SetNillableInt(v int) *FieldTypeUpsertBulk

SetNillableInt sets the "nillable_int" field.

func (*FieldTypeUpsertBulk) SetNillableInt16 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetNillableInt16(v int16) *FieldTypeUpsertBulk

SetNillableInt16 sets the "nillable_int16" field.

func (*FieldTypeUpsertBulk) SetNillableInt32 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetNillableInt32(v int32) *FieldTypeUpsertBulk

SetNillableInt32 sets the "nillable_int32" field.

func (*FieldTypeUpsertBulk) SetNillableInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetNillableInt64(v int64) *FieldTypeUpsertBulk

SetNillableInt64 sets the "nillable_int64" field.

func (*FieldTypeUpsertBulk) SetNillableInt8 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetNillableInt8(v int8) *FieldTypeUpsertBulk

SetNillableInt8 sets the "nillable_int8" field.

func (*FieldTypeUpsertBulk) SetNillableUUID added in v0.9.0

func (u *FieldTypeUpsertBulk) SetNillableUUID(v uuid.UUID) *FieldTypeUpsertBulk

SetNillableUUID sets the "nillable_uuid" field.

func (*FieldTypeUpsertBulk) SetNullActive added in v0.9.0

SetNullActive sets the "null_active" field.

func (*FieldTypeUpsertBulk) SetNullFloat added in v0.9.0

SetNullFloat sets the "null_float" field.

func (*FieldTypeUpsertBulk) SetNullInt64 added in v0.9.0

SetNullInt64 sets the "null_int64" field.

func (u *FieldTypeUpsertBulk) SetNullLink(v *schema.Link) *FieldTypeUpsertBulk

SetNullLink sets the "null_link" field.

func (*FieldTypeUpsertBulk) SetNullStr added in v0.9.0

SetNullStr sets the "null_str" field.

func (*FieldTypeUpsertBulk) SetOptionalFloat added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalFloat(v float64) *FieldTypeUpsertBulk

SetOptionalFloat sets the "optional_float" field.

func (*FieldTypeUpsertBulk) SetOptionalFloat32 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalFloat32(v float32) *FieldTypeUpsertBulk

SetOptionalFloat32 sets the "optional_float32" field.

func (*FieldTypeUpsertBulk) SetOptionalInt added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalInt(v int) *FieldTypeUpsertBulk

SetOptionalInt sets the "optional_int" field.

func (*FieldTypeUpsertBulk) SetOptionalInt16 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalInt16(v int16) *FieldTypeUpsertBulk

SetOptionalInt16 sets the "optional_int16" field.

func (*FieldTypeUpsertBulk) SetOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalInt32(v int32) *FieldTypeUpsertBulk

SetOptionalInt32 sets the "optional_int32" field.

func (*FieldTypeUpsertBulk) SetOptionalInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalInt64(v int64) *FieldTypeUpsertBulk

SetOptionalInt64 sets the "optional_int64" field.

func (*FieldTypeUpsertBulk) SetOptionalInt8 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalInt8(v int8) *FieldTypeUpsertBulk

SetOptionalInt8 sets the "optional_int8" field.

func (*FieldTypeUpsertBulk) SetOptionalUUID added in v0.10.0

func (u *FieldTypeUpsertBulk) SetOptionalUUID(v uuid.UUID) *FieldTypeUpsertBulk

SetOptionalUUID sets the "optional_uuid" field.

func (*FieldTypeUpsertBulk) SetOptionalUint added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalUint(v uint) *FieldTypeUpsertBulk

SetOptionalUint sets the "optional_uint" field.

func (*FieldTypeUpsertBulk) SetOptionalUint16 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalUint16(v uint16) *FieldTypeUpsertBulk

SetOptionalUint16 sets the "optional_uint16" field.

func (*FieldTypeUpsertBulk) SetOptionalUint32 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalUint32(v uint32) *FieldTypeUpsertBulk

SetOptionalUint32 sets the "optional_uint32" field.

func (*FieldTypeUpsertBulk) SetOptionalUint64 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalUint64(v uint64) *FieldTypeUpsertBulk

SetOptionalUint64 sets the "optional_uint64" field.

func (*FieldTypeUpsertBulk) SetOptionalUint8 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetOptionalUint8(v uint8) *FieldTypeUpsertBulk

SetOptionalUint8 sets the "optional_uint8" field.

func (*FieldTypeUpsertBulk) SetPair added in v0.9.0

SetPair sets the "pair" field.

func (*FieldTypeUpsertBulk) SetPassword added in v0.9.0

func (u *FieldTypeUpsertBulk) SetPassword(v string) *FieldTypeUpsertBulk

SetPassword sets the "password" field.

func (*FieldTypeUpsertBulk) SetPasswordOther added in v0.9.0

func (u *FieldTypeUpsertBulk) SetPasswordOther(v schema.Password) *FieldTypeUpsertBulk

SetPasswordOther sets the "password_other" field.

func (*FieldTypeUpsertBulk) SetPriority added in v0.9.0

SetPriority sets the "priority" field.

func (*FieldTypeUpsertBulk) SetRawData added in v0.10.0

func (u *FieldTypeUpsertBulk) SetRawData(v []byte) *FieldTypeUpsertBulk

SetRawData sets the "raw_data" field.

func (*FieldTypeUpsertBulk) SetRole added in v0.9.0

SetRole sets the "role" field.

func (*FieldTypeUpsertBulk) SetSchemaFloat added in v0.9.0

func (u *FieldTypeUpsertBulk) SetSchemaFloat(v schema.Float64) *FieldTypeUpsertBulk

SetSchemaFloat sets the "schema_float" field.

func (*FieldTypeUpsertBulk) SetSchemaFloat32 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetSchemaFloat32(v schema.Float32) *FieldTypeUpsertBulk

SetSchemaFloat32 sets the "schema_float32" field.

func (*FieldTypeUpsertBulk) SetSchemaInt added in v0.9.0

func (u *FieldTypeUpsertBulk) SetSchemaInt(v schema.Int) *FieldTypeUpsertBulk

SetSchemaInt sets the "schema_int" field.

func (*FieldTypeUpsertBulk) SetSchemaInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetSchemaInt64(v schema.Int64) *FieldTypeUpsertBulk

SetSchemaInt64 sets the "schema_int64" field.

func (*FieldTypeUpsertBulk) SetSchemaInt8 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetSchemaInt8(v schema.Int8) *FieldTypeUpsertBulk

SetSchemaInt8 sets the "schema_int8" field.

func (*FieldTypeUpsertBulk) SetSensitive added in v0.10.0

func (u *FieldTypeUpsertBulk) SetSensitive(v []byte) *FieldTypeUpsertBulk

SetSensitive sets the "sensitive" field.

func (*FieldTypeUpsertBulk) SetState added in v0.9.0

SetState sets the "state" field.

func (*FieldTypeUpsertBulk) SetStr added in v0.9.0

SetStr sets the "str" field.

func (*FieldTypeUpsertBulk) SetStringArray added in v0.9.0

func (u *FieldTypeUpsertBulk) SetStringArray(v schema.Strings) *FieldTypeUpsertBulk

SetStringArray sets the "string_array" field.

func (*FieldTypeUpsertBulk) SetStringScanner added in v0.9.0

SetStringScanner sets the "string_scanner" field.

func (*FieldTypeUpsertBulk) SetStrings added in v0.9.0

func (u *FieldTypeUpsertBulk) SetStrings(v []string) *FieldTypeUpsertBulk

SetStrings sets the "strings" field.

func (*FieldTypeUpsertBulk) SetText added in v0.10.0

SetText sets the "text" field.

func (*FieldTypeUpsertBulk) SetTriple added in v0.9.0

SetTriple sets the "triple" field.

func (*FieldTypeUpsertBulk) SetValidateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertBulk) SetValidateOptionalInt32(v int32) *FieldTypeUpsertBulk

SetValidateOptionalInt32 sets the "validate_optional_int32" field.

func (*FieldTypeUpsertBulk) SetVstring added in v0.9.0

SetVstring sets the "vstring" field.

func (*FieldTypeUpsertBulk) Update added in v0.9.0

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

func (*FieldTypeUpsertBulk) UpdateActive added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateActive() *FieldTypeUpsertBulk

UpdateActive sets the "active" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateBigInt added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateBigInt() *FieldTypeUpsertBulk

UpdateBigInt sets the "big_int" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateDatetime added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateDatetime() *FieldTypeUpsertBulk

UpdateDatetime sets the "datetime" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateDecimal added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateDecimal() *FieldTypeUpsertBulk

UpdateDecimal sets the "decimal" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateDeleted added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateDeleted() *FieldTypeUpsertBulk

UpdateDeleted sets the "deleted" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateDeletedAt added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateDeletedAt() *FieldTypeUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateDir added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateDir() *FieldTypeUpsertBulk

UpdateDir sets the "dir" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateDuration added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateDuration() *FieldTypeUpsertBulk

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateIP added in v0.9.0

UpdateIP sets the "ip" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateInt added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateInt() *FieldTypeUpsertBulk

UpdateInt sets the "int" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateInt16 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateInt16() *FieldTypeUpsertBulk

UpdateInt16 sets the "int16" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateInt32 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateInt32() *FieldTypeUpsertBulk

UpdateInt32 sets the "int32" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateInt64() *FieldTypeUpsertBulk

UpdateInt64 sets the "int64" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateInt8 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateInt8() *FieldTypeUpsertBulk

UpdateInt8 sets the "int8" field to the value that was provided on create.

func (u *FieldTypeUpsertBulk) UpdateLink() *FieldTypeUpsertBulk

UpdateLink sets the "link" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateLinkOther added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateLinkOther() *FieldTypeUpsertBulk

UpdateLinkOther sets the "link_other" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateLinkOtherFunc added in v0.10.0

func (u *FieldTypeUpsertBulk) UpdateLinkOtherFunc() *FieldTypeUpsertBulk

UpdateLinkOtherFunc sets the "link_other_func" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateMAC added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateMAC() *FieldTypeUpsertBulk

UpdateMAC sets the "mac" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNdir added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNdir() *FieldTypeUpsertBulk

UpdateNdir sets the "ndir" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNewValues added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNewValues() *FieldTypeUpsertBulk

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

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

func (*FieldTypeUpsertBulk) UpdateNilPair added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNilPair() *FieldTypeUpsertBulk

UpdateNilPair sets the "nil_pair" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNillableInt added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNillableInt() *FieldTypeUpsertBulk

UpdateNillableInt sets the "nillable_int" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNillableInt16 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNillableInt16() *FieldTypeUpsertBulk

UpdateNillableInt16 sets the "nillable_int16" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNillableInt32 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNillableInt32() *FieldTypeUpsertBulk

UpdateNillableInt32 sets the "nillable_int32" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNillableInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNillableInt64() *FieldTypeUpsertBulk

UpdateNillableInt64 sets the "nillable_int64" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNillableInt8 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNillableInt8() *FieldTypeUpsertBulk

UpdateNillableInt8 sets the "nillable_int8" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNillableUUID added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNillableUUID() *FieldTypeUpsertBulk

UpdateNillableUUID sets the "nillable_uuid" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNullActive added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNullActive() *FieldTypeUpsertBulk

UpdateNullActive sets the "null_active" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNullFloat added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNullFloat() *FieldTypeUpsertBulk

UpdateNullFloat sets the "null_float" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNullInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNullInt64() *FieldTypeUpsertBulk

UpdateNullInt64 sets the "null_int64" field to the value that was provided on create.

func (u *FieldTypeUpsertBulk) UpdateNullLink() *FieldTypeUpsertBulk

UpdateNullLink sets the "null_link" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateNullStr added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateNullStr() *FieldTypeUpsertBulk

UpdateNullStr sets the "null_str" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalFloat added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalFloat() *FieldTypeUpsertBulk

UpdateOptionalFloat sets the "optional_float" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalFloat32 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalFloat32() *FieldTypeUpsertBulk

UpdateOptionalFloat32 sets the "optional_float32" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalInt added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalInt() *FieldTypeUpsertBulk

UpdateOptionalInt sets the "optional_int" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalInt16 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalInt16() *FieldTypeUpsertBulk

UpdateOptionalInt16 sets the "optional_int16" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalInt32() *FieldTypeUpsertBulk

UpdateOptionalInt32 sets the "optional_int32" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalInt64() *FieldTypeUpsertBulk

UpdateOptionalInt64 sets the "optional_int64" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalInt8 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalInt8() *FieldTypeUpsertBulk

UpdateOptionalInt8 sets the "optional_int8" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalUUID added in v0.10.0

func (u *FieldTypeUpsertBulk) UpdateOptionalUUID() *FieldTypeUpsertBulk

UpdateOptionalUUID sets the "optional_uuid" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalUint added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalUint() *FieldTypeUpsertBulk

UpdateOptionalUint sets the "optional_uint" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalUint16 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalUint16() *FieldTypeUpsertBulk

UpdateOptionalUint16 sets the "optional_uint16" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalUint32 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalUint32() *FieldTypeUpsertBulk

UpdateOptionalUint32 sets the "optional_uint32" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalUint64 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalUint64() *FieldTypeUpsertBulk

UpdateOptionalUint64 sets the "optional_uint64" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateOptionalUint8 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateOptionalUint8() *FieldTypeUpsertBulk

UpdateOptionalUint8 sets the "optional_uint8" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdatePair added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdatePair() *FieldTypeUpsertBulk

UpdatePair sets the "pair" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdatePassword added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdatePassword() *FieldTypeUpsertBulk

UpdatePassword sets the "password" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdatePasswordOther added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdatePasswordOther() *FieldTypeUpsertBulk

UpdatePasswordOther sets the "password_other" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdatePriority added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdatePriority() *FieldTypeUpsertBulk

UpdatePriority sets the "priority" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateRawData added in v0.10.0

func (u *FieldTypeUpsertBulk) UpdateRawData() *FieldTypeUpsertBulk

UpdateRawData sets the "raw_data" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateRole added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateRole() *FieldTypeUpsertBulk

UpdateRole sets the "role" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateSchemaFloat added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateSchemaFloat() *FieldTypeUpsertBulk

UpdateSchemaFloat sets the "schema_float" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateSchemaFloat32 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateSchemaFloat32() *FieldTypeUpsertBulk

UpdateSchemaFloat32 sets the "schema_float32" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateSchemaInt added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateSchemaInt() *FieldTypeUpsertBulk

UpdateSchemaInt sets the "schema_int" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateSchemaInt64 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateSchemaInt64() *FieldTypeUpsertBulk

UpdateSchemaInt64 sets the "schema_int64" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateSchemaInt8 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateSchemaInt8() *FieldTypeUpsertBulk

UpdateSchemaInt8 sets the "schema_int8" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateSensitive added in v0.10.0

func (u *FieldTypeUpsertBulk) UpdateSensitive() *FieldTypeUpsertBulk

UpdateSensitive sets the "sensitive" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateState added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateState() *FieldTypeUpsertBulk

UpdateState sets the "state" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateStr added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateStr() *FieldTypeUpsertBulk

UpdateStr sets the "str" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateStringArray added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateStringArray() *FieldTypeUpsertBulk

UpdateStringArray sets the "string_array" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateStringScanner added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateStringScanner() *FieldTypeUpsertBulk

UpdateStringScanner sets the "string_scanner" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateStrings added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateStrings() *FieldTypeUpsertBulk

UpdateStrings sets the "strings" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateText added in v0.10.0

func (u *FieldTypeUpsertBulk) UpdateText() *FieldTypeUpsertBulk

UpdateText sets the "text" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateTriple added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateTriple() *FieldTypeUpsertBulk

UpdateTriple sets the "triple" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateValidateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateValidateOptionalInt32() *FieldTypeUpsertBulk

UpdateValidateOptionalInt32 sets the "validate_optional_int32" field to the value that was provided on create.

func (*FieldTypeUpsertBulk) UpdateVstring added in v0.9.0

func (u *FieldTypeUpsertBulk) UpdateVstring() *FieldTypeUpsertBulk

UpdateVstring sets the "vstring" field to the value that was provided on create.

type FieldTypeUpsertOne added in v0.9.0

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

FieldTypeUpsertOne is the builder for "upsert"-ing

one FieldType node.

func (*FieldTypeUpsertOne) AddBigInt added in v0.10.0

AddBigInt adds v to the "big_int" field.

func (*FieldTypeUpsertOne) AddDecimal added in v0.10.0

func (u *FieldTypeUpsertOne) AddDecimal(v float64) *FieldTypeUpsertOne

AddDecimal adds v to the "decimal" field.

func (*FieldTypeUpsertOne) AddDuration added in v0.10.0

AddDuration adds v to the "duration" field.

func (*FieldTypeUpsertOne) AddInt added in v0.10.0

AddInt adds v to the "int" field.

func (*FieldTypeUpsertOne) AddInt16 added in v0.10.0

AddInt16 adds v to the "int16" field.

func (*FieldTypeUpsertOne) AddInt32 added in v0.10.0

AddInt32 adds v to the "int32" field.

func (*FieldTypeUpsertOne) AddInt64 added in v0.10.0

AddInt64 adds v to the "int64" field.

func (*FieldTypeUpsertOne) AddInt8 added in v0.10.0

AddInt8 adds v to the "int8" field.

func (*FieldTypeUpsertOne) AddNillableInt added in v0.10.0

func (u *FieldTypeUpsertOne) AddNillableInt(v int) *FieldTypeUpsertOne

AddNillableInt adds v to the "nillable_int" field.

func (*FieldTypeUpsertOne) AddNillableInt16 added in v0.10.0

func (u *FieldTypeUpsertOne) AddNillableInt16(v int16) *FieldTypeUpsertOne

AddNillableInt16 adds v to the "nillable_int16" field.

func (*FieldTypeUpsertOne) AddNillableInt32 added in v0.10.0

func (u *FieldTypeUpsertOne) AddNillableInt32(v int32) *FieldTypeUpsertOne

AddNillableInt32 adds v to the "nillable_int32" field.

func (*FieldTypeUpsertOne) AddNillableInt64 added in v0.10.0

func (u *FieldTypeUpsertOne) AddNillableInt64(v int64) *FieldTypeUpsertOne

AddNillableInt64 adds v to the "nillable_int64" field.

func (*FieldTypeUpsertOne) AddNillableInt8 added in v0.10.0

func (u *FieldTypeUpsertOne) AddNillableInt8(v int8) *FieldTypeUpsertOne

AddNillableInt8 adds v to the "nillable_int8" field.

func (*FieldTypeUpsertOne) AddOptionalFloat added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalFloat(v float64) *FieldTypeUpsertOne

AddOptionalFloat adds v to the "optional_float" field.

func (*FieldTypeUpsertOne) AddOptionalFloat32 added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalFloat32(v float32) *FieldTypeUpsertOne

AddOptionalFloat32 adds v to the "optional_float32" field.

func (*FieldTypeUpsertOne) AddOptionalInt added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalInt(v int) *FieldTypeUpsertOne

AddOptionalInt adds v to the "optional_int" field.

func (*FieldTypeUpsertOne) AddOptionalInt16 added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalInt16(v int16) *FieldTypeUpsertOne

AddOptionalInt16 adds v to the "optional_int16" field.

func (*FieldTypeUpsertOne) AddOptionalInt32 added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalInt32(v int32) *FieldTypeUpsertOne

AddOptionalInt32 adds v to the "optional_int32" field.

func (*FieldTypeUpsertOne) AddOptionalInt64 added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalInt64(v int64) *FieldTypeUpsertOne

AddOptionalInt64 adds v to the "optional_int64" field.

func (*FieldTypeUpsertOne) AddOptionalInt8 added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalInt8(v int8) *FieldTypeUpsertOne

AddOptionalInt8 adds v to the "optional_int8" field.

func (*FieldTypeUpsertOne) AddOptionalUint added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalUint(v uint) *FieldTypeUpsertOne

AddOptionalUint adds v to the "optional_uint" field.

func (*FieldTypeUpsertOne) AddOptionalUint16 added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalUint16(v uint16) *FieldTypeUpsertOne

AddOptionalUint16 adds v to the "optional_uint16" field.

func (*FieldTypeUpsertOne) AddOptionalUint32 added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalUint32(v uint32) *FieldTypeUpsertOne

AddOptionalUint32 adds v to the "optional_uint32" field.

func (*FieldTypeUpsertOne) AddOptionalUint64 added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalUint64(v uint64) *FieldTypeUpsertOne

AddOptionalUint64 adds v to the "optional_uint64" field.

func (*FieldTypeUpsertOne) AddOptionalUint8 added in v0.10.0

func (u *FieldTypeUpsertOne) AddOptionalUint8(v uint8) *FieldTypeUpsertOne

AddOptionalUint8 adds v to the "optional_uint8" field.

func (*FieldTypeUpsertOne) AddSchemaFloat added in v0.10.0

func (u *FieldTypeUpsertOne) AddSchemaFloat(v schema.Float64) *FieldTypeUpsertOne

AddSchemaFloat adds v to the "schema_float" field.

func (*FieldTypeUpsertOne) AddSchemaFloat32 added in v0.10.0

func (u *FieldTypeUpsertOne) AddSchemaFloat32(v schema.Float32) *FieldTypeUpsertOne

AddSchemaFloat32 adds v to the "schema_float32" field.

func (*FieldTypeUpsertOne) AddSchemaInt added in v0.10.0

func (u *FieldTypeUpsertOne) AddSchemaInt(v schema.Int) *FieldTypeUpsertOne

AddSchemaInt adds v to the "schema_int" field.

func (*FieldTypeUpsertOne) AddSchemaInt64 added in v0.10.0

func (u *FieldTypeUpsertOne) AddSchemaInt64(v schema.Int64) *FieldTypeUpsertOne

AddSchemaInt64 adds v to the "schema_int64" field.

func (*FieldTypeUpsertOne) AddSchemaInt8 added in v0.10.0

func (u *FieldTypeUpsertOne) AddSchemaInt8(v schema.Int8) *FieldTypeUpsertOne

AddSchemaInt8 adds v to the "schema_int8" field.

func (*FieldTypeUpsertOne) AddValidateOptionalInt32 added in v0.10.0

func (u *FieldTypeUpsertOne) AddValidateOptionalInt32(v int32) *FieldTypeUpsertOne

AddValidateOptionalInt32 adds v to the "validate_optional_int32" field.

func (*FieldTypeUpsertOne) ClearActive added in v0.9.0

func (u *FieldTypeUpsertOne) ClearActive() *FieldTypeUpsertOne

ClearActive clears the value of the "active" field.

func (*FieldTypeUpsertOne) ClearBigInt added in v0.9.0

func (u *FieldTypeUpsertOne) ClearBigInt() *FieldTypeUpsertOne

ClearBigInt clears the value of the "big_int" field.

func (*FieldTypeUpsertOne) ClearDatetime added in v0.9.0

func (u *FieldTypeUpsertOne) ClearDatetime() *FieldTypeUpsertOne

ClearDatetime clears the value of the "datetime" field.

func (*FieldTypeUpsertOne) ClearDecimal added in v0.9.0

func (u *FieldTypeUpsertOne) ClearDecimal() *FieldTypeUpsertOne

ClearDecimal clears the value of the "decimal" field.

func (*FieldTypeUpsertOne) ClearDeleted added in v0.9.0

func (u *FieldTypeUpsertOne) ClearDeleted() *FieldTypeUpsertOne

ClearDeleted clears the value of the "deleted" field.

func (*FieldTypeUpsertOne) ClearDeletedAt added in v0.9.0

func (u *FieldTypeUpsertOne) ClearDeletedAt() *FieldTypeUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*FieldTypeUpsertOne) ClearDuration added in v0.9.0

func (u *FieldTypeUpsertOne) ClearDuration() *FieldTypeUpsertOne

ClearDuration clears the value of the "duration" field.

func (*FieldTypeUpsertOne) ClearIP added in v0.9.0

func (u *FieldTypeUpsertOne) ClearIP() *FieldTypeUpsertOne

ClearIP clears the value of the "ip" field.

func (u *FieldTypeUpsertOne) ClearLink() *FieldTypeUpsertOne

ClearLink clears the value of the "link" field.

func (*FieldTypeUpsertOne) ClearLinkOther added in v0.9.0

func (u *FieldTypeUpsertOne) ClearLinkOther() *FieldTypeUpsertOne

ClearLinkOther clears the value of the "link_other" field.

func (*FieldTypeUpsertOne) ClearLinkOtherFunc added in v0.10.0

func (u *FieldTypeUpsertOne) ClearLinkOtherFunc() *FieldTypeUpsertOne

ClearLinkOtherFunc clears the value of the "link_other_func" field.

func (*FieldTypeUpsertOne) ClearMAC added in v0.9.0

func (u *FieldTypeUpsertOne) ClearMAC() *FieldTypeUpsertOne

ClearMAC clears the value of the "mac" field.

func (*FieldTypeUpsertOne) ClearNdir added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNdir() *FieldTypeUpsertOne

ClearNdir clears the value of the "ndir" field.

func (*FieldTypeUpsertOne) ClearNilPair added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNilPair() *FieldTypeUpsertOne

ClearNilPair clears the value of the "nil_pair" field.

func (*FieldTypeUpsertOne) ClearNillableInt added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNillableInt() *FieldTypeUpsertOne

ClearNillableInt clears the value of the "nillable_int" field.

func (*FieldTypeUpsertOne) ClearNillableInt16 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNillableInt16() *FieldTypeUpsertOne

ClearNillableInt16 clears the value of the "nillable_int16" field.

func (*FieldTypeUpsertOne) ClearNillableInt32 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNillableInt32() *FieldTypeUpsertOne

ClearNillableInt32 clears the value of the "nillable_int32" field.

func (*FieldTypeUpsertOne) ClearNillableInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNillableInt64() *FieldTypeUpsertOne

ClearNillableInt64 clears the value of the "nillable_int64" field.

func (*FieldTypeUpsertOne) ClearNillableInt8 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNillableInt8() *FieldTypeUpsertOne

ClearNillableInt8 clears the value of the "nillable_int8" field.

func (*FieldTypeUpsertOne) ClearNillableUUID added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNillableUUID() *FieldTypeUpsertOne

ClearNillableUUID clears the value of the "nillable_uuid" field.

func (*FieldTypeUpsertOne) ClearNullActive added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNullActive() *FieldTypeUpsertOne

ClearNullActive clears the value of the "null_active" field.

func (*FieldTypeUpsertOne) ClearNullFloat added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNullFloat() *FieldTypeUpsertOne

ClearNullFloat clears the value of the "null_float" field.

func (*FieldTypeUpsertOne) ClearNullInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNullInt64() *FieldTypeUpsertOne

ClearNullInt64 clears the value of the "null_int64" field.

func (u *FieldTypeUpsertOne) ClearNullLink() *FieldTypeUpsertOne

ClearNullLink clears the value of the "null_link" field.

func (*FieldTypeUpsertOne) ClearNullStr added in v0.9.0

func (u *FieldTypeUpsertOne) ClearNullStr() *FieldTypeUpsertOne

ClearNullStr clears the value of the "null_str" field.

func (*FieldTypeUpsertOne) ClearOptionalFloat added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalFloat() *FieldTypeUpsertOne

ClearOptionalFloat clears the value of the "optional_float" field.

func (*FieldTypeUpsertOne) ClearOptionalFloat32 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalFloat32() *FieldTypeUpsertOne

ClearOptionalFloat32 clears the value of the "optional_float32" field.

func (*FieldTypeUpsertOne) ClearOptionalInt added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalInt() *FieldTypeUpsertOne

ClearOptionalInt clears the value of the "optional_int" field.

func (*FieldTypeUpsertOne) ClearOptionalInt16 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalInt16() *FieldTypeUpsertOne

ClearOptionalInt16 clears the value of the "optional_int16" field.

func (*FieldTypeUpsertOne) ClearOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalInt32() *FieldTypeUpsertOne

ClearOptionalInt32 clears the value of the "optional_int32" field.

func (*FieldTypeUpsertOne) ClearOptionalInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalInt64() *FieldTypeUpsertOne

ClearOptionalInt64 clears the value of the "optional_int64" field.

func (*FieldTypeUpsertOne) ClearOptionalInt8 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalInt8() *FieldTypeUpsertOne

ClearOptionalInt8 clears the value of the "optional_int8" field.

func (*FieldTypeUpsertOne) ClearOptionalUUID added in v0.10.0

func (u *FieldTypeUpsertOne) ClearOptionalUUID() *FieldTypeUpsertOne

ClearOptionalUUID clears the value of the "optional_uuid" field.

func (*FieldTypeUpsertOne) ClearOptionalUint added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalUint() *FieldTypeUpsertOne

ClearOptionalUint clears the value of the "optional_uint" field.

func (*FieldTypeUpsertOne) ClearOptionalUint16 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalUint16() *FieldTypeUpsertOne

ClearOptionalUint16 clears the value of the "optional_uint16" field.

func (*FieldTypeUpsertOne) ClearOptionalUint32 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalUint32() *FieldTypeUpsertOne

ClearOptionalUint32 clears the value of the "optional_uint32" field.

func (*FieldTypeUpsertOne) ClearOptionalUint64 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalUint64() *FieldTypeUpsertOne

ClearOptionalUint64 clears the value of the "optional_uint64" field.

func (*FieldTypeUpsertOne) ClearOptionalUint8 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearOptionalUint8() *FieldTypeUpsertOne

ClearOptionalUint8 clears the value of the "optional_uint8" field.

func (*FieldTypeUpsertOne) ClearPassword added in v0.9.0

func (u *FieldTypeUpsertOne) ClearPassword() *FieldTypeUpsertOne

ClearPassword clears the value of the "password" field.

func (*FieldTypeUpsertOne) ClearPasswordOther added in v0.9.0

func (u *FieldTypeUpsertOne) ClearPasswordOther() *FieldTypeUpsertOne

ClearPasswordOther clears the value of the "password_other" field.

func (*FieldTypeUpsertOne) ClearPriority added in v0.9.0

func (u *FieldTypeUpsertOne) ClearPriority() *FieldTypeUpsertOne

ClearPriority clears the value of the "priority" field.

func (*FieldTypeUpsertOne) ClearRawData added in v0.10.0

func (u *FieldTypeUpsertOne) ClearRawData() *FieldTypeUpsertOne

ClearRawData clears the value of the "raw_data" field.

func (*FieldTypeUpsertOne) ClearSchemaFloat added in v0.9.0

func (u *FieldTypeUpsertOne) ClearSchemaFloat() *FieldTypeUpsertOne

ClearSchemaFloat clears the value of the "schema_float" field.

func (*FieldTypeUpsertOne) ClearSchemaFloat32 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearSchemaFloat32() *FieldTypeUpsertOne

ClearSchemaFloat32 clears the value of the "schema_float32" field.

func (*FieldTypeUpsertOne) ClearSchemaInt added in v0.9.0

func (u *FieldTypeUpsertOne) ClearSchemaInt() *FieldTypeUpsertOne

ClearSchemaInt clears the value of the "schema_int" field.

func (*FieldTypeUpsertOne) ClearSchemaInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearSchemaInt64() *FieldTypeUpsertOne

ClearSchemaInt64 clears the value of the "schema_int64" field.

func (*FieldTypeUpsertOne) ClearSchemaInt8 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearSchemaInt8() *FieldTypeUpsertOne

ClearSchemaInt8 clears the value of the "schema_int8" field.

func (*FieldTypeUpsertOne) ClearSensitive added in v0.10.0

func (u *FieldTypeUpsertOne) ClearSensitive() *FieldTypeUpsertOne

ClearSensitive clears the value of the "sensitive" field.

func (*FieldTypeUpsertOne) ClearState added in v0.9.0

func (u *FieldTypeUpsertOne) ClearState() *FieldTypeUpsertOne

ClearState clears the value of the "state" field.

func (*FieldTypeUpsertOne) ClearStr added in v0.9.0

func (u *FieldTypeUpsertOne) ClearStr() *FieldTypeUpsertOne

ClearStr clears the value of the "str" field.

func (*FieldTypeUpsertOne) ClearStringArray added in v0.9.0

func (u *FieldTypeUpsertOne) ClearStringArray() *FieldTypeUpsertOne

ClearStringArray clears the value of the "string_array" field.

func (*FieldTypeUpsertOne) ClearStringScanner added in v0.9.0

func (u *FieldTypeUpsertOne) ClearStringScanner() *FieldTypeUpsertOne

ClearStringScanner clears the value of the "string_scanner" field.

func (*FieldTypeUpsertOne) ClearStrings added in v0.9.0

func (u *FieldTypeUpsertOne) ClearStrings() *FieldTypeUpsertOne

ClearStrings clears the value of the "strings" field.

func (*FieldTypeUpsertOne) ClearText added in v0.10.0

func (u *FieldTypeUpsertOne) ClearText() *FieldTypeUpsertOne

ClearText clears the value of the "text" field.

func (*FieldTypeUpsertOne) ClearValidateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertOne) ClearValidateOptionalInt32() *FieldTypeUpsertOne

ClearValidateOptionalInt32 clears the value of the "validate_optional_int32" field.

func (*FieldTypeUpsertOne) DoNothing added in v0.9.0

func (u *FieldTypeUpsertOne) DoNothing() *FieldTypeUpsertOne

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

func (*FieldTypeUpsertOne) Exec added in v0.9.0

func (u *FieldTypeUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*FieldTypeUpsertOne) ExecX added in v0.9.0

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

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

func (*FieldTypeUpsertOne) ID added in v0.9.0

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

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

func (*FieldTypeUpsertOne) IDX added in v0.9.0

func (u *FieldTypeUpsertOne) IDX(ctx context.Context) int

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

func (*FieldTypeUpsertOne) Ignore added in v0.9.0

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

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

func (*FieldTypeUpsertOne) SetActive added in v0.9.0

SetActive sets the "active" field.

func (*FieldTypeUpsertOne) SetBigInt added in v0.9.0

SetBigInt sets the "big_int" field.

func (*FieldTypeUpsertOne) SetDatetime added in v0.9.0

func (u *FieldTypeUpsertOne) SetDatetime(v time.Time) *FieldTypeUpsertOne

SetDatetime sets the "datetime" field.

func (*FieldTypeUpsertOne) SetDecimal added in v0.9.0

func (u *FieldTypeUpsertOne) SetDecimal(v float64) *FieldTypeUpsertOne

SetDecimal sets the "decimal" field.

func (*FieldTypeUpsertOne) SetDeleted added in v0.9.0

SetDeleted sets the "deleted" field.

func (*FieldTypeUpsertOne) SetDeletedAt added in v0.9.0

func (u *FieldTypeUpsertOne) SetDeletedAt(v *sql.NullTime) *FieldTypeUpsertOne

SetDeletedAt sets the "deleted_at" field.

func (*FieldTypeUpsertOne) SetDir added in v0.9.0

SetDir sets the "dir" field.

func (*FieldTypeUpsertOne) SetDuration added in v0.9.0

SetDuration sets the "duration" field.

func (*FieldTypeUpsertOne) SetIP added in v0.9.0

SetIP sets the "ip" field.

func (*FieldTypeUpsertOne) SetInt added in v0.9.0

SetInt sets the "int" field.

func (*FieldTypeUpsertOne) SetInt16 added in v0.9.0

SetInt16 sets the "int16" field.

func (*FieldTypeUpsertOne) SetInt32 added in v0.9.0

SetInt32 sets the "int32" field.

func (*FieldTypeUpsertOne) SetInt64 added in v0.9.0

SetInt64 sets the "int64" field.

func (*FieldTypeUpsertOne) SetInt8 added in v0.9.0

SetInt8 sets the "int8" field.

SetLink sets the "link" field.

func (*FieldTypeUpsertOne) SetLinkOther added in v0.9.0

func (u *FieldTypeUpsertOne) SetLinkOther(v *schema.Link) *FieldTypeUpsertOne

SetLinkOther sets the "link_other" field.

func (*FieldTypeUpsertOne) SetLinkOtherFunc added in v0.10.0

func (u *FieldTypeUpsertOne) SetLinkOtherFunc(v *schema.Link) *FieldTypeUpsertOne

SetLinkOtherFunc sets the "link_other_func" field.

func (*FieldTypeUpsertOne) SetMAC added in v0.9.0

SetMAC sets the "mac" field.

func (*FieldTypeUpsertOne) SetNdir added in v0.9.0

SetNdir sets the "ndir" field.

func (*FieldTypeUpsertOne) SetNilPair added in v0.9.0

func (u *FieldTypeUpsertOne) SetNilPair(v *schema.Pair) *FieldTypeUpsertOne

SetNilPair sets the "nil_pair" field.

func (*FieldTypeUpsertOne) SetNillableInt added in v0.9.0

func (u *FieldTypeUpsertOne) SetNillableInt(v int) *FieldTypeUpsertOne

SetNillableInt sets the "nillable_int" field.

func (*FieldTypeUpsertOne) SetNillableInt16 added in v0.9.0

func (u *FieldTypeUpsertOne) SetNillableInt16(v int16) *FieldTypeUpsertOne

SetNillableInt16 sets the "nillable_int16" field.

func (*FieldTypeUpsertOne) SetNillableInt32 added in v0.9.0

func (u *FieldTypeUpsertOne) SetNillableInt32(v int32) *FieldTypeUpsertOne

SetNillableInt32 sets the "nillable_int32" field.

func (*FieldTypeUpsertOne) SetNillableInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) SetNillableInt64(v int64) *FieldTypeUpsertOne

SetNillableInt64 sets the "nillable_int64" field.

func (*FieldTypeUpsertOne) SetNillableInt8 added in v0.9.0

func (u *FieldTypeUpsertOne) SetNillableInt8(v int8) *FieldTypeUpsertOne

SetNillableInt8 sets the "nillable_int8" field.

func (*FieldTypeUpsertOne) SetNillableUUID added in v0.9.0

func (u *FieldTypeUpsertOne) SetNillableUUID(v uuid.UUID) *FieldTypeUpsertOne

SetNillableUUID sets the "nillable_uuid" field.

func (*FieldTypeUpsertOne) SetNullActive added in v0.9.0

func (u *FieldTypeUpsertOne) SetNullActive(v schema.Status) *FieldTypeUpsertOne

SetNullActive sets the "null_active" field.

func (*FieldTypeUpsertOne) SetNullFloat added in v0.9.0

SetNullFloat sets the "null_float" field.

func (*FieldTypeUpsertOne) SetNullInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) SetNullInt64(v *sql.NullInt64) *FieldTypeUpsertOne

SetNullInt64 sets the "null_int64" field.

func (u *FieldTypeUpsertOne) SetNullLink(v *schema.Link) *FieldTypeUpsertOne

SetNullLink sets the "null_link" field.

func (*FieldTypeUpsertOne) SetNullStr added in v0.9.0

SetNullStr sets the "null_str" field.

func (*FieldTypeUpsertOne) SetOptionalFloat added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalFloat(v float64) *FieldTypeUpsertOne

SetOptionalFloat sets the "optional_float" field.

func (*FieldTypeUpsertOne) SetOptionalFloat32 added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalFloat32(v float32) *FieldTypeUpsertOne

SetOptionalFloat32 sets the "optional_float32" field.

func (*FieldTypeUpsertOne) SetOptionalInt added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalInt(v int) *FieldTypeUpsertOne

SetOptionalInt sets the "optional_int" field.

func (*FieldTypeUpsertOne) SetOptionalInt16 added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalInt16(v int16) *FieldTypeUpsertOne

SetOptionalInt16 sets the "optional_int16" field.

func (*FieldTypeUpsertOne) SetOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalInt32(v int32) *FieldTypeUpsertOne

SetOptionalInt32 sets the "optional_int32" field.

func (*FieldTypeUpsertOne) SetOptionalInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalInt64(v int64) *FieldTypeUpsertOne

SetOptionalInt64 sets the "optional_int64" field.

func (*FieldTypeUpsertOne) SetOptionalInt8 added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalInt8(v int8) *FieldTypeUpsertOne

SetOptionalInt8 sets the "optional_int8" field.

func (*FieldTypeUpsertOne) SetOptionalUUID added in v0.10.0

func (u *FieldTypeUpsertOne) SetOptionalUUID(v uuid.UUID) *FieldTypeUpsertOne

SetOptionalUUID sets the "optional_uuid" field.

func (*FieldTypeUpsertOne) SetOptionalUint added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalUint(v uint) *FieldTypeUpsertOne

SetOptionalUint sets the "optional_uint" field.

func (*FieldTypeUpsertOne) SetOptionalUint16 added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalUint16(v uint16) *FieldTypeUpsertOne

SetOptionalUint16 sets the "optional_uint16" field.

func (*FieldTypeUpsertOne) SetOptionalUint32 added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalUint32(v uint32) *FieldTypeUpsertOne

SetOptionalUint32 sets the "optional_uint32" field.

func (*FieldTypeUpsertOne) SetOptionalUint64 added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalUint64(v uint64) *FieldTypeUpsertOne

SetOptionalUint64 sets the "optional_uint64" field.

func (*FieldTypeUpsertOne) SetOptionalUint8 added in v0.9.0

func (u *FieldTypeUpsertOne) SetOptionalUint8(v uint8) *FieldTypeUpsertOne

SetOptionalUint8 sets the "optional_uint8" field.

func (*FieldTypeUpsertOne) SetPair added in v0.9.0

SetPair sets the "pair" field.

func (*FieldTypeUpsertOne) SetPassword added in v0.9.0

func (u *FieldTypeUpsertOne) SetPassword(v string) *FieldTypeUpsertOne

SetPassword sets the "password" field.

func (*FieldTypeUpsertOne) SetPasswordOther added in v0.9.0

func (u *FieldTypeUpsertOne) SetPasswordOther(v schema.Password) *FieldTypeUpsertOne

SetPasswordOther sets the "password_other" field.

func (*FieldTypeUpsertOne) SetPriority added in v0.9.0

SetPriority sets the "priority" field.

func (*FieldTypeUpsertOne) SetRawData added in v0.10.0

func (u *FieldTypeUpsertOne) SetRawData(v []byte) *FieldTypeUpsertOne

SetRawData sets the "raw_data" field.

func (*FieldTypeUpsertOne) SetRole added in v0.9.0

SetRole sets the "role" field.

func (*FieldTypeUpsertOne) SetSchemaFloat added in v0.9.0

func (u *FieldTypeUpsertOne) SetSchemaFloat(v schema.Float64) *FieldTypeUpsertOne

SetSchemaFloat sets the "schema_float" field.

func (*FieldTypeUpsertOne) SetSchemaFloat32 added in v0.9.0

func (u *FieldTypeUpsertOne) SetSchemaFloat32(v schema.Float32) *FieldTypeUpsertOne

SetSchemaFloat32 sets the "schema_float32" field.

func (*FieldTypeUpsertOne) SetSchemaInt added in v0.9.0

func (u *FieldTypeUpsertOne) SetSchemaInt(v schema.Int) *FieldTypeUpsertOne

SetSchemaInt sets the "schema_int" field.

func (*FieldTypeUpsertOne) SetSchemaInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) SetSchemaInt64(v schema.Int64) *FieldTypeUpsertOne

SetSchemaInt64 sets the "schema_int64" field.

func (*FieldTypeUpsertOne) SetSchemaInt8 added in v0.9.0

func (u *FieldTypeUpsertOne) SetSchemaInt8(v schema.Int8) *FieldTypeUpsertOne

SetSchemaInt8 sets the "schema_int8" field.

func (*FieldTypeUpsertOne) SetSensitive added in v0.10.0

func (u *FieldTypeUpsertOne) SetSensitive(v []byte) *FieldTypeUpsertOne

SetSensitive sets the "sensitive" field.

func (*FieldTypeUpsertOne) SetState added in v0.9.0

SetState sets the "state" field.

func (*FieldTypeUpsertOne) SetStr added in v0.9.0

SetStr sets the "str" field.

func (*FieldTypeUpsertOne) SetStringArray added in v0.9.0

func (u *FieldTypeUpsertOne) SetStringArray(v schema.Strings) *FieldTypeUpsertOne

SetStringArray sets the "string_array" field.

func (*FieldTypeUpsertOne) SetStringScanner added in v0.9.0

SetStringScanner sets the "string_scanner" field.

func (*FieldTypeUpsertOne) SetStrings added in v0.9.0

func (u *FieldTypeUpsertOne) SetStrings(v []string) *FieldTypeUpsertOne

SetStrings sets the "strings" field.

func (*FieldTypeUpsertOne) SetText added in v0.10.0

SetText sets the "text" field.

func (*FieldTypeUpsertOne) SetTriple added in v0.9.0

SetTriple sets the "triple" field.

func (*FieldTypeUpsertOne) SetValidateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertOne) SetValidateOptionalInt32(v int32) *FieldTypeUpsertOne

SetValidateOptionalInt32 sets the "validate_optional_int32" field.

func (*FieldTypeUpsertOne) SetVstring added in v0.9.0

SetVstring sets the "vstring" field.

func (*FieldTypeUpsertOne) Update added in v0.9.0

func (u *FieldTypeUpsertOne) Update(set func(*FieldTypeUpsert)) *FieldTypeUpsertOne

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

func (*FieldTypeUpsertOne) UpdateActive added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateActive() *FieldTypeUpsertOne

UpdateActive sets the "active" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateBigInt added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateBigInt() *FieldTypeUpsertOne

UpdateBigInt sets the "big_int" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateDatetime added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateDatetime() *FieldTypeUpsertOne

UpdateDatetime sets the "datetime" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateDecimal added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateDecimal() *FieldTypeUpsertOne

UpdateDecimal sets the "decimal" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateDeleted added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateDeleted() *FieldTypeUpsertOne

UpdateDeleted sets the "deleted" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateDeletedAt added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateDeletedAt() *FieldTypeUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateDir added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateDir() *FieldTypeUpsertOne

UpdateDir sets the "dir" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateDuration added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateDuration() *FieldTypeUpsertOne

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateIP added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateIP() *FieldTypeUpsertOne

UpdateIP sets the "ip" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateInt added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateInt() *FieldTypeUpsertOne

UpdateInt sets the "int" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateInt16 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateInt16() *FieldTypeUpsertOne

UpdateInt16 sets the "int16" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateInt32 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateInt32() *FieldTypeUpsertOne

UpdateInt32 sets the "int32" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateInt64() *FieldTypeUpsertOne

UpdateInt64 sets the "int64" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateInt8 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateInt8() *FieldTypeUpsertOne

UpdateInt8 sets the "int8" field to the value that was provided on create.

func (u *FieldTypeUpsertOne) UpdateLink() *FieldTypeUpsertOne

UpdateLink sets the "link" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateLinkOther added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateLinkOther() *FieldTypeUpsertOne

UpdateLinkOther sets the "link_other" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateLinkOtherFunc added in v0.10.0

func (u *FieldTypeUpsertOne) UpdateLinkOtherFunc() *FieldTypeUpsertOne

UpdateLinkOtherFunc sets the "link_other_func" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateMAC added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateMAC() *FieldTypeUpsertOne

UpdateMAC sets the "mac" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNdir added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNdir() *FieldTypeUpsertOne

UpdateNdir sets the "ndir" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNewValues added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNewValues() *FieldTypeUpsertOne

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

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

func (*FieldTypeUpsertOne) UpdateNilPair added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNilPair() *FieldTypeUpsertOne

UpdateNilPair sets the "nil_pair" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNillableInt added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNillableInt() *FieldTypeUpsertOne

UpdateNillableInt sets the "nillable_int" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNillableInt16 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNillableInt16() *FieldTypeUpsertOne

UpdateNillableInt16 sets the "nillable_int16" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNillableInt32 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNillableInt32() *FieldTypeUpsertOne

UpdateNillableInt32 sets the "nillable_int32" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNillableInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNillableInt64() *FieldTypeUpsertOne

UpdateNillableInt64 sets the "nillable_int64" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNillableInt8 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNillableInt8() *FieldTypeUpsertOne

UpdateNillableInt8 sets the "nillable_int8" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNillableUUID added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNillableUUID() *FieldTypeUpsertOne

UpdateNillableUUID sets the "nillable_uuid" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNullActive added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNullActive() *FieldTypeUpsertOne

UpdateNullActive sets the "null_active" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNullFloat added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNullFloat() *FieldTypeUpsertOne

UpdateNullFloat sets the "null_float" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNullInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNullInt64() *FieldTypeUpsertOne

UpdateNullInt64 sets the "null_int64" field to the value that was provided on create.

func (u *FieldTypeUpsertOne) UpdateNullLink() *FieldTypeUpsertOne

UpdateNullLink sets the "null_link" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateNullStr added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateNullStr() *FieldTypeUpsertOne

UpdateNullStr sets the "null_str" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalFloat added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalFloat() *FieldTypeUpsertOne

UpdateOptionalFloat sets the "optional_float" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalFloat32 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalFloat32() *FieldTypeUpsertOne

UpdateOptionalFloat32 sets the "optional_float32" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalInt added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalInt() *FieldTypeUpsertOne

UpdateOptionalInt sets the "optional_int" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalInt16 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalInt16() *FieldTypeUpsertOne

UpdateOptionalInt16 sets the "optional_int16" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalInt32() *FieldTypeUpsertOne

UpdateOptionalInt32 sets the "optional_int32" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalInt64() *FieldTypeUpsertOne

UpdateOptionalInt64 sets the "optional_int64" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalInt8 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalInt8() *FieldTypeUpsertOne

UpdateOptionalInt8 sets the "optional_int8" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalUUID added in v0.10.0

func (u *FieldTypeUpsertOne) UpdateOptionalUUID() *FieldTypeUpsertOne

UpdateOptionalUUID sets the "optional_uuid" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalUint added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalUint() *FieldTypeUpsertOne

UpdateOptionalUint sets the "optional_uint" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalUint16 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalUint16() *FieldTypeUpsertOne

UpdateOptionalUint16 sets the "optional_uint16" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalUint32 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalUint32() *FieldTypeUpsertOne

UpdateOptionalUint32 sets the "optional_uint32" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalUint64 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalUint64() *FieldTypeUpsertOne

UpdateOptionalUint64 sets the "optional_uint64" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateOptionalUint8 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateOptionalUint8() *FieldTypeUpsertOne

UpdateOptionalUint8 sets the "optional_uint8" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdatePair added in v0.9.0

func (u *FieldTypeUpsertOne) UpdatePair() *FieldTypeUpsertOne

UpdatePair sets the "pair" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdatePassword added in v0.9.0

func (u *FieldTypeUpsertOne) UpdatePassword() *FieldTypeUpsertOne

UpdatePassword sets the "password" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdatePasswordOther added in v0.9.0

func (u *FieldTypeUpsertOne) UpdatePasswordOther() *FieldTypeUpsertOne

UpdatePasswordOther sets the "password_other" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdatePriority added in v0.9.0

func (u *FieldTypeUpsertOne) UpdatePriority() *FieldTypeUpsertOne

UpdatePriority sets the "priority" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateRawData added in v0.10.0

func (u *FieldTypeUpsertOne) UpdateRawData() *FieldTypeUpsertOne

UpdateRawData sets the "raw_data" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateRole added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateRole() *FieldTypeUpsertOne

UpdateRole sets the "role" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateSchemaFloat added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateSchemaFloat() *FieldTypeUpsertOne

UpdateSchemaFloat sets the "schema_float" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateSchemaFloat32 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateSchemaFloat32() *FieldTypeUpsertOne

UpdateSchemaFloat32 sets the "schema_float32" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateSchemaInt added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateSchemaInt() *FieldTypeUpsertOne

UpdateSchemaInt sets the "schema_int" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateSchemaInt64 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateSchemaInt64() *FieldTypeUpsertOne

UpdateSchemaInt64 sets the "schema_int64" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateSchemaInt8 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateSchemaInt8() *FieldTypeUpsertOne

UpdateSchemaInt8 sets the "schema_int8" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateSensitive added in v0.10.0

func (u *FieldTypeUpsertOne) UpdateSensitive() *FieldTypeUpsertOne

UpdateSensitive sets the "sensitive" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateState added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateState() *FieldTypeUpsertOne

UpdateState sets the "state" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateStr added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateStr() *FieldTypeUpsertOne

UpdateStr sets the "str" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateStringArray added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateStringArray() *FieldTypeUpsertOne

UpdateStringArray sets the "string_array" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateStringScanner added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateStringScanner() *FieldTypeUpsertOne

UpdateStringScanner sets the "string_scanner" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateStrings added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateStrings() *FieldTypeUpsertOne

UpdateStrings sets the "strings" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateText added in v0.10.0

func (u *FieldTypeUpsertOne) UpdateText() *FieldTypeUpsertOne

UpdateText sets the "text" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateTriple added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateTriple() *FieldTypeUpsertOne

UpdateTriple sets the "triple" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateValidateOptionalInt32 added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateValidateOptionalInt32() *FieldTypeUpsertOne

UpdateValidateOptionalInt32 sets the "validate_optional_int32" field to the value that was provided on create.

func (*FieldTypeUpsertOne) UpdateVstring added in v0.9.0

func (u *FieldTypeUpsertOne) UpdateVstring() *FieldTypeUpsertOne

UpdateVstring sets the "vstring" field to the value that was provided on create.

type FieldTypes

type FieldTypes []*FieldType

FieldTypes is a parsable slice of FieldType.

type File

type File struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Size holds the value of the "size" field.
	Size int `json:"size,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// User holds the value of the "user" field.
	User *string `json:"user,omitempty"`
	// Group holds the value of the "group" field.
	Group string `json:"group,omitempty"`
	// Op holds the value of the "op" field.
	Op bool `json:"op,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FileQuery when eager-loading is set.
	Edges FileEdges `json:"file_edges"`
	// contains filtered or unexported fields
}

File is the model entity for the File schema.

func (*File) QueryField

func (f *File) QueryField() *FieldTypeQuery

QueryField queries the "field" edge of the File entity.

func (*File) QueryOwner

func (f *File) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the File entity.

func (*File) QueryType

func (f *File) QueryType() *FileTypeQuery

QueryType queries the "type" edge of the File entity.

func (*File) String

func (f *File) String() string

String implements the fmt.Stringer.

func (*File) Unwrap

func (f *File) Unwrap() *File

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

func (f *File) Update() *FileUpdateOne

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

type FileClient

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

FileClient is a client for the File schema.

func NewFileClient

func NewFileClient(c config) *FileClient

NewFileClient returns a client for the File from the given config.

func (*FileClient) Create

func (c *FileClient) Create() *FileCreate

Create returns a create builder for File.

func (*FileClient) CreateBulk

func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk

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

func (*FileClient) Delete

func (c *FileClient) Delete() *FileDelete

Delete returns a delete builder for File.

func (*FileClient) DeleteOne

func (c *FileClient) DeleteOne(f *File) *FileDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*FileClient) DeleteOneID

func (c *FileClient) DeleteOneID(id int) *FileDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*FileClient) Get

func (c *FileClient) Get(ctx context.Context, id int) (*File, error)

Get returns a File entity by its id.

func (*FileClient) GetX

func (c *FileClient) GetX(ctx context.Context, id int) *File

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

func (*FileClient) Hooks

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

Hooks returns the client hooks.

func (*FileClient) Query

func (c *FileClient) Query() *FileQuery

Query returns a query builder for File.

func (*FileClient) QueryField

func (c *FileClient) QueryField(f *File) *FieldTypeQuery

QueryField queries the field edge of a File.

func (*FileClient) QueryOwner

func (c *FileClient) QueryOwner(f *File) *UserQuery

QueryOwner queries the owner edge of a File.

func (*FileClient) QueryType

func (c *FileClient) QueryType(f *File) *FileTypeQuery

QueryType queries the type edge of a File.

func (*FileClient) Update

func (c *FileClient) Update() *FileUpdate

Update returns an update builder for File.

func (*FileClient) UpdateOne

func (c *FileClient) UpdateOne(f *File) *FileUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FileClient) UpdateOneID

func (c *FileClient) UpdateOneID(id int) *FileUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FileClient) Use

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

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

type FileCreate

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

FileCreate is the builder for creating a File entity.

func (*FileCreate) AddField

func (fc *FileCreate) AddField(f ...*FieldType) *FileCreate

AddField adds the "field" edges to the FieldType entity.

func (*FileCreate) AddFieldIDs

func (fc *FileCreate) AddFieldIDs(ids ...int) *FileCreate

AddFieldIDs adds the "field" edge to the FieldType entity by IDs.

func (*FileCreate) Exec added in v0.9.0

func (fc *FileCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileCreate) ExecX added in v0.9.0

func (fc *FileCreate) ExecX(ctx context.Context)

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

func (*FileCreate) Mutation

func (fc *FileCreate) Mutation() *FileMutation

Mutation returns the FileMutation object of the builder.

func (*FileCreate) OnConflict added in v0.9.0

func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne

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

client.File.Create().
	SetSize(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.FileUpsert) {
		SetSize(v+v).
	}).
	Exec(ctx)

func (*FileCreate) OnConflictColumns added in v0.9.0

func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne

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

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

func (*FileCreate) Save

func (fc *FileCreate) Save(ctx context.Context) (*File, error)

Save creates the File in the database.

func (*FileCreate) SaveX

func (fc *FileCreate) SaveX(ctx context.Context) *File

SaveX calls Save and panics if Save returns an error.

func (*FileCreate) SetGroup

func (fc *FileCreate) SetGroup(s string) *FileCreate

SetGroup sets the "group" field.

func (*FileCreate) SetName

func (fc *FileCreate) SetName(s string) *FileCreate

SetName sets the "name" field.

func (*FileCreate) SetNillableGroup

func (fc *FileCreate) SetNillableGroup(s *string) *FileCreate

SetNillableGroup sets the "group" field if the given value is not nil.

func (*FileCreate) SetNillableOp

func (fc *FileCreate) SetNillableOp(b *bool) *FileCreate

SetNillableOp sets the "op" field if the given value is not nil.

func (*FileCreate) SetNillableOwnerID

func (fc *FileCreate) SetNillableOwnerID(id *int) *FileCreate

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*FileCreate) SetNillableSize

func (fc *FileCreate) SetNillableSize(i *int) *FileCreate

SetNillableSize sets the "size" field if the given value is not nil.

func (*FileCreate) SetNillableTypeID

func (fc *FileCreate) SetNillableTypeID(id *int) *FileCreate

SetNillableTypeID sets the "type" edge to the FileType entity by ID if the given value is not nil.

func (*FileCreate) SetNillableUser

func (fc *FileCreate) SetNillableUser(s *string) *FileCreate

SetNillableUser sets the "user" field if the given value is not nil.

func (*FileCreate) SetOp

func (fc *FileCreate) SetOp(b bool) *FileCreate

SetOp sets the "op" field.

func (*FileCreate) SetOwner

func (fc *FileCreate) SetOwner(u *User) *FileCreate

SetOwner sets the "owner" edge to the User entity.

func (*FileCreate) SetOwnerID

func (fc *FileCreate) SetOwnerID(id int) *FileCreate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*FileCreate) SetSize

func (fc *FileCreate) SetSize(i int) *FileCreate

SetSize sets the "size" field.

func (*FileCreate) SetType

func (fc *FileCreate) SetType(f *FileType) *FileCreate

SetType sets the "type" edge to the FileType entity.

func (*FileCreate) SetTypeID

func (fc *FileCreate) SetTypeID(id int) *FileCreate

SetTypeID sets the "type" edge to the FileType entity by ID.

func (*FileCreate) SetUser

func (fc *FileCreate) SetUser(s string) *FileCreate

SetUser sets the "user" field.

type FileCreateBulk

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

FileCreateBulk is the builder for creating many File entities in bulk.

func (*FileCreateBulk) Exec added in v0.9.0

func (fcb *FileCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FileCreateBulk) ExecX added in v0.9.0

func (fcb *FileCreateBulk) ExecX(ctx context.Context)

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

func (*FileCreateBulk) OnConflict added in v0.9.0

func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk

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

client.File.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.FileUpsert) {
		SetSize(v+v).
	}).
	Exec(ctx)

func (*FileCreateBulk) OnConflictColumns added in v0.9.0

func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk

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

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

func (*FileCreateBulk) Save

func (fcb *FileCreateBulk) Save(ctx context.Context) ([]*File, error)

Save creates the File entities in the database.

func (*FileCreateBulk) SaveX

func (fcb *FileCreateBulk) SaveX(ctx context.Context) []*File

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

type FileDelete

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

FileDelete is the builder for deleting a File entity.

func (*FileDelete) Exec

func (fd *FileDelete) Exec(ctx context.Context) (int, error)

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

func (*FileDelete) ExecX

func (fd *FileDelete) ExecX(ctx context.Context) int

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

func (*FileDelete) Where

func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete

Where appends a list predicates to the FileDelete builder.

type FileDeleteOne

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

FileDeleteOne is the builder for deleting a single File entity.

func (*FileDeleteOne) Exec

func (fdo *FileDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FileDeleteOne) ExecX

func (fdo *FileDeleteOne) ExecX(ctx context.Context)

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

type FileEdges

type FileEdges struct {
	// Owner holds the value of the owner edge.
	Owner *User `json:"owner,omitempty"`
	// Type holds the value of the type edge.
	Type *FileType `json:"type,omitempty"`
	// Field holds the value of the field edge.
	Field []*FieldType `json:"field,omitempty"`
	// contains filtered or unexported fields
}

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

func (FileEdges) FieldOrErr

func (e FileEdges) FieldOrErr() ([]*FieldType, error)

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

func (FileEdges) OwnerOrErr

func (e FileEdges) OwnerOrErr() (*User, error)

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

func (FileEdges) TypeOrErr

func (e FileEdges) TypeOrErr() (*FileType, error)

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

type FileFilter

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

FileFilter provides a generic filtering capability at runtime for FileQuery.

func (*FileFilter) Where

func (f *FileFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*FileFilter) WhereGroup

func (f *FileFilter) WhereGroup(p entql.StringP)

WhereGroup applies the entql string predicate on the group field.

func (*FileFilter) WhereHasField

func (f *FileFilter) WhereHasField()

WhereHasField applies a predicate to check if query has an edge field.

func (*FileFilter) WhereHasFieldWith

func (f *FileFilter) WhereHasFieldWith(preds ...predicate.FieldType)

WhereHasFieldWith applies a predicate to check if query has an edge field with a given conditions (other predicates).

func (*FileFilter) WhereHasOwner

func (f *FileFilter) WhereHasOwner()

WhereHasOwner applies a predicate to check if query has an edge owner.

func (*FileFilter) WhereHasOwnerWith

func (f *FileFilter) WhereHasOwnerWith(preds ...predicate.User)

WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).

func (*FileFilter) WhereHasType

func (f *FileFilter) WhereHasType()

WhereHasType applies a predicate to check if query has an edge type.

func (*FileFilter) WhereHasTypeWith

func (f *FileFilter) WhereHasTypeWith(preds ...predicate.FileType)

WhereHasTypeWith applies a predicate to check if query has an edge type with a given conditions (other predicates).

func (*FileFilter) WhereID

func (f *FileFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*FileFilter) WhereName

func (f *FileFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*FileFilter) WhereOp

func (f *FileFilter) WhereOp(p entql.BoolP)

WhereOp applies the entql bool predicate on the op field.

func (*FileFilter) WhereSize

func (f *FileFilter) WhereSize(p entql.IntP)

WhereSize applies the entql int predicate on the size field.

func (*FileFilter) WhereUser

func (f *FileFilter) WhereUser(p entql.StringP)

WhereUser applies the entql string predicate on the user field.

type FileGroupBy

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

FileGroupBy is the group-by builder for File entities.

func (*FileGroupBy) Aggregate

func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy

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

func (*FileGroupBy) Bool

func (fgb *FileGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FileGroupBy) BoolX

func (fgb *FileGroupBy) BoolX(ctx context.Context) bool

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

func (*FileGroupBy) Bools

func (fgb *FileGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*FileGroupBy) BoolsX

func (fgb *FileGroupBy) BoolsX(ctx context.Context) []bool

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

func (*FileGroupBy) Float64

func (fgb *FileGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FileGroupBy) Float64X

func (fgb *FileGroupBy) Float64X(ctx context.Context) float64

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

func (*FileGroupBy) Float64s

func (fgb *FileGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*FileGroupBy) Float64sX

func (fgb *FileGroupBy) Float64sX(ctx context.Context) []float64

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

func (*FileGroupBy) Int

func (fgb *FileGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FileGroupBy) IntX

func (fgb *FileGroupBy) IntX(ctx context.Context) int

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

func (*FileGroupBy) Ints

func (fgb *FileGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*FileGroupBy) IntsX

func (fgb *FileGroupBy) IntsX(ctx context.Context) []int

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

func (*FileGroupBy) Scan

func (fgb *FileGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*FileGroupBy) ScanX

func (fgb *FileGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*FileGroupBy) String

func (fgb *FileGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FileGroupBy) StringX

func (fgb *FileGroupBy) StringX(ctx context.Context) string

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

func (*FileGroupBy) Strings

func (fgb *FileGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*FileGroupBy) StringsX

func (fgb *FileGroupBy) StringsX(ctx context.Context) []string

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

type FileMutation

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

FileMutation represents an operation that mutates the File nodes in the graph.

func (*FileMutation) AddField

func (m *FileMutation) 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 (*FileMutation) AddFieldIDs

func (m *FileMutation) AddFieldIDs(ids ...int)

AddFieldIDs adds the "field" edge to the FieldType entity by ids.

func (*FileMutation) AddSize

func (m *FileMutation) AddSize(i int)

AddSize adds i to the "size" field.

func (*FileMutation) AddedEdges

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

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

func (*FileMutation) AddedField

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

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

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

func (*FileMutation) AddedIDs

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

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

func (*FileMutation) AddedSize

func (m *FileMutation) AddedSize() (r int, exists bool)

AddedSize returns the value that was added to the "size" field in this mutation.

func (*FileMutation) ClearEdge

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

func (m *FileMutation) 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 (*FileMutation) ClearFieldEdge

func (m *FileMutation) ClearFieldEdge()

ClearFieldEdge clears the "field" edge to the FieldType entity.

func (*FileMutation) ClearGroup

func (m *FileMutation) ClearGroup()

ClearGroup clears the value of the "group" field.

func (*FileMutation) ClearOp

func (m *FileMutation) ClearOp()

ClearOp clears the value of the "op" field.

func (*FileMutation) ClearOwner

func (m *FileMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*FileMutation) ClearType

func (m *FileMutation) ClearType()

ClearType clears the "type" edge to the FileType entity.

func (*FileMutation) ClearUser

func (m *FileMutation) ClearUser()

ClearUser clears the value of the "user" field.

func (*FileMutation) ClearedEdges

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

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

func (*FileMutation) ClearedFields

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

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

func (FileMutation) Client

func (m FileMutation) 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 (*FileMutation) EdgeCleared

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

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

func (*FileMutation) Field

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

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

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

func (*FileMutation) FieldEdgeCleared

func (m *FileMutation) FieldEdgeCleared() bool

FieldEdgeCleared reports if the "field" edge to the FieldType entity was cleared.

func (*FileMutation) FieldIDs

func (m *FileMutation) FieldIDs() (ids []int)

FieldIDs returns the "field" edge IDs in the mutation.

func (*FileMutation) Fields

func (m *FileMutation) 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 (*FileMutation) Filter

func (m *FileMutation) Filter() *FileFilter

Filter returns an entql.Where implementation to apply filters on the FileMutation builder.

func (*FileMutation) GetOp

func (m *FileMutation) GetOp() (r bool, exists bool)

GetOp returns the value of the "op" field in the mutation.

func (*FileMutation) Group

func (m *FileMutation) Group() (r string, exists bool)

Group returns the value of the "group" field in the mutation.

func (*FileMutation) GroupCleared

func (m *FileMutation) GroupCleared() bool

GroupCleared returns if the "group" field was cleared in this mutation.

func (*FileMutation) ID

func (m *FileMutation) 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 (*FileMutation) IDs added in v0.10.0

func (m *FileMutation) 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 (*FileMutation) Name

func (m *FileMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*FileMutation) OldField

func (m *FileMutation) 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 (*FileMutation) OldGroup

func (m *FileMutation) OldGroup(ctx context.Context) (v string, err error)

OldGroup returns the old "group" field's value of the File entity. If the File 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 (*FileMutation) OldName

func (m *FileMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the File entity. If the File 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 (*FileMutation) OldOp

func (m *FileMutation) OldOp(ctx context.Context) (v bool, err error)

OldOp returns the old "op" field's value of the File entity. If the File 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 (*FileMutation) OldSize

func (m *FileMutation) OldSize(ctx context.Context) (v int, err error)

OldSize returns the old "size" field's value of the File entity. If the File 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 (*FileMutation) OldUser

func (m *FileMutation) OldUser(ctx context.Context) (v *string, err error)

OldUser returns the old "user" field's value of the File entity. If the File 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 (*FileMutation) Op

func (m *FileMutation) Op() Op

Op returns the operation name.

func (*FileMutation) OpCleared

func (m *FileMutation) OpCleared() bool

OpCleared returns if the "op" field was cleared in this mutation.

func (*FileMutation) OwnerCleared

func (m *FileMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*FileMutation) OwnerID

func (m *FileMutation) OwnerID() (id int, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*FileMutation) OwnerIDs

func (m *FileMutation) OwnerIDs() (ids []int)

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

func (*FileMutation) RemoveFieldIDs

func (m *FileMutation) RemoveFieldIDs(ids ...int)

RemoveFieldIDs removes the "field" edge to the FieldType entity by IDs.

func (*FileMutation) RemovedEdges

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

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

func (*FileMutation) RemovedFieldIDs

func (m *FileMutation) RemovedFieldIDs() (ids []int)

RemovedField returns the removed IDs of the "field" edge to the FieldType entity.

func (*FileMutation) RemovedIDs

func (m *FileMutation) 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 (*FileMutation) ResetEdge

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

func (m *FileMutation) 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 (*FileMutation) ResetFieldEdge

func (m *FileMutation) ResetFieldEdge()

ResetFieldEdge resets all changes to the "field" edge.

func (*FileMutation) ResetGroup

func (m *FileMutation) ResetGroup()

ResetGroup resets all changes to the "group" field.

func (*FileMutation) ResetName

func (m *FileMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*FileMutation) ResetOp

func (m *FileMutation) ResetOp()

ResetOp resets all changes to the "op" field.

func (*FileMutation) ResetOwner

func (m *FileMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*FileMutation) ResetSize

func (m *FileMutation) ResetSize()

ResetSize resets all changes to the "size" field.

func (*FileMutation) ResetType

func (m *FileMutation) ResetType()

ResetType resets all changes to the "type" edge.

func (*FileMutation) ResetUser

func (m *FileMutation) ResetUser()

ResetUser resets all changes to the "user" field.

func (*FileMutation) SetField

func (m *FileMutation) 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 (*FileMutation) SetGroup

func (m *FileMutation) SetGroup(s string)

SetGroup sets the "group" field.

func (*FileMutation) SetName

func (m *FileMutation) SetName(s string)

SetName sets the "name" field.

func (*FileMutation) SetOp

func (m *FileMutation) SetOp(b bool)

SetOp sets the "op" field.

func (*FileMutation) SetOwnerID

func (m *FileMutation) SetOwnerID(id int)

SetOwnerID sets the "owner" edge to the User entity by id.

func (*FileMutation) SetSize

func (m *FileMutation) SetSize(i int)

SetSize sets the "size" field.

func (*FileMutation) SetTypeID

func (m *FileMutation) SetTypeID(id int)

SetTypeID sets the "type" edge to the FileType entity by id.

func (*FileMutation) SetUser

func (m *FileMutation) SetUser(s string)

SetUser sets the "user" field.

func (*FileMutation) Size

func (m *FileMutation) Size() (r int, exists bool)

Size returns the value of the "size" field in the mutation.

func (FileMutation) Tx

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

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

func (*FileMutation) Type

func (m *FileMutation) Type() string

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

func (*FileMutation) TypeCleared

func (m *FileMutation) TypeCleared() bool

TypeCleared reports if the "type" edge to the FileType entity was cleared.

func (*FileMutation) TypeID

func (m *FileMutation) TypeID() (id int, exists bool)

TypeID returns the "type" edge ID in the mutation.

func (*FileMutation) TypeIDs

func (m *FileMutation) TypeIDs() (ids []int)

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

func (*FileMutation) User

func (m *FileMutation) User() (r string, exists bool)

User returns the value of the "user" field in the mutation.

func (*FileMutation) UserCleared

func (m *FileMutation) UserCleared() bool

UserCleared returns if the "user" field was cleared in this mutation.

func (*FileMutation) Where added in v0.9.0

func (m *FileMutation) Where(ps ...predicate.File)

Where appends a list predicates to the FileMutation builder.

type FileQuery

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

FileQuery is the builder for querying File entities.

func (*FileQuery) All

func (fq *FileQuery) All(ctx context.Context) ([]*File, error)

All executes the query and returns a list of Files.

func (*FileQuery) AllX

func (fq *FileQuery) AllX(ctx context.Context) []*File

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

func (*FileQuery) Clone

func (fq *FileQuery) Clone() *FileQuery

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

func (*FileQuery) Count

func (fq *FileQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FileQuery) CountX

func (fq *FileQuery) CountX(ctx context.Context) int

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

func (*FileQuery) Exist

func (fq *FileQuery) Exist(ctx context.Context) (bool, error)

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

func (*FileQuery) ExistX

func (fq *FileQuery) ExistX(ctx context.Context) bool

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

func (*FileQuery) Filter

func (fq *FileQuery) Filter() *FileFilter

Filter returns a Filter implementation to apply filters on the FileQuery builder.

func (*FileQuery) First

func (fq *FileQuery) First(ctx context.Context) (*File, error)

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

func (*FileQuery) FirstID

func (fq *FileQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*FileQuery) FirstIDX

func (fq *FileQuery) FirstIDX(ctx context.Context) int

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

func (*FileQuery) FirstX

func (fq *FileQuery) FirstX(ctx context.Context) *File

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

func (*FileQuery) ForShare added in v0.9.0

func (fq *FileQuery) ForShare(opts ...sql.LockOption) *FileQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*FileQuery) ForUpdate added in v0.9.0

func (fq *FileQuery) ForUpdate(opts ...sql.LockOption) *FileQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*FileQuery) GroupBy

func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy

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 {
	Size int `json:"size,omitempty"`
	Count int `json:"count,omitempty"`
}

client.File.Query().
	GroupBy(file.FieldSize).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FileQuery) IDs

func (fq *FileQuery) IDs(ctx context.Context) ([]int, error)

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

func (*FileQuery) IDsX

func (fq *FileQuery) IDsX(ctx context.Context) []int

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

func (*FileQuery) Limit

func (fq *FileQuery) Limit(limit int) *FileQuery

Limit adds a limit step to the query.

func (*FileQuery) Modify added in v0.9.0

func (fq *FileQuery) Modify(modifiers ...func(s *sql.Selector)) *FileSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*FileQuery) Offset

func (fq *FileQuery) Offset(offset int) *FileQuery

Offset adds an offset step to the query.

func (*FileQuery) Only

func (fq *FileQuery) Only(ctx context.Context) (*File, error)

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

func (*FileQuery) OnlyID

func (fq *FileQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*FileQuery) OnlyIDX

func (fq *FileQuery) OnlyIDX(ctx context.Context) int

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

func (*FileQuery) OnlyX

func (fq *FileQuery) OnlyX(ctx context.Context) *File

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

func (*FileQuery) Order

func (fq *FileQuery) Order(o ...OrderFunc) *FileQuery

Order adds an order step to the query.

func (*FileQuery) QueryField

func (fq *FileQuery) QueryField() *FieldTypeQuery

QueryField chains the current query on the "field" edge.

func (*FileQuery) QueryOwner

func (fq *FileQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*FileQuery) QueryType

func (fq *FileQuery) QueryType() *FileTypeQuery

QueryType chains the current query on the "type" edge.

func (*FileQuery) Select

func (fq *FileQuery) Select(fields ...string) *FileSelect

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 {
	Size int `json:"size,omitempty"`
}

client.File.Query().
	Select(file.FieldSize).
	Scan(ctx, &v)

func (*FileQuery) Unique added in v0.8.0

func (fq *FileQuery) Unique(unique bool) *FileQuery

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 (*FileQuery) Where

func (fq *FileQuery) Where(ps ...predicate.File) *FileQuery

Where adds a new predicate for the FileQuery builder.

func (*FileQuery) WithField

func (fq *FileQuery) WithField(opts ...func(*FieldTypeQuery)) *FileQuery

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

func (*FileQuery) WithOwner

func (fq *FileQuery) WithOwner(opts ...func(*UserQuery)) *FileQuery

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

func (*FileQuery) WithType

func (fq *FileQuery) WithType(opts ...func(*FileTypeQuery)) *FileQuery

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

type FileSelect

type FileSelect struct {
	*FileQuery
	// contains filtered or unexported fields
}

FileSelect is the builder for selecting fields of File entities.

func (*FileSelect) Bool

func (fs *FileSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*FileSelect) BoolX

func (fs *FileSelect) BoolX(ctx context.Context) bool

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

func (*FileSelect) Bools

func (fs *FileSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*FileSelect) BoolsX

func (fs *FileSelect) BoolsX(ctx context.Context) []bool

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

func (*FileSelect) Float64

func (fs *FileSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*FileSelect) Float64X

func (fs *FileSelect) Float64X(ctx context.Context) float64

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

func (*FileSelect) Float64s

func (fs *FileSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*FileSelect) Float64sX

func (fs *FileSelect) Float64sX(ctx context.Context) []float64

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

func (*FileSelect) Int

func (fs *FileSelect) Int(ctx context.Context) (_ int, err error)

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

func (*FileSelect) IntX

func (fs *FileSelect) IntX(ctx context.Context) int

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

func (*FileSelect) Ints

func (fs *FileSelect) Ints(ctx context.Context) ([]int, error)

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

func (*FileSelect) IntsX

func (fs *FileSelect) IntsX(ctx context.Context) []int

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

func (*FileSelect) Modify added in v0.9.0

func (fs *FileSelect) Modify(modifiers ...func(s *sql.Selector)) *FileSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*FileSelect) Scan

func (fs *FileSelect) Scan(ctx context.Context, v interface{}) error

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

func (*FileSelect) ScanX

func (fs *FileSelect) ScanX(ctx context.Context, v interface{})

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

func (*FileSelect) String

func (fs *FileSelect) String(ctx context.Context) (_ string, err error)

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

func (*FileSelect) StringX

func (fs *FileSelect) StringX(ctx context.Context) string

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

func (*FileSelect) Strings

func (fs *FileSelect) Strings(ctx context.Context) ([]string, error)

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

func (*FileSelect) StringsX

func (fs *FileSelect) StringsX(ctx context.Context) []string

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

type FileType

type FileType struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Type holds the value of the "type" field.
	Type filetype.Type `json:"type,omitempty"`
	// State holds the value of the "state" field.
	State filetype.State `json:"state,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the FileTypeQuery when eager-loading is set.
	Edges FileTypeEdges `json:"edges"`
	// contains filtered or unexported fields
}

FileType is the model entity for the FileType schema.

func (*FileType) QueryFiles

func (ft *FileType) QueryFiles() *FileQuery

QueryFiles queries the "files" edge of the FileType entity.

func (*FileType) String

func (ft *FileType) String() string

String implements the fmt.Stringer.

func (*FileType) Unwrap

func (ft *FileType) Unwrap() *FileType

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

func (ft *FileType) Update() *FileTypeUpdateOne

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

type FileTypeClient

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

FileTypeClient is a client for the FileType schema.

func NewFileTypeClient

func NewFileTypeClient(c config) *FileTypeClient

NewFileTypeClient returns a client for the FileType from the given config.

func (*FileTypeClient) Create

func (c *FileTypeClient) Create() *FileTypeCreate

Create returns a create builder for FileType.

func (*FileTypeClient) CreateBulk

func (c *FileTypeClient) CreateBulk(builders ...*FileTypeCreate) *FileTypeCreateBulk

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

func (*FileTypeClient) Delete

func (c *FileTypeClient) Delete() *FileTypeDelete

Delete returns a delete builder for FileType.

func (*FileTypeClient) DeleteOne

func (c *FileTypeClient) DeleteOne(ft *FileType) *FileTypeDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*FileTypeClient) DeleteOneID

func (c *FileTypeClient) DeleteOneID(id int) *FileTypeDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*FileTypeClient) Get

func (c *FileTypeClient) Get(ctx context.Context, id int) (*FileType, error)

Get returns a FileType entity by its id.

func (*FileTypeClient) GetX

func (c *FileTypeClient) GetX(ctx context.Context, id int) *FileType

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

func (*FileTypeClient) Hooks

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

Hooks returns the client hooks.

func (*FileTypeClient) Query

func (c *FileTypeClient) Query() *FileTypeQuery

Query returns a query builder for FileType.

func (*FileTypeClient) QueryFiles

func (c *FileTypeClient) QueryFiles(ft *FileType) *FileQuery

QueryFiles queries the files edge of a FileType.

func (*FileTypeClient) Update

func (c *FileTypeClient) Update() *FileTypeUpdate

Update returns an update builder for FileType.

func (*FileTypeClient) UpdateOne

func (c *FileTypeClient) UpdateOne(ft *FileType) *FileTypeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*FileTypeClient) UpdateOneID

func (c *FileTypeClient) UpdateOneID(id int) *FileTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*FileTypeClient) Use

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

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

type FileTypeCreate

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

FileTypeCreate is the builder for creating a FileType entity.

func (*FileTypeCreate) AddFileIDs

func (ftc *FileTypeCreate) AddFileIDs(ids ...int) *FileTypeCreate

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*FileTypeCreate) AddFiles

func (ftc *FileTypeCreate) AddFiles(f ...*File) *FileTypeCreate

AddFiles adds the "files" edges to the File entity.

func (*FileTypeCreate) Exec added in v0.9.0

func (ftc *FileTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileTypeCreate) ExecX added in v0.9.0

func (ftc *FileTypeCreate) ExecX(ctx context.Context)

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

func (*FileTypeCreate) Mutation

func (ftc *FileTypeCreate) Mutation() *FileTypeMutation

Mutation returns the FileTypeMutation object of the builder.

func (*FileTypeCreate) OnConflict added in v0.9.0

func (ftc *FileTypeCreate) OnConflict(opts ...sql.ConflictOption) *FileTypeUpsertOne

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

client.FileType.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.FileTypeUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*FileTypeCreate) OnConflictColumns added in v0.9.0

func (ftc *FileTypeCreate) OnConflictColumns(columns ...string) *FileTypeUpsertOne

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

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

func (*FileTypeCreate) Save

func (ftc *FileTypeCreate) Save(ctx context.Context) (*FileType, error)

Save creates the FileType in the database.

func (*FileTypeCreate) SaveX

func (ftc *FileTypeCreate) SaveX(ctx context.Context) *FileType

SaveX calls Save and panics if Save returns an error.

func (*FileTypeCreate) SetName

func (ftc *FileTypeCreate) SetName(s string) *FileTypeCreate

SetName sets the "name" field.

func (*FileTypeCreate) SetNillableState

func (ftc *FileTypeCreate) SetNillableState(f *filetype.State) *FileTypeCreate

SetNillableState sets the "state" field if the given value is not nil.

func (*FileTypeCreate) SetNillableType

func (ftc *FileTypeCreate) SetNillableType(f *filetype.Type) *FileTypeCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*FileTypeCreate) SetState

func (ftc *FileTypeCreate) SetState(f filetype.State) *FileTypeCreate

SetState sets the "state" field.

func (*FileTypeCreate) SetType

func (ftc *FileTypeCreate) SetType(f filetype.Type) *FileTypeCreate

SetType sets the "type" field.

type FileTypeCreateBulk

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

FileTypeCreateBulk is the builder for creating many FileType entities in bulk.

func (*FileTypeCreateBulk) Exec added in v0.9.0

func (ftcb *FileTypeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FileTypeCreateBulk) ExecX added in v0.9.0

func (ftcb *FileTypeCreateBulk) ExecX(ctx context.Context)

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

func (*FileTypeCreateBulk) OnConflict added in v0.9.0

func (ftcb *FileTypeCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileTypeUpsertBulk

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

client.FileType.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.FileTypeUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*FileTypeCreateBulk) OnConflictColumns added in v0.9.0

func (ftcb *FileTypeCreateBulk) OnConflictColumns(columns ...string) *FileTypeUpsertBulk

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

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

func (*FileTypeCreateBulk) Save

func (ftcb *FileTypeCreateBulk) Save(ctx context.Context) ([]*FileType, error)

Save creates the FileType entities in the database.

func (*FileTypeCreateBulk) SaveX

func (ftcb *FileTypeCreateBulk) SaveX(ctx context.Context) []*FileType

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

type FileTypeDelete

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

FileTypeDelete is the builder for deleting a FileType entity.

func (*FileTypeDelete) Exec

func (ftd *FileTypeDelete) Exec(ctx context.Context) (int, error)

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

func (*FileTypeDelete) ExecX

func (ftd *FileTypeDelete) ExecX(ctx context.Context) int

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

func (*FileTypeDelete) Where

func (ftd *FileTypeDelete) Where(ps ...predicate.FileType) *FileTypeDelete

Where appends a list predicates to the FileTypeDelete builder.

type FileTypeDeleteOne

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

FileTypeDeleteOne is the builder for deleting a single FileType entity.

func (*FileTypeDeleteOne) Exec

func (ftdo *FileTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*FileTypeDeleteOne) ExecX

func (ftdo *FileTypeDeleteOne) ExecX(ctx context.Context)

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

type FileTypeEdges

type FileTypeEdges struct {
	// Files holds the value of the files edge.
	Files []*File `json:"files,omitempty"`
	// contains filtered or unexported fields
}

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

func (FileTypeEdges) FilesOrErr

func (e FileTypeEdges) FilesOrErr() ([]*File, error)

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

type FileTypeFilter

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

FileTypeFilter provides a generic filtering capability at runtime for FileTypeQuery.

func (*FileTypeFilter) Where

func (f *FileTypeFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*FileTypeFilter) WhereHasFiles

func (f *FileTypeFilter) WhereHasFiles()

WhereHasFiles applies a predicate to check if query has an edge files.

func (*FileTypeFilter) WhereHasFilesWith

func (f *FileTypeFilter) WhereHasFilesWith(preds ...predicate.File)

WhereHasFilesWith applies a predicate to check if query has an edge files with a given conditions (other predicates).

func (*FileTypeFilter) WhereID

func (f *FileTypeFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*FileTypeFilter) WhereName

func (f *FileTypeFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*FileTypeFilter) WhereState

func (f *FileTypeFilter) WhereState(p entql.StringP)

WhereState applies the entql string predicate on the state field.

func (*FileTypeFilter) WhereType

func (f *FileTypeFilter) WhereType(p entql.StringP)

WhereType applies the entql string predicate on the type field.

type FileTypeGroupBy

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

FileTypeGroupBy is the group-by builder for FileType entities.

func (*FileTypeGroupBy) Aggregate

func (ftgb *FileTypeGroupBy) Aggregate(fns ...AggregateFunc) *FileTypeGroupBy

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

func (*FileTypeGroupBy) Bool

func (ftgb *FileTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FileTypeGroupBy) BoolX

func (ftgb *FileTypeGroupBy) BoolX(ctx context.Context) bool

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

func (*FileTypeGroupBy) Bools

func (ftgb *FileTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*FileTypeGroupBy) BoolsX

func (ftgb *FileTypeGroupBy) BoolsX(ctx context.Context) []bool

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

func (*FileTypeGroupBy) Float64

func (ftgb *FileTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FileTypeGroupBy) Float64X

func (ftgb *FileTypeGroupBy) Float64X(ctx context.Context) float64

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

func (*FileTypeGroupBy) Float64s

func (ftgb *FileTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*FileTypeGroupBy) Float64sX

func (ftgb *FileTypeGroupBy) Float64sX(ctx context.Context) []float64

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

func (*FileTypeGroupBy) Int

func (ftgb *FileTypeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FileTypeGroupBy) IntX

func (ftgb *FileTypeGroupBy) IntX(ctx context.Context) int

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

func (*FileTypeGroupBy) Ints

func (ftgb *FileTypeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*FileTypeGroupBy) IntsX

func (ftgb *FileTypeGroupBy) IntsX(ctx context.Context) []int

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

func (*FileTypeGroupBy) Scan

func (ftgb *FileTypeGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*FileTypeGroupBy) ScanX

func (ftgb *FileTypeGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*FileTypeGroupBy) String

func (ftgb *FileTypeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*FileTypeGroupBy) StringX

func (ftgb *FileTypeGroupBy) StringX(ctx context.Context) string

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

func (*FileTypeGroupBy) Strings

func (ftgb *FileTypeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*FileTypeGroupBy) StringsX

func (ftgb *FileTypeGroupBy) StringsX(ctx context.Context) []string

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

type FileTypeMutation

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

FileTypeMutation represents an operation that mutates the FileType nodes in the graph.

func (*FileTypeMutation) AddField

func (m *FileTypeMutation) 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 (*FileTypeMutation) AddFileIDs

func (m *FileTypeMutation) AddFileIDs(ids ...int)

AddFileIDs adds the "files" edge to the File entity by ids.

func (*FileTypeMutation) AddedEdges

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

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

func (*FileTypeMutation) AddedField

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

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

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

func (*FileTypeMutation) AddedIDs

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

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

func (*FileTypeMutation) ClearEdge

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

func (m *FileTypeMutation) 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 (*FileTypeMutation) ClearFiles

func (m *FileTypeMutation) ClearFiles()

ClearFiles clears the "files" edge to the File entity.

func (*FileTypeMutation) ClearedEdges

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

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

func (*FileTypeMutation) ClearedFields

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

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

func (FileTypeMutation) Client

func (m FileTypeMutation) 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 (*FileTypeMutation) EdgeCleared

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

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

func (*FileTypeMutation) Field

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

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

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

func (*FileTypeMutation) Fields

func (m *FileTypeMutation) 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 (*FileTypeMutation) FilesCleared

func (m *FileTypeMutation) FilesCleared() bool

FilesCleared reports if the "files" edge to the File entity was cleared.

func (*FileTypeMutation) FilesIDs

func (m *FileTypeMutation) FilesIDs() (ids []int)

FilesIDs returns the "files" edge IDs in the mutation.

func (*FileTypeMutation) Filter

func (m *FileTypeMutation) Filter() *FileTypeFilter

Filter returns an entql.Where implementation to apply filters on the FileTypeMutation builder.

func (*FileTypeMutation) GetType

func (m *FileTypeMutation) GetType() (r filetype.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*FileTypeMutation) ID

func (m *FileTypeMutation) 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 (*FileTypeMutation) IDs added in v0.10.0

func (m *FileTypeMutation) 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 (*FileTypeMutation) Name

func (m *FileTypeMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*FileTypeMutation) OldField

func (m *FileTypeMutation) 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 (*FileTypeMutation) OldName

func (m *FileTypeMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the FileType entity. If the FileType 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 (*FileTypeMutation) OldState

func (m *FileTypeMutation) OldState(ctx context.Context) (v filetype.State, err error)

OldState returns the old "state" field's value of the FileType entity. If the FileType 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 (*FileTypeMutation) OldType

func (m *FileTypeMutation) OldType(ctx context.Context) (v filetype.Type, err error)

OldType returns the old "type" field's value of the FileType entity. If the FileType 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 (*FileTypeMutation) Op

func (m *FileTypeMutation) Op() Op

Op returns the operation name.

func (*FileTypeMutation) RemoveFileIDs

func (m *FileTypeMutation) RemoveFileIDs(ids ...int)

RemoveFileIDs removes the "files" edge to the File entity by IDs.

func (*FileTypeMutation) RemovedEdges

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

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

func (*FileTypeMutation) RemovedFilesIDs

func (m *FileTypeMutation) RemovedFilesIDs() (ids []int)

RemovedFiles returns the removed IDs of the "files" edge to the File entity.

func (*FileTypeMutation) RemovedIDs

func (m *FileTypeMutation) 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 (*FileTypeMutation) ResetEdge

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

func (m *FileTypeMutation) 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 (*FileTypeMutation) ResetFiles

func (m *FileTypeMutation) ResetFiles()

ResetFiles resets all changes to the "files" edge.

func (*FileTypeMutation) ResetName

func (m *FileTypeMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*FileTypeMutation) ResetState

func (m *FileTypeMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*FileTypeMutation) ResetType

func (m *FileTypeMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*FileTypeMutation) SetField

func (m *FileTypeMutation) 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 (*FileTypeMutation) SetName

func (m *FileTypeMutation) SetName(s string)

SetName sets the "name" field.

func (*FileTypeMutation) SetState

func (m *FileTypeMutation) SetState(f filetype.State)

SetState sets the "state" field.

func (*FileTypeMutation) SetType

func (m *FileTypeMutation) SetType(f filetype.Type)

SetType sets the "type" field.

func (*FileTypeMutation) State

func (m *FileTypeMutation) State() (r filetype.State, exists bool)

State returns the value of the "state" field in the mutation.

func (FileTypeMutation) Tx

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

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

func (*FileTypeMutation) Type

func (m *FileTypeMutation) Type() string

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

func (*FileTypeMutation) Where added in v0.9.0

func (m *FileTypeMutation) Where(ps ...predicate.FileType)

Where appends a list predicates to the FileTypeMutation builder.

type FileTypeQuery

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

FileTypeQuery is the builder for querying FileType entities.

func (*FileTypeQuery) All

func (ftq *FileTypeQuery) All(ctx context.Context) ([]*FileType, error)

All executes the query and returns a list of FileTypes.

func (*FileTypeQuery) AllX

func (ftq *FileTypeQuery) AllX(ctx context.Context) []*FileType

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

func (*FileTypeQuery) Clone

func (ftq *FileTypeQuery) Clone() *FileTypeQuery

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

func (*FileTypeQuery) Count

func (ftq *FileTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*FileTypeQuery) CountX

func (ftq *FileTypeQuery) CountX(ctx context.Context) int

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

func (*FileTypeQuery) Exist

func (ftq *FileTypeQuery) Exist(ctx context.Context) (bool, error)

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

func (*FileTypeQuery) ExistX

func (ftq *FileTypeQuery) ExistX(ctx context.Context) bool

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

func (*FileTypeQuery) Filter

func (ftq *FileTypeQuery) Filter() *FileTypeFilter

Filter returns a Filter implementation to apply filters on the FileTypeQuery builder.

func (*FileTypeQuery) First

func (ftq *FileTypeQuery) First(ctx context.Context) (*FileType, error)

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

func (*FileTypeQuery) FirstID

func (ftq *FileTypeQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*FileTypeQuery) FirstIDX

func (ftq *FileTypeQuery) FirstIDX(ctx context.Context) int

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

func (*FileTypeQuery) FirstX

func (ftq *FileTypeQuery) FirstX(ctx context.Context) *FileType

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

func (*FileTypeQuery) ForShare added in v0.9.0

func (ftq *FileTypeQuery) ForShare(opts ...sql.LockOption) *FileTypeQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*FileTypeQuery) ForUpdate added in v0.9.0

func (ftq *FileTypeQuery) ForUpdate(opts ...sql.LockOption) *FileTypeQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*FileTypeQuery) GroupBy

func (ftq *FileTypeQuery) GroupBy(field string, fields ...string) *FileTypeGroupBy

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.FileType.Query().
	GroupBy(filetype.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*FileTypeQuery) IDs

func (ftq *FileTypeQuery) IDs(ctx context.Context) ([]int, error)

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

func (*FileTypeQuery) IDsX

func (ftq *FileTypeQuery) IDsX(ctx context.Context) []int

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

func (*FileTypeQuery) Limit

func (ftq *FileTypeQuery) Limit(limit int) *FileTypeQuery

Limit adds a limit step to the query.

func (*FileTypeQuery) Modify added in v0.9.0

func (ftq *FileTypeQuery) Modify(modifiers ...func(s *sql.Selector)) *FileTypeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*FileTypeQuery) Offset

func (ftq *FileTypeQuery) Offset(offset int) *FileTypeQuery

Offset adds an offset step to the query.

func (*FileTypeQuery) Only

func (ftq *FileTypeQuery) Only(ctx context.Context) (*FileType, error)

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

func (*FileTypeQuery) OnlyID

func (ftq *FileTypeQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*FileTypeQuery) OnlyIDX

func (ftq *FileTypeQuery) OnlyIDX(ctx context.Context) int

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

func (*FileTypeQuery) OnlyX

func (ftq *FileTypeQuery) OnlyX(ctx context.Context) *FileType

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

func (*FileTypeQuery) Order

func (ftq *FileTypeQuery) Order(o ...OrderFunc) *FileTypeQuery

Order adds an order step to the query.

func (*FileTypeQuery) QueryFiles

func (ftq *FileTypeQuery) QueryFiles() *FileQuery

QueryFiles chains the current query on the "files" edge.

func (*FileTypeQuery) Select

func (ftq *FileTypeQuery) Select(fields ...string) *FileTypeSelect

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.FileType.Query().
	Select(filetype.FieldName).
	Scan(ctx, &v)

func (*FileTypeQuery) Unique added in v0.8.0

func (ftq *FileTypeQuery) Unique(unique bool) *FileTypeQuery

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 (*FileTypeQuery) Where

func (ftq *FileTypeQuery) Where(ps ...predicate.FileType) *FileTypeQuery

Where adds a new predicate for the FileTypeQuery builder.

func (*FileTypeQuery) WithFiles

func (ftq *FileTypeQuery) WithFiles(opts ...func(*FileQuery)) *FileTypeQuery

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

type FileTypeSelect

type FileTypeSelect struct {
	*FileTypeQuery
	// contains filtered or unexported fields
}

FileTypeSelect is the builder for selecting fields of FileType entities.

func (*FileTypeSelect) Bool

func (fts *FileTypeSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*FileTypeSelect) BoolX

func (fts *FileTypeSelect) BoolX(ctx context.Context) bool

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

func (*FileTypeSelect) Bools

func (fts *FileTypeSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*FileTypeSelect) BoolsX

func (fts *FileTypeSelect) BoolsX(ctx context.Context) []bool

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

func (*FileTypeSelect) Float64

func (fts *FileTypeSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*FileTypeSelect) Float64X

func (fts *FileTypeSelect) Float64X(ctx context.Context) float64

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

func (*FileTypeSelect) Float64s

func (fts *FileTypeSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*FileTypeSelect) Float64sX

func (fts *FileTypeSelect) Float64sX(ctx context.Context) []float64

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

func (*FileTypeSelect) Int

func (fts *FileTypeSelect) Int(ctx context.Context) (_ int, err error)

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

func (*FileTypeSelect) IntX

func (fts *FileTypeSelect) IntX(ctx context.Context) int

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

func (*FileTypeSelect) Ints

func (fts *FileTypeSelect) Ints(ctx context.Context) ([]int, error)

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

func (*FileTypeSelect) IntsX

func (fts *FileTypeSelect) IntsX(ctx context.Context) []int

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

func (*FileTypeSelect) Modify added in v0.9.0

func (fts *FileTypeSelect) Modify(modifiers ...func(s *sql.Selector)) *FileTypeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*FileTypeSelect) Scan

func (fts *FileTypeSelect) Scan(ctx context.Context, v interface{}) error

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

func (*FileTypeSelect) ScanX

func (fts *FileTypeSelect) ScanX(ctx context.Context, v interface{})

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

func (*FileTypeSelect) String

func (fts *FileTypeSelect) String(ctx context.Context) (_ string, err error)

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

func (*FileTypeSelect) StringX

func (fts *FileTypeSelect) StringX(ctx context.Context) string

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

func (*FileTypeSelect) Strings

func (fts *FileTypeSelect) Strings(ctx context.Context) ([]string, error)

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

func (*FileTypeSelect) StringsX

func (fts *FileTypeSelect) StringsX(ctx context.Context) []string

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

type FileTypeUpdate

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

FileTypeUpdate is the builder for updating FileType entities.

func (*FileTypeUpdate) AddFileIDs

func (ftu *FileTypeUpdate) AddFileIDs(ids ...int) *FileTypeUpdate

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*FileTypeUpdate) AddFiles

func (ftu *FileTypeUpdate) AddFiles(f ...*File) *FileTypeUpdate

AddFiles adds the "files" edges to the File entity.

func (*FileTypeUpdate) ClearFiles

func (ftu *FileTypeUpdate) ClearFiles() *FileTypeUpdate

ClearFiles clears all "files" edges to the File entity.

func (*FileTypeUpdate) Exec

func (ftu *FileTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileTypeUpdate) ExecX

func (ftu *FileTypeUpdate) ExecX(ctx context.Context)

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

func (*FileTypeUpdate) Mutation

func (ftu *FileTypeUpdate) Mutation() *FileTypeMutation

Mutation returns the FileTypeMutation object of the builder.

func (*FileTypeUpdate) RemoveFileIDs

func (ftu *FileTypeUpdate) RemoveFileIDs(ids ...int) *FileTypeUpdate

RemoveFileIDs removes the "files" edge to File entities by IDs.

func (*FileTypeUpdate) RemoveFiles

func (ftu *FileTypeUpdate) RemoveFiles(f ...*File) *FileTypeUpdate

RemoveFiles removes "files" edges to File entities.

func (*FileTypeUpdate) Save

func (ftu *FileTypeUpdate) Save(ctx context.Context) (int, error)

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

func (*FileTypeUpdate) SaveX

func (ftu *FileTypeUpdate) SaveX(ctx context.Context) int

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

func (*FileTypeUpdate) SetName

func (ftu *FileTypeUpdate) SetName(s string) *FileTypeUpdate

SetName sets the "name" field.

func (*FileTypeUpdate) SetNillableState

func (ftu *FileTypeUpdate) SetNillableState(f *filetype.State) *FileTypeUpdate

SetNillableState sets the "state" field if the given value is not nil.

func (*FileTypeUpdate) SetNillableType

func (ftu *FileTypeUpdate) SetNillableType(f *filetype.Type) *FileTypeUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*FileTypeUpdate) SetState

func (ftu *FileTypeUpdate) SetState(f filetype.State) *FileTypeUpdate

SetState sets the "state" field.

func (*FileTypeUpdate) SetType

func (ftu *FileTypeUpdate) SetType(f filetype.Type) *FileTypeUpdate

SetType sets the "type" field.

func (*FileTypeUpdate) Where

func (ftu *FileTypeUpdate) Where(ps ...predicate.FileType) *FileTypeUpdate

Where appends a list predicates to the FileTypeUpdate builder.

type FileTypeUpdateOne

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

FileTypeUpdateOne is the builder for updating a single FileType entity.

func (*FileTypeUpdateOne) AddFileIDs

func (ftuo *FileTypeUpdateOne) AddFileIDs(ids ...int) *FileTypeUpdateOne

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*FileTypeUpdateOne) AddFiles

func (ftuo *FileTypeUpdateOne) AddFiles(f ...*File) *FileTypeUpdateOne

AddFiles adds the "files" edges to the File entity.

func (*FileTypeUpdateOne) ClearFiles

func (ftuo *FileTypeUpdateOne) ClearFiles() *FileTypeUpdateOne

ClearFiles clears all "files" edges to the File entity.

func (*FileTypeUpdateOne) Exec

func (ftuo *FileTypeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FileTypeUpdateOne) ExecX

func (ftuo *FileTypeUpdateOne) ExecX(ctx context.Context)

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

func (*FileTypeUpdateOne) Mutation

func (ftuo *FileTypeUpdateOne) Mutation() *FileTypeMutation

Mutation returns the FileTypeMutation object of the builder.

func (*FileTypeUpdateOne) RemoveFileIDs

func (ftuo *FileTypeUpdateOne) RemoveFileIDs(ids ...int) *FileTypeUpdateOne

RemoveFileIDs removes the "files" edge to File entities by IDs.

func (*FileTypeUpdateOne) RemoveFiles

func (ftuo *FileTypeUpdateOne) RemoveFiles(f ...*File) *FileTypeUpdateOne

RemoveFiles removes "files" edges to File entities.

func (*FileTypeUpdateOne) Save

func (ftuo *FileTypeUpdateOne) Save(ctx context.Context) (*FileType, error)

Save executes the query and returns the updated FileType entity.

func (*FileTypeUpdateOne) SaveX

func (ftuo *FileTypeUpdateOne) SaveX(ctx context.Context) *FileType

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

func (*FileTypeUpdateOne) Select added in v0.8.0

func (ftuo *FileTypeUpdateOne) Select(field string, fields ...string) *FileTypeUpdateOne

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

func (*FileTypeUpdateOne) SetName

func (ftuo *FileTypeUpdateOne) SetName(s string) *FileTypeUpdateOne

SetName sets the "name" field.

func (*FileTypeUpdateOne) SetNillableState

func (ftuo *FileTypeUpdateOne) SetNillableState(f *filetype.State) *FileTypeUpdateOne

SetNillableState sets the "state" field if the given value is not nil.

func (*FileTypeUpdateOne) SetNillableType

func (ftuo *FileTypeUpdateOne) SetNillableType(f *filetype.Type) *FileTypeUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*FileTypeUpdateOne) SetState

SetState sets the "state" field.

func (*FileTypeUpdateOne) SetType

SetType sets the "type" field.

type FileTypeUpsert added in v0.9.0

type FileTypeUpsert struct {
	*sql.UpdateSet
}

FileTypeUpsert is the "OnConflict" setter.

func (*FileTypeUpsert) SetName added in v0.9.0

func (u *FileTypeUpsert) SetName(v string) *FileTypeUpsert

SetName sets the "name" field.

func (*FileTypeUpsert) SetState added in v0.9.0

func (u *FileTypeUpsert) SetState(v filetype.State) *FileTypeUpsert

SetState sets the "state" field.

func (*FileTypeUpsert) SetType added in v0.9.0

func (u *FileTypeUpsert) SetType(v filetype.Type) *FileTypeUpsert

SetType sets the "type" field.

func (*FileTypeUpsert) UpdateName added in v0.9.0

func (u *FileTypeUpsert) UpdateName() *FileTypeUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*FileTypeUpsert) UpdateState added in v0.9.0

func (u *FileTypeUpsert) UpdateState() *FileTypeUpsert

UpdateState sets the "state" field to the value that was provided on create.

func (*FileTypeUpsert) UpdateType added in v0.9.0

func (u *FileTypeUpsert) UpdateType() *FileTypeUpsert

UpdateType sets the "type" field to the value that was provided on create.

type FileTypeUpsertBulk added in v0.9.0

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

FileTypeUpsertBulk is the builder for "upsert"-ing a bulk of FileType nodes.

func (*FileTypeUpsertBulk) DoNothing added in v0.9.0

func (u *FileTypeUpsertBulk) DoNothing() *FileTypeUpsertBulk

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

func (*FileTypeUpsertBulk) Exec added in v0.9.0

func (u *FileTypeUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FileTypeUpsertBulk) ExecX added in v0.9.0

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

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

func (*FileTypeUpsertBulk) Ignore added in v0.9.0

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

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

func (*FileTypeUpsertBulk) SetName added in v0.9.0

SetName sets the "name" field.

func (*FileTypeUpsertBulk) SetState added in v0.9.0

SetState sets the "state" field.

func (*FileTypeUpsertBulk) SetType added in v0.9.0

SetType sets the "type" field.

func (*FileTypeUpsertBulk) Update added in v0.9.0

func (u *FileTypeUpsertBulk) Update(set func(*FileTypeUpsert)) *FileTypeUpsertBulk

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

func (*FileTypeUpsertBulk) UpdateName added in v0.9.0

func (u *FileTypeUpsertBulk) UpdateName() *FileTypeUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*FileTypeUpsertBulk) UpdateNewValues added in v0.9.0

func (u *FileTypeUpsertBulk) UpdateNewValues() *FileTypeUpsertBulk

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

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

func (*FileTypeUpsertBulk) UpdateState added in v0.9.0

func (u *FileTypeUpsertBulk) UpdateState() *FileTypeUpsertBulk

UpdateState sets the "state" field to the value that was provided on create.

func (*FileTypeUpsertBulk) UpdateType added in v0.9.0

func (u *FileTypeUpsertBulk) UpdateType() *FileTypeUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

type FileTypeUpsertOne added in v0.9.0

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

FileTypeUpsertOne is the builder for "upsert"-ing

one FileType node.

func (*FileTypeUpsertOne) DoNothing added in v0.9.0

func (u *FileTypeUpsertOne) DoNothing() *FileTypeUpsertOne

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

func (*FileTypeUpsertOne) Exec added in v0.9.0

func (u *FileTypeUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*FileTypeUpsertOne) ExecX added in v0.9.0

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

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

func (*FileTypeUpsertOne) ID added in v0.9.0

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

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

func (*FileTypeUpsertOne) IDX added in v0.9.0

func (u *FileTypeUpsertOne) IDX(ctx context.Context) int

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

func (*FileTypeUpsertOne) Ignore added in v0.9.0

func (u *FileTypeUpsertOne) Ignore() *FileTypeUpsertOne

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

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

func (*FileTypeUpsertOne) SetName added in v0.9.0

SetName sets the "name" field.

func (*FileTypeUpsertOne) SetState added in v0.9.0

SetState sets the "state" field.

func (*FileTypeUpsertOne) SetType added in v0.9.0

SetType sets the "type" field.

func (*FileTypeUpsertOne) Update added in v0.9.0

func (u *FileTypeUpsertOne) Update(set func(*FileTypeUpsert)) *FileTypeUpsertOne

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

func (*FileTypeUpsertOne) UpdateName added in v0.9.0

func (u *FileTypeUpsertOne) UpdateName() *FileTypeUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*FileTypeUpsertOne) UpdateNewValues added in v0.9.0

func (u *FileTypeUpsertOne) UpdateNewValues() *FileTypeUpsertOne

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

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

func (*FileTypeUpsertOne) UpdateState added in v0.9.0

func (u *FileTypeUpsertOne) UpdateState() *FileTypeUpsertOne

UpdateState sets the "state" field to the value that was provided on create.

func (*FileTypeUpsertOne) UpdateType added in v0.9.0

func (u *FileTypeUpsertOne) UpdateType() *FileTypeUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

type FileTypes

type FileTypes []*FileType

FileTypes is a parsable slice of FileType.

type FileUpdate

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

FileUpdate is the builder for updating File entities.

func (*FileUpdate) AddField

func (fu *FileUpdate) AddField(f ...*FieldType) *FileUpdate

AddField adds the "field" edges to the FieldType entity.

func (*FileUpdate) AddFieldIDs

func (fu *FileUpdate) AddFieldIDs(ids ...int) *FileUpdate

AddFieldIDs adds the "field" edge to the FieldType entity by IDs.

func (*FileUpdate) AddSize

func (fu *FileUpdate) AddSize(i int) *FileUpdate

AddSize adds i to the "size" field.

func (*FileUpdate) ClearFieldEdge

func (fu *FileUpdate) ClearFieldEdge() *FileUpdate

ClearFieldEdge clears all "field" edges to the FieldType entity.

func (*FileUpdate) ClearGroup

func (fu *FileUpdate) ClearGroup() *FileUpdate

ClearGroup clears the value of the "group" field.

func (*FileUpdate) ClearOp

func (fu *FileUpdate) ClearOp() *FileUpdate

ClearOp clears the value of the "op" field.

func (*FileUpdate) ClearOwner

func (fu *FileUpdate) ClearOwner() *FileUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*FileUpdate) ClearType

func (fu *FileUpdate) ClearType() *FileUpdate

ClearType clears the "type" edge to the FileType entity.

func (*FileUpdate) ClearUser

func (fu *FileUpdate) ClearUser() *FileUpdate

ClearUser clears the value of the "user" field.

func (*FileUpdate) Exec

func (fu *FileUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*FileUpdate) ExecX

func (fu *FileUpdate) ExecX(ctx context.Context)

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

func (*FileUpdate) Mutation

func (fu *FileUpdate) Mutation() *FileMutation

Mutation returns the FileMutation object of the builder.

func (*FileUpdate) RemoveField

func (fu *FileUpdate) RemoveField(f ...*FieldType) *FileUpdate

RemoveField removes "field" edges to FieldType entities.

func (*FileUpdate) RemoveFieldIDs

func (fu *FileUpdate) RemoveFieldIDs(ids ...int) *FileUpdate

RemoveFieldIDs removes the "field" edge to FieldType entities by IDs.

func (*FileUpdate) Save

func (fu *FileUpdate) Save(ctx context.Context) (int, error)

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

func (*FileUpdate) SaveX

func (fu *FileUpdate) SaveX(ctx context.Context) int

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

func (*FileUpdate) SetGroup

func (fu *FileUpdate) SetGroup(s string) *FileUpdate

SetGroup sets the "group" field.

func (*FileUpdate) SetName

func (fu *FileUpdate) SetName(s string) *FileUpdate

SetName sets the "name" field.

func (*FileUpdate) SetNillableGroup

func (fu *FileUpdate) SetNillableGroup(s *string) *FileUpdate

SetNillableGroup sets the "group" field if the given value is not nil.

func (*FileUpdate) SetNillableOp

func (fu *FileUpdate) SetNillableOp(b *bool) *FileUpdate

SetNillableOp sets the "op" field if the given value is not nil.

func (*FileUpdate) SetNillableOwnerID

func (fu *FileUpdate) SetNillableOwnerID(id *int) *FileUpdate

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*FileUpdate) SetNillableSize

func (fu *FileUpdate) SetNillableSize(i *int) *FileUpdate

SetNillableSize sets the "size" field if the given value is not nil.

func (*FileUpdate) SetNillableTypeID

func (fu *FileUpdate) SetNillableTypeID(id *int) *FileUpdate

SetNillableTypeID sets the "type" edge to the FileType entity by ID if the given value is not nil.

func (*FileUpdate) SetNillableUser

func (fu *FileUpdate) SetNillableUser(s *string) *FileUpdate

SetNillableUser sets the "user" field if the given value is not nil.

func (*FileUpdate) SetOp

func (fu *FileUpdate) SetOp(b bool) *FileUpdate

SetOp sets the "op" field.

func (*FileUpdate) SetOwner

func (fu *FileUpdate) SetOwner(u *User) *FileUpdate

SetOwner sets the "owner" edge to the User entity.

func (*FileUpdate) SetOwnerID

func (fu *FileUpdate) SetOwnerID(id int) *FileUpdate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*FileUpdate) SetSize

func (fu *FileUpdate) SetSize(i int) *FileUpdate

SetSize sets the "size" field.

func (*FileUpdate) SetType

func (fu *FileUpdate) SetType(f *FileType) *FileUpdate

SetType sets the "type" edge to the FileType entity.

func (*FileUpdate) SetTypeID

func (fu *FileUpdate) SetTypeID(id int) *FileUpdate

SetTypeID sets the "type" edge to the FileType entity by ID.

func (*FileUpdate) SetUser

func (fu *FileUpdate) SetUser(s string) *FileUpdate

SetUser sets the "user" field.

func (*FileUpdate) Where

func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate

Where appends a list predicates to the FileUpdate builder.

type FileUpdateOne

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

FileUpdateOne is the builder for updating a single File entity.

func (*FileUpdateOne) AddField

func (fuo *FileUpdateOne) AddField(f ...*FieldType) *FileUpdateOne

AddField adds the "field" edges to the FieldType entity.

func (*FileUpdateOne) AddFieldIDs

func (fuo *FileUpdateOne) AddFieldIDs(ids ...int) *FileUpdateOne

AddFieldIDs adds the "field" edge to the FieldType entity by IDs.

func (*FileUpdateOne) AddSize

func (fuo *FileUpdateOne) AddSize(i int) *FileUpdateOne

AddSize adds i to the "size" field.

func (*FileUpdateOne) ClearFieldEdge

func (fuo *FileUpdateOne) ClearFieldEdge() *FileUpdateOne

ClearFieldEdge clears all "field" edges to the FieldType entity.

func (*FileUpdateOne) ClearGroup

func (fuo *FileUpdateOne) ClearGroup() *FileUpdateOne

ClearGroup clears the value of the "group" field.

func (*FileUpdateOne) ClearOp

func (fuo *FileUpdateOne) ClearOp() *FileUpdateOne

ClearOp clears the value of the "op" field.

func (*FileUpdateOne) ClearOwner

func (fuo *FileUpdateOne) ClearOwner() *FileUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*FileUpdateOne) ClearType

func (fuo *FileUpdateOne) ClearType() *FileUpdateOne

ClearType clears the "type" edge to the FileType entity.

func (*FileUpdateOne) ClearUser

func (fuo *FileUpdateOne) ClearUser() *FileUpdateOne

ClearUser clears the value of the "user" field.

func (*FileUpdateOne) Exec

func (fuo *FileUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*FileUpdateOne) ExecX

func (fuo *FileUpdateOne) ExecX(ctx context.Context)

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

func (*FileUpdateOne) Mutation

func (fuo *FileUpdateOne) Mutation() *FileMutation

Mutation returns the FileMutation object of the builder.

func (*FileUpdateOne) RemoveField

func (fuo *FileUpdateOne) RemoveField(f ...*FieldType) *FileUpdateOne

RemoveField removes "field" edges to FieldType entities.

func (*FileUpdateOne) RemoveFieldIDs

func (fuo *FileUpdateOne) RemoveFieldIDs(ids ...int) *FileUpdateOne

RemoveFieldIDs removes the "field" edge to FieldType entities by IDs.

func (*FileUpdateOne) Save

func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)

Save executes the query and returns the updated File entity.

func (*FileUpdateOne) SaveX

func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File

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

func (*FileUpdateOne) Select added in v0.8.0

func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne

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

func (*FileUpdateOne) SetGroup

func (fuo *FileUpdateOne) SetGroup(s string) *FileUpdateOne

SetGroup sets the "group" field.

func (*FileUpdateOne) SetName

func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne

SetName sets the "name" field.

func (*FileUpdateOne) SetNillableGroup

func (fuo *FileUpdateOne) SetNillableGroup(s *string) *FileUpdateOne

SetNillableGroup sets the "group" field if the given value is not nil.

func (*FileUpdateOne) SetNillableOp

func (fuo *FileUpdateOne) SetNillableOp(b *bool) *FileUpdateOne

SetNillableOp sets the "op" field if the given value is not nil.

func (*FileUpdateOne) SetNillableOwnerID

func (fuo *FileUpdateOne) SetNillableOwnerID(id *int) *FileUpdateOne

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*FileUpdateOne) SetNillableSize

func (fuo *FileUpdateOne) SetNillableSize(i *int) *FileUpdateOne

SetNillableSize sets the "size" field if the given value is not nil.

func (*FileUpdateOne) SetNillableTypeID

func (fuo *FileUpdateOne) SetNillableTypeID(id *int) *FileUpdateOne

SetNillableTypeID sets the "type" edge to the FileType entity by ID if the given value is not nil.

func (*FileUpdateOne) SetNillableUser

func (fuo *FileUpdateOne) SetNillableUser(s *string) *FileUpdateOne

SetNillableUser sets the "user" field if the given value is not nil.

func (*FileUpdateOne) SetOp

func (fuo *FileUpdateOne) SetOp(b bool) *FileUpdateOne

SetOp sets the "op" field.

func (*FileUpdateOne) SetOwner

func (fuo *FileUpdateOne) SetOwner(u *User) *FileUpdateOne

SetOwner sets the "owner" edge to the User entity.

func (*FileUpdateOne) SetOwnerID

func (fuo *FileUpdateOne) SetOwnerID(id int) *FileUpdateOne

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*FileUpdateOne) SetSize

func (fuo *FileUpdateOne) SetSize(i int) *FileUpdateOne

SetSize sets the "size" field.

func (*FileUpdateOne) SetType

func (fuo *FileUpdateOne) SetType(f *FileType) *FileUpdateOne

SetType sets the "type" edge to the FileType entity.

func (*FileUpdateOne) SetTypeID

func (fuo *FileUpdateOne) SetTypeID(id int) *FileUpdateOne

SetTypeID sets the "type" edge to the FileType entity by ID.

func (*FileUpdateOne) SetUser

func (fuo *FileUpdateOne) SetUser(s string) *FileUpdateOne

SetUser sets the "user" field.

type FileUpsert added in v0.9.0

type FileUpsert struct {
	*sql.UpdateSet
}

FileUpsert is the "OnConflict" setter.

func (*FileUpsert) AddSize added in v0.10.0

func (u *FileUpsert) AddSize(v int) *FileUpsert

AddSize adds v to the "size" field.

func (*FileUpsert) ClearGroup added in v0.9.0

func (u *FileUpsert) ClearGroup() *FileUpsert

ClearGroup clears the value of the "group" field.

func (*FileUpsert) ClearOp added in v0.9.0

func (u *FileUpsert) ClearOp() *FileUpsert

ClearOp clears the value of the "op" field.

func (*FileUpsert) ClearUser added in v0.9.0

func (u *FileUpsert) ClearUser() *FileUpsert

ClearUser clears the value of the "user" field.

func (*FileUpsert) SetGroup added in v0.9.0

func (u *FileUpsert) SetGroup(v string) *FileUpsert

SetGroup sets the "group" field.

func (*FileUpsert) SetName added in v0.9.0

func (u *FileUpsert) SetName(v string) *FileUpsert

SetName sets the "name" field.

func (*FileUpsert) SetOp added in v0.9.0

func (u *FileUpsert) SetOp(v bool) *FileUpsert

SetOp sets the "op" field.

func (*FileUpsert) SetSize added in v0.9.0

func (u *FileUpsert) SetSize(v int) *FileUpsert

SetSize sets the "size" field.

func (*FileUpsert) SetUser added in v0.9.0

func (u *FileUpsert) SetUser(v string) *FileUpsert

SetUser sets the "user" field.

func (*FileUpsert) UpdateGroup added in v0.9.0

func (u *FileUpsert) UpdateGroup() *FileUpsert

UpdateGroup sets the "group" field to the value that was provided on create.

func (*FileUpsert) UpdateName added in v0.9.0

func (u *FileUpsert) UpdateName() *FileUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*FileUpsert) UpdateOp added in v0.9.0

func (u *FileUpsert) UpdateOp() *FileUpsert

UpdateOp sets the "op" field to the value that was provided on create.

func (*FileUpsert) UpdateSize added in v0.9.0

func (u *FileUpsert) UpdateSize() *FileUpsert

UpdateSize sets the "size" field to the value that was provided on create.

func (*FileUpsert) UpdateUser added in v0.9.0

func (u *FileUpsert) UpdateUser() *FileUpsert

UpdateUser sets the "user" field to the value that was provided on create.

type FileUpsertBulk added in v0.9.0

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

FileUpsertBulk is the builder for "upsert"-ing a bulk of File nodes.

func (*FileUpsertBulk) AddSize added in v0.10.0

func (u *FileUpsertBulk) AddSize(v int) *FileUpsertBulk

AddSize adds v to the "size" field.

func (*FileUpsertBulk) ClearGroup added in v0.9.0

func (u *FileUpsertBulk) ClearGroup() *FileUpsertBulk

ClearGroup clears the value of the "group" field.

func (*FileUpsertBulk) ClearOp added in v0.9.0

func (u *FileUpsertBulk) ClearOp() *FileUpsertBulk

ClearOp clears the value of the "op" field.

func (*FileUpsertBulk) ClearUser added in v0.9.0

func (u *FileUpsertBulk) ClearUser() *FileUpsertBulk

ClearUser clears the value of the "user" field.

func (*FileUpsertBulk) DoNothing added in v0.9.0

func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk

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

func (*FileUpsertBulk) Exec added in v0.9.0

func (u *FileUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*FileUpsertBulk) ExecX added in v0.9.0

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

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

func (*FileUpsertBulk) Ignore added in v0.9.0

func (u *FileUpsertBulk) Ignore() *FileUpsertBulk

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

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

func (*FileUpsertBulk) SetGroup added in v0.9.0

func (u *FileUpsertBulk) SetGroup(v string) *FileUpsertBulk

SetGroup sets the "group" field.

func (*FileUpsertBulk) SetName added in v0.9.0

func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk

SetName sets the "name" field.

func (*FileUpsertBulk) SetOp added in v0.9.0

func (u *FileUpsertBulk) SetOp(v bool) *FileUpsertBulk

SetOp sets the "op" field.

func (*FileUpsertBulk) SetSize added in v0.9.0

func (u *FileUpsertBulk) SetSize(v int) *FileUpsertBulk

SetSize sets the "size" field.

func (*FileUpsertBulk) SetUser added in v0.9.0

func (u *FileUpsertBulk) SetUser(v string) *FileUpsertBulk

SetUser sets the "user" field.

func (*FileUpsertBulk) Update added in v0.9.0

func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk

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

func (*FileUpsertBulk) UpdateGroup added in v0.9.0

func (u *FileUpsertBulk) UpdateGroup() *FileUpsertBulk

UpdateGroup sets the "group" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateName added in v0.9.0

func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateNewValues added in v0.9.0

func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk

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

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

func (*FileUpsertBulk) UpdateOp added in v0.9.0

func (u *FileUpsertBulk) UpdateOp() *FileUpsertBulk

UpdateOp sets the "op" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateSize added in v0.9.0

func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk

UpdateSize sets the "size" field to the value that was provided on create.

func (*FileUpsertBulk) UpdateUser added in v0.9.0

func (u *FileUpsertBulk) UpdateUser() *FileUpsertBulk

UpdateUser sets the "user" field to the value that was provided on create.

type FileUpsertOne added in v0.9.0

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

FileUpsertOne is the builder for "upsert"-ing

one File node.

func (*FileUpsertOne) AddSize added in v0.10.0

func (u *FileUpsertOne) AddSize(v int) *FileUpsertOne

AddSize adds v to the "size" field.

func (*FileUpsertOne) ClearGroup added in v0.9.0

func (u *FileUpsertOne) ClearGroup() *FileUpsertOne

ClearGroup clears the value of the "group" field.

func (*FileUpsertOne) ClearOp added in v0.9.0

func (u *FileUpsertOne) ClearOp() *FileUpsertOne

ClearOp clears the value of the "op" field.

func (*FileUpsertOne) ClearUser added in v0.9.0

func (u *FileUpsertOne) ClearUser() *FileUpsertOne

ClearUser clears the value of the "user" field.

func (*FileUpsertOne) DoNothing added in v0.9.0

func (u *FileUpsertOne) DoNothing() *FileUpsertOne

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

func (*FileUpsertOne) Exec added in v0.9.0

func (u *FileUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*FileUpsertOne) ExecX added in v0.9.0

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

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

func (*FileUpsertOne) ID added in v0.9.0

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

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

func (*FileUpsertOne) IDX added in v0.9.0

func (u *FileUpsertOne) IDX(ctx context.Context) int

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

func (*FileUpsertOne) Ignore added in v0.9.0

func (u *FileUpsertOne) Ignore() *FileUpsertOne

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

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

func (*FileUpsertOne) SetGroup added in v0.9.0

func (u *FileUpsertOne) SetGroup(v string) *FileUpsertOne

SetGroup sets the "group" field.

func (*FileUpsertOne) SetName added in v0.9.0

func (u *FileUpsertOne) SetName(v string) *FileUpsertOne

SetName sets the "name" field.

func (*FileUpsertOne) SetOp added in v0.9.0

func (u *FileUpsertOne) SetOp(v bool) *FileUpsertOne

SetOp sets the "op" field.

func (*FileUpsertOne) SetSize added in v0.9.0

func (u *FileUpsertOne) SetSize(v int) *FileUpsertOne

SetSize sets the "size" field.

func (*FileUpsertOne) SetUser added in v0.9.0

func (u *FileUpsertOne) SetUser(v string) *FileUpsertOne

SetUser sets the "user" field.

func (*FileUpsertOne) Update added in v0.9.0

func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne

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

func (*FileUpsertOne) UpdateGroup added in v0.9.0

func (u *FileUpsertOne) UpdateGroup() *FileUpsertOne

UpdateGroup sets the "group" field to the value that was provided on create.

func (*FileUpsertOne) UpdateName added in v0.9.0

func (u *FileUpsertOne) UpdateName() *FileUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*FileUpsertOne) UpdateNewValues added in v0.9.0

func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne

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

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

func (*FileUpsertOne) UpdateOp added in v0.9.0

func (u *FileUpsertOne) UpdateOp() *FileUpsertOne

UpdateOp sets the "op" field to the value that was provided on create.

func (*FileUpsertOne) UpdateSize added in v0.9.0

func (u *FileUpsertOne) UpdateSize() *FileUpsertOne

UpdateSize sets the "size" field to the value that was provided on create.

func (*FileUpsertOne) UpdateUser added in v0.9.0

func (u *FileUpsertOne) UpdateUser() *FileUpsertOne

UpdateUser sets the "user" field to the value that was provided on create.

type Files

type Files []*File

Files is a parsable slice of File.

type Goods

type Goods struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// contains filtered or unexported fields
}

Goods is the model entity for the Goods schema.

func (*Goods) String

func (_go *Goods) String() string

String implements the fmt.Stringer.

func (*Goods) Unwrap

func (_go *Goods) Unwrap() *Goods

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

func (_go *Goods) Update() *GoodsUpdateOne

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

type GoodsClient

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

GoodsClient is a client for the Goods schema.

func NewGoodsClient

func NewGoodsClient(c config) *GoodsClient

NewGoodsClient returns a client for the Goods from the given config.

func (*GoodsClient) Create

func (c *GoodsClient) Create() *GoodsCreate

Create returns a create builder for Goods.

func (*GoodsClient) CreateBulk

func (c *GoodsClient) CreateBulk(builders ...*GoodsCreate) *GoodsCreateBulk

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

func (*GoodsClient) Delete

func (c *GoodsClient) Delete() *GoodsDelete

Delete returns a delete builder for Goods.

func (*GoodsClient) DeleteOne

func (c *GoodsClient) DeleteOne(_go *Goods) *GoodsDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*GoodsClient) DeleteOneID

func (c *GoodsClient) DeleteOneID(id int) *GoodsDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*GoodsClient) Get

func (c *GoodsClient) Get(ctx context.Context, id int) (*Goods, error)

Get returns a Goods entity by its id.

func (*GoodsClient) GetX

func (c *GoodsClient) GetX(ctx context.Context, id int) *Goods

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

func (*GoodsClient) Hooks

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

Hooks returns the client hooks.

func (*GoodsClient) Query

func (c *GoodsClient) Query() *GoodsQuery

Query returns a query builder for Goods.

func (*GoodsClient) Update

func (c *GoodsClient) Update() *GoodsUpdate

Update returns an update builder for Goods.

func (*GoodsClient) UpdateOne

func (c *GoodsClient) UpdateOne(_go *Goods) *GoodsUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GoodsClient) UpdateOneID

func (c *GoodsClient) UpdateOneID(id int) *GoodsUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GoodsClient) Use

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

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

type GoodsCreate

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

GoodsCreate is the builder for creating a Goods entity.

func (*GoodsCreate) Exec added in v0.9.0

func (gc *GoodsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GoodsCreate) ExecX added in v0.9.0

func (gc *GoodsCreate) ExecX(ctx context.Context)

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

func (*GoodsCreate) Mutation

func (gc *GoodsCreate) Mutation() *GoodsMutation

Mutation returns the GoodsMutation object of the builder.

func (*GoodsCreate) OnConflict added in v0.9.0

func (gc *GoodsCreate) OnConflict(opts ...sql.ConflictOption) *GoodsUpsertOne

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

client.Goods.Create().
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*GoodsCreate) OnConflictColumns added in v0.9.0

func (gc *GoodsCreate) OnConflictColumns(columns ...string) *GoodsUpsertOne

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

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

func (*GoodsCreate) Save

func (gc *GoodsCreate) Save(ctx context.Context) (*Goods, error)

Save creates the Goods in the database.

func (*GoodsCreate) SaveX

func (gc *GoodsCreate) SaveX(ctx context.Context) *Goods

SaveX calls Save and panics if Save returns an error.

type GoodsCreateBulk

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

GoodsCreateBulk is the builder for creating many Goods entities in bulk.

func (*GoodsCreateBulk) Exec added in v0.9.0

func (gcb *GoodsCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GoodsCreateBulk) ExecX added in v0.9.0

func (gcb *GoodsCreateBulk) ExecX(ctx context.Context)

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

func (*GoodsCreateBulk) OnConflict added in v0.9.0

func (gcb *GoodsCreateBulk) OnConflict(opts ...sql.ConflictOption) *GoodsUpsertBulk

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

client.Goods.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*GoodsCreateBulk) OnConflictColumns added in v0.9.0

func (gcb *GoodsCreateBulk) OnConflictColumns(columns ...string) *GoodsUpsertBulk

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

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

func (*GoodsCreateBulk) Save

func (gcb *GoodsCreateBulk) Save(ctx context.Context) ([]*Goods, error)

Save creates the Goods entities in the database.

func (*GoodsCreateBulk) SaveX

func (gcb *GoodsCreateBulk) SaveX(ctx context.Context) []*Goods

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

type GoodsDelete

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

GoodsDelete is the builder for deleting a Goods entity.

func (*GoodsDelete) Exec

func (gd *GoodsDelete) Exec(ctx context.Context) (int, error)

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

func (*GoodsDelete) ExecX

func (gd *GoodsDelete) ExecX(ctx context.Context) int

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

func (*GoodsDelete) Where

func (gd *GoodsDelete) Where(ps ...predicate.Goods) *GoodsDelete

Where appends a list predicates to the GoodsDelete builder.

type GoodsDeleteOne

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

GoodsDeleteOne is the builder for deleting a single Goods entity.

func (*GoodsDeleteOne) Exec

func (gdo *GoodsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GoodsDeleteOne) ExecX

func (gdo *GoodsDeleteOne) ExecX(ctx context.Context)

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

type GoodsFilter

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

GoodsFilter provides a generic filtering capability at runtime for GoodsQuery.

func (*GoodsFilter) Where

func (f *GoodsFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*GoodsFilter) WhereID

func (f *GoodsFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

type GoodsGroupBy

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

GoodsGroupBy is the group-by builder for Goods entities.

func (*GoodsGroupBy) Aggregate

func (ggb *GoodsGroupBy) Aggregate(fns ...AggregateFunc) *GoodsGroupBy

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

func (*GoodsGroupBy) Bool

func (ggb *GoodsGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GoodsGroupBy) BoolX

func (ggb *GoodsGroupBy) BoolX(ctx context.Context) bool

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

func (*GoodsGroupBy) Bools

func (ggb *GoodsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*GoodsGroupBy) BoolsX

func (ggb *GoodsGroupBy) BoolsX(ctx context.Context) []bool

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

func (*GoodsGroupBy) Float64

func (ggb *GoodsGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GoodsGroupBy) Float64X

func (ggb *GoodsGroupBy) Float64X(ctx context.Context) float64

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

func (*GoodsGroupBy) Float64s

func (ggb *GoodsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*GoodsGroupBy) Float64sX

func (ggb *GoodsGroupBy) Float64sX(ctx context.Context) []float64

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

func (*GoodsGroupBy) Int

func (ggb *GoodsGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GoodsGroupBy) IntX

func (ggb *GoodsGroupBy) IntX(ctx context.Context) int

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

func (*GoodsGroupBy) Ints

func (ggb *GoodsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*GoodsGroupBy) IntsX

func (ggb *GoodsGroupBy) IntsX(ctx context.Context) []int

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

func (*GoodsGroupBy) Scan

func (ggb *GoodsGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*GoodsGroupBy) ScanX

func (ggb *GoodsGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*GoodsGroupBy) String

func (ggb *GoodsGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GoodsGroupBy) StringX

func (ggb *GoodsGroupBy) StringX(ctx context.Context) string

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

func (*GoodsGroupBy) Strings

func (ggb *GoodsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*GoodsGroupBy) StringsX

func (ggb *GoodsGroupBy) StringsX(ctx context.Context) []string

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

type GoodsMutation

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

GoodsMutation represents an operation that mutates the Goods nodes in the graph.

func (*GoodsMutation) AddField

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

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

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

func (*GoodsMutation) AddedField

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

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

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

func (*GoodsMutation) AddedIDs

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

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

func (*GoodsMutation) ClearEdge

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

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

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

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

func (*GoodsMutation) ClearedFields

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

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

func (GoodsMutation) Client

func (m GoodsMutation) 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 (*GoodsMutation) EdgeCleared

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

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

func (*GoodsMutation) Field

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

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

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

func (*GoodsMutation) Fields

func (m *GoodsMutation) 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 (*GoodsMutation) Filter

func (m *GoodsMutation) Filter() *GoodsFilter

Filter returns an entql.Where implementation to apply filters on the GoodsMutation builder.

func (*GoodsMutation) ID

func (m *GoodsMutation) 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 (*GoodsMutation) IDs added in v0.10.0

func (m *GoodsMutation) 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 (*GoodsMutation) OldField

func (m *GoodsMutation) 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 (*GoodsMutation) Op

func (m *GoodsMutation) Op() Op

Op returns the operation name.

func (*GoodsMutation) RemovedEdges

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

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

func (*GoodsMutation) RemovedIDs

func (m *GoodsMutation) 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 (*GoodsMutation) ResetEdge

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

func (m *GoodsMutation) 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 (*GoodsMutation) SetField

func (m *GoodsMutation) 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 (GoodsMutation) Tx

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

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

func (*GoodsMutation) Type

func (m *GoodsMutation) Type() string

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

func (*GoodsMutation) Where added in v0.9.0

func (m *GoodsMutation) Where(ps ...predicate.Goods)

Where appends a list predicates to the GoodsMutation builder.

type GoodsQuery

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

GoodsQuery is the builder for querying Goods entities.

func (*GoodsQuery) All

func (gq *GoodsQuery) All(ctx context.Context) ([]*Goods, error)

All executes the query and returns a list of GoodsSlice.

func (*GoodsQuery) AllX

func (gq *GoodsQuery) AllX(ctx context.Context) []*Goods

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

func (*GoodsQuery) Clone

func (gq *GoodsQuery) Clone() *GoodsQuery

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

func (*GoodsQuery) Count

func (gq *GoodsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GoodsQuery) CountX

func (gq *GoodsQuery) CountX(ctx context.Context) int

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

func (*GoodsQuery) Exist

func (gq *GoodsQuery) Exist(ctx context.Context) (bool, error)

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

func (*GoodsQuery) ExistX

func (gq *GoodsQuery) ExistX(ctx context.Context) bool

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

func (*GoodsQuery) Filter

func (gq *GoodsQuery) Filter() *GoodsFilter

Filter returns a Filter implementation to apply filters on the GoodsQuery builder.

func (*GoodsQuery) First

func (gq *GoodsQuery) First(ctx context.Context) (*Goods, error)

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

func (*GoodsQuery) FirstID

func (gq *GoodsQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*GoodsQuery) FirstIDX

func (gq *GoodsQuery) FirstIDX(ctx context.Context) int

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

func (*GoodsQuery) FirstX

func (gq *GoodsQuery) FirstX(ctx context.Context) *Goods

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

func (*GoodsQuery) ForShare added in v0.9.0

func (gq *GoodsQuery) ForShare(opts ...sql.LockOption) *GoodsQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*GoodsQuery) ForUpdate added in v0.9.0

func (gq *GoodsQuery) ForUpdate(opts ...sql.LockOption) *GoodsQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*GoodsQuery) GroupBy

func (gq *GoodsQuery) GroupBy(field string, fields ...string) *GoodsGroupBy

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.

func (*GoodsQuery) IDs

func (gq *GoodsQuery) IDs(ctx context.Context) ([]int, error)

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

func (*GoodsQuery) IDsX

func (gq *GoodsQuery) IDsX(ctx context.Context) []int

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

func (*GoodsQuery) Limit

func (gq *GoodsQuery) Limit(limit int) *GoodsQuery

Limit adds a limit step to the query.

func (*GoodsQuery) Modify added in v0.9.0

func (gq *GoodsQuery) Modify(modifiers ...func(s *sql.Selector)) *GoodsSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*GoodsQuery) Offset

func (gq *GoodsQuery) Offset(offset int) *GoodsQuery

Offset adds an offset step to the query.

func (*GoodsQuery) Only

func (gq *GoodsQuery) Only(ctx context.Context) (*Goods, error)

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

func (*GoodsQuery) OnlyID

func (gq *GoodsQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*GoodsQuery) OnlyIDX

func (gq *GoodsQuery) OnlyIDX(ctx context.Context) int

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

func (*GoodsQuery) OnlyX

func (gq *GoodsQuery) OnlyX(ctx context.Context) *Goods

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

func (*GoodsQuery) Order

func (gq *GoodsQuery) Order(o ...OrderFunc) *GoodsQuery

Order adds an order step to the query.

func (*GoodsQuery) Select

func (gq *GoodsQuery) Select(fields ...string) *GoodsSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*GoodsQuery) Unique added in v0.8.0

func (gq *GoodsQuery) Unique(unique bool) *GoodsQuery

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 (*GoodsQuery) Where

func (gq *GoodsQuery) Where(ps ...predicate.Goods) *GoodsQuery

Where adds a new predicate for the GoodsQuery builder.

type GoodsSelect

type GoodsSelect struct {
	*GoodsQuery
	// contains filtered or unexported fields
}

GoodsSelect is the builder for selecting fields of Goods entities.

func (*GoodsSelect) Bool

func (gs *GoodsSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*GoodsSelect) BoolX

func (gs *GoodsSelect) BoolX(ctx context.Context) bool

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

func (*GoodsSelect) Bools

func (gs *GoodsSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*GoodsSelect) BoolsX

func (gs *GoodsSelect) BoolsX(ctx context.Context) []bool

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

func (*GoodsSelect) Float64

func (gs *GoodsSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*GoodsSelect) Float64X

func (gs *GoodsSelect) Float64X(ctx context.Context) float64

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

func (*GoodsSelect) Float64s

func (gs *GoodsSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*GoodsSelect) Float64sX

func (gs *GoodsSelect) Float64sX(ctx context.Context) []float64

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

func (*GoodsSelect) Int

func (gs *GoodsSelect) Int(ctx context.Context) (_ int, err error)

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

func (*GoodsSelect) IntX

func (gs *GoodsSelect) IntX(ctx context.Context) int

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

func (*GoodsSelect) Ints

func (gs *GoodsSelect) Ints(ctx context.Context) ([]int, error)

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

func (*GoodsSelect) IntsX

func (gs *GoodsSelect) IntsX(ctx context.Context) []int

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

func (*GoodsSelect) Modify added in v0.9.0

func (gs *GoodsSelect) Modify(modifiers ...func(s *sql.Selector)) *GoodsSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*GoodsSelect) Scan

func (gs *GoodsSelect) Scan(ctx context.Context, v interface{}) error

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

func (*GoodsSelect) ScanX

func (gs *GoodsSelect) ScanX(ctx context.Context, v interface{})

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

func (*GoodsSelect) String

func (gs *GoodsSelect) String(ctx context.Context) (_ string, err error)

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

func (*GoodsSelect) StringX

func (gs *GoodsSelect) StringX(ctx context.Context) string

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

func (*GoodsSelect) Strings

func (gs *GoodsSelect) Strings(ctx context.Context) ([]string, error)

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

func (*GoodsSelect) StringsX

func (gs *GoodsSelect) StringsX(ctx context.Context) []string

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

type GoodsSlice

type GoodsSlice []*Goods

GoodsSlice is a parsable slice of Goods.

type GoodsUpdate

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

GoodsUpdate is the builder for updating Goods entities.

func (*GoodsUpdate) Exec

func (gu *GoodsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GoodsUpdate) ExecX

func (gu *GoodsUpdate) ExecX(ctx context.Context)

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

func (*GoodsUpdate) Mutation

func (gu *GoodsUpdate) Mutation() *GoodsMutation

Mutation returns the GoodsMutation object of the builder.

func (*GoodsUpdate) Save

func (gu *GoodsUpdate) Save(ctx context.Context) (int, error)

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

func (*GoodsUpdate) SaveX

func (gu *GoodsUpdate) SaveX(ctx context.Context) int

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

func (*GoodsUpdate) Where

func (gu *GoodsUpdate) Where(ps ...predicate.Goods) *GoodsUpdate

Where appends a list predicates to the GoodsUpdate builder.

type GoodsUpdateOne

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

GoodsUpdateOne is the builder for updating a single Goods entity.

func (*GoodsUpdateOne) Exec

func (guo *GoodsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GoodsUpdateOne) ExecX

func (guo *GoodsUpdateOne) ExecX(ctx context.Context)

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

func (*GoodsUpdateOne) Mutation

func (guo *GoodsUpdateOne) Mutation() *GoodsMutation

Mutation returns the GoodsMutation object of the builder.

func (*GoodsUpdateOne) Save

func (guo *GoodsUpdateOne) Save(ctx context.Context) (*Goods, error)

Save executes the query and returns the updated Goods entity.

func (*GoodsUpdateOne) SaveX

func (guo *GoodsUpdateOne) SaveX(ctx context.Context) *Goods

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

func (*GoodsUpdateOne) Select added in v0.8.0

func (guo *GoodsUpdateOne) Select(field string, fields ...string) *GoodsUpdateOne

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

type GoodsUpsert added in v0.9.0

type GoodsUpsert struct {
	*sql.UpdateSet
}

GoodsUpsert is the "OnConflict" setter.

type GoodsUpsertBulk added in v0.9.0

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

GoodsUpsertBulk is the builder for "upsert"-ing a bulk of Goods nodes.

func (*GoodsUpsertBulk) DoNothing added in v0.9.0

func (u *GoodsUpsertBulk) DoNothing() *GoodsUpsertBulk

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

func (*GoodsUpsertBulk) Exec added in v0.9.0

func (u *GoodsUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GoodsUpsertBulk) ExecX added in v0.9.0

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

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

func (*GoodsUpsertBulk) Ignore added in v0.9.0

func (u *GoodsUpsertBulk) Ignore() *GoodsUpsertBulk

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

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

func (*GoodsUpsertBulk) Update added in v0.9.0

func (u *GoodsUpsertBulk) Update(set func(*GoodsUpsert)) *GoodsUpsertBulk

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

func (*GoodsUpsertBulk) UpdateNewValues added in v0.9.0

func (u *GoodsUpsertBulk) UpdateNewValues() *GoodsUpsertBulk

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

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

type GoodsUpsertOne added in v0.9.0

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

GoodsUpsertOne is the builder for "upsert"-ing

one Goods node.

func (*GoodsUpsertOne) DoNothing added in v0.9.0

func (u *GoodsUpsertOne) DoNothing() *GoodsUpsertOne

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

func (*GoodsUpsertOne) Exec added in v0.9.0

func (u *GoodsUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*GoodsUpsertOne) ExecX added in v0.9.0

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

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

func (*GoodsUpsertOne) ID added in v0.9.0

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

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

func (*GoodsUpsertOne) IDX added in v0.9.0

func (u *GoodsUpsertOne) IDX(ctx context.Context) int

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

func (*GoodsUpsertOne) Ignore added in v0.9.0

func (u *GoodsUpsertOne) Ignore() *GoodsUpsertOne

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

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

func (*GoodsUpsertOne) Update added in v0.9.0

func (u *GoodsUpsertOne) Update(set func(*GoodsUpsert)) *GoodsUpsertOne

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

func (*GoodsUpsertOne) UpdateNewValues added in v0.9.0

func (u *GoodsUpsertOne) UpdateNewValues() *GoodsUpsertOne

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

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

type Group

type Group struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Active holds the value of the "active" field.
	Active bool `json:"active,omitempty"`
	// Expire holds the value of the "expire" field.
	Expire time.Time `json:"expire,omitempty"`
	// Type holds the value of the "type" field.
	Type *string `json:"type,omitempty"`
	// MaxUsers holds the value of the "max_users" field.
	MaxUsers int `json:"max_users,omitempty"`
	// Name holds the value of the "name" field.
	// field with multiple validators
	Name string `json:"name,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GroupQuery when eager-loading is set.
	Edges GroupEdges `json:"edges"`
	// contains filtered or unexported fields
}

Group is the model entity for the Group schema.

func (*Group) QueryBlocked

func (gr *Group) QueryBlocked() *UserQuery

QueryBlocked queries the "blocked" edge of the Group entity.

func (*Group) QueryFiles

func (gr *Group) QueryFiles() *FileQuery

QueryFiles queries the "files" edge of the Group entity.

func (*Group) QueryInfo

func (gr *Group) QueryInfo() *GroupInfoQuery

QueryInfo queries the "info" edge of the Group entity.

func (*Group) QueryUsers

func (gr *Group) QueryUsers() *UserQuery

QueryUsers queries the "users" edge of the Group entity.

func (*Group) String

func (gr *Group) String() string

String implements the fmt.Stringer.

func (*Group) Unwrap

func (gr *Group) Unwrap() *Group

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

func (gr *Group) Update() *GroupUpdateOne

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

type GroupClient

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

GroupClient is a client for the Group schema.

func NewGroupClient

func NewGroupClient(c config) *GroupClient

NewGroupClient returns a client for the Group from the given config.

func (*GroupClient) Create

func (c *GroupClient) Create() *GroupCreate

Create returns a create builder for Group.

func (*GroupClient) CreateBulk

func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk

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

func (*GroupClient) Delete

func (c *GroupClient) Delete() *GroupDelete

Delete returns a delete builder for Group.

func (*GroupClient) DeleteOne

func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*GroupClient) DeleteOneID

func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*GroupClient) Get

func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error)

Get returns a Group entity by its id.

func (*GroupClient) GetX

func (c *GroupClient) GetX(ctx context.Context, id int) *Group

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

func (*GroupClient) Hooks

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

Hooks returns the client hooks.

func (*GroupClient) Query

func (c *GroupClient) Query() *GroupQuery

Query returns a query builder for Group.

func (*GroupClient) QueryBlocked

func (c *GroupClient) QueryBlocked(gr *Group) *UserQuery

QueryBlocked queries the blocked edge of a Group.

func (*GroupClient) QueryFiles

func (c *GroupClient) QueryFiles(gr *Group) *FileQuery

QueryFiles queries the files edge of a Group.

func (*GroupClient) QueryInfo

func (c *GroupClient) QueryInfo(gr *Group) *GroupInfoQuery

QueryInfo queries the info edge of a Group.

func (*GroupClient) QueryUsers

func (c *GroupClient) QueryUsers(gr *Group) *UserQuery

QueryUsers queries the users edge of a Group.

func (*GroupClient) Update

func (c *GroupClient) Update() *GroupUpdate

Update returns an update builder for Group.

func (*GroupClient) UpdateOne

func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GroupClient) UpdateOneID

func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GroupClient) Use

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

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

type GroupCreate

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

GroupCreate is the builder for creating a Group entity.

func (*GroupCreate) AddBlocked

func (gc *GroupCreate) AddBlocked(u ...*User) *GroupCreate

AddBlocked adds the "blocked" edges to the User entity.

func (*GroupCreate) AddBlockedIDs

func (gc *GroupCreate) AddBlockedIDs(ids ...int) *GroupCreate

AddBlockedIDs adds the "blocked" edge to the User entity by IDs.

func (*GroupCreate) AddFileIDs

func (gc *GroupCreate) AddFileIDs(ids ...int) *GroupCreate

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*GroupCreate) AddFiles

func (gc *GroupCreate) AddFiles(f ...*File) *GroupCreate

AddFiles adds the "files" edges to the File entity.

func (*GroupCreate) AddUserIDs

func (gc *GroupCreate) AddUserIDs(ids ...int) *GroupCreate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*GroupCreate) AddUsers

func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate

AddUsers adds the "users" edges to the User entity.

func (*GroupCreate) Exec added in v0.9.0

func (gc *GroupCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupCreate) ExecX added in v0.9.0

func (gc *GroupCreate) ExecX(ctx context.Context)

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

func (*GroupCreate) Mutation

func (gc *GroupCreate) Mutation() *GroupMutation

Mutation returns the GroupMutation object of the builder.

func (*GroupCreate) OnConflict added in v0.9.0

func (gc *GroupCreate) OnConflict(opts ...sql.ConflictOption) *GroupUpsertOne

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

client.Group.Create().
	SetActive(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.GroupUpsert) {
		SetActive(v+v).
	}).
	Exec(ctx)

func (*GroupCreate) OnConflictColumns added in v0.9.0

func (gc *GroupCreate) OnConflictColumns(columns ...string) *GroupUpsertOne

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

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

func (*GroupCreate) Save

func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)

Save creates the Group in the database.

func (*GroupCreate) SaveX

func (gc *GroupCreate) SaveX(ctx context.Context) *Group

SaveX calls Save and panics if Save returns an error.

func (*GroupCreate) SetActive

func (gc *GroupCreate) SetActive(b bool) *GroupCreate

SetActive sets the "active" field.

func (*GroupCreate) SetExpire

func (gc *GroupCreate) SetExpire(t time.Time) *GroupCreate

SetExpire sets the "expire" field.

func (*GroupCreate) SetInfo

func (gc *GroupCreate) SetInfo(g *GroupInfo) *GroupCreate

SetInfo sets the "info" edge to the GroupInfo entity.

func (*GroupCreate) SetInfoID

func (gc *GroupCreate) SetInfoID(id int) *GroupCreate

SetInfoID sets the "info" edge to the GroupInfo entity by ID.

func (*GroupCreate) SetMaxUsers

func (gc *GroupCreate) SetMaxUsers(i int) *GroupCreate

SetMaxUsers sets the "max_users" field.

func (*GroupCreate) SetName

func (gc *GroupCreate) SetName(s string) *GroupCreate

SetName sets the "name" field.

func (*GroupCreate) SetNillableActive

func (gc *GroupCreate) SetNillableActive(b *bool) *GroupCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*GroupCreate) SetNillableMaxUsers

func (gc *GroupCreate) SetNillableMaxUsers(i *int) *GroupCreate

SetNillableMaxUsers sets the "max_users" field if the given value is not nil.

func (*GroupCreate) SetNillableType

func (gc *GroupCreate) SetNillableType(s *string) *GroupCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*GroupCreate) SetType

func (gc *GroupCreate) SetType(s string) *GroupCreate

SetType sets the "type" field.

type GroupCreateBulk

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

GroupCreateBulk is the builder for creating many Group entities in bulk.

func (*GroupCreateBulk) Exec added in v0.9.0

func (gcb *GroupCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupCreateBulk) ExecX added in v0.9.0

func (gcb *GroupCreateBulk) ExecX(ctx context.Context)

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

func (*GroupCreateBulk) OnConflict added in v0.9.0

func (gcb *GroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupUpsertBulk

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

client.Group.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.GroupUpsert) {
		SetActive(v+v).
	}).
	Exec(ctx)

func (*GroupCreateBulk) OnConflictColumns added in v0.9.0

func (gcb *GroupCreateBulk) OnConflictColumns(columns ...string) *GroupUpsertBulk

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

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

func (*GroupCreateBulk) Save

func (gcb *GroupCreateBulk) Save(ctx context.Context) ([]*Group, error)

Save creates the Group entities in the database.

func (*GroupCreateBulk) SaveX

func (gcb *GroupCreateBulk) SaveX(ctx context.Context) []*Group

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

type GroupDelete

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

GroupDelete is the builder for deleting a Group entity.

func (*GroupDelete) Exec

func (gd *GroupDelete) Exec(ctx context.Context) (int, error)

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

func (*GroupDelete) ExecX

func (gd *GroupDelete) ExecX(ctx context.Context) int

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

func (*GroupDelete) Where

func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete

Where appends a list predicates to the GroupDelete builder.

type GroupDeleteOne

type GroupDeleteOne struct {
	// contains filtered or unexported fields
}

GroupDeleteOne is the builder for deleting a single Group entity.

func (*GroupDeleteOne) Exec

func (gdo *GroupDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GroupDeleteOne) ExecX

func (gdo *GroupDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type GroupEdges

type GroupEdges struct {
	// Files holds the value of the files edge.
	Files []*File `json:"files,omitempty"`
	// Blocked holds the value of the blocked edge.
	Blocked []*User `json:"blocked,omitempty"`
	// Users holds the value of the users edge.
	Users []*User `json:"users,omitempty"`
	// Info holds the value of the info edge.
	Info *GroupInfo `json:"info,omitempty"`
	// contains filtered or unexported fields
}

GroupEdges holds the relations/edges for other nodes in the graph.

func (GroupEdges) BlockedOrErr

func (e GroupEdges) BlockedOrErr() ([]*User, error)

BlockedOrErr returns the Blocked value or an error if the edge was not loaded in eager-loading.

func (GroupEdges) FilesOrErr

func (e GroupEdges) FilesOrErr() ([]*File, error)

FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.

func (GroupEdges) InfoOrErr

func (e GroupEdges) InfoOrErr() (*GroupInfo, error)

InfoOrErr returns the Info value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (GroupEdges) UsersOrErr

func (e GroupEdges) UsersOrErr() ([]*User, error)

UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.

type GroupFilter

type GroupFilter struct {
	// contains filtered or unexported fields
}

GroupFilter provides a generic filtering capability at runtime for GroupQuery.

func (*GroupFilter) Where

func (f *GroupFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*GroupFilter) WhereActive

func (f *GroupFilter) WhereActive(p entql.BoolP)

WhereActive applies the entql bool predicate on the active field.

func (*GroupFilter) WhereExpire

func (f *GroupFilter) WhereExpire(p entql.TimeP)

WhereExpire applies the entql time.Time predicate on the expire field.

func (*GroupFilter) WhereHasBlocked

func (f *GroupFilter) WhereHasBlocked()

WhereHasBlocked applies a predicate to check if query has an edge blocked.

func (*GroupFilter) WhereHasBlockedWith

func (f *GroupFilter) WhereHasBlockedWith(preds ...predicate.User)

WhereHasBlockedWith applies a predicate to check if query has an edge blocked with a given conditions (other predicates).

func (*GroupFilter) WhereHasFiles

func (f *GroupFilter) WhereHasFiles()

WhereHasFiles applies a predicate to check if query has an edge files.

func (*GroupFilter) WhereHasFilesWith

func (f *GroupFilter) WhereHasFilesWith(preds ...predicate.File)

WhereHasFilesWith applies a predicate to check if query has an edge files with a given conditions (other predicates).

func (*GroupFilter) WhereHasInfo

func (f *GroupFilter) WhereHasInfo()

WhereHasInfo applies a predicate to check if query has an edge info.

func (*GroupFilter) WhereHasInfoWith

func (f *GroupFilter) WhereHasInfoWith(preds ...predicate.GroupInfo)

WhereHasInfoWith applies a predicate to check if query has an edge info with a given conditions (other predicates).

func (*GroupFilter) WhereHasUsers

func (f *GroupFilter) WhereHasUsers()

WhereHasUsers applies a predicate to check if query has an edge users.

func (*GroupFilter) WhereHasUsersWith

func (f *GroupFilter) WhereHasUsersWith(preds ...predicate.User)

WhereHasUsersWith applies a predicate to check if query has an edge users with a given conditions (other predicates).

func (*GroupFilter) WhereID

func (f *GroupFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*GroupFilter) WhereMaxUsers

func (f *GroupFilter) WhereMaxUsers(p entql.IntP)

WhereMaxUsers applies the entql int predicate on the max_users field.

func (*GroupFilter) WhereName

func (f *GroupFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*GroupFilter) WhereType

func (f *GroupFilter) WhereType(p entql.StringP)

WhereType applies the entql string predicate on the type field.

type GroupGroupBy

type GroupGroupBy struct {
	// contains filtered or unexported fields
}

GroupGroupBy is the group-by builder for Group entities.

func (*GroupGroupBy) Aggregate

func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*GroupGroupBy) Bool

func (ggb *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GroupGroupBy) BoolX

func (ggb *GroupGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GroupGroupBy) Bools

func (ggb *GroupGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*GroupGroupBy) BoolsX

func (ggb *GroupGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GroupGroupBy) Float64

func (ggb *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GroupGroupBy) Float64X

func (ggb *GroupGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GroupGroupBy) Float64s

func (ggb *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*GroupGroupBy) Float64sX

func (ggb *GroupGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GroupGroupBy) Int

func (ggb *GroupGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GroupGroupBy) IntX

func (ggb *GroupGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GroupGroupBy) Ints

func (ggb *GroupGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*GroupGroupBy) IntsX

func (ggb *GroupGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GroupGroupBy) Scan

func (ggb *GroupGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*GroupGroupBy) ScanX

func (ggb *GroupGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*GroupGroupBy) String

func (ggb *GroupGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GroupGroupBy) StringX

func (ggb *GroupGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GroupGroupBy) Strings

func (ggb *GroupGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*GroupGroupBy) StringsX

func (ggb *GroupGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GroupInfo

type GroupInfo struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Desc holds the value of the "desc" field.
	Desc string `json:"desc,omitempty"`
	// MaxUsers holds the value of the "max_users" field.
	MaxUsers int `json:"max_users,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GroupInfoQuery when eager-loading is set.
	Edges GroupInfoEdges `json:"edges"`
	// contains filtered or unexported fields
}

GroupInfo is the model entity for the GroupInfo schema.

func (*GroupInfo) QueryGroups

func (gi *GroupInfo) QueryGroups() *GroupQuery

QueryGroups queries the "groups" edge of the GroupInfo entity.

func (*GroupInfo) String

func (gi *GroupInfo) String() string

String implements the fmt.Stringer.

func (*GroupInfo) Unwrap

func (gi *GroupInfo) Unwrap() *GroupInfo

Unwrap unwraps the GroupInfo 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 (*GroupInfo) Update

func (gi *GroupInfo) Update() *GroupInfoUpdateOne

Update returns a builder for updating this GroupInfo. Note that you need to call GroupInfo.Unwrap() before calling this method if this GroupInfo was returned from a transaction, and the transaction was committed or rolled back.

type GroupInfoClient

type GroupInfoClient struct {
	// contains filtered or unexported fields
}

GroupInfoClient is a client for the GroupInfo schema.

func NewGroupInfoClient

func NewGroupInfoClient(c config) *GroupInfoClient

NewGroupInfoClient returns a client for the GroupInfo from the given config.

func (*GroupInfoClient) Create

func (c *GroupInfoClient) Create() *GroupInfoCreate

Create returns a create builder for GroupInfo.

func (*GroupInfoClient) CreateBulk

func (c *GroupInfoClient) CreateBulk(builders ...*GroupInfoCreate) *GroupInfoCreateBulk

CreateBulk returns a builder for creating a bulk of GroupInfo entities.

func (*GroupInfoClient) Delete

func (c *GroupInfoClient) Delete() *GroupInfoDelete

Delete returns a delete builder for GroupInfo.

func (*GroupInfoClient) DeleteOne

func (c *GroupInfoClient) DeleteOne(gi *GroupInfo) *GroupInfoDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*GroupInfoClient) DeleteOneID

func (c *GroupInfoClient) DeleteOneID(id int) *GroupInfoDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*GroupInfoClient) Get

func (c *GroupInfoClient) Get(ctx context.Context, id int) (*GroupInfo, error)

Get returns a GroupInfo entity by its id.

func (*GroupInfoClient) GetX

func (c *GroupInfoClient) GetX(ctx context.Context, id int) *GroupInfo

GetX is like Get, but panics if an error occurs.

func (*GroupInfoClient) Hooks

func (c *GroupInfoClient) Hooks() []Hook

Hooks returns the client hooks.

func (*GroupInfoClient) Query

func (c *GroupInfoClient) Query() *GroupInfoQuery

Query returns a query builder for GroupInfo.

func (*GroupInfoClient) QueryGroups

func (c *GroupInfoClient) QueryGroups(gi *GroupInfo) *GroupQuery

QueryGroups queries the groups edge of a GroupInfo.

func (*GroupInfoClient) Update

func (c *GroupInfoClient) Update() *GroupInfoUpdate

Update returns an update builder for GroupInfo.

func (*GroupInfoClient) UpdateOne

func (c *GroupInfoClient) UpdateOne(gi *GroupInfo) *GroupInfoUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GroupInfoClient) UpdateOneID

func (c *GroupInfoClient) UpdateOneID(id int) *GroupInfoUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GroupInfoClient) Use

func (c *GroupInfoClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `groupinfo.Hooks(f(g(h())))`.

type GroupInfoCreate

type GroupInfoCreate struct {
	// contains filtered or unexported fields
}

GroupInfoCreate is the builder for creating a GroupInfo entity.

func (*GroupInfoCreate) AddGroupIDs

func (gic *GroupInfoCreate) AddGroupIDs(ids ...int) *GroupInfoCreate

AddGroupIDs adds the "groups" edge to the Group entity by IDs.

func (*GroupInfoCreate) AddGroups

func (gic *GroupInfoCreate) AddGroups(g ...*Group) *GroupInfoCreate

AddGroups adds the "groups" edges to the Group entity.

func (*GroupInfoCreate) Exec added in v0.9.0

func (gic *GroupInfoCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupInfoCreate) ExecX added in v0.9.0

func (gic *GroupInfoCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GroupInfoCreate) Mutation

func (gic *GroupInfoCreate) Mutation() *GroupInfoMutation

Mutation returns the GroupInfoMutation object of the builder.

func (*GroupInfoCreate) OnConflict added in v0.9.0

func (gic *GroupInfoCreate) OnConflict(opts ...sql.ConflictOption) *GroupInfoUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GroupInfo.Create().
	SetDesc(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.GroupInfoUpsert) {
		SetDesc(v+v).
	}).
	Exec(ctx)

func (*GroupInfoCreate) OnConflictColumns added in v0.9.0

func (gic *GroupInfoCreate) OnConflictColumns(columns ...string) *GroupInfoUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GroupInfo.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GroupInfoCreate) Save

func (gic *GroupInfoCreate) Save(ctx context.Context) (*GroupInfo, error)

Save creates the GroupInfo in the database.

func (*GroupInfoCreate) SaveX

func (gic *GroupInfoCreate) SaveX(ctx context.Context) *GroupInfo

SaveX calls Save and panics if Save returns an error.

func (*GroupInfoCreate) SetDesc

func (gic *GroupInfoCreate) SetDesc(s string) *GroupInfoCreate

SetDesc sets the "desc" field.

func (*GroupInfoCreate) SetMaxUsers

func (gic *GroupInfoCreate) SetMaxUsers(i int) *GroupInfoCreate

SetMaxUsers sets the "max_users" field.

func (*GroupInfoCreate) SetNillableMaxUsers

func (gic *GroupInfoCreate) SetNillableMaxUsers(i *int) *GroupInfoCreate

SetNillableMaxUsers sets the "max_users" field if the given value is not nil.

type GroupInfoCreateBulk

type GroupInfoCreateBulk struct {
	// contains filtered or unexported fields
}

GroupInfoCreateBulk is the builder for creating many GroupInfo entities in bulk.

func (*GroupInfoCreateBulk) Exec added in v0.9.0

func (gicb *GroupInfoCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupInfoCreateBulk) ExecX added in v0.9.0

func (gicb *GroupInfoCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GroupInfoCreateBulk) OnConflict added in v0.9.0

func (gicb *GroupInfoCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupInfoUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GroupInfo.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.GroupInfoUpsert) {
		SetDesc(v+v).
	}).
	Exec(ctx)

func (*GroupInfoCreateBulk) OnConflictColumns added in v0.9.0

func (gicb *GroupInfoCreateBulk) OnConflictColumns(columns ...string) *GroupInfoUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GroupInfo.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GroupInfoCreateBulk) Save

func (gicb *GroupInfoCreateBulk) Save(ctx context.Context) ([]*GroupInfo, error)

Save creates the GroupInfo entities in the database.

func (*GroupInfoCreateBulk) SaveX

func (gicb *GroupInfoCreateBulk) SaveX(ctx context.Context) []*GroupInfo

SaveX is like Save, but panics if an error occurs.

type GroupInfoDelete

type GroupInfoDelete struct {
	// contains filtered or unexported fields
}

GroupInfoDelete is the builder for deleting a GroupInfo entity.

func (*GroupInfoDelete) Exec

func (gid *GroupInfoDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*GroupInfoDelete) ExecX

func (gid *GroupInfoDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*GroupInfoDelete) Where

Where appends a list predicates to the GroupInfoDelete builder.

type GroupInfoDeleteOne

type GroupInfoDeleteOne struct {
	// contains filtered or unexported fields
}

GroupInfoDeleteOne is the builder for deleting a single GroupInfo entity.

func (*GroupInfoDeleteOne) Exec

func (gido *GroupInfoDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GroupInfoDeleteOne) ExecX

func (gido *GroupInfoDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type GroupInfoEdges

type GroupInfoEdges struct {
	// Groups holds the value of the groups edge.
	Groups []*Group `json:"groups,omitempty"`
	// contains filtered or unexported fields
}

GroupInfoEdges holds the relations/edges for other nodes in the graph.

func (GroupInfoEdges) GroupsOrErr

func (e GroupInfoEdges) GroupsOrErr() ([]*Group, error)

GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.

type GroupInfoFilter

type GroupInfoFilter struct {
	// contains filtered or unexported fields
}

GroupInfoFilter provides a generic filtering capability at runtime for GroupInfoQuery.

func (*GroupInfoFilter) Where

func (f *GroupInfoFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*GroupInfoFilter) WhereDesc

func (f *GroupInfoFilter) WhereDesc(p entql.StringP)

WhereDesc applies the entql string predicate on the desc field.

func (*GroupInfoFilter) WhereHasGroups

func (f *GroupInfoFilter) WhereHasGroups()

WhereHasGroups applies a predicate to check if query has an edge groups.

func (*GroupInfoFilter) WhereHasGroupsWith

func (f *GroupInfoFilter) WhereHasGroupsWith(preds ...predicate.Group)

WhereHasGroupsWith applies a predicate to check if query has an edge groups with a given conditions (other predicates).

func (*GroupInfoFilter) WhereID

func (f *GroupInfoFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*GroupInfoFilter) WhereMaxUsers

func (f *GroupInfoFilter) WhereMaxUsers(p entql.IntP)

WhereMaxUsers applies the entql int predicate on the max_users field.

type GroupInfoGroupBy

type GroupInfoGroupBy struct {
	// contains filtered or unexported fields
}

GroupInfoGroupBy is the group-by builder for GroupInfo entities.

func (*GroupInfoGroupBy) Aggregate

func (gigb *GroupInfoGroupBy) Aggregate(fns ...AggregateFunc) *GroupInfoGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*GroupInfoGroupBy) Bool

func (gigb *GroupInfoGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GroupInfoGroupBy) BoolX

func (gigb *GroupInfoGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GroupInfoGroupBy) Bools

func (gigb *GroupInfoGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*GroupInfoGroupBy) BoolsX

func (gigb *GroupInfoGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GroupInfoGroupBy) Float64

func (gigb *GroupInfoGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GroupInfoGroupBy) Float64X

func (gigb *GroupInfoGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GroupInfoGroupBy) Float64s

func (gigb *GroupInfoGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*GroupInfoGroupBy) Float64sX

func (gigb *GroupInfoGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GroupInfoGroupBy) Int

func (gigb *GroupInfoGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GroupInfoGroupBy) IntX

func (gigb *GroupInfoGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GroupInfoGroupBy) Ints

func (gigb *GroupInfoGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*GroupInfoGroupBy) IntsX

func (gigb *GroupInfoGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GroupInfoGroupBy) Scan

func (gigb *GroupInfoGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*GroupInfoGroupBy) ScanX

func (gigb *GroupInfoGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*GroupInfoGroupBy) String

func (gigb *GroupInfoGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*GroupInfoGroupBy) StringX

func (gigb *GroupInfoGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GroupInfoGroupBy) Strings

func (gigb *GroupInfoGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*GroupInfoGroupBy) StringsX

func (gigb *GroupInfoGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GroupInfoMutation

type GroupInfoMutation struct {
	// contains filtered or unexported fields
}

GroupInfoMutation represents an operation that mutates the GroupInfo nodes in the graph.

func (*GroupInfoMutation) AddField

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) AddGroupIDs

func (m *GroupInfoMutation) AddGroupIDs(ids ...int)

AddGroupIDs adds the "groups" edge to the Group entity by ids.

func (*GroupInfoMutation) AddMaxUsers

func (m *GroupInfoMutation) AddMaxUsers(i int)

AddMaxUsers adds i to the "max_users" field.

func (*GroupInfoMutation) AddedEdges

func (m *GroupInfoMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*GroupInfoMutation) AddedField

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) AddedFields

func (m *GroupInfoMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*GroupInfoMutation) AddedIDs

func (m *GroupInfoMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*GroupInfoMutation) AddedMaxUsers

func (m *GroupInfoMutation) AddedMaxUsers() (r int, exists bool)

AddedMaxUsers returns the value that was added to the "max_users" field in this mutation.

func (*GroupInfoMutation) ClearEdge

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) ClearField

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) ClearGroups

func (m *GroupInfoMutation) ClearGroups()

ClearGroups clears the "groups" edge to the Group entity.

func (*GroupInfoMutation) ClearedEdges

func (m *GroupInfoMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*GroupInfoMutation) ClearedFields

func (m *GroupInfoMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (GroupInfoMutation) Client

func (m GroupInfoMutation) 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 (*GroupInfoMutation) Desc

func (m *GroupInfoMutation) Desc() (r string, exists bool)

Desc returns the value of the "desc" field in the mutation.

func (*GroupInfoMutation) EdgeCleared

func (m *GroupInfoMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*GroupInfoMutation) Field

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) FieldCleared

func (m *GroupInfoMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*GroupInfoMutation) Fields

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) Filter

func (m *GroupInfoMutation) Filter() *GroupInfoFilter

Filter returns an entql.Where implementation to apply filters on the GroupInfoMutation builder.

func (*GroupInfoMutation) GroupsCleared

func (m *GroupInfoMutation) GroupsCleared() bool

GroupsCleared reports if the "groups" edge to the Group entity was cleared.

func (*GroupInfoMutation) GroupsIDs

func (m *GroupInfoMutation) GroupsIDs() (ids []int)

GroupsIDs returns the "groups" edge IDs in the mutation.

func (*GroupInfoMutation) ID

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) IDs added in v0.10.0

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) MaxUsers

func (m *GroupInfoMutation) MaxUsers() (r int, exists bool)

MaxUsers returns the value of the "max_users" field in the mutation.

func (*GroupInfoMutation) OldDesc

func (m *GroupInfoMutation) OldDesc(ctx context.Context) (v string, err error)

OldDesc returns the old "desc" field's value of the GroupInfo entity. If the GroupInfo 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 (*GroupInfoMutation) OldField

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) OldMaxUsers

func (m *GroupInfoMutation) OldMaxUsers(ctx context.Context) (v int, err error)

OldMaxUsers returns the old "max_users" field's value of the GroupInfo entity. If the GroupInfo 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 (*GroupInfoMutation) Op

func (m *GroupInfoMutation) Op() Op

Op returns the operation name.

func (*GroupInfoMutation) RemoveGroupIDs

func (m *GroupInfoMutation) RemoveGroupIDs(ids ...int)

RemoveGroupIDs removes the "groups" edge to the Group entity by IDs.

func (*GroupInfoMutation) RemovedEdges

func (m *GroupInfoMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*GroupInfoMutation) RemovedGroupsIDs

func (m *GroupInfoMutation) RemovedGroupsIDs() (ids []int)

RemovedGroups returns the removed IDs of the "groups" edge to the Group entity.

func (*GroupInfoMutation) RemovedIDs

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) ResetDesc

func (m *GroupInfoMutation) ResetDesc()

ResetDesc resets all changes to the "desc" field.

func (*GroupInfoMutation) ResetEdge

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) ResetField

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) ResetGroups

func (m *GroupInfoMutation) ResetGroups()

ResetGroups resets all changes to the "groups" edge.

func (*GroupInfoMutation) ResetMaxUsers

func (m *GroupInfoMutation) ResetMaxUsers()

ResetMaxUsers resets all changes to the "max_users" field.

func (*GroupInfoMutation) SetDesc

func (m *GroupInfoMutation) SetDesc(s string)

SetDesc sets the "desc" field.

func (*GroupInfoMutation) SetField

func (m *GroupInfoMutation) 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 (*GroupInfoMutation) SetMaxUsers

func (m *GroupInfoMutation) SetMaxUsers(i int)

SetMaxUsers sets the "max_users" field.

func (GroupInfoMutation) Tx

func (m GroupInfoMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*GroupInfoMutation) Type

func (m *GroupInfoMutation) Type() string

Type returns the node type of this mutation (GroupInfo).

func (*GroupInfoMutation) Where added in v0.9.0

func (m *GroupInfoMutation) Where(ps ...predicate.GroupInfo)

Where appends a list predicates to the GroupInfoMutation builder.

type GroupInfoQuery

type GroupInfoQuery struct {
	// contains filtered or unexported fields
}

GroupInfoQuery is the builder for querying GroupInfo entities.

func (*GroupInfoQuery) All

func (giq *GroupInfoQuery) All(ctx context.Context) ([]*GroupInfo, error)

All executes the query and returns a list of GroupInfos.

func (*GroupInfoQuery) AllX

func (giq *GroupInfoQuery) AllX(ctx context.Context) []*GroupInfo

AllX is like All, but panics if an error occurs.

func (*GroupInfoQuery) Clone

func (giq *GroupInfoQuery) Clone() *GroupInfoQuery

Clone returns a duplicate of the GroupInfoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*GroupInfoQuery) Count

func (giq *GroupInfoQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GroupInfoQuery) CountX

func (giq *GroupInfoQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*GroupInfoQuery) Exist

func (giq *GroupInfoQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*GroupInfoQuery) ExistX

func (giq *GroupInfoQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*GroupInfoQuery) Filter

func (giq *GroupInfoQuery) Filter() *GroupInfoFilter

Filter returns a Filter implementation to apply filters on the GroupInfoQuery builder.

func (*GroupInfoQuery) First

func (giq *GroupInfoQuery) First(ctx context.Context) (*GroupInfo, error)

First returns the first GroupInfo entity from the query. Returns a *NotFoundError when no GroupInfo was found.

func (*GroupInfoQuery) FirstID

func (giq *GroupInfoQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first GroupInfo ID from the query. Returns a *NotFoundError when no GroupInfo ID was found.

func (*GroupInfoQuery) FirstIDX

func (giq *GroupInfoQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*GroupInfoQuery) FirstX

func (giq *GroupInfoQuery) FirstX(ctx context.Context) *GroupInfo

FirstX is like First, but panics if an error occurs.

func (*GroupInfoQuery) ForShare added in v0.9.0

func (giq *GroupInfoQuery) ForShare(opts ...sql.LockOption) *GroupInfoQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*GroupInfoQuery) ForUpdate added in v0.9.0

func (giq *GroupInfoQuery) ForUpdate(opts ...sql.LockOption) *GroupInfoQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*GroupInfoQuery) GroupBy

func (giq *GroupInfoQuery) GroupBy(field string, fields ...string) *GroupInfoGroupBy

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 {
	Desc string `json:"desc,omitempty"`
	Count int `json:"count,omitempty"`
}

client.GroupInfo.Query().
	GroupBy(groupinfo.FieldDesc).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GroupInfoQuery) IDs

func (giq *GroupInfoQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of GroupInfo IDs.

func (*GroupInfoQuery) IDsX

func (giq *GroupInfoQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*GroupInfoQuery) Limit

func (giq *GroupInfoQuery) Limit(limit int) *GroupInfoQuery

Limit adds a limit step to the query.

func (*GroupInfoQuery) Modify added in v0.9.0

func (giq *GroupInfoQuery) Modify(modifiers ...func(s *sql.Selector)) *GroupInfoSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*GroupInfoQuery) Offset

func (giq *GroupInfoQuery) Offset(offset int) *GroupInfoQuery

Offset adds an offset step to the query.

func (*GroupInfoQuery) Only

func (giq *GroupInfoQuery) Only(ctx context.Context) (*GroupInfo, error)

Only returns a single GroupInfo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one GroupInfo entity is not found. Returns a *NotFoundError when no GroupInfo entities are found.

func (*GroupInfoQuery) OnlyID

func (giq *GroupInfoQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only GroupInfo ID in the query. Returns a *NotSingularError when exactly one GroupInfo ID is not found. Returns a *NotFoundError when no entities are found.

func (*GroupInfoQuery) OnlyIDX

func (giq *GroupInfoQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*GroupInfoQuery) OnlyX

func (giq *GroupInfoQuery) OnlyX(ctx context.Context) *GroupInfo

OnlyX is like Only, but panics if an error occurs.

func (*GroupInfoQuery) Order

func (giq *GroupInfoQuery) Order(o ...OrderFunc) *GroupInfoQuery

Order adds an order step to the query.

func (*GroupInfoQuery) QueryGroups

func (giq *GroupInfoQuery) QueryGroups() *GroupQuery

QueryGroups chains the current query on the "groups" edge.

func (*GroupInfoQuery) Select

func (giq *GroupInfoQuery) Select(fields ...string) *GroupInfoSelect

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 {
	Desc string `json:"desc,omitempty"`
}

client.GroupInfo.Query().
	Select(groupinfo.FieldDesc).
	Scan(ctx, &v)

func (*GroupInfoQuery) Unique added in v0.8.0

func (giq *GroupInfoQuery) Unique(unique bool) *GroupInfoQuery

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 (*GroupInfoQuery) Where

func (giq *GroupInfoQuery) Where(ps ...predicate.GroupInfo) *GroupInfoQuery

Where adds a new predicate for the GroupInfoQuery builder.

func (*GroupInfoQuery) WithGroups

func (giq *GroupInfoQuery) WithGroups(opts ...func(*GroupQuery)) *GroupInfoQuery

WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.

type GroupInfoSelect

type GroupInfoSelect struct {
	*GroupInfoQuery
	// contains filtered or unexported fields
}

GroupInfoSelect is the builder for selecting fields of GroupInfo entities.

func (*GroupInfoSelect) Bool

func (gis *GroupInfoSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GroupInfoSelect) BoolX

func (gis *GroupInfoSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GroupInfoSelect) Bools

func (gis *GroupInfoSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GroupInfoSelect) BoolsX

func (gis *GroupInfoSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GroupInfoSelect) Float64

func (gis *GroupInfoSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GroupInfoSelect) Float64X

func (gis *GroupInfoSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GroupInfoSelect) Float64s

func (gis *GroupInfoSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GroupInfoSelect) Float64sX

func (gis *GroupInfoSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GroupInfoSelect) Int

func (gis *GroupInfoSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GroupInfoSelect) IntX

func (gis *GroupInfoSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GroupInfoSelect) Ints

func (gis *GroupInfoSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GroupInfoSelect) IntsX

func (gis *GroupInfoSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GroupInfoSelect) Modify added in v0.9.0

func (gis *GroupInfoSelect) Modify(modifiers ...func(s *sql.Selector)) *GroupInfoSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*GroupInfoSelect) Scan

func (gis *GroupInfoSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*GroupInfoSelect) ScanX

func (gis *GroupInfoSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*GroupInfoSelect) String

func (gis *GroupInfoSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GroupInfoSelect) StringX

func (gis *GroupInfoSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GroupInfoSelect) Strings

func (gis *GroupInfoSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GroupInfoSelect) StringsX

func (gis *GroupInfoSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GroupInfoUpdate

type GroupInfoUpdate struct {
	// contains filtered or unexported fields
}

GroupInfoUpdate is the builder for updating GroupInfo entities.

func (*GroupInfoUpdate) AddGroupIDs

func (giu *GroupInfoUpdate) AddGroupIDs(ids ...int) *GroupInfoUpdate

AddGroupIDs adds the "groups" edge to the Group entity by IDs.

func (*GroupInfoUpdate) AddGroups

func (giu *GroupInfoUpdate) AddGroups(g ...*Group) *GroupInfoUpdate

AddGroups adds the "groups" edges to the Group entity.

func (*GroupInfoUpdate) AddMaxUsers

func (giu *GroupInfoUpdate) AddMaxUsers(i int) *GroupInfoUpdate

AddMaxUsers adds i to the "max_users" field.

func (*GroupInfoUpdate) ClearGroups

func (giu *GroupInfoUpdate) ClearGroups() *GroupInfoUpdate

ClearGroups clears all "groups" edges to the Group entity.

func (*GroupInfoUpdate) Exec

func (giu *GroupInfoUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupInfoUpdate) ExecX

func (giu *GroupInfoUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GroupInfoUpdate) Mutation

func (giu *GroupInfoUpdate) Mutation() *GroupInfoMutation

Mutation returns the GroupInfoMutation object of the builder.

func (*GroupInfoUpdate) RemoveGroupIDs

func (giu *GroupInfoUpdate) RemoveGroupIDs(ids ...int) *GroupInfoUpdate

RemoveGroupIDs removes the "groups" edge to Group entities by IDs.

func (*GroupInfoUpdate) RemoveGroups

func (giu *GroupInfoUpdate) RemoveGroups(g ...*Group) *GroupInfoUpdate

RemoveGroups removes "groups" edges to Group entities.

func (*GroupInfoUpdate) Save

func (giu *GroupInfoUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*GroupInfoUpdate) SaveX

func (giu *GroupInfoUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GroupInfoUpdate) SetDesc

func (giu *GroupInfoUpdate) SetDesc(s string) *GroupInfoUpdate

SetDesc sets the "desc" field.

func (*GroupInfoUpdate) SetMaxUsers

func (giu *GroupInfoUpdate) SetMaxUsers(i int) *GroupInfoUpdate

SetMaxUsers sets the "max_users" field.

func (*GroupInfoUpdate) SetNillableMaxUsers

func (giu *GroupInfoUpdate) SetNillableMaxUsers(i *int) *GroupInfoUpdate

SetNillableMaxUsers sets the "max_users" field if the given value is not nil.

func (*GroupInfoUpdate) Where

Where appends a list predicates to the GroupInfoUpdate builder.

type GroupInfoUpdateOne

type GroupInfoUpdateOne struct {
	// contains filtered or unexported fields
}

GroupInfoUpdateOne is the builder for updating a single GroupInfo entity.

func (*GroupInfoUpdateOne) AddGroupIDs

func (giuo *GroupInfoUpdateOne) AddGroupIDs(ids ...int) *GroupInfoUpdateOne

AddGroupIDs adds the "groups" edge to the Group entity by IDs.

func (*GroupInfoUpdateOne) AddGroups

func (giuo *GroupInfoUpdateOne) AddGroups(g ...*Group) *GroupInfoUpdateOne

AddGroups adds the "groups" edges to the Group entity.

func (*GroupInfoUpdateOne) AddMaxUsers

func (giuo *GroupInfoUpdateOne) AddMaxUsers(i int) *GroupInfoUpdateOne

AddMaxUsers adds i to the "max_users" field.

func (*GroupInfoUpdateOne) ClearGroups

func (giuo *GroupInfoUpdateOne) ClearGroups() *GroupInfoUpdateOne

ClearGroups clears all "groups" edges to the Group entity.

func (*GroupInfoUpdateOne) Exec

func (giuo *GroupInfoUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GroupInfoUpdateOne) ExecX

func (giuo *GroupInfoUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GroupInfoUpdateOne) Mutation

func (giuo *GroupInfoUpdateOne) Mutation() *GroupInfoMutation

Mutation returns the GroupInfoMutation object of the builder.

func (*GroupInfoUpdateOne) RemoveGroupIDs

func (giuo *GroupInfoUpdateOne) RemoveGroupIDs(ids ...int) *GroupInfoUpdateOne

RemoveGroupIDs removes the "groups" edge to Group entities by IDs.

func (*GroupInfoUpdateOne) RemoveGroups

func (giuo *GroupInfoUpdateOne) RemoveGroups(g ...*Group) *GroupInfoUpdateOne

RemoveGroups removes "groups" edges to Group entities.

func (*GroupInfoUpdateOne) Save

func (giuo *GroupInfoUpdateOne) Save(ctx context.Context) (*GroupInfo, error)

Save executes the query and returns the updated GroupInfo entity.

func (*GroupInfoUpdateOne) SaveX

func (giuo *GroupInfoUpdateOne) SaveX(ctx context.Context) *GroupInfo

SaveX is like Save, but panics if an error occurs.

func (*GroupInfoUpdateOne) Select added in v0.8.0

func (giuo *GroupInfoUpdateOne) Select(field string, fields ...string) *GroupInfoUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*GroupInfoUpdateOne) SetDesc

func (giuo *GroupInfoUpdateOne) SetDesc(s string) *GroupInfoUpdateOne

SetDesc sets the "desc" field.

func (*GroupInfoUpdateOne) SetMaxUsers

func (giuo *GroupInfoUpdateOne) SetMaxUsers(i int) *GroupInfoUpdateOne

SetMaxUsers sets the "max_users" field.

func (*GroupInfoUpdateOne) SetNillableMaxUsers

func (giuo *GroupInfoUpdateOne) SetNillableMaxUsers(i *int) *GroupInfoUpdateOne

SetNillableMaxUsers sets the "max_users" field if the given value is not nil.

type GroupInfoUpsert added in v0.9.0

type GroupInfoUpsert struct {
	*sql.UpdateSet
}

GroupInfoUpsert is the "OnConflict" setter.

func (*GroupInfoUpsert) AddMaxUsers added in v0.10.0

func (u *GroupInfoUpsert) AddMaxUsers(v int) *GroupInfoUpsert

AddMaxUsers adds v to the "max_users" field.

func (*GroupInfoUpsert) SetDesc added in v0.9.0

func (u *GroupInfoUpsert) SetDesc(v string) *GroupInfoUpsert

SetDesc sets the "desc" field.

func (*GroupInfoUpsert) SetMaxUsers added in v0.9.0

func (u *GroupInfoUpsert) SetMaxUsers(v int) *GroupInfoUpsert

SetMaxUsers sets the "max_users" field.

func (*GroupInfoUpsert) UpdateDesc added in v0.9.0

func (u *GroupInfoUpsert) UpdateDesc() *GroupInfoUpsert

UpdateDesc sets the "desc" field to the value that was provided on create.

func (*GroupInfoUpsert) UpdateMaxUsers added in v0.9.0

func (u *GroupInfoUpsert) UpdateMaxUsers() *GroupInfoUpsert

UpdateMaxUsers sets the "max_users" field to the value that was provided on create.

type GroupInfoUpsertBulk added in v0.9.0

type GroupInfoUpsertBulk struct {
	// contains filtered or unexported fields
}

GroupInfoUpsertBulk is the builder for "upsert"-ing a bulk of GroupInfo nodes.

func (*GroupInfoUpsertBulk) AddMaxUsers added in v0.10.0

func (u *GroupInfoUpsertBulk) AddMaxUsers(v int) *GroupInfoUpsertBulk

AddMaxUsers adds v to the "max_users" field.

func (*GroupInfoUpsertBulk) DoNothing added in v0.9.0

func (u *GroupInfoUpsertBulk) DoNothing() *GroupInfoUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GroupInfoUpsertBulk) Exec added in v0.9.0

Exec executes the query.

func (*GroupInfoUpsertBulk) ExecX added in v0.9.0

func (u *GroupInfoUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GroupInfoUpsertBulk) Ignore added in v0.9.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GroupInfo.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GroupInfoUpsertBulk) SetDesc added in v0.9.0

SetDesc sets the "desc" field.

func (*GroupInfoUpsertBulk) SetMaxUsers added in v0.9.0

func (u *GroupInfoUpsertBulk) SetMaxUsers(v int) *GroupInfoUpsertBulk

SetMaxUsers sets the "max_users" field.

func (*GroupInfoUpsertBulk) Update added in v0.9.0

Update allows overriding fields `UPDATE` values. See the GroupInfoCreateBulk.OnConflict documentation for more info.

func (*GroupInfoUpsertBulk) UpdateDesc added in v0.9.0

func (u *GroupInfoUpsertBulk) UpdateDesc() *GroupInfoUpsertBulk

UpdateDesc sets the "desc" field to the value that was provided on create.

func (*GroupInfoUpsertBulk) UpdateMaxUsers added in v0.9.0

func (u *GroupInfoUpsertBulk) UpdateMaxUsers() *GroupInfoUpsertBulk

UpdateMaxUsers sets the "max_users" field to the value that was provided on create.

func (*GroupInfoUpsertBulk) UpdateNewValues added in v0.9.0

func (u *GroupInfoUpsertBulk) UpdateNewValues() *GroupInfoUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GroupInfo.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type GroupInfoUpsertOne added in v0.9.0

type GroupInfoUpsertOne struct {
	// contains filtered or unexported fields
}

GroupInfoUpsertOne is the builder for "upsert"-ing

one GroupInfo node.

func (*GroupInfoUpsertOne) AddMaxUsers added in v0.10.0

func (u *GroupInfoUpsertOne) AddMaxUsers(v int) *GroupInfoUpsertOne

AddMaxUsers adds v to the "max_users" field.

func (*GroupInfoUpsertOne) DoNothing added in v0.9.0

func (u *GroupInfoUpsertOne) DoNothing() *GroupInfoUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GroupInfoUpsertOne) Exec added in v0.9.0

func (u *GroupInfoUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupInfoUpsertOne) ExecX added in v0.9.0

func (u *GroupInfoUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GroupInfoUpsertOne) ID added in v0.9.0

func (u *GroupInfoUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GroupInfoUpsertOne) IDX added in v0.9.0

func (u *GroupInfoUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*GroupInfoUpsertOne) Ignore added in v0.9.0

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GroupInfo.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GroupInfoUpsertOne) SetDesc added in v0.9.0

SetDesc sets the "desc" field.

func (*GroupInfoUpsertOne) SetMaxUsers added in v0.9.0

func (u *GroupInfoUpsertOne) SetMaxUsers(v int) *GroupInfoUpsertOne

SetMaxUsers sets the "max_users" field.

func (*GroupInfoUpsertOne) Update added in v0.9.0

func (u *GroupInfoUpsertOne) Update(set func(*GroupInfoUpsert)) *GroupInfoUpsertOne

Update allows overriding fields `UPDATE` values. See the GroupInfoCreate.OnConflict documentation for more info.

func (*GroupInfoUpsertOne) UpdateDesc added in v0.9.0

func (u *GroupInfoUpsertOne) UpdateDesc() *GroupInfoUpsertOne

UpdateDesc sets the "desc" field to the value that was provided on create.

func (*GroupInfoUpsertOne) UpdateMaxUsers added in v0.9.0

func (u *GroupInfoUpsertOne) UpdateMaxUsers() *GroupInfoUpsertOne

UpdateMaxUsers sets the "max_users" field to the value that was provided on create.

func (*GroupInfoUpsertOne) UpdateNewValues added in v0.9.0

func (u *GroupInfoUpsertOne) UpdateNewValues() *GroupInfoUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GroupInfo.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type GroupInfos

type GroupInfos []*GroupInfo

GroupInfos is a parsable slice of GroupInfo.

type GroupMutation

type GroupMutation struct {
	// contains filtered or unexported fields
}

GroupMutation represents an operation that mutates the Group nodes in the graph.

func (*GroupMutation) Active

func (m *GroupMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*GroupMutation) AddBlockedIDs

func (m *GroupMutation) AddBlockedIDs(ids ...int)

AddBlockedIDs adds the "blocked" edge to the User entity by ids.

func (*GroupMutation) AddField

func (m *GroupMutation) 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 (*GroupMutation) AddFileIDs

func (m *GroupMutation) AddFileIDs(ids ...int)

AddFileIDs adds the "files" edge to the File entity by ids.

func (*GroupMutation) AddMaxUsers

func (m *GroupMutation) AddMaxUsers(i int)

AddMaxUsers adds i to the "max_users" field.

func (*GroupMutation) AddUserIDs

func (m *GroupMutation) AddUserIDs(ids ...int)

AddUserIDs adds the "users" edge to the User entity by ids.

func (*GroupMutation) AddedEdges

func (m *GroupMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*GroupMutation) AddedField

func (m *GroupMutation) 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 (*GroupMutation) AddedFields

func (m *GroupMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*GroupMutation) AddedIDs

func (m *GroupMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*GroupMutation) AddedMaxUsers

func (m *GroupMutation) AddedMaxUsers() (r int, exists bool)

AddedMaxUsers returns the value that was added to the "max_users" field in this mutation.

func (*GroupMutation) BlockedCleared

func (m *GroupMutation) BlockedCleared() bool

BlockedCleared reports if the "blocked" edge to the User entity was cleared.

func (*GroupMutation) BlockedIDs

func (m *GroupMutation) BlockedIDs() (ids []int)

BlockedIDs returns the "blocked" edge IDs in the mutation.

func (*GroupMutation) ClearBlocked

func (m *GroupMutation) ClearBlocked()

ClearBlocked clears the "blocked" edge to the User entity.

func (*GroupMutation) ClearEdge

func (m *GroupMutation) 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 (*GroupMutation) ClearField

func (m *GroupMutation) 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 (*GroupMutation) ClearFiles

func (m *GroupMutation) ClearFiles()

ClearFiles clears the "files" edge to the File entity.

func (*GroupMutation) ClearInfo

func (m *GroupMutation) ClearInfo()

ClearInfo clears the "info" edge to the GroupInfo entity.

func (*GroupMutation) ClearMaxUsers

func (m *GroupMutation) ClearMaxUsers()

ClearMaxUsers clears the value of the "max_users" field.

func (*GroupMutation) ClearType

func (m *GroupMutation) ClearType()

ClearType clears the value of the "type" field.

func (*GroupMutation) ClearUsers

func (m *GroupMutation) ClearUsers()

ClearUsers clears the "users" edge to the User entity.

func (*GroupMutation) ClearedEdges

func (m *GroupMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*GroupMutation) ClearedFields

func (m *GroupMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (GroupMutation) Client

func (m GroupMutation) 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 (*GroupMutation) EdgeCleared

func (m *GroupMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*GroupMutation) Expire

func (m *GroupMutation) Expire() (r time.Time, exists bool)

Expire returns the value of the "expire" field in the mutation.

func (*GroupMutation) Field

func (m *GroupMutation) 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 (*GroupMutation) FieldCleared

func (m *GroupMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*GroupMutation) Fields

func (m *GroupMutation) 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 (*GroupMutation) FilesCleared

func (m *GroupMutation) FilesCleared() bool

FilesCleared reports if the "files" edge to the File entity was cleared.

func (*GroupMutation) FilesIDs

func (m *GroupMutation) FilesIDs() (ids []int)

FilesIDs returns the "files" edge IDs in the mutation.

func (*GroupMutation) Filter

func (m *GroupMutation) Filter() *GroupFilter

Filter returns an entql.Where implementation to apply filters on the GroupMutation builder.

func (*GroupMutation) GetType

func (m *GroupMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*GroupMutation) ID

func (m *GroupMutation) 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 (*GroupMutation) IDs added in v0.10.0

func (m *GroupMutation) 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 (*GroupMutation) InfoCleared

func (m *GroupMutation) InfoCleared() bool

InfoCleared reports if the "info" edge to the GroupInfo entity was cleared.

func (*GroupMutation) InfoID

func (m *GroupMutation) InfoID() (id int, exists bool)

InfoID returns the "info" edge ID in the mutation.

func (*GroupMutation) InfoIDs

func (m *GroupMutation) InfoIDs() (ids []int)

InfoIDs returns the "info" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InfoID instead. It exists only for internal usage by the builders.

func (*GroupMutation) MaxUsers

func (m *GroupMutation) MaxUsers() (r int, exists bool)

MaxUsers returns the value of the "max_users" field in the mutation.

func (*GroupMutation) MaxUsersCleared

func (m *GroupMutation) MaxUsersCleared() bool

MaxUsersCleared returns if the "max_users" field was cleared in this mutation.

func (*GroupMutation) Name

func (m *GroupMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*GroupMutation) OldActive

func (m *GroupMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the Group entity. If the Group 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 (*GroupMutation) OldExpire

func (m *GroupMutation) OldExpire(ctx context.Context) (v time.Time, err error)

OldExpire returns the old "expire" field's value of the Group entity. If the Group 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 (*GroupMutation) OldField

func (m *GroupMutation) 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 (*GroupMutation) OldMaxUsers

func (m *GroupMutation) OldMaxUsers(ctx context.Context) (v int, err error)

OldMaxUsers returns the old "max_users" field's value of the Group entity. If the Group 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 (*GroupMutation) OldName

func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Group entity. If the Group 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 (*GroupMutation) OldType

func (m *GroupMutation) OldType(ctx context.Context) (v *string, err error)

OldType returns the old "type" field's value of the Group entity. If the Group 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 (*GroupMutation) Op

func (m *GroupMutation) Op() Op

Op returns the operation name.

func (*GroupMutation) RemoveBlockedIDs

func (m *GroupMutation) RemoveBlockedIDs(ids ...int)

RemoveBlockedIDs removes the "blocked" edge to the User entity by IDs.

func (*GroupMutation) RemoveFileIDs

func (m *GroupMutation) RemoveFileIDs(ids ...int)

RemoveFileIDs removes the "files" edge to the File entity by IDs.

func (*GroupMutation) RemoveUserIDs

func (m *GroupMutation) RemoveUserIDs(ids ...int)

RemoveUserIDs removes the "users" edge to the User entity by IDs.

func (*GroupMutation) RemovedBlockedIDs

func (m *GroupMutation) RemovedBlockedIDs() (ids []int)

RemovedBlocked returns the removed IDs of the "blocked" edge to the User entity.

func (*GroupMutation) RemovedEdges

func (m *GroupMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*GroupMutation) RemovedFilesIDs

func (m *GroupMutation) RemovedFilesIDs() (ids []int)

RemovedFiles returns the removed IDs of the "files" edge to the File entity.

func (*GroupMutation) RemovedIDs

func (m *GroupMutation) 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 (*GroupMutation) RemovedUsersIDs

func (m *GroupMutation) RemovedUsersIDs() (ids []int)

RemovedUsers returns the removed IDs of the "users" edge to the User entity.

func (*GroupMutation) ResetActive

func (m *GroupMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*GroupMutation) ResetBlocked

func (m *GroupMutation) ResetBlocked()

ResetBlocked resets all changes to the "blocked" edge.

func (*GroupMutation) ResetEdge

func (m *GroupMutation) 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 (*GroupMutation) ResetExpire

func (m *GroupMutation) ResetExpire()

ResetExpire resets all changes to the "expire" field.

func (*GroupMutation) ResetField

func (m *GroupMutation) 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 (*GroupMutation) ResetFiles

func (m *GroupMutation) ResetFiles()

ResetFiles resets all changes to the "files" edge.

func (*GroupMutation) ResetInfo

func (m *GroupMutation) ResetInfo()

ResetInfo resets all changes to the "info" edge.

func (*GroupMutation) ResetMaxUsers

func (m *GroupMutation) ResetMaxUsers()

ResetMaxUsers resets all changes to the "max_users" field.

func (*GroupMutation) ResetName

func (m *GroupMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*GroupMutation) ResetType

func (m *GroupMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*GroupMutation) ResetUsers

func (m *GroupMutation) ResetUsers()

ResetUsers resets all changes to the "users" edge.

func (*GroupMutation) SetActive

func (m *GroupMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*GroupMutation) SetExpire

func (m *GroupMutation) SetExpire(t time.Time)

SetExpire sets the "expire" field.

func (*GroupMutation) SetField

func (m *GroupMutation) 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 (*GroupMutation) SetInfoID

func (m *GroupMutation) SetInfoID(id int)

SetInfoID sets the "info" edge to the GroupInfo entity by id.

func (*GroupMutation) SetMaxUsers

func (m *GroupMutation) SetMaxUsers(i int)

SetMaxUsers sets the "max_users" field.

func (*GroupMutation) SetName

func (m *GroupMutation) SetName(s string)

SetName sets the "name" field.

func (*GroupMutation) SetType

func (m *GroupMutation) SetType(s string)

SetType sets the "type" field.

func (GroupMutation) Tx

func (m GroupMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*GroupMutation) Type

func (m *GroupMutation) Type() string

Type returns the node type of this mutation (Group).

func (*GroupMutation) TypeCleared

func (m *GroupMutation) TypeCleared() bool

TypeCleared returns if the "type" field was cleared in this mutation.

func (*GroupMutation) UsersCleared

func (m *GroupMutation) UsersCleared() bool

UsersCleared reports if the "users" edge to the User entity was cleared.

func (*GroupMutation) UsersIDs

func (m *GroupMutation) UsersIDs() (ids []int)

UsersIDs returns the "users" edge IDs in the mutation.

func (*GroupMutation) Where added in v0.9.0

func (m *GroupMutation) Where(ps ...predicate.Group)

Where appends a list predicates to the GroupMutation builder.

type GroupQuery

type GroupQuery struct {
	// contains filtered or unexported fields
}

GroupQuery is the builder for querying Group entities.

func (*GroupQuery) All

func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)

All executes the query and returns a list of Groups.

func (*GroupQuery) AllX

func (gq *GroupQuery) AllX(ctx context.Context) []*Group

AllX is like All, but panics if an error occurs.

func (*GroupQuery) Clone

func (gq *GroupQuery) Clone() *GroupQuery

Clone returns a duplicate of the GroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*GroupQuery) Count

func (gq *GroupQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GroupQuery) CountX

func (gq *GroupQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*GroupQuery) Exist

func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*GroupQuery) ExistX

func (gq *GroupQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*GroupQuery) Filter

func (gq *GroupQuery) Filter() *GroupFilter

Filter returns a Filter implementation to apply filters on the GroupQuery builder.

func (*GroupQuery) First

func (gq *GroupQuery) First(ctx context.Context) (*Group, error)

First returns the first Group entity from the query. Returns a *NotFoundError when no Group was found.

func (*GroupQuery) FirstID

func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Group ID from the query. Returns a *NotFoundError when no Group ID was found.

func (*GroupQuery) FirstIDX

func (gq *GroupQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*GroupQuery) FirstX

func (gq *GroupQuery) FirstX(ctx context.Context) *Group

FirstX is like First, but panics if an error occurs.

func (*GroupQuery) ForShare added in v0.9.0

func (gq *GroupQuery) ForShare(opts ...sql.LockOption) *GroupQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*GroupQuery) ForUpdate added in v0.9.0

func (gq *GroupQuery) ForUpdate(opts ...sql.LockOption) *GroupQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*GroupQuery) GroupBy

func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Active bool `json:"active,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Group.Query().
	GroupBy(group.FieldActive).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GroupQuery) IDs

func (gq *GroupQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Group IDs.

func (*GroupQuery) IDsX

func (gq *GroupQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*GroupQuery) Limit

func (gq *GroupQuery) Limit(limit int) *GroupQuery

Limit adds a limit step to the query.

func (*GroupQuery) Modify added in v0.9.0

func (gq *GroupQuery) Modify(modifiers ...func(s *sql.Selector)) *GroupSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*GroupQuery) Offset

func (gq *GroupQuery) Offset(offset int) *GroupQuery

Offset adds an offset step to the query.

func (*GroupQuery) Only

func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)

Only returns a single Group entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Group entity is not found. Returns a *NotFoundError when no Group entities are found.

func (*GroupQuery) OnlyID

func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Group ID in the query. Returns a *NotSingularError when exactly one Group ID is not found. Returns a *NotFoundError when no entities are found.

func (*GroupQuery) OnlyIDX

func (gq *GroupQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*GroupQuery) OnlyX

func (gq *GroupQuery) OnlyX(ctx context.Context) *Group

OnlyX is like Only, but panics if an error occurs.

func (*GroupQuery) Order

func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery

Order adds an order step to the query.

func (*GroupQuery) QueryBlocked

func (gq *GroupQuery) QueryBlocked() *UserQuery

QueryBlocked chains the current query on the "blocked" edge.

func (*GroupQuery) QueryFiles

func (gq *GroupQuery) QueryFiles() *FileQuery

QueryFiles chains the current query on the "files" edge.

func (*GroupQuery) QueryInfo

func (gq *GroupQuery) QueryInfo() *GroupInfoQuery

QueryInfo chains the current query on the "info" edge.

func (*GroupQuery) QueryUsers

func (gq *GroupQuery) QueryUsers() *UserQuery

QueryUsers chains the current query on the "users" edge.

func (*GroupQuery) Select

func (gq *GroupQuery) Select(fields ...string) *GroupSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Active bool `json:"active,omitempty"`
}

client.Group.Query().
	Select(group.FieldActive).
	Scan(ctx, &v)

func (*GroupQuery) Unique added in v0.8.0

func (gq *GroupQuery) Unique(unique bool) *GroupQuery

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 (*GroupQuery) Where

func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery

Where adds a new predicate for the GroupQuery builder.

func (*GroupQuery) WithBlocked

func (gq *GroupQuery) WithBlocked(opts ...func(*UserQuery)) *GroupQuery

WithBlocked tells the query-builder to eager-load the nodes that are connected to the "blocked" edge. The optional arguments are used to configure the query builder of the edge.

func (*GroupQuery) WithFiles

func (gq *GroupQuery) WithFiles(opts ...func(*FileQuery)) *GroupQuery

WithFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge. The optional arguments are used to configure the query builder of the edge.

func (*GroupQuery) WithInfo

func (gq *GroupQuery) WithInfo(opts ...func(*GroupInfoQuery)) *GroupQuery

WithInfo tells the query-builder to eager-load the nodes that are connected to the "info" edge. The optional arguments are used to configure the query builder of the edge.

func (*GroupQuery) WithUsers

func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery

WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.

type GroupSelect

type GroupSelect struct {
	*GroupQuery
	// contains filtered or unexported fields
}

GroupSelect is the builder for selecting fields of Group entities.

func (*GroupSelect) Bool

func (gs *GroupSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GroupSelect) BoolX

func (gs *GroupSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GroupSelect) Bools

func (gs *GroupSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GroupSelect) BoolsX

func (gs *GroupSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GroupSelect) Float64

func (gs *GroupSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GroupSelect) Float64X

func (gs *GroupSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GroupSelect) Float64s

func (gs *GroupSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GroupSelect) Float64sX

func (gs *GroupSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GroupSelect) Int

func (gs *GroupSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GroupSelect) IntX

func (gs *GroupSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GroupSelect) Ints

func (gs *GroupSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GroupSelect) IntsX

func (gs *GroupSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GroupSelect) Modify added in v0.9.0

func (gs *GroupSelect) Modify(modifiers ...func(s *sql.Selector)) *GroupSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*GroupSelect) Scan

func (gs *GroupSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*GroupSelect) ScanX

func (gs *GroupSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*GroupSelect) String

func (gs *GroupSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GroupSelect) StringX

func (gs *GroupSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GroupSelect) Strings

func (gs *GroupSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GroupSelect) StringsX

func (gs *GroupSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GroupUpdate

type GroupUpdate struct {
	// contains filtered or unexported fields
}

GroupUpdate is the builder for updating Group entities.

func (*GroupUpdate) AddBlocked

func (gu *GroupUpdate) AddBlocked(u ...*User) *GroupUpdate

AddBlocked adds the "blocked" edges to the User entity.

func (*GroupUpdate) AddBlockedIDs

func (gu *GroupUpdate) AddBlockedIDs(ids ...int) *GroupUpdate

AddBlockedIDs adds the "blocked" edge to the User entity by IDs.

func (*GroupUpdate) AddFileIDs

func (gu *GroupUpdate) AddFileIDs(ids ...int) *GroupUpdate

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*GroupUpdate) AddFiles

func (gu *GroupUpdate) AddFiles(f ...*File) *GroupUpdate

AddFiles adds the "files" edges to the File entity.

func (*GroupUpdate) AddMaxUsers

func (gu *GroupUpdate) AddMaxUsers(i int) *GroupUpdate

AddMaxUsers adds i to the "max_users" field.

func (*GroupUpdate) AddUserIDs

func (gu *GroupUpdate) AddUserIDs(ids ...int) *GroupUpdate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*GroupUpdate) AddUsers

func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate

AddUsers adds the "users" edges to the User entity.

func (*GroupUpdate) ClearBlocked

func (gu *GroupUpdate) ClearBlocked() *GroupUpdate

ClearBlocked clears all "blocked" edges to the User entity.

func (*GroupUpdate) ClearFiles

func (gu *GroupUpdate) ClearFiles() *GroupUpdate

ClearFiles clears all "files" edges to the File entity.

func (*GroupUpdate) ClearInfo

func (gu *GroupUpdate) ClearInfo() *GroupUpdate

ClearInfo clears the "info" edge to the GroupInfo entity.

func (*GroupUpdate) ClearMaxUsers

func (gu *GroupUpdate) ClearMaxUsers() *GroupUpdate

ClearMaxUsers clears the value of the "max_users" field.

func (*GroupUpdate) ClearType

func (gu *GroupUpdate) ClearType() *GroupUpdate

ClearType clears the value of the "type" field.

func (*GroupUpdate) ClearUsers

func (gu *GroupUpdate) ClearUsers() *GroupUpdate

ClearUsers clears all "users" edges to the User entity.

func (*GroupUpdate) Exec

func (gu *GroupUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupUpdate) ExecX

func (gu *GroupUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GroupUpdate) Mutation

func (gu *GroupUpdate) Mutation() *GroupMutation

Mutation returns the GroupMutation object of the builder.

func (*GroupUpdate) RemoveBlocked

func (gu *GroupUpdate) RemoveBlocked(u ...*User) *GroupUpdate

RemoveBlocked removes "blocked" edges to User entities.

func (*GroupUpdate) RemoveBlockedIDs

func (gu *GroupUpdate) RemoveBlockedIDs(ids ...int) *GroupUpdate

RemoveBlockedIDs removes the "blocked" edge to User entities by IDs.

func (*GroupUpdate) RemoveFileIDs

func (gu *GroupUpdate) RemoveFileIDs(ids ...int) *GroupUpdate

RemoveFileIDs removes the "files" edge to File entities by IDs.

func (*GroupUpdate) RemoveFiles

func (gu *GroupUpdate) RemoveFiles(f ...*File) *GroupUpdate

RemoveFiles removes "files" edges to File entities.

func (*GroupUpdate) RemoveUserIDs

func (gu *GroupUpdate) RemoveUserIDs(ids ...int) *GroupUpdate

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*GroupUpdate) RemoveUsers

func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate

RemoveUsers removes "users" edges to User entities.

func (*GroupUpdate) Save

func (gu *GroupUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*GroupUpdate) SaveX

func (gu *GroupUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GroupUpdate) SetActive

func (gu *GroupUpdate) SetActive(b bool) *GroupUpdate

SetActive sets the "active" field.

func (*GroupUpdate) SetExpire

func (gu *GroupUpdate) SetExpire(t time.Time) *GroupUpdate

SetExpire sets the "expire" field.

func (*GroupUpdate) SetInfo

func (gu *GroupUpdate) SetInfo(g *GroupInfo) *GroupUpdate

SetInfo sets the "info" edge to the GroupInfo entity.

func (*GroupUpdate) SetInfoID

func (gu *GroupUpdate) SetInfoID(id int) *GroupUpdate

SetInfoID sets the "info" edge to the GroupInfo entity by ID.

func (*GroupUpdate) SetMaxUsers

func (gu *GroupUpdate) SetMaxUsers(i int) *GroupUpdate

SetMaxUsers sets the "max_users" field.

func (*GroupUpdate) SetName

func (gu *GroupUpdate) SetName(s string) *GroupUpdate

SetName sets the "name" field.

func (*GroupUpdate) SetNillableActive

func (gu *GroupUpdate) SetNillableActive(b *bool) *GroupUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*GroupUpdate) SetNillableMaxUsers

func (gu *GroupUpdate) SetNillableMaxUsers(i *int) *GroupUpdate

SetNillableMaxUsers sets the "max_users" field if the given value is not nil.

func (*GroupUpdate) SetNillableType

func (gu *GroupUpdate) SetNillableType(s *string) *GroupUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*GroupUpdate) SetType

func (gu *GroupUpdate) SetType(s string) *GroupUpdate

SetType sets the "type" field.

func (*GroupUpdate) Where

func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate

Where appends a list predicates to the GroupUpdate builder.

type GroupUpdateOne

type GroupUpdateOne struct {
	// contains filtered or unexported fields
}

GroupUpdateOne is the builder for updating a single Group entity.

func (*GroupUpdateOne) AddBlocked

func (guo *GroupUpdateOne) AddBlocked(u ...*User) *GroupUpdateOne

AddBlocked adds the "blocked" edges to the User entity.

func (*GroupUpdateOne) AddBlockedIDs

func (guo *GroupUpdateOne) AddBlockedIDs(ids ...int) *GroupUpdateOne

AddBlockedIDs adds the "blocked" edge to the User entity by IDs.

func (*GroupUpdateOne) AddFileIDs

func (guo *GroupUpdateOne) AddFileIDs(ids ...int) *GroupUpdateOne

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*GroupUpdateOne) AddFiles

func (guo *GroupUpdateOne) AddFiles(f ...*File) *GroupUpdateOne

AddFiles adds the "files" edges to the File entity.

func (*GroupUpdateOne) AddMaxUsers

func (guo *GroupUpdateOne) AddMaxUsers(i int) *GroupUpdateOne

AddMaxUsers adds i to the "max_users" field.

func (*GroupUpdateOne) AddUserIDs

func (guo *GroupUpdateOne) AddUserIDs(ids ...int) *GroupUpdateOne

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*GroupUpdateOne) AddUsers

func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne

AddUsers adds the "users" edges to the User entity.

func (*GroupUpdateOne) ClearBlocked

func (guo *GroupUpdateOne) ClearBlocked() *GroupUpdateOne

ClearBlocked clears all "blocked" edges to the User entity.

func (*GroupUpdateOne) ClearFiles

func (guo *GroupUpdateOne) ClearFiles() *GroupUpdateOne

ClearFiles clears all "files" edges to the File entity.

func (*GroupUpdateOne) ClearInfo

func (guo *GroupUpdateOne) ClearInfo() *GroupUpdateOne

ClearInfo clears the "info" edge to the GroupInfo entity.

func (*GroupUpdateOne) ClearMaxUsers

func (guo *GroupUpdateOne) ClearMaxUsers() *GroupUpdateOne

ClearMaxUsers clears the value of the "max_users" field.

func (*GroupUpdateOne) ClearType

func (guo *GroupUpdateOne) ClearType() *GroupUpdateOne

ClearType clears the value of the "type" field.

func (*GroupUpdateOne) ClearUsers

func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne

ClearUsers clears all "users" edges to the User entity.

func (*GroupUpdateOne) Exec

func (guo *GroupUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GroupUpdateOne) ExecX

func (guo *GroupUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GroupUpdateOne) Mutation

func (guo *GroupUpdateOne) Mutation() *GroupMutation

Mutation returns the GroupMutation object of the builder.

func (*GroupUpdateOne) RemoveBlocked

func (guo *GroupUpdateOne) RemoveBlocked(u ...*User) *GroupUpdateOne

RemoveBlocked removes "blocked" edges to User entities.

func (*GroupUpdateOne) RemoveBlockedIDs

func (guo *GroupUpdateOne) RemoveBlockedIDs(ids ...int) *GroupUpdateOne

RemoveBlockedIDs removes the "blocked" edge to User entities by IDs.

func (*GroupUpdateOne) RemoveFileIDs

func (guo *GroupUpdateOne) RemoveFileIDs(ids ...int) *GroupUpdateOne

RemoveFileIDs removes the "files" edge to File entities by IDs.

func (*GroupUpdateOne) RemoveFiles

func (guo *GroupUpdateOne) RemoveFiles(f ...*File) *GroupUpdateOne

RemoveFiles removes "files" edges to File entities.

func (*GroupUpdateOne) RemoveUserIDs

func (guo *GroupUpdateOne) RemoveUserIDs(ids ...int) *GroupUpdateOne

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*GroupUpdateOne) RemoveUsers

func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne

RemoveUsers removes "users" edges to User entities.

func (*GroupUpdateOne) Save

func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)

Save executes the query and returns the updated Group entity.

func (*GroupUpdateOne) SaveX

func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group

SaveX is like Save, but panics if an error occurs.

func (*GroupUpdateOne) Select added in v0.8.0

func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*GroupUpdateOne) SetActive

func (guo *GroupUpdateOne) SetActive(b bool) *GroupUpdateOne

SetActive sets the "active" field.

func (*GroupUpdateOne) SetExpire

func (guo *GroupUpdateOne) SetExpire(t time.Time) *GroupUpdateOne

SetExpire sets the "expire" field.

func (*GroupUpdateOne) SetInfo

func (guo *GroupUpdateOne) SetInfo(g *GroupInfo) *GroupUpdateOne

SetInfo sets the "info" edge to the GroupInfo entity.

func (*GroupUpdateOne) SetInfoID

func (guo *GroupUpdateOne) SetInfoID(id int) *GroupUpdateOne

SetInfoID sets the "info" edge to the GroupInfo entity by ID.

func (*GroupUpdateOne) SetMaxUsers

func (guo *GroupUpdateOne) SetMaxUsers(i int) *GroupUpdateOne

SetMaxUsers sets the "max_users" field.

func (*GroupUpdateOne) SetName

func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne

SetName sets the "name" field.

func (*GroupUpdateOne) SetNillableActive

func (guo *GroupUpdateOne) SetNillableActive(b *bool) *GroupUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*GroupUpdateOne) SetNillableMaxUsers

func (guo *GroupUpdateOne) SetNillableMaxUsers(i *int) *GroupUpdateOne

SetNillableMaxUsers sets the "max_users" field if the given value is not nil.

func (*GroupUpdateOne) SetNillableType

func (guo *GroupUpdateOne) SetNillableType(s *string) *GroupUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*GroupUpdateOne) SetType

func (guo *GroupUpdateOne) SetType(s string) *GroupUpdateOne

SetType sets the "type" field.

type GroupUpsert added in v0.9.0

type GroupUpsert struct {
	*sql.UpdateSet
}

GroupUpsert is the "OnConflict" setter.

func (*GroupUpsert) AddMaxUsers added in v0.10.0

func (u *GroupUpsert) AddMaxUsers(v int) *GroupUpsert

AddMaxUsers adds v to the "max_users" field.

func (*GroupUpsert) ClearMaxUsers added in v0.9.0

func (u *GroupUpsert) ClearMaxUsers() *GroupUpsert

ClearMaxUsers clears the value of the "max_users" field.

func (*GroupUpsert) ClearType added in v0.9.0

func (u *GroupUpsert) ClearType() *GroupUpsert

ClearType clears the value of the "type" field.

func (*GroupUpsert) SetActive added in v0.9.0

func (u *GroupUpsert) SetActive(v bool) *GroupUpsert

SetActive sets the "active" field.

func (*GroupUpsert) SetExpire added in v0.9.0

func (u *GroupUpsert) SetExpire(v time.Time) *GroupUpsert

SetExpire sets the "expire" field.

func (*GroupUpsert) SetMaxUsers added in v0.9.0

func (u *GroupUpsert) SetMaxUsers(v int) *GroupUpsert

SetMaxUsers sets the "max_users" field.

func (*GroupUpsert) SetName added in v0.9.0

func (u *GroupUpsert) SetName(v string) *GroupUpsert

SetName sets the "name" field.

func (*GroupUpsert) SetType added in v0.9.0

func (u *GroupUpsert) SetType(v string) *GroupUpsert

SetType sets the "type" field.

func (*GroupUpsert) UpdateActive added in v0.9.0

func (u *GroupUpsert) UpdateActive() *GroupUpsert

UpdateActive sets the "active" field to the value that was provided on create.

func (*GroupUpsert) UpdateExpire added in v0.9.0

func (u *GroupUpsert) UpdateExpire() *GroupUpsert

UpdateExpire sets the "expire" field to the value that was provided on create.

func (*GroupUpsert) UpdateMaxUsers added in v0.9.0

func (u *GroupUpsert) UpdateMaxUsers() *GroupUpsert

UpdateMaxUsers sets the "max_users" field to the value that was provided on create.

func (*GroupUpsert) UpdateName added in v0.9.0

func (u *GroupUpsert) UpdateName() *GroupUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*GroupUpsert) UpdateType added in v0.9.0

func (u *GroupUpsert) UpdateType() *GroupUpsert

UpdateType sets the "type" field to the value that was provided on create.

type GroupUpsertBulk added in v0.9.0

type GroupUpsertBulk struct {
	// contains filtered or unexported fields
}

GroupUpsertBulk is the builder for "upsert"-ing a bulk of Group nodes.

func (*GroupUpsertBulk) AddMaxUsers added in v0.10.0

func (u *GroupUpsertBulk) AddMaxUsers(v int) *GroupUpsertBulk

AddMaxUsers adds v to the "max_users" field.

func (*GroupUpsertBulk) ClearMaxUsers added in v0.9.0

func (u *GroupUpsertBulk) ClearMaxUsers() *GroupUpsertBulk

ClearMaxUsers clears the value of the "max_users" field.

func (*GroupUpsertBulk) ClearType added in v0.9.0

func (u *GroupUpsertBulk) ClearType() *GroupUpsertBulk

ClearType clears the value of the "type" field.

func (*GroupUpsertBulk) DoNothing added in v0.9.0

func (u *GroupUpsertBulk) DoNothing() *GroupUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GroupUpsertBulk) Exec added in v0.9.0

func (u *GroupUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupUpsertBulk) ExecX added in v0.9.0

func (u *GroupUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GroupUpsertBulk) Ignore added in v0.9.0

func (u *GroupUpsertBulk) Ignore() *GroupUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Group.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GroupUpsertBulk) SetActive added in v0.9.0

func (u *GroupUpsertBulk) SetActive(v bool) *GroupUpsertBulk

SetActive sets the "active" field.

func (*GroupUpsertBulk) SetExpire added in v0.9.0

func (u *GroupUpsertBulk) SetExpire(v time.Time) *GroupUpsertBulk

SetExpire sets the "expire" field.

func (*GroupUpsertBulk) SetMaxUsers added in v0.9.0

func (u *GroupUpsertBulk) SetMaxUsers(v int) *GroupUpsertBulk

SetMaxUsers sets the "max_users" field.

func (*GroupUpsertBulk) SetName added in v0.9.0

func (u *GroupUpsertBulk) SetName(v string) *GroupUpsertBulk

SetName sets the "name" field.

func (*GroupUpsertBulk) SetType added in v0.9.0

func (u *GroupUpsertBulk) SetType(v string) *GroupUpsertBulk

SetType sets the "type" field.

func (*GroupUpsertBulk) Update added in v0.9.0

func (u *GroupUpsertBulk) Update(set func(*GroupUpsert)) *GroupUpsertBulk

Update allows overriding fields `UPDATE` values. See the GroupCreateBulk.OnConflict documentation for more info.

func (*GroupUpsertBulk) UpdateActive added in v0.9.0

func (u *GroupUpsertBulk) UpdateActive() *GroupUpsertBulk

UpdateActive sets the "active" field to the value that was provided on create.

func (*GroupUpsertBulk) UpdateExpire added in v0.9.0

func (u *GroupUpsertBulk) UpdateExpire() *GroupUpsertBulk

UpdateExpire sets the "expire" field to the value that was provided on create.

func (*GroupUpsertBulk) UpdateMaxUsers added in v0.9.0

func (u *GroupUpsertBulk) UpdateMaxUsers() *GroupUpsertBulk

UpdateMaxUsers sets the "max_users" field to the value that was provided on create.

func (*GroupUpsertBulk) UpdateName added in v0.9.0

func (u *GroupUpsertBulk) UpdateName() *GroupUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*GroupUpsertBulk) UpdateNewValues added in v0.9.0

func (u *GroupUpsertBulk) UpdateNewValues() *GroupUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Group.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*GroupUpsertBulk) UpdateType added in v0.9.0

func (u *GroupUpsertBulk) UpdateType() *GroupUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

type GroupUpsertOne added in v0.9.0

type GroupUpsertOne struct {
	// contains filtered or unexported fields
}

GroupUpsertOne is the builder for "upsert"-ing

one Group node.

func (*GroupUpsertOne) AddMaxUsers added in v0.10.0

func (u *GroupUpsertOne) AddMaxUsers(v int) *GroupUpsertOne

AddMaxUsers adds v to the "max_users" field.

func (*GroupUpsertOne) ClearMaxUsers added in v0.9.0

func (u *GroupUpsertOne) ClearMaxUsers() *GroupUpsertOne

ClearMaxUsers clears the value of the "max_users" field.

func (*GroupUpsertOne) ClearType added in v0.9.0

func (u *GroupUpsertOne) ClearType() *GroupUpsertOne

ClearType clears the value of the "type" field.

func (*GroupUpsertOne) DoNothing added in v0.9.0

func (u *GroupUpsertOne) DoNothing() *GroupUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GroupUpsertOne) Exec added in v0.9.0

func (u *GroupUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*GroupUpsertOne) ExecX added in v0.9.0

func (u *GroupUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GroupUpsertOne) ID added in v0.9.0

func (u *GroupUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GroupUpsertOne) IDX added in v0.9.0

func (u *GroupUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*GroupUpsertOne) Ignore added in v0.9.0

func (u *GroupUpsertOne) Ignore() *GroupUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Group.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GroupUpsertOne) SetActive added in v0.9.0

func (u *GroupUpsertOne) SetActive(v bool) *GroupUpsertOne

SetActive sets the "active" field.

func (*GroupUpsertOne) SetExpire added in v0.9.0

func (u *GroupUpsertOne) SetExpire(v time.Time) *GroupUpsertOne

SetExpire sets the "expire" field.

func (*GroupUpsertOne) SetMaxUsers added in v0.9.0

func (u *GroupUpsertOne) SetMaxUsers(v int) *GroupUpsertOne

SetMaxUsers sets the "max_users" field.

func (*GroupUpsertOne) SetName added in v0.9.0

func (u *GroupUpsertOne) SetName(v string) *GroupUpsertOne

SetName sets the "name" field.

func (*GroupUpsertOne) SetType added in v0.9.0

func (u *GroupUpsertOne) SetType(v string) *GroupUpsertOne

SetType sets the "type" field.

func (*GroupUpsertOne) Update added in v0.9.0

func (u *GroupUpsertOne) Update(set func(*GroupUpsert)) *GroupUpsertOne

Update allows overriding fields `UPDATE` values. See the GroupCreate.OnConflict documentation for more info.

func (*GroupUpsertOne) UpdateActive added in v0.9.0

func (u *GroupUpsertOne) UpdateActive() *GroupUpsertOne

UpdateActive sets the "active" field to the value that was provided on create.

func (*GroupUpsertOne) UpdateExpire added in v0.9.0

func (u *GroupUpsertOne) UpdateExpire() *GroupUpsertOne

UpdateExpire sets the "expire" field to the value that was provided on create.

func (*GroupUpsertOne) UpdateMaxUsers added in v0.9.0

func (u *GroupUpsertOne) UpdateMaxUsers() *GroupUpsertOne

UpdateMaxUsers sets the "max_users" field to the value that was provided on create.

func (*GroupUpsertOne) UpdateName added in v0.9.0

func (u *GroupUpsertOne) UpdateName() *GroupUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*GroupUpsertOne) UpdateNewValues added in v0.9.0

func (u *GroupUpsertOne) UpdateNewValues() *GroupUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Group.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*GroupUpsertOne) UpdateType added in v0.9.0

func (u *GroupUpsertOne) UpdateType() *GroupUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

type Groups

type Groups []*Group

Groups is a parsable slice of Group.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type Item

type Item struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Text holds the value of the "text" field.
	Text string `json:"text,omitempty"`
	// contains filtered or unexported fields
}

Item is the model entity for the Item schema.

func (*Item) String

func (i *Item) String() string

String implements the fmt.Stringer.

func (*Item) Unwrap

func (i *Item) Unwrap() *Item

Unwrap unwraps the Item 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 (*Item) Update

func (i *Item) Update() *ItemUpdateOne

Update returns a builder for updating this Item. Note that you need to call Item.Unwrap() before calling this method if this Item was returned from a transaction, and the transaction was committed or rolled back.

type ItemClient

type ItemClient struct {
	// contains filtered or unexported fields
}

ItemClient is a client for the Item schema.

func NewItemClient

func NewItemClient(c config) *ItemClient

NewItemClient returns a client for the Item from the given config.

func (*ItemClient) Create

func (c *ItemClient) Create() *ItemCreate

Create returns a create builder for Item.

func (*ItemClient) CreateBulk

func (c *ItemClient) CreateBulk(builders ...*ItemCreate) *ItemCreateBulk

CreateBulk returns a builder for creating a bulk of Item entities.

func (*ItemClient) Delete

func (c *ItemClient) Delete() *ItemDelete

Delete returns a delete builder for Item.

func (*ItemClient) DeleteOne

func (c *ItemClient) DeleteOne(i *Item) *ItemDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ItemClient) DeleteOneID

func (c *ItemClient) DeleteOneID(id string) *ItemDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ItemClient) Get

func (c *ItemClient) Get(ctx context.Context, id string) (*Item, error)

Get returns a Item entity by its id.

func (*ItemClient) GetX

func (c *ItemClient) GetX(ctx context.Context, id string) *Item

GetX is like Get, but panics if an error occurs.

func (*ItemClient) Hooks

func (c *ItemClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ItemClient) Query

func (c *ItemClient) Query() *ItemQuery

Query returns a query builder for Item.

func (*ItemClient) Update

func (c *ItemClient) Update() *ItemUpdate

Update returns an update builder for Item.

func (*ItemClient) UpdateOne

func (c *ItemClient) UpdateOne(i *Item) *ItemUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ItemClient) UpdateOneID

func (c *ItemClient) UpdateOneID(id string) *ItemUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ItemClient) Use

func (c *ItemClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `item.Hooks(f(g(h())))`.

type ItemCreate

type ItemCreate struct {
	// contains filtered or unexported fields
}

ItemCreate is the builder for creating a Item entity.

func (*ItemCreate) Exec added in v0.9.0

func (ic *ItemCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ItemCreate) ExecX added in v0.9.0

func (ic *ItemCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemCreate) Mutation

func (ic *ItemCreate) Mutation() *ItemMutation

Mutation returns the ItemMutation object of the builder.

func (*ItemCreate) OnConflict added in v0.9.0

func (ic *ItemCreate) OnConflict(opts ...sql.ConflictOption) *ItemUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Item.Create().
	SetText(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.ItemUpsert) {
		SetText(v+v).
	}).
	Exec(ctx)

func (*ItemCreate) OnConflictColumns added in v0.9.0

func (ic *ItemCreate) OnConflictColumns(columns ...string) *ItemUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Item.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ItemCreate) Save

func (ic *ItemCreate) Save(ctx context.Context) (*Item, error)

Save creates the Item in the database.

func (*ItemCreate) SaveX

func (ic *ItemCreate) SaveX(ctx context.Context) *Item

SaveX calls Save and panics if Save returns an error.

func (*ItemCreate) SetID added in v0.9.0

func (ic *ItemCreate) SetID(s string) *ItemCreate

SetID sets the "id" field.

func (*ItemCreate) SetNillableID added in v0.9.1

func (ic *ItemCreate) SetNillableID(s *string) *ItemCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*ItemCreate) SetNillableText added in v0.9.1

func (ic *ItemCreate) SetNillableText(s *string) *ItemCreate

SetNillableText sets the "text" field if the given value is not nil.

func (*ItemCreate) SetText added in v0.9.1

func (ic *ItemCreate) SetText(s string) *ItemCreate

SetText sets the "text" field.

type ItemCreateBulk

type ItemCreateBulk struct {
	// contains filtered or unexported fields
}

ItemCreateBulk is the builder for creating many Item entities in bulk.

func (*ItemCreateBulk) Exec added in v0.9.0

func (icb *ItemCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ItemCreateBulk) ExecX added in v0.9.0

func (icb *ItemCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemCreateBulk) OnConflict added in v0.9.0

func (icb *ItemCreateBulk) OnConflict(opts ...sql.ConflictOption) *ItemUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Item.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.ItemUpsert) {
		SetText(v+v).
	}).
	Exec(ctx)

func (*ItemCreateBulk) OnConflictColumns added in v0.9.0

func (icb *ItemCreateBulk) OnConflictColumns(columns ...string) *ItemUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Item.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ItemCreateBulk) Save

func (icb *ItemCreateBulk) Save(ctx context.Context) ([]*Item, error)

Save creates the Item entities in the database.

func (*ItemCreateBulk) SaveX

func (icb *ItemCreateBulk) SaveX(ctx context.Context) []*Item

SaveX is like Save, but panics if an error occurs.

type ItemDelete

type ItemDelete struct {
	// contains filtered or unexported fields
}

ItemDelete is the builder for deleting a Item entity.

func (*ItemDelete) Exec

func (id *ItemDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ItemDelete) ExecX

func (id *ItemDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ItemDelete) Where

func (id *ItemDelete) Where(ps ...predicate.Item) *ItemDelete

Where appends a list predicates to the ItemDelete builder.

type ItemDeleteOne

type ItemDeleteOne struct {
	// contains filtered or unexported fields
}

ItemDeleteOne is the builder for deleting a single Item entity.

func (*ItemDeleteOne) Exec

func (ido *ItemDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ItemDeleteOne) ExecX

func (ido *ItemDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ItemFilter

type ItemFilter struct {
	// contains filtered or unexported fields
}

ItemFilter provides a generic filtering capability at runtime for ItemQuery.

func (*ItemFilter) Where

func (f *ItemFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*ItemFilter) WhereID

func (f *ItemFilter) WhereID(p entql.StringP)

WhereID applies the entql string predicate on the id field.

func (*ItemFilter) WhereText added in v0.9.1

func (f *ItemFilter) WhereText(p entql.StringP)

WhereText applies the entql string predicate on the text field.

type ItemGroupBy

type ItemGroupBy struct {
	// contains filtered or unexported fields
}

ItemGroupBy is the group-by builder for Item entities.

func (*ItemGroupBy) Aggregate

func (igb *ItemGroupBy) Aggregate(fns ...AggregateFunc) *ItemGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ItemGroupBy) Bool

func (igb *ItemGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) BoolX

func (igb *ItemGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ItemGroupBy) Bools

func (igb *ItemGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) BoolsX

func (igb *ItemGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ItemGroupBy) Float64

func (igb *ItemGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) Float64X

func (igb *ItemGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ItemGroupBy) Float64s

func (igb *ItemGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) Float64sX

func (igb *ItemGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ItemGroupBy) Int

func (igb *ItemGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) IntX

func (igb *ItemGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ItemGroupBy) Ints

func (igb *ItemGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) IntsX

func (igb *ItemGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ItemGroupBy) Scan

func (igb *ItemGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*ItemGroupBy) ScanX

func (igb *ItemGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ItemGroupBy) String

func (igb *ItemGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) StringX

func (igb *ItemGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ItemGroupBy) Strings

func (igb *ItemGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*ItemGroupBy) StringsX

func (igb *ItemGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ItemMutation

type ItemMutation struct {
	// contains filtered or unexported fields
}

ItemMutation represents an operation that mutates the Item nodes in the graph.

func (*ItemMutation) AddField

func (m *ItemMutation) 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 (*ItemMutation) AddedEdges

func (m *ItemMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ItemMutation) AddedField

func (m *ItemMutation) 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 (*ItemMutation) AddedFields

func (m *ItemMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ItemMutation) AddedIDs

func (m *ItemMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ItemMutation) ClearEdge

func (m *ItemMutation) 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 (*ItemMutation) ClearField

func (m *ItemMutation) 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 (*ItemMutation) ClearText added in v0.9.1

func (m *ItemMutation) ClearText()

ClearText clears the value of the "text" field.

func (*ItemMutation) ClearedEdges

func (m *ItemMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ItemMutation) ClearedFields

func (m *ItemMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ItemMutation) Client

func (m ItemMutation) 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 (*ItemMutation) EdgeCleared

func (m *ItemMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ItemMutation) Field

func (m *ItemMutation) 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 (*ItemMutation) FieldCleared

func (m *ItemMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ItemMutation) Fields

func (m *ItemMutation) 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 (*ItemMutation) Filter

func (m *ItemMutation) Filter() *ItemFilter

Filter returns an entql.Where implementation to apply filters on the ItemMutation builder.

func (*ItemMutation) ID

func (m *ItemMutation) ID() (id string, 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 (*ItemMutation) IDs added in v0.10.0

func (m *ItemMutation) IDs(ctx context.Context) ([]string, 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 (*ItemMutation) OldField

func (m *ItemMutation) 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 (*ItemMutation) OldText added in v0.9.1

func (m *ItemMutation) OldText(ctx context.Context) (v string, err error)

OldText returns the old "text" field's value of the Item entity. If the Item 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 (*ItemMutation) Op

func (m *ItemMutation) Op() Op

Op returns the operation name.

func (*ItemMutation) RemovedEdges

func (m *ItemMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ItemMutation) RemovedIDs

func (m *ItemMutation) 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 (*ItemMutation) ResetEdge

func (m *ItemMutation) 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 (*ItemMutation) ResetField

func (m *ItemMutation) 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 (*ItemMutation) ResetText added in v0.9.1

func (m *ItemMutation) ResetText()

ResetText resets all changes to the "text" field.

func (*ItemMutation) SetField

func (m *ItemMutation) 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 (*ItemMutation) SetID added in v0.9.0

func (m *ItemMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Item entities.

func (*ItemMutation) SetText added in v0.9.1

func (m *ItemMutation) SetText(s string)

SetText sets the "text" field.

func (*ItemMutation) Text added in v0.9.1

func (m *ItemMutation) Text() (r string, exists bool)

Text returns the value of the "text" field in the mutation.

func (*ItemMutation) TextCleared added in v0.9.1

func (m *ItemMutation) TextCleared() bool

TextCleared returns if the "text" field was cleared in this mutation.

func (ItemMutation) Tx

func (m ItemMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ItemMutation) Type

func (m *ItemMutation) Type() string

Type returns the node type of this mutation (Item).

func (*ItemMutation) Where added in v0.9.0

func (m *ItemMutation) Where(ps ...predicate.Item)

Where appends a list predicates to the ItemMutation builder.

type ItemQuery

type ItemQuery struct {
	// contains filtered or unexported fields
}

ItemQuery is the builder for querying Item entities.

func (*ItemQuery) All

func (iq *ItemQuery) All(ctx context.Context) ([]*Item, error)

All executes the query and returns a list of Items.

func (*ItemQuery) AllX

func (iq *ItemQuery) AllX(ctx context.Context) []*Item

AllX is like All, but panics if an error occurs.

func (*ItemQuery) Clone

func (iq *ItemQuery) Clone() *ItemQuery

Clone returns a duplicate of the ItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ItemQuery) Count

func (iq *ItemQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ItemQuery) CountX

func (iq *ItemQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ItemQuery) Exist

func (iq *ItemQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ItemQuery) ExistX

func (iq *ItemQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ItemQuery) Filter

func (iq *ItemQuery) Filter() *ItemFilter

Filter returns a Filter implementation to apply filters on the ItemQuery builder.

func (*ItemQuery) First

func (iq *ItemQuery) First(ctx context.Context) (*Item, error)

First returns the first Item entity from the query. Returns a *NotFoundError when no Item was found.

func (*ItemQuery) FirstID

func (iq *ItemQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Item ID from the query. Returns a *NotFoundError when no Item ID was found.

func (*ItemQuery) FirstIDX

func (iq *ItemQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*ItemQuery) FirstX

func (iq *ItemQuery) FirstX(ctx context.Context) *Item

FirstX is like First, but panics if an error occurs.

func (*ItemQuery) ForShare added in v0.9.0

func (iq *ItemQuery) ForShare(opts ...sql.LockOption) *ItemQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*ItemQuery) ForUpdate added in v0.9.0

func (iq *ItemQuery) ForUpdate(opts ...sql.LockOption) *ItemQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*ItemQuery) GroupBy

func (iq *ItemQuery) GroupBy(field string, fields ...string) *ItemGroupBy

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 {
	Text string `json:"text,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Item.Query().
	GroupBy(item.FieldText).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ItemQuery) IDs

func (iq *ItemQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of Item IDs.

func (*ItemQuery) IDsX

func (iq *ItemQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*ItemQuery) Limit

func (iq *ItemQuery) Limit(limit int) *ItemQuery

Limit adds a limit step to the query.

func (*ItemQuery) Modify added in v0.9.0

func (iq *ItemQuery) Modify(modifiers ...func(s *sql.Selector)) *ItemSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ItemQuery) Offset

func (iq *ItemQuery) Offset(offset int) *ItemQuery

Offset adds an offset step to the query.

func (*ItemQuery) Only

func (iq *ItemQuery) Only(ctx context.Context) (*Item, error)

Only returns a single Item entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Item entity is not found. Returns a *NotFoundError when no Item entities are found.

func (*ItemQuery) OnlyID

func (iq *ItemQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Item ID in the query. Returns a *NotSingularError when exactly one Item ID is not found. Returns a *NotFoundError when no entities are found.

func (*ItemQuery) OnlyIDX

func (iq *ItemQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ItemQuery) OnlyX

func (iq *ItemQuery) OnlyX(ctx context.Context) *Item

OnlyX is like Only, but panics if an error occurs.

func (*ItemQuery) Order

func (iq *ItemQuery) Order(o ...OrderFunc) *ItemQuery

Order adds an order step to the query.

func (*ItemQuery) Select

func (iq *ItemQuery) Select(fields ...string) *ItemSelect

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 {
	Text string `json:"text,omitempty"`
}

client.Item.Query().
	Select(item.FieldText).
	Scan(ctx, &v)

func (*ItemQuery) Unique added in v0.8.0

func (iq *ItemQuery) Unique(unique bool) *ItemQuery

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 (*ItemQuery) Where

func (iq *ItemQuery) Where(ps ...predicate.Item) *ItemQuery

Where adds a new predicate for the ItemQuery builder.

type ItemSelect

type ItemSelect struct {
	*ItemQuery
	// contains filtered or unexported fields
}

ItemSelect is the builder for selecting fields of Item entities.

func (*ItemSelect) Bool

func (is *ItemSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ItemSelect) BoolX

func (is *ItemSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ItemSelect) Bools

func (is *ItemSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ItemSelect) BoolsX

func (is *ItemSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ItemSelect) Float64

func (is *ItemSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ItemSelect) Float64X

func (is *ItemSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ItemSelect) Float64s

func (is *ItemSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ItemSelect) Float64sX

func (is *ItemSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ItemSelect) Int

func (is *ItemSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ItemSelect) IntX

func (is *ItemSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ItemSelect) Ints

func (is *ItemSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ItemSelect) IntsX

func (is *ItemSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ItemSelect) Modify added in v0.9.0

func (is *ItemSelect) Modify(modifiers ...func(s *sql.Selector)) *ItemSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ItemSelect) Scan

func (is *ItemSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*ItemSelect) ScanX

func (is *ItemSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ItemSelect) String

func (is *ItemSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ItemSelect) StringX

func (is *ItemSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ItemSelect) Strings

func (is *ItemSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ItemSelect) StringsX

func (is *ItemSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ItemUpdate

type ItemUpdate struct {
	// contains filtered or unexported fields
}

ItemUpdate is the builder for updating Item entities.

func (*ItemUpdate) ClearText added in v0.9.1

func (iu *ItemUpdate) ClearText() *ItemUpdate

ClearText clears the value of the "text" field.

func (*ItemUpdate) Exec

func (iu *ItemUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ItemUpdate) ExecX

func (iu *ItemUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemUpdate) Mutation

func (iu *ItemUpdate) Mutation() *ItemMutation

Mutation returns the ItemMutation object of the builder.

func (*ItemUpdate) Save

func (iu *ItemUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ItemUpdate) SaveX

func (iu *ItemUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ItemUpdate) SetNillableText added in v0.9.1

func (iu *ItemUpdate) SetNillableText(s *string) *ItemUpdate

SetNillableText sets the "text" field if the given value is not nil.

func (*ItemUpdate) SetText added in v0.9.1

func (iu *ItemUpdate) SetText(s string) *ItemUpdate

SetText sets the "text" field.

func (*ItemUpdate) Where

func (iu *ItemUpdate) Where(ps ...predicate.Item) *ItemUpdate

Where appends a list predicates to the ItemUpdate builder.

type ItemUpdateOne

type ItemUpdateOne struct {
	// contains filtered or unexported fields
}

ItemUpdateOne is the builder for updating a single Item entity.

func (*ItemUpdateOne) ClearText added in v0.9.1

func (iuo *ItemUpdateOne) ClearText() *ItemUpdateOne

ClearText clears the value of the "text" field.

func (*ItemUpdateOne) Exec

func (iuo *ItemUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ItemUpdateOne) ExecX

func (iuo *ItemUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemUpdateOne) Mutation

func (iuo *ItemUpdateOne) Mutation() *ItemMutation

Mutation returns the ItemMutation object of the builder.

func (*ItemUpdateOne) Save

func (iuo *ItemUpdateOne) Save(ctx context.Context) (*Item, error)

Save executes the query and returns the updated Item entity.

func (*ItemUpdateOne) SaveX

func (iuo *ItemUpdateOne) SaveX(ctx context.Context) *Item

SaveX is like Save, but panics if an error occurs.

func (*ItemUpdateOne) Select added in v0.8.0

func (iuo *ItemUpdateOne) Select(field string, fields ...string) *ItemUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ItemUpdateOne) SetNillableText added in v0.9.1

func (iuo *ItemUpdateOne) SetNillableText(s *string) *ItemUpdateOne

SetNillableText sets the "text" field if the given value is not nil.

func (*ItemUpdateOne) SetText added in v0.9.1

func (iuo *ItemUpdateOne) SetText(s string) *ItemUpdateOne

SetText sets the "text" field.

type ItemUpsert added in v0.9.0

type ItemUpsert struct {
	*sql.UpdateSet
}

ItemUpsert is the "OnConflict" setter.

func (*ItemUpsert) ClearText added in v0.9.1

func (u *ItemUpsert) ClearText() *ItemUpsert

ClearText clears the value of the "text" field.

func (*ItemUpsert) SetText added in v0.9.1

func (u *ItemUpsert) SetText(v string) *ItemUpsert

SetText sets the "text" field.

func (*ItemUpsert) UpdateText added in v0.9.1

func (u *ItemUpsert) UpdateText() *ItemUpsert

UpdateText sets the "text" field to the value that was provided on create.

type ItemUpsertBulk added in v0.9.0

type ItemUpsertBulk struct {
	// contains filtered or unexported fields
}

ItemUpsertBulk is the builder for "upsert"-ing a bulk of Item nodes.

func (*ItemUpsertBulk) ClearText added in v0.9.1

func (u *ItemUpsertBulk) ClearText() *ItemUpsertBulk

ClearText clears the value of the "text" field.

func (*ItemUpsertBulk) DoNothing added in v0.9.0

func (u *ItemUpsertBulk) DoNothing() *ItemUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ItemUpsertBulk) Exec added in v0.9.0

func (u *ItemUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ItemUpsertBulk) ExecX added in v0.9.0

func (u *ItemUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemUpsertBulk) Ignore added in v0.9.0

func (u *ItemUpsertBulk) Ignore() *ItemUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Item.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ItemUpsertBulk) SetText added in v0.9.1

func (u *ItemUpsertBulk) SetText(v string) *ItemUpsertBulk

SetText sets the "text" field.

func (*ItemUpsertBulk) Update added in v0.9.0

func (u *ItemUpsertBulk) Update(set func(*ItemUpsert)) *ItemUpsertBulk

Update allows overriding fields `UPDATE` values. See the ItemCreateBulk.OnConflict documentation for more info.

func (*ItemUpsertBulk) UpdateNewValues added in v0.9.0

func (u *ItemUpsertBulk) UpdateNewValues() *ItemUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Item.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(item.FieldID)
		}),
	).
	Exec(ctx)

func (*ItemUpsertBulk) UpdateText added in v0.9.1

func (u *ItemUpsertBulk) UpdateText() *ItemUpsertBulk

UpdateText sets the "text" field to the value that was provided on create.

type ItemUpsertOne added in v0.9.0

type ItemUpsertOne struct {
	// contains filtered or unexported fields
}

ItemUpsertOne is the builder for "upsert"-ing

one Item node.

func (*ItemUpsertOne) ClearText added in v0.9.1

func (u *ItemUpsertOne) ClearText() *ItemUpsertOne

ClearText clears the value of the "text" field.

func (*ItemUpsertOne) DoNothing added in v0.9.0

func (u *ItemUpsertOne) DoNothing() *ItemUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ItemUpsertOne) Exec added in v0.9.0

func (u *ItemUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ItemUpsertOne) ExecX added in v0.9.0

func (u *ItemUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ItemUpsertOne) ID added in v0.9.0

func (u *ItemUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ItemUpsertOne) IDX added in v0.9.0

func (u *ItemUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*ItemUpsertOne) Ignore added in v0.9.0

func (u *ItemUpsertOne) Ignore() *ItemUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Item.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ItemUpsertOne) SetText added in v0.9.1

func (u *ItemUpsertOne) SetText(v string) *ItemUpsertOne

SetText sets the "text" field.

func (*ItemUpsertOne) Update added in v0.9.0

func (u *ItemUpsertOne) Update(set func(*ItemUpsert)) *ItemUpsertOne

Update allows overriding fields `UPDATE` values. See the ItemCreate.OnConflict documentation for more info.

func (*ItemUpsertOne) UpdateNewValues added in v0.9.0

func (u *ItemUpsertOne) UpdateNewValues() *ItemUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Item.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(item.FieldID)
		}),
	).
	Exec(ctx)

func (*ItemUpsertOne) UpdateText added in v0.9.1

func (u *ItemUpsertOne) UpdateText() *ItemUpsertOne

UpdateText sets the "text" field to the value that was provided on create.

type Items

type Items []*Item

Items is a parsable slice of Item.

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 Node

type Node struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Value holds the value of the "value" field.
	Value int `json:"value,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NodeQuery when eager-loading is set.
	Edges NodeEdges `json:"edges"`
	// contains filtered or unexported fields
}

Node is the model entity for the Node schema.

func (*Node) QueryNext

func (n *Node) QueryNext() *NodeQuery

QueryNext queries the "next" edge of the Node entity.

func (*Node) QueryPrev

func (n *Node) QueryPrev() *NodeQuery

QueryPrev queries the "prev" edge of the Node entity.

func (*Node) String

func (n *Node) String() string

String implements the fmt.Stringer.

func (*Node) Unwrap

func (n *Node) Unwrap() *Node

Unwrap unwraps the Node 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 (*Node) Update

func (n *Node) Update() *NodeUpdateOne

Update returns a builder for updating this Node. Note that you need to call Node.Unwrap() before calling this method if this Node was returned from a transaction, and the transaction was committed or rolled back.

type NodeClient

type NodeClient struct {
	// contains filtered or unexported fields
}

NodeClient is a client for the Node schema.

func NewNodeClient

func NewNodeClient(c config) *NodeClient

NewNodeClient returns a client for the Node from the given config.

func (*NodeClient) Create

func (c *NodeClient) Create() *NodeCreate

Create returns a create builder for Node.

func (*NodeClient) CreateBulk

func (c *NodeClient) CreateBulk(builders ...*NodeCreate) *NodeCreateBulk

CreateBulk returns a builder for creating a bulk of Node entities.

func (*NodeClient) Delete

func (c *NodeClient) Delete() *NodeDelete

Delete returns a delete builder for Node.

func (*NodeClient) DeleteOne

func (c *NodeClient) DeleteOne(n *Node) *NodeDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*NodeClient) DeleteOneID

func (c *NodeClient) DeleteOneID(id int) *NodeDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*NodeClient) Get

func (c *NodeClient) Get(ctx context.Context, id int) (*Node, error)

Get returns a Node entity by its id.

func (*NodeClient) GetX

func (c *NodeClient) GetX(ctx context.Context, id int) *Node

GetX is like Get, but panics if an error occurs.

func (*NodeClient) Hooks

func (c *NodeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NodeClient) Query

func (c *NodeClient) Query() *NodeQuery

Query returns a query builder for Node.

func (*NodeClient) QueryNext

func (c *NodeClient) QueryNext(n *Node) *NodeQuery

QueryNext queries the next edge of a Node.

func (*NodeClient) QueryPrev

func (c *NodeClient) QueryPrev(n *Node) *NodeQuery

QueryPrev queries the prev edge of a Node.

func (*NodeClient) Update

func (c *NodeClient) Update() *NodeUpdate

Update returns an update builder for Node.

func (*NodeClient) UpdateOne

func (c *NodeClient) UpdateOne(n *Node) *NodeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*NodeClient) UpdateOneID

func (c *NodeClient) UpdateOneID(id int) *NodeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NodeClient) Use

func (c *NodeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `node.Hooks(f(g(h())))`.

type NodeCreate

type NodeCreate struct {
	// contains filtered or unexported fields
}

NodeCreate is the builder for creating a Node entity.

func (*NodeCreate) Exec added in v0.9.0

func (nc *NodeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NodeCreate) ExecX added in v0.9.0

func (nc *NodeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NodeCreate) Mutation

func (nc *NodeCreate) Mutation() *NodeMutation

Mutation returns the NodeMutation object of the builder.

func (*NodeCreate) OnConflict added in v0.9.0

func (nc *NodeCreate) OnConflict(opts ...sql.ConflictOption) *NodeUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Node.Create().
	SetValue(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.NodeUpsert) {
		SetValue(v+v).
	}).
	Exec(ctx)

func (*NodeCreate) OnConflictColumns added in v0.9.0

func (nc *NodeCreate) OnConflictColumns(columns ...string) *NodeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Node.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NodeCreate) Save

func (nc *NodeCreate) Save(ctx context.Context) (*Node, error)

Save creates the Node in the database.

func (*NodeCreate) SaveX

func (nc *NodeCreate) SaveX(ctx context.Context) *Node

SaveX calls Save and panics if Save returns an error.

func (*NodeCreate) SetNext

func (nc *NodeCreate) SetNext(n *Node) *NodeCreate

SetNext sets the "next" edge to the Node entity.

func (*NodeCreate) SetNextID

func (nc *NodeCreate) SetNextID(id int) *NodeCreate

SetNextID sets the "next" edge to the Node entity by ID.

func (*NodeCreate) SetNillableNextID

func (nc *NodeCreate) SetNillableNextID(id *int) *NodeCreate

SetNillableNextID sets the "next" edge to the Node entity by ID if the given value is not nil.

func (*NodeCreate) SetNillablePrevID

func (nc *NodeCreate) SetNillablePrevID(id *int) *NodeCreate

SetNillablePrevID sets the "prev" edge to the Node entity by ID if the given value is not nil.

func (*NodeCreate) SetNillableValue

func (nc *NodeCreate) SetNillableValue(i *int) *NodeCreate

SetNillableValue sets the "value" field if the given value is not nil.

func (*NodeCreate) SetPrev

func (nc *NodeCreate) SetPrev(n *Node) *NodeCreate

SetPrev sets the "prev" edge to the Node entity.

func (*NodeCreate) SetPrevID

func (nc *NodeCreate) SetPrevID(id int) *NodeCreate

SetPrevID sets the "prev" edge to the Node entity by ID.

func (*NodeCreate) SetValue

func (nc *NodeCreate) SetValue(i int) *NodeCreate

SetValue sets the "value" field.

type NodeCreateBulk

type NodeCreateBulk struct {
	// contains filtered or unexported fields
}

NodeCreateBulk is the builder for creating many Node entities in bulk.

func (*NodeCreateBulk) Exec added in v0.9.0

func (ncb *NodeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NodeCreateBulk) ExecX added in v0.9.0

func (ncb *NodeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NodeCreateBulk) OnConflict added in v0.9.0

func (ncb *NodeCreateBulk) OnConflict(opts ...sql.ConflictOption) *NodeUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Node.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.NodeUpsert) {
		SetValue(v+v).
	}).
	Exec(ctx)

func (*NodeCreateBulk) OnConflictColumns added in v0.9.0

func (ncb *NodeCreateBulk) OnConflictColumns(columns ...string) *NodeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Node.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NodeCreateBulk) Save

func (ncb *NodeCreateBulk) Save(ctx context.Context) ([]*Node, error)

Save creates the Node entities in the database.

func (*NodeCreateBulk) SaveX

func (ncb *NodeCreateBulk) SaveX(ctx context.Context) []*Node

SaveX is like Save, but panics if an error occurs.

type NodeDelete

type NodeDelete struct {
	// contains filtered or unexported fields
}

NodeDelete is the builder for deleting a Node entity.

func (*NodeDelete) Exec

func (nd *NodeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NodeDelete) ExecX

func (nd *NodeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NodeDelete) Where

func (nd *NodeDelete) Where(ps ...predicate.Node) *NodeDelete

Where appends a list predicates to the NodeDelete builder.

type NodeDeleteOne

type NodeDeleteOne struct {
	// contains filtered or unexported fields
}

NodeDeleteOne is the builder for deleting a single Node entity.

func (*NodeDeleteOne) Exec

func (ndo *NodeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*NodeDeleteOne) ExecX

func (ndo *NodeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type NodeEdges

type NodeEdges struct {
	// Prev holds the value of the prev edge.
	Prev *Node `json:"prev,omitempty" gqlgen:"prev"`
	// Next holds the value of the next edge.
	Next *Node `json:"next,omitempty" gqlgen:"next"`
	// contains filtered or unexported fields
}

NodeEdges holds the relations/edges for other nodes in the graph.

func (NodeEdges) NextOrErr

func (e NodeEdges) NextOrErr() (*Node, error)

NextOrErr returns the Next value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (NodeEdges) PrevOrErr

func (e NodeEdges) PrevOrErr() (*Node, error)

PrevOrErr returns the Prev value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type NodeFilter

type NodeFilter struct {
	// contains filtered or unexported fields
}

NodeFilter provides a generic filtering capability at runtime for NodeQuery.

func (*NodeFilter) Where

func (f *NodeFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*NodeFilter) WhereHasNext

func (f *NodeFilter) WhereHasNext()

WhereHasNext applies a predicate to check if query has an edge next.

func (*NodeFilter) WhereHasNextWith

func (f *NodeFilter) WhereHasNextWith(preds ...predicate.Node)

WhereHasNextWith applies a predicate to check if query has an edge next with a given conditions (other predicates).

func (*NodeFilter) WhereHasPrev

func (f *NodeFilter) WhereHasPrev()

WhereHasPrev applies a predicate to check if query has an edge prev.

func (*NodeFilter) WhereHasPrevWith

func (f *NodeFilter) WhereHasPrevWith(preds ...predicate.Node)

WhereHasPrevWith applies a predicate to check if query has an edge prev with a given conditions (other predicates).

func (*NodeFilter) WhereID

func (f *NodeFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*NodeFilter) WhereValue

func (f *NodeFilter) WhereValue(p entql.IntP)

WhereValue applies the entql int predicate on the value field.

type NodeGroupBy

type NodeGroupBy struct {
	// contains filtered or unexported fields
}

NodeGroupBy is the group-by builder for Node entities.

func (*NodeGroupBy) Aggregate

func (ngb *NodeGroupBy) Aggregate(fns ...AggregateFunc) *NodeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*NodeGroupBy) Bool

func (ngb *NodeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*NodeGroupBy) BoolX

func (ngb *NodeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NodeGroupBy) Bools

func (ngb *NodeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*NodeGroupBy) BoolsX

func (ngb *NodeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NodeGroupBy) Float64

func (ngb *NodeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*NodeGroupBy) Float64X

func (ngb *NodeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NodeGroupBy) Float64s

func (ngb *NodeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*NodeGroupBy) Float64sX

func (ngb *NodeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NodeGroupBy) Int

func (ngb *NodeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*NodeGroupBy) IntX

func (ngb *NodeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NodeGroupBy) Ints

func (ngb *NodeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*NodeGroupBy) IntsX

func (ngb *NodeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NodeGroupBy) Scan

func (ngb *NodeGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*NodeGroupBy) ScanX

func (ngb *NodeGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*NodeGroupBy) String

func (ngb *NodeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*NodeGroupBy) StringX

func (ngb *NodeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NodeGroupBy) Strings

func (ngb *NodeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*NodeGroupBy) StringsX

func (ngb *NodeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NodeMutation

type NodeMutation struct {
	// contains filtered or unexported fields
}

NodeMutation represents an operation that mutates the Node nodes in the graph.

func (*NodeMutation) AddField

func (m *NodeMutation) 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 (*NodeMutation) AddValue

func (m *NodeMutation) AddValue(i int)

AddValue adds i to the "value" field.

func (*NodeMutation) AddedEdges

func (m *NodeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NodeMutation) AddedField

func (m *NodeMutation) 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 (*NodeMutation) AddedFields

func (m *NodeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NodeMutation) AddedIDs

func (m *NodeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NodeMutation) AddedValue

func (m *NodeMutation) AddedValue() (r int, exists bool)

AddedValue returns the value that was added to the "value" field in this mutation.

func (*NodeMutation) ClearEdge

func (m *NodeMutation) 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 (*NodeMutation) ClearField

func (m *NodeMutation) 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 (*NodeMutation) ClearNext

func (m *NodeMutation) ClearNext()

ClearNext clears the "next" edge to the Node entity.

func (*NodeMutation) ClearPrev

func (m *NodeMutation) ClearPrev()

ClearPrev clears the "prev" edge to the Node entity.

func (*NodeMutation) ClearValue

func (m *NodeMutation) ClearValue()

ClearValue clears the value of the "value" field.

func (*NodeMutation) ClearedEdges

func (m *NodeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NodeMutation) ClearedFields

func (m *NodeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NodeMutation) Client

func (m NodeMutation) 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 (*NodeMutation) EdgeCleared

func (m *NodeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NodeMutation) Field

func (m *NodeMutation) 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 (*NodeMutation) FieldCleared

func (m *NodeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NodeMutation) Fields

func (m *NodeMutation) 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 (*NodeMutation) Filter

func (m *NodeMutation) Filter() *NodeFilter

Filter returns an entql.Where implementation to apply filters on the NodeMutation builder.

func (*NodeMutation) ID

func (m *NodeMutation) 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 (*NodeMutation) IDs added in v0.10.0

func (m *NodeMutation) 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 (*NodeMutation) NextCleared

func (m *NodeMutation) NextCleared() bool

NextCleared reports if the "next" edge to the Node entity was cleared.

func (*NodeMutation) NextID

func (m *NodeMutation) NextID() (id int, exists bool)

NextID returns the "next" edge ID in the mutation.

func (*NodeMutation) NextIDs

func (m *NodeMutation) NextIDs() (ids []int)

NextIDs returns the "next" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NextID instead. It exists only for internal usage by the builders.

func (*NodeMutation) OldField

func (m *NodeMutation) 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 (*NodeMutation) OldValue

func (m *NodeMutation) OldValue(ctx context.Context) (v int, err error)

OldValue returns the old "value" field's value of the Node entity. If the Node 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 (*NodeMutation) Op

func (m *NodeMutation) Op() Op

Op returns the operation name.

func (*NodeMutation) PrevCleared

func (m *NodeMutation) PrevCleared() bool

PrevCleared reports if the "prev" edge to the Node entity was cleared.

func (*NodeMutation) PrevID

func (m *NodeMutation) PrevID() (id int, exists bool)

PrevID returns the "prev" edge ID in the mutation.

func (*NodeMutation) PrevIDs

func (m *NodeMutation) PrevIDs() (ids []int)

PrevIDs returns the "prev" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PrevID instead. It exists only for internal usage by the builders.

func (*NodeMutation) RemovedEdges

func (m *NodeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NodeMutation) RemovedIDs

func (m *NodeMutation) 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 (*NodeMutation) ResetEdge

func (m *NodeMutation) 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 (*NodeMutation) ResetField

func (m *NodeMutation) 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 (*NodeMutation) ResetNext

func (m *NodeMutation) ResetNext()

ResetNext resets all changes to the "next" edge.

func (*NodeMutation) ResetPrev

func (m *NodeMutation) ResetPrev()

ResetPrev resets all changes to the "prev" edge.

func (*NodeMutation) ResetValue

func (m *NodeMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*NodeMutation) SetField

func (m *NodeMutation) 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 (*NodeMutation) SetNextID

func (m *NodeMutation) SetNextID(id int)

SetNextID sets the "next" edge to the Node entity by id.

func (*NodeMutation) SetPrevID

func (m *NodeMutation) SetPrevID(id int)

SetPrevID sets the "prev" edge to the Node entity by id.

func (*NodeMutation) SetValue

func (m *NodeMutation) SetValue(i int)

SetValue sets the "value" field.

func (NodeMutation) Tx

func (m NodeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NodeMutation) Type

func (m *NodeMutation) Type() string

Type returns the node type of this mutation (Node).

func (*NodeMutation) Value

func (m *NodeMutation) Value() (r int, exists bool)

Value returns the value of the "value" field in the mutation.

func (*NodeMutation) ValueCleared

func (m *NodeMutation) ValueCleared() bool

ValueCleared returns if the "value" field was cleared in this mutation.

func (*NodeMutation) Where added in v0.9.0

func (m *NodeMutation) Where(ps ...predicate.Node)

Where appends a list predicates to the NodeMutation builder.

type NodeQuery

type NodeQuery struct {
	// contains filtered or unexported fields
}

NodeQuery is the builder for querying Node entities.

func (*NodeQuery) All

func (nq *NodeQuery) All(ctx context.Context) ([]*Node, error)

All executes the query and returns a list of Nodes.

func (*NodeQuery) AllX

func (nq *NodeQuery) AllX(ctx context.Context) []*Node

AllX is like All, but panics if an error occurs.

func (*NodeQuery) Clone

func (nq *NodeQuery) Clone() *NodeQuery

Clone returns a duplicate of the NodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NodeQuery) Count

func (nq *NodeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NodeQuery) CountX

func (nq *NodeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NodeQuery) Exist

func (nq *NodeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NodeQuery) ExistX

func (nq *NodeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NodeQuery) Filter

func (nq *NodeQuery) Filter() *NodeFilter

Filter returns a Filter implementation to apply filters on the NodeQuery builder.

func (*NodeQuery) First

func (nq *NodeQuery) First(ctx context.Context) (*Node, error)

First returns the first Node entity from the query. Returns a *NotFoundError when no Node was found.

func (*NodeQuery) FirstID

func (nq *NodeQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Node ID from the query. Returns a *NotFoundError when no Node ID was found.

func (*NodeQuery) FirstIDX

func (nq *NodeQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*NodeQuery) FirstX

func (nq *NodeQuery) FirstX(ctx context.Context) *Node

FirstX is like First, but panics if an error occurs.

func (*NodeQuery) ForShare added in v0.9.0

func (nq *NodeQuery) ForShare(opts ...sql.LockOption) *NodeQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*NodeQuery) ForUpdate added in v0.9.0

func (nq *NodeQuery) ForUpdate(opts ...sql.LockOption) *NodeQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*NodeQuery) GroupBy

func (nq *NodeQuery) GroupBy(field string, fields ...string) *NodeGroupBy

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 {
	Value int `json:"value,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Node.Query().
	GroupBy(node.FieldValue).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NodeQuery) IDs

func (nq *NodeQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Node IDs.

func (*NodeQuery) IDsX

func (nq *NodeQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*NodeQuery) Limit

func (nq *NodeQuery) Limit(limit int) *NodeQuery

Limit adds a limit step to the query.

func (*NodeQuery) Modify added in v0.9.0

func (nq *NodeQuery) Modify(modifiers ...func(s *sql.Selector)) *NodeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*NodeQuery) Offset

func (nq *NodeQuery) Offset(offset int) *NodeQuery

Offset adds an offset step to the query.

func (*NodeQuery) Only

func (nq *NodeQuery) Only(ctx context.Context) (*Node, error)

Only returns a single Node entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Node entity is not found. Returns a *NotFoundError when no Node entities are found.

func (*NodeQuery) OnlyID

func (nq *NodeQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Node ID in the query. Returns a *NotSingularError when exactly one Node ID is not found. Returns a *NotFoundError when no entities are found.

func (*NodeQuery) OnlyIDX

func (nq *NodeQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NodeQuery) OnlyX

func (nq *NodeQuery) OnlyX(ctx context.Context) *Node

OnlyX is like Only, but panics if an error occurs.

func (*NodeQuery) Order

func (nq *NodeQuery) Order(o ...OrderFunc) *NodeQuery

Order adds an order step to the query.

func (*NodeQuery) QueryNext

func (nq *NodeQuery) QueryNext() *NodeQuery

QueryNext chains the current query on the "next" edge.

func (*NodeQuery) QueryPrev

func (nq *NodeQuery) QueryPrev() *NodeQuery

QueryPrev chains the current query on the "prev" edge.

func (*NodeQuery) Select

func (nq *NodeQuery) Select(fields ...string) *NodeSelect

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 {
	Value int `json:"value,omitempty"`
}

client.Node.Query().
	Select(node.FieldValue).
	Scan(ctx, &v)

func (*NodeQuery) Unique added in v0.8.0

func (nq *NodeQuery) Unique(unique bool) *NodeQuery

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 (*NodeQuery) Where

func (nq *NodeQuery) Where(ps ...predicate.Node) *NodeQuery

Where adds a new predicate for the NodeQuery builder.

func (*NodeQuery) WithNext

func (nq *NodeQuery) WithNext(opts ...func(*NodeQuery)) *NodeQuery

WithNext tells the query-builder to eager-load the nodes that are connected to the "next" edge. The optional arguments are used to configure the query builder of the edge.

func (*NodeQuery) WithPrev

func (nq *NodeQuery) WithPrev(opts ...func(*NodeQuery)) *NodeQuery

WithPrev tells the query-builder to eager-load the nodes that are connected to the "prev" edge. The optional arguments are used to configure the query builder of the edge.

type NodeSelect

type NodeSelect struct {
	*NodeQuery
	// contains filtered or unexported fields
}

NodeSelect is the builder for selecting fields of Node entities.

func (*NodeSelect) Bool

func (ns *NodeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NodeSelect) BoolX

func (ns *NodeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NodeSelect) Bools

func (ns *NodeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NodeSelect) BoolsX

func (ns *NodeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NodeSelect) Float64

func (ns *NodeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NodeSelect) Float64X

func (ns *NodeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NodeSelect) Float64s

func (ns *NodeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NodeSelect) Float64sX

func (ns *NodeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NodeSelect) Int

func (ns *NodeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NodeSelect) IntX

func (ns *NodeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NodeSelect) Ints

func (ns *NodeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NodeSelect) IntsX

func (ns *NodeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NodeSelect) Modify added in v0.9.0

func (ns *NodeSelect) Modify(modifiers ...func(s *sql.Selector)) *NodeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*NodeSelect) Scan

func (ns *NodeSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*NodeSelect) ScanX

func (ns *NodeSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*NodeSelect) String

func (ns *NodeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NodeSelect) StringX

func (ns *NodeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NodeSelect) Strings

func (ns *NodeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NodeSelect) StringsX

func (ns *NodeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NodeUpdate

type NodeUpdate struct {
	// contains filtered or unexported fields
}

NodeUpdate is the builder for updating Node entities.

func (*NodeUpdate) AddValue

func (nu *NodeUpdate) AddValue(i int) *NodeUpdate

AddValue adds i to the "value" field.

func (*NodeUpdate) ClearNext

func (nu *NodeUpdate) ClearNext() *NodeUpdate

ClearNext clears the "next" edge to the Node entity.

func (*NodeUpdate) ClearPrev

func (nu *NodeUpdate) ClearPrev() *NodeUpdate

ClearPrev clears the "prev" edge to the Node entity.

func (*NodeUpdate) ClearValue

func (nu *NodeUpdate) ClearValue() *NodeUpdate

ClearValue clears the value of the "value" field.

func (*NodeUpdate) Exec

func (nu *NodeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NodeUpdate) ExecX

func (nu *NodeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NodeUpdate) Mutation

func (nu *NodeUpdate) Mutation() *NodeMutation

Mutation returns the NodeMutation object of the builder.

func (*NodeUpdate) Save

func (nu *NodeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NodeUpdate) SaveX

func (nu *NodeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NodeUpdate) SetNext

func (nu *NodeUpdate) SetNext(n *Node) *NodeUpdate

SetNext sets the "next" edge to the Node entity.

func (*NodeUpdate) SetNextID

func (nu *NodeUpdate) SetNextID(id int) *NodeUpdate

SetNextID sets the "next" edge to the Node entity by ID.

func (*NodeUpdate) SetNillableNextID

func (nu *NodeUpdate) SetNillableNextID(id *int) *NodeUpdate

SetNillableNextID sets the "next" edge to the Node entity by ID if the given value is not nil.

func (*NodeUpdate) SetNillablePrevID

func (nu *NodeUpdate) SetNillablePrevID(id *int) *NodeUpdate

SetNillablePrevID sets the "prev" edge to the Node entity by ID if the given value is not nil.

func (*NodeUpdate) SetNillableValue

func (nu *NodeUpdate) SetNillableValue(i *int) *NodeUpdate

SetNillableValue sets the "value" field if the given value is not nil.

func (*NodeUpdate) SetPrev

func (nu *NodeUpdate) SetPrev(n *Node) *NodeUpdate

SetPrev sets the "prev" edge to the Node entity.

func (*NodeUpdate) SetPrevID

func (nu *NodeUpdate) SetPrevID(id int) *NodeUpdate

SetPrevID sets the "prev" edge to the Node entity by ID.

func (*NodeUpdate) SetValue

func (nu *NodeUpdate) SetValue(i int) *NodeUpdate

SetValue sets the "value" field.

func (*NodeUpdate) Where

func (nu *NodeUpdate) Where(ps ...predicate.Node) *NodeUpdate

Where appends a list predicates to the NodeUpdate builder.

type NodeUpdateOne

type NodeUpdateOne struct {
	// contains filtered or unexported fields
}

NodeUpdateOne is the builder for updating a single Node entity.

func (*NodeUpdateOne) AddValue

func (nuo *NodeUpdateOne) AddValue(i int) *NodeUpdateOne

AddValue adds i to the "value" field.

func (*NodeUpdateOne) ClearNext

func (nuo *NodeUpdateOne) ClearNext() *NodeUpdateOne

ClearNext clears the "next" edge to the Node entity.

func (*NodeUpdateOne) ClearPrev

func (nuo *NodeUpdateOne) ClearPrev() *NodeUpdateOne

ClearPrev clears the "prev" edge to the Node entity.

func (*NodeUpdateOne) ClearValue

func (nuo *NodeUpdateOne) ClearValue() *NodeUpdateOne

ClearValue clears the value of the "value" field.

func (*NodeUpdateOne) Exec

func (nuo *NodeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*NodeUpdateOne) ExecX

func (nuo *NodeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NodeUpdateOne) Mutation

func (nuo *NodeUpdateOne) Mutation() *NodeMutation

Mutation returns the NodeMutation object of the builder.

func (*NodeUpdateOne) Save

func (nuo *NodeUpdateOne) Save(ctx context.Context) (*Node, error)

Save executes the query and returns the updated Node entity.

func (*NodeUpdateOne) SaveX

func (nuo *NodeUpdateOne) SaveX(ctx context.Context) *Node

SaveX is like Save, but panics if an error occurs.

func (*NodeUpdateOne) Select added in v0.8.0

func (nuo *NodeUpdateOne) Select(field string, fields ...string) *NodeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NodeUpdateOne) SetNext

func (nuo *NodeUpdateOne) SetNext(n *Node) *NodeUpdateOne

SetNext sets the "next" edge to the Node entity.

func (*NodeUpdateOne) SetNextID

func (nuo *NodeUpdateOne) SetNextID(id int) *NodeUpdateOne

SetNextID sets the "next" edge to the Node entity by ID.

func (*NodeUpdateOne) SetNillableNextID

func (nuo *NodeUpdateOne) SetNillableNextID(id *int) *NodeUpdateOne

SetNillableNextID sets the "next" edge to the Node entity by ID if the given value is not nil.

func (*NodeUpdateOne) SetNillablePrevID

func (nuo *NodeUpdateOne) SetNillablePrevID(id *int) *NodeUpdateOne

SetNillablePrevID sets the "prev" edge to the Node entity by ID if the given value is not nil.

func (*NodeUpdateOne) SetNillableValue

func (nuo *NodeUpdateOne) SetNillableValue(i *int) *NodeUpdateOne

SetNillableValue sets the "value" field if the given value is not nil.

func (*NodeUpdateOne) SetPrev

func (nuo *NodeUpdateOne) SetPrev(n *Node) *NodeUpdateOne

SetPrev sets the "prev" edge to the Node entity.

func (*NodeUpdateOne) SetPrevID

func (nuo *NodeUpdateOne) SetPrevID(id int) *NodeUpdateOne

SetPrevID sets the "prev" edge to the Node entity by ID.

func (*NodeUpdateOne) SetValue

func (nuo *NodeUpdateOne) SetValue(i int) *NodeUpdateOne

SetValue sets the "value" field.

type NodeUpsert added in v0.9.0

type NodeUpsert struct {
	*sql.UpdateSet
}

NodeUpsert is the "OnConflict" setter.

func (*NodeUpsert) AddValue added in v0.10.0

func (u *NodeUpsert) AddValue(v int) *NodeUpsert

AddValue adds v to the "value" field.

func (*NodeUpsert) ClearValue added in v0.9.0

func (u *NodeUpsert) ClearValue() *NodeUpsert

ClearValue clears the value of the "value" field.

func (*NodeUpsert) SetValue added in v0.9.0

func (u *NodeUpsert) SetValue(v int) *NodeUpsert

SetValue sets the "value" field.

func (*NodeUpsert) UpdateValue added in v0.9.0

func (u *NodeUpsert) UpdateValue() *NodeUpsert

UpdateValue sets the "value" field to the value that was provided on create.

type NodeUpsertBulk added in v0.9.0

type NodeUpsertBulk struct {
	// contains filtered or unexported fields
}

NodeUpsertBulk is the builder for "upsert"-ing a bulk of Node nodes.

func (*NodeUpsertBulk) AddValue added in v0.10.0

func (u *NodeUpsertBulk) AddValue(v int) *NodeUpsertBulk

AddValue adds v to the "value" field.

func (*NodeUpsertBulk) ClearValue added in v0.9.0

func (u *NodeUpsertBulk) ClearValue() *NodeUpsertBulk

ClearValue clears the value of the "value" field.

func (*NodeUpsertBulk) DoNothing added in v0.9.0

func (u *NodeUpsertBulk) DoNothing() *NodeUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NodeUpsertBulk) Exec added in v0.9.0

func (u *NodeUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NodeUpsertBulk) ExecX added in v0.9.0

func (u *NodeUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NodeUpsertBulk) Ignore added in v0.9.0

func (u *NodeUpsertBulk) Ignore() *NodeUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Node.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*NodeUpsertBulk) SetValue added in v0.9.0

func (u *NodeUpsertBulk) SetValue(v int) *NodeUpsertBulk

SetValue sets the "value" field.

func (*NodeUpsertBulk) Update added in v0.9.0

func (u *NodeUpsertBulk) Update(set func(*NodeUpsert)) *NodeUpsertBulk

Update allows overriding fields `UPDATE` values. See the NodeCreateBulk.OnConflict documentation for more info.

func (*NodeUpsertBulk) UpdateNewValues added in v0.9.0

func (u *NodeUpsertBulk) UpdateNewValues() *NodeUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Node.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NodeUpsertBulk) UpdateValue added in v0.9.0

func (u *NodeUpsertBulk) UpdateValue() *NodeUpsertBulk

UpdateValue sets the "value" field to the value that was provided on create.

type NodeUpsertOne added in v0.9.0

type NodeUpsertOne struct {
	// contains filtered or unexported fields
}

NodeUpsertOne is the builder for "upsert"-ing

one Node node.

func (*NodeUpsertOne) AddValue added in v0.10.0

func (u *NodeUpsertOne) AddValue(v int) *NodeUpsertOne

AddValue adds v to the "value" field.

func (*NodeUpsertOne) ClearValue added in v0.9.0

func (u *NodeUpsertOne) ClearValue() *NodeUpsertOne

ClearValue clears the value of the "value" field.

func (*NodeUpsertOne) DoNothing added in v0.9.0

func (u *NodeUpsertOne) DoNothing() *NodeUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NodeUpsertOne) Exec added in v0.9.0

func (u *NodeUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*NodeUpsertOne) ExecX added in v0.9.0

func (u *NodeUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NodeUpsertOne) ID added in v0.9.0

func (u *NodeUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*NodeUpsertOne) IDX added in v0.9.0

func (u *NodeUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*NodeUpsertOne) Ignore added in v0.9.0

func (u *NodeUpsertOne) Ignore() *NodeUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Node.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*NodeUpsertOne) SetValue added in v0.9.0

func (u *NodeUpsertOne) SetValue(v int) *NodeUpsertOne

SetValue sets the "value" field.

func (*NodeUpsertOne) Update added in v0.9.0

func (u *NodeUpsertOne) Update(set func(*NodeUpsert)) *NodeUpsertOne

Update allows overriding fields `UPDATE` values. See the NodeCreate.OnConflict documentation for more info.

func (*NodeUpsertOne) UpdateNewValues added in v0.9.0

func (u *NodeUpsertOne) UpdateNewValues() *NodeUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Node.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NodeUpsertOne) UpdateValue added in v0.9.0

func (u *NodeUpsertOne) UpdateValue() *NodeUpsertOne

UpdateValue sets the "value" field to the value that was provided on create.

type Nodes

type Nodes []*Node

Nodes is a parsable slice of Node.

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(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Pet

type Pet struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Age holds the value of the "age" field.
	Age float64 `json:"age,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// UUID holds the value of the "uuid" field.
	UUID uuid.UUID `json:"uuid,omitempty"`
	// Nickname holds the value of the "nickname" field.
	Nickname string `json:"nickname,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PetQuery when eager-loading is set.
	Edges PetEdges `json:"edges"`
	// contains filtered or unexported fields
}

Pet is the model entity for the Pet schema.

func (*Pet) QueryOwner

func (pe *Pet) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the Pet entity.

func (*Pet) QueryTeam

func (pe *Pet) QueryTeam() *UserQuery

QueryTeam queries the "team" edge of the Pet entity.

func (*Pet) String

func (pe *Pet) String() string

String implements the fmt.Stringer.

func (*Pet) Unwrap

func (pe *Pet) Unwrap() *Pet

Unwrap unwraps the Pet 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 (*Pet) Update

func (pe *Pet) Update() *PetUpdateOne

Update returns a builder for updating this Pet. Note that you need to call Pet.Unwrap() before calling this method if this Pet was returned from a transaction, and the transaction was committed or rolled back.

type PetClient

type PetClient struct {
	// contains filtered or unexported fields
}

PetClient is a client for the Pet schema.

func NewPetClient

func NewPetClient(c config) *PetClient

NewPetClient returns a client for the Pet from the given config.

func (*PetClient) Create

func (c *PetClient) Create() *PetCreate

Create returns a create builder for Pet.

func (*PetClient) CreateBulk

func (c *PetClient) CreateBulk(builders ...*PetCreate) *PetCreateBulk

CreateBulk returns a builder for creating a bulk of Pet entities.

func (*PetClient) Delete

func (c *PetClient) Delete() *PetDelete

Delete returns a delete builder for Pet.

func (*PetClient) DeleteOne

func (c *PetClient) DeleteOne(pe *Pet) *PetDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*PetClient) DeleteOneID

func (c *PetClient) DeleteOneID(id int) *PetDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*PetClient) Get

func (c *PetClient) Get(ctx context.Context, id int) (*Pet, error)

Get returns a Pet entity by its id.

func (*PetClient) GetX

func (c *PetClient) GetX(ctx context.Context, id int) *Pet

GetX is like Get, but panics if an error occurs.

func (*PetClient) Hooks

func (c *PetClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PetClient) Query

func (c *PetClient) Query() *PetQuery

Query returns a query builder for Pet.

func (*PetClient) QueryOwner

func (c *PetClient) QueryOwner(pe *Pet) *UserQuery

QueryOwner queries the owner edge of a Pet.

func (*PetClient) QueryTeam

func (c *PetClient) QueryTeam(pe *Pet) *UserQuery

QueryTeam queries the team edge of a Pet.

func (*PetClient) Update

func (c *PetClient) Update() *PetUpdate

Update returns an update builder for Pet.

func (*PetClient) UpdateOne

func (c *PetClient) UpdateOne(pe *Pet) *PetUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PetClient) UpdateOneID

func (c *PetClient) UpdateOneID(id int) *PetUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PetClient) Use

func (c *PetClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `pet.Hooks(f(g(h())))`.

type PetCreate

type PetCreate struct {
	// contains filtered or unexported fields
}

PetCreate is the builder for creating a Pet entity.

func (*PetCreate) Exec added in v0.9.0

func (pc *PetCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PetCreate) ExecX added in v0.9.0

func (pc *PetCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PetCreate) Mutation

func (pc *PetCreate) Mutation() *PetMutation

Mutation returns the PetMutation object of the builder.

func (*PetCreate) OnConflict added in v0.9.0

func (pc *PetCreate) OnConflict(opts ...sql.ConflictOption) *PetUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Pet.Create().
	SetAge(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.PetUpsert) {
		SetAge(v+v).
	}).
	Exec(ctx)

func (*PetCreate) OnConflictColumns added in v0.9.0

func (pc *PetCreate) OnConflictColumns(columns ...string) *PetUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Pet.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PetCreate) Save

func (pc *PetCreate) Save(ctx context.Context) (*Pet, error)

Save creates the Pet in the database.

func (*PetCreate) SaveX

func (pc *PetCreate) SaveX(ctx context.Context) *Pet

SaveX calls Save and panics if Save returns an error.

func (*PetCreate) SetAge added in v0.9.0

func (pc *PetCreate) SetAge(f float64) *PetCreate

SetAge sets the "age" field.

func (*PetCreate) SetName

func (pc *PetCreate) SetName(s string) *PetCreate

SetName sets the "name" field.

func (*PetCreate) SetNickname added in v0.10.0

func (pc *PetCreate) SetNickname(s string) *PetCreate

SetNickname sets the "nickname" field.

func (*PetCreate) SetNillableAge added in v0.9.0

func (pc *PetCreate) SetNillableAge(f *float64) *PetCreate

SetNillableAge sets the "age" field if the given value is not nil.

func (*PetCreate) SetNillableNickname added in v0.10.0

func (pc *PetCreate) SetNillableNickname(s *string) *PetCreate

SetNillableNickname sets the "nickname" field if the given value is not nil.

func (*PetCreate) SetNillableOwnerID

func (pc *PetCreate) SetNillableOwnerID(id *int) *PetCreate

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*PetCreate) SetNillableTeamID

func (pc *PetCreate) SetNillableTeamID(id *int) *PetCreate

SetNillableTeamID sets the "team" edge to the User entity by ID if the given value is not nil.

func (*PetCreate) SetNillableUUID added in v0.10.0

func (pc *PetCreate) SetNillableUUID(u *uuid.UUID) *PetCreate

SetNillableUUID sets the "uuid" field if the given value is not nil.

func (*PetCreate) SetOwner

func (pc *PetCreate) SetOwner(u *User) *PetCreate

SetOwner sets the "owner" edge to the User entity.

func (*PetCreate) SetOwnerID

func (pc *PetCreate) SetOwnerID(id int) *PetCreate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*PetCreate) SetTeam

func (pc *PetCreate) SetTeam(u *User) *PetCreate

SetTeam sets the "team" edge to the User entity.

func (*PetCreate) SetTeamID

func (pc *PetCreate) SetTeamID(id int) *PetCreate

SetTeamID sets the "team" edge to the User entity by ID.

func (*PetCreate) SetUUID

func (pc *PetCreate) SetUUID(u uuid.UUID) *PetCreate

SetUUID sets the "uuid" field.

type PetCreateBulk

type PetCreateBulk struct {
	// contains filtered or unexported fields
}

PetCreateBulk is the builder for creating many Pet entities in bulk.

func (*PetCreateBulk) Exec added in v0.9.0

func (pcb *PetCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PetCreateBulk) ExecX added in v0.9.0

func (pcb *PetCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PetCreateBulk) OnConflict added in v0.9.0

func (pcb *PetCreateBulk) OnConflict(opts ...sql.ConflictOption) *PetUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Pet.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.PetUpsert) {
		SetAge(v+v).
	}).
	Exec(ctx)

func (*PetCreateBulk) OnConflictColumns added in v0.9.0

func (pcb *PetCreateBulk) OnConflictColumns(columns ...string) *PetUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Pet.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PetCreateBulk) Save

func (pcb *PetCreateBulk) Save(ctx context.Context) ([]*Pet, error)

Save creates the Pet entities in the database.

func (*PetCreateBulk) SaveX

func (pcb *PetCreateBulk) SaveX(ctx context.Context) []*Pet

SaveX is like Save, but panics if an error occurs.

type PetDelete

type PetDelete struct {
	// contains filtered or unexported fields
}

PetDelete is the builder for deleting a Pet entity.

func (*PetDelete) Exec

func (pd *PetDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PetDelete) ExecX

func (pd *PetDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PetDelete) Where

func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete

Where appends a list predicates to the PetDelete builder.

type PetDeleteOne

type PetDeleteOne struct {
	// contains filtered or unexported fields
}

PetDeleteOne is the builder for deleting a single Pet entity.

func (*PetDeleteOne) Exec

func (pdo *PetDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PetDeleteOne) ExecX

func (pdo *PetDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type PetEdges

type PetEdges struct {
	// Team holds the value of the team edge.
	Team *User `json:"team,omitempty"`
	// Owner holds the value of the owner edge.
	Owner *User `json:"owner,omitempty"`
	// contains filtered or unexported fields
}

PetEdges holds the relations/edges for other nodes in the graph.

func (PetEdges) OwnerOrErr

func (e PetEdges) OwnerOrErr() (*User, error)

OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PetEdges) TeamOrErr

func (e PetEdges) TeamOrErr() (*User, error)

TeamOrErr returns the Team value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type PetFilter

type PetFilter struct {
	// contains filtered or unexported fields
}

PetFilter provides a generic filtering capability at runtime for PetQuery.

func (*PetFilter) Where

func (f *PetFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*PetFilter) WhereAge added in v0.9.0

func (f *PetFilter) WhereAge(p entql.Float64P)

WhereAge applies the entql float64 predicate on the age field.

func (*PetFilter) WhereHasOwner

func (f *PetFilter) WhereHasOwner()

WhereHasOwner applies a predicate to check if query has an edge owner.

func (*PetFilter) WhereHasOwnerWith

func (f *PetFilter) WhereHasOwnerWith(preds ...predicate.User)

WhereHasOwnerWith applies a predicate to check if query has an edge owner with a given conditions (other predicates).

func (*PetFilter) WhereHasTeam

func (f *PetFilter) WhereHasTeam()

WhereHasTeam applies a predicate to check if query has an edge team.

func (*PetFilter) WhereHasTeamWith

func (f *PetFilter) WhereHasTeamWith(preds ...predicate.User)

WhereHasTeamWith applies a predicate to check if query has an edge team with a given conditions (other predicates).

func (*PetFilter) WhereID

func (f *PetFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*PetFilter) WhereName

func (f *PetFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*PetFilter) WhereNickname added in v0.10.0

func (f *PetFilter) WhereNickname(p entql.StringP)

WhereNickname applies the entql string predicate on the nickname field.

func (*PetFilter) WhereUUID

func (f *PetFilter) WhereUUID(p entql.ValueP)

WhereUUID applies the entql [16]byte predicate on the uuid field.

type PetGroupBy

type PetGroupBy struct {
	// contains filtered or unexported fields
}

PetGroupBy is the group-by builder for Pet entities.

func (*PetGroupBy) Aggregate

func (pgb *PetGroupBy) Aggregate(fns ...AggregateFunc) *PetGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PetGroupBy) Bool

func (pgb *PetGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PetGroupBy) BoolX

func (pgb *PetGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PetGroupBy) Bools

func (pgb *PetGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*PetGroupBy) BoolsX

func (pgb *PetGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PetGroupBy) Float64

func (pgb *PetGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PetGroupBy) Float64X

func (pgb *PetGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PetGroupBy) Float64s

func (pgb *PetGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*PetGroupBy) Float64sX

func (pgb *PetGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PetGroupBy) Int

func (pgb *PetGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PetGroupBy) IntX

func (pgb *PetGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PetGroupBy) Ints

func (pgb *PetGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*PetGroupBy) IntsX

func (pgb *PetGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PetGroupBy) Scan

func (pgb *PetGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*PetGroupBy) ScanX

func (pgb *PetGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*PetGroupBy) String

func (pgb *PetGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PetGroupBy) StringX

func (pgb *PetGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PetGroupBy) Strings

func (pgb *PetGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*PetGroupBy) StringsX

func (pgb *PetGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PetMutation

type PetMutation struct {
	// contains filtered or unexported fields
}

PetMutation represents an operation that mutates the Pet nodes in the graph.

func (*PetMutation) AddAge added in v0.9.0

func (m *PetMutation) AddAge(f float64)

AddAge adds f to the "age" field.

func (*PetMutation) AddField

func (m *PetMutation) 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 (*PetMutation) AddedAge added in v0.9.0

func (m *PetMutation) AddedAge() (r float64, exists bool)

AddedAge returns the value that was added to the "age" field in this mutation.

func (*PetMutation) AddedEdges

func (m *PetMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PetMutation) AddedField

func (m *PetMutation) 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 (*PetMutation) AddedFields

func (m *PetMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PetMutation) AddedIDs

func (m *PetMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PetMutation) Age added in v0.9.0

func (m *PetMutation) Age() (r float64, exists bool)

Age returns the value of the "age" field in the mutation.

func (*PetMutation) ClearEdge

func (m *PetMutation) 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 (*PetMutation) ClearField

func (m *PetMutation) 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 (*PetMutation) ClearNickname added in v0.10.0

func (m *PetMutation) ClearNickname()

ClearNickname clears the value of the "nickname" field.

func (*PetMutation) ClearOwner

func (m *PetMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*PetMutation) ClearTeam

func (m *PetMutation) ClearTeam()

ClearTeam clears the "team" edge to the User entity.

func (*PetMutation) ClearUUID

func (m *PetMutation) ClearUUID()

ClearUUID clears the value of the "uuid" field.

func (*PetMutation) ClearedEdges

func (m *PetMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PetMutation) ClearedFields

func (m *PetMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PetMutation) Client

func (m PetMutation) 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 (*PetMutation) EdgeCleared

func (m *PetMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PetMutation) Field

func (m *PetMutation) 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 (*PetMutation) FieldCleared

func (m *PetMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PetMutation) Fields

func (m *PetMutation) 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 (*PetMutation) Filter

func (m *PetMutation) Filter() *PetFilter

Filter returns an entql.Where implementation to apply filters on the PetMutation builder.

func (*PetMutation) ID

func (m *PetMutation) 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 (*PetMutation) IDs added in v0.10.0

func (m *PetMutation) 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 (*PetMutation) Name

func (m *PetMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*PetMutation) Nickname added in v0.10.0

func (m *PetMutation) Nickname() (r string, exists bool)

Nickname returns the value of the "nickname" field in the mutation.

func (*PetMutation) NicknameCleared added in v0.10.0

func (m *PetMutation) NicknameCleared() bool

NicknameCleared returns if the "nickname" field was cleared in this mutation.

func (*PetMutation) OldAge added in v0.9.0

func (m *PetMutation) OldAge(ctx context.Context) (v float64, err error)

OldAge returns the old "age" field's value of the Pet entity. If the Pet 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 (*PetMutation) OldField

func (m *PetMutation) 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 (*PetMutation) OldName

func (m *PetMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Pet entity. If the Pet 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 (*PetMutation) OldNickname added in v0.10.0

func (m *PetMutation) OldNickname(ctx context.Context) (v string, err error)

OldNickname returns the old "nickname" field's value of the Pet entity. If the Pet 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 (*PetMutation) OldUUID

func (m *PetMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)

OldUUID returns the old "uuid" field's value of the Pet entity. If the Pet 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 (*PetMutation) Op

func (m *PetMutation) Op() Op

Op returns the operation name.

func (*PetMutation) OwnerCleared

func (m *PetMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*PetMutation) OwnerID

func (m *PetMutation) OwnerID() (id int, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*PetMutation) OwnerIDs

func (m *PetMutation) OwnerIDs() (ids []int)

OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.

func (*PetMutation) RemovedEdges

func (m *PetMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PetMutation) RemovedIDs

func (m *PetMutation) 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 (*PetMutation) ResetAge added in v0.9.0

func (m *PetMutation) ResetAge()

ResetAge resets all changes to the "age" field.

func (*PetMutation) ResetEdge

func (m *PetMutation) 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 (*PetMutation) ResetField

func (m *PetMutation) 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 (*PetMutation) ResetName

func (m *PetMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PetMutation) ResetNickname added in v0.10.0

func (m *PetMutation) ResetNickname()

ResetNickname resets all changes to the "nickname" field.

func (*PetMutation) ResetOwner

func (m *PetMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*PetMutation) ResetTeam

func (m *PetMutation) ResetTeam()

ResetTeam resets all changes to the "team" edge.

func (*PetMutation) ResetUUID

func (m *PetMutation) ResetUUID()

ResetUUID resets all changes to the "uuid" field.

func (*PetMutation) SetAge added in v0.9.0

func (m *PetMutation) SetAge(f float64)

SetAge sets the "age" field.

func (*PetMutation) SetField

func (m *PetMutation) 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 (*PetMutation) SetName

func (m *PetMutation) SetName(s string)

SetName sets the "name" field.

func (*PetMutation) SetNickname added in v0.10.0

func (m *PetMutation) SetNickname(s string)

SetNickname sets the "nickname" field.

func (*PetMutation) SetOwnerID

func (m *PetMutation) SetOwnerID(id int)

SetOwnerID sets the "owner" edge to the User entity by id.

func (*PetMutation) SetTeamID

func (m *PetMutation) SetTeamID(id int)

SetTeamID sets the "team" edge to the User entity by id.

func (*PetMutation) SetUUID

func (m *PetMutation) SetUUID(u uuid.UUID)

SetUUID sets the "uuid" field.

func (*PetMutation) TeamCleared

func (m *PetMutation) TeamCleared() bool

TeamCleared reports if the "team" edge to the User entity was cleared.

func (*PetMutation) TeamID

func (m *PetMutation) TeamID() (id int, exists bool)

TeamID returns the "team" edge ID in the mutation.

func (*PetMutation) TeamIDs

func (m *PetMutation) TeamIDs() (ids []int)

TeamIDs returns the "team" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TeamID instead. It exists only for internal usage by the builders.

func (PetMutation) Tx

func (m PetMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PetMutation) Type

func (m *PetMutation) Type() string

Type returns the node type of this mutation (Pet).

func (*PetMutation) UUID

func (m *PetMutation) UUID() (r uuid.UUID, exists bool)

UUID returns the value of the "uuid" field in the mutation.

func (*PetMutation) UUIDCleared

func (m *PetMutation) UUIDCleared() bool

UUIDCleared returns if the "uuid" field was cleared in this mutation.

func (*PetMutation) Where added in v0.9.0

func (m *PetMutation) Where(ps ...predicate.Pet)

Where appends a list predicates to the PetMutation builder.

type PetQuery

type PetQuery struct {
	// contains filtered or unexported fields
}

PetQuery is the builder for querying Pet entities.

func (*PetQuery) All

func (pq *PetQuery) All(ctx context.Context) ([]*Pet, error)

All executes the query and returns a list of Pets.

func (*PetQuery) AllX

func (pq *PetQuery) AllX(ctx context.Context) []*Pet

AllX is like All, but panics if an error occurs.

func (*PetQuery) Clone

func (pq *PetQuery) Clone() *PetQuery

Clone returns a duplicate of the PetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PetQuery) Count

func (pq *PetQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PetQuery) CountX

func (pq *PetQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PetQuery) Exist

func (pq *PetQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PetQuery) ExistX

func (pq *PetQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PetQuery) Filter

func (pq *PetQuery) Filter() *PetFilter

Filter returns a Filter implementation to apply filters on the PetQuery builder.

func (*PetQuery) First

func (pq *PetQuery) First(ctx context.Context) (*Pet, error)

First returns the first Pet entity from the query. Returns a *NotFoundError when no Pet was found.

func (*PetQuery) FirstID

func (pq *PetQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Pet ID from the query. Returns a *NotFoundError when no Pet ID was found.

func (*PetQuery) FirstIDX

func (pq *PetQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*PetQuery) FirstX

func (pq *PetQuery) FirstX(ctx context.Context) *Pet

FirstX is like First, but panics if an error occurs.

func (*PetQuery) ForShare added in v0.9.0

func (pq *PetQuery) ForShare(opts ...sql.LockOption) *PetQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*PetQuery) ForUpdate added in v0.9.0

func (pq *PetQuery) ForUpdate(opts ...sql.LockOption) *PetQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*PetQuery) GroupBy

func (pq *PetQuery) GroupBy(field string, fields ...string) *PetGroupBy

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 {
	Age float64 `json:"age,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Pet.Query().
	GroupBy(pet.FieldAge).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PetQuery) IDs

func (pq *PetQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Pet IDs.

func (*PetQuery) IDsX

func (pq *PetQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*PetQuery) Limit

func (pq *PetQuery) Limit(limit int) *PetQuery

Limit adds a limit step to the query.

func (*PetQuery) Modify added in v0.9.0

func (pq *PetQuery) Modify(modifiers ...func(s *sql.Selector)) *PetSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*PetQuery) Offset

func (pq *PetQuery) Offset(offset int) *PetQuery

Offset adds an offset step to the query.

func (*PetQuery) Only

func (pq *PetQuery) Only(ctx context.Context) (*Pet, error)

Only returns a single Pet entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Pet entity is not found. Returns a *NotFoundError when no Pet entities are found.

func (*PetQuery) OnlyID

func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Pet ID in the query. Returns a *NotSingularError when exactly one Pet ID is not found. Returns a *NotFoundError when no entities are found.

func (*PetQuery) OnlyIDX

func (pq *PetQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PetQuery) OnlyX

func (pq *PetQuery) OnlyX(ctx context.Context) *Pet

OnlyX is like Only, but panics if an error occurs.

func (*PetQuery) Order

func (pq *PetQuery) Order(o ...OrderFunc) *PetQuery

Order adds an order step to the query.

func (*PetQuery) QueryOwner

func (pq *PetQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*PetQuery) QueryTeam

func (pq *PetQuery) QueryTeam() *UserQuery

QueryTeam chains the current query on the "team" edge.

func (*PetQuery) Select

func (pq *PetQuery) Select(fields ...string) *PetSelect

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 {
	Age float64 `json:"age,omitempty"`
}

client.Pet.Query().
	Select(pet.FieldAge).
	Scan(ctx, &v)

func (*PetQuery) Unique added in v0.8.0

func (pq *PetQuery) Unique(unique bool) *PetQuery

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 (*PetQuery) Where

func (pq *PetQuery) Where(ps ...predicate.Pet) *PetQuery

Where adds a new predicate for the PetQuery builder.

func (*PetQuery) WithOwner

func (pq *PetQuery) WithOwner(opts ...func(*UserQuery)) *PetQuery

WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.

func (*PetQuery) WithTeam

func (pq *PetQuery) WithTeam(opts ...func(*UserQuery)) *PetQuery

WithTeam tells the query-builder to eager-load the nodes that are connected to the "team" edge. The optional arguments are used to configure the query builder of the edge.

type PetSelect

type PetSelect struct {
	*PetQuery
	// contains filtered or unexported fields
}

PetSelect is the builder for selecting fields of Pet entities.

func (*PetSelect) Bool

func (ps *PetSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PetSelect) BoolX

func (ps *PetSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PetSelect) Bools

func (ps *PetSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PetSelect) BoolsX

func (ps *PetSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PetSelect) Float64

func (ps *PetSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PetSelect) Float64X

func (ps *PetSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PetSelect) Float64s

func (ps *PetSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PetSelect) Float64sX

func (ps *PetSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PetSelect) Int

func (ps *PetSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PetSelect) IntX

func (ps *PetSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PetSelect) Ints

func (ps *PetSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PetSelect) IntsX

func (ps *PetSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PetSelect) Modify added in v0.9.0

func (ps *PetSelect) Modify(modifiers ...func(s *sql.Selector)) *PetSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*PetSelect) Scan

func (ps *PetSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*PetSelect) ScanX

func (ps *PetSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*PetSelect) String

func (ps *PetSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PetSelect) StringX

func (ps *PetSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PetSelect) Strings

func (ps *PetSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PetSelect) StringsX

func (ps *PetSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PetUpdate

type PetUpdate struct {
	// contains filtered or unexported fields
}

PetUpdate is the builder for updating Pet entities.

func (*PetUpdate) AddAge added in v0.9.0

func (pu *PetUpdate) AddAge(f float64) *PetUpdate

AddAge adds f to the "age" field.

func (*PetUpdate) ClearNickname added in v0.10.0

func (pu *PetUpdate) ClearNickname() *PetUpdate

ClearNickname clears the value of the "nickname" field.

func (*PetUpdate) ClearOwner

func (pu *PetUpdate) ClearOwner() *PetUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*PetUpdate) ClearTeam

func (pu *PetUpdate) ClearTeam() *PetUpdate

ClearTeam clears the "team" edge to the User entity.

func (*PetUpdate) ClearUUID

func (pu *PetUpdate) ClearUUID() *PetUpdate

ClearUUID clears the value of the "uuid" field.

func (*PetUpdate) Exec

func (pu *PetUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PetUpdate) ExecX

func (pu *PetUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PetUpdate) Mutation

func (pu *PetUpdate) Mutation() *PetMutation

Mutation returns the PetMutation object of the builder.

func (*PetUpdate) Save

func (pu *PetUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PetUpdate) SaveX

func (pu *PetUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PetUpdate) SetAge added in v0.9.0

func (pu *PetUpdate) SetAge(f float64) *PetUpdate

SetAge sets the "age" field.

func (*PetUpdate) SetName

func (pu *PetUpdate) SetName(s string) *PetUpdate

SetName sets the "name" field.

func (*PetUpdate) SetNickname added in v0.10.0

func (pu *PetUpdate) SetNickname(s string) *PetUpdate

SetNickname sets the "nickname" field.

func (*PetUpdate) SetNillableAge added in v0.9.0

func (pu *PetUpdate) SetNillableAge(f *float64) *PetUpdate

SetNillableAge sets the "age" field if the given value is not nil.

func (*PetUpdate) SetNillableNickname added in v0.10.0

func (pu *PetUpdate) SetNillableNickname(s *string) *PetUpdate

SetNillableNickname sets the "nickname" field if the given value is not nil.

func (*PetUpdate) SetNillableOwnerID

func (pu *PetUpdate) SetNillableOwnerID(id *int) *PetUpdate

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*PetUpdate) SetNillableTeamID

func (pu *PetUpdate) SetNillableTeamID(id *int) *PetUpdate

SetNillableTeamID sets the "team" edge to the User entity by ID if the given value is not nil.

func (*PetUpdate) SetNillableUUID added in v0.10.0

func (pu *PetUpdate) SetNillableUUID(u *uuid.UUID) *PetUpdate

SetNillableUUID sets the "uuid" field if the given value is not nil.

func (*PetUpdate) SetOwner

func (pu *PetUpdate) SetOwner(u *User) *PetUpdate

SetOwner sets the "owner" edge to the User entity.

func (*PetUpdate) SetOwnerID

func (pu *PetUpdate) SetOwnerID(id int) *PetUpdate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*PetUpdate) SetTeam

func (pu *PetUpdate) SetTeam(u *User) *PetUpdate

SetTeam sets the "team" edge to the User entity.

func (*PetUpdate) SetTeamID

func (pu *PetUpdate) SetTeamID(id int) *PetUpdate

SetTeamID sets the "team" edge to the User entity by ID.

func (*PetUpdate) SetUUID

func (pu *PetUpdate) SetUUID(u uuid.UUID) *PetUpdate

SetUUID sets the "uuid" field.

func (*PetUpdate) Where

func (pu *PetUpdate) Where(ps ...predicate.Pet) *PetUpdate

Where appends a list predicates to the PetUpdate builder.

type PetUpdateOne

type PetUpdateOne struct {
	// contains filtered or unexported fields
}

PetUpdateOne is the builder for updating a single Pet entity.

func (*PetUpdateOne) AddAge added in v0.9.0

func (puo *PetUpdateOne) AddAge(f float64) *PetUpdateOne

AddAge adds f to the "age" field.

func (*PetUpdateOne) ClearNickname added in v0.10.0

func (puo *PetUpdateOne) ClearNickname() *PetUpdateOne

ClearNickname clears the value of the "nickname" field.

func (*PetUpdateOne) ClearOwner

func (puo *PetUpdateOne) ClearOwner() *PetUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*PetUpdateOne) ClearTeam

func (puo *PetUpdateOne) ClearTeam() *PetUpdateOne

ClearTeam clears the "team" edge to the User entity.

func (*PetUpdateOne) ClearUUID

func (puo *PetUpdateOne) ClearUUID() *PetUpdateOne

ClearUUID clears the value of the "uuid" field.

func (*PetUpdateOne) Exec

func (puo *PetUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PetUpdateOne) ExecX

func (puo *PetUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PetUpdateOne) Mutation

func (puo *PetUpdateOne) Mutation() *PetMutation

Mutation returns the PetMutation object of the builder.

func (*PetUpdateOne) Save

func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error)

Save executes the query and returns the updated Pet entity.

func (*PetUpdateOne) SaveX

func (puo *PetUpdateOne) SaveX(ctx context.Context) *Pet

SaveX is like Save, but panics if an error occurs.

func (*PetUpdateOne) Select added in v0.8.0

func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PetUpdateOne) SetAge added in v0.9.0

func (puo *PetUpdateOne) SetAge(f float64) *PetUpdateOne

SetAge sets the "age" field.

func (*PetUpdateOne) SetName

func (puo *PetUpdateOne) SetName(s string) *PetUpdateOne

SetName sets the "name" field.

func (*PetUpdateOne) SetNickname added in v0.10.0

func (puo *PetUpdateOne) SetNickname(s string) *PetUpdateOne

SetNickname sets the "nickname" field.

func (*PetUpdateOne) SetNillableAge added in v0.9.0

func (puo *PetUpdateOne) SetNillableAge(f *float64) *PetUpdateOne

SetNillableAge sets the "age" field if the given value is not nil.

func (*PetUpdateOne) SetNillableNickname added in v0.10.0

func (puo *PetUpdateOne) SetNillableNickname(s *string) *PetUpdateOne

SetNillableNickname sets the "nickname" field if the given value is not nil.

func (*PetUpdateOne) SetNillableOwnerID

func (puo *PetUpdateOne) SetNillableOwnerID(id *int) *PetUpdateOne

SetNillableOwnerID sets the "owner" edge to the User entity by ID if the given value is not nil.

func (*PetUpdateOne) SetNillableTeamID

func (puo *PetUpdateOne) SetNillableTeamID(id *int) *PetUpdateOne

SetNillableTeamID sets the "team" edge to the User entity by ID if the given value is not nil.

func (*PetUpdateOne) SetNillableUUID added in v0.10.0

func (puo *PetUpdateOne) SetNillableUUID(u *uuid.UUID) *PetUpdateOne

SetNillableUUID sets the "uuid" field if the given value is not nil.

func (*PetUpdateOne) SetOwner

func (puo *PetUpdateOne) SetOwner(u *User) *PetUpdateOne

SetOwner sets the "owner" edge to the User entity.

func (*PetUpdateOne) SetOwnerID

func (puo *PetUpdateOne) SetOwnerID(id int) *PetUpdateOne

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*PetUpdateOne) SetTeam

func (puo *PetUpdateOne) SetTeam(u *User) *PetUpdateOne

SetTeam sets the "team" edge to the User entity.

func (*PetUpdateOne) SetTeamID

func (puo *PetUpdateOne) SetTeamID(id int) *PetUpdateOne

SetTeamID sets the "team" edge to the User entity by ID.

func (*PetUpdateOne) SetUUID

func (puo *PetUpdateOne) SetUUID(u uuid.UUID) *PetUpdateOne

SetUUID sets the "uuid" field.

type PetUpsert added in v0.9.0

type PetUpsert struct {
	*sql.UpdateSet
}

PetUpsert is the "OnConflict" setter.

func (*PetUpsert) AddAge added in v0.10.0

func (u *PetUpsert) AddAge(v float64) *PetUpsert

AddAge adds v to the "age" field.

func (*PetUpsert) ClearNickname added in v0.10.0

func (u *PetUpsert) ClearNickname() *PetUpsert

ClearNickname clears the value of the "nickname" field.

func (*PetUpsert) ClearUUID added in v0.9.0

func (u *PetUpsert) ClearUUID() *PetUpsert

ClearUUID clears the value of the "uuid" field.

func (*PetUpsert) SetAge added in v0.9.0

func (u *PetUpsert) SetAge(v float64) *PetUpsert

SetAge sets the "age" field.

func (*PetUpsert) SetName added in v0.9.0

func (u *PetUpsert) SetName(v string) *PetUpsert

SetName sets the "name" field.

func (*PetUpsert) SetNickname added in v0.10.0

func (u *PetUpsert) SetNickname(v string) *PetUpsert

SetNickname sets the "nickname" field.

func (*PetUpsert) SetUUID added in v0.9.0

func (u *PetUpsert) SetUUID(v uuid.UUID) *PetUpsert

SetUUID sets the "uuid" field.

func (*PetUpsert) UpdateAge added in v0.9.0

func (u *PetUpsert) UpdateAge() *PetUpsert

UpdateAge sets the "age" field to the value that was provided on create.

func (*PetUpsert) UpdateName added in v0.9.0

func (u *PetUpsert) UpdateName() *PetUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*PetUpsert) UpdateNickname added in v0.10.0

func (u *PetUpsert) UpdateNickname() *PetUpsert

UpdateNickname sets the "nickname" field to the value that was provided on create.

func (*PetUpsert) UpdateUUID added in v0.9.0

func (u *PetUpsert) UpdateUUID() *PetUpsert

UpdateUUID sets the "uuid" field to the value that was provided on create.

type PetUpsertBulk added in v0.9.0

type PetUpsertBulk struct {
	// contains filtered or unexported fields
}

PetUpsertBulk is the builder for "upsert"-ing a bulk of Pet nodes.

func (*PetUpsertBulk) AddAge added in v0.10.0

func (u *PetUpsertBulk) AddAge(v float64) *PetUpsertBulk

AddAge adds v to the "age" field.

func (*PetUpsertBulk) ClearNickname added in v0.10.0

func (u *PetUpsertBulk) ClearNickname() *PetUpsertBulk

ClearNickname clears the value of the "nickname" field.

func (*PetUpsertBulk) ClearUUID added in v0.9.0

func (u *PetUpsertBulk) ClearUUID() *PetUpsertBulk

ClearUUID clears the value of the "uuid" field.

func (*PetUpsertBulk) DoNothing added in v0.9.0

func (u *PetUpsertBulk) DoNothing() *PetUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PetUpsertBulk) Exec added in v0.9.0

func (u *PetUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PetUpsertBulk) ExecX added in v0.9.0

func (u *PetUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PetUpsertBulk) Ignore added in v0.9.0

func (u *PetUpsertBulk) Ignore() *PetUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Pet.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PetUpsertBulk) SetAge added in v0.9.0

func (u *PetUpsertBulk) SetAge(v float64) *PetUpsertBulk

SetAge sets the "age" field.

func (*PetUpsertBulk) SetName added in v0.9.0

func (u *PetUpsertBulk) SetName(v string) *PetUpsertBulk

SetName sets the "name" field.

func (*PetUpsertBulk) SetNickname added in v0.10.0

func (u *PetUpsertBulk) SetNickname(v string) *PetUpsertBulk

SetNickname sets the "nickname" field.

func (*PetUpsertBulk) SetUUID added in v0.9.0

func (u *PetUpsertBulk) SetUUID(v uuid.UUID) *PetUpsertBulk

SetUUID sets the "uuid" field.

func (*PetUpsertBulk) Update added in v0.9.0

func (u *PetUpsertBulk) Update(set func(*PetUpsert)) *PetUpsertBulk

Update allows overriding fields `UPDATE` values. See the PetCreateBulk.OnConflict documentation for more info.

func (*PetUpsertBulk) UpdateAge added in v0.9.0

func (u *PetUpsertBulk) UpdateAge() *PetUpsertBulk

UpdateAge sets the "age" field to the value that was provided on create.

func (*PetUpsertBulk) UpdateName added in v0.9.0

func (u *PetUpsertBulk) UpdateName() *PetUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*PetUpsertBulk) UpdateNewValues added in v0.9.0

func (u *PetUpsertBulk) UpdateNewValues() *PetUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Pet.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PetUpsertBulk) UpdateNickname added in v0.10.0

func (u *PetUpsertBulk) UpdateNickname() *PetUpsertBulk

UpdateNickname sets the "nickname" field to the value that was provided on create.

func (*PetUpsertBulk) UpdateUUID added in v0.9.0

func (u *PetUpsertBulk) UpdateUUID() *PetUpsertBulk

UpdateUUID sets the "uuid" field to the value that was provided on create.

type PetUpsertOne added in v0.9.0

type PetUpsertOne struct {
	// contains filtered or unexported fields
}

PetUpsertOne is the builder for "upsert"-ing

one Pet node.

func (*PetUpsertOne) AddAge added in v0.10.0

func (u *PetUpsertOne) AddAge(v float64) *PetUpsertOne

AddAge adds v to the "age" field.

func (*PetUpsertOne) ClearNickname added in v0.10.0

func (u *PetUpsertOne) ClearNickname() *PetUpsertOne

ClearNickname clears the value of the "nickname" field.

func (*PetUpsertOne) ClearUUID added in v0.9.0

func (u *PetUpsertOne) ClearUUID() *PetUpsertOne

ClearUUID clears the value of the "uuid" field.

func (*PetUpsertOne) DoNothing added in v0.9.0

func (u *PetUpsertOne) DoNothing() *PetUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PetUpsertOne) Exec added in v0.9.0

func (u *PetUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*PetUpsertOne) ExecX added in v0.9.0

func (u *PetUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PetUpsertOne) ID added in v0.9.0

func (u *PetUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PetUpsertOne) IDX added in v0.9.0

func (u *PetUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*PetUpsertOne) Ignore added in v0.9.0

func (u *PetUpsertOne) Ignore() *PetUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Pet.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PetUpsertOne) SetAge added in v0.9.0

func (u *PetUpsertOne) SetAge(v float64) *PetUpsertOne

SetAge sets the "age" field.

func (*PetUpsertOne) SetName added in v0.9.0

func (u *PetUpsertOne) SetName(v string) *PetUpsertOne

SetName sets the "name" field.

func (*PetUpsertOne) SetNickname added in v0.10.0

func (u *PetUpsertOne) SetNickname(v string) *PetUpsertOne

SetNickname sets the "nickname" field.

func (*PetUpsertOne) SetUUID added in v0.9.0

func (u *PetUpsertOne) SetUUID(v uuid.UUID) *PetUpsertOne

SetUUID sets the "uuid" field.

func (*PetUpsertOne) Update added in v0.9.0

func (u *PetUpsertOne) Update(set func(*PetUpsert)) *PetUpsertOne

Update allows overriding fields `UPDATE` values. See the PetCreate.OnConflict documentation for more info.

func (*PetUpsertOne) UpdateAge added in v0.9.0

func (u *PetUpsertOne) UpdateAge() *PetUpsertOne

UpdateAge sets the "age" field to the value that was provided on create.

func (*PetUpsertOne) UpdateName added in v0.9.0

func (u *PetUpsertOne) UpdateName() *PetUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*PetUpsertOne) UpdateNewValues added in v0.9.0

func (u *PetUpsertOne) UpdateNewValues() *PetUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Pet.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*PetUpsertOne) UpdateNickname added in v0.10.0

func (u *PetUpsertOne) UpdateNickname() *PetUpsertOne

UpdateNickname sets the "nickname" field to the value that was provided on create.

func (*PetUpsertOne) UpdateUUID added in v0.9.0

func (u *PetUpsertOne) UpdateUUID() *PetUpsertOne

UpdateUUID sets the "uuid" field to the value that was provided on create.

type Pets

type Pets []*Pet

Pets is a parsable slice of Pet.

type Policy

type Policy = ent.Policy

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 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 Spec

type Spec struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SpecQuery when eager-loading is set.
	Edges SpecEdges `json:"edges"`
	// contains filtered or unexported fields
}

Spec is the model entity for the Spec schema.

func (*Spec) QueryCard

func (s *Spec) QueryCard() *CardQuery

QueryCard queries the "card" edge of the Spec entity.

func (*Spec) String

func (s *Spec) String() string

String implements the fmt.Stringer.

func (*Spec) Unwrap

func (s *Spec) Unwrap() *Spec

Unwrap unwraps the Spec 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 (*Spec) Update

func (s *Spec) Update() *SpecUpdateOne

Update returns a builder for updating this Spec. Note that you need to call Spec.Unwrap() before calling this method if this Spec was returned from a transaction, and the transaction was committed or rolled back.

type SpecClient

type SpecClient struct {
	// contains filtered or unexported fields
}

SpecClient is a client for the Spec schema.

func NewSpecClient

func NewSpecClient(c config) *SpecClient

NewSpecClient returns a client for the Spec from the given config.

func (*SpecClient) Create

func (c *SpecClient) Create() *SpecCreate

Create returns a create builder for Spec.

func (*SpecClient) CreateBulk

func (c *SpecClient) CreateBulk(builders ...*SpecCreate) *SpecCreateBulk

CreateBulk returns a builder for creating a bulk of Spec entities.

func (*SpecClient) Delete

func (c *SpecClient) Delete() *SpecDelete

Delete returns a delete builder for Spec.

func (*SpecClient) DeleteOne

func (c *SpecClient) DeleteOne(s *Spec) *SpecDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SpecClient) DeleteOneID

func (c *SpecClient) DeleteOneID(id int) *SpecDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SpecClient) Get

func (c *SpecClient) Get(ctx context.Context, id int) (*Spec, error)

Get returns a Spec entity by its id.

func (*SpecClient) GetX

func (c *SpecClient) GetX(ctx context.Context, id int) *Spec

GetX is like Get, but panics if an error occurs.

func (*SpecClient) Hooks

func (c *SpecClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SpecClient) Query

func (c *SpecClient) Query() *SpecQuery

Query returns a query builder for Spec.

func (*SpecClient) QueryCard

func (c *SpecClient) QueryCard(s *Spec) *CardQuery

QueryCard queries the card edge of a Spec.

func (*SpecClient) Update

func (c *SpecClient) Update() *SpecUpdate

Update returns an update builder for Spec.

func (*SpecClient) UpdateOne

func (c *SpecClient) UpdateOne(s *Spec) *SpecUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SpecClient) UpdateOneID

func (c *SpecClient) UpdateOneID(id int) *SpecUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SpecClient) Use

func (c *SpecClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `spec.Hooks(f(g(h())))`.

type SpecCreate

type SpecCreate struct {
	// contains filtered or unexported fields
}

SpecCreate is the builder for creating a Spec entity.

func (*SpecCreate) AddCard

func (sc *SpecCreate) AddCard(c ...*Card) *SpecCreate

AddCard adds the "card" edges to the Card entity.

func (*SpecCreate) AddCardIDs

func (sc *SpecCreate) AddCardIDs(ids ...int) *SpecCreate

AddCardIDs adds the "card" edge to the Card entity by IDs.

func (*SpecCreate) Exec added in v0.9.0

func (sc *SpecCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SpecCreate) ExecX added in v0.9.0

func (sc *SpecCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SpecCreate) Mutation

func (sc *SpecCreate) Mutation() *SpecMutation

Mutation returns the SpecMutation object of the builder.

func (*SpecCreate) OnConflict added in v0.9.0

func (sc *SpecCreate) OnConflict(opts ...sql.ConflictOption) *SpecUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Spec.Create().
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SpecCreate) OnConflictColumns added in v0.9.0

func (sc *SpecCreate) OnConflictColumns(columns ...string) *SpecUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Spec.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SpecCreate) Save

func (sc *SpecCreate) Save(ctx context.Context) (*Spec, error)

Save creates the Spec in the database.

func (*SpecCreate) SaveX

func (sc *SpecCreate) SaveX(ctx context.Context) *Spec

SaveX calls Save and panics if Save returns an error.

type SpecCreateBulk

type SpecCreateBulk struct {
	// contains filtered or unexported fields
}

SpecCreateBulk is the builder for creating many Spec entities in bulk.

func (*SpecCreateBulk) Exec added in v0.9.0

func (scb *SpecCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SpecCreateBulk) ExecX added in v0.9.0

func (scb *SpecCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SpecCreateBulk) OnConflict added in v0.9.0

func (scb *SpecCreateBulk) OnConflict(opts ...sql.ConflictOption) *SpecUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Spec.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*SpecCreateBulk) OnConflictColumns added in v0.9.0

func (scb *SpecCreateBulk) OnConflictColumns(columns ...string) *SpecUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Spec.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SpecCreateBulk) Save

func (scb *SpecCreateBulk) Save(ctx context.Context) ([]*Spec, error)

Save creates the Spec entities in the database.

func (*SpecCreateBulk) SaveX

func (scb *SpecCreateBulk) SaveX(ctx context.Context) []*Spec

SaveX is like Save, but panics if an error occurs.

type SpecDelete

type SpecDelete struct {
	// contains filtered or unexported fields
}

SpecDelete is the builder for deleting a Spec entity.

func (*SpecDelete) Exec

func (sd *SpecDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SpecDelete) ExecX

func (sd *SpecDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SpecDelete) Where

func (sd *SpecDelete) Where(ps ...predicate.Spec) *SpecDelete

Where appends a list predicates to the SpecDelete builder.

type SpecDeleteOne

type SpecDeleteOne struct {
	// contains filtered or unexported fields
}

SpecDeleteOne is the builder for deleting a single Spec entity.

func (*SpecDeleteOne) Exec

func (sdo *SpecDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SpecDeleteOne) ExecX

func (sdo *SpecDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SpecEdges

type SpecEdges struct {
	// Card holds the value of the card edge.
	Card []*Card `json:"card,omitempty"`
	// contains filtered or unexported fields
}

SpecEdges holds the relations/edges for other nodes in the graph.

func (SpecEdges) CardOrErr

func (e SpecEdges) CardOrErr() ([]*Card, error)

CardOrErr returns the Card value or an error if the edge was not loaded in eager-loading.

type SpecFilter

type SpecFilter struct {
	// contains filtered or unexported fields
}

SpecFilter provides a generic filtering capability at runtime for SpecQuery.

func (*SpecFilter) Where

func (f *SpecFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*SpecFilter) WhereHasCard

func (f *SpecFilter) WhereHasCard()

WhereHasCard applies a predicate to check if query has an edge card.

func (*SpecFilter) WhereHasCardWith

func (f *SpecFilter) WhereHasCardWith(preds ...predicate.Card)

WhereHasCardWith applies a predicate to check if query has an edge card with a given conditions (other predicates).

func (*SpecFilter) WhereID

func (f *SpecFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

type SpecGroupBy

type SpecGroupBy struct {
	// contains filtered or unexported fields
}

SpecGroupBy is the group-by builder for Spec entities.

func (*SpecGroupBy) Aggregate

func (sgb *SpecGroupBy) Aggregate(fns ...AggregateFunc) *SpecGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SpecGroupBy) Bool

func (sgb *SpecGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SpecGroupBy) BoolX

func (sgb *SpecGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SpecGroupBy) Bools

func (sgb *SpecGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SpecGroupBy) BoolsX

func (sgb *SpecGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SpecGroupBy) Float64

func (sgb *SpecGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SpecGroupBy) Float64X

func (sgb *SpecGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SpecGroupBy) Float64s

func (sgb *SpecGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SpecGroupBy) Float64sX

func (sgb *SpecGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SpecGroupBy) Int

func (sgb *SpecGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SpecGroupBy) IntX

func (sgb *SpecGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SpecGroupBy) Ints

func (sgb *SpecGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SpecGroupBy) IntsX

func (sgb *SpecGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SpecGroupBy) Scan

func (sgb *SpecGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SpecGroupBy) ScanX

func (sgb *SpecGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SpecGroupBy) String

func (sgb *SpecGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SpecGroupBy) StringX

func (sgb *SpecGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SpecGroupBy) Strings

func (sgb *SpecGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SpecGroupBy) StringsX

func (sgb *SpecGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SpecMutation

type SpecMutation struct {
	// contains filtered or unexported fields
}

SpecMutation represents an operation that mutates the Spec nodes in the graph.

func (*SpecMutation) AddCardIDs

func (m *SpecMutation) AddCardIDs(ids ...int)

AddCardIDs adds the "card" edge to the Card entity by ids.

func (*SpecMutation) AddField

func (m *SpecMutation) 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 (*SpecMutation) AddedEdges

func (m *SpecMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SpecMutation) AddedField

func (m *SpecMutation) 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 (*SpecMutation) AddedFields

func (m *SpecMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SpecMutation) AddedIDs

func (m *SpecMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SpecMutation) CardCleared

func (m *SpecMutation) CardCleared() bool

CardCleared reports if the "card" edge to the Card entity was cleared.

func (*SpecMutation) CardIDs

func (m *SpecMutation) CardIDs() (ids []int)

CardIDs returns the "card" edge IDs in the mutation.

func (*SpecMutation) ClearCard

func (m *SpecMutation) ClearCard()

ClearCard clears the "card" edge to the Card entity.

func (*SpecMutation) ClearEdge

func (m *SpecMutation) 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 (*SpecMutation) ClearField

func (m *SpecMutation) 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 (*SpecMutation) ClearedEdges

func (m *SpecMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SpecMutation) ClearedFields

func (m *SpecMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SpecMutation) Client

func (m SpecMutation) 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 (*SpecMutation) EdgeCleared

func (m *SpecMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SpecMutation) Field

func (m *SpecMutation) 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 (*SpecMutation) FieldCleared

func (m *SpecMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SpecMutation) Fields

func (m *SpecMutation) 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 (*SpecMutation) Filter

func (m *SpecMutation) Filter() *SpecFilter

Filter returns an entql.Where implementation to apply filters on the SpecMutation builder.

func (*SpecMutation) ID

func (m *SpecMutation) 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 (*SpecMutation) IDs added in v0.10.0

func (m *SpecMutation) 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 (*SpecMutation) OldField

func (m *SpecMutation) 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 (*SpecMutation) Op

func (m *SpecMutation) Op() Op

Op returns the operation name.

func (*SpecMutation) RemoveCardIDs

func (m *SpecMutation) RemoveCardIDs(ids ...int)

RemoveCardIDs removes the "card" edge to the Card entity by IDs.

func (*SpecMutation) RemovedCardIDs

func (m *SpecMutation) RemovedCardIDs() (ids []int)

RemovedCard returns the removed IDs of the "card" edge to the Card entity.

func (*SpecMutation) RemovedEdges

func (m *SpecMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SpecMutation) RemovedIDs

func (m *SpecMutation) 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 (*SpecMutation) ResetCard

func (m *SpecMutation) ResetCard()

ResetCard resets all changes to the "card" edge.

func (*SpecMutation) ResetEdge

func (m *SpecMutation) 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 (*SpecMutation) ResetField

func (m *SpecMutation) 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 (*SpecMutation) SetField

func (m *SpecMutation) 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 (SpecMutation) Tx

func (m SpecMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SpecMutation) Type

func (m *SpecMutation) Type() string

Type returns the node type of this mutation (Spec).

func (*SpecMutation) Where added in v0.9.0

func (m *SpecMutation) Where(ps ...predicate.Spec)

Where appends a list predicates to the SpecMutation builder.

type SpecQuery

type SpecQuery struct {
	// contains filtered or unexported fields
}

SpecQuery is the builder for querying Spec entities.

func (*SpecQuery) All

func (sq *SpecQuery) All(ctx context.Context) ([]*Spec, error)

All executes the query and returns a list of Specs.

func (*SpecQuery) AllX

func (sq *SpecQuery) AllX(ctx context.Context) []*Spec

AllX is like All, but panics if an error occurs.

func (*SpecQuery) Clone

func (sq *SpecQuery) Clone() *SpecQuery

Clone returns a duplicate of the SpecQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SpecQuery) Count

func (sq *SpecQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SpecQuery) CountX

func (sq *SpecQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SpecQuery) Exist

func (sq *SpecQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SpecQuery) ExistX

func (sq *SpecQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SpecQuery) Filter

func (sq *SpecQuery) Filter() *SpecFilter

Filter returns a Filter implementation to apply filters on the SpecQuery builder.

func (*SpecQuery) First

func (sq *SpecQuery) First(ctx context.Context) (*Spec, error)

First returns the first Spec entity from the query. Returns a *NotFoundError when no Spec was found.

func (*SpecQuery) FirstID

func (sq *SpecQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Spec ID from the query. Returns a *NotFoundError when no Spec ID was found.

func (*SpecQuery) FirstIDX

func (sq *SpecQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SpecQuery) FirstX

func (sq *SpecQuery) FirstX(ctx context.Context) *Spec

FirstX is like First, but panics if an error occurs.

func (*SpecQuery) ForShare added in v0.9.0

func (sq *SpecQuery) ForShare(opts ...sql.LockOption) *SpecQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*SpecQuery) ForUpdate added in v0.9.0

func (sq *SpecQuery) ForUpdate(opts ...sql.LockOption) *SpecQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*SpecQuery) GroupBy

func (sq *SpecQuery) GroupBy(field string, fields ...string) *SpecGroupBy

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.

func (*SpecQuery) IDs

func (sq *SpecQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Spec IDs.

func (*SpecQuery) IDsX

func (sq *SpecQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SpecQuery) Limit

func (sq *SpecQuery) Limit(limit int) *SpecQuery

Limit adds a limit step to the query.

func (*SpecQuery) Modify added in v0.9.0

func (sq *SpecQuery) Modify(modifiers ...func(s *sql.Selector)) *SpecSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*SpecQuery) Offset

func (sq *SpecQuery) Offset(offset int) *SpecQuery

Offset adds an offset step to the query.

func (*SpecQuery) Only

func (sq *SpecQuery) Only(ctx context.Context) (*Spec, error)

Only returns a single Spec entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Spec entity is not found. Returns a *NotFoundError when no Spec entities are found.

func (*SpecQuery) OnlyID

func (sq *SpecQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Spec ID in the query. Returns a *NotSingularError when exactly one Spec ID is not found. Returns a *NotFoundError when no entities are found.

func (*SpecQuery) OnlyIDX

func (sq *SpecQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SpecQuery) OnlyX

func (sq *SpecQuery) OnlyX(ctx context.Context) *Spec

OnlyX is like Only, but panics if an error occurs.

func (*SpecQuery) Order

func (sq *SpecQuery) Order(o ...OrderFunc) *SpecQuery

Order adds an order step to the query.

func (*SpecQuery) QueryCard

func (sq *SpecQuery) QueryCard() *CardQuery

QueryCard chains the current query on the "card" edge.

func (*SpecQuery) Select

func (sq *SpecQuery) Select(fields ...string) *SpecSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*SpecQuery) Unique added in v0.8.0

func (sq *SpecQuery) Unique(unique bool) *SpecQuery

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 (*SpecQuery) Where

func (sq *SpecQuery) Where(ps ...predicate.Spec) *SpecQuery

Where adds a new predicate for the SpecQuery builder.

func (*SpecQuery) WithCard

func (sq *SpecQuery) WithCard(opts ...func(*CardQuery)) *SpecQuery

WithCard tells the query-builder to eager-load the nodes that are connected to the "card" edge. The optional arguments are used to configure the query builder of the edge.

type SpecSelect

type SpecSelect struct {
	*SpecQuery
	// contains filtered or unexported fields
}

SpecSelect is the builder for selecting fields of Spec entities.

func (*SpecSelect) Bool

func (ss *SpecSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SpecSelect) BoolX

func (ss *SpecSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SpecSelect) Bools

func (ss *SpecSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SpecSelect) BoolsX

func (ss *SpecSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SpecSelect) Float64

func (ss *SpecSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SpecSelect) Float64X

func (ss *SpecSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SpecSelect) Float64s

func (ss *SpecSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SpecSelect) Float64sX

func (ss *SpecSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SpecSelect) Int

func (ss *SpecSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SpecSelect) IntX

func (ss *SpecSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SpecSelect) Ints

func (ss *SpecSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SpecSelect) IntsX

func (ss *SpecSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SpecSelect) Modify added in v0.9.0

func (ss *SpecSelect) Modify(modifiers ...func(s *sql.Selector)) *SpecSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*SpecSelect) Scan

func (ss *SpecSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*SpecSelect) ScanX

func (ss *SpecSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SpecSelect) String

func (ss *SpecSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SpecSelect) StringX

func (ss *SpecSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SpecSelect) Strings

func (ss *SpecSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SpecSelect) StringsX

func (ss *SpecSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SpecUpdate

type SpecUpdate struct {
	// contains filtered or unexported fields
}

SpecUpdate is the builder for updating Spec entities.

func (*SpecUpdate) AddCard

func (su *SpecUpdate) AddCard(c ...*Card) *SpecUpdate

AddCard adds the "card" edges to the Card entity.

func (*SpecUpdate) AddCardIDs

func (su *SpecUpdate) AddCardIDs(ids ...int) *SpecUpdate

AddCardIDs adds the "card" edge to the Card entity by IDs.

func (*SpecUpdate) ClearCard

func (su *SpecUpdate) ClearCard() *SpecUpdate

ClearCard clears all "card" edges to the Card entity.

func (*SpecUpdate) Exec

func (su *SpecUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SpecUpdate) ExecX

func (su *SpecUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SpecUpdate) Mutation

func (su *SpecUpdate) Mutation() *SpecMutation

Mutation returns the SpecMutation object of the builder.

func (*SpecUpdate) RemoveCard

func (su *SpecUpdate) RemoveCard(c ...*Card) *SpecUpdate

RemoveCard removes "card" edges to Card entities.

func (*SpecUpdate) RemoveCardIDs

func (su *SpecUpdate) RemoveCardIDs(ids ...int) *SpecUpdate

RemoveCardIDs removes the "card" edge to Card entities by IDs.

func (*SpecUpdate) Save

func (su *SpecUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SpecUpdate) SaveX

func (su *SpecUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SpecUpdate) Where

func (su *SpecUpdate) Where(ps ...predicate.Spec) *SpecUpdate

Where appends a list predicates to the SpecUpdate builder.

type SpecUpdateOne

type SpecUpdateOne struct {
	// contains filtered or unexported fields
}

SpecUpdateOne is the builder for updating a single Spec entity.

func (*SpecUpdateOne) AddCard

func (suo *SpecUpdateOne) AddCard(c ...*Card) *SpecUpdateOne

AddCard adds the "card" edges to the Card entity.

func (*SpecUpdateOne) AddCardIDs

func (suo *SpecUpdateOne) AddCardIDs(ids ...int) *SpecUpdateOne

AddCardIDs adds the "card" edge to the Card entity by IDs.

func (*SpecUpdateOne) ClearCard

func (suo *SpecUpdateOne) ClearCard() *SpecUpdateOne

ClearCard clears all "card" edges to the Card entity.

func (*SpecUpdateOne) Exec

func (suo *SpecUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SpecUpdateOne) ExecX

func (suo *SpecUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SpecUpdateOne) Mutation

func (suo *SpecUpdateOne) Mutation() *SpecMutation

Mutation returns the SpecMutation object of the builder.

func (*SpecUpdateOne) RemoveCard

func (suo *SpecUpdateOne) RemoveCard(c ...*Card) *SpecUpdateOne

RemoveCard removes "card" edges to Card entities.

func (*SpecUpdateOne) RemoveCardIDs

func (suo *SpecUpdateOne) RemoveCardIDs(ids ...int) *SpecUpdateOne

RemoveCardIDs removes the "card" edge to Card entities by IDs.

func (*SpecUpdateOne) Save

func (suo *SpecUpdateOne) Save(ctx context.Context) (*Spec, error)

Save executes the query and returns the updated Spec entity.

func (*SpecUpdateOne) SaveX

func (suo *SpecUpdateOne) SaveX(ctx context.Context) *Spec

SaveX is like Save, but panics if an error occurs.

func (*SpecUpdateOne) Select added in v0.8.0

func (suo *SpecUpdateOne) Select(field string, fields ...string) *SpecUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

type SpecUpsert added in v0.9.0

type SpecUpsert struct {
	*sql.UpdateSet
}

SpecUpsert is the "OnConflict" setter.

type SpecUpsertBulk added in v0.9.0

type SpecUpsertBulk struct {
	// contains filtered or unexported fields
}

SpecUpsertBulk is the builder for "upsert"-ing a bulk of Spec nodes.

func (*SpecUpsertBulk) DoNothing added in v0.9.0

func (u *SpecUpsertBulk) DoNothing() *SpecUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SpecUpsertBulk) Exec added in v0.9.0

func (u *SpecUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SpecUpsertBulk) ExecX added in v0.9.0

func (u *SpecUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SpecUpsertBulk) Ignore added in v0.9.0

func (u *SpecUpsertBulk) Ignore() *SpecUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Spec.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SpecUpsertBulk) Update added in v0.9.0

func (u *SpecUpsertBulk) Update(set func(*SpecUpsert)) *SpecUpsertBulk

Update allows overriding fields `UPDATE` values. See the SpecCreateBulk.OnConflict documentation for more info.

func (*SpecUpsertBulk) UpdateNewValues added in v0.9.0

func (u *SpecUpsertBulk) UpdateNewValues() *SpecUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Spec.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type SpecUpsertOne added in v0.9.0

type SpecUpsertOne struct {
	// contains filtered or unexported fields
}

SpecUpsertOne is the builder for "upsert"-ing

one Spec node.

func (*SpecUpsertOne) DoNothing added in v0.9.0

func (u *SpecUpsertOne) DoNothing() *SpecUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SpecUpsertOne) Exec added in v0.9.0

func (u *SpecUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SpecUpsertOne) ExecX added in v0.9.0

func (u *SpecUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SpecUpsertOne) ID added in v0.9.0

func (u *SpecUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SpecUpsertOne) IDX added in v0.9.0

func (u *SpecUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*SpecUpsertOne) Ignore added in v0.9.0

func (u *SpecUpsertOne) Ignore() *SpecUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Spec.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SpecUpsertOne) Update added in v0.9.0

func (u *SpecUpsertOne) Update(set func(*SpecUpsert)) *SpecUpsertOne

Update allows overriding fields `UPDATE` values. See the SpecCreate.OnConflict documentation for more info.

func (*SpecUpsertOne) UpdateNewValues added in v0.9.0

func (u *SpecUpsertOne) UpdateNewValues() *SpecUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Spec.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

type Specs

type Specs []*Spec

Specs is a parsable slice of Spec.

type Task

type Task struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Priority holds the value of the "priority" field.
	Priority schema.Priority `json:"priority,omitempty"`
	// contains filtered or unexported fields
}

Task is the model entity for the Task schema.

func (*Task) String

func (t *Task) String() string

String implements the fmt.Stringer.

func (*Task) Unwrap

func (t *Task) Unwrap() *Task

Unwrap unwraps the Task 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 (*Task) Update

func (t *Task) Update() *TaskUpdateOne

Update returns a builder for updating this Task. Note that you need to call Task.Unwrap() before calling this method if this Task was returned from a transaction, and the transaction was committed or rolled back.

type TaskClient

type TaskClient struct {
	// contains filtered or unexported fields
}

TaskClient is a client for the Task schema.

func NewTaskClient

func NewTaskClient(c config) *TaskClient

NewTaskClient returns a client for the Task from the given config.

func (*TaskClient) Create

func (c *TaskClient) Create() *TaskCreate

Create returns a create builder for Task.

func (*TaskClient) CreateBulk

func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk

CreateBulk returns a builder for creating a bulk of Task entities.

func (*TaskClient) Delete

func (c *TaskClient) Delete() *TaskDelete

Delete returns a delete builder for Task.

func (*TaskClient) DeleteOne

func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*TaskClient) DeleteOneID

func (c *TaskClient) DeleteOneID(id int) *TaskDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*TaskClient) Get

func (c *TaskClient) Get(ctx context.Context, id int) (*Task, error)

Get returns a Task entity by its id.

func (*TaskClient) GetX

func (c *TaskClient) GetX(ctx context.Context, id int) *Task

GetX is like Get, but panics if an error occurs.

func (*TaskClient) Hooks

func (c *TaskClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TaskClient) Query

func (c *TaskClient) Query() *TaskQuery

Query returns a query builder for Task.

func (*TaskClient) Update

func (c *TaskClient) Update() *TaskUpdate

Update returns an update builder for Task.

func (*TaskClient) UpdateOne

func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TaskClient) UpdateOneID

func (c *TaskClient) UpdateOneID(id int) *TaskUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TaskClient) Use

func (c *TaskClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `task.Hooks(f(g(h())))`.

type TaskCreate

type TaskCreate struct {
	// contains filtered or unexported fields
}

TaskCreate is the builder for creating a Task entity.

func (*TaskCreate) Exec added in v0.9.0

func (tc *TaskCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskCreate) ExecX added in v0.9.0

func (tc *TaskCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskCreate) Mutation

func (tc *TaskCreate) Mutation() *TaskMutation

Mutation returns the TaskMutation object of the builder.

func (*TaskCreate) OnConflict added in v0.9.0

func (tc *TaskCreate) OnConflict(opts ...sql.ConflictOption) *TaskUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Task.Create().
	SetPriority(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.TaskUpsert) {
		SetPriority(v+v).
	}).
	Exec(ctx)

func (*TaskCreate) OnConflictColumns added in v0.9.0

func (tc *TaskCreate) OnConflictColumns(columns ...string) *TaskUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Task.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TaskCreate) Save

func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)

Save creates the Task in the database.

func (*TaskCreate) SaveX

func (tc *TaskCreate) SaveX(ctx context.Context) *Task

SaveX calls Save and panics if Save returns an error.

func (*TaskCreate) SetNillablePriority

func (tc *TaskCreate) SetNillablePriority(s *schema.Priority) *TaskCreate

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*TaskCreate) SetPriority

func (tc *TaskCreate) SetPriority(s schema.Priority) *TaskCreate

SetPriority sets the "priority" field.

type TaskCreateBulk

type TaskCreateBulk struct {
	// contains filtered or unexported fields
}

TaskCreateBulk is the builder for creating many Task entities in bulk.

func (*TaskCreateBulk) Exec added in v0.9.0

func (tcb *TaskCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskCreateBulk) ExecX added in v0.9.0

func (tcb *TaskCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskCreateBulk) OnConflict added in v0.9.0

func (tcb *TaskCreateBulk) OnConflict(opts ...sql.ConflictOption) *TaskUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Task.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.TaskUpsert) {
		SetPriority(v+v).
	}).
	Exec(ctx)

func (*TaskCreateBulk) OnConflictColumns added in v0.9.0

func (tcb *TaskCreateBulk) OnConflictColumns(columns ...string) *TaskUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Task.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TaskCreateBulk) Save

func (tcb *TaskCreateBulk) Save(ctx context.Context) ([]*Task, error)

Save creates the Task entities in the database.

func (*TaskCreateBulk) SaveX

func (tcb *TaskCreateBulk) SaveX(ctx context.Context) []*Task

SaveX is like Save, but panics if an error occurs.

type TaskDelete

type TaskDelete struct {
	// contains filtered or unexported fields
}

TaskDelete is the builder for deleting a Task entity.

func (*TaskDelete) Exec

func (td *TaskDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TaskDelete) ExecX

func (td *TaskDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TaskDelete) Where

func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete

Where appends a list predicates to the TaskDelete builder.

type TaskDeleteOne

type TaskDeleteOne struct {
	// contains filtered or unexported fields
}

TaskDeleteOne is the builder for deleting a single Task entity.

func (*TaskDeleteOne) Exec

func (tdo *TaskDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TaskDeleteOne) ExecX

func (tdo *TaskDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TaskFilter

type TaskFilter struct {
	// contains filtered or unexported fields
}

TaskFilter provides a generic filtering capability at runtime for TaskQuery.

func (*TaskFilter) Where

func (f *TaskFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*TaskFilter) WhereID

func (f *TaskFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*TaskFilter) WherePriority

func (f *TaskFilter) WherePriority(p entql.IntP)

WherePriority applies the entql int predicate on the priority field.

type TaskGroupBy

type TaskGroupBy struct {
	// contains filtered or unexported fields
}

TaskGroupBy is the group-by builder for Task entities.

func (*TaskGroupBy) Aggregate

func (tgb *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TaskGroupBy) Bool

func (tgb *TaskGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*TaskGroupBy) BoolX

func (tgb *TaskGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TaskGroupBy) Bools

func (tgb *TaskGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*TaskGroupBy) BoolsX

func (tgb *TaskGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TaskGroupBy) Float64

func (tgb *TaskGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*TaskGroupBy) Float64X

func (tgb *TaskGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TaskGroupBy) Float64s

func (tgb *TaskGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*TaskGroupBy) Float64sX

func (tgb *TaskGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TaskGroupBy) Int

func (tgb *TaskGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*TaskGroupBy) IntX

func (tgb *TaskGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TaskGroupBy) Ints

func (tgb *TaskGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*TaskGroupBy) IntsX

func (tgb *TaskGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TaskGroupBy) Scan

func (tgb *TaskGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*TaskGroupBy) ScanX

func (tgb *TaskGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TaskGroupBy) String

func (tgb *TaskGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*TaskGroupBy) StringX

func (tgb *TaskGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TaskGroupBy) Strings

func (tgb *TaskGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*TaskGroupBy) StringsX

func (tgb *TaskGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TaskMutation

type TaskMutation struct {
	// contains filtered or unexported fields
}

TaskMutation represents an operation that mutates the Task nodes in the graph.

func (*TaskMutation) AddField

func (m *TaskMutation) 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 (*TaskMutation) AddPriority

func (m *TaskMutation) AddPriority(s schema.Priority)

AddPriority adds s to the "priority" field.

func (*TaskMutation) AddedEdges

func (m *TaskMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TaskMutation) AddedField

func (m *TaskMutation) 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 (*TaskMutation) AddedFields

func (m *TaskMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TaskMutation) AddedIDs

func (m *TaskMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TaskMutation) AddedPriority

func (m *TaskMutation) AddedPriority() (r schema.Priority, exists bool)

AddedPriority returns the value that was added to the "priority" field in this mutation.

func (*TaskMutation) ClearEdge

func (m *TaskMutation) 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 (*TaskMutation) ClearField

func (m *TaskMutation) 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 (*TaskMutation) ClearedEdges

func (m *TaskMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TaskMutation) ClearedFields

func (m *TaskMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TaskMutation) Client

func (m TaskMutation) 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 (*TaskMutation) EdgeCleared

func (m *TaskMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TaskMutation) Field

func (m *TaskMutation) 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 (*TaskMutation) FieldCleared

func (m *TaskMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TaskMutation) Fields

func (m *TaskMutation) 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 (*TaskMutation) Filter

func (m *TaskMutation) Filter() *TaskFilter

Filter returns an entql.Where implementation to apply filters on the TaskMutation builder.

func (*TaskMutation) ID

func (m *TaskMutation) 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 (*TaskMutation) IDs added in v0.10.0

func (m *TaskMutation) 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 (*TaskMutation) OldField

func (m *TaskMutation) 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 (*TaskMutation) OldPriority

func (m *TaskMutation) OldPriority(ctx context.Context) (v schema.Priority, err error)

OldPriority returns the old "priority" field's value of the Task entity. If the Task 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 (*TaskMutation) Op

func (m *TaskMutation) Op() Op

Op returns the operation name.

func (*TaskMutation) Priority

func (m *TaskMutation) Priority() (r schema.Priority, exists bool)

Priority returns the value of the "priority" field in the mutation.

func (*TaskMutation) RemovedEdges

func (m *TaskMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TaskMutation) RemovedIDs

func (m *TaskMutation) 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 (*TaskMutation) ResetEdge

func (m *TaskMutation) 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 (*TaskMutation) ResetField

func (m *TaskMutation) 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 (*TaskMutation) ResetPriority

func (m *TaskMutation) ResetPriority()

ResetPriority resets all changes to the "priority" field.

func (*TaskMutation) SetField

func (m *TaskMutation) 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 (*TaskMutation) SetPriority

func (m *TaskMutation) SetPriority(s schema.Priority)

SetPriority sets the "priority" field.

func (TaskMutation) Tx

func (m TaskMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TaskMutation) Type

func (m *TaskMutation) Type() string

Type returns the node type of this mutation (Task).

func (*TaskMutation) Where added in v0.9.0

func (m *TaskMutation) Where(ps ...predicate.Task)

Where appends a list predicates to the TaskMutation builder.

type TaskQuery

type TaskQuery struct {
	// contains filtered or unexported fields
}

TaskQuery is the builder for querying Task entities.

func (*TaskQuery) All

func (tq *TaskQuery) All(ctx context.Context) ([]*Task, error)

All executes the query and returns a list of Tasks.

func (*TaskQuery) AllX

func (tq *TaskQuery) AllX(ctx context.Context) []*Task

AllX is like All, but panics if an error occurs.

func (*TaskQuery) Clone

func (tq *TaskQuery) Clone() *TaskQuery

Clone returns a duplicate of the TaskQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TaskQuery) Count

func (tq *TaskQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TaskQuery) CountX

func (tq *TaskQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TaskQuery) Exist

func (tq *TaskQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TaskQuery) ExistX

func (tq *TaskQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TaskQuery) Filter

func (tq *TaskQuery) Filter() *TaskFilter

Filter returns a Filter implementation to apply filters on the TaskQuery builder.

func (*TaskQuery) First

func (tq *TaskQuery) First(ctx context.Context) (*Task, error)

First returns the first Task entity from the query. Returns a *NotFoundError when no Task was found.

func (*TaskQuery) FirstID

func (tq *TaskQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Task ID from the query. Returns a *NotFoundError when no Task ID was found.

func (*TaskQuery) FirstIDX

func (tq *TaskQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*TaskQuery) FirstX

func (tq *TaskQuery) FirstX(ctx context.Context) *Task

FirstX is like First, but panics if an error occurs.

func (*TaskQuery) ForShare added in v0.9.0

func (tq *TaskQuery) ForShare(opts ...sql.LockOption) *TaskQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*TaskQuery) ForUpdate added in v0.9.0

func (tq *TaskQuery) ForUpdate(opts ...sql.LockOption) *TaskQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*TaskQuery) GroupBy

func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy

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 {
	Priority schema.Priority `json:"priority,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Task.Query().
	GroupBy(task.FieldPriority).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TaskQuery) IDs

func (tq *TaskQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Task IDs.

func (*TaskQuery) IDsX

func (tq *TaskQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*TaskQuery) Limit

func (tq *TaskQuery) Limit(limit int) *TaskQuery

Limit adds a limit step to the query.

func (*TaskQuery) Modify added in v0.9.0

func (tq *TaskQuery) Modify(modifiers ...func(s *sql.Selector)) *TaskSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TaskQuery) Offset

func (tq *TaskQuery) Offset(offset int) *TaskQuery

Offset adds an offset step to the query.

func (*TaskQuery) Only

func (tq *TaskQuery) Only(ctx context.Context) (*Task, error)

Only returns a single Task entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Task entity is not found. Returns a *NotFoundError when no Task entities are found.

func (*TaskQuery) OnlyID

func (tq *TaskQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Task ID in the query. Returns a *NotSingularError when exactly one Task ID is not found. Returns a *NotFoundError when no entities are found.

func (*TaskQuery) OnlyIDX

func (tq *TaskQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TaskQuery) OnlyX

func (tq *TaskQuery) OnlyX(ctx context.Context) *Task

OnlyX is like Only, but panics if an error occurs.

func (*TaskQuery) Order

func (tq *TaskQuery) Order(o ...OrderFunc) *TaskQuery

Order adds an order step to the query.

func (*TaskQuery) Select

func (tq *TaskQuery) Select(fields ...string) *TaskSelect

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 {
	Priority schema.Priority `json:"priority,omitempty"`
}

client.Task.Query().
	Select(task.FieldPriority).
	Scan(ctx, &v)

func (*TaskQuery) Unique added in v0.8.0

func (tq *TaskQuery) Unique(unique bool) *TaskQuery

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 (*TaskQuery) Where

func (tq *TaskQuery) Where(ps ...predicate.Task) *TaskQuery

Where adds a new predicate for the TaskQuery builder.

type TaskSelect

type TaskSelect struct {
	*TaskQuery
	// contains filtered or unexported fields
}

TaskSelect is the builder for selecting fields of Task entities.

func (*TaskSelect) Bool

func (ts *TaskSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TaskSelect) BoolX

func (ts *TaskSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TaskSelect) Bools

func (ts *TaskSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TaskSelect) BoolsX

func (ts *TaskSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TaskSelect) Float64

func (ts *TaskSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TaskSelect) Float64X

func (ts *TaskSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TaskSelect) Float64s

func (ts *TaskSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TaskSelect) Float64sX

func (ts *TaskSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TaskSelect) Int

func (ts *TaskSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TaskSelect) IntX

func (ts *TaskSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TaskSelect) Ints

func (ts *TaskSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TaskSelect) IntsX

func (ts *TaskSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TaskSelect) Modify added in v0.9.0

func (ts *TaskSelect) Modify(modifiers ...func(s *sql.Selector)) *TaskSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TaskSelect) Scan

func (ts *TaskSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*TaskSelect) ScanX

func (ts *TaskSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*TaskSelect) String

func (ts *TaskSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TaskSelect) StringX

func (ts *TaskSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TaskSelect) Strings

func (ts *TaskSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TaskSelect) StringsX

func (ts *TaskSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TaskUpdate

type TaskUpdate struct {
	// contains filtered or unexported fields
}

TaskUpdate is the builder for updating Task entities.

func (*TaskUpdate) AddPriority

func (tu *TaskUpdate) AddPriority(s schema.Priority) *TaskUpdate

AddPriority adds s to the "priority" field.

func (*TaskUpdate) Exec

func (tu *TaskUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskUpdate) ExecX

func (tu *TaskUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskUpdate) Mutation

func (tu *TaskUpdate) Mutation() *TaskMutation

Mutation returns the TaskMutation object of the builder.

func (*TaskUpdate) Save

func (tu *TaskUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TaskUpdate) SaveX

func (tu *TaskUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TaskUpdate) SetNillablePriority

func (tu *TaskUpdate) SetNillablePriority(s *schema.Priority) *TaskUpdate

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*TaskUpdate) SetPriority

func (tu *TaskUpdate) SetPriority(s schema.Priority) *TaskUpdate

SetPriority sets the "priority" field.

func (*TaskUpdate) Where

func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate

Where appends a list predicates to the TaskUpdate builder.

type TaskUpdateOne

type TaskUpdateOne struct {
	// contains filtered or unexported fields
}

TaskUpdateOne is the builder for updating a single Task entity.

func (*TaskUpdateOne) AddPriority

func (tuo *TaskUpdateOne) AddPriority(s schema.Priority) *TaskUpdateOne

AddPriority adds s to the "priority" field.

func (*TaskUpdateOne) Exec

func (tuo *TaskUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TaskUpdateOne) ExecX

func (tuo *TaskUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskUpdateOne) Mutation

func (tuo *TaskUpdateOne) Mutation() *TaskMutation

Mutation returns the TaskMutation object of the builder.

func (*TaskUpdateOne) Save

func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)

Save executes the query and returns the updated Task entity.

func (*TaskUpdateOne) SaveX

func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task

SaveX is like Save, but panics if an error occurs.

func (*TaskUpdateOne) Select added in v0.8.0

func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TaskUpdateOne) SetNillablePriority

func (tuo *TaskUpdateOne) SetNillablePriority(s *schema.Priority) *TaskUpdateOne

SetNillablePriority sets the "priority" field if the given value is not nil.

func (*TaskUpdateOne) SetPriority

func (tuo *TaskUpdateOne) SetPriority(s schema.Priority) *TaskUpdateOne

SetPriority sets the "priority" field.

type TaskUpsert added in v0.9.0

type TaskUpsert struct {
	*sql.UpdateSet
}

TaskUpsert is the "OnConflict" setter.

func (*TaskUpsert) AddPriority added in v0.10.0

func (u *TaskUpsert) AddPriority(v schema.Priority) *TaskUpsert

AddPriority adds v to the "priority" field.

func (*TaskUpsert) SetPriority added in v0.9.0

func (u *TaskUpsert) SetPriority(v schema.Priority) *TaskUpsert

SetPriority sets the "priority" field.

func (*TaskUpsert) UpdatePriority added in v0.9.0

func (u *TaskUpsert) UpdatePriority() *TaskUpsert

UpdatePriority sets the "priority" field to the value that was provided on create.

type TaskUpsertBulk added in v0.9.0

type TaskUpsertBulk struct {
	// contains filtered or unexported fields
}

TaskUpsertBulk is the builder for "upsert"-ing a bulk of Task nodes.

func (*TaskUpsertBulk) AddPriority added in v0.10.0

func (u *TaskUpsertBulk) AddPriority(v schema.Priority) *TaskUpsertBulk

AddPriority adds v to the "priority" field.

func (*TaskUpsertBulk) DoNothing added in v0.9.0

func (u *TaskUpsertBulk) DoNothing() *TaskUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TaskUpsertBulk) Exec added in v0.9.0

func (u *TaskUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskUpsertBulk) ExecX added in v0.9.0

func (u *TaskUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskUpsertBulk) Ignore added in v0.9.0

func (u *TaskUpsertBulk) Ignore() *TaskUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Task.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TaskUpsertBulk) SetPriority added in v0.9.0

func (u *TaskUpsertBulk) SetPriority(v schema.Priority) *TaskUpsertBulk

SetPriority sets the "priority" field.

func (*TaskUpsertBulk) Update added in v0.9.0

func (u *TaskUpsertBulk) Update(set func(*TaskUpsert)) *TaskUpsertBulk

Update allows overriding fields `UPDATE` values. See the TaskCreateBulk.OnConflict documentation for more info.

func (*TaskUpsertBulk) UpdateNewValues added in v0.9.0

func (u *TaskUpsertBulk) UpdateNewValues() *TaskUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Task.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*TaskUpsertBulk) UpdatePriority added in v0.9.0

func (u *TaskUpsertBulk) UpdatePriority() *TaskUpsertBulk

UpdatePriority sets the "priority" field to the value that was provided on create.

type TaskUpsertOne added in v0.9.0

type TaskUpsertOne struct {
	// contains filtered or unexported fields
}

TaskUpsertOne is the builder for "upsert"-ing

one Task node.

func (*TaskUpsertOne) AddPriority added in v0.10.0

func (u *TaskUpsertOne) AddPriority(v schema.Priority) *TaskUpsertOne

AddPriority adds v to the "priority" field.

func (*TaskUpsertOne) DoNothing added in v0.9.0

func (u *TaskUpsertOne) DoNothing() *TaskUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TaskUpsertOne) Exec added in v0.9.0

func (u *TaskUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*TaskUpsertOne) ExecX added in v0.9.0

func (u *TaskUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TaskUpsertOne) ID added in v0.9.0

func (u *TaskUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TaskUpsertOne) IDX added in v0.9.0

func (u *TaskUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*TaskUpsertOne) Ignore added in v0.9.0

func (u *TaskUpsertOne) Ignore() *TaskUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Task.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TaskUpsertOne) SetPriority added in v0.9.0

func (u *TaskUpsertOne) SetPriority(v schema.Priority) *TaskUpsertOne

SetPriority sets the "priority" field.

func (*TaskUpsertOne) Update added in v0.9.0

func (u *TaskUpsertOne) Update(set func(*TaskUpsert)) *TaskUpsertOne

Update allows overriding fields `UPDATE` values. See the TaskCreate.OnConflict documentation for more info.

func (*TaskUpsertOne) UpdateNewValues added in v0.9.0

func (u *TaskUpsertOne) UpdateNewValues() *TaskUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Task.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*TaskUpsertOne) UpdatePriority added in v0.9.0

func (u *TaskUpsertOne) UpdatePriority() *TaskUpsertOne

UpdatePriority sets the "priority" field to the value that was provided on create.

type Tasks

type Tasks []*Task

Tasks is a parsable slice of Task.

type Tx

type Tx struct {

	// Card is the client for interacting with the Card builders.
	Card *CardClient
	// Comment is the client for interacting with the Comment builders.
	Comment *CommentClient
	// FieldType is the client for interacting with the FieldType builders.
	FieldType *FieldTypeClient
	// File is the client for interacting with the File builders.
	File *FileClient
	// FileType is the client for interacting with the FileType builders.
	FileType *FileTypeClient
	// Goods is the client for interacting with the Goods builders.
	Goods *GoodsClient
	// Group is the client for interacting with the Group builders.
	Group *GroupClient
	// GroupInfo is the client for interacting with the GroupInfo builders.
	GroupInfo *GroupInfoClient
	// Item is the client for interacting with the Item builders.
	Item *ItemClient
	// Node is the client for interacting with the Node builders.
	Node *NodeClient
	// Pet is the client for interacting with the Pet builders.
	Pet *PetClient
	// Spec is the client for interacting with the Spec builders.
	Spec *SpecClient
	// Task is the client for interacting with the Task builders.
	Task *TaskClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

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"`
	// OptionalInt holds the value of the "optional_int" field.
	OptionalInt int `json:"optional_int,omitempty"`
	// Age holds the value of the "age" field.
	Age int `json:"age,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"first_name" graphql:"first_name"`
	// Last holds the value of the "last" field.
	Last string `json:"last,omitempty" graphql:"last_name"`
	// Nickname holds the value of the "nickname" field.
	Nickname string `json:"nickname,omitempty"`
	// Address holds the value of the "address" field.
	Address string `json:"address,omitempty"`
	// Phone holds the value of the "phone" field.
	Phone string `json:"phone,omitempty"`
	// Password holds the value of the "password" field.
	Password string `graphql:"-" json:"-"`
	// Role holds the value of the "role" field.
	Role user.Role `json:"role,omitempty"`
	// Employment holds the value of the "employment" field.
	Employment user.Employment `json:"employment,omitempty"`
	// SSOCert holds the value of the "SSOCert" field.
	SSOCert string `json:"SSOCert,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) QueryCard

func (u *User) QueryCard() *CardQuery

QueryCard queries the "card" edge of the User entity.

func (*User) QueryChildren

func (u *User) QueryChildren() *UserQuery

QueryChildren queries the "children" edge of the User entity.

func (*User) QueryFiles

func (u *User) QueryFiles() *FileQuery

QueryFiles queries the "files" edge of the User entity.

func (*User) QueryFollowers

func (u *User) QueryFollowers() *UserQuery

QueryFollowers queries the "followers" edge of the User entity.

func (*User) QueryFollowing

func (u *User) QueryFollowing() *UserQuery

QueryFollowing queries the "following" edge of the User entity.

func (*User) QueryFriends

func (u *User) QueryFriends() *UserQuery

QueryFriends queries the "friends" edge of the User entity.

func (*User) QueryGroups

func (u *User) QueryGroups() *GroupQuery

QueryGroups queries the "groups" edge of the User entity.

func (*User) QueryParent

func (u *User) QueryParent() *UserQuery

QueryParent queries the "parent" edge of the User entity.

func (*User) QueryPets

func (u *User) QueryPets() *PetQuery

QueryPets queries the "pets" edge of the User entity.

func (*User) QuerySpouse

func (u *User) QuerySpouse() *UserQuery

QuerySpouse queries the "spouse" edge of the User entity.

func (*User) QueryTeam

func (u *User) QueryTeam() *PetQuery

QueryTeam queries the "team" 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.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a create builder for User.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int) *UserDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*UserClient) 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) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryCard

func (c *UserClient) QueryCard(u *User) *CardQuery

QueryCard queries the card edge of a User.

func (*UserClient) QueryChildren

func (c *UserClient) QueryChildren(u *User) *UserQuery

QueryChildren queries the children edge of a User.

func (*UserClient) QueryFiles

func (c *UserClient) QueryFiles(u *User) *FileQuery

QueryFiles queries the files edge of a User.

func (*UserClient) QueryFollowers

func (c *UserClient) QueryFollowers(u *User) *UserQuery

QueryFollowers queries the followers edge of a User.

func (*UserClient) QueryFollowing

func (c *UserClient) QueryFollowing(u *User) *UserQuery

QueryFollowing queries the following edge of a User.

func (*UserClient) QueryFriends

func (c *UserClient) QueryFriends(u *User) *UserQuery

QueryFriends queries the friends edge of a User.

func (*UserClient) QueryGroups

func (c *UserClient) QueryGroups(u *User) *GroupQuery

QueryGroups queries the groups edge of a User.

func (*UserClient) QueryParent

func (c *UserClient) QueryParent(u *User) *UserQuery

QueryParent queries the parent edge of a User.

func (*UserClient) QueryPets

func (c *UserClient) QueryPets(u *User) *PetQuery

QueryPets queries the pets edge of a User.

func (*UserClient) QuerySpouse

func (c *UserClient) QuerySpouse(u *User) *UserQuery

QuerySpouse queries the spouse edge of a User.

func (*UserClient) QueryTeam

func (c *UserClient) QueryTeam(u *User) *PetQuery

QueryTeam queries the team 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) AddChildIDs

func (uc *UserCreate) AddChildIDs(ids ...int) *UserCreate

AddChildIDs adds the "children" edge to the User entity by IDs.

func (*UserCreate) AddChildren

func (uc *UserCreate) AddChildren(u ...*User) *UserCreate

AddChildren adds the "children" edges to the User entity.

func (*UserCreate) AddFileIDs

func (uc *UserCreate) AddFileIDs(ids ...int) *UserCreate

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*UserCreate) AddFiles

func (uc *UserCreate) AddFiles(f ...*File) *UserCreate

AddFiles adds the "files" edges to the File entity.

func (*UserCreate) AddFollowerIDs

func (uc *UserCreate) AddFollowerIDs(ids ...int) *UserCreate

AddFollowerIDs adds the "followers" edge to the User entity by IDs.

func (*UserCreate) AddFollowers

func (uc *UserCreate) AddFollowers(u ...*User) *UserCreate

AddFollowers adds the "followers" edges to the User entity.

func (*UserCreate) AddFollowing

func (uc *UserCreate) AddFollowing(u ...*User) *UserCreate

AddFollowing adds the "following" edges to the User entity.

func (*UserCreate) AddFollowingIDs

func (uc *UserCreate) AddFollowingIDs(ids ...int) *UserCreate

AddFollowingIDs adds the "following" edge to the User entity by IDs.

func (*UserCreate) AddFriendIDs

func (uc *UserCreate) AddFriendIDs(ids ...int) *UserCreate

AddFriendIDs adds the "friends" edge to the User entity by IDs.

func (*UserCreate) AddFriends

func (uc *UserCreate) AddFriends(u ...*User) *UserCreate

AddFriends adds the "friends" edges to the User entity.

func (*UserCreate) AddGroupIDs

func (uc *UserCreate) AddGroupIDs(ids ...int) *UserCreate

AddGroupIDs adds the "groups" edge to the Group entity by IDs.

func (*UserCreate) AddGroups

func (uc *UserCreate) AddGroups(g ...*Group) *UserCreate

AddGroups adds the "groups" edges to the Group entity.

func (*UserCreate) AddPetIDs

func (uc *UserCreate) AddPetIDs(ids ...int) *UserCreate

AddPetIDs adds the "pets" edge to the Pet entity by IDs.

func (*UserCreate) AddPets

func (uc *UserCreate) AddPets(p ...*Pet) *UserCreate

AddPets adds the "pets" edges to the Pet entity.

func (*UserCreate) Exec added in v0.9.0

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX added in v0.9.0

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 added in v0.9.0

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().
	SetOptionalInt(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) {
		SetOptionalInt(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns added in v0.9.0

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) SetAddress

func (uc *UserCreate) SetAddress(s string) *UserCreate

SetAddress sets the "address" field.

func (*UserCreate) SetAge

func (uc *UserCreate) SetAge(i int) *UserCreate

SetAge sets the "age" field.

func (*UserCreate) SetCard

func (uc *UserCreate) SetCard(c *Card) *UserCreate

SetCard sets the "card" edge to the Card entity.

func (*UserCreate) SetCardID

func (uc *UserCreate) SetCardID(id int) *UserCreate

SetCardID sets the "card" edge to the Card entity by ID.

func (*UserCreate) SetEmployment added in v0.10.0

func (uc *UserCreate) SetEmployment(u user.Employment) *UserCreate

SetEmployment sets the "employment" field.

func (*UserCreate) SetLast

func (uc *UserCreate) SetLast(s string) *UserCreate

SetLast sets the "last" 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) SetNillableAddress

func (uc *UserCreate) SetNillableAddress(s *string) *UserCreate

SetNillableAddress sets the "address" field if the given value is not nil.

func (*UserCreate) SetNillableCardID

func (uc *UserCreate) SetNillableCardID(id *int) *UserCreate

SetNillableCardID sets the "card" edge to the Card entity by ID if the given value is not nil.

func (*UserCreate) SetNillableEmployment added in v0.10.0

func (uc *UserCreate) SetNillableEmployment(u *user.Employment) *UserCreate

SetNillableEmployment sets the "employment" field if the given value is not nil.

func (*UserCreate) SetNillableLast

func (uc *UserCreate) SetNillableLast(s *string) *UserCreate

SetNillableLast sets the "last" 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) SetNillableOptionalInt

func (uc *UserCreate) SetNillableOptionalInt(i *int) *UserCreate

SetNillableOptionalInt sets the "optional_int" field if the given value is not nil.

func (*UserCreate) SetNillableParentID

func (uc *UserCreate) SetNillableParentID(id *int) *UserCreate

SetNillableParentID sets the "parent" edge to the User entity by ID if the given value is not nil.

func (*UserCreate) SetNillablePassword

func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserCreate) SetNillablePhone

func (uc *UserCreate) SetNillablePhone(s *string) *UserCreate

SetNillablePhone sets the "phone" field if the given value is not nil.

func (*UserCreate) SetNillableRole

func (uc *UserCreate) SetNillableRole(u *user.Role) *UserCreate

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserCreate) SetNillableSSOCert

func (uc *UserCreate) SetNillableSSOCert(s *string) *UserCreate

SetNillableSSOCert sets the "SSOCert" field if the given value is not nil.

func (*UserCreate) SetNillableSpouseID

func (uc *UserCreate) SetNillableSpouseID(id *int) *UserCreate

SetNillableSpouseID sets the "spouse" edge to the User entity by ID if the given value is not nil.

func (*UserCreate) SetNillableTeamID

func (uc *UserCreate) SetNillableTeamID(id *int) *UserCreate

SetNillableTeamID sets the "team" edge to the Pet entity by ID if the given value is not nil.

func (*UserCreate) SetOptionalInt

func (uc *UserCreate) SetOptionalInt(i int) *UserCreate

SetOptionalInt sets the "optional_int" field.

func (*UserCreate) SetParent

func (uc *UserCreate) SetParent(u *User) *UserCreate

SetParent sets the "parent" edge to the User entity.

func (*UserCreate) SetParentID

func (uc *UserCreate) SetParentID(id int) *UserCreate

SetParentID sets the "parent" edge to the User entity by ID.

func (*UserCreate) SetPassword

func (uc *UserCreate) SetPassword(s string) *UserCreate

SetPassword sets the "password" field.

func (*UserCreate) SetPhone

func (uc *UserCreate) SetPhone(s string) *UserCreate

SetPhone sets the "phone" field.

func (*UserCreate) SetRole

func (uc *UserCreate) SetRole(u user.Role) *UserCreate

SetRole sets the "role" field.

func (*UserCreate) SetSSOCert

func (uc *UserCreate) SetSSOCert(s string) *UserCreate

SetSSOCert sets the "SSOCert" field.

func (*UserCreate) SetSpouse

func (uc *UserCreate) SetSpouse(u *User) *UserCreate

SetSpouse sets the "spouse" edge to the User entity.

func (*UserCreate) SetSpouseID

func (uc *UserCreate) SetSpouseID(id int) *UserCreate

SetSpouseID sets the "spouse" edge to the User entity by ID.

func (*UserCreate) SetTeam

func (uc *UserCreate) SetTeam(p *Pet) *UserCreate

SetTeam sets the "team" edge to the Pet entity.

func (*UserCreate) SetTeamID

func (uc *UserCreate) SetTeamID(id int) *UserCreate

SetTeamID sets the "team" edge to the Pet entity by ID.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec added in v0.9.0

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX added in v0.9.0

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) OnConflict added in v0.9.0

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) {
		SetOptionalInt(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns added in v0.9.0

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.

type UserEdges

type UserEdges struct {
	// Card holds the value of the card edge.
	Card *Card `json:"card,omitempty"`
	// Pets holds the value of the pets edge.
	Pets []*Pet `json:"pets,omitempty"`
	// Files holds the value of the files edge.
	Files []*File `json:"files,omitempty"`
	// Groups holds the value of the groups edge.
	Groups []*Group `json:"groups,omitempty"`
	// Friends holds the value of the friends edge.
	Friends []*User `json:"friends,omitempty"`
	// Followers holds the value of the followers edge.
	Followers []*User `json:"followers,omitempty"`
	// Following holds the value of the following edge.
	Following []*User `json:"following,omitempty"`
	// Team holds the value of the team edge.
	Team *Pet `json:"team,omitempty"`
	// Spouse holds the value of the spouse edge.
	Spouse *User `json:"spouse,omitempty"`
	// Children holds the value of the children edge.
	Children []*User `json:"children,omitempty"`
	// Parent holds the value of the parent edge.
	Parent *User `json:"parent,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) CardOrErr

func (e UserEdges) CardOrErr() (*Card, error)

CardOrErr returns the Card value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UserEdges) ChildrenOrErr

func (e UserEdges) ChildrenOrErr() ([]*User, error)

ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.

func (UserEdges) FilesOrErr

func (e UserEdges) FilesOrErr() ([]*File, error)

FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.

func (UserEdges) FollowersOrErr

func (e UserEdges) FollowersOrErr() ([]*User, error)

FollowersOrErr returns the Followers value or an error if the edge was not loaded in eager-loading.

func (UserEdges) FollowingOrErr

func (e UserEdges) FollowingOrErr() ([]*User, error)

FollowingOrErr returns the Following value or an error if the edge was not loaded in eager-loading.

func (UserEdges) FriendsOrErr

func (e UserEdges) FriendsOrErr() ([]*User, error)

FriendsOrErr returns the Friends value or an error if the edge was not loaded in eager-loading.

func (UserEdges) GroupsOrErr

func (e UserEdges) GroupsOrErr() ([]*Group, error)

GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.

func (UserEdges) ParentOrErr

func (e UserEdges) ParentOrErr() (*User, error)

ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UserEdges) PetsOrErr

func (e UserEdges) PetsOrErr() ([]*Pet, error)

PetsOrErr returns the Pets value or an error if the edge was not loaded in eager-loading.

func (UserEdges) SpouseOrErr

func (e UserEdges) SpouseOrErr() (*User, error)

SpouseOrErr returns the Spouse value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UserEdges) TeamOrErr

func (e UserEdges) TeamOrErr() (*Pet, error)

TeamOrErr returns the Team value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserFilter

type UserFilter struct {
	// contains filtered or unexported fields
}

UserFilter provides a generic filtering capability at runtime for UserQuery.

func (*UserFilter) Where

func (f *UserFilter) Where(p entql.P)

Where applies the entql predicate on the query filter.

func (*UserFilter) WhereAddress

func (f *UserFilter) WhereAddress(p entql.StringP)

WhereAddress applies the entql string predicate on the address field.

func (*UserFilter) WhereAge

func (f *UserFilter) WhereAge(p entql.IntP)

WhereAge applies the entql int predicate on the age field.

func (*UserFilter) WhereEmployment added in v0.10.0

func (f *UserFilter) WhereEmployment(p entql.StringP)

WhereEmployment applies the entql string predicate on the employment field.

func (*UserFilter) WhereHasCard

func (f *UserFilter) WhereHasCard()

WhereHasCard applies a predicate to check if query has an edge card.

func (*UserFilter) WhereHasCardWith

func (f *UserFilter) WhereHasCardWith(preds ...predicate.Card)

WhereHasCardWith applies a predicate to check if query has an edge card with a given conditions (other predicates).

func (*UserFilter) WhereHasChildren

func (f *UserFilter) WhereHasChildren()

WhereHasChildren applies a predicate to check if query has an edge children.

func (*UserFilter) WhereHasChildrenWith

func (f *UserFilter) WhereHasChildrenWith(preds ...predicate.User)

WhereHasChildrenWith applies a predicate to check if query has an edge children with a given conditions (other predicates).

func (*UserFilter) WhereHasFiles

func (f *UserFilter) WhereHasFiles()

WhereHasFiles applies a predicate to check if query has an edge files.

func (*UserFilter) WhereHasFilesWith

func (f *UserFilter) WhereHasFilesWith(preds ...predicate.File)

WhereHasFilesWith applies a predicate to check if query has an edge files with a given conditions (other predicates).

func (*UserFilter) WhereHasFollowers

func (f *UserFilter) WhereHasFollowers()

WhereHasFollowers applies a predicate to check if query has an edge followers.

func (*UserFilter) WhereHasFollowersWith

func (f *UserFilter) WhereHasFollowersWith(preds ...predicate.User)

WhereHasFollowersWith applies a predicate to check if query has an edge followers with a given conditions (other predicates).

func (*UserFilter) WhereHasFollowing

func (f *UserFilter) WhereHasFollowing()

WhereHasFollowing applies a predicate to check if query has an edge following.

func (*UserFilter) WhereHasFollowingWith

func (f *UserFilter) WhereHasFollowingWith(preds ...predicate.User)

WhereHasFollowingWith applies a predicate to check if query has an edge following with a given conditions (other predicates).

func (*UserFilter) WhereHasFriends

func (f *UserFilter) WhereHasFriends()

WhereHasFriends applies a predicate to check if query has an edge friends.

func (*UserFilter) WhereHasFriendsWith

func (f *UserFilter) WhereHasFriendsWith(preds ...predicate.User)

WhereHasFriendsWith applies a predicate to check if query has an edge friends with a given conditions (other predicates).

func (*UserFilter) WhereHasGroups

func (f *UserFilter) WhereHasGroups()

WhereHasGroups applies a predicate to check if query has an edge groups.

func (*UserFilter) WhereHasGroupsWith

func (f *UserFilter) WhereHasGroupsWith(preds ...predicate.Group)

WhereHasGroupsWith applies a predicate to check if query has an edge groups with a given conditions (other predicates).

func (*UserFilter) WhereHasParent

func (f *UserFilter) WhereHasParent()

WhereHasParent applies a predicate to check if query has an edge parent.

func (*UserFilter) WhereHasParentWith

func (f *UserFilter) WhereHasParentWith(preds ...predicate.User)

WhereHasParentWith applies a predicate to check if query has an edge parent with a given conditions (other predicates).

func (*UserFilter) WhereHasPets

func (f *UserFilter) WhereHasPets()

WhereHasPets applies a predicate to check if query has an edge pets.

func (*UserFilter) WhereHasPetsWith

func (f *UserFilter) WhereHasPetsWith(preds ...predicate.Pet)

WhereHasPetsWith applies a predicate to check if query has an edge pets with a given conditions (other predicates).

func (*UserFilter) WhereHasSpouse

func (f *UserFilter) WhereHasSpouse()

WhereHasSpouse applies a predicate to check if query has an edge spouse.

func (*UserFilter) WhereHasSpouseWith

func (f *UserFilter) WhereHasSpouseWith(preds ...predicate.User)

WhereHasSpouseWith applies a predicate to check if query has an edge spouse with a given conditions (other predicates).

func (*UserFilter) WhereHasTeam

func (f *UserFilter) WhereHasTeam()

WhereHasTeam applies a predicate to check if query has an edge team.

func (*UserFilter) WhereHasTeamWith

func (f *UserFilter) WhereHasTeamWith(preds ...predicate.Pet)

WhereHasTeamWith applies a predicate to check if query has an edge team with a given conditions (other predicates).

func (*UserFilter) WhereID

func (f *UserFilter) WhereID(p entql.IntP)

WhereID applies the entql int predicate on the id field.

func (*UserFilter) WhereLast

func (f *UserFilter) WhereLast(p entql.StringP)

WhereLast applies the entql string predicate on the last field.

func (*UserFilter) WhereName

func (f *UserFilter) WhereName(p entql.StringP)

WhereName applies the entql string predicate on the name field.

func (*UserFilter) WhereNickname

func (f *UserFilter) WhereNickname(p entql.StringP)

WhereNickname applies the entql string predicate on the nickname field.

func (*UserFilter) WhereOptionalInt

func (f *UserFilter) WhereOptionalInt(p entql.IntP)

WhereOptionalInt applies the entql int predicate on the optional_int field.

func (*UserFilter) WherePassword

func (f *UserFilter) WherePassword(p entql.StringP)

WherePassword applies the entql string predicate on the password field.

func (*UserFilter) WherePhone

func (f *UserFilter) WherePhone(p entql.StringP)

WherePhone applies the entql string predicate on the phone field.

func (*UserFilter) WhereRole

func (f *UserFilter) WhereRole(p entql.StringP)

WhereRole applies the entql string predicate on the role field.

func (*UserFilter) WhereSSOCert

func (f *UserFilter) WhereSSOCert(p entql.StringP)

WhereSSOCert applies the entql string predicate on the SSOCert field.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) BoolX

func (ugb *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) BoolsX

func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) Float64X

func (ugb *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) Float64sX

func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) IntX

func (ugb *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) IntsX

func (ugb *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) StringX

func (ugb *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) StringsX

func (ugb *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) AddAge

func (m *UserMutation) AddAge(i int)

AddAge adds i to the "age" field.

func (*UserMutation) AddChildIDs

func (m *UserMutation) AddChildIDs(ids ...int)

AddChildIDs adds the "children" edge to the User 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) AddFileIDs

func (m *UserMutation) AddFileIDs(ids ...int)

AddFileIDs adds the "files" edge to the File entity by ids.

func (*UserMutation) AddFollowerIDs

func (m *UserMutation) AddFollowerIDs(ids ...int)

AddFollowerIDs adds the "followers" edge to the User entity by ids.

func (*UserMutation) AddFollowingIDs

func (m *UserMutation) AddFollowingIDs(ids ...int)

AddFollowingIDs adds the "following" edge to the User entity by ids.

func (*UserMutation) AddFriendIDs

func (m *UserMutation) AddFriendIDs(ids ...int)

AddFriendIDs adds the "friends" edge to the User entity by ids.

func (*UserMutation) AddGroupIDs

func (m *UserMutation) AddGroupIDs(ids ...int)

AddGroupIDs adds the "groups" edge to the Group entity by ids.

func (*UserMutation) AddOptionalInt

func (m *UserMutation) AddOptionalInt(i int)

AddOptionalInt adds i to the "optional_int" field.

func (*UserMutation) AddPetIDs

func (m *UserMutation) AddPetIDs(ids ...int)

AddPetIDs adds the "pets" edge to the Pet entity by ids.

func (*UserMutation) AddedAge

func (m *UserMutation) AddedAge() (r int, exists bool)

AddedAge returns the value that was added to the "age" 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) AddedOptionalInt

func (m *UserMutation) AddedOptionalInt() (r int, exists bool)

AddedOptionalInt returns the value that was added to the "optional_int" field in this mutation.

func (*UserMutation) Address

func (m *UserMutation) Address() (r string, exists bool)

Address returns the value of the "address" field in the mutation.

func (*UserMutation) AddressCleared

func (m *UserMutation) AddressCleared() bool

AddressCleared returns if the "address" field was cleared in this mutation.

func (*UserMutation) Age

func (m *UserMutation) Age() (r int, exists bool)

Age returns the value of the "age" field in the mutation.

func (*UserMutation) CardCleared

func (m *UserMutation) CardCleared() bool

CardCleared reports if the "card" edge to the Card entity was cleared.

func (*UserMutation) CardID

func (m *UserMutation) CardID() (id int, exists bool)

CardID returns the "card" edge ID in the mutation.

func (*UserMutation) CardIDs

func (m *UserMutation) CardIDs() (ids []int)

CardIDs returns the "card" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CardID instead. It exists only for internal usage by the builders.

func (*UserMutation) ChildrenCleared

func (m *UserMutation) ChildrenCleared() bool

ChildrenCleared reports if the "children" edge to the User entity was cleared.

func (*UserMutation) ChildrenIDs

func (m *UserMutation) ChildrenIDs() (ids []int)

ChildrenIDs returns the "children" edge IDs in the mutation.

func (*UserMutation) ClearAddress

func (m *UserMutation) ClearAddress()

ClearAddress clears the value of the "address" field.

func (*UserMutation) ClearCard

func (m *UserMutation) ClearCard()

ClearCard clears the "card" edge to the Card entity.

func (*UserMutation) ClearChildren

func (m *UserMutation) ClearChildren()

ClearChildren clears the "children" edge to the User 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) ClearFiles

func (m *UserMutation) ClearFiles()

ClearFiles clears the "files" edge to the File entity.

func (*UserMutation) ClearFollowers

func (m *UserMutation) ClearFollowers()

ClearFollowers clears the "followers" edge to the User entity.

func (*UserMutation) ClearFollowing

func (m *UserMutation) ClearFollowing()

ClearFollowing clears the "following" edge to the User entity.

func (*UserMutation) ClearFriends

func (m *UserMutation) ClearFriends()

ClearFriends clears the "friends" edge to the User entity.

func (*UserMutation) ClearGroups

func (m *UserMutation) ClearGroups()

ClearGroups clears the "groups" edge to the Group entity.

func (*UserMutation) ClearNickname

func (m *UserMutation) ClearNickname()

ClearNickname clears the value of the "nickname" field.

func (*UserMutation) ClearOptionalInt

func (m *UserMutation) ClearOptionalInt()

ClearOptionalInt clears the value of the "optional_int" field.

func (*UserMutation) ClearParent

func (m *UserMutation) ClearParent()

ClearParent clears the "parent" edge to the User entity.

func (*UserMutation) ClearPassword

func (m *UserMutation) ClearPassword()

ClearPassword clears the value of the "password" field.

func (*UserMutation) ClearPets

func (m *UserMutation) ClearPets()

ClearPets clears the "pets" edge to the Pet entity.

func (*UserMutation) ClearPhone

func (m *UserMutation) ClearPhone()

ClearPhone clears the value of the "phone" field.

func (*UserMutation) ClearSSOCert

func (m *UserMutation) ClearSSOCert()

ClearSSOCert clears the value of the "SSOCert" field.

func (*UserMutation) ClearSpouse

func (m *UserMutation) ClearSpouse()

ClearSpouse clears the "spouse" edge to the User entity.

func (*UserMutation) ClearTeam

func (m *UserMutation) ClearTeam()

ClearTeam clears the "team" edge to the Pet 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) 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) Employment added in v0.10.0

func (m *UserMutation) Employment() (r user.Employment, exists bool)

Employment returns the value of the "employment" field in the mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) FilesCleared

func (m *UserMutation) FilesCleared() bool

FilesCleared reports if the "files" edge to the File entity was cleared.

func (*UserMutation) FilesIDs

func (m *UserMutation) FilesIDs() (ids []int)

FilesIDs returns the "files" edge IDs in the mutation.

func (*UserMutation) Filter

func (m *UserMutation) Filter() *UserFilter

Filter returns an entql.Where implementation to apply filters on the UserMutation builder.

func (*UserMutation) FollowersCleared

func (m *UserMutation) FollowersCleared() bool

FollowersCleared reports if the "followers" edge to the User entity was cleared.

func (*UserMutation) FollowersIDs

func (m *UserMutation) FollowersIDs() (ids []int)

FollowersIDs returns the "followers" edge IDs in the mutation.

func (*UserMutation) FollowingCleared

func (m *UserMutation) FollowingCleared() bool

FollowingCleared reports if the "following" edge to the User entity was cleared.

func (*UserMutation) FollowingIDs

func (m *UserMutation) FollowingIDs() (ids []int)

FollowingIDs returns the "following" edge IDs in the mutation.

func (*UserMutation) FriendsCleared

func (m *UserMutation) FriendsCleared() bool

FriendsCleared reports if the "friends" edge to the User entity was cleared.

func (*UserMutation) FriendsIDs

func (m *UserMutation) FriendsIDs() (ids []int)

FriendsIDs returns the "friends" edge IDs in the mutation.

func (*UserMutation) GroupsCleared

func (m *UserMutation) GroupsCleared() bool

GroupsCleared reports if the "groups" edge to the Group entity was cleared.

func (*UserMutation) GroupsIDs

func (m *UserMutation) GroupsIDs() (ids []int)

GroupsIDs returns the "groups" edge IDs in the mutation.

func (*UserMutation) ID

func (m *UserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs added in v0.10.0

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) Last

func (m *UserMutation) Last() (r string, exists bool)

Last returns the value of the "last" field in the 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) OldAddress

func (m *UserMutation) OldAddress(ctx context.Context) (v string, err error)

OldAddress returns the old "address" 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) OldAge

func (m *UserMutation) OldAge(ctx context.Context) (v int, err error)

OldAge returns the old "age" 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) OldEmployment added in v0.10.0

func (m *UserMutation) OldEmployment(ctx context.Context) (v user.Employment, err error)

OldEmployment returns the old "employment" 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) OldLast

func (m *UserMutation) OldLast(ctx context.Context) (v string, err error)

OldLast returns the old "last" 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) OldOptionalInt

func (m *UserMutation) OldOptionalInt(ctx context.Context) (v int, err error)

OldOptionalInt returns the old "optional_int" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldPassword

func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)

OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldPhone

func (m *UserMutation) OldPhone(ctx context.Context) (v string, err error)

OldPhone returns the old "phone" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldRole

func (m *UserMutation) OldRole(ctx context.Context) (v user.Role, err error)

OldRole returns the old "role" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldSSOCert

func (m *UserMutation) OldSSOCert(ctx context.Context) (v string, err error)

OldSSOCert returns the old "SSOCert" 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) OptionalInt

func (m *UserMutation) OptionalInt() (r int, exists bool)

OptionalInt returns the value of the "optional_int" field in the mutation.

func (*UserMutation) OptionalIntCleared

func (m *UserMutation) OptionalIntCleared() bool

OptionalIntCleared returns if the "optional_int" field was cleared in this mutation.

func (*UserMutation) ParentCleared

func (m *UserMutation) ParentCleared() bool

ParentCleared reports if the "parent" edge to the User entity was cleared.

func (*UserMutation) ParentID

func (m *UserMutation) ParentID() (id int, exists bool)

ParentID returns the "parent" edge ID in the mutation.

func (*UserMutation) ParentIDs

func (m *UserMutation) ParentIDs() (ids []int)

ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.

func (*UserMutation) Password

func (m *UserMutation) Password() (r string, exists bool)

Password returns the value of the "password" field in the mutation.

func (*UserMutation) PasswordCleared

func (m *UserMutation) PasswordCleared() bool

PasswordCleared returns if the "password" field was cleared in this mutation.

func (*UserMutation) PetsCleared

func (m *UserMutation) PetsCleared() bool

PetsCleared reports if the "pets" edge to the Pet entity was cleared.

func (*UserMutation) PetsIDs

func (m *UserMutation) PetsIDs() (ids []int)

PetsIDs returns the "pets" edge IDs in the mutation.

func (*UserMutation) Phone

func (m *UserMutation) Phone() (r string, exists bool)

Phone returns the value of the "phone" field in the mutation.

func (*UserMutation) PhoneCleared

func (m *UserMutation) PhoneCleared() bool

PhoneCleared returns if the "phone" field was cleared in this mutation.

func (*UserMutation) RemoveChildIDs

func (m *UserMutation) RemoveChildIDs(ids ...int)

RemoveChildIDs removes the "children" edge to the User entity by IDs.

func (*UserMutation) RemoveFileIDs

func (m *UserMutation) RemoveFileIDs(ids ...int)

RemoveFileIDs removes the "files" edge to the File entity by IDs.

func (*UserMutation) RemoveFollowerIDs

func (m *UserMutation) RemoveFollowerIDs(ids ...int)

RemoveFollowerIDs removes the "followers" edge to the User entity by IDs.

func (*UserMutation) RemoveFollowingIDs

func (m *UserMutation) RemoveFollowingIDs(ids ...int)

RemoveFollowingIDs removes the "following" edge to the User entity by IDs.

func (*UserMutation) RemoveFriendIDs

func (m *UserMutation) RemoveFriendIDs(ids ...int)

RemoveFriendIDs removes the "friends" edge to the User entity by IDs.

func (*UserMutation) RemoveGroupIDs

func (m *UserMutation) RemoveGroupIDs(ids ...int)

RemoveGroupIDs removes the "groups" edge to the Group entity by IDs.

func (*UserMutation) RemovePetIDs

func (m *UserMutation) RemovePetIDs(ids ...int)

RemovePetIDs removes the "pets" edge to the Pet entity by IDs.

func (*UserMutation) RemovedChildrenIDs

func (m *UserMutation) RemovedChildrenIDs() (ids []int)

RemovedChildren returns the removed IDs of the "children" edge to the User entity.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedFilesIDs

func (m *UserMutation) RemovedFilesIDs() (ids []int)

RemovedFiles returns the removed IDs of the "files" edge to the File entity.

func (*UserMutation) RemovedFollowersIDs

func (m *UserMutation) RemovedFollowersIDs() (ids []int)

RemovedFollowers returns the removed IDs of the "followers" edge to the User entity.

func (*UserMutation) RemovedFollowingIDs

func (m *UserMutation) RemovedFollowingIDs() (ids []int)

RemovedFollowing returns the removed IDs of the "following" edge to the User entity.

func (*UserMutation) RemovedFriendsIDs

func (m *UserMutation) RemovedFriendsIDs() (ids []int)

RemovedFriends returns the removed IDs of the "friends" edge to the User entity.

func (*UserMutation) RemovedGroupsIDs

func (m *UserMutation) RemovedGroupsIDs() (ids []int)

RemovedGroups returns the removed IDs of the "groups" edge to the Group entity.

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) RemovedPetsIDs

func (m *UserMutation) RemovedPetsIDs() (ids []int)

RemovedPets returns the removed IDs of the "pets" edge to the Pet entity.

func (*UserMutation) ResetAddress

func (m *UserMutation) ResetAddress()

ResetAddress resets all changes to the "address" field.

func (*UserMutation) ResetAge

func (m *UserMutation) ResetAge()

ResetAge resets all changes to the "age" field.

func (*UserMutation) ResetCard

func (m *UserMutation) ResetCard()

ResetCard resets all changes to the "card" edge.

func (*UserMutation) ResetChildren

func (m *UserMutation) ResetChildren()

ResetChildren resets all changes to the "children" edge.

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) ResetEmployment added in v0.10.0

func (m *UserMutation) ResetEmployment()

ResetEmployment resets all changes to the "employment" field.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetFiles

func (m *UserMutation) ResetFiles()

ResetFiles resets all changes to the "files" edge.

func (*UserMutation) ResetFollowers

func (m *UserMutation) ResetFollowers()

ResetFollowers resets all changes to the "followers" edge.

func (*UserMutation) ResetFollowing

func (m *UserMutation) ResetFollowing()

ResetFollowing resets all changes to the "following" edge.

func (*UserMutation) ResetFriends

func (m *UserMutation) ResetFriends()

ResetFriends resets all changes to the "friends" edge.

func (*UserMutation) ResetGroups

func (m *UserMutation) ResetGroups()

ResetGroups resets all changes to the "groups" edge.

func (*UserMutation) ResetLast

func (m *UserMutation) ResetLast()

ResetLast resets all changes to the "last" 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) ResetOptionalInt

func (m *UserMutation) ResetOptionalInt()

ResetOptionalInt resets all changes to the "optional_int" field.

func (*UserMutation) ResetParent

func (m *UserMutation) ResetParent()

ResetParent resets all changes to the "parent" edge.

func (*UserMutation) ResetPassword

func (m *UserMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*UserMutation) ResetPets

func (m *UserMutation) ResetPets()

ResetPets resets all changes to the "pets" edge.

func (*UserMutation) ResetPhone

func (m *UserMutation) ResetPhone()

ResetPhone resets all changes to the "phone" field.

func (*UserMutation) ResetRole

func (m *UserMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*UserMutation) ResetSSOCert

func (m *UserMutation) ResetSSOCert()

ResetSSOCert resets all changes to the "SSOCert" field.

func (*UserMutation) ResetSpouse

func (m *UserMutation) ResetSpouse()

ResetSpouse resets all changes to the "spouse" edge.

func (*UserMutation) ResetTeam

func (m *UserMutation) ResetTeam()

ResetTeam resets all changes to the "team" edge.

func (*UserMutation) Role

func (m *UserMutation) Role() (r user.Role, exists bool)

Role returns the value of the "role" field in the mutation.

func (*UserMutation) SSOCert

func (m *UserMutation) SSOCert() (r string, exists bool)

SSOCert returns the value of the "SSOCert" field in the mutation.

func (*UserMutation) SSOCertCleared

func (m *UserMutation) SSOCertCleared() bool

SSOCertCleared returns if the "SSOCert" field was cleared in this mutation.

func (*UserMutation) SetAddress

func (m *UserMutation) SetAddress(s string)

SetAddress sets the "address" field.

func (*UserMutation) SetAge

func (m *UserMutation) SetAge(i int)

SetAge sets the "age" field.

func (*UserMutation) SetCardID

func (m *UserMutation) SetCardID(id int)

SetCardID sets the "card" edge to the Card entity by id.

func (*UserMutation) SetEmployment added in v0.10.0

func (m *UserMutation) SetEmployment(u user.Employment)

SetEmployment sets the "employment" 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) SetLast

func (m *UserMutation) SetLast(s string)

SetLast sets the "last" 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) SetOptionalInt

func (m *UserMutation) SetOptionalInt(i int)

SetOptionalInt sets the "optional_int" field.

func (*UserMutation) SetParentID

func (m *UserMutation) SetParentID(id int)

SetParentID sets the "parent" edge to the User entity by id.

func (*UserMutation) SetPassword

func (m *UserMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*UserMutation) SetPhone

func (m *UserMutation) SetPhone(s string)

SetPhone sets the "phone" field.

func (*UserMutation) SetRole

func (m *UserMutation) SetRole(u user.Role)

SetRole sets the "role" field.

func (*UserMutation) SetSSOCert

func (m *UserMutation) SetSSOCert(s string)

SetSSOCert sets the "SSOCert" field.

func (*UserMutation) SetSpouseID

func (m *UserMutation) SetSpouseID(id int)

SetSpouseID sets the "spouse" edge to the User entity by id.

func (*UserMutation) SetTeamID

func (m *UserMutation) SetTeamID(id int)

SetTeamID sets the "team" edge to the Pet entity by id.

func (*UserMutation) SpouseCleared

func (m *UserMutation) SpouseCleared() bool

SpouseCleared reports if the "spouse" edge to the User entity was cleared.

func (*UserMutation) SpouseID

func (m *UserMutation) SpouseID() (id int, exists bool)

SpouseID returns the "spouse" edge ID in the mutation.

func (*UserMutation) SpouseIDs

func (m *UserMutation) SpouseIDs() (ids []int)

SpouseIDs returns the "spouse" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SpouseID instead. It exists only for internal usage by the builders.

func (*UserMutation) TeamCleared

func (m *UserMutation) TeamCleared() bool

TeamCleared reports if the "team" edge to the Pet entity was cleared.

func (*UserMutation) TeamID

func (m *UserMutation) TeamID() (id int, exists bool)

TeamID returns the "team" edge ID in the mutation.

func (*UserMutation) TeamIDs

func (m *UserMutation) TeamIDs() (ids []int)

TeamIDs returns the "team" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TeamID instead. It exists only for internal usage by the builders.

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) Where added in v0.9.0

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) 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) Filter

func (uq *UserQuery) Filter() *UserFilter

Filter returns a Filter implementation to apply filters on the UserQuery builder.

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) ForShare added in v0.9.0

func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*UserQuery) ForUpdate added in v0.9.0

func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

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 {
	OptionalInt int `json:"optional_int,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldOptionalInt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) ([]int, 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 adds a limit step to the query.

func (*UserQuery) Modify added in v0.9.0

func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset adds an offset step to the query.

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 exactly one User entity is not 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 exactly one User ID is not 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 ...OrderFunc) *UserQuery

Order adds an order step to the query.

func (*UserQuery) QueryCard

func (uq *UserQuery) QueryCard() *CardQuery

QueryCard chains the current query on the "card" edge.

func (*UserQuery) QueryChildren

func (uq *UserQuery) QueryChildren() *UserQuery

QueryChildren chains the current query on the "children" edge.

func (*UserQuery) QueryFiles

func (uq *UserQuery) QueryFiles() *FileQuery

QueryFiles chains the current query on the "files" edge.

func (*UserQuery) QueryFollowers

func (uq *UserQuery) QueryFollowers() *UserQuery

QueryFollowers chains the current query on the "followers" edge.

func (*UserQuery) QueryFollowing

func (uq *UserQuery) QueryFollowing() *UserQuery

QueryFollowing chains the current query on the "following" edge.

func (*UserQuery) QueryFriends

func (uq *UserQuery) QueryFriends() *UserQuery

QueryFriends chains the current query on the "friends" edge.

func (*UserQuery) QueryGroups

func (uq *UserQuery) QueryGroups() *GroupQuery

QueryGroups chains the current query on the "groups" edge.

func (*UserQuery) QueryParent

func (uq *UserQuery) QueryParent() *UserQuery

QueryParent chains the current query on the "parent" edge.

func (*UserQuery) QueryPets

func (uq *UserQuery) QueryPets() *PetQuery

QueryPets chains the current query on the "pets" edge.

func (*UserQuery) QuerySpouse

func (uq *UserQuery) QuerySpouse() *UserQuery

QuerySpouse chains the current query on the "spouse" edge.

func (*UserQuery) QueryTeam

func (uq *UserQuery) QueryTeam() *PetQuery

QueryTeam chains the current query on the "team" 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 {
	OptionalInt int `json:"optional_int,omitempty"`
}

client.User.Query().
	Select(user.FieldOptionalInt).
	Scan(ctx, &v)

func (*UserQuery) Unique added in v0.8.0

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) WithCard

func (uq *UserQuery) WithCard(opts ...func(*CardQuery)) *UserQuery

WithCard tells the query-builder to eager-load the nodes that are connected to the "card" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithChildren

func (uq *UserQuery) WithChildren(opts ...func(*UserQuery)) *UserQuery

WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithFiles

func (uq *UserQuery) WithFiles(opts ...func(*FileQuery)) *UserQuery

WithFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithFollowers

func (uq *UserQuery) WithFollowers(opts ...func(*UserQuery)) *UserQuery

WithFollowers tells the query-builder to eager-load the nodes that are connected to the "followers" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithFollowing

func (uq *UserQuery) WithFollowing(opts ...func(*UserQuery)) *UserQuery

WithFollowing tells the query-builder to eager-load the nodes that are connected to the "following" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithFriends

func (uq *UserQuery) WithFriends(opts ...func(*UserQuery)) *UserQuery

WithFriends tells the query-builder to eager-load the nodes that are connected to the "friends" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithGroups

func (uq *UserQuery) WithGroups(opts ...func(*GroupQuery)) *UserQuery

WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithParent

func (uq *UserQuery) WithParent(opts ...func(*UserQuery)) *UserQuery

WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithPets

func (uq *UserQuery) WithPets(opts ...func(*PetQuery)) *UserQuery

WithPets tells the query-builder to eager-load the nodes that are connected to the "pets" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithSpouse

func (uq *UserQuery) WithSpouse(opts ...func(*UserQuery)) *UserQuery

WithSpouse tells the query-builder to eager-load the nodes that are connected to the "spouse" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithTeam

func (uq *UserQuery) WithTeam(opts ...func(*PetQuery)) *UserQuery

WithTeam tells the query-builder to eager-load the nodes that are connected to the "team" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Bool

func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (us *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (us *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (us *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (us *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (us *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (us *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (us *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (us *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Modify added in v0.9.0

func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (us *UserSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (us *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (us *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (us *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 (us *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) AddAge

func (uu *UserUpdate) AddAge(i int) *UserUpdate

AddAge adds i to the "age" field.

func (*UserUpdate) AddChildIDs

func (uu *UserUpdate) AddChildIDs(ids ...int) *UserUpdate

AddChildIDs adds the "children" edge to the User entity by IDs.

func (*UserUpdate) AddChildren

func (uu *UserUpdate) AddChildren(u ...*User) *UserUpdate

AddChildren adds the "children" edges to the User entity.

func (*UserUpdate) AddFileIDs

func (uu *UserUpdate) AddFileIDs(ids ...int) *UserUpdate

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*UserUpdate) AddFiles

func (uu *UserUpdate) AddFiles(f ...*File) *UserUpdate

AddFiles adds the "files" edges to the File entity.

func (*UserUpdate) AddFollowerIDs

func (uu *UserUpdate) AddFollowerIDs(ids ...int) *UserUpdate

AddFollowerIDs adds the "followers" edge to the User entity by IDs.

func (*UserUpdate) AddFollowers

func (uu *UserUpdate) AddFollowers(u ...*User) *UserUpdate

AddFollowers adds the "followers" edges to the User entity.

func (*UserUpdate) AddFollowing

func (uu *UserUpdate) AddFollowing(u ...*User) *UserUpdate

AddFollowing adds the "following" edges to the User entity.

func (*UserUpdate) AddFollowingIDs

func (uu *UserUpdate) AddFollowingIDs(ids ...int) *UserUpdate

AddFollowingIDs adds the "following" edge to the User entity by IDs.

func (*UserUpdate) AddFriendIDs

func (uu *UserUpdate) AddFriendIDs(ids ...int) *UserUpdate

AddFriendIDs adds the "friends" edge to the User entity by IDs.

func (*UserUpdate) AddFriends

func (uu *UserUpdate) AddFriends(u ...*User) *UserUpdate

AddFriends adds the "friends" edges to the User entity.

func (*UserUpdate) AddGroupIDs

func (uu *UserUpdate) AddGroupIDs(ids ...int) *UserUpdate

AddGroupIDs adds the "groups" edge to the Group entity by IDs.

func (*UserUpdate) AddGroups

func (uu *UserUpdate) AddGroups(g ...*Group) *UserUpdate

AddGroups adds the "groups" edges to the Group entity.

func (*UserUpdate) AddOptionalInt

func (uu *UserUpdate) AddOptionalInt(i int) *UserUpdate

AddOptionalInt adds i to the "optional_int" field.

func (*UserUpdate) AddPetIDs

func (uu *UserUpdate) AddPetIDs(ids ...int) *UserUpdate

AddPetIDs adds the "pets" edge to the Pet entity by IDs.

func (*UserUpdate) AddPets

func (uu *UserUpdate) AddPets(p ...*Pet) *UserUpdate

AddPets adds the "pets" edges to the Pet entity.

func (*UserUpdate) ClearAddress

func (uu *UserUpdate) ClearAddress() *UserUpdate

ClearAddress clears the value of the "address" field.

func (*UserUpdate) ClearCard

func (uu *UserUpdate) ClearCard() *UserUpdate

ClearCard clears the "card" edge to the Card entity.

func (*UserUpdate) ClearChildren

func (uu *UserUpdate) ClearChildren() *UserUpdate

ClearChildren clears all "children" edges to the User entity.

func (*UserUpdate) ClearFiles

func (uu *UserUpdate) ClearFiles() *UserUpdate

ClearFiles clears all "files" edges to the File entity.

func (*UserUpdate) ClearFollowers

func (uu *UserUpdate) ClearFollowers() *UserUpdate

ClearFollowers clears all "followers" edges to the User entity.

func (*UserUpdate) ClearFollowing

func (uu *UserUpdate) ClearFollowing() *UserUpdate

ClearFollowing clears all "following" edges to the User entity.

func (*UserUpdate) ClearFriends

func (uu *UserUpdate) ClearFriends() *UserUpdate

ClearFriends clears all "friends" edges to the User entity.

func (*UserUpdate) ClearGroups

func (uu *UserUpdate) ClearGroups() *UserUpdate

ClearGroups clears all "groups" edges to the Group entity.

func (*UserUpdate) ClearNickname

func (uu *UserUpdate) ClearNickname() *UserUpdate

ClearNickname clears the value of the "nickname" field.

func (*UserUpdate) ClearOptionalInt

func (uu *UserUpdate) ClearOptionalInt() *UserUpdate

ClearOptionalInt clears the value of the "optional_int" field.

func (*UserUpdate) ClearParent

func (uu *UserUpdate) ClearParent() *UserUpdate

ClearParent clears the "parent" edge to the User entity.

func (*UserUpdate) ClearPassword

func (uu *UserUpdate) ClearPassword() *UserUpdate

ClearPassword clears the value of the "password" field.

func (*UserUpdate) ClearPets

func (uu *UserUpdate) ClearPets() *UserUpdate

ClearPets clears all "pets" edges to the Pet entity.

func (*UserUpdate) ClearPhone

func (uu *UserUpdate) ClearPhone() *UserUpdate

ClearPhone clears the value of the "phone" field.

func (*UserUpdate) ClearSSOCert

func (uu *UserUpdate) ClearSSOCert() *UserUpdate

ClearSSOCert clears the value of the "SSOCert" field.

func (*UserUpdate) ClearSpouse

func (uu *UserUpdate) ClearSpouse() *UserUpdate

ClearSpouse clears the "spouse" edge to the User entity.

func (*UserUpdate) ClearTeam

func (uu *UserUpdate) ClearTeam() *UserUpdate

ClearTeam clears the "team" edge to the Pet 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) RemoveChildIDs

func (uu *UserUpdate) RemoveChildIDs(ids ...int) *UserUpdate

RemoveChildIDs removes the "children" edge to User entities by IDs.

func (*UserUpdate) RemoveChildren

func (uu *UserUpdate) RemoveChildren(u ...*User) *UserUpdate

RemoveChildren removes "children" edges to User entities.

func (*UserUpdate) RemoveFileIDs

func (uu *UserUpdate) RemoveFileIDs(ids ...int) *UserUpdate

RemoveFileIDs removes the "files" edge to File entities by IDs.

func (*UserUpdate) RemoveFiles

func (uu *UserUpdate) RemoveFiles(f ...*File) *UserUpdate

RemoveFiles removes "files" edges to File entities.

func (*UserUpdate) RemoveFollowerIDs

func (uu *UserUpdate) RemoveFollowerIDs(ids ...int) *UserUpdate

RemoveFollowerIDs removes the "followers" edge to User entities by IDs.

func (*UserUpdate) RemoveFollowers

func (uu *UserUpdate) RemoveFollowers(u ...*User) *UserUpdate

RemoveFollowers removes "followers" edges to User entities.

func (*UserUpdate) RemoveFollowing

func (uu *UserUpdate) RemoveFollowing(u ...*User) *UserUpdate

RemoveFollowing removes "following" edges to User entities.

func (*UserUpdate) RemoveFollowingIDs

func (uu *UserUpdate) RemoveFollowingIDs(ids ...int) *UserUpdate

RemoveFollowingIDs removes the "following" edge to User entities by IDs.

func (*UserUpdate) RemoveFriendIDs

func (uu *UserUpdate) RemoveFriendIDs(ids ...int) *UserUpdate

RemoveFriendIDs removes the "friends" edge to User entities by IDs.

func (*UserUpdate) RemoveFriends

func (uu *UserUpdate) RemoveFriends(u ...*User) *UserUpdate

RemoveFriends removes "friends" edges to User entities.

func (*UserUpdate) RemoveGroupIDs

func (uu *UserUpdate) RemoveGroupIDs(ids ...int) *UserUpdate

RemoveGroupIDs removes the "groups" edge to Group entities by IDs.

func (*UserUpdate) RemoveGroups

func (uu *UserUpdate) RemoveGroups(g ...*Group) *UserUpdate

RemoveGroups removes "groups" edges to Group entities.

func (*UserUpdate) RemovePetIDs

func (uu *UserUpdate) RemovePetIDs(ids ...int) *UserUpdate

RemovePetIDs removes the "pets" edge to Pet entities by IDs.

func (*UserUpdate) RemovePets

func (uu *UserUpdate) RemovePets(p ...*Pet) *UserUpdate

RemovePets removes "pets" edges to Pet 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) SetAddress

func (uu *UserUpdate) SetAddress(s string) *UserUpdate

SetAddress sets the "address" field.

func (*UserUpdate) SetAge

func (uu *UserUpdate) SetAge(i int) *UserUpdate

SetAge sets the "age" field.

func (*UserUpdate) SetCard

func (uu *UserUpdate) SetCard(c *Card) *UserUpdate

SetCard sets the "card" edge to the Card entity.

func (*UserUpdate) SetCardID

func (uu *UserUpdate) SetCardID(id int) *UserUpdate

SetCardID sets the "card" edge to the Card entity by ID.

func (*UserUpdate) SetEmployment added in v0.10.0

func (uu *UserUpdate) SetEmployment(u user.Employment) *UserUpdate

SetEmployment sets the "employment" field.

func (*UserUpdate) SetLast

func (uu *UserUpdate) SetLast(s string) *UserUpdate

SetLast sets the "last" 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) SetNillableAddress

func (uu *UserUpdate) SetNillableAddress(s *string) *UserUpdate

SetNillableAddress sets the "address" field if the given value is not nil.

func (*UserUpdate) SetNillableCardID

func (uu *UserUpdate) SetNillableCardID(id *int) *UserUpdate

SetNillableCardID sets the "card" edge to the Card entity by ID if the given value is not nil.

func (*UserUpdate) SetNillableEmployment added in v0.10.0

func (uu *UserUpdate) SetNillableEmployment(u *user.Employment) *UserUpdate

SetNillableEmployment sets the "employment" field if the given value is not nil.

func (*UserUpdate) SetNillableLast

func (uu *UserUpdate) SetNillableLast(s *string) *UserUpdate

SetNillableLast sets the "last" 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) SetNillableOptionalInt

func (uu *UserUpdate) SetNillableOptionalInt(i *int) *UserUpdate

SetNillableOptionalInt sets the "optional_int" field if the given value is not nil.

func (*UserUpdate) SetNillableParentID

func (uu *UserUpdate) SetNillableParentID(id *int) *UserUpdate

SetNillableParentID sets the "parent" edge to the User entity by ID if the given value is not nil.

func (*UserUpdate) SetNillablePassword

func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserUpdate) SetNillablePhone

func (uu *UserUpdate) SetNillablePhone(s *string) *UserUpdate

SetNillablePhone sets the "phone" field if the given value is not nil.

func (*UserUpdate) SetNillableRole

func (uu *UserUpdate) SetNillableRole(u *user.Role) *UserUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserUpdate) SetNillableSSOCert

func (uu *UserUpdate) SetNillableSSOCert(s *string) *UserUpdate

SetNillableSSOCert sets the "SSOCert" field if the given value is not nil.

func (*UserUpdate) SetNillableSpouseID

func (uu *UserUpdate) SetNillableSpouseID(id *int) *UserUpdate

SetNillableSpouseID sets the "spouse" edge to the User entity by ID if the given value is not nil.

func (*UserUpdate) SetNillableTeamID

func (uu *UserUpdate) SetNillableTeamID(id *int) *UserUpdate

SetNillableTeamID sets the "team" edge to the Pet entity by ID if the given value is not nil.

func (*UserUpdate) SetOptionalInt

func (uu *UserUpdate) SetOptionalInt(i int) *UserUpdate

SetOptionalInt sets the "optional_int" field.

func (*UserUpdate) SetParent

func (uu *UserUpdate) SetParent(u *User) *UserUpdate

SetParent sets the "parent" edge to the User entity.

func (*UserUpdate) SetParentID

func (uu *UserUpdate) SetParentID(id int) *UserUpdate

SetParentID sets the "parent" edge to the User entity by ID.

func (*UserUpdate) SetPassword

func (uu *UserUpdate) SetPassword(s string) *UserUpdate

SetPassword sets the "password" field.

func (*UserUpdate) SetPhone

func (uu *UserUpdate) SetPhone(s string) *UserUpdate

SetPhone sets the "phone" field.

func (*UserUpdate) SetRole

func (uu *UserUpdate) SetRole(u user.Role) *UserUpdate

SetRole sets the "role" field.

func (*UserUpdate) SetSSOCert

func (uu *UserUpdate) SetSSOCert(s string) *UserUpdate

SetSSOCert sets the "SSOCert" field.

func (*UserUpdate) SetSpouse

func (uu *UserUpdate) SetSpouse(u *User) *UserUpdate

SetSpouse sets the "spouse" edge to the User entity.

func (*UserUpdate) SetSpouseID

func (uu *UserUpdate) SetSpouseID(id int) *UserUpdate

SetSpouseID sets the "spouse" edge to the User entity by ID.

func (*UserUpdate) SetTeam

func (uu *UserUpdate) SetTeam(p *Pet) *UserUpdate

SetTeam sets the "team" edge to the Pet entity.

func (*UserUpdate) SetTeamID

func (uu *UserUpdate) SetTeamID(id int) *UserUpdate

SetTeamID sets the "team" edge to the Pet entity by ID.

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) AddAge

func (uuo *UserUpdateOne) AddAge(i int) *UserUpdateOne

AddAge adds i to the "age" field.

func (*UserUpdateOne) AddChildIDs

func (uuo *UserUpdateOne) AddChildIDs(ids ...int) *UserUpdateOne

AddChildIDs adds the "children" edge to the User entity by IDs.

func (*UserUpdateOne) AddChildren

func (uuo *UserUpdateOne) AddChildren(u ...*User) *UserUpdateOne

AddChildren adds the "children" edges to the User entity.

func (*UserUpdateOne) AddFileIDs

func (uuo *UserUpdateOne) AddFileIDs(ids ...int) *UserUpdateOne

AddFileIDs adds the "files" edge to the File entity by IDs.

func (*UserUpdateOne) AddFiles

func (uuo *UserUpdateOne) AddFiles(f ...*File) *UserUpdateOne

AddFiles adds the "files" edges to the File entity.

func (*UserUpdateOne) AddFollowerIDs

func (uuo *UserUpdateOne) AddFollowerIDs(ids ...int) *UserUpdateOne

AddFollowerIDs adds the "followers" edge to the User entity by IDs.

func (*UserUpdateOne) AddFollowers

func (uuo *UserUpdateOne) AddFollowers(u ...*User) *UserUpdateOne

AddFollowers adds the "followers" edges to the User entity.

func (*UserUpdateOne) AddFollowing

func (uuo *UserUpdateOne) AddFollowing(u ...*User) *UserUpdateOne

AddFollowing adds the "following" edges to the User entity.

func (*UserUpdateOne) AddFollowingIDs

func (uuo *UserUpdateOne) AddFollowingIDs(ids ...int) *UserUpdateOne

AddFollowingIDs adds the "following" edge to the User entity by IDs.

func (*UserUpdateOne) AddFriendIDs

func (uuo *UserUpdateOne) AddFriendIDs(ids ...int) *UserUpdateOne

AddFriendIDs adds the "friends" edge to the User entity by IDs.

func (*UserUpdateOne) AddFriends

func (uuo *UserUpdateOne) AddFriends(u ...*User) *UserUpdateOne

AddFriends adds the "friends" edges to the User entity.

func (*UserUpdateOne) AddGroupIDs

func (uuo *UserUpdateOne) AddGroupIDs(ids ...int) *UserUpdateOne

AddGroupIDs adds the "groups" edge to the Group entity by IDs.

func (*UserUpdateOne) AddGroups

func (uuo *UserUpdateOne) AddGroups(g ...*Group) *UserUpdateOne

AddGroups adds the "groups" edges to the Group entity.

func (*UserUpdateOne) AddOptionalInt

func (uuo *UserUpdateOne) AddOptionalInt(i int) *UserUpdateOne

AddOptionalInt adds i to the "optional_int" field.

func (*UserUpdateOne) AddPetIDs

func (uuo *UserUpdateOne) AddPetIDs(ids ...int) *UserUpdateOne

AddPetIDs adds the "pets" edge to the Pet entity by IDs.

func (*UserUpdateOne) AddPets

func (uuo *UserUpdateOne) AddPets(p ...*Pet) *UserUpdateOne

AddPets adds the "pets" edges to the Pet entity.

func (*UserUpdateOne) ClearAddress

func (uuo *UserUpdateOne) ClearAddress() *UserUpdateOne

ClearAddress clears the value of the "address" field.

func (*UserUpdateOne) ClearCard

func (uuo *UserUpdateOne) ClearCard() *UserUpdateOne

ClearCard clears the "card" edge to the Card entity.

func (*UserUpdateOne) ClearChildren

func (uuo *UserUpdateOne) ClearChildren() *UserUpdateOne

ClearChildren clears all "children" edges to the User entity.

func (*UserUpdateOne) ClearFiles

func (uuo *UserUpdateOne) ClearFiles() *UserUpdateOne

ClearFiles clears all "files" edges to the File entity.

func (*UserUpdateOne) ClearFollowers

func (uuo *UserUpdateOne) ClearFollowers() *UserUpdateOne

ClearFollowers clears all "followers" edges to the User entity.

func (*UserUpdateOne) ClearFollowing

func (uuo *UserUpdateOne) ClearFollowing() *UserUpdateOne

ClearFollowing clears all "following" edges to the User entity.

func (*UserUpdateOne) ClearFriends

func (uuo *UserUpdateOne) ClearFriends() *UserUpdateOne

ClearFriends clears all "friends" edges to the User entity.

func (*UserUpdateOne) ClearGroups

func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne

ClearGroups clears all "groups" edges to the Group entity.

func (*UserUpdateOne) ClearNickname

func (uuo *UserUpdateOne) ClearNickname() *UserUpdateOne

ClearNickname clears the value of the "nickname" field.

func (*UserUpdateOne) ClearOptionalInt

func (uuo *UserUpdateOne) ClearOptionalInt() *UserUpdateOne

ClearOptionalInt clears the value of the "optional_int" field.

func (*UserUpdateOne) ClearParent

func (uuo *UserUpdateOne) ClearParent() *UserUpdateOne

ClearParent clears the "parent" edge to the User entity.

func (*UserUpdateOne) ClearPassword

func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne

ClearPassword clears the value of the "password" field.

func (*UserUpdateOne) ClearPets

func (uuo *UserUpdateOne) ClearPets() *UserUpdateOne

ClearPets clears all "pets" edges to the Pet entity.

func (*UserUpdateOne) ClearPhone

func (uuo *UserUpdateOne) ClearPhone() *UserUpdateOne

ClearPhone clears the value of the "phone" field.

func (*UserUpdateOne) ClearSSOCert

func (uuo *UserUpdateOne) ClearSSOCert() *UserUpdateOne

ClearSSOCert clears the value of the "SSOCert" field.

func (*UserUpdateOne) ClearSpouse

func (uuo *UserUpdateOne) ClearSpouse() *UserUpdateOne

ClearSpouse clears the "spouse" edge to the User entity.

func (*UserUpdateOne) ClearTeam

func (uuo *UserUpdateOne) ClearTeam() *UserUpdateOne

ClearTeam clears the "team" edge to the Pet 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) RemoveChildIDs

func (uuo *UserUpdateOne) RemoveChildIDs(ids ...int) *UserUpdateOne

RemoveChildIDs removes the "children" edge to User entities by IDs.

func (*UserUpdateOne) RemoveChildren

func (uuo *UserUpdateOne) RemoveChildren(u ...*User) *UserUpdateOne

RemoveChildren removes "children" edges to User entities.

func (*UserUpdateOne) RemoveFileIDs

func (uuo *UserUpdateOne) RemoveFileIDs(ids ...int) *UserUpdateOne

RemoveFileIDs removes the "files" edge to File entities by IDs.

func (*UserUpdateOne) RemoveFiles

func (uuo *UserUpdateOne) RemoveFiles(f ...*File) *UserUpdateOne

RemoveFiles removes "files" edges to File entities.

func (*UserUpdateOne) RemoveFollowerIDs

func (uuo *UserUpdateOne) RemoveFollowerIDs(ids ...int) *UserUpdateOne

RemoveFollowerIDs removes the "followers" edge to User entities by IDs.

func (*UserUpdateOne) RemoveFollowers

func (uuo *UserUpdateOne) RemoveFollowers(u ...*User) *UserUpdateOne

RemoveFollowers removes "followers" edges to User entities.

func (*UserUpdateOne) RemoveFollowing

func (uuo *UserUpdateOne) RemoveFollowing(u ...*User) *UserUpdateOne

RemoveFollowing removes "following" edges to User entities.

func (*UserUpdateOne) RemoveFollowingIDs

func (uuo *UserUpdateOne) RemoveFollowingIDs(ids ...int) *UserUpdateOne

RemoveFollowingIDs removes the "following" edge to User entities by IDs.

func (*UserUpdateOne) RemoveFriendIDs

func (uuo *UserUpdateOne) RemoveFriendIDs(ids ...int) *UserUpdateOne

RemoveFriendIDs removes the "friends" edge to User entities by IDs.

func (*UserUpdateOne) RemoveFriends

func (uuo *UserUpdateOne) RemoveFriends(u ...*User) *UserUpdateOne

RemoveFriends removes "friends" edges to User entities.

func (*UserUpdateOne) RemoveGroupIDs

func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...int) *UserUpdateOne

RemoveGroupIDs removes the "groups" edge to Group entities by IDs.

func (*UserUpdateOne) RemoveGroups

func (uuo *UserUpdateOne) RemoveGroups(g ...*Group) *UserUpdateOne

RemoveGroups removes "groups" edges to Group entities.

func (*UserUpdateOne) RemovePetIDs

func (uuo *UserUpdateOne) RemovePetIDs(ids ...int) *UserUpdateOne

RemovePetIDs removes the "pets" edge to Pet entities by IDs.

func (*UserUpdateOne) RemovePets

func (uuo *UserUpdateOne) RemovePets(p ...*Pet) *UserUpdateOne

RemovePets removes "pets" edges to Pet 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 added in v0.8.0

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) SetAddress

func (uuo *UserUpdateOne) SetAddress(s string) *UserUpdateOne

SetAddress sets the "address" field.

func (*UserUpdateOne) SetAge

func (uuo *UserUpdateOne) SetAge(i int) *UserUpdateOne

SetAge sets the "age" field.

func (*UserUpdateOne) SetCard

func (uuo *UserUpdateOne) SetCard(c *Card) *UserUpdateOne

SetCard sets the "card" edge to the Card entity.

func (*UserUpdateOne) SetCardID

func (uuo *UserUpdateOne) SetCardID(id int) *UserUpdateOne

SetCardID sets the "card" edge to the Card entity by ID.

func (*UserUpdateOne) SetEmployment added in v0.10.0

func (uuo *UserUpdateOne) SetEmployment(u user.Employment) *UserUpdateOne

SetEmployment sets the "employment" field.

func (*UserUpdateOne) SetLast

func (uuo *UserUpdateOne) SetLast(s string) *UserUpdateOne

SetLast sets the "last" 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) SetNillableAddress

func (uuo *UserUpdateOne) SetNillableAddress(s *string) *UserUpdateOne

SetNillableAddress sets the "address" field if the given value is not nil.

func (*UserUpdateOne) SetNillableCardID

func (uuo *UserUpdateOne) SetNillableCardID(id *int) *UserUpdateOne

SetNillableCardID sets the "card" edge to the Card entity by ID if the given value is not nil.

func (*UserUpdateOne) SetNillableEmployment added in v0.10.0

func (uuo *UserUpdateOne) SetNillableEmployment(u *user.Employment) *UserUpdateOne

SetNillableEmployment sets the "employment" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLast

func (uuo *UserUpdateOne) SetNillableLast(s *string) *UserUpdateOne

SetNillableLast sets the "last" 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) SetNillableOptionalInt

func (uuo *UserUpdateOne) SetNillableOptionalInt(i *int) *UserUpdateOne

SetNillableOptionalInt sets the "optional_int" field if the given value is not nil.

func (*UserUpdateOne) SetNillableParentID

func (uuo *UserUpdateOne) SetNillableParentID(id *int) *UserUpdateOne

SetNillableParentID sets the "parent" edge to the User entity by ID if the given value is not nil.

func (*UserUpdateOne) SetNillablePassword

func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserUpdateOne) SetNillablePhone

func (uuo *UserUpdateOne) SetNillablePhone(s *string) *UserUpdateOne

SetNillablePhone sets the "phone" field if the given value is not nil.

func (*UserUpdateOne) SetNillableRole

func (uuo *UserUpdateOne) SetNillableRole(u *user.Role) *UserUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserUpdateOne) SetNillableSSOCert

func (uuo *UserUpdateOne) SetNillableSSOCert(s *string) *UserUpdateOne

SetNillableSSOCert sets the "SSOCert" field if the given value is not nil.

func (*UserUpdateOne) SetNillableSpouseID

func (uuo *UserUpdateOne) SetNillableSpouseID(id *int) *UserUpdateOne

SetNillableSpouseID sets the "spouse" edge to the User entity by ID if the given value is not nil.

func (*UserUpdateOne) SetNillableTeamID

func (uuo *UserUpdateOne) SetNillableTeamID(id *int) *UserUpdateOne

SetNillableTeamID sets the "team" edge to the Pet entity by ID if the given value is not nil.

func (*UserUpdateOne) SetOptionalInt

func (uuo *UserUpdateOne) SetOptionalInt(i int) *UserUpdateOne

SetOptionalInt sets the "optional_int" field.

func (*UserUpdateOne) SetParent

func (uuo *UserUpdateOne) SetParent(u *User) *UserUpdateOne

SetParent sets the "parent" edge to the User entity.

func (*UserUpdateOne) SetParentID

func (uuo *UserUpdateOne) SetParentID(id int) *UserUpdateOne

SetParentID sets the "parent" edge to the User entity by ID.

func (*UserUpdateOne) SetPassword

func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne

SetPassword sets the "password" field.

func (*UserUpdateOne) SetPhone

func (uuo *UserUpdateOne) SetPhone(s string) *UserUpdateOne

SetPhone sets the "phone" field.

func (*UserUpdateOne) SetRole

func (uuo *UserUpdateOne) SetRole(u user.Role) *UserUpdateOne

SetRole sets the "role" field.

func (*UserUpdateOne) SetSSOCert

func (uuo *UserUpdateOne) SetSSOCert(s string) *UserUpdateOne

SetSSOCert sets the "SSOCert" field.

func (*UserUpdateOne) SetSpouse

func (uuo *UserUpdateOne) SetSpouse(u *User) *UserUpdateOne

SetSpouse sets the "spouse" edge to the User entity.

func (*UserUpdateOne) SetSpouseID

func (uuo *UserUpdateOne) SetSpouseID(id int) *UserUpdateOne

SetSpouseID sets the "spouse" edge to the User entity by ID.

func (*UserUpdateOne) SetTeam

func (uuo *UserUpdateOne) SetTeam(p *Pet) *UserUpdateOne

SetTeam sets the "team" edge to the Pet entity.

func (*UserUpdateOne) SetTeamID

func (uuo *UserUpdateOne) SetTeamID(id int) *UserUpdateOne

SetTeamID sets the "team" edge to the Pet entity by ID.

type UserUpsert added in v0.9.0

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) AddAge added in v0.10.0

func (u *UserUpsert) AddAge(v int) *UserUpsert

AddAge adds v to the "age" field.

func (*UserUpsert) AddOptionalInt added in v0.10.0

func (u *UserUpsert) AddOptionalInt(v int) *UserUpsert

AddOptionalInt adds v to the "optional_int" field.

func (*UserUpsert) ClearAddress added in v0.9.0

func (u *UserUpsert) ClearAddress() *UserUpsert

ClearAddress clears the value of the "address" field.

func (*UserUpsert) ClearNickname added in v0.9.0

func (u *UserUpsert) ClearNickname() *UserUpsert

ClearNickname clears the value of the "nickname" field.

func (*UserUpsert) ClearOptionalInt added in v0.9.0

func (u *UserUpsert) ClearOptionalInt() *UserUpsert

ClearOptionalInt clears the value of the "optional_int" field.

func (*UserUpsert) ClearPassword added in v0.9.0

func (u *UserUpsert) ClearPassword() *UserUpsert

ClearPassword clears the value of the "password" field.

func (*UserUpsert) ClearPhone added in v0.9.0

func (u *UserUpsert) ClearPhone() *UserUpsert

ClearPhone clears the value of the "phone" field.

func (*UserUpsert) ClearSSOCert added in v0.9.0

func (u *UserUpsert) ClearSSOCert() *UserUpsert

ClearSSOCert clears the value of the "SSOCert" field.

func (*UserUpsert) SetAddress added in v0.9.0

func (u *UserUpsert) SetAddress(v string) *UserUpsert

SetAddress sets the "address" field.

func (*UserUpsert) SetAge added in v0.9.0

func (u *UserUpsert) SetAge(v int) *UserUpsert

SetAge sets the "age" field.

func (*UserUpsert) SetEmployment added in v0.10.0

func (u *UserUpsert) SetEmployment(v user.Employment) *UserUpsert

SetEmployment sets the "employment" field.

func (*UserUpsert) SetLast added in v0.9.0

func (u *UserUpsert) SetLast(v string) *UserUpsert

SetLast sets the "last" field.

func (*UserUpsert) SetName added in v0.9.0

func (u *UserUpsert) SetName(v string) *UserUpsert

SetName sets the "name" field.

func (*UserUpsert) SetNickname added in v0.9.0

func (u *UserUpsert) SetNickname(v string) *UserUpsert

SetNickname sets the "nickname" field.

func (*UserUpsert) SetOptionalInt added in v0.9.0

func (u *UserUpsert) SetOptionalInt(v int) *UserUpsert

SetOptionalInt sets the "optional_int" field.

func (*UserUpsert) SetPassword added in v0.9.0

func (u *UserUpsert) SetPassword(v string) *UserUpsert

SetPassword sets the "password" field.

func (*UserUpsert) SetPhone added in v0.9.0

func (u *UserUpsert) SetPhone(v string) *UserUpsert

SetPhone sets the "phone" field.

func (*UserUpsert) SetRole added in v0.9.0

func (u *UserUpsert) SetRole(v user.Role) *UserUpsert

SetRole sets the "role" field.

func (*UserUpsert) SetSSOCert added in v0.9.0

func (u *UserUpsert) SetSSOCert(v string) *UserUpsert

SetSSOCert sets the "SSOCert" field.

func (*UserUpsert) UpdateAddress added in v0.9.0

func (u *UserUpsert) UpdateAddress() *UserUpsert

UpdateAddress sets the "address" field to the value that was provided on create.

func (*UserUpsert) UpdateAge added in v0.9.0

func (u *UserUpsert) UpdateAge() *UserUpsert

UpdateAge sets the "age" field to the value that was provided on create.

func (*UserUpsert) UpdateEmployment added in v0.10.0

func (u *UserUpsert) UpdateEmployment() *UserUpsert

UpdateEmployment sets the "employment" field to the value that was provided on create.

func (*UserUpsert) UpdateLast added in v0.9.0

func (u *UserUpsert) UpdateLast() *UserUpsert

UpdateLast sets the "last" field to the value that was provided on create.

func (*UserUpsert) UpdateName added in v0.9.0

func (u *UserUpsert) UpdateName() *UserUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsert) UpdateNickname added in v0.9.0

func (u *UserUpsert) UpdateNickname() *UserUpsert

UpdateNickname sets the "nickname" field to the value that was provided on create.

func (*UserUpsert) UpdateOptionalInt added in v0.9.0

func (u *UserUpsert) UpdateOptionalInt() *UserUpsert

UpdateOptionalInt sets the "optional_int" field to the value that was provided on create.

func (*UserUpsert) UpdatePassword added in v0.9.0

func (u *UserUpsert) UpdatePassword() *UserUpsert

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserUpsert) UpdatePhone added in v0.9.0

func (u *UserUpsert) UpdatePhone() *UserUpsert

UpdatePhone sets the "phone" field to the value that was provided on create.

func (*UserUpsert) UpdateRole added in v0.9.0

func (u *UserUpsert) UpdateRole() *UserUpsert

UpdateRole sets the "role" field to the value that was provided on create.

func (*UserUpsert) UpdateSSOCert added in v0.9.0

func (u *UserUpsert) UpdateSSOCert() *UserUpsert

UpdateSSOCert sets the "SSOCert" field to the value that was provided on create.

type UserUpsertBulk added in v0.9.0

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) AddAge added in v0.10.0

func (u *UserUpsertBulk) AddAge(v int) *UserUpsertBulk

AddAge adds v to the "age" field.

func (*UserUpsertBulk) AddOptionalInt added in v0.10.0

func (u *UserUpsertBulk) AddOptionalInt(v int) *UserUpsertBulk

AddOptionalInt adds v to the "optional_int" field.

func (*UserUpsertBulk) ClearAddress added in v0.9.0

func (u *UserUpsertBulk) ClearAddress() *UserUpsertBulk

ClearAddress clears the value of the "address" field.

func (*UserUpsertBulk) ClearNickname added in v0.9.0

func (u *UserUpsertBulk) ClearNickname() *UserUpsertBulk

ClearNickname clears the value of the "nickname" field.

func (*UserUpsertBulk) ClearOptionalInt added in v0.9.0

func (u *UserUpsertBulk) ClearOptionalInt() *UserUpsertBulk

ClearOptionalInt clears the value of the "optional_int" field.

func (*UserUpsertBulk) ClearPassword added in v0.9.0

func (u *UserUpsertBulk) ClearPassword() *UserUpsertBulk

ClearPassword clears the value of the "password" field.

func (*UserUpsertBulk) ClearPhone added in v0.9.0

func (u *UserUpsertBulk) ClearPhone() *UserUpsertBulk

ClearPhone clears the value of the "phone" field.

func (*UserUpsertBulk) ClearSSOCert added in v0.9.0

func (u *UserUpsertBulk) ClearSSOCert() *UserUpsertBulk

ClearSSOCert clears the value of the "SSOCert" field.

func (*UserUpsertBulk) DoNothing added in v0.9.0

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec added in v0.9.0

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX added in v0.9.0

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore added in v0.9.0

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) SetAddress added in v0.9.0

func (u *UserUpsertBulk) SetAddress(v string) *UserUpsertBulk

SetAddress sets the "address" field.

func (*UserUpsertBulk) SetAge added in v0.9.0

func (u *UserUpsertBulk) SetAge(v int) *UserUpsertBulk

SetAge sets the "age" field.

func (*UserUpsertBulk) SetEmployment added in v0.10.0

func (u *UserUpsertBulk) SetEmployment(v user.Employment) *UserUpsertBulk

SetEmployment sets the "employment" field.

func (*UserUpsertBulk) SetLast added in v0.9.0

func (u *UserUpsertBulk) SetLast(v string) *UserUpsertBulk

SetLast sets the "last" field.

func (*UserUpsertBulk) SetName added in v0.9.0

func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk

SetName sets the "name" field.

func (*UserUpsertBulk) SetNickname added in v0.9.0

func (u *UserUpsertBulk) SetNickname(v string) *UserUpsertBulk

SetNickname sets the "nickname" field.

func (*UserUpsertBulk) SetOptionalInt added in v0.9.0

func (u *UserUpsertBulk) SetOptionalInt(v int) *UserUpsertBulk

SetOptionalInt sets the "optional_int" field.

func (*UserUpsertBulk) SetPassword added in v0.9.0

func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk

SetPassword sets the "password" field.

func (*UserUpsertBulk) SetPhone added in v0.9.0

func (u *UserUpsertBulk) SetPhone(v string) *UserUpsertBulk

SetPhone sets the "phone" field.

func (*UserUpsertBulk) SetRole added in v0.9.0

func (u *UserUpsertBulk) SetRole(v user.Role) *UserUpsertBulk

SetRole sets the "role" field.

func (*UserUpsertBulk) SetSSOCert added in v0.9.0

func (u *UserUpsertBulk) SetSSOCert(v string) *UserUpsertBulk

SetSSOCert sets the "SSOCert" field.

func (*UserUpsertBulk) Update added in v0.9.0

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateAddress added in v0.9.0

func (u *UserUpsertBulk) UpdateAddress() *UserUpsertBulk

UpdateAddress sets the "address" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateAge added in v0.9.0

func (u *UserUpsertBulk) UpdateAge() *UserUpsertBulk

UpdateAge sets the "age" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateEmployment added in v0.10.0

func (u *UserUpsertBulk) UpdateEmployment() *UserUpsertBulk

UpdateEmployment sets the "employment" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateLast added in v0.9.0

func (u *UserUpsertBulk) UpdateLast() *UserUpsertBulk

UpdateLast sets the "last" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateName added in v0.9.0

func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues added in v0.9.0

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 added in v0.9.0

func (u *UserUpsertBulk) UpdateNickname() *UserUpsertBulk

UpdateNickname sets the "nickname" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateOptionalInt added in v0.9.0

func (u *UserUpsertBulk) UpdateOptionalInt() *UserUpsertBulk

UpdateOptionalInt sets the "optional_int" field to the value that was provided on create.

func (*UserUpsertBulk) UpdatePassword added in v0.9.0

func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserUpsertBulk) UpdatePhone added in v0.9.0

func (u *UserUpsertBulk) UpdatePhone() *UserUpsertBulk

UpdatePhone sets the "phone" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateRole added in v0.9.0

func (u *UserUpsertBulk) UpdateRole() *UserUpsertBulk

UpdateRole sets the "role" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateSSOCert added in v0.9.0

func (u *UserUpsertBulk) UpdateSSOCert() *UserUpsertBulk

UpdateSSOCert sets the "SSOCert" field to the value that was provided on create.

type UserUpsertOne added in v0.9.0

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) AddAge added in v0.10.0

func (u *UserUpsertOne) AddAge(v int) *UserUpsertOne

AddAge adds v to the "age" field.

func (*UserUpsertOne) AddOptionalInt added in v0.10.0

func (u *UserUpsertOne) AddOptionalInt(v int) *UserUpsertOne

AddOptionalInt adds v to the "optional_int" field.

func (*UserUpsertOne) ClearAddress added in v0.9.0

func (u *UserUpsertOne) ClearAddress() *UserUpsertOne

ClearAddress clears the value of the "address" field.

func (*UserUpsertOne) ClearNickname added in v0.9.0

func (u *UserUpsertOne) ClearNickname() *UserUpsertOne

ClearNickname clears the value of the "nickname" field.

func (*UserUpsertOne) ClearOptionalInt added in v0.9.0

func (u *UserUpsertOne) ClearOptionalInt() *UserUpsertOne

ClearOptionalInt clears the value of the "optional_int" field.

func (*UserUpsertOne) ClearPassword added in v0.9.0

func (u *UserUpsertOne) ClearPassword() *UserUpsertOne

ClearPassword clears the value of the "password" field.

func (*UserUpsertOne) ClearPhone added in v0.9.0

func (u *UserUpsertOne) ClearPhone() *UserUpsertOne

ClearPhone clears the value of the "phone" field.

func (*UserUpsertOne) ClearSSOCert added in v0.9.0

func (u *UserUpsertOne) ClearSSOCert() *UserUpsertOne

ClearSSOCert clears the value of the "SSOCert" field.

func (*UserUpsertOne) DoNothing added in v0.9.0

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec added in v0.9.0

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX added in v0.9.0

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID added in v0.9.0

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 added in v0.9.0

func (u *UserUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore added in v0.9.0

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) SetAddress added in v0.9.0

func (u *UserUpsertOne) SetAddress(v string) *UserUpsertOne

SetAddress sets the "address" field.

func (*UserUpsertOne) SetAge added in v0.9.0

func (u *UserUpsertOne) SetAge(v int) *UserUpsertOne

SetAge sets the "age" field.

func (*UserUpsertOne) SetEmployment added in v0.10.0

func (u *UserUpsertOne) SetEmployment(v user.Employment) *UserUpsertOne

SetEmployment sets the "employment" field.

func (*UserUpsertOne) SetLast added in v0.9.0

func (u *UserUpsertOne) SetLast(v string) *UserUpsertOne

SetLast sets the "last" field.

func (*UserUpsertOne) SetName added in v0.9.0

func (u *UserUpsertOne) SetName(v string) *UserUpsertOne

SetName sets the "name" field.

func (*UserUpsertOne) SetNickname added in v0.9.0

func (u *UserUpsertOne) SetNickname(v string) *UserUpsertOne

SetNickname sets the "nickname" field.

func (*UserUpsertOne) SetOptionalInt added in v0.9.0

func (u *UserUpsertOne) SetOptionalInt(v int) *UserUpsertOne

SetOptionalInt sets the "optional_int" field.

func (*UserUpsertOne) SetPassword added in v0.9.0

func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne

SetPassword sets the "password" field.

func (*UserUpsertOne) SetPhone added in v0.9.0

func (u *UserUpsertOne) SetPhone(v string) *UserUpsertOne

SetPhone sets the "phone" field.

func (*UserUpsertOne) SetRole added in v0.9.0

func (u *UserUpsertOne) SetRole(v user.Role) *UserUpsertOne

SetRole sets the "role" field.

func (*UserUpsertOne) SetSSOCert added in v0.9.0

func (u *UserUpsertOne) SetSSOCert(v string) *UserUpsertOne

SetSSOCert sets the "SSOCert" field.

func (*UserUpsertOne) Update added in v0.9.0

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateAddress added in v0.9.0

func (u *UserUpsertOne) UpdateAddress() *UserUpsertOne

UpdateAddress sets the "address" field to the value that was provided on create.

func (*UserUpsertOne) UpdateAge added in v0.9.0

func (u *UserUpsertOne) UpdateAge() *UserUpsertOne

UpdateAge sets the "age" field to the value that was provided on create.

func (*UserUpsertOne) UpdateEmployment added in v0.10.0

func (u *UserUpsertOne) UpdateEmployment() *UserUpsertOne

UpdateEmployment sets the "employment" field to the value that was provided on create.

func (*UserUpsertOne) UpdateLast added in v0.9.0

func (u *UserUpsertOne) UpdateLast() *UserUpsertOne

UpdateLast sets the "last" field to the value that was provided on create.

func (*UserUpsertOne) UpdateName added in v0.9.0

func (u *UserUpsertOne) UpdateName() *UserUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues added in v0.9.0

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 added in v0.9.0

func (u *UserUpsertOne) UpdateNickname() *UserUpsertOne

UpdateNickname sets the "nickname" field to the value that was provided on create.

func (*UserUpsertOne) UpdateOptionalInt added in v0.9.0

func (u *UserUpsertOne) UpdateOptionalInt() *UserUpsertOne

UpdateOptionalInt sets the "optional_int" field to the value that was provided on create.

func (*UserUpsertOne) UpdatePassword added in v0.9.0

func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserUpsertOne) UpdatePhone added in v0.9.0

func (u *UserUpsertOne) UpdatePhone() *UserUpsertOne

UpdatePhone sets the "phone" field to the value that was provided on create.

func (*UserUpsertOne) UpdateRole added in v0.9.0

func (u *UserUpsertOne) UpdateRole() *UserUpsertOne

UpdateRole sets the "role" field to the value that was provided on create.

func (*UserUpsertOne) UpdateSSOCert added in v0.9.0

func (u *UserUpsertOne) UpdateSSOCert() *UserUpsertOne

UpdateSSOCert sets the "SSOCert" 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL