ent

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: Apache-2.0 Imports: 22 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.
	TypeIssueForEnt      = "IssueForEnt"
	TypeRepositoryForEnt = "RepositoryForEnt"
	TypeTable01ForEnt    = "Table01ForEnt"
	TypeUserForEnt       = "UserForEnt"
)

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
	// IssueForEnt is the client for interacting with the IssueForEnt builders.
	IssueForEnt *IssueForEntClient
	// RepositoryForEnt is the client for interacting with the RepositoryForEnt builders.
	RepositoryForEnt *RepositoryForEntClient
	// Table01ForEnt is the client for interacting with the Table01ForEnt builders.
	Table01ForEnt *Table01ForEntClient
	// UserForEnt is the client for interacting with the UserForEnt builders.
	UserForEnt *UserForEntClient
	// 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().
	IssueForEnt.
	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 IssueForEnt

type IssueForEnt struct {

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

IssueForEnt is the model entity for the IssueForEnt schema.

func (*IssueForEnt) QueryRepository

func (ife *IssueForEnt) QueryRepository() *RepositoryForEntQuery

QueryRepository queries the "repository" edge of the IssueForEnt entity.

func (*IssueForEnt) String

func (ife *IssueForEnt) String() string

String implements the fmt.Stringer.

func (*IssueForEnt) Unwrap

func (ife *IssueForEnt) Unwrap() *IssueForEnt

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

func (ife *IssueForEnt) Update() *IssueForEntUpdateOne

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

func (*IssueForEnt) Value

func (ife *IssueForEnt) Value(name string) (ent.Value, error)

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

type IssueForEntClient

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

IssueForEntClient is a client for the IssueForEnt schema.

func NewIssueForEntClient

func NewIssueForEntClient(c config) *IssueForEntClient

NewIssueForEntClient returns a client for the IssueForEnt from the given config.

func (*IssueForEntClient) Create

func (c *IssueForEntClient) Create() *IssueForEntCreate

Create returns a builder for creating a IssueForEnt entity.

func (*IssueForEntClient) CreateBulk

func (c *IssueForEntClient) CreateBulk(builders ...*IssueForEntCreate) *IssueForEntCreateBulk

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

func (*IssueForEntClient) Delete

func (c *IssueForEntClient) Delete() *IssueForEntDelete

Delete returns a delete builder for IssueForEnt.

func (*IssueForEntClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IssueForEntClient) DeleteOneID

func (c *IssueForEntClient) DeleteOneID(id int) *IssueForEntDeleteOne

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

func (*IssueForEntClient) Get

func (c *IssueForEntClient) Get(ctx context.Context, id int) (*IssueForEnt, error)

Get returns a IssueForEnt entity by its id.

func (*IssueForEntClient) GetX

func (c *IssueForEntClient) GetX(ctx context.Context, id int) *IssueForEnt

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

func (*IssueForEntClient) Hooks

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

Hooks returns the client hooks.

func (*IssueForEntClient) Intercept

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

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

func (*IssueForEntClient) Interceptors

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

Interceptors returns the client interceptors.

func (*IssueForEntClient) MapCreateBulk

func (c *IssueForEntClient) MapCreateBulk(slice any, setFunc func(*IssueForEntCreate, int)) *IssueForEntCreateBulk

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 (*IssueForEntClient) Query

func (c *IssueForEntClient) Query() *IssueForEntQuery

Query returns a query builder for IssueForEnt.

func (*IssueForEntClient) QueryRepository

func (c *IssueForEntClient) QueryRepository(ife *IssueForEnt) *RepositoryForEntQuery

QueryRepository queries the repository edge of a IssueForEnt.

func (*IssueForEntClient) Update

func (c *IssueForEntClient) Update() *IssueForEntUpdate

Update returns an update builder for IssueForEnt.

func (*IssueForEntClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*IssueForEntClient) UpdateOneID

func (c *IssueForEntClient) UpdateOneID(id int) *IssueForEntUpdateOne

UpdateOneID returns an update builder for the given id.

func (*IssueForEntClient) Use

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

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

type IssueForEntCreate

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

IssueForEntCreate is the builder for creating a IssueForEnt entity.

func (*IssueForEntCreate) Exec

func (ifec *IssueForEntCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*IssueForEntCreate) ExecX

func (ifec *IssueForEntCreate) ExecX(ctx context.Context)

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

func (*IssueForEntCreate) Mutation

func (ifec *IssueForEntCreate) Mutation() *IssueForEntMutation

Mutation returns the IssueForEntMutation object of the builder.

func (*IssueForEntCreate) OnConflict

func (ifec *IssueForEntCreate) OnConflict(opts ...sql.ConflictOption) *IssueForEntUpsertOne

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

client.IssueForEnt.Create().
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*IssueForEntCreate) OnConflictColumns

func (ifec *IssueForEntCreate) OnConflictColumns(columns ...string) *IssueForEntUpsertOne

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

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

func (*IssueForEntCreate) Save

func (ifec *IssueForEntCreate) Save(ctx context.Context) (*IssueForEnt, error)

Save creates the IssueForEnt in the database.

func (*IssueForEntCreate) SaveX

func (ifec *IssueForEntCreate) SaveX(ctx context.Context) *IssueForEnt

SaveX calls Save and panics if Save returns an error.

func (*IssueForEntCreate) SetNillableRepositoryID

func (ifec *IssueForEntCreate) SetNillableRepositoryID(id *int) *IssueForEntCreate

SetNillableRepositoryID sets the "repository" edge to the RepositoryForEnt entity by ID if the given value is not nil.

func (*IssueForEntCreate) SetRepository

func (ifec *IssueForEntCreate) SetRepository(r *RepositoryForEnt) *IssueForEntCreate

SetRepository sets the "repository" edge to the RepositoryForEnt entity.

func (*IssueForEntCreate) SetRepositoryID

func (ifec *IssueForEntCreate) SetRepositoryID(id int) *IssueForEntCreate

SetRepositoryID sets the "repository" edge to the RepositoryForEnt entity by ID.

type IssueForEntCreateBulk

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

IssueForEntCreateBulk is the builder for creating many IssueForEnt entities in bulk.

func (*IssueForEntCreateBulk) Exec

func (ifecb *IssueForEntCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*IssueForEntCreateBulk) ExecX

func (ifecb *IssueForEntCreateBulk) ExecX(ctx context.Context)

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

func (*IssueForEntCreateBulk) OnConflict

func (ifecb *IssueForEntCreateBulk) OnConflict(opts ...sql.ConflictOption) *IssueForEntUpsertBulk

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

client.IssueForEnt.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*IssueForEntCreateBulk) OnConflictColumns

func (ifecb *IssueForEntCreateBulk) OnConflictColumns(columns ...string) *IssueForEntUpsertBulk

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

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

func (*IssueForEntCreateBulk) Save

func (ifecb *IssueForEntCreateBulk) Save(ctx context.Context) ([]*IssueForEnt, error)

Save creates the IssueForEnt entities in the database.

func (*IssueForEntCreateBulk) SaveX

func (ifecb *IssueForEntCreateBulk) SaveX(ctx context.Context) []*IssueForEnt

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

type IssueForEntDelete

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

IssueForEntDelete is the builder for deleting a IssueForEnt entity.

func (*IssueForEntDelete) Exec

func (ifed *IssueForEntDelete) Exec(ctx context.Context) (int, error)

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

func (*IssueForEntDelete) ExecX

func (ifed *IssueForEntDelete) ExecX(ctx context.Context) int

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

func (*IssueForEntDelete) Where

Where appends a list predicates to the IssueForEntDelete builder.

type IssueForEntDeleteOne

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

IssueForEntDeleteOne is the builder for deleting a single IssueForEnt entity.

func (*IssueForEntDeleteOne) Exec

func (ifedo *IssueForEntDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*IssueForEntDeleteOne) ExecX

func (ifedo *IssueForEntDeleteOne) ExecX(ctx context.Context)

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

func (*IssueForEntDeleteOne) Where

Where appends a list predicates to the IssueForEntDelete builder.

type IssueForEntEdges

type IssueForEntEdges struct {
	// Repository holds the value of the repository edge.
	Repository *RepositoryForEnt `json:"repository,omitempty"`
	// contains filtered or unexported fields
}

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

func (IssueForEntEdges) RepositoryOrErr

func (e IssueForEntEdges) RepositoryOrErr() (*RepositoryForEnt, error)

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

type IssueForEntGroupBy

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

IssueForEntGroupBy is the group-by builder for IssueForEnt entities.

func (*IssueForEntGroupBy) Aggregate

func (ifegb *IssueForEntGroupBy) Aggregate(fns ...AggregateFunc) *IssueForEntGroupBy

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

func (*IssueForEntGroupBy) Bool

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

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

func (*IssueForEntGroupBy) BoolX

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

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

func (*IssueForEntGroupBy) Bools

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

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

func (*IssueForEntGroupBy) BoolsX

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

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

func (*IssueForEntGroupBy) Float64

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

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

func (*IssueForEntGroupBy) Float64X

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

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

func (*IssueForEntGroupBy) Float64s

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

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

func (*IssueForEntGroupBy) Float64sX

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

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

func (*IssueForEntGroupBy) Int

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

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

func (*IssueForEntGroupBy) IntX

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

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

func (*IssueForEntGroupBy) Ints

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

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

func (*IssueForEntGroupBy) IntsX

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

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

func (*IssueForEntGroupBy) Scan

func (ifegb *IssueForEntGroupBy) Scan(ctx context.Context, v any) error

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

func (*IssueForEntGroupBy) ScanX

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

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

func (*IssueForEntGroupBy) String

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

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

func (*IssueForEntGroupBy) StringX

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

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

func (*IssueForEntGroupBy) Strings

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

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

func (*IssueForEntGroupBy) StringsX

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

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

type IssueForEntMutation

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

IssueForEntMutation represents an operation that mutates the IssueForEnt nodes in the graph.

func (*IssueForEntMutation) AddField

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

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

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

func (*IssueForEntMutation) AddedField

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

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

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

func (*IssueForEntMutation) AddedIDs

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

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

func (*IssueForEntMutation) ClearEdge

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

func (m *IssueForEntMutation) 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 (*IssueForEntMutation) ClearRepository

func (m *IssueForEntMutation) ClearRepository()

ClearRepository clears the "repository" edge to the RepositoryForEnt entity.

func (*IssueForEntMutation) ClearedEdges

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

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

func (*IssueForEntMutation) ClearedFields

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

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

func (IssueForEntMutation) Client

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

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

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

func (*IssueForEntMutation) Field

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

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

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

func (*IssueForEntMutation) Fields

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

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

func (m *IssueForEntMutation) 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 (*IssueForEntMutation) OldField

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

func (m *IssueForEntMutation) Op() Op

Op returns the operation name.

func (*IssueForEntMutation) RemovedEdges

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

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

func (*IssueForEntMutation) RemovedIDs

func (m *IssueForEntMutation) 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 (*IssueForEntMutation) RepositoryCleared

func (m *IssueForEntMutation) RepositoryCleared() bool

RepositoryCleared reports if the "repository" edge to the RepositoryForEnt entity was cleared.

func (*IssueForEntMutation) RepositoryID

func (m *IssueForEntMutation) RepositoryID() (id int, exists bool)

RepositoryID returns the "repository" edge ID in the mutation.

func (*IssueForEntMutation) RepositoryIDs

func (m *IssueForEntMutation) RepositoryIDs() (ids []int)

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

func (*IssueForEntMutation) ResetEdge

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

func (m *IssueForEntMutation) 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 (*IssueForEntMutation) ResetRepository

func (m *IssueForEntMutation) ResetRepository()

ResetRepository resets all changes to the "repository" edge.

func (*IssueForEntMutation) SetField

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

func (m *IssueForEntMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IssueForEntMutation) SetRepositoryID

func (m *IssueForEntMutation) SetRepositoryID(id int)

SetRepositoryID sets the "repository" edge to the RepositoryForEnt entity by id.

func (IssueForEntMutation) Tx

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

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

func (*IssueForEntMutation) Type

func (m *IssueForEntMutation) Type() string

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

func (*IssueForEntMutation) Where

func (m *IssueForEntMutation) Where(ps ...predicate.IssueForEnt)

Where appends a list predicates to the IssueForEntMutation builder.

func (*IssueForEntMutation) WhereP

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

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

type IssueForEntQuery

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

IssueForEntQuery is the builder for querying IssueForEnt entities.

func (*IssueForEntQuery) Aggregate

func (ifeq *IssueForEntQuery) Aggregate(fns ...AggregateFunc) *IssueForEntSelect

Aggregate returns a IssueForEntSelect configured with the given aggregations.

func (*IssueForEntQuery) All

func (ifeq *IssueForEntQuery) All(ctx context.Context) ([]*IssueForEnt, error)

All executes the query and returns a list of IssueForEnts.

func (*IssueForEntQuery) AllX

func (ifeq *IssueForEntQuery) AllX(ctx context.Context) []*IssueForEnt

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

func (*IssueForEntQuery) Clone

func (ifeq *IssueForEntQuery) Clone() *IssueForEntQuery

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

func (*IssueForEntQuery) Count

func (ifeq *IssueForEntQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IssueForEntQuery) CountX

func (ifeq *IssueForEntQuery) CountX(ctx context.Context) int

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

func (*IssueForEntQuery) Exist

func (ifeq *IssueForEntQuery) Exist(ctx context.Context) (bool, error)

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

func (*IssueForEntQuery) ExistX

func (ifeq *IssueForEntQuery) ExistX(ctx context.Context) bool

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

func (*IssueForEntQuery) First

func (ifeq *IssueForEntQuery) First(ctx context.Context) (*IssueForEnt, error)

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

func (*IssueForEntQuery) FirstID

func (ifeq *IssueForEntQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*IssueForEntQuery) FirstIDX

func (ifeq *IssueForEntQuery) FirstIDX(ctx context.Context) int

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

func (*IssueForEntQuery) FirstX

func (ifeq *IssueForEntQuery) FirstX(ctx context.Context) *IssueForEnt

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

func (*IssueForEntQuery) GroupBy

func (ifeq *IssueForEntQuery) GroupBy(field string, fields ...string) *IssueForEntGroupBy

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 (*IssueForEntQuery) IDs

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

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

func (*IssueForEntQuery) IDsX

func (ifeq *IssueForEntQuery) IDsX(ctx context.Context) []int

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

func (*IssueForEntQuery) Limit

func (ifeq *IssueForEntQuery) Limit(limit int) *IssueForEntQuery

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

func (*IssueForEntQuery) Offset

func (ifeq *IssueForEntQuery) Offset(offset int) *IssueForEntQuery

Offset to start from.

func (*IssueForEntQuery) Only

func (ifeq *IssueForEntQuery) Only(ctx context.Context) (*IssueForEnt, error)

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

func (*IssueForEntQuery) OnlyID

func (ifeq *IssueForEntQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*IssueForEntQuery) OnlyIDX

func (ifeq *IssueForEntQuery) OnlyIDX(ctx context.Context) int

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

func (*IssueForEntQuery) OnlyX

func (ifeq *IssueForEntQuery) OnlyX(ctx context.Context) *IssueForEnt

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

func (*IssueForEntQuery) Order

Order specifies how the records should be ordered.

func (*IssueForEntQuery) QueryRepository

func (ifeq *IssueForEntQuery) QueryRepository() *RepositoryForEntQuery

QueryRepository chains the current query on the "repository" edge.

func (*IssueForEntQuery) Select

func (ifeq *IssueForEntQuery) Select(fields ...string) *IssueForEntSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*IssueForEntQuery) Unique

func (ifeq *IssueForEntQuery) Unique(unique bool) *IssueForEntQuery

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

Where adds a new predicate for the IssueForEntQuery builder.

func (*IssueForEntQuery) WithRepository

func (ifeq *IssueForEntQuery) WithRepository(opts ...func(*RepositoryForEntQuery)) *IssueForEntQuery

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

type IssueForEntSelect

type IssueForEntSelect struct {
	*IssueForEntQuery
	// contains filtered or unexported fields
}

IssueForEntSelect is the builder for selecting fields of IssueForEnt entities.

func (*IssueForEntSelect) Aggregate

func (ifes *IssueForEntSelect) Aggregate(fns ...AggregateFunc) *IssueForEntSelect

Aggregate adds the given aggregation functions to the selector query.

func (*IssueForEntSelect) Bool

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

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

func (*IssueForEntSelect) BoolX

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

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

func (*IssueForEntSelect) Bools

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

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

func (*IssueForEntSelect) BoolsX

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

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

func (*IssueForEntSelect) Float64

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

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

func (*IssueForEntSelect) Float64X

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

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

func (*IssueForEntSelect) Float64s

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

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

func (*IssueForEntSelect) Float64sX

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

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

func (*IssueForEntSelect) Int

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

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

func (*IssueForEntSelect) IntX

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

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

func (*IssueForEntSelect) Ints

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

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

func (*IssueForEntSelect) IntsX

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

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

func (*IssueForEntSelect) Scan

func (ifes *IssueForEntSelect) Scan(ctx context.Context, v any) error

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

func (*IssueForEntSelect) ScanX

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

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

func (*IssueForEntSelect) String

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

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

func (*IssueForEntSelect) StringX

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

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

func (*IssueForEntSelect) Strings

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

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

func (*IssueForEntSelect) StringsX

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

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

type IssueForEntUpdate

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

IssueForEntUpdate is the builder for updating IssueForEnt entities.

func (*IssueForEntUpdate) ClearRepository

func (ifeu *IssueForEntUpdate) ClearRepository() *IssueForEntUpdate

ClearRepository clears the "repository" edge to the RepositoryForEnt entity.

func (*IssueForEntUpdate) Exec

func (ifeu *IssueForEntUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*IssueForEntUpdate) ExecX

func (ifeu *IssueForEntUpdate) ExecX(ctx context.Context)

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

func (*IssueForEntUpdate) Mutation

func (ifeu *IssueForEntUpdate) Mutation() *IssueForEntMutation

Mutation returns the IssueForEntMutation object of the builder.

func (*IssueForEntUpdate) Save

func (ifeu *IssueForEntUpdate) Save(ctx context.Context) (int, error)

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

func (*IssueForEntUpdate) SaveX

func (ifeu *IssueForEntUpdate) SaveX(ctx context.Context) int

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

func (*IssueForEntUpdate) SetNillableRepositoryID

func (ifeu *IssueForEntUpdate) SetNillableRepositoryID(id *int) *IssueForEntUpdate

SetNillableRepositoryID sets the "repository" edge to the RepositoryForEnt entity by ID if the given value is not nil.

func (*IssueForEntUpdate) SetRepository

func (ifeu *IssueForEntUpdate) SetRepository(r *RepositoryForEnt) *IssueForEntUpdate

SetRepository sets the "repository" edge to the RepositoryForEnt entity.

func (*IssueForEntUpdate) SetRepositoryID

func (ifeu *IssueForEntUpdate) SetRepositoryID(id int) *IssueForEntUpdate

SetRepositoryID sets the "repository" edge to the RepositoryForEnt entity by ID.

func (*IssueForEntUpdate) Where

Where appends a list predicates to the IssueForEntUpdate builder.

type IssueForEntUpdateOne

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

IssueForEntUpdateOne is the builder for updating a single IssueForEnt entity.

func (*IssueForEntUpdateOne) ClearRepository

func (ifeuo *IssueForEntUpdateOne) ClearRepository() *IssueForEntUpdateOne

ClearRepository clears the "repository" edge to the RepositoryForEnt entity.

func (*IssueForEntUpdateOne) Exec

func (ifeuo *IssueForEntUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*IssueForEntUpdateOne) ExecX

func (ifeuo *IssueForEntUpdateOne) ExecX(ctx context.Context)

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

func (*IssueForEntUpdateOne) Mutation

func (ifeuo *IssueForEntUpdateOne) Mutation() *IssueForEntMutation

Mutation returns the IssueForEntMutation object of the builder.

func (*IssueForEntUpdateOne) Save

func (ifeuo *IssueForEntUpdateOne) Save(ctx context.Context) (*IssueForEnt, error)

Save executes the query and returns the updated IssueForEnt entity.

func (*IssueForEntUpdateOne) SaveX

func (ifeuo *IssueForEntUpdateOne) SaveX(ctx context.Context) *IssueForEnt

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

func (*IssueForEntUpdateOne) Select

func (ifeuo *IssueForEntUpdateOne) Select(field string, fields ...string) *IssueForEntUpdateOne

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

func (*IssueForEntUpdateOne) SetNillableRepositoryID

func (ifeuo *IssueForEntUpdateOne) SetNillableRepositoryID(id *int) *IssueForEntUpdateOne

SetNillableRepositoryID sets the "repository" edge to the RepositoryForEnt entity by ID if the given value is not nil.

func (*IssueForEntUpdateOne) SetRepository

SetRepository sets the "repository" edge to the RepositoryForEnt entity.

func (*IssueForEntUpdateOne) SetRepositoryID

func (ifeuo *IssueForEntUpdateOne) SetRepositoryID(id int) *IssueForEntUpdateOne

SetRepositoryID sets the "repository" edge to the RepositoryForEnt entity by ID.

func (*IssueForEntUpdateOne) Where

Where appends a list predicates to the IssueForEntUpdate builder.

type IssueForEntUpsert

type IssueForEntUpsert struct {
	*sql.UpdateSet
}

IssueForEntUpsert is the "OnConflict" setter.

type IssueForEntUpsertBulk

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

IssueForEntUpsertBulk is the builder for "upsert"-ing a bulk of IssueForEnt nodes.

func (*IssueForEntUpsertBulk) DoNothing

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

func (*IssueForEntUpsertBulk) Exec

Exec executes the query.

func (*IssueForEntUpsertBulk) ExecX

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

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

func (*IssueForEntUpsertBulk) Ignore

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

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

func (*IssueForEntUpsertBulk) Update

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

func (*IssueForEntUpsertBulk) UpdateNewValues

func (u *IssueForEntUpsertBulk) UpdateNewValues() *IssueForEntUpsertBulk

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

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

type IssueForEntUpsertOne

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

IssueForEntUpsertOne is the builder for "upsert"-ing

one IssueForEnt node.

func (*IssueForEntUpsertOne) DoNothing

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

func (*IssueForEntUpsertOne) Exec

Exec executes the query.

func (*IssueForEntUpsertOne) ExecX

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

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

func (*IssueForEntUpsertOne) ID

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

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

func (*IssueForEntUpsertOne) IDX

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

func (*IssueForEntUpsertOne) Ignore

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

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

func (*IssueForEntUpsertOne) Update

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

func (*IssueForEntUpsertOne) UpdateNewValues

func (u *IssueForEntUpsertOne) UpdateNewValues() *IssueForEntUpsertOne

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

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

type IssueForEnts

type IssueForEnts []*IssueForEnt

IssueForEnts is a parsable slice of IssueForEnt.

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 RepositoryForEnt

type RepositoryForEnt struct {

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

RepositoryForEnt is the model entity for the RepositoryForEnt schema.

func (*RepositoryForEnt) QueryIssueForEnts

func (rfe *RepositoryForEnt) QueryIssueForEnts() *IssueForEntQuery

QueryIssueForEnts queries the "issue_for_ents" edge of the RepositoryForEnt entity.

func (*RepositoryForEnt) QueryUserForEnts

func (rfe *RepositoryForEnt) QueryUserForEnts() *UserForEntQuery

QueryUserForEnts queries the "user_for_ents" edge of the RepositoryForEnt entity.

func (*RepositoryForEnt) String

func (rfe *RepositoryForEnt) String() string

String implements the fmt.Stringer.

func (*RepositoryForEnt) Unwrap

func (rfe *RepositoryForEnt) Unwrap() *RepositoryForEnt

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

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

func (*RepositoryForEnt) Value

func (rfe *RepositoryForEnt) Value(name string) (ent.Value, error)

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

type RepositoryForEntClient

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

RepositoryForEntClient is a client for the RepositoryForEnt schema.

func NewRepositoryForEntClient

func NewRepositoryForEntClient(c config) *RepositoryForEntClient

NewRepositoryForEntClient returns a client for the RepositoryForEnt from the given config.

func (*RepositoryForEntClient) Create

Create returns a builder for creating a RepositoryForEnt entity.

func (*RepositoryForEntClient) CreateBulk

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

func (*RepositoryForEntClient) Delete

Delete returns a delete builder for RepositoryForEnt.

func (*RepositoryForEntClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RepositoryForEntClient) DeleteOneID

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

func (*RepositoryForEntClient) Get

Get returns a RepositoryForEnt entity by its id.

func (*RepositoryForEntClient) GetX

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

func (*RepositoryForEntClient) Hooks

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

Hooks returns the client hooks.

func (*RepositoryForEntClient) Intercept

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

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

func (*RepositoryForEntClient) Interceptors

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

Interceptors returns the client interceptors.

func (*RepositoryForEntClient) MapCreateBulk

func (c *RepositoryForEntClient) MapCreateBulk(slice any, setFunc func(*RepositoryForEntCreate, int)) *RepositoryForEntCreateBulk

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 (*RepositoryForEntClient) Query

Query returns a query builder for RepositoryForEnt.

func (*RepositoryForEntClient) QueryIssueForEnts

func (c *RepositoryForEntClient) QueryIssueForEnts(rfe *RepositoryForEnt) *IssueForEntQuery

QueryIssueForEnts queries the issue_for_ents edge of a RepositoryForEnt.

func (*RepositoryForEntClient) QueryUserForEnts

func (c *RepositoryForEntClient) QueryUserForEnts(rfe *RepositoryForEnt) *UserForEntQuery

QueryUserForEnts queries the user_for_ents edge of a RepositoryForEnt.

func (*RepositoryForEntClient) Update

Update returns an update builder for RepositoryForEnt.

func (*RepositoryForEntClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RepositoryForEntClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*RepositoryForEntClient) Use

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

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

type RepositoryForEntCreate

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

RepositoryForEntCreate is the builder for creating a RepositoryForEnt entity.

func (*RepositoryForEntCreate) AddIssueForEntIDs

func (rfec *RepositoryForEntCreate) AddIssueForEntIDs(ids ...int) *RepositoryForEntCreate

AddIssueForEntIDs adds the "issue_for_ents" edge to the IssueForEnt entity by IDs.

func (*RepositoryForEntCreate) AddIssueForEnts

func (rfec *RepositoryForEntCreate) AddIssueForEnts(i ...*IssueForEnt) *RepositoryForEntCreate

AddIssueForEnts adds the "issue_for_ents" edges to the IssueForEnt entity.

func (*RepositoryForEntCreate) AddUserForEntIDs

func (rfec *RepositoryForEntCreate) AddUserForEntIDs(ids ...int) *RepositoryForEntCreate

AddUserForEntIDs adds the "user_for_ents" edge to the UserForEnt entity by IDs.

func (*RepositoryForEntCreate) AddUserForEnts

func (rfec *RepositoryForEntCreate) AddUserForEnts(u ...*UserForEnt) *RepositoryForEntCreate

AddUserForEnts adds the "user_for_ents" edges to the UserForEnt entity.

func (*RepositoryForEntCreate) Exec

func (rfec *RepositoryForEntCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RepositoryForEntCreate) ExecX

func (rfec *RepositoryForEntCreate) ExecX(ctx context.Context)

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

func (*RepositoryForEntCreate) Mutation

Mutation returns the RepositoryForEntMutation object of the builder.

func (*RepositoryForEntCreate) OnConflict

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

client.RepositoryForEnt.Create().
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*RepositoryForEntCreate) OnConflictColumns

func (rfec *RepositoryForEntCreate) OnConflictColumns(columns ...string) *RepositoryForEntUpsertOne

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

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

func (*RepositoryForEntCreate) Save

Save creates the RepositoryForEnt in the database.

func (*RepositoryForEntCreate) SaveX

SaveX calls Save and panics if Save returns an error.

type RepositoryForEntCreateBulk

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

RepositoryForEntCreateBulk is the builder for creating many RepositoryForEnt entities in bulk.

func (*RepositoryForEntCreateBulk) Exec

Exec executes the query.

func (*RepositoryForEntCreateBulk) ExecX

func (rfecb *RepositoryForEntCreateBulk) ExecX(ctx context.Context)

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

func (*RepositoryForEntCreateBulk) OnConflict

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

client.RepositoryForEnt.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*RepositoryForEntCreateBulk) OnConflictColumns

func (rfecb *RepositoryForEntCreateBulk) OnConflictColumns(columns ...string) *RepositoryForEntUpsertBulk

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

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

func (*RepositoryForEntCreateBulk) Save

Save creates the RepositoryForEnt entities in the database.

func (*RepositoryForEntCreateBulk) SaveX

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

type RepositoryForEntDelete

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

RepositoryForEntDelete is the builder for deleting a RepositoryForEnt entity.

func (*RepositoryForEntDelete) Exec

func (rfed *RepositoryForEntDelete) Exec(ctx context.Context) (int, error)

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

func (*RepositoryForEntDelete) ExecX

func (rfed *RepositoryForEntDelete) ExecX(ctx context.Context) int

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

func (*RepositoryForEntDelete) Where

Where appends a list predicates to the RepositoryForEntDelete builder.

type RepositoryForEntDeleteOne

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

RepositoryForEntDeleteOne is the builder for deleting a single RepositoryForEnt entity.

func (*RepositoryForEntDeleteOne) Exec

Exec executes the deletion query.

func (*RepositoryForEntDeleteOne) ExecX

func (rfedo *RepositoryForEntDeleteOne) ExecX(ctx context.Context)

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

func (*RepositoryForEntDeleteOne) Where

Where appends a list predicates to the RepositoryForEntDelete builder.

type RepositoryForEntEdges

type RepositoryForEntEdges struct {
	// UserForEnts holds the value of the user_for_ents edge.
	UserForEnts []*UserForEnt `json:"user_for_ents,omitempty"`
	// IssueForEnts holds the value of the issue_for_ents edge.
	IssueForEnts []*IssueForEnt `json:"issue_for_ents,omitempty"`
	// contains filtered or unexported fields
}

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

func (RepositoryForEntEdges) IssueForEntsOrErr

func (e RepositoryForEntEdges) IssueForEntsOrErr() ([]*IssueForEnt, error)

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

func (RepositoryForEntEdges) UserForEntsOrErr

func (e RepositoryForEntEdges) UserForEntsOrErr() ([]*UserForEnt, error)

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

type RepositoryForEntGroupBy

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

RepositoryForEntGroupBy is the group-by builder for RepositoryForEnt entities.

func (*RepositoryForEntGroupBy) Aggregate

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

func (*RepositoryForEntGroupBy) Bool

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

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

func (*RepositoryForEntGroupBy) BoolX

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

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

func (*RepositoryForEntGroupBy) Bools

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

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

func (*RepositoryForEntGroupBy) BoolsX

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

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

func (*RepositoryForEntGroupBy) Float64

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

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

func (*RepositoryForEntGroupBy) Float64X

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

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

func (*RepositoryForEntGroupBy) Float64s

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

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

func (*RepositoryForEntGroupBy) Float64sX

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

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

func (*RepositoryForEntGroupBy) Int

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

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

func (*RepositoryForEntGroupBy) IntX

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

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

func (*RepositoryForEntGroupBy) Ints

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

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

func (*RepositoryForEntGroupBy) IntsX

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

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

func (*RepositoryForEntGroupBy) Scan

func (rfegb *RepositoryForEntGroupBy) Scan(ctx context.Context, v any) error

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

func (*RepositoryForEntGroupBy) ScanX

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

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

func (*RepositoryForEntGroupBy) String

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

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

func (*RepositoryForEntGroupBy) StringX

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

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

func (*RepositoryForEntGroupBy) Strings

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

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

func (*RepositoryForEntGroupBy) StringsX

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

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

type RepositoryForEntMutation

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

RepositoryForEntMutation represents an operation that mutates the RepositoryForEnt nodes in the graph.

func (*RepositoryForEntMutation) AddField

func (m *RepositoryForEntMutation) 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 (*RepositoryForEntMutation) AddIssueForEntIDs

func (m *RepositoryForEntMutation) AddIssueForEntIDs(ids ...int)

AddIssueForEntIDs adds the "issue_for_ents" edge to the IssueForEnt entity by ids.

func (*RepositoryForEntMutation) AddUserForEntIDs

func (m *RepositoryForEntMutation) AddUserForEntIDs(ids ...int)

AddUserForEntIDs adds the "user_for_ents" edge to the UserForEnt entity by ids.

func (*RepositoryForEntMutation) AddedEdges

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

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

func (*RepositoryForEntMutation) AddedField

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

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

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

func (*RepositoryForEntMutation) AddedIDs

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

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

func (*RepositoryForEntMutation) ClearEdge

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

func (m *RepositoryForEntMutation) 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 (*RepositoryForEntMutation) ClearIssueForEnts

func (m *RepositoryForEntMutation) ClearIssueForEnts()

ClearIssueForEnts clears the "issue_for_ents" edge to the IssueForEnt entity.

func (*RepositoryForEntMutation) ClearUserForEnts

func (m *RepositoryForEntMutation) ClearUserForEnts()

ClearUserForEnts clears the "user_for_ents" edge to the UserForEnt entity.

func (*RepositoryForEntMutation) ClearedEdges

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

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

func (*RepositoryForEntMutation) ClearedFields

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

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

func (RepositoryForEntMutation) Client

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

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

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

func (*RepositoryForEntMutation) Field

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

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

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

func (*RepositoryForEntMutation) Fields

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

func (m *RepositoryForEntMutation) 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 (*RepositoryForEntMutation) 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 (*RepositoryForEntMutation) IssueForEntsCleared

func (m *RepositoryForEntMutation) IssueForEntsCleared() bool

IssueForEntsCleared reports if the "issue_for_ents" edge to the IssueForEnt entity was cleared.

func (*RepositoryForEntMutation) IssueForEntsIDs

func (m *RepositoryForEntMutation) IssueForEntsIDs() (ids []int)

IssueForEntsIDs returns the "issue_for_ents" edge IDs in the mutation.

func (*RepositoryForEntMutation) OldField

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

func (m *RepositoryForEntMutation) Op() Op

Op returns the operation name.

func (*RepositoryForEntMutation) RemoveIssueForEntIDs

func (m *RepositoryForEntMutation) RemoveIssueForEntIDs(ids ...int)

RemoveIssueForEntIDs removes the "issue_for_ents" edge to the IssueForEnt entity by IDs.

func (*RepositoryForEntMutation) RemoveUserForEntIDs

func (m *RepositoryForEntMutation) RemoveUserForEntIDs(ids ...int)

RemoveUserForEntIDs removes the "user_for_ents" edge to the UserForEnt entity by IDs.

func (*RepositoryForEntMutation) RemovedEdges

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

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

func (*RepositoryForEntMutation) RemovedIDs

func (m *RepositoryForEntMutation) 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 (*RepositoryForEntMutation) RemovedIssueForEntsIDs

func (m *RepositoryForEntMutation) RemovedIssueForEntsIDs() (ids []int)

RemovedIssueForEnts returns the removed IDs of the "issue_for_ents" edge to the IssueForEnt entity.

func (*RepositoryForEntMutation) RemovedUserForEntsIDs

func (m *RepositoryForEntMutation) RemovedUserForEntsIDs() (ids []int)

RemovedUserForEnts returns the removed IDs of the "user_for_ents" edge to the UserForEnt entity.

func (*RepositoryForEntMutation) ResetEdge

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

func (m *RepositoryForEntMutation) 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 (*RepositoryForEntMutation) ResetIssueForEnts

func (m *RepositoryForEntMutation) ResetIssueForEnts()

ResetIssueForEnts resets all changes to the "issue_for_ents" edge.

func (*RepositoryForEntMutation) ResetUserForEnts

func (m *RepositoryForEntMutation) ResetUserForEnts()

ResetUserForEnts resets all changes to the "user_for_ents" edge.

func (*RepositoryForEntMutation) SetField

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

func (m *RepositoryForEntMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (RepositoryForEntMutation) Tx

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

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

func (*RepositoryForEntMutation) Type

func (m *RepositoryForEntMutation) Type() string

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

func (*RepositoryForEntMutation) UserForEntsCleared

func (m *RepositoryForEntMutation) UserForEntsCleared() bool

UserForEntsCleared reports if the "user_for_ents" edge to the UserForEnt entity was cleared.

func (*RepositoryForEntMutation) UserForEntsIDs

func (m *RepositoryForEntMutation) UserForEntsIDs() (ids []int)

UserForEntsIDs returns the "user_for_ents" edge IDs in the mutation.

func (*RepositoryForEntMutation) Where

Where appends a list predicates to the RepositoryForEntMutation builder.

func (*RepositoryForEntMutation) WhereP

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

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

type RepositoryForEntQuery

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

RepositoryForEntQuery is the builder for querying RepositoryForEnt entities.

func (*RepositoryForEntQuery) Aggregate

Aggregate returns a RepositoryForEntSelect configured with the given aggregations.

func (*RepositoryForEntQuery) All

All executes the query and returns a list of RepositoryForEnts.

func (*RepositoryForEntQuery) AllX

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

func (*RepositoryForEntQuery) Clone

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

func (*RepositoryForEntQuery) Count

func (rfeq *RepositoryForEntQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RepositoryForEntQuery) CountX

func (rfeq *RepositoryForEntQuery) CountX(ctx context.Context) int

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

func (*RepositoryForEntQuery) Exist

func (rfeq *RepositoryForEntQuery) Exist(ctx context.Context) (bool, error)

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

func (*RepositoryForEntQuery) ExistX

func (rfeq *RepositoryForEntQuery) ExistX(ctx context.Context) bool

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

func (*RepositoryForEntQuery) First

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

func (*RepositoryForEntQuery) FirstID

func (rfeq *RepositoryForEntQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*RepositoryForEntQuery) FirstIDX

func (rfeq *RepositoryForEntQuery) FirstIDX(ctx context.Context) int

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

func (*RepositoryForEntQuery) FirstX

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

func (*RepositoryForEntQuery) GroupBy

func (rfeq *RepositoryForEntQuery) GroupBy(field string, fields ...string) *RepositoryForEntGroupBy

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 (*RepositoryForEntQuery) IDs

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

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

func (*RepositoryForEntQuery) IDsX

func (rfeq *RepositoryForEntQuery) IDsX(ctx context.Context) []int

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

func (*RepositoryForEntQuery) Limit

func (rfeq *RepositoryForEntQuery) Limit(limit int) *RepositoryForEntQuery

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

func (*RepositoryForEntQuery) Offset

func (rfeq *RepositoryForEntQuery) Offset(offset int) *RepositoryForEntQuery

Offset to start from.

func (*RepositoryForEntQuery) Only

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

func (*RepositoryForEntQuery) OnlyID

func (rfeq *RepositoryForEntQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*RepositoryForEntQuery) OnlyIDX

func (rfeq *RepositoryForEntQuery) OnlyIDX(ctx context.Context) int

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

func (*RepositoryForEntQuery) OnlyX

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

func (*RepositoryForEntQuery) Order

Order specifies how the records should be ordered.

func (*RepositoryForEntQuery) QueryIssueForEnts

func (rfeq *RepositoryForEntQuery) QueryIssueForEnts() *IssueForEntQuery

QueryIssueForEnts chains the current query on the "issue_for_ents" edge.

func (*RepositoryForEntQuery) QueryUserForEnts

func (rfeq *RepositoryForEntQuery) QueryUserForEnts() *UserForEntQuery

QueryUserForEnts chains the current query on the "user_for_ents" edge.

func (*RepositoryForEntQuery) Select

func (rfeq *RepositoryForEntQuery) Select(fields ...string) *RepositoryForEntSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*RepositoryForEntQuery) Unique

func (rfeq *RepositoryForEntQuery) Unique(unique bool) *RepositoryForEntQuery

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

Where adds a new predicate for the RepositoryForEntQuery builder.

func (*RepositoryForEntQuery) WithIssueForEnts

func (rfeq *RepositoryForEntQuery) WithIssueForEnts(opts ...func(*IssueForEntQuery)) *RepositoryForEntQuery

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

func (*RepositoryForEntQuery) WithUserForEnts

func (rfeq *RepositoryForEntQuery) WithUserForEnts(opts ...func(*UserForEntQuery)) *RepositoryForEntQuery

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

type RepositoryForEntSelect

type RepositoryForEntSelect struct {
	*RepositoryForEntQuery
	// contains filtered or unexported fields
}

RepositoryForEntSelect is the builder for selecting fields of RepositoryForEnt entities.

func (*RepositoryForEntSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*RepositoryForEntSelect) Bool

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

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

func (*RepositoryForEntSelect) BoolX

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

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

func (*RepositoryForEntSelect) Bools

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

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

func (*RepositoryForEntSelect) BoolsX

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

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

func (*RepositoryForEntSelect) Float64

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

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

func (*RepositoryForEntSelect) Float64X

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

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

func (*RepositoryForEntSelect) Float64s

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

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

func (*RepositoryForEntSelect) Float64sX

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

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

func (*RepositoryForEntSelect) Int

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

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

func (*RepositoryForEntSelect) IntX

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

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

func (*RepositoryForEntSelect) Ints

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

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

func (*RepositoryForEntSelect) IntsX

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

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

func (*RepositoryForEntSelect) Scan

func (rfes *RepositoryForEntSelect) Scan(ctx context.Context, v any) error

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

func (*RepositoryForEntSelect) ScanX

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

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

func (*RepositoryForEntSelect) String

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

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

func (*RepositoryForEntSelect) StringX

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

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

func (*RepositoryForEntSelect) Strings

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

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

func (*RepositoryForEntSelect) StringsX

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

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

type RepositoryForEntUpdate

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

RepositoryForEntUpdate is the builder for updating RepositoryForEnt entities.

func (*RepositoryForEntUpdate) AddIssueForEntIDs

func (rfeu *RepositoryForEntUpdate) AddIssueForEntIDs(ids ...int) *RepositoryForEntUpdate

AddIssueForEntIDs adds the "issue_for_ents" edge to the IssueForEnt entity by IDs.

func (*RepositoryForEntUpdate) AddIssueForEnts

func (rfeu *RepositoryForEntUpdate) AddIssueForEnts(i ...*IssueForEnt) *RepositoryForEntUpdate

AddIssueForEnts adds the "issue_for_ents" edges to the IssueForEnt entity.

func (*RepositoryForEntUpdate) AddUserForEntIDs

func (rfeu *RepositoryForEntUpdate) AddUserForEntIDs(ids ...int) *RepositoryForEntUpdate

AddUserForEntIDs adds the "user_for_ents" edge to the UserForEnt entity by IDs.

func (*RepositoryForEntUpdate) AddUserForEnts

func (rfeu *RepositoryForEntUpdate) AddUserForEnts(u ...*UserForEnt) *RepositoryForEntUpdate

AddUserForEnts adds the "user_for_ents" edges to the UserForEnt entity.

func (*RepositoryForEntUpdate) ClearIssueForEnts

func (rfeu *RepositoryForEntUpdate) ClearIssueForEnts() *RepositoryForEntUpdate

ClearIssueForEnts clears all "issue_for_ents" edges to the IssueForEnt entity.

func (*RepositoryForEntUpdate) ClearUserForEnts

func (rfeu *RepositoryForEntUpdate) ClearUserForEnts() *RepositoryForEntUpdate

ClearUserForEnts clears all "user_for_ents" edges to the UserForEnt entity.

func (*RepositoryForEntUpdate) Exec

func (rfeu *RepositoryForEntUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RepositoryForEntUpdate) ExecX

func (rfeu *RepositoryForEntUpdate) ExecX(ctx context.Context)

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

func (*RepositoryForEntUpdate) Mutation

Mutation returns the RepositoryForEntMutation object of the builder.

func (*RepositoryForEntUpdate) RemoveIssueForEntIDs

func (rfeu *RepositoryForEntUpdate) RemoveIssueForEntIDs(ids ...int) *RepositoryForEntUpdate

RemoveIssueForEntIDs removes the "issue_for_ents" edge to IssueForEnt entities by IDs.

func (*RepositoryForEntUpdate) RemoveIssueForEnts

func (rfeu *RepositoryForEntUpdate) RemoveIssueForEnts(i ...*IssueForEnt) *RepositoryForEntUpdate

RemoveIssueForEnts removes "issue_for_ents" edges to IssueForEnt entities.

func (*RepositoryForEntUpdate) RemoveUserForEntIDs

func (rfeu *RepositoryForEntUpdate) RemoveUserForEntIDs(ids ...int) *RepositoryForEntUpdate

RemoveUserForEntIDs removes the "user_for_ents" edge to UserForEnt entities by IDs.

func (*RepositoryForEntUpdate) RemoveUserForEnts

func (rfeu *RepositoryForEntUpdate) RemoveUserForEnts(u ...*UserForEnt) *RepositoryForEntUpdate

RemoveUserForEnts removes "user_for_ents" edges to UserForEnt entities.

func (*RepositoryForEntUpdate) Save

func (rfeu *RepositoryForEntUpdate) Save(ctx context.Context) (int, error)

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

func (*RepositoryForEntUpdate) SaveX

func (rfeu *RepositoryForEntUpdate) SaveX(ctx context.Context) int

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

func (*RepositoryForEntUpdate) Where

Where appends a list predicates to the RepositoryForEntUpdate builder.

type RepositoryForEntUpdateOne

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

RepositoryForEntUpdateOne is the builder for updating a single RepositoryForEnt entity.

func (*RepositoryForEntUpdateOne) AddIssueForEntIDs

func (rfeuo *RepositoryForEntUpdateOne) AddIssueForEntIDs(ids ...int) *RepositoryForEntUpdateOne

AddIssueForEntIDs adds the "issue_for_ents" edge to the IssueForEnt entity by IDs.

func (*RepositoryForEntUpdateOne) AddIssueForEnts

func (rfeuo *RepositoryForEntUpdateOne) AddIssueForEnts(i ...*IssueForEnt) *RepositoryForEntUpdateOne

AddIssueForEnts adds the "issue_for_ents" edges to the IssueForEnt entity.

func (*RepositoryForEntUpdateOne) AddUserForEntIDs

func (rfeuo *RepositoryForEntUpdateOne) AddUserForEntIDs(ids ...int) *RepositoryForEntUpdateOne

AddUserForEntIDs adds the "user_for_ents" edge to the UserForEnt entity by IDs.

func (*RepositoryForEntUpdateOne) AddUserForEnts

func (rfeuo *RepositoryForEntUpdateOne) AddUserForEnts(u ...*UserForEnt) *RepositoryForEntUpdateOne

AddUserForEnts adds the "user_for_ents" edges to the UserForEnt entity.

func (*RepositoryForEntUpdateOne) ClearIssueForEnts

func (rfeuo *RepositoryForEntUpdateOne) ClearIssueForEnts() *RepositoryForEntUpdateOne

ClearIssueForEnts clears all "issue_for_ents" edges to the IssueForEnt entity.

func (*RepositoryForEntUpdateOne) ClearUserForEnts

func (rfeuo *RepositoryForEntUpdateOne) ClearUserForEnts() *RepositoryForEntUpdateOne

ClearUserForEnts clears all "user_for_ents" edges to the UserForEnt entity.

func (*RepositoryForEntUpdateOne) Exec

Exec executes the query on the entity.

func (*RepositoryForEntUpdateOne) ExecX

func (rfeuo *RepositoryForEntUpdateOne) ExecX(ctx context.Context)

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

func (*RepositoryForEntUpdateOne) Mutation

Mutation returns the RepositoryForEntMutation object of the builder.

func (*RepositoryForEntUpdateOne) RemoveIssueForEntIDs

func (rfeuo *RepositoryForEntUpdateOne) RemoveIssueForEntIDs(ids ...int) *RepositoryForEntUpdateOne

RemoveIssueForEntIDs removes the "issue_for_ents" edge to IssueForEnt entities by IDs.

func (*RepositoryForEntUpdateOne) RemoveIssueForEnts

func (rfeuo *RepositoryForEntUpdateOne) RemoveIssueForEnts(i ...*IssueForEnt) *RepositoryForEntUpdateOne

RemoveIssueForEnts removes "issue_for_ents" edges to IssueForEnt entities.

func (*RepositoryForEntUpdateOne) RemoveUserForEntIDs

func (rfeuo *RepositoryForEntUpdateOne) RemoveUserForEntIDs(ids ...int) *RepositoryForEntUpdateOne

RemoveUserForEntIDs removes the "user_for_ents" edge to UserForEnt entities by IDs.

func (*RepositoryForEntUpdateOne) RemoveUserForEnts

func (rfeuo *RepositoryForEntUpdateOne) RemoveUserForEnts(u ...*UserForEnt) *RepositoryForEntUpdateOne

RemoveUserForEnts removes "user_for_ents" edges to UserForEnt entities.

func (*RepositoryForEntUpdateOne) Save

Save executes the query and returns the updated RepositoryForEnt entity.

func (*RepositoryForEntUpdateOne) SaveX

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

func (*RepositoryForEntUpdateOne) Select

func (rfeuo *RepositoryForEntUpdateOne) Select(field string, fields ...string) *RepositoryForEntUpdateOne

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

func (*RepositoryForEntUpdateOne) Where

Where appends a list predicates to the RepositoryForEntUpdate builder.

type RepositoryForEntUpsert

type RepositoryForEntUpsert struct {
	*sql.UpdateSet
}

RepositoryForEntUpsert is the "OnConflict" setter.

type RepositoryForEntUpsertBulk

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

RepositoryForEntUpsertBulk is the builder for "upsert"-ing a bulk of RepositoryForEnt nodes.

func (*RepositoryForEntUpsertBulk) DoNothing

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

func (*RepositoryForEntUpsertBulk) Exec

Exec executes the query.

func (*RepositoryForEntUpsertBulk) ExecX

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

func (*RepositoryForEntUpsertBulk) Ignore

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

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

func (*RepositoryForEntUpsertBulk) Update

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

func (*RepositoryForEntUpsertBulk) UpdateNewValues

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

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

type RepositoryForEntUpsertOne

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

RepositoryForEntUpsertOne is the builder for "upsert"-ing

one RepositoryForEnt node.

func (*RepositoryForEntUpsertOne) DoNothing

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

func (*RepositoryForEntUpsertOne) Exec

Exec executes the query.

func (*RepositoryForEntUpsertOne) ExecX

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

func (*RepositoryForEntUpsertOne) ID

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

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

func (*RepositoryForEntUpsertOne) IDX

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

func (*RepositoryForEntUpsertOne) Ignore

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

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

func (*RepositoryForEntUpsertOne) Update

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

func (*RepositoryForEntUpsertOne) UpdateNewValues

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

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

type RepositoryForEnts

type RepositoryForEnts []*RepositoryForEnt

RepositoryForEnts is a parsable slice of RepositoryForEnt.

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 Table01ForEnt

type Table01ForEnt struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CommonField01 holds the value of the "common_field01" field.
	CommonField01 int `json:"common_field01,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Field01 holds the value of the "field01" field.
	Field01 string `json:"field01,omitempty"`
	// Field02 holds the value of the "field02" field.
	Field02 int `json:"field02,omitempty"`
	// Field03 holds the value of the "field03" field.
	Field03 bool `json:"field03,omitempty"`
	// Field04 holds the value of the "field04" field.
	Field04 table01forent.Field04 `json:"field04,omitempty"`
	// Field05 holds the value of the "field05" field.
	Field05 string `json:"field05,omitempty"`
	// Field06 holds the value of the "field06" field.
	Field06 *string `json:"field06,omitempty"`
	// Field07 holds the value of the "field07" field.
	Field07 int64 `json:"field07,omitempty"`
	// Field08 holds the value of the "field08" field.
	Field08 float64 `json:"field08,omitempty"`
	// Field09 holds the value of the "field09" field.
	Field09 string `json:"field09,omitempty"`
	// Field10 holds the value of the "field10" field.
	Field10 string `gqlgen:"-" json:"-"`
	// comment
	Field11 string `json:"field11,omitempty"`
	// comment
	Field12 string `json:"field12,omitempty"`
	// Field13 holds the value of the "field13" field.
	//
	// Deprecated: deprecated
	Field13 string `json:"field13,omitempty"`
	// Field14 holds the value of the "field14" field.
	Field14 string `json:"field14,omitempty"`
	// Field15 holds the value of the "field15" field.
	Field15 string `json:"field15,omitempty" gqlgen:"gql_name"`
	// contains filtered or unexported fields
}

Table01ForEnt is the model entity for the Table01ForEnt schema.

func (*Table01ForEnt) String

func (te *Table01ForEnt) String() string

String implements the fmt.Stringer.

func (*Table01ForEnt) Unwrap

func (te *Table01ForEnt) Unwrap() *Table01ForEnt

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

func (te *Table01ForEnt) Update() *Table01ForEntUpdateOne

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

func (*Table01ForEnt) Value

func (te *Table01ForEnt) Value(name string) (ent.Value, error)

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

type Table01ForEntClient

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

Table01ForEntClient is a client for the Table01ForEnt schema.

func NewTable01ForEntClient

func NewTable01ForEntClient(c config) *Table01ForEntClient

NewTable01ForEntClient returns a client for the Table01ForEnt from the given config.

func (*Table01ForEntClient) Create

Create returns a builder for creating a Table01ForEnt entity.

func (*Table01ForEntClient) CreateBulk

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

func (*Table01ForEntClient) Delete

Delete returns a delete builder for Table01ForEnt.

func (*Table01ForEntClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*Table01ForEntClient) DeleteOneID

func (c *Table01ForEntClient) DeleteOneID(id int) *Table01ForEntDeleteOne

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

func (*Table01ForEntClient) Get

Get returns a Table01ForEnt entity by its id.

func (*Table01ForEntClient) GetX

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

func (*Table01ForEntClient) Hooks

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

Hooks returns the client hooks.

func (*Table01ForEntClient) Intercept

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

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

func (*Table01ForEntClient) Interceptors

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

Interceptors returns the client interceptors.

func (*Table01ForEntClient) MapCreateBulk

func (c *Table01ForEntClient) MapCreateBulk(slice any, setFunc func(*Table01ForEntCreate, int)) *Table01ForEntCreateBulk

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 (*Table01ForEntClient) Query

Query returns a query builder for Table01ForEnt.

func (*Table01ForEntClient) Update

Update returns an update builder for Table01ForEnt.

func (*Table01ForEntClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*Table01ForEntClient) UpdateOneID

func (c *Table01ForEntClient) UpdateOneID(id int) *Table01ForEntUpdateOne

UpdateOneID returns an update builder for the given id.

func (*Table01ForEntClient) Use

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

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

type Table01ForEntCreate

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

Table01ForEntCreate is the builder for creating a Table01ForEnt entity.

func (*Table01ForEntCreate) Exec

func (tec *Table01ForEntCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*Table01ForEntCreate) ExecX

func (tec *Table01ForEntCreate) ExecX(ctx context.Context)

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

func (*Table01ForEntCreate) Mutation

func (tec *Table01ForEntCreate) Mutation() *Table01ForEntMutation

Mutation returns the Table01ForEntMutation object of the builder.

func (*Table01ForEntCreate) OnConflict

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

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

func (*Table01ForEntCreate) OnConflictColumns

func (tec *Table01ForEntCreate) OnConflictColumns(columns ...string) *Table01ForEntUpsertOne

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

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

func (*Table01ForEntCreate) Save

Save creates the Table01ForEnt in the database.

func (*Table01ForEntCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*Table01ForEntCreate) SetCommonField01

func (tec *Table01ForEntCreate) SetCommonField01(i int) *Table01ForEntCreate

SetCommonField01 sets the "common_field01" field.

func (*Table01ForEntCreate) SetCreateTime

func (tec *Table01ForEntCreate) SetCreateTime(t time.Time) *Table01ForEntCreate

SetCreateTime sets the "create_time" field.

func (*Table01ForEntCreate) SetField01

func (tec *Table01ForEntCreate) SetField01(s string) *Table01ForEntCreate

SetField01 sets the "field01" field.

func (*Table01ForEntCreate) SetField02

func (tec *Table01ForEntCreate) SetField02(i int) *Table01ForEntCreate

SetField02 sets the "field02" field.

func (*Table01ForEntCreate) SetField03

func (tec *Table01ForEntCreate) SetField03(b bool) *Table01ForEntCreate

SetField03 sets the "field03" field.

func (*Table01ForEntCreate) SetField04

SetField04 sets the "field04" field.

func (*Table01ForEntCreate) SetField05

func (tec *Table01ForEntCreate) SetField05(s string) *Table01ForEntCreate

SetField05 sets the "field05" field.

func (*Table01ForEntCreate) SetField06

func (tec *Table01ForEntCreate) SetField06(s string) *Table01ForEntCreate

SetField06 sets the "field06" field.

func (*Table01ForEntCreate) SetField07

func (tec *Table01ForEntCreate) SetField07(i int64) *Table01ForEntCreate

SetField07 sets the "field07" field.

func (*Table01ForEntCreate) SetField08

func (tec *Table01ForEntCreate) SetField08(f float64) *Table01ForEntCreate

SetField08 sets the "field08" field.

func (*Table01ForEntCreate) SetField09

func (tec *Table01ForEntCreate) SetField09(s string) *Table01ForEntCreate

SetField09 sets the "field09" field.

func (*Table01ForEntCreate) SetField10

func (tec *Table01ForEntCreate) SetField10(s string) *Table01ForEntCreate

SetField10 sets the "field10" field.

func (*Table01ForEntCreate) SetField11

func (tec *Table01ForEntCreate) SetField11(s string) *Table01ForEntCreate

SetField11 sets the "field11" field.

func (*Table01ForEntCreate) SetField12

func (tec *Table01ForEntCreate) SetField12(s string) *Table01ForEntCreate

SetField12 sets the "field12" field.

func (*Table01ForEntCreate) SetField13

func (tec *Table01ForEntCreate) SetField13(s string) *Table01ForEntCreate

SetField13 sets the "field13" field.

func (*Table01ForEntCreate) SetField14

func (tec *Table01ForEntCreate) SetField14(s string) *Table01ForEntCreate

SetField14 sets the "field14" field.

func (*Table01ForEntCreate) SetField15

func (tec *Table01ForEntCreate) SetField15(s string) *Table01ForEntCreate

SetField15 sets the "field15" field.

func (*Table01ForEntCreate) SetNillableCommonField01

func (tec *Table01ForEntCreate) SetNillableCommonField01(i *int) *Table01ForEntCreate

SetNillableCommonField01 sets the "common_field01" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableCreateTime

func (tec *Table01ForEntCreate) SetNillableCreateTime(t *time.Time) *Table01ForEntCreate

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

func (*Table01ForEntCreate) SetNillableField03

func (tec *Table01ForEntCreate) SetNillableField03(b *bool) *Table01ForEntCreate

SetNillableField03 sets the "field03" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField04

func (tec *Table01ForEntCreate) SetNillableField04(t *table01forent.Field04) *Table01ForEntCreate

SetNillableField04 sets the "field04" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField05

func (tec *Table01ForEntCreate) SetNillableField05(s *string) *Table01ForEntCreate

SetNillableField05 sets the "field05" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField06

func (tec *Table01ForEntCreate) SetNillableField06(s *string) *Table01ForEntCreate

SetNillableField06 sets the "field06" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField07

func (tec *Table01ForEntCreate) SetNillableField07(i *int64) *Table01ForEntCreate

SetNillableField07 sets the "field07" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField08

func (tec *Table01ForEntCreate) SetNillableField08(f *float64) *Table01ForEntCreate

SetNillableField08 sets the "field08" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField09

func (tec *Table01ForEntCreate) SetNillableField09(s *string) *Table01ForEntCreate

SetNillableField09 sets the "field09" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField10

func (tec *Table01ForEntCreate) SetNillableField10(s *string) *Table01ForEntCreate

SetNillableField10 sets the "field10" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField11

func (tec *Table01ForEntCreate) SetNillableField11(s *string) *Table01ForEntCreate

SetNillableField11 sets the "field11" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField12

func (tec *Table01ForEntCreate) SetNillableField12(s *string) *Table01ForEntCreate

SetNillableField12 sets the "field12" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField13

func (tec *Table01ForEntCreate) SetNillableField13(s *string) *Table01ForEntCreate

SetNillableField13 sets the "field13" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField14

func (tec *Table01ForEntCreate) SetNillableField14(s *string) *Table01ForEntCreate

SetNillableField14 sets the "field14" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableField15

func (tec *Table01ForEntCreate) SetNillableField15(s *string) *Table01ForEntCreate

SetNillableField15 sets the "field15" field if the given value is not nil.

func (*Table01ForEntCreate) SetNillableUpdateTime

func (tec *Table01ForEntCreate) SetNillableUpdateTime(t *time.Time) *Table01ForEntCreate

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

func (*Table01ForEntCreate) SetUpdateTime

func (tec *Table01ForEntCreate) SetUpdateTime(t time.Time) *Table01ForEntCreate

SetUpdateTime sets the "update_time" field.

type Table01ForEntCreateBulk

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

Table01ForEntCreateBulk is the builder for creating many Table01ForEnt entities in bulk.

func (*Table01ForEntCreateBulk) Exec

func (tecb *Table01ForEntCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*Table01ForEntCreateBulk) ExecX

func (tecb *Table01ForEntCreateBulk) ExecX(ctx context.Context)

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

func (*Table01ForEntCreateBulk) OnConflict

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

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

func (*Table01ForEntCreateBulk) OnConflictColumns

func (tecb *Table01ForEntCreateBulk) OnConflictColumns(columns ...string) *Table01ForEntUpsertBulk

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

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

func (*Table01ForEntCreateBulk) Save

Save creates the Table01ForEnt entities in the database.

func (*Table01ForEntCreateBulk) SaveX

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

type Table01ForEntDelete

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

Table01ForEntDelete is the builder for deleting a Table01ForEnt entity.

func (*Table01ForEntDelete) Exec

func (ted *Table01ForEntDelete) Exec(ctx context.Context) (int, error)

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

func (*Table01ForEntDelete) ExecX

func (ted *Table01ForEntDelete) ExecX(ctx context.Context) int

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

func (*Table01ForEntDelete) Where

Where appends a list predicates to the Table01ForEntDelete builder.

type Table01ForEntDeleteOne

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

Table01ForEntDeleteOne is the builder for deleting a single Table01ForEnt entity.

func (*Table01ForEntDeleteOne) Exec

func (tedo *Table01ForEntDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*Table01ForEntDeleteOne) ExecX

func (tedo *Table01ForEntDeleteOne) ExecX(ctx context.Context)

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

func (*Table01ForEntDeleteOne) Where

Where appends a list predicates to the Table01ForEntDelete builder.

type Table01ForEntGroupBy

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

Table01ForEntGroupBy is the group-by builder for Table01ForEnt entities.

func (*Table01ForEntGroupBy) Aggregate

func (tegb *Table01ForEntGroupBy) Aggregate(fns ...AggregateFunc) *Table01ForEntGroupBy

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

func (*Table01ForEntGroupBy) Bool

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

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

func (*Table01ForEntGroupBy) BoolX

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

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

func (*Table01ForEntGroupBy) Bools

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

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

func (*Table01ForEntGroupBy) BoolsX

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

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

func (*Table01ForEntGroupBy) Float64

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

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

func (*Table01ForEntGroupBy) Float64X

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

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

func (*Table01ForEntGroupBy) Float64s

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

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

func (*Table01ForEntGroupBy) Float64sX

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

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

func (*Table01ForEntGroupBy) Int

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

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

func (*Table01ForEntGroupBy) IntX

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

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

func (*Table01ForEntGroupBy) Ints

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

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

func (*Table01ForEntGroupBy) IntsX

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

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

func (*Table01ForEntGroupBy) Scan

func (tegb *Table01ForEntGroupBy) Scan(ctx context.Context, v any) error

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

func (*Table01ForEntGroupBy) ScanX

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

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

func (*Table01ForEntGroupBy) String

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

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

func (*Table01ForEntGroupBy) StringX

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

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

func (*Table01ForEntGroupBy) Strings

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

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

func (*Table01ForEntGroupBy) StringsX

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

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

type Table01ForEntMutation

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

Table01ForEntMutation represents an operation that mutates the Table01ForEnt nodes in the graph.

func (*Table01ForEntMutation) AddCommonField01

func (m *Table01ForEntMutation) AddCommonField01(i int)

AddCommonField01 adds i to the "common_field01" field.

func (*Table01ForEntMutation) AddField

func (m *Table01ForEntMutation) 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 (*Table01ForEntMutation) AddField02

func (m *Table01ForEntMutation) AddField02(i int)

AddField02 adds i to the "field02" field.

func (*Table01ForEntMutation) AddField07

func (m *Table01ForEntMutation) AddField07(i int64)

AddField07 adds i to the "field07" field.

func (*Table01ForEntMutation) AddField08

func (m *Table01ForEntMutation) AddField08(f float64)

AddField08 adds f to the "field08" field.

func (*Table01ForEntMutation) AddedCommonField01

func (m *Table01ForEntMutation) AddedCommonField01() (r int, exists bool)

AddedCommonField01 returns the value that was added to the "common_field01" field in this mutation.

func (*Table01ForEntMutation) AddedEdges

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

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

func (*Table01ForEntMutation) AddedField

func (m *Table01ForEntMutation) 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 (*Table01ForEntMutation) AddedField02

func (m *Table01ForEntMutation) AddedField02() (r int, exists bool)

AddedField02 returns the value that was added to the "field02" field in this mutation.

func (*Table01ForEntMutation) AddedField07

func (m *Table01ForEntMutation) AddedField07() (r int64, exists bool)

AddedField07 returns the value that was added to the "field07" field in this mutation.

func (*Table01ForEntMutation) AddedField08

func (m *Table01ForEntMutation) AddedField08() (r float64, exists bool)

AddedField08 returns the value that was added to the "field08" field in this mutation.

func (*Table01ForEntMutation) AddedFields

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

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

func (*Table01ForEntMutation) AddedIDs

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

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

func (*Table01ForEntMutation) ClearCommonField01

func (m *Table01ForEntMutation) ClearCommonField01()

ClearCommonField01 clears the value of the "common_field01" field.

func (*Table01ForEntMutation) ClearEdge

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

func (m *Table01ForEntMutation) 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 (*Table01ForEntMutation) ClearField05

func (m *Table01ForEntMutation) ClearField05()

ClearField05 clears the value of the "field05" field.

func (*Table01ForEntMutation) ClearField06

func (m *Table01ForEntMutation) ClearField06()

ClearField06 clears the value of the "field06" field.

func (*Table01ForEntMutation) ClearField10

func (m *Table01ForEntMutation) ClearField10()

ClearField10 clears the value of the "field10" field.

func (*Table01ForEntMutation) ClearField11

func (m *Table01ForEntMutation) ClearField11()

ClearField11 clears the value of the "field11" field.

func (*Table01ForEntMutation) ClearField12

func (m *Table01ForEntMutation) ClearField12()

ClearField12 clears the value of the "field12" field.

func (*Table01ForEntMutation) ClearField13

func (m *Table01ForEntMutation) ClearField13()

ClearField13 clears the value of the "field13" field.

func (*Table01ForEntMutation) ClearField14

func (m *Table01ForEntMutation) ClearField14()

ClearField14 clears the value of the "field14" field.

func (*Table01ForEntMutation) ClearField15

func (m *Table01ForEntMutation) ClearField15()

ClearField15 clears the value of the "field15" field.

func (*Table01ForEntMutation) ClearedEdges

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

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

func (*Table01ForEntMutation) ClearedFields

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

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

func (Table01ForEntMutation) Client

func (m Table01ForEntMutation) 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 (*Table01ForEntMutation) CommonField01

func (m *Table01ForEntMutation) CommonField01() (r int, exists bool)

CommonField01 returns the value of the "common_field01" field in the mutation.

func (*Table01ForEntMutation) CommonField01Cleared

func (m *Table01ForEntMutation) CommonField01Cleared() bool

CommonField01Cleared returns if the "common_field01" field was cleared in this mutation.

func (*Table01ForEntMutation) CreateTime

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

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

func (*Table01ForEntMutation) EdgeCleared

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

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

func (*Table01ForEntMutation) Field

func (m *Table01ForEntMutation) 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 (*Table01ForEntMutation) Field01

func (m *Table01ForEntMutation) Field01() (r string, exists bool)

Field01 returns the value of the "field01" field in the mutation.

func (*Table01ForEntMutation) Field02

func (m *Table01ForEntMutation) Field02() (r int, exists bool)

Field02 returns the value of the "field02" field in the mutation.

func (*Table01ForEntMutation) Field03

func (m *Table01ForEntMutation) Field03() (r bool, exists bool)

Field03 returns the value of the "field03" field in the mutation.

func (*Table01ForEntMutation) Field04

func (m *Table01ForEntMutation) Field04() (r table01forent.Field04, exists bool)

Field04 returns the value of the "field04" field in the mutation.

func (*Table01ForEntMutation) Field05

func (m *Table01ForEntMutation) Field05() (r string, exists bool)

Field05 returns the value of the "field05" field in the mutation.

func (*Table01ForEntMutation) Field05Cleared

func (m *Table01ForEntMutation) Field05Cleared() bool

Field05Cleared returns if the "field05" field was cleared in this mutation.

func (*Table01ForEntMutation) Field06

func (m *Table01ForEntMutation) Field06() (r string, exists bool)

Field06 returns the value of the "field06" field in the mutation.

func (*Table01ForEntMutation) Field06Cleared

func (m *Table01ForEntMutation) Field06Cleared() bool

Field06Cleared returns if the "field06" field was cleared in this mutation.

func (*Table01ForEntMutation) Field07

func (m *Table01ForEntMutation) Field07() (r int64, exists bool)

Field07 returns the value of the "field07" field in the mutation.

func (*Table01ForEntMutation) Field08

func (m *Table01ForEntMutation) Field08() (r float64, exists bool)

Field08 returns the value of the "field08" field in the mutation.

func (*Table01ForEntMutation) Field09

func (m *Table01ForEntMutation) Field09() (r string, exists bool)

Field09 returns the value of the "field09" field in the mutation.

func (*Table01ForEntMutation) Field10

func (m *Table01ForEntMutation) Field10() (r string, exists bool)

Field10 returns the value of the "field10" field in the mutation.

func (*Table01ForEntMutation) Field10Cleared

func (m *Table01ForEntMutation) Field10Cleared() bool

Field10Cleared returns if the "field10" field was cleared in this mutation.

func (*Table01ForEntMutation) Field11

func (m *Table01ForEntMutation) Field11() (r string, exists bool)

Field11 returns the value of the "field11" field in the mutation.

func (*Table01ForEntMutation) Field11Cleared

func (m *Table01ForEntMutation) Field11Cleared() bool

Field11Cleared returns if the "field11" field was cleared in this mutation.

func (*Table01ForEntMutation) Field12

func (m *Table01ForEntMutation) Field12() (r string, exists bool)

Field12 returns the value of the "field12" field in the mutation.

func (*Table01ForEntMutation) Field12Cleared

func (m *Table01ForEntMutation) Field12Cleared() bool

Field12Cleared returns if the "field12" field was cleared in this mutation.

func (*Table01ForEntMutation) Field13

func (m *Table01ForEntMutation) Field13() (r string, exists bool)

Field13 returns the value of the "field13" field in the mutation.

func (*Table01ForEntMutation) Field13Cleared

func (m *Table01ForEntMutation) Field13Cleared() bool

Field13Cleared returns if the "field13" field was cleared in this mutation.

func (*Table01ForEntMutation) Field14

func (m *Table01ForEntMutation) Field14() (r string, exists bool)

Field14 returns the value of the "field14" field in the mutation.

func (*Table01ForEntMutation) Field14Cleared

func (m *Table01ForEntMutation) Field14Cleared() bool

Field14Cleared returns if the "field14" field was cleared in this mutation.

func (*Table01ForEntMutation) Field15

func (m *Table01ForEntMutation) Field15() (r string, exists bool)

Field15 returns the value of the "field15" field in the mutation.

func (*Table01ForEntMutation) Field15Cleared

func (m *Table01ForEntMutation) Field15Cleared() bool

Field15Cleared returns if the "field15" field was cleared in this mutation.

func (*Table01ForEntMutation) FieldCleared

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

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

func (*Table01ForEntMutation) Fields

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

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

func (m *Table01ForEntMutation) 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 (*Table01ForEntMutation) OldCommonField01

func (m *Table01ForEntMutation) OldCommonField01(ctx context.Context) (v int, err error)

OldCommonField01 returns the old "common_field01" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldCreateTime

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

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

func (m *Table01ForEntMutation) 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 (*Table01ForEntMutation) OldField01

func (m *Table01ForEntMutation) OldField01(ctx context.Context) (v string, err error)

OldField01 returns the old "field01" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField02

func (m *Table01ForEntMutation) OldField02(ctx context.Context) (v int, err error)

OldField02 returns the old "field02" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField03

func (m *Table01ForEntMutation) OldField03(ctx context.Context) (v bool, err error)

OldField03 returns the old "field03" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField04

func (m *Table01ForEntMutation) OldField04(ctx context.Context) (v table01forent.Field04, err error)

OldField04 returns the old "field04" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField05

func (m *Table01ForEntMutation) OldField05(ctx context.Context) (v string, err error)

OldField05 returns the old "field05" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField06

func (m *Table01ForEntMutation) OldField06(ctx context.Context) (v *string, err error)

OldField06 returns the old "field06" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField07

func (m *Table01ForEntMutation) OldField07(ctx context.Context) (v int64, err error)

OldField07 returns the old "field07" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField08

func (m *Table01ForEntMutation) OldField08(ctx context.Context) (v float64, err error)

OldField08 returns the old "field08" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField09

func (m *Table01ForEntMutation) OldField09(ctx context.Context) (v string, err error)

OldField09 returns the old "field09" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField10

func (m *Table01ForEntMutation) OldField10(ctx context.Context) (v string, err error)

OldField10 returns the old "field10" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField11

func (m *Table01ForEntMutation) OldField11(ctx context.Context) (v string, err error)

OldField11 returns the old "field11" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField12

func (m *Table01ForEntMutation) OldField12(ctx context.Context) (v string, err error)

OldField12 returns the old "field12" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField13

func (m *Table01ForEntMutation) OldField13(ctx context.Context) (v string, err error)

OldField13 returns the old "field13" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField14

func (m *Table01ForEntMutation) OldField14(ctx context.Context) (v string, err error)

OldField14 returns the old "field14" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldField15

func (m *Table01ForEntMutation) OldField15(ctx context.Context) (v string, err error)

OldField15 returns the old "field15" field's value of the Table01ForEnt entity. If the Table01ForEnt 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 (*Table01ForEntMutation) OldUpdateTime

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

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

func (m *Table01ForEntMutation) Op() Op

Op returns the operation name.

func (*Table01ForEntMutation) RemovedEdges

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

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

func (*Table01ForEntMutation) RemovedIDs

func (m *Table01ForEntMutation) 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 (*Table01ForEntMutation) ResetCommonField01

func (m *Table01ForEntMutation) ResetCommonField01()

ResetCommonField01 resets all changes to the "common_field01" field.

func (*Table01ForEntMutation) ResetCreateTime

func (m *Table01ForEntMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*Table01ForEntMutation) ResetEdge

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

func (m *Table01ForEntMutation) 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 (*Table01ForEntMutation) ResetField01

func (m *Table01ForEntMutation) ResetField01()

ResetField01 resets all changes to the "field01" field.

func (*Table01ForEntMutation) ResetField02

func (m *Table01ForEntMutation) ResetField02()

ResetField02 resets all changes to the "field02" field.

func (*Table01ForEntMutation) ResetField03

func (m *Table01ForEntMutation) ResetField03()

ResetField03 resets all changes to the "field03" field.

func (*Table01ForEntMutation) ResetField04

func (m *Table01ForEntMutation) ResetField04()

ResetField04 resets all changes to the "field04" field.

func (*Table01ForEntMutation) ResetField05

func (m *Table01ForEntMutation) ResetField05()

ResetField05 resets all changes to the "field05" field.

func (*Table01ForEntMutation) ResetField06

func (m *Table01ForEntMutation) ResetField06()

ResetField06 resets all changes to the "field06" field.

func (*Table01ForEntMutation) ResetField07

func (m *Table01ForEntMutation) ResetField07()

ResetField07 resets all changes to the "field07" field.

func (*Table01ForEntMutation) ResetField08

func (m *Table01ForEntMutation) ResetField08()

ResetField08 resets all changes to the "field08" field.

func (*Table01ForEntMutation) ResetField09

func (m *Table01ForEntMutation) ResetField09()

ResetField09 resets all changes to the "field09" field.

func (*Table01ForEntMutation) ResetField10

func (m *Table01ForEntMutation) ResetField10()

ResetField10 resets all changes to the "field10" field.

func (*Table01ForEntMutation) ResetField11

func (m *Table01ForEntMutation) ResetField11()

ResetField11 resets all changes to the "field11" field.

func (*Table01ForEntMutation) ResetField12

func (m *Table01ForEntMutation) ResetField12()

ResetField12 resets all changes to the "field12" field.

func (*Table01ForEntMutation) ResetField13

func (m *Table01ForEntMutation) ResetField13()

ResetField13 resets all changes to the "field13" field.

func (*Table01ForEntMutation) ResetField14

func (m *Table01ForEntMutation) ResetField14()

ResetField14 resets all changes to the "field14" field.

func (*Table01ForEntMutation) ResetField15

func (m *Table01ForEntMutation) ResetField15()

ResetField15 resets all changes to the "field15" field.

func (*Table01ForEntMutation) ResetUpdateTime

func (m *Table01ForEntMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*Table01ForEntMutation) SetCommonField01

func (m *Table01ForEntMutation) SetCommonField01(i int)

SetCommonField01 sets the "common_field01" field.

func (*Table01ForEntMutation) SetCreateTime

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

SetCreateTime sets the "create_time" field.

func (*Table01ForEntMutation) SetField

func (m *Table01ForEntMutation) 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 (*Table01ForEntMutation) SetField01

func (m *Table01ForEntMutation) SetField01(s string)

SetField01 sets the "field01" field.

func (*Table01ForEntMutation) SetField02

func (m *Table01ForEntMutation) SetField02(i int)

SetField02 sets the "field02" field.

func (*Table01ForEntMutation) SetField03

func (m *Table01ForEntMutation) SetField03(b bool)

SetField03 sets the "field03" field.

func (*Table01ForEntMutation) SetField04

func (m *Table01ForEntMutation) SetField04(t table01forent.Field04)

SetField04 sets the "field04" field.

func (*Table01ForEntMutation) SetField05

func (m *Table01ForEntMutation) SetField05(s string)

SetField05 sets the "field05" field.

func (*Table01ForEntMutation) SetField06

func (m *Table01ForEntMutation) SetField06(s string)

SetField06 sets the "field06" field.

func (*Table01ForEntMutation) SetField07

func (m *Table01ForEntMutation) SetField07(i int64)

SetField07 sets the "field07" field.

func (*Table01ForEntMutation) SetField08

func (m *Table01ForEntMutation) SetField08(f float64)

SetField08 sets the "field08" field.

func (*Table01ForEntMutation) SetField09

func (m *Table01ForEntMutation) SetField09(s string)

SetField09 sets the "field09" field.

func (*Table01ForEntMutation) SetField10

func (m *Table01ForEntMutation) SetField10(s string)

SetField10 sets the "field10" field.

func (*Table01ForEntMutation) SetField11

func (m *Table01ForEntMutation) SetField11(s string)

SetField11 sets the "field11" field.

func (*Table01ForEntMutation) SetField12

func (m *Table01ForEntMutation) SetField12(s string)

SetField12 sets the "field12" field.

func (*Table01ForEntMutation) SetField13

func (m *Table01ForEntMutation) SetField13(s string)

SetField13 sets the "field13" field.

func (*Table01ForEntMutation) SetField14

func (m *Table01ForEntMutation) SetField14(s string)

SetField14 sets the "field14" field.

func (*Table01ForEntMutation) SetField15

func (m *Table01ForEntMutation) SetField15(s string)

SetField15 sets the "field15" field.

func (*Table01ForEntMutation) SetOp

func (m *Table01ForEntMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*Table01ForEntMutation) SetUpdateTime

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

SetUpdateTime sets the "update_time" field.

func (Table01ForEntMutation) Tx

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

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

func (*Table01ForEntMutation) Type

func (m *Table01ForEntMutation) Type() string

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

func (*Table01ForEntMutation) UpdateTime

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

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

func (*Table01ForEntMutation) Where

Where appends a list predicates to the Table01ForEntMutation builder.

func (*Table01ForEntMutation) WhereP

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

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

type Table01ForEntQuery

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

Table01ForEntQuery is the builder for querying Table01ForEnt entities.

func (*Table01ForEntQuery) Aggregate

func (teq *Table01ForEntQuery) Aggregate(fns ...AggregateFunc) *Table01ForEntSelect

Aggregate returns a Table01ForEntSelect configured with the given aggregations.

func (*Table01ForEntQuery) All

All executes the query and returns a list of Table01ForEnts.

func (*Table01ForEntQuery) AllX

func (teq *Table01ForEntQuery) AllX(ctx context.Context) []*Table01ForEnt

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

func (*Table01ForEntQuery) Clone

func (teq *Table01ForEntQuery) Clone() *Table01ForEntQuery

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

func (*Table01ForEntQuery) Count

func (teq *Table01ForEntQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*Table01ForEntQuery) CountX

func (teq *Table01ForEntQuery) CountX(ctx context.Context) int

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

func (*Table01ForEntQuery) Exist

func (teq *Table01ForEntQuery) Exist(ctx context.Context) (bool, error)

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

func (*Table01ForEntQuery) ExistX

func (teq *Table01ForEntQuery) ExistX(ctx context.Context) bool

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

func (*Table01ForEntQuery) First

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

func (*Table01ForEntQuery) FirstID

func (teq *Table01ForEntQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*Table01ForEntQuery) FirstIDX

func (teq *Table01ForEntQuery) FirstIDX(ctx context.Context) int

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

func (*Table01ForEntQuery) FirstX

func (teq *Table01ForEntQuery) FirstX(ctx context.Context) *Table01ForEnt

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

func (*Table01ForEntQuery) GroupBy

func (teq *Table01ForEntQuery) GroupBy(field string, fields ...string) *Table01ForEntGroupBy

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

client.Table01ForEnt.Query().
	GroupBy(table01forent.FieldCommonField01).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*Table01ForEntQuery) IDs

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

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

func (*Table01ForEntQuery) IDsX

func (teq *Table01ForEntQuery) IDsX(ctx context.Context) []int

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

func (*Table01ForEntQuery) Limit

func (teq *Table01ForEntQuery) Limit(limit int) *Table01ForEntQuery

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

func (*Table01ForEntQuery) Offset

func (teq *Table01ForEntQuery) Offset(offset int) *Table01ForEntQuery

Offset to start from.

func (*Table01ForEntQuery) Only

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

func (*Table01ForEntQuery) OnlyID

func (teq *Table01ForEntQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*Table01ForEntQuery) OnlyIDX

func (teq *Table01ForEntQuery) OnlyIDX(ctx context.Context) int

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

func (*Table01ForEntQuery) OnlyX

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

func (*Table01ForEntQuery) Order

Order specifies how the records should be ordered.

func (*Table01ForEntQuery) Select

func (teq *Table01ForEntQuery) Select(fields ...string) *Table01ForEntSelect

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

client.Table01ForEnt.Query().
	Select(table01forent.FieldCommonField01).
	Scan(ctx, &v)

func (*Table01ForEntQuery) Unique

func (teq *Table01ForEntQuery) Unique(unique bool) *Table01ForEntQuery

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

Where adds a new predicate for the Table01ForEntQuery builder.

type Table01ForEntSelect

type Table01ForEntSelect struct {
	*Table01ForEntQuery
	// contains filtered or unexported fields
}

Table01ForEntSelect is the builder for selecting fields of Table01ForEnt entities.

func (*Table01ForEntSelect) Aggregate

func (tes *Table01ForEntSelect) Aggregate(fns ...AggregateFunc) *Table01ForEntSelect

Aggregate adds the given aggregation functions to the selector query.

func (*Table01ForEntSelect) Bool

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

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

func (*Table01ForEntSelect) BoolX

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

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

func (*Table01ForEntSelect) Bools

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

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

func (*Table01ForEntSelect) BoolsX

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

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

func (*Table01ForEntSelect) Float64

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

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

func (*Table01ForEntSelect) Float64X

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

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

func (*Table01ForEntSelect) Float64s

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

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

func (*Table01ForEntSelect) Float64sX

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

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

func (*Table01ForEntSelect) Int

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

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

func (*Table01ForEntSelect) IntX

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

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

func (*Table01ForEntSelect) Ints

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

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

func (*Table01ForEntSelect) IntsX

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

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

func (*Table01ForEntSelect) Scan

func (tes *Table01ForEntSelect) Scan(ctx context.Context, v any) error

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

func (*Table01ForEntSelect) ScanX

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

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

func (*Table01ForEntSelect) String

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

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

func (*Table01ForEntSelect) StringX

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

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

func (*Table01ForEntSelect) Strings

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

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

func (*Table01ForEntSelect) StringsX

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

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

type Table01ForEntUpdate

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

Table01ForEntUpdate is the builder for updating Table01ForEnt entities.

func (*Table01ForEntUpdate) AddCommonField01

func (teu *Table01ForEntUpdate) AddCommonField01(i int) *Table01ForEntUpdate

AddCommonField01 adds i to the "common_field01" field.

func (*Table01ForEntUpdate) AddField02

func (teu *Table01ForEntUpdate) AddField02(i int) *Table01ForEntUpdate

AddField02 adds i to the "field02" field.

func (*Table01ForEntUpdate) AddField07

func (teu *Table01ForEntUpdate) AddField07(i int64) *Table01ForEntUpdate

AddField07 adds i to the "field07" field.

func (*Table01ForEntUpdate) AddField08

func (teu *Table01ForEntUpdate) AddField08(f float64) *Table01ForEntUpdate

AddField08 adds f to the "field08" field.

func (*Table01ForEntUpdate) ClearCommonField01

func (teu *Table01ForEntUpdate) ClearCommonField01() *Table01ForEntUpdate

ClearCommonField01 clears the value of the "common_field01" field.

func (*Table01ForEntUpdate) ClearField05

func (teu *Table01ForEntUpdate) ClearField05() *Table01ForEntUpdate

ClearField05 clears the value of the "field05" field.

func (*Table01ForEntUpdate) ClearField06

func (teu *Table01ForEntUpdate) ClearField06() *Table01ForEntUpdate

ClearField06 clears the value of the "field06" field.

func (*Table01ForEntUpdate) ClearField10

func (teu *Table01ForEntUpdate) ClearField10() *Table01ForEntUpdate

ClearField10 clears the value of the "field10" field.

func (*Table01ForEntUpdate) ClearField11

func (teu *Table01ForEntUpdate) ClearField11() *Table01ForEntUpdate

ClearField11 clears the value of the "field11" field.

func (*Table01ForEntUpdate) ClearField12

func (teu *Table01ForEntUpdate) ClearField12() *Table01ForEntUpdate

ClearField12 clears the value of the "field12" field.

func (*Table01ForEntUpdate) ClearField13

func (teu *Table01ForEntUpdate) ClearField13() *Table01ForEntUpdate

ClearField13 clears the value of the "field13" field.

func (*Table01ForEntUpdate) ClearField14

func (teu *Table01ForEntUpdate) ClearField14() *Table01ForEntUpdate

ClearField14 clears the value of the "field14" field.

func (*Table01ForEntUpdate) ClearField15

func (teu *Table01ForEntUpdate) ClearField15() *Table01ForEntUpdate

ClearField15 clears the value of the "field15" field.

func (*Table01ForEntUpdate) Exec

func (teu *Table01ForEntUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*Table01ForEntUpdate) ExecX

func (teu *Table01ForEntUpdate) ExecX(ctx context.Context)

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

func (*Table01ForEntUpdate) Mutation

func (teu *Table01ForEntUpdate) Mutation() *Table01ForEntMutation

Mutation returns the Table01ForEntMutation object of the builder.

func (*Table01ForEntUpdate) Save

func (teu *Table01ForEntUpdate) Save(ctx context.Context) (int, error)

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

func (*Table01ForEntUpdate) SaveX

func (teu *Table01ForEntUpdate) SaveX(ctx context.Context) int

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

func (*Table01ForEntUpdate) SetCommonField01

func (teu *Table01ForEntUpdate) SetCommonField01(i int) *Table01ForEntUpdate

SetCommonField01 sets the "common_field01" field.

func (*Table01ForEntUpdate) SetField01

func (teu *Table01ForEntUpdate) SetField01(s string) *Table01ForEntUpdate

SetField01 sets the "field01" field.

func (*Table01ForEntUpdate) SetField02

func (teu *Table01ForEntUpdate) SetField02(i int) *Table01ForEntUpdate

SetField02 sets the "field02" field.

func (*Table01ForEntUpdate) SetField03

func (teu *Table01ForEntUpdate) SetField03(b bool) *Table01ForEntUpdate

SetField03 sets the "field03" field.

func (*Table01ForEntUpdate) SetField04

SetField04 sets the "field04" field.

func (*Table01ForEntUpdate) SetField05

func (teu *Table01ForEntUpdate) SetField05(s string) *Table01ForEntUpdate

SetField05 sets the "field05" field.

func (*Table01ForEntUpdate) SetField06

func (teu *Table01ForEntUpdate) SetField06(s string) *Table01ForEntUpdate

SetField06 sets the "field06" field.

func (*Table01ForEntUpdate) SetField07

func (teu *Table01ForEntUpdate) SetField07(i int64) *Table01ForEntUpdate

SetField07 sets the "field07" field.

func (*Table01ForEntUpdate) SetField08

func (teu *Table01ForEntUpdate) SetField08(f float64) *Table01ForEntUpdate

SetField08 sets the "field08" field.

func (*Table01ForEntUpdate) SetField09

func (teu *Table01ForEntUpdate) SetField09(s string) *Table01ForEntUpdate

SetField09 sets the "field09" field.

func (*Table01ForEntUpdate) SetField10

func (teu *Table01ForEntUpdate) SetField10(s string) *Table01ForEntUpdate

SetField10 sets the "field10" field.

func (*Table01ForEntUpdate) SetField11

func (teu *Table01ForEntUpdate) SetField11(s string) *Table01ForEntUpdate

SetField11 sets the "field11" field.

func (*Table01ForEntUpdate) SetField12

func (teu *Table01ForEntUpdate) SetField12(s string) *Table01ForEntUpdate

SetField12 sets the "field12" field.

func (*Table01ForEntUpdate) SetField13

func (teu *Table01ForEntUpdate) SetField13(s string) *Table01ForEntUpdate

SetField13 sets the "field13" field.

func (*Table01ForEntUpdate) SetField14

func (teu *Table01ForEntUpdate) SetField14(s string) *Table01ForEntUpdate

SetField14 sets the "field14" field.

func (*Table01ForEntUpdate) SetField15

func (teu *Table01ForEntUpdate) SetField15(s string) *Table01ForEntUpdate

SetField15 sets the "field15" field.

func (*Table01ForEntUpdate) SetNillableCommonField01

func (teu *Table01ForEntUpdate) SetNillableCommonField01(i *int) *Table01ForEntUpdate

SetNillableCommonField01 sets the "common_field01" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField01

func (teu *Table01ForEntUpdate) SetNillableField01(s *string) *Table01ForEntUpdate

SetNillableField01 sets the "field01" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField02

func (teu *Table01ForEntUpdate) SetNillableField02(i *int) *Table01ForEntUpdate

SetNillableField02 sets the "field02" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField03

func (teu *Table01ForEntUpdate) SetNillableField03(b *bool) *Table01ForEntUpdate

SetNillableField03 sets the "field03" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField04

func (teu *Table01ForEntUpdate) SetNillableField04(t *table01forent.Field04) *Table01ForEntUpdate

SetNillableField04 sets the "field04" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField05

func (teu *Table01ForEntUpdate) SetNillableField05(s *string) *Table01ForEntUpdate

SetNillableField05 sets the "field05" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField06

func (teu *Table01ForEntUpdate) SetNillableField06(s *string) *Table01ForEntUpdate

SetNillableField06 sets the "field06" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField08

func (teu *Table01ForEntUpdate) SetNillableField08(f *float64) *Table01ForEntUpdate

SetNillableField08 sets the "field08" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField09

func (teu *Table01ForEntUpdate) SetNillableField09(s *string) *Table01ForEntUpdate

SetNillableField09 sets the "field09" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField10

func (teu *Table01ForEntUpdate) SetNillableField10(s *string) *Table01ForEntUpdate

SetNillableField10 sets the "field10" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField11

func (teu *Table01ForEntUpdate) SetNillableField11(s *string) *Table01ForEntUpdate

SetNillableField11 sets the "field11" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField12

func (teu *Table01ForEntUpdate) SetNillableField12(s *string) *Table01ForEntUpdate

SetNillableField12 sets the "field12" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField13

func (teu *Table01ForEntUpdate) SetNillableField13(s *string) *Table01ForEntUpdate

SetNillableField13 sets the "field13" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField14

func (teu *Table01ForEntUpdate) SetNillableField14(s *string) *Table01ForEntUpdate

SetNillableField14 sets the "field14" field if the given value is not nil.

func (*Table01ForEntUpdate) SetNillableField15

func (teu *Table01ForEntUpdate) SetNillableField15(s *string) *Table01ForEntUpdate

SetNillableField15 sets the "field15" field if the given value is not nil.

func (*Table01ForEntUpdate) SetUpdateTime

func (teu *Table01ForEntUpdate) SetUpdateTime(t time.Time) *Table01ForEntUpdate

SetUpdateTime sets the "update_time" field.

func (*Table01ForEntUpdate) Where

Where appends a list predicates to the Table01ForEntUpdate builder.

type Table01ForEntUpdateOne

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

Table01ForEntUpdateOne is the builder for updating a single Table01ForEnt entity.

func (*Table01ForEntUpdateOne) AddCommonField01

func (teuo *Table01ForEntUpdateOne) AddCommonField01(i int) *Table01ForEntUpdateOne

AddCommonField01 adds i to the "common_field01" field.

func (*Table01ForEntUpdateOne) AddField02

func (teuo *Table01ForEntUpdateOne) AddField02(i int) *Table01ForEntUpdateOne

AddField02 adds i to the "field02" field.

func (*Table01ForEntUpdateOne) AddField07

AddField07 adds i to the "field07" field.

func (*Table01ForEntUpdateOne) AddField08

AddField08 adds f to the "field08" field.

func (*Table01ForEntUpdateOne) ClearCommonField01

func (teuo *Table01ForEntUpdateOne) ClearCommonField01() *Table01ForEntUpdateOne

ClearCommonField01 clears the value of the "common_field01" field.

func (*Table01ForEntUpdateOne) ClearField05

func (teuo *Table01ForEntUpdateOne) ClearField05() *Table01ForEntUpdateOne

ClearField05 clears the value of the "field05" field.

func (*Table01ForEntUpdateOne) ClearField06

func (teuo *Table01ForEntUpdateOne) ClearField06() *Table01ForEntUpdateOne

ClearField06 clears the value of the "field06" field.

func (*Table01ForEntUpdateOne) ClearField10

func (teuo *Table01ForEntUpdateOne) ClearField10() *Table01ForEntUpdateOne

ClearField10 clears the value of the "field10" field.

func (*Table01ForEntUpdateOne) ClearField11

func (teuo *Table01ForEntUpdateOne) ClearField11() *Table01ForEntUpdateOne

ClearField11 clears the value of the "field11" field.

func (*Table01ForEntUpdateOne) ClearField12

func (teuo *Table01ForEntUpdateOne) ClearField12() *Table01ForEntUpdateOne

ClearField12 clears the value of the "field12" field.

func (*Table01ForEntUpdateOne) ClearField13

func (teuo *Table01ForEntUpdateOne) ClearField13() *Table01ForEntUpdateOne

ClearField13 clears the value of the "field13" field.

func (*Table01ForEntUpdateOne) ClearField14

func (teuo *Table01ForEntUpdateOne) ClearField14() *Table01ForEntUpdateOne

ClearField14 clears the value of the "field14" field.

func (*Table01ForEntUpdateOne) ClearField15

func (teuo *Table01ForEntUpdateOne) ClearField15() *Table01ForEntUpdateOne

ClearField15 clears the value of the "field15" field.

func (*Table01ForEntUpdateOne) Exec

func (teuo *Table01ForEntUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*Table01ForEntUpdateOne) ExecX

func (teuo *Table01ForEntUpdateOne) ExecX(ctx context.Context)

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

func (*Table01ForEntUpdateOne) Mutation

Mutation returns the Table01ForEntMutation object of the builder.

func (*Table01ForEntUpdateOne) Save

Save executes the query and returns the updated Table01ForEnt entity.

func (*Table01ForEntUpdateOne) SaveX

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

func (*Table01ForEntUpdateOne) Select

func (teuo *Table01ForEntUpdateOne) Select(field string, fields ...string) *Table01ForEntUpdateOne

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

func (*Table01ForEntUpdateOne) SetCommonField01

func (teuo *Table01ForEntUpdateOne) SetCommonField01(i int) *Table01ForEntUpdateOne

SetCommonField01 sets the "common_field01" field.

func (*Table01ForEntUpdateOne) SetField01

SetField01 sets the "field01" field.

func (*Table01ForEntUpdateOne) SetField02

func (teuo *Table01ForEntUpdateOne) SetField02(i int) *Table01ForEntUpdateOne

SetField02 sets the "field02" field.

func (*Table01ForEntUpdateOne) SetField03

func (teuo *Table01ForEntUpdateOne) SetField03(b bool) *Table01ForEntUpdateOne

SetField03 sets the "field03" field.

func (*Table01ForEntUpdateOne) SetField04

SetField04 sets the "field04" field.

func (*Table01ForEntUpdateOne) SetField05

SetField05 sets the "field05" field.

func (*Table01ForEntUpdateOne) SetField06

SetField06 sets the "field06" field.

func (*Table01ForEntUpdateOne) SetField07

SetField07 sets the "field07" field.

func (*Table01ForEntUpdateOne) SetField08

SetField08 sets the "field08" field.

func (*Table01ForEntUpdateOne) SetField09

SetField09 sets the "field09" field.

func (*Table01ForEntUpdateOne) SetField10

SetField10 sets the "field10" field.

func (*Table01ForEntUpdateOne) SetField11

SetField11 sets the "field11" field.

func (*Table01ForEntUpdateOne) SetField12

SetField12 sets the "field12" field.

func (*Table01ForEntUpdateOne) SetField13

SetField13 sets the "field13" field.

func (*Table01ForEntUpdateOne) SetField14

SetField14 sets the "field14" field.

func (*Table01ForEntUpdateOne) SetField15

SetField15 sets the "field15" field.

func (*Table01ForEntUpdateOne) SetNillableCommonField01

func (teuo *Table01ForEntUpdateOne) SetNillableCommonField01(i *int) *Table01ForEntUpdateOne

SetNillableCommonField01 sets the "common_field01" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField01

func (teuo *Table01ForEntUpdateOne) SetNillableField01(s *string) *Table01ForEntUpdateOne

SetNillableField01 sets the "field01" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField02

func (teuo *Table01ForEntUpdateOne) SetNillableField02(i *int) *Table01ForEntUpdateOne

SetNillableField02 sets the "field02" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField03

func (teuo *Table01ForEntUpdateOne) SetNillableField03(b *bool) *Table01ForEntUpdateOne

SetNillableField03 sets the "field03" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField04

SetNillableField04 sets the "field04" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField05

func (teuo *Table01ForEntUpdateOne) SetNillableField05(s *string) *Table01ForEntUpdateOne

SetNillableField05 sets the "field05" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField06

func (teuo *Table01ForEntUpdateOne) SetNillableField06(s *string) *Table01ForEntUpdateOne

SetNillableField06 sets the "field06" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField08

func (teuo *Table01ForEntUpdateOne) SetNillableField08(f *float64) *Table01ForEntUpdateOne

SetNillableField08 sets the "field08" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField09

func (teuo *Table01ForEntUpdateOne) SetNillableField09(s *string) *Table01ForEntUpdateOne

SetNillableField09 sets the "field09" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField10

func (teuo *Table01ForEntUpdateOne) SetNillableField10(s *string) *Table01ForEntUpdateOne

SetNillableField10 sets the "field10" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField11

func (teuo *Table01ForEntUpdateOne) SetNillableField11(s *string) *Table01ForEntUpdateOne

SetNillableField11 sets the "field11" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField12

func (teuo *Table01ForEntUpdateOne) SetNillableField12(s *string) *Table01ForEntUpdateOne

SetNillableField12 sets the "field12" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField13

func (teuo *Table01ForEntUpdateOne) SetNillableField13(s *string) *Table01ForEntUpdateOne

SetNillableField13 sets the "field13" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField14

func (teuo *Table01ForEntUpdateOne) SetNillableField14(s *string) *Table01ForEntUpdateOne

SetNillableField14 sets the "field14" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetNillableField15

func (teuo *Table01ForEntUpdateOne) SetNillableField15(s *string) *Table01ForEntUpdateOne

SetNillableField15 sets the "field15" field if the given value is not nil.

func (*Table01ForEntUpdateOne) SetUpdateTime

func (teuo *Table01ForEntUpdateOne) SetUpdateTime(t time.Time) *Table01ForEntUpdateOne

SetUpdateTime sets the "update_time" field.

func (*Table01ForEntUpdateOne) Where

Where appends a list predicates to the Table01ForEntUpdate builder.

type Table01ForEntUpsert

type Table01ForEntUpsert struct {
	*sql.UpdateSet
}

Table01ForEntUpsert is the "OnConflict" setter.

func (*Table01ForEntUpsert) AddCommonField01

func (u *Table01ForEntUpsert) AddCommonField01(v int) *Table01ForEntUpsert

AddCommonField01 adds v to the "common_field01" field.

func (*Table01ForEntUpsert) AddField02

func (u *Table01ForEntUpsert) AddField02(v int) *Table01ForEntUpsert

AddField02 adds v to the "field02" field.

func (*Table01ForEntUpsert) AddField07

func (u *Table01ForEntUpsert) AddField07(v int64) *Table01ForEntUpsert

AddField07 adds v to the "field07" field.

func (*Table01ForEntUpsert) AddField08

AddField08 adds v to the "field08" field.

func (*Table01ForEntUpsert) ClearCommonField01

func (u *Table01ForEntUpsert) ClearCommonField01() *Table01ForEntUpsert

ClearCommonField01 clears the value of the "common_field01" field.

func (*Table01ForEntUpsert) ClearField05

func (u *Table01ForEntUpsert) ClearField05() *Table01ForEntUpsert

ClearField05 clears the value of the "field05" field.

func (*Table01ForEntUpsert) ClearField06

func (u *Table01ForEntUpsert) ClearField06() *Table01ForEntUpsert

ClearField06 clears the value of the "field06" field.

func (*Table01ForEntUpsert) ClearField10

func (u *Table01ForEntUpsert) ClearField10() *Table01ForEntUpsert

ClearField10 clears the value of the "field10" field.

func (*Table01ForEntUpsert) ClearField11

func (u *Table01ForEntUpsert) ClearField11() *Table01ForEntUpsert

ClearField11 clears the value of the "field11" field.

func (*Table01ForEntUpsert) ClearField12

func (u *Table01ForEntUpsert) ClearField12() *Table01ForEntUpsert

ClearField12 clears the value of the "field12" field.

func (*Table01ForEntUpsert) ClearField13

func (u *Table01ForEntUpsert) ClearField13() *Table01ForEntUpsert

ClearField13 clears the value of the "field13" field.

func (*Table01ForEntUpsert) ClearField14

func (u *Table01ForEntUpsert) ClearField14() *Table01ForEntUpsert

ClearField14 clears the value of the "field14" field.

func (*Table01ForEntUpsert) ClearField15

func (u *Table01ForEntUpsert) ClearField15() *Table01ForEntUpsert

ClearField15 clears the value of the "field15" field.

func (*Table01ForEntUpsert) SetCommonField01

func (u *Table01ForEntUpsert) SetCommonField01(v int) *Table01ForEntUpsert

SetCommonField01 sets the "common_field01" field.

func (*Table01ForEntUpsert) SetField01

SetField01 sets the "field01" field.

func (*Table01ForEntUpsert) SetField02

func (u *Table01ForEntUpsert) SetField02(v int) *Table01ForEntUpsert

SetField02 sets the "field02" field.

func (*Table01ForEntUpsert) SetField03

func (u *Table01ForEntUpsert) SetField03(v bool) *Table01ForEntUpsert

SetField03 sets the "field03" field.

func (*Table01ForEntUpsert) SetField04

SetField04 sets the "field04" field.

func (*Table01ForEntUpsert) SetField05

SetField05 sets the "field05" field.

func (*Table01ForEntUpsert) SetField06

SetField06 sets the "field06" field.

func (*Table01ForEntUpsert) SetField07

func (u *Table01ForEntUpsert) SetField07(v int64) *Table01ForEntUpsert

SetField07 sets the "field07" field.

func (*Table01ForEntUpsert) SetField08

SetField08 sets the "field08" field.

func (*Table01ForEntUpsert) SetField09

SetField09 sets the "field09" field.

func (*Table01ForEntUpsert) SetField10

SetField10 sets the "field10" field.

func (*Table01ForEntUpsert) SetField11

SetField11 sets the "field11" field.

func (*Table01ForEntUpsert) SetField12

SetField12 sets the "field12" field.

func (*Table01ForEntUpsert) SetField13

SetField13 sets the "field13" field.

func (*Table01ForEntUpsert) SetField14

SetField14 sets the "field14" field.

func (*Table01ForEntUpsert) SetField15

SetField15 sets the "field15" field.

func (*Table01ForEntUpsert) SetUpdateTime

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

SetUpdateTime sets the "update_time" field.

func (*Table01ForEntUpsert) UpdateCommonField01

func (u *Table01ForEntUpsert) UpdateCommonField01() *Table01ForEntUpsert

UpdateCommonField01 sets the "common_field01" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField01

func (u *Table01ForEntUpsert) UpdateField01() *Table01ForEntUpsert

UpdateField01 sets the "field01" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField02

func (u *Table01ForEntUpsert) UpdateField02() *Table01ForEntUpsert

UpdateField02 sets the "field02" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField03

func (u *Table01ForEntUpsert) UpdateField03() *Table01ForEntUpsert

UpdateField03 sets the "field03" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField04

func (u *Table01ForEntUpsert) UpdateField04() *Table01ForEntUpsert

UpdateField04 sets the "field04" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField05

func (u *Table01ForEntUpsert) UpdateField05() *Table01ForEntUpsert

UpdateField05 sets the "field05" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField06

func (u *Table01ForEntUpsert) UpdateField06() *Table01ForEntUpsert

UpdateField06 sets the "field06" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField07

func (u *Table01ForEntUpsert) UpdateField07() *Table01ForEntUpsert

UpdateField07 sets the "field07" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField08

func (u *Table01ForEntUpsert) UpdateField08() *Table01ForEntUpsert

UpdateField08 sets the "field08" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField09

func (u *Table01ForEntUpsert) UpdateField09() *Table01ForEntUpsert

UpdateField09 sets the "field09" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField10

func (u *Table01ForEntUpsert) UpdateField10() *Table01ForEntUpsert

UpdateField10 sets the "field10" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField11

func (u *Table01ForEntUpsert) UpdateField11() *Table01ForEntUpsert

UpdateField11 sets the "field11" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField12

func (u *Table01ForEntUpsert) UpdateField12() *Table01ForEntUpsert

UpdateField12 sets the "field12" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField13

func (u *Table01ForEntUpsert) UpdateField13() *Table01ForEntUpsert

UpdateField13 sets the "field13" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField14

func (u *Table01ForEntUpsert) UpdateField14() *Table01ForEntUpsert

UpdateField14 sets the "field14" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateField15

func (u *Table01ForEntUpsert) UpdateField15() *Table01ForEntUpsert

UpdateField15 sets the "field15" field to the value that was provided on create.

func (*Table01ForEntUpsert) UpdateUpdateTime

func (u *Table01ForEntUpsert) UpdateUpdateTime() *Table01ForEntUpsert

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

type Table01ForEntUpsertBulk

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

Table01ForEntUpsertBulk is the builder for "upsert"-ing a bulk of Table01ForEnt nodes.

func (*Table01ForEntUpsertBulk) AddCommonField01

func (u *Table01ForEntUpsertBulk) AddCommonField01(v int) *Table01ForEntUpsertBulk

AddCommonField01 adds v to the "common_field01" field.

func (*Table01ForEntUpsertBulk) AddField02

AddField02 adds v to the "field02" field.

func (*Table01ForEntUpsertBulk) AddField07

AddField07 adds v to the "field07" field.

func (*Table01ForEntUpsertBulk) AddField08

AddField08 adds v to the "field08" field.

func (*Table01ForEntUpsertBulk) ClearCommonField01

func (u *Table01ForEntUpsertBulk) ClearCommonField01() *Table01ForEntUpsertBulk

ClearCommonField01 clears the value of the "common_field01" field.

func (*Table01ForEntUpsertBulk) ClearField05

ClearField05 clears the value of the "field05" field.

func (*Table01ForEntUpsertBulk) ClearField06

ClearField06 clears the value of the "field06" field.

func (*Table01ForEntUpsertBulk) ClearField10

ClearField10 clears the value of the "field10" field.

func (*Table01ForEntUpsertBulk) ClearField11

ClearField11 clears the value of the "field11" field.

func (*Table01ForEntUpsertBulk) ClearField12

ClearField12 clears the value of the "field12" field.

func (*Table01ForEntUpsertBulk) ClearField13

ClearField13 clears the value of the "field13" field.

func (*Table01ForEntUpsertBulk) ClearField14

ClearField14 clears the value of the "field14" field.

func (*Table01ForEntUpsertBulk) ClearField15

ClearField15 clears the value of the "field15" field.

func (*Table01ForEntUpsertBulk) DoNothing

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

func (*Table01ForEntUpsertBulk) Exec

Exec executes the query.

func (*Table01ForEntUpsertBulk) ExecX

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

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

func (*Table01ForEntUpsertBulk) Ignore

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

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

func (*Table01ForEntUpsertBulk) SetCommonField01

func (u *Table01ForEntUpsertBulk) SetCommonField01(v int) *Table01ForEntUpsertBulk

SetCommonField01 sets the "common_field01" field.

func (*Table01ForEntUpsertBulk) SetField01

SetField01 sets the "field01" field.

func (*Table01ForEntUpsertBulk) SetField02

SetField02 sets the "field02" field.

func (*Table01ForEntUpsertBulk) SetField03

SetField03 sets the "field03" field.

func (*Table01ForEntUpsertBulk) SetField04

SetField04 sets the "field04" field.

func (*Table01ForEntUpsertBulk) SetField05

SetField05 sets the "field05" field.

func (*Table01ForEntUpsertBulk) SetField06

SetField06 sets the "field06" field.

func (*Table01ForEntUpsertBulk) SetField07

SetField07 sets the "field07" field.

func (*Table01ForEntUpsertBulk) SetField08

SetField08 sets the "field08" field.

func (*Table01ForEntUpsertBulk) SetField09

SetField09 sets the "field09" field.

func (*Table01ForEntUpsertBulk) SetField10

SetField10 sets the "field10" field.

func (*Table01ForEntUpsertBulk) SetField11

SetField11 sets the "field11" field.

func (*Table01ForEntUpsertBulk) SetField12

SetField12 sets the "field12" field.

func (*Table01ForEntUpsertBulk) SetField13

SetField13 sets the "field13" field.

func (*Table01ForEntUpsertBulk) SetField14

SetField14 sets the "field14" field.

func (*Table01ForEntUpsertBulk) SetField15

SetField15 sets the "field15" field.

func (*Table01ForEntUpsertBulk) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*Table01ForEntUpsertBulk) Update

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

func (*Table01ForEntUpsertBulk) UpdateCommonField01

func (u *Table01ForEntUpsertBulk) UpdateCommonField01() *Table01ForEntUpsertBulk

UpdateCommonField01 sets the "common_field01" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField01

UpdateField01 sets the "field01" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField02

UpdateField02 sets the "field02" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField03

UpdateField03 sets the "field03" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField04

UpdateField04 sets the "field04" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField05

UpdateField05 sets the "field05" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField06

UpdateField06 sets the "field06" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField07

UpdateField07 sets the "field07" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField08

UpdateField08 sets the "field08" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField09

UpdateField09 sets the "field09" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField10

UpdateField10 sets the "field10" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField11

UpdateField11 sets the "field11" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField12

UpdateField12 sets the "field12" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField13

UpdateField13 sets the "field13" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField14

UpdateField14 sets the "field14" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateField15

UpdateField15 sets the "field15" field to the value that was provided on create.

func (*Table01ForEntUpsertBulk) UpdateNewValues

func (u *Table01ForEntUpsertBulk) UpdateNewValues() *Table01ForEntUpsertBulk

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

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

func (*Table01ForEntUpsertBulk) UpdateUpdateTime

func (u *Table01ForEntUpsertBulk) UpdateUpdateTime() *Table01ForEntUpsertBulk

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

type Table01ForEntUpsertOne

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

Table01ForEntUpsertOne is the builder for "upsert"-ing

one Table01ForEnt node.

func (*Table01ForEntUpsertOne) AddCommonField01

func (u *Table01ForEntUpsertOne) AddCommonField01(v int) *Table01ForEntUpsertOne

AddCommonField01 adds v to the "common_field01" field.

func (*Table01ForEntUpsertOne) AddField02

AddField02 adds v to the "field02" field.

func (*Table01ForEntUpsertOne) AddField07

AddField07 adds v to the "field07" field.

func (*Table01ForEntUpsertOne) AddField08

AddField08 adds v to the "field08" field.

func (*Table01ForEntUpsertOne) ClearCommonField01

func (u *Table01ForEntUpsertOne) ClearCommonField01() *Table01ForEntUpsertOne

ClearCommonField01 clears the value of the "common_field01" field.

func (*Table01ForEntUpsertOne) ClearField05

ClearField05 clears the value of the "field05" field.

func (*Table01ForEntUpsertOne) ClearField06

ClearField06 clears the value of the "field06" field.

func (*Table01ForEntUpsertOne) ClearField10

ClearField10 clears the value of the "field10" field.

func (*Table01ForEntUpsertOne) ClearField11

ClearField11 clears the value of the "field11" field.

func (*Table01ForEntUpsertOne) ClearField12

ClearField12 clears the value of the "field12" field.

func (*Table01ForEntUpsertOne) ClearField13

ClearField13 clears the value of the "field13" field.

func (*Table01ForEntUpsertOne) ClearField14

ClearField14 clears the value of the "field14" field.

func (*Table01ForEntUpsertOne) ClearField15

ClearField15 clears the value of the "field15" field.

func (*Table01ForEntUpsertOne) DoNothing

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

func (*Table01ForEntUpsertOne) Exec

Exec executes the query.

func (*Table01ForEntUpsertOne) ExecX

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

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

func (*Table01ForEntUpsertOne) ID

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

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

func (*Table01ForEntUpsertOne) IDX

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

func (*Table01ForEntUpsertOne) Ignore

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

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

func (*Table01ForEntUpsertOne) SetCommonField01

func (u *Table01ForEntUpsertOne) SetCommonField01(v int) *Table01ForEntUpsertOne

SetCommonField01 sets the "common_field01" field.

func (*Table01ForEntUpsertOne) SetField01

SetField01 sets the "field01" field.

func (*Table01ForEntUpsertOne) SetField02

SetField02 sets the "field02" field.

func (*Table01ForEntUpsertOne) SetField03

SetField03 sets the "field03" field.

func (*Table01ForEntUpsertOne) SetField04

SetField04 sets the "field04" field.

func (*Table01ForEntUpsertOne) SetField05

SetField05 sets the "field05" field.

func (*Table01ForEntUpsertOne) SetField06

SetField06 sets the "field06" field.

func (*Table01ForEntUpsertOne) SetField07

SetField07 sets the "field07" field.

func (*Table01ForEntUpsertOne) SetField08

SetField08 sets the "field08" field.

func (*Table01ForEntUpsertOne) SetField09

SetField09 sets the "field09" field.

func (*Table01ForEntUpsertOne) SetField10

SetField10 sets the "field10" field.

func (*Table01ForEntUpsertOne) SetField11

SetField11 sets the "field11" field.

func (*Table01ForEntUpsertOne) SetField12

SetField12 sets the "field12" field.

func (*Table01ForEntUpsertOne) SetField13

SetField13 sets the "field13" field.

func (*Table01ForEntUpsertOne) SetField14

SetField14 sets the "field14" field.

func (*Table01ForEntUpsertOne) SetField15

SetField15 sets the "field15" field.

func (*Table01ForEntUpsertOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*Table01ForEntUpsertOne) Update

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

func (*Table01ForEntUpsertOne) UpdateCommonField01

func (u *Table01ForEntUpsertOne) UpdateCommonField01() *Table01ForEntUpsertOne

UpdateCommonField01 sets the "common_field01" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField01

func (u *Table01ForEntUpsertOne) UpdateField01() *Table01ForEntUpsertOne

UpdateField01 sets the "field01" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField02

func (u *Table01ForEntUpsertOne) UpdateField02() *Table01ForEntUpsertOne

UpdateField02 sets the "field02" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField03

func (u *Table01ForEntUpsertOne) UpdateField03() *Table01ForEntUpsertOne

UpdateField03 sets the "field03" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField04

func (u *Table01ForEntUpsertOne) UpdateField04() *Table01ForEntUpsertOne

UpdateField04 sets the "field04" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField05

func (u *Table01ForEntUpsertOne) UpdateField05() *Table01ForEntUpsertOne

UpdateField05 sets the "field05" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField06

func (u *Table01ForEntUpsertOne) UpdateField06() *Table01ForEntUpsertOne

UpdateField06 sets the "field06" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField07

func (u *Table01ForEntUpsertOne) UpdateField07() *Table01ForEntUpsertOne

UpdateField07 sets the "field07" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField08

func (u *Table01ForEntUpsertOne) UpdateField08() *Table01ForEntUpsertOne

UpdateField08 sets the "field08" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField09

func (u *Table01ForEntUpsertOne) UpdateField09() *Table01ForEntUpsertOne

UpdateField09 sets the "field09" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField10

func (u *Table01ForEntUpsertOne) UpdateField10() *Table01ForEntUpsertOne

UpdateField10 sets the "field10" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField11

func (u *Table01ForEntUpsertOne) UpdateField11() *Table01ForEntUpsertOne

UpdateField11 sets the "field11" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField12

func (u *Table01ForEntUpsertOne) UpdateField12() *Table01ForEntUpsertOne

UpdateField12 sets the "field12" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField13

func (u *Table01ForEntUpsertOne) UpdateField13() *Table01ForEntUpsertOne

UpdateField13 sets the "field13" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField14

func (u *Table01ForEntUpsertOne) UpdateField14() *Table01ForEntUpsertOne

UpdateField14 sets the "field14" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateField15

func (u *Table01ForEntUpsertOne) UpdateField15() *Table01ForEntUpsertOne

UpdateField15 sets the "field15" field to the value that was provided on create.

func (*Table01ForEntUpsertOne) UpdateNewValues

func (u *Table01ForEntUpsertOne) UpdateNewValues() *Table01ForEntUpsertOne

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

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

func (*Table01ForEntUpsertOne) UpdateUpdateTime

func (u *Table01ForEntUpsertOne) UpdateUpdateTime() *Table01ForEntUpsertOne

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

type Table01ForEnts

type Table01ForEnts []*Table01ForEnt

Table01ForEnts is a parsable slice of Table01ForEnt.

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 {

	// IssueForEnt is the client for interacting with the IssueForEnt builders.
	IssueForEnt *IssueForEntClient
	// RepositoryForEnt is the client for interacting with the RepositoryForEnt builders.
	RepositoryForEnt *RepositoryForEntClient
	// Table01ForEnt is the client for interacting with the Table01ForEnt builders.
	Table01ForEnt *Table01ForEntClient
	// UserForEnt is the client for interacting with the UserForEnt builders.
	UserForEnt *UserForEntClient
	// 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 UserForEnt

type UserForEnt struct {

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

UserForEnt is the model entity for the UserForEnt schema.

func (*UserForEnt) QueryRepositoryForEnts

func (ufe *UserForEnt) QueryRepositoryForEnts() *RepositoryForEntQuery

QueryRepositoryForEnts queries the "repository_for_ents" edge of the UserForEnt entity.

func (*UserForEnt) String

func (ufe *UserForEnt) String() string

String implements the fmt.Stringer.

func (*UserForEnt) Unwrap

func (ufe *UserForEnt) Unwrap() *UserForEnt

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

func (ufe *UserForEnt) Update() *UserForEntUpdateOne

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

func (*UserForEnt) Value

func (ufe *UserForEnt) Value(name string) (ent.Value, error)

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

type UserForEntClient

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

UserForEntClient is a client for the UserForEnt schema.

func NewUserForEntClient

func NewUserForEntClient(c config) *UserForEntClient

NewUserForEntClient returns a client for the UserForEnt from the given config.

func (*UserForEntClient) Create

func (c *UserForEntClient) Create() *UserForEntCreate

Create returns a builder for creating a UserForEnt entity.

func (*UserForEntClient) CreateBulk

func (c *UserForEntClient) CreateBulk(builders ...*UserForEntCreate) *UserForEntCreateBulk

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

func (*UserForEntClient) Delete

func (c *UserForEntClient) Delete() *UserForEntDelete

Delete returns a delete builder for UserForEnt.

func (*UserForEntClient) DeleteOne

func (c *UserForEntClient) DeleteOne(ufe *UserForEnt) *UserForEntDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserForEntClient) DeleteOneID

func (c *UserForEntClient) DeleteOneID(id int) *UserForEntDeleteOne

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

func (*UserForEntClient) Get

func (c *UserForEntClient) Get(ctx context.Context, id int) (*UserForEnt, error)

Get returns a UserForEnt entity by its id.

func (*UserForEntClient) GetX

func (c *UserForEntClient) GetX(ctx context.Context, id int) *UserForEnt

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

func (*UserForEntClient) Hooks

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

Hooks returns the client hooks.

func (*UserForEntClient) Intercept

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

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

func (*UserForEntClient) Interceptors

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

Interceptors returns the client interceptors.

func (*UserForEntClient) MapCreateBulk

func (c *UserForEntClient) MapCreateBulk(slice any, setFunc func(*UserForEntCreate, int)) *UserForEntCreateBulk

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 (*UserForEntClient) Query

func (c *UserForEntClient) Query() *UserForEntQuery

Query returns a query builder for UserForEnt.

func (*UserForEntClient) QueryRepositoryForEnts

func (c *UserForEntClient) QueryRepositoryForEnts(ufe *UserForEnt) *RepositoryForEntQuery

QueryRepositoryForEnts queries the repository_for_ents edge of a UserForEnt.

func (*UserForEntClient) Update

func (c *UserForEntClient) Update() *UserForEntUpdate

Update returns an update builder for UserForEnt.

func (*UserForEntClient) UpdateOne

func (c *UserForEntClient) UpdateOne(ufe *UserForEnt) *UserForEntUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserForEntClient) UpdateOneID

func (c *UserForEntClient) UpdateOneID(id int) *UserForEntUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserForEntClient) Use

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

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

type UserForEntCreate

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

UserForEntCreate is the builder for creating a UserForEnt entity.

func (*UserForEntCreate) AddRepositoryForEntIDs

func (ufec *UserForEntCreate) AddRepositoryForEntIDs(ids ...int) *UserForEntCreate

AddRepositoryForEntIDs adds the "repository_for_ents" edge to the RepositoryForEnt entity by IDs.

func (*UserForEntCreate) AddRepositoryForEnts

func (ufec *UserForEntCreate) AddRepositoryForEnts(r ...*RepositoryForEnt) *UserForEntCreate

AddRepositoryForEnts adds the "repository_for_ents" edges to the RepositoryForEnt entity.

func (*UserForEntCreate) Exec

func (ufec *UserForEntCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserForEntCreate) ExecX

func (ufec *UserForEntCreate) ExecX(ctx context.Context)

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

func (*UserForEntCreate) Mutation

func (ufec *UserForEntCreate) Mutation() *UserForEntMutation

Mutation returns the UserForEntMutation object of the builder.

func (*UserForEntCreate) OnConflict

func (ufec *UserForEntCreate) OnConflict(opts ...sql.ConflictOption) *UserForEntUpsertOne

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

client.UserForEnt.Create().
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserForEntCreate) OnConflictColumns

func (ufec *UserForEntCreate) OnConflictColumns(columns ...string) *UserForEntUpsertOne

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

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

func (*UserForEntCreate) Save

func (ufec *UserForEntCreate) Save(ctx context.Context) (*UserForEnt, error)

Save creates the UserForEnt in the database.

func (*UserForEntCreate) SaveX

func (ufec *UserForEntCreate) SaveX(ctx context.Context) *UserForEnt

SaveX calls Save and panics if Save returns an error.

type UserForEntCreateBulk

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

UserForEntCreateBulk is the builder for creating many UserForEnt entities in bulk.

func (*UserForEntCreateBulk) Exec

func (ufecb *UserForEntCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserForEntCreateBulk) ExecX

func (ufecb *UserForEntCreateBulk) ExecX(ctx context.Context)

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

func (*UserForEntCreateBulk) OnConflict

func (ufecb *UserForEntCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserForEntUpsertBulk

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

client.UserForEnt.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*UserForEntCreateBulk) OnConflictColumns

func (ufecb *UserForEntCreateBulk) OnConflictColumns(columns ...string) *UserForEntUpsertBulk

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

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

func (*UserForEntCreateBulk) Save

func (ufecb *UserForEntCreateBulk) Save(ctx context.Context) ([]*UserForEnt, error)

Save creates the UserForEnt entities in the database.

func (*UserForEntCreateBulk) SaveX

func (ufecb *UserForEntCreateBulk) SaveX(ctx context.Context) []*UserForEnt

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

type UserForEntDelete

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

UserForEntDelete is the builder for deleting a UserForEnt entity.

func (*UserForEntDelete) Exec

func (ufed *UserForEntDelete) Exec(ctx context.Context) (int, error)

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

func (*UserForEntDelete) ExecX

func (ufed *UserForEntDelete) ExecX(ctx context.Context) int

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

func (*UserForEntDelete) Where

Where appends a list predicates to the UserForEntDelete builder.

type UserForEntDeleteOne

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

UserForEntDeleteOne is the builder for deleting a single UserForEnt entity.

func (*UserForEntDeleteOne) Exec

func (ufedo *UserForEntDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserForEntDeleteOne) ExecX

func (ufedo *UserForEntDeleteOne) ExecX(ctx context.Context)

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

func (*UserForEntDeleteOne) Where

Where appends a list predicates to the UserForEntDelete builder.

type UserForEntEdges

type UserForEntEdges struct {
	// RepositoryForEnts holds the value of the repository_for_ents edge.
	RepositoryForEnts []*RepositoryForEnt `json:"repository_for_ents,omitempty"`
	// contains filtered or unexported fields
}

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

func (UserForEntEdges) RepositoryForEntsOrErr

func (e UserForEntEdges) RepositoryForEntsOrErr() ([]*RepositoryForEnt, error)

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

type UserForEntGroupBy

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

UserForEntGroupBy is the group-by builder for UserForEnt entities.

func (*UserForEntGroupBy) Aggregate

func (ufegb *UserForEntGroupBy) Aggregate(fns ...AggregateFunc) *UserForEntGroupBy

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

func (*UserForEntGroupBy) Bool

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

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

func (*UserForEntGroupBy) BoolX

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

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

func (*UserForEntGroupBy) Bools

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

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

func (*UserForEntGroupBy) BoolsX

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

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

func (*UserForEntGroupBy) Float64

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

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

func (*UserForEntGroupBy) Float64X

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

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

func (*UserForEntGroupBy) Float64s

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

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

func (*UserForEntGroupBy) Float64sX

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

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

func (*UserForEntGroupBy) Int

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

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

func (*UserForEntGroupBy) IntX

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

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

func (*UserForEntGroupBy) Ints

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

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

func (*UserForEntGroupBy) IntsX

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

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

func (*UserForEntGroupBy) Scan

func (ufegb *UserForEntGroupBy) Scan(ctx context.Context, v any) error

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

func (*UserForEntGroupBy) ScanX

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

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

func (*UserForEntGroupBy) String

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

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

func (*UserForEntGroupBy) StringX

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

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

func (*UserForEntGroupBy) Strings

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

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

func (*UserForEntGroupBy) StringsX

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

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

type UserForEntMutation

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

UserForEntMutation represents an operation that mutates the UserForEnt nodes in the graph.

func (*UserForEntMutation) AddField

func (m *UserForEntMutation) 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 (*UserForEntMutation) AddRepositoryForEntIDs

func (m *UserForEntMutation) AddRepositoryForEntIDs(ids ...int)

AddRepositoryForEntIDs adds the "repository_for_ents" edge to the RepositoryForEnt entity by ids.

func (*UserForEntMutation) AddedEdges

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

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

func (*UserForEntMutation) AddedField

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

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

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

func (*UserForEntMutation) AddedIDs

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

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

func (*UserForEntMutation) ClearEdge

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

func (m *UserForEntMutation) 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 (*UserForEntMutation) ClearRepositoryForEnts

func (m *UserForEntMutation) ClearRepositoryForEnts()

ClearRepositoryForEnts clears the "repository_for_ents" edge to the RepositoryForEnt entity.

func (*UserForEntMutation) ClearedEdges

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

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

func (*UserForEntMutation) ClearedFields

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

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

func (UserForEntMutation) Client

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

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

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

func (*UserForEntMutation) Field

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

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

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

func (*UserForEntMutation) Fields

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

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

func (m *UserForEntMutation) 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 (*UserForEntMutation) OldField

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

func (m *UserForEntMutation) Op() Op

Op returns the operation name.

func (*UserForEntMutation) RemoveRepositoryForEntIDs

func (m *UserForEntMutation) RemoveRepositoryForEntIDs(ids ...int)

RemoveRepositoryForEntIDs removes the "repository_for_ents" edge to the RepositoryForEnt entity by IDs.

func (*UserForEntMutation) RemovedEdges

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

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

func (*UserForEntMutation) RemovedIDs

func (m *UserForEntMutation) 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 (*UserForEntMutation) RemovedRepositoryForEntsIDs

func (m *UserForEntMutation) RemovedRepositoryForEntsIDs() (ids []int)

RemovedRepositoryForEnts returns the removed IDs of the "repository_for_ents" edge to the RepositoryForEnt entity.

func (*UserForEntMutation) RepositoryForEntsCleared

func (m *UserForEntMutation) RepositoryForEntsCleared() bool

RepositoryForEntsCleared reports if the "repository_for_ents" edge to the RepositoryForEnt entity was cleared.

func (*UserForEntMutation) RepositoryForEntsIDs

func (m *UserForEntMutation) RepositoryForEntsIDs() (ids []int)

RepositoryForEntsIDs returns the "repository_for_ents" edge IDs in the mutation.

func (*UserForEntMutation) ResetEdge

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

func (m *UserForEntMutation) 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 (*UserForEntMutation) ResetRepositoryForEnts

func (m *UserForEntMutation) ResetRepositoryForEnts()

ResetRepositoryForEnts resets all changes to the "repository_for_ents" edge.

func (*UserForEntMutation) SetField

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

func (m *UserForEntMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (UserForEntMutation) Tx

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

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

func (*UserForEntMutation) Type

func (m *UserForEntMutation) Type() string

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

func (*UserForEntMutation) Where

func (m *UserForEntMutation) Where(ps ...predicate.UserForEnt)

Where appends a list predicates to the UserForEntMutation builder.

func (*UserForEntMutation) WhereP

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

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

type UserForEntQuery

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

UserForEntQuery is the builder for querying UserForEnt entities.

func (*UserForEntQuery) Aggregate

func (ufeq *UserForEntQuery) Aggregate(fns ...AggregateFunc) *UserForEntSelect

Aggregate returns a UserForEntSelect configured with the given aggregations.

func (*UserForEntQuery) All

func (ufeq *UserForEntQuery) All(ctx context.Context) ([]*UserForEnt, error)

All executes the query and returns a list of UserForEnts.

func (*UserForEntQuery) AllX

func (ufeq *UserForEntQuery) AllX(ctx context.Context) []*UserForEnt

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

func (*UserForEntQuery) Clone

func (ufeq *UserForEntQuery) Clone() *UserForEntQuery

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

func (*UserForEntQuery) Count

func (ufeq *UserForEntQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserForEntQuery) CountX

func (ufeq *UserForEntQuery) CountX(ctx context.Context) int

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

func (*UserForEntQuery) Exist

func (ufeq *UserForEntQuery) Exist(ctx context.Context) (bool, error)

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

func (*UserForEntQuery) ExistX

func (ufeq *UserForEntQuery) ExistX(ctx context.Context) bool

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

func (*UserForEntQuery) First

func (ufeq *UserForEntQuery) First(ctx context.Context) (*UserForEnt, error)

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

func (*UserForEntQuery) FirstID

func (ufeq *UserForEntQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*UserForEntQuery) FirstIDX

func (ufeq *UserForEntQuery) FirstIDX(ctx context.Context) int

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

func (*UserForEntQuery) FirstX

func (ufeq *UserForEntQuery) FirstX(ctx context.Context) *UserForEnt

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

func (*UserForEntQuery) GroupBy

func (ufeq *UserForEntQuery) GroupBy(field string, fields ...string) *UserForEntGroupBy

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 (*UserForEntQuery) IDs

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

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

func (*UserForEntQuery) IDsX

func (ufeq *UserForEntQuery) IDsX(ctx context.Context) []int

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

func (*UserForEntQuery) Limit

func (ufeq *UserForEntQuery) Limit(limit int) *UserForEntQuery

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

func (*UserForEntQuery) Offset

func (ufeq *UserForEntQuery) Offset(offset int) *UserForEntQuery

Offset to start from.

func (*UserForEntQuery) Only

func (ufeq *UserForEntQuery) Only(ctx context.Context) (*UserForEnt, error)

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

func (*UserForEntQuery) OnlyID

func (ufeq *UserForEntQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*UserForEntQuery) OnlyIDX

func (ufeq *UserForEntQuery) OnlyIDX(ctx context.Context) int

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

func (*UserForEntQuery) OnlyX

func (ufeq *UserForEntQuery) OnlyX(ctx context.Context) *UserForEnt

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

func (*UserForEntQuery) Order

Order specifies how the records should be ordered.

func (*UserForEntQuery) QueryRepositoryForEnts

func (ufeq *UserForEntQuery) QueryRepositoryForEnts() *RepositoryForEntQuery

QueryRepositoryForEnts chains the current query on the "repository_for_ents" edge.

func (*UserForEntQuery) Select

func (ufeq *UserForEntQuery) Select(fields ...string) *UserForEntSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*UserForEntQuery) Unique

func (ufeq *UserForEntQuery) Unique(unique bool) *UserForEntQuery

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

Where adds a new predicate for the UserForEntQuery builder.

func (*UserForEntQuery) WithRepositoryForEnts

func (ufeq *UserForEntQuery) WithRepositoryForEnts(opts ...func(*RepositoryForEntQuery)) *UserForEntQuery

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

type UserForEntSelect

type UserForEntSelect struct {
	*UserForEntQuery
	// contains filtered or unexported fields
}

UserForEntSelect is the builder for selecting fields of UserForEnt entities.

func (*UserForEntSelect) Aggregate

func (ufes *UserForEntSelect) Aggregate(fns ...AggregateFunc) *UserForEntSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserForEntSelect) Bool

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

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

func (*UserForEntSelect) BoolX

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

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

func (*UserForEntSelect) Bools

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

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

func (*UserForEntSelect) BoolsX

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

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

func (*UserForEntSelect) Float64

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

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

func (*UserForEntSelect) Float64X

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

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

func (*UserForEntSelect) Float64s

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

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

func (*UserForEntSelect) Float64sX

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

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

func (*UserForEntSelect) Int

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

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

func (*UserForEntSelect) IntX

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

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

func (*UserForEntSelect) Ints

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

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

func (*UserForEntSelect) IntsX

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

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

func (*UserForEntSelect) Scan

func (ufes *UserForEntSelect) Scan(ctx context.Context, v any) error

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

func (*UserForEntSelect) ScanX

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

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

func (*UserForEntSelect) String

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

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

func (*UserForEntSelect) StringX

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

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

func (*UserForEntSelect) Strings

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

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

func (*UserForEntSelect) StringsX

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

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

type UserForEntUpdate

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

UserForEntUpdate is the builder for updating UserForEnt entities.

func (*UserForEntUpdate) AddRepositoryForEntIDs

func (ufeu *UserForEntUpdate) AddRepositoryForEntIDs(ids ...int) *UserForEntUpdate

AddRepositoryForEntIDs adds the "repository_for_ents" edge to the RepositoryForEnt entity by IDs.

func (*UserForEntUpdate) AddRepositoryForEnts

func (ufeu *UserForEntUpdate) AddRepositoryForEnts(r ...*RepositoryForEnt) *UserForEntUpdate

AddRepositoryForEnts adds the "repository_for_ents" edges to the RepositoryForEnt entity.

func (*UserForEntUpdate) ClearRepositoryForEnts

func (ufeu *UserForEntUpdate) ClearRepositoryForEnts() *UserForEntUpdate

ClearRepositoryForEnts clears all "repository_for_ents" edges to the RepositoryForEnt entity.

func (*UserForEntUpdate) Exec

func (ufeu *UserForEntUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserForEntUpdate) ExecX

func (ufeu *UserForEntUpdate) ExecX(ctx context.Context)

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

func (*UserForEntUpdate) Mutation

func (ufeu *UserForEntUpdate) Mutation() *UserForEntMutation

Mutation returns the UserForEntMutation object of the builder.

func (*UserForEntUpdate) RemoveRepositoryForEntIDs

func (ufeu *UserForEntUpdate) RemoveRepositoryForEntIDs(ids ...int) *UserForEntUpdate

RemoveRepositoryForEntIDs removes the "repository_for_ents" edge to RepositoryForEnt entities by IDs.

func (*UserForEntUpdate) RemoveRepositoryForEnts

func (ufeu *UserForEntUpdate) RemoveRepositoryForEnts(r ...*RepositoryForEnt) *UserForEntUpdate

RemoveRepositoryForEnts removes "repository_for_ents" edges to RepositoryForEnt entities.

func (*UserForEntUpdate) Save

func (ufeu *UserForEntUpdate) Save(ctx context.Context) (int, error)

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

func (*UserForEntUpdate) SaveX

func (ufeu *UserForEntUpdate) SaveX(ctx context.Context) int

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

func (*UserForEntUpdate) Where

Where appends a list predicates to the UserForEntUpdate builder.

type UserForEntUpdateOne

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

UserForEntUpdateOne is the builder for updating a single UserForEnt entity.

func (*UserForEntUpdateOne) AddRepositoryForEntIDs

func (ufeuo *UserForEntUpdateOne) AddRepositoryForEntIDs(ids ...int) *UserForEntUpdateOne

AddRepositoryForEntIDs adds the "repository_for_ents" edge to the RepositoryForEnt entity by IDs.

func (*UserForEntUpdateOne) AddRepositoryForEnts

func (ufeuo *UserForEntUpdateOne) AddRepositoryForEnts(r ...*RepositoryForEnt) *UserForEntUpdateOne

AddRepositoryForEnts adds the "repository_for_ents" edges to the RepositoryForEnt entity.

func (*UserForEntUpdateOne) ClearRepositoryForEnts

func (ufeuo *UserForEntUpdateOne) ClearRepositoryForEnts() *UserForEntUpdateOne

ClearRepositoryForEnts clears all "repository_for_ents" edges to the RepositoryForEnt entity.

func (*UserForEntUpdateOne) Exec

func (ufeuo *UserForEntUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserForEntUpdateOne) ExecX

func (ufeuo *UserForEntUpdateOne) ExecX(ctx context.Context)

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

func (*UserForEntUpdateOne) Mutation

func (ufeuo *UserForEntUpdateOne) Mutation() *UserForEntMutation

Mutation returns the UserForEntMutation object of the builder.

func (*UserForEntUpdateOne) RemoveRepositoryForEntIDs

func (ufeuo *UserForEntUpdateOne) RemoveRepositoryForEntIDs(ids ...int) *UserForEntUpdateOne

RemoveRepositoryForEntIDs removes the "repository_for_ents" edge to RepositoryForEnt entities by IDs.

func (*UserForEntUpdateOne) RemoveRepositoryForEnts

func (ufeuo *UserForEntUpdateOne) RemoveRepositoryForEnts(r ...*RepositoryForEnt) *UserForEntUpdateOne

RemoveRepositoryForEnts removes "repository_for_ents" edges to RepositoryForEnt entities.

func (*UserForEntUpdateOne) Save

func (ufeuo *UserForEntUpdateOne) Save(ctx context.Context) (*UserForEnt, error)

Save executes the query and returns the updated UserForEnt entity.

func (*UserForEntUpdateOne) SaveX

func (ufeuo *UserForEntUpdateOne) SaveX(ctx context.Context) *UserForEnt

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

func (*UserForEntUpdateOne) Select

func (ufeuo *UserForEntUpdateOne) Select(field string, fields ...string) *UserForEntUpdateOne

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

func (*UserForEntUpdateOne) Where

Where appends a list predicates to the UserForEntUpdate builder.

type UserForEntUpsert

type UserForEntUpsert struct {
	*sql.UpdateSet
}

UserForEntUpsert is the "OnConflict" setter.

type UserForEntUpsertBulk

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

UserForEntUpsertBulk is the builder for "upsert"-ing a bulk of UserForEnt nodes.

func (*UserForEntUpsertBulk) DoNothing

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

func (*UserForEntUpsertBulk) Exec

Exec executes the query.

func (*UserForEntUpsertBulk) ExecX

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

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

func (*UserForEntUpsertBulk) Ignore

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

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

func (*UserForEntUpsertBulk) Update

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

func (*UserForEntUpsertBulk) UpdateNewValues

func (u *UserForEntUpsertBulk) UpdateNewValues() *UserForEntUpsertBulk

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

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

type UserForEntUpsertOne

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

UserForEntUpsertOne is the builder for "upsert"-ing

one UserForEnt node.

func (*UserForEntUpsertOne) DoNothing

func (u *UserForEntUpsertOne) DoNothing() *UserForEntUpsertOne

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

func (*UserForEntUpsertOne) Exec

Exec executes the query.

func (*UserForEntUpsertOne) ExecX

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

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

func (*UserForEntUpsertOne) ID

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

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

func (*UserForEntUpsertOne) IDX

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

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

func (*UserForEntUpsertOne) Ignore

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

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

func (*UserForEntUpsertOne) Update

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

func (*UserForEntUpsertOne) UpdateNewValues

func (u *UserForEntUpsertOne) UpdateNewValues() *UserForEntUpsertOne

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

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

type UserForEnts

type UserForEnts []*UserForEnt

UserForEnts is a parsable slice of UserForEnt.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL