ent

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 21 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.
	TypeUser              = "User"
	TypeWithFields        = "WithFields"
	TypeWithModifiedField = "WithModifiedField"
	TypeWithNilFields     = "WithNilFields"
	TypeWithoutFields     = "WithoutFields"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// User is the client for interacting with the User builders.
	User *UserClient
	// WithFields is the client for interacting with the WithFields builders.
	WithFields *WithFieldsClient
	// WithModifiedField is the client for interacting with the WithModifiedField builders.
	WithModifiedField *WithModifiedFieldClient
	// WithNilFields is the client for interacting with the WithNilFields builders.
	WithNilFields *WithNilFieldsClient
	// WithoutFields is the client for interacting with the WithoutFields builders.
	WithoutFields *WithoutFieldsClient
	// 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().
	User.
	Query().
	Count(ctx)

func (*Client) Intercept

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

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

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

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

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

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// User is the client for interacting with the User builders.
	User *UserClient
	// WithFields is the client for interacting with the WithFields builders.
	WithFields *WithFieldsClient
	// WithModifiedField is the client for interacting with the WithModifiedField builders.
	WithModifiedField *WithModifiedFieldClient
	// WithNilFields is the client for interacting with the WithNilFields builders.
	WithNilFields *WithNilFieldsClient
	// WithoutFields is the client for interacting with the WithoutFields builders.
	WithoutFields *WithoutFieldsClient
	// 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"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

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

func (*User) Value

func (u *User) Value(name string) (ent.Value, error)

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

type UserClient

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

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

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

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int) *UserDeleteOne

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

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int) *User

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

func (*UserClient) Hooks

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

Hooks returns the client hooks.

func (*UserClient) Intercept

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

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

func (*UserClient) Interceptors

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

Interceptors returns the client interceptors.

func (*UserClient) MapCreateBulk

func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id int) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

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

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

type UserCreate

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

UserCreate is the builder for creating a User entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

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

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

type UserCreateBulk

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

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

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

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

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

type UserDelete

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

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

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

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

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

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

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

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

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

func (*UserDeleteOne) Where

func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserGroupBy

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

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

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

func (*UserGroupBy) Bool

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

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

func (*UserGroupBy) BoolX

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

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

func (*UserGroupBy) Bools

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

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

func (*UserGroupBy) BoolsX

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

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

func (*UserGroupBy) Float64

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

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

func (*UserGroupBy) Float64X

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

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

func (*UserGroupBy) Float64s

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

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

func (*UserGroupBy) Float64sX

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

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

func (*UserGroupBy) Int

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

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

func (*UserGroupBy) IntX

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

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

func (*UserGroupBy) Ints

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

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

func (*UserGroupBy) IntsX

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

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

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

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

func (*UserGroupBy) ScanX

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

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

func (*UserGroupBy) String

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

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

func (*UserGroupBy) StringX

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

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

func (*UserGroupBy) Strings

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

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

func (*UserGroupBy) StringsX

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

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

type UserMutation

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

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) 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) 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) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearedEdges

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

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

func (*UserMutation) ClearedFields

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

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

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) EdgeCleared

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

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

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

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

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

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) ID

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

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

func (*UserMutation) IDs

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

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

func (*UserMutation) 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) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) RemovedEdges

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

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

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

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

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

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

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

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

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

type UserQuery

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

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

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

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

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

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

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

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

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

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

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

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

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

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int

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

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

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

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

func (*UserQuery) IDs

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

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

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int

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

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

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

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

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

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int

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

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

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

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) 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.

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

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

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

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

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

func (*UserSelect) BoolX

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

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

func (*UserSelect) Bools

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

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

func (*UserSelect) BoolsX

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

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

func (*UserSelect) Float64

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

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

func (*UserSelect) Float64X

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

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

func (*UserSelect) Float64s

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

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

func (*UserSelect) Float64sX

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

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

func (*UserSelect) Int

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

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

func (*UserSelect) IntX

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

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

func (*UserSelect) Ints

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

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

func (*UserSelect) IntsX

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

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

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v any) error

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

func (*UserSelect) ScanX

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

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

func (*UserSelect) String

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

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

func (*UserSelect) StringX

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

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

func (*UserSelect) Strings

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

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

func (*UserSelect) StringsX

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

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

type UserUpdate

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

UserUpdate is the builder for updating User entities.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

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

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

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

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

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

func (*UserUpdate) 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) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

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

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

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

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

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

func (*UserUpdateOne) Where

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

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.

type WithFields

type WithFields struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Existing holds the value of the "existing" field.
	Existing string `json:"existing,omitempty"`
	// contains filtered or unexported fields
}

WithFields is the model entity for the WithFields schema.

func (*WithFields) String

func (wf *WithFields) String() string

String implements the fmt.Stringer.

func (*WithFields) Unwrap

func (wf *WithFields) Unwrap() *WithFields

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

func (wf *WithFields) Update() *WithFieldsUpdateOne

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

func (*WithFields) Value

func (wf *WithFields) Value(name string) (ent.Value, error)

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

type WithFieldsClient

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

WithFieldsClient is a client for the WithFields schema.

func NewWithFieldsClient

func NewWithFieldsClient(c config) *WithFieldsClient

NewWithFieldsClient returns a client for the WithFields from the given config.

func (*WithFieldsClient) Create

func (c *WithFieldsClient) Create() *WithFieldsCreate

Create returns a builder for creating a WithFields entity.

func (*WithFieldsClient) CreateBulk

func (c *WithFieldsClient) CreateBulk(builders ...*WithFieldsCreate) *WithFieldsCreateBulk

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

func (*WithFieldsClient) Delete

func (c *WithFieldsClient) Delete() *WithFieldsDelete

Delete returns a delete builder for WithFields.

func (*WithFieldsClient) DeleteOne

func (c *WithFieldsClient) DeleteOne(wf *WithFields) *WithFieldsDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WithFieldsClient) DeleteOneID

func (c *WithFieldsClient) DeleteOneID(id int) *WithFieldsDeleteOne

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

func (*WithFieldsClient) Get

func (c *WithFieldsClient) Get(ctx context.Context, id int) (*WithFields, error)

Get returns a WithFields entity by its id.

func (*WithFieldsClient) GetX

func (c *WithFieldsClient) GetX(ctx context.Context, id int) *WithFields

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

func (*WithFieldsClient) Hooks

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

Hooks returns the client hooks.

func (*WithFieldsClient) Intercept

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

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

func (*WithFieldsClient) Interceptors

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

Interceptors returns the client interceptors.

func (*WithFieldsClient) MapCreateBulk

func (c *WithFieldsClient) MapCreateBulk(slice any, setFunc func(*WithFieldsCreate, int)) *WithFieldsCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*WithFieldsClient) Query

func (c *WithFieldsClient) Query() *WithFieldsQuery

Query returns a query builder for WithFields.

func (*WithFieldsClient) Update

func (c *WithFieldsClient) Update() *WithFieldsUpdate

Update returns an update builder for WithFields.

func (*WithFieldsClient) UpdateOne

func (c *WithFieldsClient) UpdateOne(wf *WithFields) *WithFieldsUpdateOne

UpdateOne returns an update builder for the given entity.

func (*WithFieldsClient) UpdateOneID

func (c *WithFieldsClient) UpdateOneID(id int) *WithFieldsUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WithFieldsClient) Use

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

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

type WithFieldsCreate

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

WithFieldsCreate is the builder for creating a WithFields entity.

func (*WithFieldsCreate) Exec

func (wfc *WithFieldsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WithFieldsCreate) ExecX

func (wfc *WithFieldsCreate) ExecX(ctx context.Context)

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

func (*WithFieldsCreate) Mutation

func (wfc *WithFieldsCreate) Mutation() *WithFieldsMutation

Mutation returns the WithFieldsMutation object of the builder.

func (*WithFieldsCreate) Save

func (wfc *WithFieldsCreate) Save(ctx context.Context) (*WithFields, error)

Save creates the WithFields in the database.

func (*WithFieldsCreate) SaveX

func (wfc *WithFieldsCreate) SaveX(ctx context.Context) *WithFields

SaveX calls Save and panics if Save returns an error.

func (*WithFieldsCreate) SetExisting

func (wfc *WithFieldsCreate) SetExisting(s string) *WithFieldsCreate

SetExisting sets the "existing" field.

type WithFieldsCreateBulk

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

WithFieldsCreateBulk is the builder for creating many WithFields entities in bulk.

func (*WithFieldsCreateBulk) Exec

func (wfcb *WithFieldsCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WithFieldsCreateBulk) ExecX

func (wfcb *WithFieldsCreateBulk) ExecX(ctx context.Context)

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

func (*WithFieldsCreateBulk) Save

func (wfcb *WithFieldsCreateBulk) Save(ctx context.Context) ([]*WithFields, error)

Save creates the WithFields entities in the database.

func (*WithFieldsCreateBulk) SaveX

func (wfcb *WithFieldsCreateBulk) SaveX(ctx context.Context) []*WithFields

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

type WithFieldsDelete

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

WithFieldsDelete is the builder for deleting a WithFields entity.

func (*WithFieldsDelete) Exec

func (wfd *WithFieldsDelete) Exec(ctx context.Context) (int, error)

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

func (*WithFieldsDelete) ExecX

func (wfd *WithFieldsDelete) ExecX(ctx context.Context) int

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

func (*WithFieldsDelete) Where

Where appends a list predicates to the WithFieldsDelete builder.

type WithFieldsDeleteOne

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

WithFieldsDeleteOne is the builder for deleting a single WithFields entity.

func (*WithFieldsDeleteOne) Exec

func (wfdo *WithFieldsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WithFieldsDeleteOne) ExecX

func (wfdo *WithFieldsDeleteOne) ExecX(ctx context.Context)

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

func (*WithFieldsDeleteOne) Where

Where appends a list predicates to the WithFieldsDelete builder.

type WithFieldsGroupBy

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

WithFieldsGroupBy is the group-by builder for WithFields entities.

func (*WithFieldsGroupBy) Aggregate

func (wfgb *WithFieldsGroupBy) Aggregate(fns ...AggregateFunc) *WithFieldsGroupBy

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

func (*WithFieldsGroupBy) Bool

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

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

func (*WithFieldsGroupBy) BoolX

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

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

func (*WithFieldsGroupBy) Bools

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

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

func (*WithFieldsGroupBy) BoolsX

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

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

func (*WithFieldsGroupBy) Float64

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

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

func (*WithFieldsGroupBy) Float64X

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

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

func (*WithFieldsGroupBy) Float64s

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

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

func (*WithFieldsGroupBy) Float64sX

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

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

func (*WithFieldsGroupBy) Int

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

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

func (*WithFieldsGroupBy) IntX

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

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

func (*WithFieldsGroupBy) Ints

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

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

func (*WithFieldsGroupBy) IntsX

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

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

func (*WithFieldsGroupBy) Scan

func (wfgb *WithFieldsGroupBy) Scan(ctx context.Context, v any) error

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

func (*WithFieldsGroupBy) ScanX

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

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

func (*WithFieldsGroupBy) String

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

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

func (*WithFieldsGroupBy) StringX

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

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

func (*WithFieldsGroupBy) Strings

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

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

func (*WithFieldsGroupBy) StringsX

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

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

type WithFieldsMutation

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

WithFieldsMutation represents an operation that mutates the WithFields nodes in the graph.

func (*WithFieldsMutation) AddField

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

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

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

func (*WithFieldsMutation) AddedField

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

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

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

func (*WithFieldsMutation) AddedIDs

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

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

func (*WithFieldsMutation) ClearEdge

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

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

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

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

func (*WithFieldsMutation) ClearedFields

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

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

func (WithFieldsMutation) Client

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

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

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

func (*WithFieldsMutation) Existing

func (m *WithFieldsMutation) Existing() (r string, exists bool)

Existing returns the value of the "existing" field in the mutation.

func (*WithFieldsMutation) Field

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

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

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

func (*WithFieldsMutation) Fields

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

func (m *WithFieldsMutation) 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 (*WithFieldsMutation) IDs

func (m *WithFieldsMutation) 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 (*WithFieldsMutation) OldExisting

func (m *WithFieldsMutation) OldExisting(ctx context.Context) (v string, err error)

OldExisting returns the old "existing" field's value of the WithFields entity. If the WithFields 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 (*WithFieldsMutation) OldField

func (m *WithFieldsMutation) 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 (*WithFieldsMutation) Op

func (m *WithFieldsMutation) Op() Op

Op returns the operation name.

func (*WithFieldsMutation) RemovedEdges

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

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

func (*WithFieldsMutation) RemovedIDs

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

func (m *WithFieldsMutation) 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 (*WithFieldsMutation) ResetExisting

func (m *WithFieldsMutation) ResetExisting()

ResetExisting resets all changes to the "existing" field.

func (*WithFieldsMutation) ResetField

func (m *WithFieldsMutation) 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 (*WithFieldsMutation) SetExisting

func (m *WithFieldsMutation) SetExisting(s string)

SetExisting sets the "existing" field.

func (*WithFieldsMutation) SetField

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

func (m *WithFieldsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (WithFieldsMutation) Tx

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

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

func (*WithFieldsMutation) Type

func (m *WithFieldsMutation) Type() string

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

func (*WithFieldsMutation) Where

func (m *WithFieldsMutation) Where(ps ...predicate.WithFields)

Where appends a list predicates to the WithFieldsMutation builder.

func (*WithFieldsMutation) WhereP

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

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

type WithFieldsQuery

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

WithFieldsQuery is the builder for querying WithFields entities.

func (*WithFieldsQuery) Aggregate

func (wfq *WithFieldsQuery) Aggregate(fns ...AggregateFunc) *WithFieldsSelect

Aggregate returns a WithFieldsSelect configured with the given aggregations.

func (*WithFieldsQuery) All

func (wfq *WithFieldsQuery) All(ctx context.Context) ([]*WithFields, error)

All executes the query and returns a list of WithFieldsSlice.

func (*WithFieldsQuery) AllX

func (wfq *WithFieldsQuery) AllX(ctx context.Context) []*WithFields

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

func (*WithFieldsQuery) Clone

func (wfq *WithFieldsQuery) Clone() *WithFieldsQuery

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

func (*WithFieldsQuery) Count

func (wfq *WithFieldsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WithFieldsQuery) CountX

func (wfq *WithFieldsQuery) CountX(ctx context.Context) int

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

func (*WithFieldsQuery) Exist

func (wfq *WithFieldsQuery) Exist(ctx context.Context) (bool, error)

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

func (*WithFieldsQuery) ExistX

func (wfq *WithFieldsQuery) ExistX(ctx context.Context) bool

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

func (*WithFieldsQuery) First

func (wfq *WithFieldsQuery) First(ctx context.Context) (*WithFields, error)

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

func (*WithFieldsQuery) FirstID

func (wfq *WithFieldsQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*WithFieldsQuery) FirstIDX

func (wfq *WithFieldsQuery) FirstIDX(ctx context.Context) int

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

func (*WithFieldsQuery) FirstX

func (wfq *WithFieldsQuery) FirstX(ctx context.Context) *WithFields

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

func (*WithFieldsQuery) GroupBy

func (wfq *WithFieldsQuery) GroupBy(field string, fields ...string) *WithFieldsGroupBy

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 {
	Existing string `json:"existing,omitempty"`
	Count int `json:"count,omitempty"`
}

client.WithFields.Query().
	GroupBy(withfields.FieldExisting).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WithFieldsQuery) IDs

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

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

func (*WithFieldsQuery) IDsX

func (wfq *WithFieldsQuery) IDsX(ctx context.Context) []int

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

func (*WithFieldsQuery) Limit

func (wfq *WithFieldsQuery) Limit(limit int) *WithFieldsQuery

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

func (*WithFieldsQuery) Offset

func (wfq *WithFieldsQuery) Offset(offset int) *WithFieldsQuery

Offset to start from.

func (*WithFieldsQuery) Only

func (wfq *WithFieldsQuery) Only(ctx context.Context) (*WithFields, error)

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

func (*WithFieldsQuery) OnlyID

func (wfq *WithFieldsQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*WithFieldsQuery) OnlyIDX

func (wfq *WithFieldsQuery) OnlyIDX(ctx context.Context) int

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

func (*WithFieldsQuery) OnlyX

func (wfq *WithFieldsQuery) OnlyX(ctx context.Context) *WithFields

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

func (*WithFieldsQuery) Order

Order specifies how the records should be ordered.

func (*WithFieldsQuery) Select

func (wfq *WithFieldsQuery) Select(fields ...string) *WithFieldsSelect

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 {
	Existing string `json:"existing,omitempty"`
}

client.WithFields.Query().
	Select(withfields.FieldExisting).
	Scan(ctx, &v)

func (*WithFieldsQuery) Unique

func (wfq *WithFieldsQuery) Unique(unique bool) *WithFieldsQuery

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

Where adds a new predicate for the WithFieldsQuery builder.

type WithFieldsSelect

type WithFieldsSelect struct {
	*WithFieldsQuery
	// contains filtered or unexported fields
}

WithFieldsSelect is the builder for selecting fields of WithFields entities.

func (*WithFieldsSelect) Aggregate

func (wfs *WithFieldsSelect) Aggregate(fns ...AggregateFunc) *WithFieldsSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WithFieldsSelect) Bool

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

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

func (*WithFieldsSelect) BoolX

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

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

func (*WithFieldsSelect) Bools

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

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

func (*WithFieldsSelect) BoolsX

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

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

func (*WithFieldsSelect) Float64

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

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

func (*WithFieldsSelect) Float64X

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

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

func (*WithFieldsSelect) Float64s

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

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

func (*WithFieldsSelect) Float64sX

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

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

func (*WithFieldsSelect) Int

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

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

func (*WithFieldsSelect) IntX

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

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

func (*WithFieldsSelect) Ints

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

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

func (*WithFieldsSelect) IntsX

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

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

func (*WithFieldsSelect) Scan

func (wfs *WithFieldsSelect) Scan(ctx context.Context, v any) error

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

func (*WithFieldsSelect) ScanX

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

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

func (*WithFieldsSelect) String

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

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

func (*WithFieldsSelect) StringX

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

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

func (*WithFieldsSelect) Strings

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

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

func (*WithFieldsSelect) StringsX

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

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

type WithFieldsSlice

type WithFieldsSlice []*WithFields

WithFieldsSlice is a parsable slice of WithFields.

type WithFieldsUpdate

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

WithFieldsUpdate is the builder for updating WithFields entities.

func (*WithFieldsUpdate) Exec

func (wfu *WithFieldsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WithFieldsUpdate) ExecX

func (wfu *WithFieldsUpdate) ExecX(ctx context.Context)

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

func (*WithFieldsUpdate) Mutation

func (wfu *WithFieldsUpdate) Mutation() *WithFieldsMutation

Mutation returns the WithFieldsMutation object of the builder.

func (*WithFieldsUpdate) Save

func (wfu *WithFieldsUpdate) Save(ctx context.Context) (int, error)

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

func (*WithFieldsUpdate) SaveX

func (wfu *WithFieldsUpdate) SaveX(ctx context.Context) int

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

func (*WithFieldsUpdate) SetExisting

func (wfu *WithFieldsUpdate) SetExisting(s string) *WithFieldsUpdate

SetExisting sets the "existing" field.

func (*WithFieldsUpdate) SetNillableExisting

func (wfu *WithFieldsUpdate) SetNillableExisting(s *string) *WithFieldsUpdate

SetNillableExisting sets the "existing" field if the given value is not nil.

func (*WithFieldsUpdate) Where

Where appends a list predicates to the WithFieldsUpdate builder.

type WithFieldsUpdateOne

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

WithFieldsUpdateOne is the builder for updating a single WithFields entity.

func (*WithFieldsUpdateOne) Exec

func (wfuo *WithFieldsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WithFieldsUpdateOne) ExecX

func (wfuo *WithFieldsUpdateOne) ExecX(ctx context.Context)

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

func (*WithFieldsUpdateOne) Mutation

func (wfuo *WithFieldsUpdateOne) Mutation() *WithFieldsMutation

Mutation returns the WithFieldsMutation object of the builder.

func (*WithFieldsUpdateOne) Save

func (wfuo *WithFieldsUpdateOne) Save(ctx context.Context) (*WithFields, error)

Save executes the query and returns the updated WithFields entity.

func (*WithFieldsUpdateOne) SaveX

func (wfuo *WithFieldsUpdateOne) SaveX(ctx context.Context) *WithFields

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

func (*WithFieldsUpdateOne) Select

func (wfuo *WithFieldsUpdateOne) Select(field string, fields ...string) *WithFieldsUpdateOne

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

func (*WithFieldsUpdateOne) SetExisting

func (wfuo *WithFieldsUpdateOne) SetExisting(s string) *WithFieldsUpdateOne

SetExisting sets the "existing" field.

func (*WithFieldsUpdateOne) SetNillableExisting

func (wfuo *WithFieldsUpdateOne) SetNillableExisting(s *string) *WithFieldsUpdateOne

SetNillableExisting sets the "existing" field if the given value is not nil.

func (*WithFieldsUpdateOne) Where

Where appends a list predicates to the WithFieldsUpdate builder.

type WithModifiedField

type WithModifiedField struct {

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

WithModifiedField is the model entity for the WithModifiedField schema.

func (*WithModifiedField) QueryOwner

func (wmf *WithModifiedField) QueryOwner() *UserQuery

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

func (*WithModifiedField) String

func (wmf *WithModifiedField) String() string

String implements the fmt.Stringer.

func (*WithModifiedField) Unwrap

func (wmf *WithModifiedField) Unwrap() *WithModifiedField

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

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

func (*WithModifiedField) Value

func (wmf *WithModifiedField) Value(name string) (ent.Value, error)

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

type WithModifiedFieldClient

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

WithModifiedFieldClient is a client for the WithModifiedField schema.

func NewWithModifiedFieldClient

func NewWithModifiedFieldClient(c config) *WithModifiedFieldClient

NewWithModifiedFieldClient returns a client for the WithModifiedField from the given config.

func (*WithModifiedFieldClient) Create

Create returns a builder for creating a WithModifiedField entity.

func (*WithModifiedFieldClient) CreateBulk

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

func (*WithModifiedFieldClient) Delete

Delete returns a delete builder for WithModifiedField.

func (*WithModifiedFieldClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WithModifiedFieldClient) DeleteOneID

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

func (*WithModifiedFieldClient) Get

Get returns a WithModifiedField entity by its id.

func (*WithModifiedFieldClient) GetX

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

func (*WithModifiedFieldClient) Hooks

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

Hooks returns the client hooks.

func (*WithModifiedFieldClient) Intercept

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

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

func (*WithModifiedFieldClient) Interceptors

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

Interceptors returns the client interceptors.

func (*WithModifiedFieldClient) MapCreateBulk

func (c *WithModifiedFieldClient) MapCreateBulk(slice any, setFunc func(*WithModifiedFieldCreate, int)) *WithModifiedFieldCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*WithModifiedFieldClient) Query

Query returns a query builder for WithModifiedField.

func (*WithModifiedFieldClient) QueryOwner

QueryOwner queries the owner edge of a WithModifiedField.

func (*WithModifiedFieldClient) Update

Update returns an update builder for WithModifiedField.

func (*WithModifiedFieldClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*WithModifiedFieldClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*WithModifiedFieldClient) Use

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

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

type WithModifiedFieldCreate

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

WithModifiedFieldCreate is the builder for creating a WithModifiedField entity.

func (*WithModifiedFieldCreate) Exec

func (wmfc *WithModifiedFieldCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WithModifiedFieldCreate) ExecX

func (wmfc *WithModifiedFieldCreate) ExecX(ctx context.Context)

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

func (*WithModifiedFieldCreate) Mutation

Mutation returns the WithModifiedFieldMutation object of the builder.

func (*WithModifiedFieldCreate) Save

Save creates the WithModifiedField in the database.

func (*WithModifiedFieldCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*WithModifiedFieldCreate) SetName

SetName sets the "name" field.

func (*WithModifiedFieldCreate) SetNillableOwnerID

func (wmfc *WithModifiedFieldCreate) SetNillableOwnerID(id *int) *WithModifiedFieldCreate

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

func (*WithModifiedFieldCreate) SetOwner

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

func (*WithModifiedFieldCreate) SetOwnerID

func (wmfc *WithModifiedFieldCreate) SetOwnerID(id int) *WithModifiedFieldCreate

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

type WithModifiedFieldCreateBulk

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

WithModifiedFieldCreateBulk is the builder for creating many WithModifiedField entities in bulk.

func (*WithModifiedFieldCreateBulk) Exec

Exec executes the query.

func (*WithModifiedFieldCreateBulk) ExecX

func (wmfcb *WithModifiedFieldCreateBulk) ExecX(ctx context.Context)

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

func (*WithModifiedFieldCreateBulk) Save

Save creates the WithModifiedField entities in the database.

func (*WithModifiedFieldCreateBulk) SaveX

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

type WithModifiedFieldDelete

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

WithModifiedFieldDelete is the builder for deleting a WithModifiedField entity.

func (*WithModifiedFieldDelete) Exec

func (wmfd *WithModifiedFieldDelete) Exec(ctx context.Context) (int, error)

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

func (*WithModifiedFieldDelete) ExecX

func (wmfd *WithModifiedFieldDelete) ExecX(ctx context.Context) int

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

func (*WithModifiedFieldDelete) Where

Where appends a list predicates to the WithModifiedFieldDelete builder.

type WithModifiedFieldDeleteOne

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

WithModifiedFieldDeleteOne is the builder for deleting a single WithModifiedField entity.

func (*WithModifiedFieldDeleteOne) Exec

Exec executes the deletion query.

func (*WithModifiedFieldDeleteOne) ExecX

func (wmfdo *WithModifiedFieldDeleteOne) ExecX(ctx context.Context)

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

func (*WithModifiedFieldDeleteOne) Where

Where appends a list predicates to the WithModifiedFieldDelete builder.

type WithModifiedFieldEdges

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

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

func (WithModifiedFieldEdges) OwnerOrErr

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

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

type WithModifiedFieldGroupBy

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

WithModifiedFieldGroupBy is the group-by builder for WithModifiedField entities.

func (*WithModifiedFieldGroupBy) Aggregate

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

func (*WithModifiedFieldGroupBy) Bool

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

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

func (*WithModifiedFieldGroupBy) BoolX

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

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

func (*WithModifiedFieldGroupBy) Bools

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

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

func (*WithModifiedFieldGroupBy) BoolsX

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

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

func (*WithModifiedFieldGroupBy) Float64

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

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

func (*WithModifiedFieldGroupBy) Float64X

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

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

func (*WithModifiedFieldGroupBy) Float64s

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

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

func (*WithModifiedFieldGroupBy) Float64sX

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

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

func (*WithModifiedFieldGroupBy) Int

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

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

func (*WithModifiedFieldGroupBy) IntX

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

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

func (*WithModifiedFieldGroupBy) Ints

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

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

func (*WithModifiedFieldGroupBy) IntsX

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

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

func (*WithModifiedFieldGroupBy) Scan

func (wmfgb *WithModifiedFieldGroupBy) Scan(ctx context.Context, v any) error

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

func (*WithModifiedFieldGroupBy) ScanX

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

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

func (*WithModifiedFieldGroupBy) String

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

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

func (*WithModifiedFieldGroupBy) StringX

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

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

func (*WithModifiedFieldGroupBy) Strings

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

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

func (*WithModifiedFieldGroupBy) StringsX

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

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

type WithModifiedFieldMutation

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

WithModifiedFieldMutation represents an operation that mutates the WithModifiedField nodes in the graph.

func (*WithModifiedFieldMutation) AddField

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

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

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

func (*WithModifiedFieldMutation) AddedField

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

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

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

func (*WithModifiedFieldMutation) AddedIDs

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

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

func (*WithModifiedFieldMutation) ClearEdge

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

func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) ClearOwner

func (m *WithModifiedFieldMutation) ClearOwner()

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

func (*WithModifiedFieldMutation) ClearedEdges

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

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

func (*WithModifiedFieldMutation) ClearedFields

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

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

func (WithModifiedFieldMutation) Client

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

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

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

func (*WithModifiedFieldMutation) Field

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

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

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

func (*WithModifiedFieldMutation) Fields

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

func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) IDs

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

func (*WithModifiedFieldMutation) Name

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

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

func (*WithModifiedFieldMutation) OldField

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

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

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

func (m *WithModifiedFieldMutation) Op() Op

Op returns the operation name.

func (*WithModifiedFieldMutation) OwnerCleared

func (m *WithModifiedFieldMutation) OwnerCleared() bool

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

func (*WithModifiedFieldMutation) OwnerID

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

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

func (*WithModifiedFieldMutation) OwnerIDs

func (m *WithModifiedFieldMutation) 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 (*WithModifiedFieldMutation) RemovedEdges

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

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

func (*WithModifiedFieldMutation) RemovedIDs

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

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

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

func (m *WithModifiedFieldMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*WithModifiedFieldMutation) ResetOwner

func (m *WithModifiedFieldMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*WithModifiedFieldMutation) SetField

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

func (m *WithModifiedFieldMutation) SetName(s string)

SetName sets the "name" field.

func (*WithModifiedFieldMutation) SetOp

func (m *WithModifiedFieldMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*WithModifiedFieldMutation) SetOwnerID

func (m *WithModifiedFieldMutation) SetOwnerID(id int)

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

func (WithModifiedFieldMutation) Tx

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

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

func (*WithModifiedFieldMutation) Type

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

func (*WithModifiedFieldMutation) Where

Where appends a list predicates to the WithModifiedFieldMutation builder.

func (*WithModifiedFieldMutation) WhereP

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

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

type WithModifiedFieldQuery

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

WithModifiedFieldQuery is the builder for querying WithModifiedField entities.

func (*WithModifiedFieldQuery) Aggregate

Aggregate returns a WithModifiedFieldSelect configured with the given aggregations.

func (*WithModifiedFieldQuery) All

All executes the query and returns a list of WithModifiedFields.

func (*WithModifiedFieldQuery) AllX

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

func (*WithModifiedFieldQuery) Clone

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

func (*WithModifiedFieldQuery) Count

func (wmfq *WithModifiedFieldQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WithModifiedFieldQuery) CountX

func (wmfq *WithModifiedFieldQuery) CountX(ctx context.Context) int

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

func (*WithModifiedFieldQuery) Exist

func (wmfq *WithModifiedFieldQuery) Exist(ctx context.Context) (bool, error)

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

func (*WithModifiedFieldQuery) ExistX

func (wmfq *WithModifiedFieldQuery) ExistX(ctx context.Context) bool

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

func (*WithModifiedFieldQuery) First

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

func (*WithModifiedFieldQuery) FirstID

func (wmfq *WithModifiedFieldQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*WithModifiedFieldQuery) FirstIDX

func (wmfq *WithModifiedFieldQuery) FirstIDX(ctx context.Context) int

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

func (*WithModifiedFieldQuery) FirstX

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

func (*WithModifiedFieldQuery) GroupBy

func (wmfq *WithModifiedFieldQuery) GroupBy(field string, fields ...string) *WithModifiedFieldGroupBy

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.WithModifiedField.Query().
	GroupBy(withmodifiedfield.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*WithModifiedFieldQuery) IDs

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

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

func (*WithModifiedFieldQuery) IDsX

func (wmfq *WithModifiedFieldQuery) IDsX(ctx context.Context) []int

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

func (*WithModifiedFieldQuery) Limit

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

func (*WithModifiedFieldQuery) Offset

func (wmfq *WithModifiedFieldQuery) Offset(offset int) *WithModifiedFieldQuery

Offset to start from.

func (*WithModifiedFieldQuery) Only

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

func (*WithModifiedFieldQuery) OnlyID

func (wmfq *WithModifiedFieldQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*WithModifiedFieldQuery) OnlyIDX

func (wmfq *WithModifiedFieldQuery) OnlyIDX(ctx context.Context) int

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

func (*WithModifiedFieldQuery) OnlyX

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

func (*WithModifiedFieldQuery) Order

Order specifies how the records should be ordered.

func (*WithModifiedFieldQuery) QueryOwner

func (wmfq *WithModifiedFieldQuery) QueryOwner() *UserQuery

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

func (*WithModifiedFieldQuery) Select

func (wmfq *WithModifiedFieldQuery) Select(fields ...string) *WithModifiedFieldSelect

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.WithModifiedField.Query().
	Select(withmodifiedfield.FieldName).
	Scan(ctx, &v)

func (*WithModifiedFieldQuery) Unique

func (wmfq *WithModifiedFieldQuery) Unique(unique bool) *WithModifiedFieldQuery

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

Where adds a new predicate for the WithModifiedFieldQuery builder.

func (*WithModifiedFieldQuery) WithOwner

func (wmfq *WithModifiedFieldQuery) WithOwner(opts ...func(*UserQuery)) *WithModifiedFieldQuery

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

type WithModifiedFieldSelect

type WithModifiedFieldSelect struct {
	*WithModifiedFieldQuery
	// contains filtered or unexported fields
}

WithModifiedFieldSelect is the builder for selecting fields of WithModifiedField entities.

func (*WithModifiedFieldSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*WithModifiedFieldSelect) Bool

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

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

func (*WithModifiedFieldSelect) BoolX

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

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

func (*WithModifiedFieldSelect) Bools

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

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

func (*WithModifiedFieldSelect) BoolsX

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

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

func (*WithModifiedFieldSelect) Float64

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

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

func (*WithModifiedFieldSelect) Float64X

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

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

func (*WithModifiedFieldSelect) Float64s

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

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

func (*WithModifiedFieldSelect) Float64sX

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

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

func (*WithModifiedFieldSelect) Int

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

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

func (*WithModifiedFieldSelect) IntX

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

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

func (*WithModifiedFieldSelect) Ints

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

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

func (*WithModifiedFieldSelect) IntsX

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

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

func (*WithModifiedFieldSelect) Scan

func (wmfs *WithModifiedFieldSelect) Scan(ctx context.Context, v any) error

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

func (*WithModifiedFieldSelect) ScanX

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

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

func (*WithModifiedFieldSelect) String

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

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

func (*WithModifiedFieldSelect) StringX

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

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

func (*WithModifiedFieldSelect) Strings

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

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

func (*WithModifiedFieldSelect) StringsX

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

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

type WithModifiedFieldUpdate

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

WithModifiedFieldUpdate is the builder for updating WithModifiedField entities.

func (*WithModifiedFieldUpdate) ClearOwner

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

func (*WithModifiedFieldUpdate) Exec

func (wmfu *WithModifiedFieldUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WithModifiedFieldUpdate) ExecX

func (wmfu *WithModifiedFieldUpdate) ExecX(ctx context.Context)

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

func (*WithModifiedFieldUpdate) Mutation

Mutation returns the WithModifiedFieldMutation object of the builder.

func (*WithModifiedFieldUpdate) Save

func (wmfu *WithModifiedFieldUpdate) Save(ctx context.Context) (int, error)

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

func (*WithModifiedFieldUpdate) SaveX

func (wmfu *WithModifiedFieldUpdate) SaveX(ctx context.Context) int

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

func (*WithModifiedFieldUpdate) SetNillableOwnerID

func (wmfu *WithModifiedFieldUpdate) SetNillableOwnerID(id *int) *WithModifiedFieldUpdate

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

func (*WithModifiedFieldUpdate) SetOwner

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

func (*WithModifiedFieldUpdate) SetOwnerID

func (wmfu *WithModifiedFieldUpdate) SetOwnerID(id int) *WithModifiedFieldUpdate

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

func (*WithModifiedFieldUpdate) Where

Where appends a list predicates to the WithModifiedFieldUpdate builder.

type WithModifiedFieldUpdateOne

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

WithModifiedFieldUpdateOne is the builder for updating a single WithModifiedField entity.

func (*WithModifiedFieldUpdateOne) ClearOwner

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

func (*WithModifiedFieldUpdateOne) Exec

Exec executes the query on the entity.

func (*WithModifiedFieldUpdateOne) ExecX

func (wmfuo *WithModifiedFieldUpdateOne) ExecX(ctx context.Context)

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

func (*WithModifiedFieldUpdateOne) Mutation

Mutation returns the WithModifiedFieldMutation object of the builder.

func (*WithModifiedFieldUpdateOne) Save

Save executes the query and returns the updated WithModifiedField entity.

func (*WithModifiedFieldUpdateOne) SaveX

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

func (*WithModifiedFieldUpdateOne) Select

func (wmfuo *WithModifiedFieldUpdateOne) Select(field string, fields ...string) *WithModifiedFieldUpdateOne

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

func (*WithModifiedFieldUpdateOne) SetNillableOwnerID

func (wmfuo *WithModifiedFieldUpdateOne) SetNillableOwnerID(id *int) *WithModifiedFieldUpdateOne

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

func (*WithModifiedFieldUpdateOne) SetOwner

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

func (*WithModifiedFieldUpdateOne) SetOwnerID

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

func (*WithModifiedFieldUpdateOne) Where

Where appends a list predicates to the WithModifiedFieldUpdate builder.

type WithModifiedFields

type WithModifiedFields []*WithModifiedField

WithModifiedFields is a parsable slice of WithModifiedField.

type WithNilFields

type WithNilFields struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// contains filtered or unexported fields
}

WithNilFields is the model entity for the WithNilFields schema.

func (*WithNilFields) String

func (wnf *WithNilFields) String() string

String implements the fmt.Stringer.

func (*WithNilFields) Unwrap

func (wnf *WithNilFields) Unwrap() *WithNilFields

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

func (wnf *WithNilFields) Update() *WithNilFieldsUpdateOne

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

func (*WithNilFields) Value

func (wnf *WithNilFields) Value(name string) (ent.Value, error)

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

type WithNilFieldsClient

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

WithNilFieldsClient is a client for the WithNilFields schema.

func NewWithNilFieldsClient

func NewWithNilFieldsClient(c config) *WithNilFieldsClient

NewWithNilFieldsClient returns a client for the WithNilFields from the given config.

func (*WithNilFieldsClient) Create

Create returns a builder for creating a WithNilFields entity.

func (*WithNilFieldsClient) CreateBulk

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

func (*WithNilFieldsClient) Delete

Delete returns a delete builder for WithNilFields.

func (*WithNilFieldsClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WithNilFieldsClient) DeleteOneID

func (c *WithNilFieldsClient) DeleteOneID(id int) *WithNilFieldsDeleteOne

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

func (*WithNilFieldsClient) Get

Get returns a WithNilFields entity by its id.

func (*WithNilFieldsClient) GetX

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

func (*WithNilFieldsClient) Hooks

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

Hooks returns the client hooks.

func (*WithNilFieldsClient) Intercept

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

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

func (*WithNilFieldsClient) Interceptors

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

Interceptors returns the client interceptors.

func (*WithNilFieldsClient) MapCreateBulk

func (c *WithNilFieldsClient) MapCreateBulk(slice any, setFunc func(*WithNilFieldsCreate, int)) *WithNilFieldsCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*WithNilFieldsClient) Query

Query returns a query builder for WithNilFields.

func (*WithNilFieldsClient) Update

Update returns an update builder for WithNilFields.

func (*WithNilFieldsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*WithNilFieldsClient) UpdateOneID

func (c *WithNilFieldsClient) UpdateOneID(id int) *WithNilFieldsUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WithNilFieldsClient) Use

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

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

type WithNilFieldsCreate

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

WithNilFieldsCreate is the builder for creating a WithNilFields entity.

func (*WithNilFieldsCreate) Exec

func (wnfc *WithNilFieldsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WithNilFieldsCreate) ExecX

func (wnfc *WithNilFieldsCreate) ExecX(ctx context.Context)

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

func (*WithNilFieldsCreate) Mutation

func (wnfc *WithNilFieldsCreate) Mutation() *WithNilFieldsMutation

Mutation returns the WithNilFieldsMutation object of the builder.

func (*WithNilFieldsCreate) Save

Save creates the WithNilFields in the database.

func (*WithNilFieldsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

type WithNilFieldsCreateBulk

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

WithNilFieldsCreateBulk is the builder for creating many WithNilFields entities in bulk.

func (*WithNilFieldsCreateBulk) Exec

func (wnfcb *WithNilFieldsCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WithNilFieldsCreateBulk) ExecX

func (wnfcb *WithNilFieldsCreateBulk) ExecX(ctx context.Context)

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

func (*WithNilFieldsCreateBulk) Save

Save creates the WithNilFields entities in the database.

func (*WithNilFieldsCreateBulk) SaveX

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

type WithNilFieldsDelete

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

WithNilFieldsDelete is the builder for deleting a WithNilFields entity.

func (*WithNilFieldsDelete) Exec

func (wnfd *WithNilFieldsDelete) Exec(ctx context.Context) (int, error)

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

func (*WithNilFieldsDelete) ExecX

func (wnfd *WithNilFieldsDelete) ExecX(ctx context.Context) int

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

func (*WithNilFieldsDelete) Where

Where appends a list predicates to the WithNilFieldsDelete builder.

type WithNilFieldsDeleteOne

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

WithNilFieldsDeleteOne is the builder for deleting a single WithNilFields entity.

func (*WithNilFieldsDeleteOne) Exec

func (wnfdo *WithNilFieldsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WithNilFieldsDeleteOne) ExecX

func (wnfdo *WithNilFieldsDeleteOne) ExecX(ctx context.Context)

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

func (*WithNilFieldsDeleteOne) Where

Where appends a list predicates to the WithNilFieldsDelete builder.

type WithNilFieldsGroupBy

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

WithNilFieldsGroupBy is the group-by builder for WithNilFields entities.

func (*WithNilFieldsGroupBy) Aggregate

func (wnfgb *WithNilFieldsGroupBy) Aggregate(fns ...AggregateFunc) *WithNilFieldsGroupBy

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

func (*WithNilFieldsGroupBy) Bool

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

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

func (*WithNilFieldsGroupBy) BoolX

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

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

func (*WithNilFieldsGroupBy) Bools

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

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

func (*WithNilFieldsGroupBy) BoolsX

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

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

func (*WithNilFieldsGroupBy) Float64

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

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

func (*WithNilFieldsGroupBy) Float64X

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

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

func (*WithNilFieldsGroupBy) Float64s

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

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

func (*WithNilFieldsGroupBy) Float64sX

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

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

func (*WithNilFieldsGroupBy) Int

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

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

func (*WithNilFieldsGroupBy) IntX

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

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

func (*WithNilFieldsGroupBy) Ints

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

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

func (*WithNilFieldsGroupBy) IntsX

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

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

func (*WithNilFieldsGroupBy) Scan

func (wnfgb *WithNilFieldsGroupBy) Scan(ctx context.Context, v any) error

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

func (*WithNilFieldsGroupBy) ScanX

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

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

func (*WithNilFieldsGroupBy) String

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

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

func (*WithNilFieldsGroupBy) StringX

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

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

func (*WithNilFieldsGroupBy) Strings

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

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

func (*WithNilFieldsGroupBy) StringsX

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

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

type WithNilFieldsMutation

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

WithNilFieldsMutation represents an operation that mutates the WithNilFields nodes in the graph.

func (*WithNilFieldsMutation) AddField

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

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

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

func (*WithNilFieldsMutation) AddedField

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

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

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

func (*WithNilFieldsMutation) AddedIDs

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

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

func (*WithNilFieldsMutation) ClearEdge

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

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

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

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

func (*WithNilFieldsMutation) ClearedFields

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

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

func (WithNilFieldsMutation) Client

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

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

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

func (*WithNilFieldsMutation) Field

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

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

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

func (*WithNilFieldsMutation) Fields

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

func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) IDs

func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) OldField

func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) Op

func (m *WithNilFieldsMutation) Op() Op

Op returns the operation name.

func (*WithNilFieldsMutation) RemovedEdges

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

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

func (*WithNilFieldsMutation) RemovedIDs

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

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

func (m *WithNilFieldsMutation) 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 (*WithNilFieldsMutation) SetField

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

func (m *WithNilFieldsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (WithNilFieldsMutation) Tx

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

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

func (*WithNilFieldsMutation) Type

func (m *WithNilFieldsMutation) Type() string

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

func (*WithNilFieldsMutation) Where

Where appends a list predicates to the WithNilFieldsMutation builder.

func (*WithNilFieldsMutation) WhereP

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

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

type WithNilFieldsQuery

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

WithNilFieldsQuery is the builder for querying WithNilFields entities.

func (*WithNilFieldsQuery) Aggregate

func (wnfq *WithNilFieldsQuery) Aggregate(fns ...AggregateFunc) *WithNilFieldsSelect

Aggregate returns a WithNilFieldsSelect configured with the given aggregations.

func (*WithNilFieldsQuery) All

func (wnfq *WithNilFieldsQuery) All(ctx context.Context) ([]*WithNilFields, error)

All executes the query and returns a list of WithNilFieldsSlice.

func (*WithNilFieldsQuery) AllX

func (wnfq *WithNilFieldsQuery) AllX(ctx context.Context) []*WithNilFields

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

func (*WithNilFieldsQuery) Clone

func (wnfq *WithNilFieldsQuery) Clone() *WithNilFieldsQuery

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

func (*WithNilFieldsQuery) Count

func (wnfq *WithNilFieldsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WithNilFieldsQuery) CountX

func (wnfq *WithNilFieldsQuery) CountX(ctx context.Context) int

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

func (*WithNilFieldsQuery) Exist

func (wnfq *WithNilFieldsQuery) Exist(ctx context.Context) (bool, error)

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

func (*WithNilFieldsQuery) ExistX

func (wnfq *WithNilFieldsQuery) ExistX(ctx context.Context) bool

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

func (*WithNilFieldsQuery) First

func (wnfq *WithNilFieldsQuery) First(ctx context.Context) (*WithNilFields, error)

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

func (*WithNilFieldsQuery) FirstID

func (wnfq *WithNilFieldsQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*WithNilFieldsQuery) FirstIDX

func (wnfq *WithNilFieldsQuery) FirstIDX(ctx context.Context) int

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

func (*WithNilFieldsQuery) FirstX

func (wnfq *WithNilFieldsQuery) FirstX(ctx context.Context) *WithNilFields

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

func (*WithNilFieldsQuery) GroupBy

func (wnfq *WithNilFieldsQuery) GroupBy(field string, fields ...string) *WithNilFieldsGroupBy

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 (*WithNilFieldsQuery) IDs

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

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

func (*WithNilFieldsQuery) IDsX

func (wnfq *WithNilFieldsQuery) IDsX(ctx context.Context) []int

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

func (*WithNilFieldsQuery) Limit

func (wnfq *WithNilFieldsQuery) Limit(limit int) *WithNilFieldsQuery

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

func (*WithNilFieldsQuery) Offset

func (wnfq *WithNilFieldsQuery) Offset(offset int) *WithNilFieldsQuery

Offset to start from.

func (*WithNilFieldsQuery) Only

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

func (*WithNilFieldsQuery) OnlyID

func (wnfq *WithNilFieldsQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*WithNilFieldsQuery) OnlyIDX

func (wnfq *WithNilFieldsQuery) OnlyIDX(ctx context.Context) int

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

func (*WithNilFieldsQuery) OnlyX

func (wnfq *WithNilFieldsQuery) OnlyX(ctx context.Context) *WithNilFields

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

func (*WithNilFieldsQuery) Order

Order specifies how the records should be ordered.

func (*WithNilFieldsQuery) Select

func (wnfq *WithNilFieldsQuery) Select(fields ...string) *WithNilFieldsSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*WithNilFieldsQuery) Unique

func (wnfq *WithNilFieldsQuery) Unique(unique bool) *WithNilFieldsQuery

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

Where adds a new predicate for the WithNilFieldsQuery builder.

type WithNilFieldsSelect

type WithNilFieldsSelect struct {
	*WithNilFieldsQuery
	// contains filtered or unexported fields
}

WithNilFieldsSelect is the builder for selecting fields of WithNilFields entities.

func (*WithNilFieldsSelect) Aggregate

func (wnfs *WithNilFieldsSelect) Aggregate(fns ...AggregateFunc) *WithNilFieldsSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WithNilFieldsSelect) Bool

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

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

func (*WithNilFieldsSelect) BoolX

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

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

func (*WithNilFieldsSelect) Bools

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

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

func (*WithNilFieldsSelect) BoolsX

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

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

func (*WithNilFieldsSelect) Float64

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

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

func (*WithNilFieldsSelect) Float64X

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

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

func (*WithNilFieldsSelect) Float64s

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

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

func (*WithNilFieldsSelect) Float64sX

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

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

func (*WithNilFieldsSelect) Int

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

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

func (*WithNilFieldsSelect) IntX

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

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

func (*WithNilFieldsSelect) Ints

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

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

func (*WithNilFieldsSelect) IntsX

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

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

func (*WithNilFieldsSelect) Scan

func (wnfs *WithNilFieldsSelect) Scan(ctx context.Context, v any) error

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

func (*WithNilFieldsSelect) ScanX

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

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

func (*WithNilFieldsSelect) String

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

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

func (*WithNilFieldsSelect) StringX

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

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

func (*WithNilFieldsSelect) Strings

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

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

func (*WithNilFieldsSelect) StringsX

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

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

type WithNilFieldsSlice

type WithNilFieldsSlice []*WithNilFields

WithNilFieldsSlice is a parsable slice of WithNilFields.

type WithNilFieldsUpdate

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

WithNilFieldsUpdate is the builder for updating WithNilFields entities.

func (*WithNilFieldsUpdate) Exec

func (wnfu *WithNilFieldsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WithNilFieldsUpdate) ExecX

func (wnfu *WithNilFieldsUpdate) ExecX(ctx context.Context)

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

func (*WithNilFieldsUpdate) Mutation

func (wnfu *WithNilFieldsUpdate) Mutation() *WithNilFieldsMutation

Mutation returns the WithNilFieldsMutation object of the builder.

func (*WithNilFieldsUpdate) Save

func (wnfu *WithNilFieldsUpdate) Save(ctx context.Context) (int, error)

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

func (*WithNilFieldsUpdate) SaveX

func (wnfu *WithNilFieldsUpdate) SaveX(ctx context.Context) int

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

func (*WithNilFieldsUpdate) Where

Where appends a list predicates to the WithNilFieldsUpdate builder.

type WithNilFieldsUpdateOne

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

WithNilFieldsUpdateOne is the builder for updating a single WithNilFields entity.

func (*WithNilFieldsUpdateOne) Exec

func (wnfuo *WithNilFieldsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WithNilFieldsUpdateOne) ExecX

func (wnfuo *WithNilFieldsUpdateOne) ExecX(ctx context.Context)

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

func (*WithNilFieldsUpdateOne) Mutation

func (wnfuo *WithNilFieldsUpdateOne) Mutation() *WithNilFieldsMutation

Mutation returns the WithNilFieldsMutation object of the builder.

func (*WithNilFieldsUpdateOne) Save

Save executes the query and returns the updated WithNilFields entity.

func (*WithNilFieldsUpdateOne) SaveX

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

func (*WithNilFieldsUpdateOne) Select

func (wnfuo *WithNilFieldsUpdateOne) Select(field string, fields ...string) *WithNilFieldsUpdateOne

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

func (*WithNilFieldsUpdateOne) Where

Where appends a list predicates to the WithNilFieldsUpdate builder.

type WithoutFields

type WithoutFields struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// contains filtered or unexported fields
}

WithoutFields is the model entity for the WithoutFields schema.

func (*WithoutFields) String

func (wf *WithoutFields) String() string

String implements the fmt.Stringer.

func (*WithoutFields) Unwrap

func (wf *WithoutFields) Unwrap() *WithoutFields

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

func (wf *WithoutFields) Update() *WithoutFieldsUpdateOne

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

func (*WithoutFields) Value

func (wf *WithoutFields) Value(name string) (ent.Value, error)

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

type WithoutFieldsClient

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

WithoutFieldsClient is a client for the WithoutFields schema.

func NewWithoutFieldsClient

func NewWithoutFieldsClient(c config) *WithoutFieldsClient

NewWithoutFieldsClient returns a client for the WithoutFields from the given config.

func (*WithoutFieldsClient) Create

Create returns a builder for creating a WithoutFields entity.

func (*WithoutFieldsClient) CreateBulk

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

func (*WithoutFieldsClient) Delete

Delete returns a delete builder for WithoutFields.

func (*WithoutFieldsClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*WithoutFieldsClient) DeleteOneID

func (c *WithoutFieldsClient) DeleteOneID(id int) *WithoutFieldsDeleteOne

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

func (*WithoutFieldsClient) Get

Get returns a WithoutFields entity by its id.

func (*WithoutFieldsClient) GetX

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

func (*WithoutFieldsClient) Hooks

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

Hooks returns the client hooks.

func (*WithoutFieldsClient) Intercept

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

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

func (*WithoutFieldsClient) Interceptors

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

Interceptors returns the client interceptors.

func (*WithoutFieldsClient) MapCreateBulk

func (c *WithoutFieldsClient) MapCreateBulk(slice any, setFunc func(*WithoutFieldsCreate, int)) *WithoutFieldsCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*WithoutFieldsClient) Query

Query returns a query builder for WithoutFields.

func (*WithoutFieldsClient) Update

Update returns an update builder for WithoutFields.

func (*WithoutFieldsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*WithoutFieldsClient) UpdateOneID

func (c *WithoutFieldsClient) UpdateOneID(id int) *WithoutFieldsUpdateOne

UpdateOneID returns an update builder for the given id.

func (*WithoutFieldsClient) Use

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

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

type WithoutFieldsCreate

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

WithoutFieldsCreate is the builder for creating a WithoutFields entity.

func (*WithoutFieldsCreate) Exec

func (wfc *WithoutFieldsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*WithoutFieldsCreate) ExecX

func (wfc *WithoutFieldsCreate) ExecX(ctx context.Context)

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

func (*WithoutFieldsCreate) Mutation

func (wfc *WithoutFieldsCreate) Mutation() *WithoutFieldsMutation

Mutation returns the WithoutFieldsMutation object of the builder.

func (*WithoutFieldsCreate) Save

Save creates the WithoutFields in the database.

func (*WithoutFieldsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

type WithoutFieldsCreateBulk

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

WithoutFieldsCreateBulk is the builder for creating many WithoutFields entities in bulk.

func (*WithoutFieldsCreateBulk) Exec

func (wfcb *WithoutFieldsCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*WithoutFieldsCreateBulk) ExecX

func (wfcb *WithoutFieldsCreateBulk) ExecX(ctx context.Context)

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

func (*WithoutFieldsCreateBulk) Save

Save creates the WithoutFields entities in the database.

func (*WithoutFieldsCreateBulk) SaveX

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

type WithoutFieldsDelete

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

WithoutFieldsDelete is the builder for deleting a WithoutFields entity.

func (*WithoutFieldsDelete) Exec

func (wfd *WithoutFieldsDelete) Exec(ctx context.Context) (int, error)

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

func (*WithoutFieldsDelete) ExecX

func (wfd *WithoutFieldsDelete) ExecX(ctx context.Context) int

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

func (*WithoutFieldsDelete) Where

Where appends a list predicates to the WithoutFieldsDelete builder.

type WithoutFieldsDeleteOne

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

WithoutFieldsDeleteOne is the builder for deleting a single WithoutFields entity.

func (*WithoutFieldsDeleteOne) Exec

func (wfdo *WithoutFieldsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*WithoutFieldsDeleteOne) ExecX

func (wfdo *WithoutFieldsDeleteOne) ExecX(ctx context.Context)

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

func (*WithoutFieldsDeleteOne) Where

Where appends a list predicates to the WithoutFieldsDelete builder.

type WithoutFieldsGroupBy

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

WithoutFieldsGroupBy is the group-by builder for WithoutFields entities.

func (*WithoutFieldsGroupBy) Aggregate

func (wfgb *WithoutFieldsGroupBy) Aggregate(fns ...AggregateFunc) *WithoutFieldsGroupBy

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

func (*WithoutFieldsGroupBy) Bool

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

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

func (*WithoutFieldsGroupBy) BoolX

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

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

func (*WithoutFieldsGroupBy) Bools

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

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

func (*WithoutFieldsGroupBy) BoolsX

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

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

func (*WithoutFieldsGroupBy) Float64

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

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

func (*WithoutFieldsGroupBy) Float64X

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

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

func (*WithoutFieldsGroupBy) Float64s

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

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

func (*WithoutFieldsGroupBy) Float64sX

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

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

func (*WithoutFieldsGroupBy) Int

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

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

func (*WithoutFieldsGroupBy) IntX

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

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

func (*WithoutFieldsGroupBy) Ints

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

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

func (*WithoutFieldsGroupBy) IntsX

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

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

func (*WithoutFieldsGroupBy) Scan

func (wfgb *WithoutFieldsGroupBy) Scan(ctx context.Context, v any) error

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

func (*WithoutFieldsGroupBy) ScanX

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

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

func (*WithoutFieldsGroupBy) String

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

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

func (*WithoutFieldsGroupBy) StringX

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

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

func (*WithoutFieldsGroupBy) Strings

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

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

func (*WithoutFieldsGroupBy) StringsX

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

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

type WithoutFieldsMutation

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

WithoutFieldsMutation represents an operation that mutates the WithoutFields nodes in the graph.

func (*WithoutFieldsMutation) AddField

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

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

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

func (*WithoutFieldsMutation) AddedField

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

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

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

func (*WithoutFieldsMutation) AddedIDs

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

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

func (*WithoutFieldsMutation) ClearEdge

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

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

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

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

func (*WithoutFieldsMutation) ClearedFields

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

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

func (WithoutFieldsMutation) Client

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

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

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

func (*WithoutFieldsMutation) Field

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

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

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

func (*WithoutFieldsMutation) Fields

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

func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) IDs

func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) OldField

func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) Op

func (m *WithoutFieldsMutation) Op() Op

Op returns the operation name.

func (*WithoutFieldsMutation) RemovedEdges

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

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

func (*WithoutFieldsMutation) RemovedIDs

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

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

func (m *WithoutFieldsMutation) 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 (*WithoutFieldsMutation) SetField

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

func (m *WithoutFieldsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (WithoutFieldsMutation) Tx

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

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

func (*WithoutFieldsMutation) Type

func (m *WithoutFieldsMutation) Type() string

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

func (*WithoutFieldsMutation) Where

Where appends a list predicates to the WithoutFieldsMutation builder.

func (*WithoutFieldsMutation) WhereP

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

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

type WithoutFieldsQuery

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

WithoutFieldsQuery is the builder for querying WithoutFields entities.

func (*WithoutFieldsQuery) Aggregate

func (wfq *WithoutFieldsQuery) Aggregate(fns ...AggregateFunc) *WithoutFieldsSelect

Aggregate returns a WithoutFieldsSelect configured with the given aggregations.

func (*WithoutFieldsQuery) All

All executes the query and returns a list of WithoutFieldsSlice.

func (*WithoutFieldsQuery) AllX

func (wfq *WithoutFieldsQuery) AllX(ctx context.Context) []*WithoutFields

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

func (*WithoutFieldsQuery) Clone

func (wfq *WithoutFieldsQuery) Clone() *WithoutFieldsQuery

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

func (*WithoutFieldsQuery) Count

func (wfq *WithoutFieldsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*WithoutFieldsQuery) CountX

func (wfq *WithoutFieldsQuery) CountX(ctx context.Context) int

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

func (*WithoutFieldsQuery) Exist

func (wfq *WithoutFieldsQuery) Exist(ctx context.Context) (bool, error)

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

func (*WithoutFieldsQuery) ExistX

func (wfq *WithoutFieldsQuery) ExistX(ctx context.Context) bool

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

func (*WithoutFieldsQuery) First

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

func (*WithoutFieldsQuery) FirstID

func (wfq *WithoutFieldsQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*WithoutFieldsQuery) FirstIDX

func (wfq *WithoutFieldsQuery) FirstIDX(ctx context.Context) int

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

func (*WithoutFieldsQuery) FirstX

func (wfq *WithoutFieldsQuery) FirstX(ctx context.Context) *WithoutFields

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

func (*WithoutFieldsQuery) GroupBy

func (wfq *WithoutFieldsQuery) GroupBy(field string, fields ...string) *WithoutFieldsGroupBy

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 (*WithoutFieldsQuery) IDs

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

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

func (*WithoutFieldsQuery) IDsX

func (wfq *WithoutFieldsQuery) IDsX(ctx context.Context) []int

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

func (*WithoutFieldsQuery) Limit

func (wfq *WithoutFieldsQuery) Limit(limit int) *WithoutFieldsQuery

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

func (*WithoutFieldsQuery) Offset

func (wfq *WithoutFieldsQuery) Offset(offset int) *WithoutFieldsQuery

Offset to start from.

func (*WithoutFieldsQuery) Only

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

func (*WithoutFieldsQuery) OnlyID

func (wfq *WithoutFieldsQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*WithoutFieldsQuery) OnlyIDX

func (wfq *WithoutFieldsQuery) OnlyIDX(ctx context.Context) int

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

func (*WithoutFieldsQuery) OnlyX

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

func (*WithoutFieldsQuery) Order

Order specifies how the records should be ordered.

func (*WithoutFieldsQuery) Select

func (wfq *WithoutFieldsQuery) Select(fields ...string) *WithoutFieldsSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*WithoutFieldsQuery) Unique

func (wfq *WithoutFieldsQuery) Unique(unique bool) *WithoutFieldsQuery

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

Where adds a new predicate for the WithoutFieldsQuery builder.

type WithoutFieldsSelect

type WithoutFieldsSelect struct {
	*WithoutFieldsQuery
	// contains filtered or unexported fields
}

WithoutFieldsSelect is the builder for selecting fields of WithoutFields entities.

func (*WithoutFieldsSelect) Aggregate

func (wfs *WithoutFieldsSelect) Aggregate(fns ...AggregateFunc) *WithoutFieldsSelect

Aggregate adds the given aggregation functions to the selector query.

func (*WithoutFieldsSelect) Bool

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

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

func (*WithoutFieldsSelect) BoolX

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

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

func (*WithoutFieldsSelect) Bools

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

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

func (*WithoutFieldsSelect) BoolsX

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

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

func (*WithoutFieldsSelect) Float64

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

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

func (*WithoutFieldsSelect) Float64X

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

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

func (*WithoutFieldsSelect) Float64s

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

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

func (*WithoutFieldsSelect) Float64sX

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

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

func (*WithoutFieldsSelect) Int

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

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

func (*WithoutFieldsSelect) IntX

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

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

func (*WithoutFieldsSelect) Ints

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

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

func (*WithoutFieldsSelect) IntsX

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

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

func (*WithoutFieldsSelect) Scan

func (wfs *WithoutFieldsSelect) Scan(ctx context.Context, v any) error

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

func (*WithoutFieldsSelect) ScanX

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

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

func (*WithoutFieldsSelect) String

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

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

func (*WithoutFieldsSelect) StringX

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

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

func (*WithoutFieldsSelect) Strings

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

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

func (*WithoutFieldsSelect) StringsX

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

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

type WithoutFieldsSlice

type WithoutFieldsSlice []*WithoutFields

WithoutFieldsSlice is a parsable slice of WithoutFields.

type WithoutFieldsUpdate

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

WithoutFieldsUpdate is the builder for updating WithoutFields entities.

func (*WithoutFieldsUpdate) Exec

func (wfu *WithoutFieldsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*WithoutFieldsUpdate) ExecX

func (wfu *WithoutFieldsUpdate) ExecX(ctx context.Context)

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

func (*WithoutFieldsUpdate) Mutation

func (wfu *WithoutFieldsUpdate) Mutation() *WithoutFieldsMutation

Mutation returns the WithoutFieldsMutation object of the builder.

func (*WithoutFieldsUpdate) Save

func (wfu *WithoutFieldsUpdate) Save(ctx context.Context) (int, error)

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

func (*WithoutFieldsUpdate) SaveX

func (wfu *WithoutFieldsUpdate) SaveX(ctx context.Context) int

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

func (*WithoutFieldsUpdate) Where

Where appends a list predicates to the WithoutFieldsUpdate builder.

type WithoutFieldsUpdateOne

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

WithoutFieldsUpdateOne is the builder for updating a single WithoutFields entity.

func (*WithoutFieldsUpdateOne) Exec

func (wfuo *WithoutFieldsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*WithoutFieldsUpdateOne) ExecX

func (wfuo *WithoutFieldsUpdateOne) ExecX(ctx context.Context)

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

func (*WithoutFieldsUpdateOne) Mutation

Mutation returns the WithoutFieldsMutation object of the builder.

func (*WithoutFieldsUpdateOne) Save

Save executes the query and returns the updated WithoutFields entity.

func (*WithoutFieldsUpdateOne) SaveX

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

func (*WithoutFieldsUpdateOne) Select

func (wfuo *WithoutFieldsUpdateOne) Select(field string, fields ...string) *WithoutFieldsUpdateOne

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

func (*WithoutFieldsUpdateOne) Where

Where appends a list predicates to the WithoutFieldsUpdate builder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL