ent

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 43 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.
	TypeAllMethodsService      = "AllMethodsService"
	TypeBlogPost               = "BlogPost"
	TypeCategory               = "Category"
	TypeDependsOnSkipped       = "DependsOnSkipped"
	TypeDuplicateNumberMessage = "DuplicateNumberMessage"
	TypeExplicitSkippedMessage = "ExplicitSkippedMessage"
	TypeImage                  = "Image"
	TypeImplicitSkippedMessage = "ImplicitSkippedMessage"
	TypeInvalidFieldMessage    = "InvalidFieldMessage"
	TypeMessageWithEnum        = "MessageWithEnum"
	TypeMessageWithFieldOne    = "MessageWithFieldOne"
	TypeMessageWithID          = "MessageWithID"
	TypeMessageWithOptionals   = "MessageWithOptionals"
	TypeMessageWithPackageName = "MessageWithPackageName"
	TypeMessageWithStrings     = "MessageWithStrings"
	TypeNoBackref              = "NoBackref"
	TypeOneMethodService       = "OneMethodService"
	TypePortal                 = "Portal"
	TypeSkipEdgeExample        = "SkipEdgeExample"
	TypeTwoMethodService       = "TwoMethodService"
	TypeUser                   = "User"
	TypeValidMessage           = "ValidMessage"
)

Variables

This section is empty.

Functions

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

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

func Count

func Count() AggregateFunc

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

func Max

func Max(field string) AggregateFunc

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

func Mean

func Mean(field string) AggregateFunc

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

func Min

func Min(field string) AggregateFunc

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

func Sum

func Sum(field string) AggregateFunc

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

type AllMethodsService added in v0.2.0

type AllMethodsService struct {

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

AllMethodsService is the model entity for the AllMethodsService schema.

func (*AllMethodsService) String added in v0.2.0

func (ams *AllMethodsService) String() string

String implements the fmt.Stringer.

func (*AllMethodsService) Unwrap added in v0.2.0

func (ams *AllMethodsService) Unwrap() *AllMethodsService

Unwrap unwraps the AllMethodsService 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 (*AllMethodsService) Update added in v0.2.0

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

type AllMethodsServiceClient added in v0.2.0

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

AllMethodsServiceClient is a client for the AllMethodsService schema.

func NewAllMethodsServiceClient added in v0.2.0

func NewAllMethodsServiceClient(c config) *AllMethodsServiceClient

NewAllMethodsServiceClient returns a client for the AllMethodsService from the given config.

func (*AllMethodsServiceClient) Create added in v0.2.0

Create returns a builder for creating a AllMethodsService entity.

func (*AllMethodsServiceClient) CreateBulk added in v0.2.0

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

func (*AllMethodsServiceClient) Delete added in v0.2.0

Delete returns a delete builder for AllMethodsService.

func (*AllMethodsServiceClient) DeleteOne added in v0.2.0

DeleteOne returns a builder for deleting the given entity.

func (*AllMethodsServiceClient) DeleteOneID added in v0.2.0

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

func (*AllMethodsServiceClient) Get added in v0.2.0

Get returns a AllMethodsService entity by its id.

func (*AllMethodsServiceClient) GetX added in v0.2.0

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

func (*AllMethodsServiceClient) Hooks added in v0.2.0

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

Hooks returns the client hooks.

func (*AllMethodsServiceClient) Intercept added in v0.3.5

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

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

func (*AllMethodsServiceClient) Interceptors added in v0.3.5

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

Interceptors returns the client interceptors.

func (*AllMethodsServiceClient) Query added in v0.2.0

Query returns a query builder for AllMethodsService.

func (*AllMethodsServiceClient) Update added in v0.2.0

Update returns an update builder for AllMethodsService.

func (*AllMethodsServiceClient) UpdateOne added in v0.2.0

UpdateOne returns an update builder for the given entity.

func (*AllMethodsServiceClient) UpdateOneID added in v0.2.0

UpdateOneID returns an update builder for the given id.

func (*AllMethodsServiceClient) Use added in v0.2.0

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

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

type AllMethodsServiceCreate added in v0.2.0

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

AllMethodsServiceCreate is the builder for creating a AllMethodsService entity.

func (*AllMethodsServiceCreate) Exec added in v0.2.0

func (amsc *AllMethodsServiceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AllMethodsServiceCreate) ExecX added in v0.2.0

func (amsc *AllMethodsServiceCreate) ExecX(ctx context.Context)

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

func (*AllMethodsServiceCreate) Mutation added in v0.2.0

Mutation returns the AllMethodsServiceMutation object of the builder.

func (*AllMethodsServiceCreate) Save added in v0.2.0

Save creates the AllMethodsService in the database.

func (*AllMethodsServiceCreate) SaveX added in v0.2.0

SaveX calls Save and panics if Save returns an error.

type AllMethodsServiceCreateBulk added in v0.2.0

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

AllMethodsServiceCreateBulk is the builder for creating many AllMethodsService entities in bulk.

func (*AllMethodsServiceCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*AllMethodsServiceCreateBulk) ExecX added in v0.2.0

func (amscb *AllMethodsServiceCreateBulk) ExecX(ctx context.Context)

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

func (*AllMethodsServiceCreateBulk) Save added in v0.2.0

Save creates the AllMethodsService entities in the database.

func (*AllMethodsServiceCreateBulk) SaveX added in v0.2.0

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

type AllMethodsServiceDelete added in v0.2.0

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

AllMethodsServiceDelete is the builder for deleting a AllMethodsService entity.

func (*AllMethodsServiceDelete) Exec added in v0.2.0

func (amsd *AllMethodsServiceDelete) Exec(ctx context.Context) (int, error)

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

func (*AllMethodsServiceDelete) ExecX added in v0.2.0

func (amsd *AllMethodsServiceDelete) ExecX(ctx context.Context) int

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

func (*AllMethodsServiceDelete) Where added in v0.2.0

Where appends a list predicates to the AllMethodsServiceDelete builder.

type AllMethodsServiceDeleteOne added in v0.2.0

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

AllMethodsServiceDeleteOne is the builder for deleting a single AllMethodsService entity.

func (*AllMethodsServiceDeleteOne) Exec added in v0.2.0

Exec executes the deletion query.

func (*AllMethodsServiceDeleteOne) ExecX added in v0.2.0

func (amsdo *AllMethodsServiceDeleteOne) ExecX(ctx context.Context)

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

type AllMethodsServiceGroupBy added in v0.2.0

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

AllMethodsServiceGroupBy is the group-by builder for AllMethodsService entities.

func (*AllMethodsServiceGroupBy) Aggregate added in v0.2.0

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

func (*AllMethodsServiceGroupBy) Bool added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) BoolX added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) Bools added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) BoolsX added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) Float64 added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) Float64X added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) Float64s added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) Float64sX added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) Int added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) IntX added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) Ints added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) IntsX added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) Scan added in v0.2.0

func (amsgb *AllMethodsServiceGroupBy) Scan(ctx context.Context, v any) error

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

func (*AllMethodsServiceGroupBy) ScanX added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) String added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) StringX added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) Strings added in v0.2.0

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

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

func (*AllMethodsServiceGroupBy) StringsX added in v0.2.0

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

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

type AllMethodsServiceMutation added in v0.2.0

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

AllMethodsServiceMutation represents an operation that mutates the AllMethodsService nodes in the graph.

func (*AllMethodsServiceMutation) AddField added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) AddedEdges added in v0.2.0

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

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

func (*AllMethodsServiceMutation) AddedField added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) AddedFields added in v0.2.0

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

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

func (*AllMethodsServiceMutation) AddedIDs added in v0.2.0

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

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

func (*AllMethodsServiceMutation) ClearEdge added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) ClearField added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) ClearedEdges added in v0.2.0

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

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

func (*AllMethodsServiceMutation) ClearedFields added in v0.2.0

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

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

func (AllMethodsServiceMutation) Client added in v0.2.0

func (m AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) EdgeCleared added in v0.2.0

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

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

func (*AllMethodsServiceMutation) Field added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) FieldCleared added in v0.2.0

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

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

func (*AllMethodsServiceMutation) Fields added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) ID added in v0.2.0

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

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 (*AllMethodsServiceMutation) OldField added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) Op added in v0.2.0

func (m *AllMethodsServiceMutation) Op() Op

Op returns the operation name.

func (*AllMethodsServiceMutation) RemovedEdges added in v0.2.0

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

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

func (*AllMethodsServiceMutation) RemovedIDs added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) ResetEdge added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) ResetField added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) SetField added in v0.2.0

func (m *AllMethodsServiceMutation) 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 (*AllMethodsServiceMutation) SetOp added in v0.3.5

func (m *AllMethodsServiceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (AllMethodsServiceMutation) Tx added in v0.2.0

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

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

func (*AllMethodsServiceMutation) Type added in v0.2.0

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

func (*AllMethodsServiceMutation) Where added in v0.2.0

Where appends a list predicates to the AllMethodsServiceMutation builder.

func (*AllMethodsServiceMutation) WhereP added in v0.3.5

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

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

type AllMethodsServiceQuery added in v0.2.0

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

AllMethodsServiceQuery is the builder for querying AllMethodsService entities.

func (*AllMethodsServiceQuery) Aggregate added in v0.3.4

Aggregate returns a AllMethodsServiceSelect configured with the given aggregations.

func (*AllMethodsServiceQuery) All added in v0.2.0

All executes the query and returns a list of AllMethodsServices.

func (*AllMethodsServiceQuery) AllX added in v0.2.0

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

func (*AllMethodsServiceQuery) Clone added in v0.2.0

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

func (*AllMethodsServiceQuery) Count added in v0.2.0

func (amsq *AllMethodsServiceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AllMethodsServiceQuery) CountX added in v0.2.0

func (amsq *AllMethodsServiceQuery) CountX(ctx context.Context) int

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

func (*AllMethodsServiceQuery) Exist added in v0.2.0

func (amsq *AllMethodsServiceQuery) Exist(ctx context.Context) (bool, error)

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

func (*AllMethodsServiceQuery) ExistX added in v0.2.0

func (amsq *AllMethodsServiceQuery) ExistX(ctx context.Context) bool

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

func (*AllMethodsServiceQuery) First added in v0.2.0

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

func (*AllMethodsServiceQuery) FirstID added in v0.2.0

func (amsq *AllMethodsServiceQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*AllMethodsServiceQuery) FirstIDX added in v0.2.0

func (amsq *AllMethodsServiceQuery) FirstIDX(ctx context.Context) int

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

func (*AllMethodsServiceQuery) FirstX added in v0.2.0

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

func (*AllMethodsServiceQuery) GroupBy added in v0.2.0

func (amsq *AllMethodsServiceQuery) GroupBy(field string, fields ...string) *AllMethodsServiceGroupBy

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 (*AllMethodsServiceQuery) IDs added in v0.2.0

func (amsq *AllMethodsServiceQuery) IDs(ctx context.Context) ([]int, error)

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

func (*AllMethodsServiceQuery) IDsX added in v0.2.0

func (amsq *AllMethodsServiceQuery) IDsX(ctx context.Context) []int

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

func (*AllMethodsServiceQuery) Limit added in v0.2.0

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

func (*AllMethodsServiceQuery) Offset added in v0.2.0

func (amsq *AllMethodsServiceQuery) Offset(offset int) *AllMethodsServiceQuery

Offset to start from.

func (*AllMethodsServiceQuery) Only added in v0.2.0

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

func (*AllMethodsServiceQuery) OnlyID added in v0.2.0

func (amsq *AllMethodsServiceQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*AllMethodsServiceQuery) OnlyIDX added in v0.2.0

func (amsq *AllMethodsServiceQuery) OnlyIDX(ctx context.Context) int

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

func (*AllMethodsServiceQuery) OnlyX added in v0.2.0

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

func (*AllMethodsServiceQuery) Order added in v0.2.0

Order specifies how the records should be ordered.

func (*AllMethodsServiceQuery) Select added in v0.2.0

func (amsq *AllMethodsServiceQuery) Select(fields ...string) *AllMethodsServiceSelect

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

func (*AllMethodsServiceQuery) Unique added in v0.2.0

func (amsq *AllMethodsServiceQuery) Unique(unique bool) *AllMethodsServiceQuery

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 (*AllMethodsServiceQuery) Where added in v0.2.0

Where adds a new predicate for the AllMethodsServiceQuery builder.

type AllMethodsServiceSelect added in v0.2.0

type AllMethodsServiceSelect struct {
	*AllMethodsServiceQuery
	// contains filtered or unexported fields
}

AllMethodsServiceSelect is the builder for selecting fields of AllMethodsService entities.

func (*AllMethodsServiceSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*AllMethodsServiceSelect) Bool added in v0.2.0

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

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

func (*AllMethodsServiceSelect) BoolX added in v0.2.0

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

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

func (*AllMethodsServiceSelect) Bools added in v0.2.0

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

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

func (*AllMethodsServiceSelect) BoolsX added in v0.2.0

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

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

func (*AllMethodsServiceSelect) Float64 added in v0.2.0

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

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

func (*AllMethodsServiceSelect) Float64X added in v0.2.0

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

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

func (*AllMethodsServiceSelect) Float64s added in v0.2.0

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

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

func (*AllMethodsServiceSelect) Float64sX added in v0.2.0

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

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

func (*AllMethodsServiceSelect) Int added in v0.2.0

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

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

func (*AllMethodsServiceSelect) IntX added in v0.2.0

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

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

func (*AllMethodsServiceSelect) Ints added in v0.2.0

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

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

func (*AllMethodsServiceSelect) IntsX added in v0.2.0

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

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

func (*AllMethodsServiceSelect) Scan added in v0.2.0

func (amss *AllMethodsServiceSelect) Scan(ctx context.Context, v any) error

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

func (*AllMethodsServiceSelect) ScanX added in v0.2.0

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

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

func (*AllMethodsServiceSelect) String added in v0.2.0

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

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

func (*AllMethodsServiceSelect) StringX added in v0.2.0

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

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

func (*AllMethodsServiceSelect) Strings added in v0.2.0

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

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

func (*AllMethodsServiceSelect) StringsX added in v0.2.0

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

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

type AllMethodsServiceUpdate added in v0.2.0

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

AllMethodsServiceUpdate is the builder for updating AllMethodsService entities.

func (*AllMethodsServiceUpdate) Exec added in v0.2.0

func (amsu *AllMethodsServiceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AllMethodsServiceUpdate) ExecX added in v0.2.0

func (amsu *AllMethodsServiceUpdate) ExecX(ctx context.Context)

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

func (*AllMethodsServiceUpdate) Mutation added in v0.2.0

Mutation returns the AllMethodsServiceMutation object of the builder.

func (*AllMethodsServiceUpdate) Save added in v0.2.0

func (amsu *AllMethodsServiceUpdate) Save(ctx context.Context) (int, error)

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

func (*AllMethodsServiceUpdate) SaveX added in v0.2.0

func (amsu *AllMethodsServiceUpdate) SaveX(ctx context.Context) int

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

func (*AllMethodsServiceUpdate) Where added in v0.2.0

Where appends a list predicates to the AllMethodsServiceUpdate builder.

type AllMethodsServiceUpdateOne added in v0.2.0

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

AllMethodsServiceUpdateOne is the builder for updating a single AllMethodsService entity.

func (*AllMethodsServiceUpdateOne) Exec added in v0.2.0

Exec executes the query on the entity.

func (*AllMethodsServiceUpdateOne) ExecX added in v0.2.0

func (amsuo *AllMethodsServiceUpdateOne) ExecX(ctx context.Context)

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

func (*AllMethodsServiceUpdateOne) Mutation added in v0.2.0

Mutation returns the AllMethodsServiceMutation object of the builder.

func (*AllMethodsServiceUpdateOne) Save added in v0.2.0

Save executes the query and returns the updated AllMethodsService entity.

func (*AllMethodsServiceUpdateOne) SaveX added in v0.2.0

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

func (*AllMethodsServiceUpdateOne) Select added in v0.2.0

func (amsuo *AllMethodsServiceUpdateOne) Select(field string, fields ...string) *AllMethodsServiceUpdateOne

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

type AllMethodsServices added in v0.2.0

type AllMethodsServices []*AllMethodsService

AllMethodsServices is a parsable slice of AllMethodsService.

type BlogPost

type BlogPost struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Body holds the value of the "body" field.
	Body string `json:"body,omitempty"`
	// ExternalID holds the value of the "external_id" field.
	ExternalID int `json:"external_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the BlogPostQuery when eager-loading is set.
	Edges BlogPostEdges `json:"edges"`
	// contains filtered or unexported fields
}

BlogPost is the model entity for the BlogPost schema.

func (*BlogPost) QueryAuthor

func (bp *BlogPost) QueryAuthor() *UserQuery

QueryAuthor queries the "author" edge of the BlogPost entity.

func (*BlogPost) QueryCategories

func (bp *BlogPost) QueryCategories() *CategoryQuery

QueryCategories queries the "categories" edge of the BlogPost entity.

func (*BlogPost) String

func (bp *BlogPost) String() string

String implements the fmt.Stringer.

func (*BlogPost) Unwrap

func (bp *BlogPost) Unwrap() *BlogPost

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

func (bp *BlogPost) Update() *BlogPostUpdateOne

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

type BlogPostClient

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

BlogPostClient is a client for the BlogPost schema.

func NewBlogPostClient

func NewBlogPostClient(c config) *BlogPostClient

NewBlogPostClient returns a client for the BlogPost from the given config.

func (*BlogPostClient) Create

func (c *BlogPostClient) Create() *BlogPostCreate

Create returns a builder for creating a BlogPost entity.

func (*BlogPostClient) CreateBulk

func (c *BlogPostClient) CreateBulk(builders ...*BlogPostCreate) *BlogPostCreateBulk

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

func (*BlogPostClient) Delete

func (c *BlogPostClient) Delete() *BlogPostDelete

Delete returns a delete builder for BlogPost.

func (*BlogPostClient) DeleteOne

func (c *BlogPostClient) DeleteOne(bp *BlogPost) *BlogPostDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*BlogPostClient) DeleteOneID

func (c *BlogPostClient) DeleteOneID(id int) *BlogPostDeleteOne

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

func (*BlogPostClient) Get

func (c *BlogPostClient) Get(ctx context.Context, id int) (*BlogPost, error)

Get returns a BlogPost entity by its id.

func (*BlogPostClient) GetX

func (c *BlogPostClient) GetX(ctx context.Context, id int) *BlogPost

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

func (*BlogPostClient) Hooks

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

Hooks returns the client hooks.

func (*BlogPostClient) Intercept added in v0.3.5

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

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

func (*BlogPostClient) Interceptors added in v0.3.5

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

Interceptors returns the client interceptors.

func (*BlogPostClient) Query

func (c *BlogPostClient) Query() *BlogPostQuery

Query returns a query builder for BlogPost.

func (*BlogPostClient) QueryAuthor

func (c *BlogPostClient) QueryAuthor(bp *BlogPost) *UserQuery

QueryAuthor queries the author edge of a BlogPost.

func (*BlogPostClient) QueryCategories

func (c *BlogPostClient) QueryCategories(bp *BlogPost) *CategoryQuery

QueryCategories queries the categories edge of a BlogPost.

func (*BlogPostClient) Update

func (c *BlogPostClient) Update() *BlogPostUpdate

Update returns an update builder for BlogPost.

func (*BlogPostClient) UpdateOne

func (c *BlogPostClient) UpdateOne(bp *BlogPost) *BlogPostUpdateOne

UpdateOne returns an update builder for the given entity.

func (*BlogPostClient) UpdateOneID

func (c *BlogPostClient) UpdateOneID(id int) *BlogPostUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BlogPostClient) Use

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

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

type BlogPostCreate

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

BlogPostCreate is the builder for creating a BlogPost entity.

func (*BlogPostCreate) AddCategories

func (bpc *BlogPostCreate) AddCategories(c ...*Category) *BlogPostCreate

AddCategories adds the "categories" edges to the Category entity.

func (*BlogPostCreate) AddCategoryIDs

func (bpc *BlogPostCreate) AddCategoryIDs(ids ...int) *BlogPostCreate

AddCategoryIDs adds the "categories" edge to the Category entity by IDs.

func (*BlogPostCreate) Exec added in v0.2.0

func (bpc *BlogPostCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*BlogPostCreate) ExecX added in v0.2.0

func (bpc *BlogPostCreate) ExecX(ctx context.Context)

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

func (*BlogPostCreate) Mutation

func (bpc *BlogPostCreate) Mutation() *BlogPostMutation

Mutation returns the BlogPostMutation object of the builder.

func (*BlogPostCreate) Save

func (bpc *BlogPostCreate) Save(ctx context.Context) (*BlogPost, error)

Save creates the BlogPost in the database.

func (*BlogPostCreate) SaveX

func (bpc *BlogPostCreate) SaveX(ctx context.Context) *BlogPost

SaveX calls Save and panics if Save returns an error.

func (*BlogPostCreate) SetAuthor

func (bpc *BlogPostCreate) SetAuthor(u *User) *BlogPostCreate

SetAuthor sets the "author" edge to the User entity.

func (*BlogPostCreate) SetAuthorID

func (bpc *BlogPostCreate) SetAuthorID(id int) *BlogPostCreate

SetAuthorID sets the "author" edge to the User entity by ID.

func (*BlogPostCreate) SetBody

func (bpc *BlogPostCreate) SetBody(s string) *BlogPostCreate

SetBody sets the "body" field.

func (*BlogPostCreate) SetExternalID

func (bpc *BlogPostCreate) SetExternalID(i int) *BlogPostCreate

SetExternalID sets the "external_id" field.

func (*BlogPostCreate) SetNillableAuthorID

func (bpc *BlogPostCreate) SetNillableAuthorID(id *int) *BlogPostCreate

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

func (*BlogPostCreate) SetTitle

func (bpc *BlogPostCreate) SetTitle(s string) *BlogPostCreate

SetTitle sets the "title" field.

type BlogPostCreateBulk

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

BlogPostCreateBulk is the builder for creating many BlogPost entities in bulk.

func (*BlogPostCreateBulk) Exec added in v0.2.0

func (bpcb *BlogPostCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*BlogPostCreateBulk) ExecX added in v0.2.0

func (bpcb *BlogPostCreateBulk) ExecX(ctx context.Context)

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

func (*BlogPostCreateBulk) Save

func (bpcb *BlogPostCreateBulk) Save(ctx context.Context) ([]*BlogPost, error)

Save creates the BlogPost entities in the database.

func (*BlogPostCreateBulk) SaveX

func (bpcb *BlogPostCreateBulk) SaveX(ctx context.Context) []*BlogPost

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

type BlogPostDelete

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

BlogPostDelete is the builder for deleting a BlogPost entity.

func (*BlogPostDelete) Exec

func (bpd *BlogPostDelete) Exec(ctx context.Context) (int, error)

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

func (*BlogPostDelete) ExecX

func (bpd *BlogPostDelete) ExecX(ctx context.Context) int

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

func (*BlogPostDelete) Where

func (bpd *BlogPostDelete) Where(ps ...predicate.BlogPost) *BlogPostDelete

Where appends a list predicates to the BlogPostDelete builder.

type BlogPostDeleteOne

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

BlogPostDeleteOne is the builder for deleting a single BlogPost entity.

func (*BlogPostDeleteOne) Exec

func (bpdo *BlogPostDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BlogPostDeleteOne) ExecX

func (bpdo *BlogPostDeleteOne) ExecX(ctx context.Context)

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

type BlogPostEdges

type BlogPostEdges struct {
	// Author holds the value of the author edge.
	Author *User `json:"author,omitempty"`
	// Categories holds the value of the categories edge.
	Categories []*Category `json:"categories,omitempty"`
	// contains filtered or unexported fields
}

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

func (BlogPostEdges) AuthorOrErr

func (e BlogPostEdges) AuthorOrErr() (*User, error)

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

func (BlogPostEdges) CategoriesOrErr

func (e BlogPostEdges) CategoriesOrErr() ([]*Category, error)

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

type BlogPostGroupBy

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

BlogPostGroupBy is the group-by builder for BlogPost entities.

func (*BlogPostGroupBy) Aggregate

func (bpgb *BlogPostGroupBy) Aggregate(fns ...AggregateFunc) *BlogPostGroupBy

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

func (*BlogPostGroupBy) Bool

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

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

func (*BlogPostGroupBy) BoolX

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

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

func (*BlogPostGroupBy) Bools

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

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

func (*BlogPostGroupBy) BoolsX

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

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

func (*BlogPostGroupBy) Float64

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

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

func (*BlogPostGroupBy) Float64X

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

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

func (*BlogPostGroupBy) Float64s

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

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

func (*BlogPostGroupBy) Float64sX

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

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

func (*BlogPostGroupBy) Int

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

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

func (*BlogPostGroupBy) IntX

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

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

func (*BlogPostGroupBy) Ints

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

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

func (*BlogPostGroupBy) IntsX

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

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

func (*BlogPostGroupBy) Scan

func (bpgb *BlogPostGroupBy) Scan(ctx context.Context, v any) error

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

func (*BlogPostGroupBy) ScanX

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

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

func (*BlogPostGroupBy) String

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

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

func (*BlogPostGroupBy) StringX

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

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

func (*BlogPostGroupBy) Strings

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

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

func (*BlogPostGroupBy) StringsX

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

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

type BlogPostMutation

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

BlogPostMutation represents an operation that mutates the BlogPost nodes in the graph.

func (*BlogPostMutation) AddCategoryIDs

func (m *BlogPostMutation) AddCategoryIDs(ids ...int)

AddCategoryIDs adds the "categories" edge to the Category entity by ids.

func (*BlogPostMutation) AddExternalID

func (m *BlogPostMutation) AddExternalID(i int)

AddExternalID adds i to the "external_id" field.

func (*BlogPostMutation) AddField

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

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

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

func (*BlogPostMutation) AddedExternalID

func (m *BlogPostMutation) AddedExternalID() (r int, exists bool)

AddedExternalID returns the value that was added to the "external_id" field in this mutation.

func (*BlogPostMutation) AddedField

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

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

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

func (*BlogPostMutation) AddedIDs

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

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

func (*BlogPostMutation) AuthorCleared

func (m *BlogPostMutation) AuthorCleared() bool

AuthorCleared reports if the "author" edge to the User entity was cleared.

func (*BlogPostMutation) AuthorID

func (m *BlogPostMutation) AuthorID() (id int, exists bool)

AuthorID returns the "author" edge ID in the mutation.

func (*BlogPostMutation) AuthorIDs

func (m *BlogPostMutation) AuthorIDs() (ids []int)

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

func (*BlogPostMutation) Body

func (m *BlogPostMutation) Body() (r string, exists bool)

Body returns the value of the "body" field in the mutation.

func (*BlogPostMutation) CategoriesCleared

func (m *BlogPostMutation) CategoriesCleared() bool

CategoriesCleared reports if the "categories" edge to the Category entity was cleared.

func (*BlogPostMutation) CategoriesIDs

func (m *BlogPostMutation) CategoriesIDs() (ids []int)

CategoriesIDs returns the "categories" edge IDs in the mutation.

func (*BlogPostMutation) ClearAuthor

func (m *BlogPostMutation) ClearAuthor()

ClearAuthor clears the "author" edge to the User entity.

func (*BlogPostMutation) ClearCategories

func (m *BlogPostMutation) ClearCategories()

ClearCategories clears the "categories" edge to the Category entity.

func (*BlogPostMutation) ClearEdge

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

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

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

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

func (*BlogPostMutation) ClearedFields

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

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

func (BlogPostMutation) Client

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

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

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

func (*BlogPostMutation) ExternalID

func (m *BlogPostMutation) ExternalID() (r int, exists bool)

ExternalID returns the value of the "external_id" field in the mutation.

func (*BlogPostMutation) Field

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

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

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

func (*BlogPostMutation) Fields

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

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

func (m *BlogPostMutation) 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 (*BlogPostMutation) OldBody

func (m *BlogPostMutation) OldBody(ctx context.Context) (v string, err error)

OldBody returns the old "body" field's value of the BlogPost entity. If the BlogPost 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 (*BlogPostMutation) OldExternalID

func (m *BlogPostMutation) OldExternalID(ctx context.Context) (v int, err error)

OldExternalID returns the old "external_id" field's value of the BlogPost entity. If the BlogPost 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 (*BlogPostMutation) OldField

func (m *BlogPostMutation) 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 (*BlogPostMutation) OldTitle

func (m *BlogPostMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the BlogPost entity. If the BlogPost 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 (*BlogPostMutation) Op

func (m *BlogPostMutation) Op() Op

Op returns the operation name.

func (*BlogPostMutation) RemoveCategoryIDs

func (m *BlogPostMutation) RemoveCategoryIDs(ids ...int)

RemoveCategoryIDs removes the "categories" edge to the Category entity by IDs.

func (*BlogPostMutation) RemovedCategoriesIDs

func (m *BlogPostMutation) RemovedCategoriesIDs() (ids []int)

RemovedCategories returns the removed IDs of the "categories" edge to the Category entity.

func (*BlogPostMutation) RemovedEdges

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

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

func (*BlogPostMutation) RemovedIDs

func (m *BlogPostMutation) 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 (*BlogPostMutation) ResetAuthor

func (m *BlogPostMutation) ResetAuthor()

ResetAuthor resets all changes to the "author" edge.

func (*BlogPostMutation) ResetBody

func (m *BlogPostMutation) ResetBody()

ResetBody resets all changes to the "body" field.

func (*BlogPostMutation) ResetCategories

func (m *BlogPostMutation) ResetCategories()

ResetCategories resets all changes to the "categories" edge.

func (*BlogPostMutation) ResetEdge

func (m *BlogPostMutation) 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 (*BlogPostMutation) ResetExternalID

func (m *BlogPostMutation) ResetExternalID()

ResetExternalID resets all changes to the "external_id" field.

func (*BlogPostMutation) ResetField

func (m *BlogPostMutation) 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 (*BlogPostMutation) ResetTitle

func (m *BlogPostMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*BlogPostMutation) SetAuthorID

func (m *BlogPostMutation) SetAuthorID(id int)

SetAuthorID sets the "author" edge to the User entity by id.

func (*BlogPostMutation) SetBody

func (m *BlogPostMutation) SetBody(s string)

SetBody sets the "body" field.

func (*BlogPostMutation) SetExternalID

func (m *BlogPostMutation) SetExternalID(i int)

SetExternalID sets the "external_id" field.

func (*BlogPostMutation) SetField

func (m *BlogPostMutation) 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 (*BlogPostMutation) SetOp added in v0.3.5

func (m *BlogPostMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*BlogPostMutation) SetTitle

func (m *BlogPostMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*BlogPostMutation) Title

func (m *BlogPostMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (BlogPostMutation) Tx

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

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

func (*BlogPostMutation) Type

func (m *BlogPostMutation) Type() string

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

func (*BlogPostMutation) Where added in v0.2.0

func (m *BlogPostMutation) Where(ps ...predicate.BlogPost)

Where appends a list predicates to the BlogPostMutation builder.

func (*BlogPostMutation) WhereP added in v0.3.5

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

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

type BlogPostQuery

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

BlogPostQuery is the builder for querying BlogPost entities.

func (*BlogPostQuery) Aggregate added in v0.3.4

func (bpq *BlogPostQuery) Aggregate(fns ...AggregateFunc) *BlogPostSelect

Aggregate returns a BlogPostSelect configured with the given aggregations.

func (*BlogPostQuery) All

func (bpq *BlogPostQuery) All(ctx context.Context) ([]*BlogPost, error)

All executes the query and returns a list of BlogPosts.

func (*BlogPostQuery) AllX

func (bpq *BlogPostQuery) AllX(ctx context.Context) []*BlogPost

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

func (*BlogPostQuery) Clone

func (bpq *BlogPostQuery) Clone() *BlogPostQuery

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

func (*BlogPostQuery) Count

func (bpq *BlogPostQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BlogPostQuery) CountX

func (bpq *BlogPostQuery) CountX(ctx context.Context) int

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

func (*BlogPostQuery) Exist

func (bpq *BlogPostQuery) Exist(ctx context.Context) (bool, error)

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

func (*BlogPostQuery) ExistX

func (bpq *BlogPostQuery) ExistX(ctx context.Context) bool

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

func (*BlogPostQuery) First

func (bpq *BlogPostQuery) First(ctx context.Context) (*BlogPost, error)

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

func (*BlogPostQuery) FirstID

func (bpq *BlogPostQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*BlogPostQuery) FirstIDX

func (bpq *BlogPostQuery) FirstIDX(ctx context.Context) int

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

func (*BlogPostQuery) FirstX

func (bpq *BlogPostQuery) FirstX(ctx context.Context) *BlogPost

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

func (*BlogPostQuery) GroupBy

func (bpq *BlogPostQuery) GroupBy(field string, fields ...string) *BlogPostGroupBy

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

client.BlogPost.Query().
	GroupBy(blogpost.FieldTitle).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BlogPostQuery) IDs

func (bpq *BlogPostQuery) IDs(ctx context.Context) ([]int, error)

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

func (*BlogPostQuery) IDsX

func (bpq *BlogPostQuery) IDsX(ctx context.Context) []int

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

func (*BlogPostQuery) Limit

func (bpq *BlogPostQuery) Limit(limit int) *BlogPostQuery

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

func (*BlogPostQuery) Offset

func (bpq *BlogPostQuery) Offset(offset int) *BlogPostQuery

Offset to start from.

func (*BlogPostQuery) Only

func (bpq *BlogPostQuery) Only(ctx context.Context) (*BlogPost, error)

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

func (*BlogPostQuery) OnlyID

func (bpq *BlogPostQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*BlogPostQuery) OnlyIDX

func (bpq *BlogPostQuery) OnlyIDX(ctx context.Context) int

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

func (*BlogPostQuery) OnlyX

func (bpq *BlogPostQuery) OnlyX(ctx context.Context) *BlogPost

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

func (*BlogPostQuery) Order

func (bpq *BlogPostQuery) Order(o ...OrderFunc) *BlogPostQuery

Order specifies how the records should be ordered.

func (*BlogPostQuery) QueryAuthor

func (bpq *BlogPostQuery) QueryAuthor() *UserQuery

QueryAuthor chains the current query on the "author" edge.

func (*BlogPostQuery) QueryCategories

func (bpq *BlogPostQuery) QueryCategories() *CategoryQuery

QueryCategories chains the current query on the "categories" edge.

func (*BlogPostQuery) Select

func (bpq *BlogPostQuery) Select(fields ...string) *BlogPostSelect

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

client.BlogPost.Query().
	Select(blogpost.FieldTitle).
	Scan(ctx, &v)

func (*BlogPostQuery) Unique

func (bpq *BlogPostQuery) Unique(unique bool) *BlogPostQuery

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

func (bpq *BlogPostQuery) Where(ps ...predicate.BlogPost) *BlogPostQuery

Where adds a new predicate for the BlogPostQuery builder.

func (*BlogPostQuery) WithAuthor

func (bpq *BlogPostQuery) WithAuthor(opts ...func(*UserQuery)) *BlogPostQuery

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

func (*BlogPostQuery) WithCategories

func (bpq *BlogPostQuery) WithCategories(opts ...func(*CategoryQuery)) *BlogPostQuery

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

type BlogPostSelect

type BlogPostSelect struct {
	*BlogPostQuery
	// contains filtered or unexported fields
}

BlogPostSelect is the builder for selecting fields of BlogPost entities.

func (*BlogPostSelect) Aggregate added in v0.3.4

func (bps *BlogPostSelect) Aggregate(fns ...AggregateFunc) *BlogPostSelect

Aggregate adds the given aggregation functions to the selector query.

func (*BlogPostSelect) Bool

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

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

func (*BlogPostSelect) BoolX

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

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

func (*BlogPostSelect) Bools

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

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

func (*BlogPostSelect) BoolsX

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

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

func (*BlogPostSelect) Float64

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

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

func (*BlogPostSelect) Float64X

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

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

func (*BlogPostSelect) Float64s

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

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

func (*BlogPostSelect) Float64sX

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

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

func (*BlogPostSelect) Int

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

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

func (*BlogPostSelect) IntX

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

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

func (*BlogPostSelect) Ints

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

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

func (*BlogPostSelect) IntsX

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

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

func (*BlogPostSelect) Scan

func (bps *BlogPostSelect) Scan(ctx context.Context, v any) error

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

func (*BlogPostSelect) ScanX

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

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

func (*BlogPostSelect) String

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

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

func (*BlogPostSelect) StringX

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

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

func (*BlogPostSelect) Strings

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

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

func (*BlogPostSelect) StringsX

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

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

type BlogPostUpdate

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

BlogPostUpdate is the builder for updating BlogPost entities.

func (*BlogPostUpdate) AddCategories

func (bpu *BlogPostUpdate) AddCategories(c ...*Category) *BlogPostUpdate

AddCategories adds the "categories" edges to the Category entity.

func (*BlogPostUpdate) AddCategoryIDs

func (bpu *BlogPostUpdate) AddCategoryIDs(ids ...int) *BlogPostUpdate

AddCategoryIDs adds the "categories" edge to the Category entity by IDs.

func (*BlogPostUpdate) AddExternalID

func (bpu *BlogPostUpdate) AddExternalID(i int) *BlogPostUpdate

AddExternalID adds i to the "external_id" field.

func (*BlogPostUpdate) ClearAuthor

func (bpu *BlogPostUpdate) ClearAuthor() *BlogPostUpdate

ClearAuthor clears the "author" edge to the User entity.

func (*BlogPostUpdate) ClearCategories

func (bpu *BlogPostUpdate) ClearCategories() *BlogPostUpdate

ClearCategories clears all "categories" edges to the Category entity.

func (*BlogPostUpdate) Exec

func (bpu *BlogPostUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BlogPostUpdate) ExecX

func (bpu *BlogPostUpdate) ExecX(ctx context.Context)

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

func (*BlogPostUpdate) Mutation

func (bpu *BlogPostUpdate) Mutation() *BlogPostMutation

Mutation returns the BlogPostMutation object of the builder.

func (*BlogPostUpdate) RemoveCategories

func (bpu *BlogPostUpdate) RemoveCategories(c ...*Category) *BlogPostUpdate

RemoveCategories removes "categories" edges to Category entities.

func (*BlogPostUpdate) RemoveCategoryIDs

func (bpu *BlogPostUpdate) RemoveCategoryIDs(ids ...int) *BlogPostUpdate

RemoveCategoryIDs removes the "categories" edge to Category entities by IDs.

func (*BlogPostUpdate) Save

func (bpu *BlogPostUpdate) Save(ctx context.Context) (int, error)

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

func (*BlogPostUpdate) SaveX

func (bpu *BlogPostUpdate) SaveX(ctx context.Context) int

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

func (*BlogPostUpdate) SetAuthor

func (bpu *BlogPostUpdate) SetAuthor(u *User) *BlogPostUpdate

SetAuthor sets the "author" edge to the User entity.

func (*BlogPostUpdate) SetAuthorID

func (bpu *BlogPostUpdate) SetAuthorID(id int) *BlogPostUpdate

SetAuthorID sets the "author" edge to the User entity by ID.

func (*BlogPostUpdate) SetBody

func (bpu *BlogPostUpdate) SetBody(s string) *BlogPostUpdate

SetBody sets the "body" field.

func (*BlogPostUpdate) SetExternalID

func (bpu *BlogPostUpdate) SetExternalID(i int) *BlogPostUpdate

SetExternalID sets the "external_id" field.

func (*BlogPostUpdate) SetNillableAuthorID

func (bpu *BlogPostUpdate) SetNillableAuthorID(id *int) *BlogPostUpdate

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

func (*BlogPostUpdate) SetTitle

func (bpu *BlogPostUpdate) SetTitle(s string) *BlogPostUpdate

SetTitle sets the "title" field.

func (*BlogPostUpdate) Where

func (bpu *BlogPostUpdate) Where(ps ...predicate.BlogPost) *BlogPostUpdate

Where appends a list predicates to the BlogPostUpdate builder.

type BlogPostUpdateOne

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

BlogPostUpdateOne is the builder for updating a single BlogPost entity.

func (*BlogPostUpdateOne) AddCategories

func (bpuo *BlogPostUpdateOne) AddCategories(c ...*Category) *BlogPostUpdateOne

AddCategories adds the "categories" edges to the Category entity.

func (*BlogPostUpdateOne) AddCategoryIDs

func (bpuo *BlogPostUpdateOne) AddCategoryIDs(ids ...int) *BlogPostUpdateOne

AddCategoryIDs adds the "categories" edge to the Category entity by IDs.

func (*BlogPostUpdateOne) AddExternalID

func (bpuo *BlogPostUpdateOne) AddExternalID(i int) *BlogPostUpdateOne

AddExternalID adds i to the "external_id" field.

func (*BlogPostUpdateOne) ClearAuthor

func (bpuo *BlogPostUpdateOne) ClearAuthor() *BlogPostUpdateOne

ClearAuthor clears the "author" edge to the User entity.

func (*BlogPostUpdateOne) ClearCategories

func (bpuo *BlogPostUpdateOne) ClearCategories() *BlogPostUpdateOne

ClearCategories clears all "categories" edges to the Category entity.

func (*BlogPostUpdateOne) Exec

func (bpuo *BlogPostUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BlogPostUpdateOne) ExecX

func (bpuo *BlogPostUpdateOne) ExecX(ctx context.Context)

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

func (*BlogPostUpdateOne) Mutation

func (bpuo *BlogPostUpdateOne) Mutation() *BlogPostMutation

Mutation returns the BlogPostMutation object of the builder.

func (*BlogPostUpdateOne) RemoveCategories

func (bpuo *BlogPostUpdateOne) RemoveCategories(c ...*Category) *BlogPostUpdateOne

RemoveCategories removes "categories" edges to Category entities.

func (*BlogPostUpdateOne) RemoveCategoryIDs

func (bpuo *BlogPostUpdateOne) RemoveCategoryIDs(ids ...int) *BlogPostUpdateOne

RemoveCategoryIDs removes the "categories" edge to Category entities by IDs.

func (*BlogPostUpdateOne) Save

func (bpuo *BlogPostUpdateOne) Save(ctx context.Context) (*BlogPost, error)

Save executes the query and returns the updated BlogPost entity.

func (*BlogPostUpdateOne) SaveX

func (bpuo *BlogPostUpdateOne) SaveX(ctx context.Context) *BlogPost

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

func (*BlogPostUpdateOne) Select

func (bpuo *BlogPostUpdateOne) Select(field string, fields ...string) *BlogPostUpdateOne

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

func (*BlogPostUpdateOne) SetAuthor

func (bpuo *BlogPostUpdateOne) SetAuthor(u *User) *BlogPostUpdateOne

SetAuthor sets the "author" edge to the User entity.

func (*BlogPostUpdateOne) SetAuthorID

func (bpuo *BlogPostUpdateOne) SetAuthorID(id int) *BlogPostUpdateOne

SetAuthorID sets the "author" edge to the User entity by ID.

func (*BlogPostUpdateOne) SetBody

func (bpuo *BlogPostUpdateOne) SetBody(s string) *BlogPostUpdateOne

SetBody sets the "body" field.

func (*BlogPostUpdateOne) SetExternalID

func (bpuo *BlogPostUpdateOne) SetExternalID(i int) *BlogPostUpdateOne

SetExternalID sets the "external_id" field.

func (*BlogPostUpdateOne) SetNillableAuthorID

func (bpuo *BlogPostUpdateOne) SetNillableAuthorID(id *int) *BlogPostUpdateOne

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

func (*BlogPostUpdateOne) SetTitle

func (bpuo *BlogPostUpdateOne) SetTitle(s string) *BlogPostUpdateOne

SetTitle sets the "title" field.

type BlogPosts

type BlogPosts []*BlogPost

BlogPosts is a parsable slice of BlogPost.

type Categories

type Categories []*Category

Categories is a parsable slice of Category.

type Category

type Category struct {

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

Category is the model entity for the Category schema.

func (*Category) QueryBlogPosts

func (c *Category) QueryBlogPosts() *BlogPostQuery

QueryBlogPosts queries the "blog_posts" edge of the Category entity.

func (*Category) String

func (c *Category) String() string

String implements the fmt.Stringer.

func (*Category) Unwrap

func (c *Category) Unwrap() *Category

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

func (c *Category) Update() *CategoryUpdateOne

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

type CategoryClient

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

CategoryClient is a client for the Category schema.

func NewCategoryClient

func NewCategoryClient(c config) *CategoryClient

NewCategoryClient returns a client for the Category from the given config.

func (*CategoryClient) Create

func (c *CategoryClient) Create() *CategoryCreate

Create returns a builder for creating a Category entity.

func (*CategoryClient) CreateBulk

func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk

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

func (*CategoryClient) Delete

func (c *CategoryClient) Delete() *CategoryDelete

Delete returns a delete builder for Category.

func (*CategoryClient) DeleteOne

func (c *CategoryClient) DeleteOne(ca *Category) *CategoryDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CategoryClient) DeleteOneID

func (c *CategoryClient) DeleteOneID(id int) *CategoryDeleteOne

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

func (*CategoryClient) Get

func (c *CategoryClient) Get(ctx context.Context, id int) (*Category, error)

Get returns a Category entity by its id.

func (*CategoryClient) GetX

func (c *CategoryClient) GetX(ctx context.Context, id int) *Category

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

func (*CategoryClient) Hooks

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

Hooks returns the client hooks.

func (*CategoryClient) Intercept added in v0.3.5

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

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

func (*CategoryClient) Interceptors added in v0.3.5

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

Interceptors returns the client interceptors.

func (*CategoryClient) Query

func (c *CategoryClient) Query() *CategoryQuery

Query returns a query builder for Category.

func (*CategoryClient) QueryBlogPosts

func (c *CategoryClient) QueryBlogPosts(ca *Category) *BlogPostQuery

QueryBlogPosts queries the blog_posts edge of a Category.

func (*CategoryClient) Update

func (c *CategoryClient) Update() *CategoryUpdate

Update returns an update builder for Category.

func (*CategoryClient) UpdateOne

func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CategoryClient) UpdateOneID

func (c *CategoryClient) UpdateOneID(id int) *CategoryUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CategoryClient) Use

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

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

type CategoryCreate

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

CategoryCreate is the builder for creating a Category entity.

func (*CategoryCreate) AddBlogPostIDs

func (cc *CategoryCreate) AddBlogPostIDs(ids ...int) *CategoryCreate

AddBlogPostIDs adds the "blog_posts" edge to the BlogPost entity by IDs.

func (*CategoryCreate) AddBlogPosts

func (cc *CategoryCreate) AddBlogPosts(b ...*BlogPost) *CategoryCreate

AddBlogPosts adds the "blog_posts" edges to the BlogPost entity.

func (*CategoryCreate) Exec added in v0.2.0

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

Exec executes the query.

func (*CategoryCreate) ExecX added in v0.2.0

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

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

func (*CategoryCreate) Mutation

func (cc *CategoryCreate) Mutation() *CategoryMutation

Mutation returns the CategoryMutation object of the builder.

func (*CategoryCreate) Save

func (cc *CategoryCreate) Save(ctx context.Context) (*Category, error)

Save creates the Category in the database.

func (*CategoryCreate) SaveX

func (cc *CategoryCreate) SaveX(ctx context.Context) *Category

SaveX calls Save and panics if Save returns an error.

func (*CategoryCreate) SetDescription

func (cc *CategoryCreate) SetDescription(s string) *CategoryCreate

SetDescription sets the "description" field.

func (*CategoryCreate) SetName

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

SetName sets the "name" field.

type CategoryCreateBulk

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

CategoryCreateBulk is the builder for creating many Category entities in bulk.

func (*CategoryCreateBulk) Exec added in v0.2.0

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

Exec executes the query.

func (*CategoryCreateBulk) ExecX added in v0.2.0

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

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

func (*CategoryCreateBulk) Save

func (ccb *CategoryCreateBulk) Save(ctx context.Context) ([]*Category, error)

Save creates the Category entities in the database.

func (*CategoryCreateBulk) SaveX

func (ccb *CategoryCreateBulk) SaveX(ctx context.Context) []*Category

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

type CategoryDelete

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

CategoryDelete is the builder for deleting a Category entity.

func (*CategoryDelete) Exec

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

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

func (*CategoryDelete) ExecX

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

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

func (*CategoryDelete) Where

func (cd *CategoryDelete) Where(ps ...predicate.Category) *CategoryDelete

Where appends a list predicates to the CategoryDelete builder.

type CategoryDeleteOne

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

CategoryDeleteOne is the builder for deleting a single Category entity.

func (*CategoryDeleteOne) Exec

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

Exec executes the deletion query.

func (*CategoryDeleteOne) ExecX

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

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

type CategoryEdges

type CategoryEdges struct {
	// BlogPosts holds the value of the blog_posts edge.
	BlogPosts []*BlogPost `json:"blog_posts,omitempty"`
	// contains filtered or unexported fields
}

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

func (CategoryEdges) BlogPostsOrErr

func (e CategoryEdges) BlogPostsOrErr() ([]*BlogPost, error)

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

type CategoryGroupBy

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

CategoryGroupBy is the group-by builder for Category entities.

func (*CategoryGroupBy) Aggregate

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

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

func (*CategoryGroupBy) Bool

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

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

func (*CategoryGroupBy) BoolX

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

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

func (*CategoryGroupBy) Bools

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

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

func (*CategoryGroupBy) BoolsX

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

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

func (*CategoryGroupBy) Float64

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

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

func (*CategoryGroupBy) Float64X

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

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

func (*CategoryGroupBy) Float64s

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

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

func (*CategoryGroupBy) Float64sX

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

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

func (*CategoryGroupBy) Int

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

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

func (*CategoryGroupBy) IntX

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

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

func (*CategoryGroupBy) Ints

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

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

func (*CategoryGroupBy) IntsX

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

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

func (*CategoryGroupBy) Scan

func (cgb *CategoryGroupBy) Scan(ctx context.Context, v any) error

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

func (*CategoryGroupBy) ScanX

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

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

func (*CategoryGroupBy) String

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

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

func (*CategoryGroupBy) StringX

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

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

func (*CategoryGroupBy) Strings

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

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

func (*CategoryGroupBy) StringsX

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

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

type CategoryMutation

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

CategoryMutation represents an operation that mutates the Category nodes in the graph.

func (*CategoryMutation) AddBlogPostIDs

func (m *CategoryMutation) AddBlogPostIDs(ids ...int)

AddBlogPostIDs adds the "blog_posts" edge to the BlogPost entity by ids.

func (*CategoryMutation) AddField

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

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

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

func (*CategoryMutation) AddedField

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

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

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

func (*CategoryMutation) AddedIDs

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

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

func (*CategoryMutation) BlogPostsCleared

func (m *CategoryMutation) BlogPostsCleared() bool

BlogPostsCleared reports if the "blog_posts" edge to the BlogPost entity was cleared.

func (*CategoryMutation) BlogPostsIDs

func (m *CategoryMutation) BlogPostsIDs() (ids []int)

BlogPostsIDs returns the "blog_posts" edge IDs in the mutation.

func (*CategoryMutation) ClearBlogPosts

func (m *CategoryMutation) ClearBlogPosts()

ClearBlogPosts clears the "blog_posts" edge to the BlogPost entity.

func (*CategoryMutation) ClearEdge

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

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

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

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

func (*CategoryMutation) ClearedFields

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

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

func (CategoryMutation) Client

func (m CategoryMutation) 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 (*CategoryMutation) Description

func (m *CategoryMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*CategoryMutation) EdgeCleared

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

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

func (*CategoryMutation) Field

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

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

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

func (*CategoryMutation) Fields

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

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

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

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

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

func (*CategoryMutation) OldDescription

func (m *CategoryMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Category entity. If the Category 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 (*CategoryMutation) OldField

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

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

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

func (m *CategoryMutation) Op() Op

Op returns the operation name.

func (*CategoryMutation) RemoveBlogPostIDs

func (m *CategoryMutation) RemoveBlogPostIDs(ids ...int)

RemoveBlogPostIDs removes the "blog_posts" edge to the BlogPost entity by IDs.

func (*CategoryMutation) RemovedBlogPostsIDs

func (m *CategoryMutation) RemovedBlogPostsIDs() (ids []int)

RemovedBlogPosts returns the removed IDs of the "blog_posts" edge to the BlogPost entity.

func (*CategoryMutation) RemovedEdges

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

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

func (*CategoryMutation) RemovedIDs

func (m *CategoryMutation) 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 (*CategoryMutation) ResetBlogPosts

func (m *CategoryMutation) ResetBlogPosts()

ResetBlogPosts resets all changes to the "blog_posts" edge.

func (*CategoryMutation) ResetDescription

func (m *CategoryMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*CategoryMutation) ResetEdge

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

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

func (m *CategoryMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CategoryMutation) SetDescription

func (m *CategoryMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*CategoryMutation) SetField

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

func (m *CategoryMutation) SetName(s string)

SetName sets the "name" field.

func (*CategoryMutation) SetOp added in v0.3.5

func (m *CategoryMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (CategoryMutation) Tx

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

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

func (*CategoryMutation) Type

func (m *CategoryMutation) Type() string

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

func (*CategoryMutation) Where added in v0.2.0

func (m *CategoryMutation) Where(ps ...predicate.Category)

Where appends a list predicates to the CategoryMutation builder.

func (*CategoryMutation) WhereP added in v0.3.5

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

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

type CategoryQuery

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

CategoryQuery is the builder for querying Category entities.

func (*CategoryQuery) Aggregate added in v0.3.4

func (cq *CategoryQuery) Aggregate(fns ...AggregateFunc) *CategorySelect

Aggregate returns a CategorySelect configured with the given aggregations.

func (*CategoryQuery) All

func (cq *CategoryQuery) All(ctx context.Context) ([]*Category, error)

All executes the query and returns a list of Categories.

func (*CategoryQuery) AllX

func (cq *CategoryQuery) AllX(ctx context.Context) []*Category

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

func (*CategoryQuery) Clone

func (cq *CategoryQuery) Clone() *CategoryQuery

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

func (*CategoryQuery) Count

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

Count returns the count of the given query.

func (*CategoryQuery) CountX

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

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

func (*CategoryQuery) Exist

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

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

func (*CategoryQuery) ExistX

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

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

func (*CategoryQuery) First

func (cq *CategoryQuery) First(ctx context.Context) (*Category, error)

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

func (*CategoryQuery) FirstID

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

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

func (*CategoryQuery) FirstIDX

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

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

func (*CategoryQuery) FirstX

func (cq *CategoryQuery) FirstX(ctx context.Context) *Category

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

func (*CategoryQuery) GroupBy

func (cq *CategoryQuery) GroupBy(field string, fields ...string) *CategoryGroupBy

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

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Category.Query().
	GroupBy(category.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CategoryQuery) IDs

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

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

func (*CategoryQuery) IDsX

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

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

func (*CategoryQuery) Limit

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

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

func (*CategoryQuery) Offset

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

Offset to start from.

func (*CategoryQuery) Only

func (cq *CategoryQuery) Only(ctx context.Context) (*Category, error)

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

func (*CategoryQuery) OnlyID

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

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

func (*CategoryQuery) OnlyIDX

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

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

func (*CategoryQuery) OnlyX

func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category

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

func (*CategoryQuery) Order

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

Order specifies how the records should be ordered.

func (*CategoryQuery) QueryBlogPosts

func (cq *CategoryQuery) QueryBlogPosts() *BlogPostQuery

QueryBlogPosts chains the current query on the "blog_posts" edge.

func (*CategoryQuery) Select

func (cq *CategoryQuery) Select(fields ...string) *CategorySelect

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

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.Category.Query().
	Select(category.FieldName).
	Scan(ctx, &v)

func (*CategoryQuery) Unique

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

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

func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery

Where adds a new predicate for the CategoryQuery builder.

func (*CategoryQuery) WithBlogPosts

func (cq *CategoryQuery) WithBlogPosts(opts ...func(*BlogPostQuery)) *CategoryQuery

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

type CategorySelect

type CategorySelect struct {
	*CategoryQuery
	// contains filtered or unexported fields
}

CategorySelect is the builder for selecting fields of Category entities.

func (*CategorySelect) Aggregate added in v0.3.4

func (cs *CategorySelect) Aggregate(fns ...AggregateFunc) *CategorySelect

Aggregate adds the given aggregation functions to the selector query.

func (*CategorySelect) Bool

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

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

func (*CategorySelect) BoolX

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

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

func (*CategorySelect) Bools

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

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

func (*CategorySelect) BoolsX

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

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

func (*CategorySelect) Float64

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

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

func (*CategorySelect) Float64X

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

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

func (*CategorySelect) Float64s

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

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

func (*CategorySelect) Float64sX

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

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

func (*CategorySelect) Int

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

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

func (*CategorySelect) IntX

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

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

func (*CategorySelect) Ints

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

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

func (*CategorySelect) IntsX

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

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

func (*CategorySelect) Scan

func (cs *CategorySelect) Scan(ctx context.Context, v any) error

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

func (*CategorySelect) ScanX

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

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

func (*CategorySelect) String

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

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

func (*CategorySelect) StringX

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

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

func (*CategorySelect) Strings

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

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

func (*CategorySelect) StringsX

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

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

type CategoryUpdate

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

CategoryUpdate is the builder for updating Category entities.

func (*CategoryUpdate) AddBlogPostIDs

func (cu *CategoryUpdate) AddBlogPostIDs(ids ...int) *CategoryUpdate

AddBlogPostIDs adds the "blog_posts" edge to the BlogPost entity by IDs.

func (*CategoryUpdate) AddBlogPosts

func (cu *CategoryUpdate) AddBlogPosts(b ...*BlogPost) *CategoryUpdate

AddBlogPosts adds the "blog_posts" edges to the BlogPost entity.

func (*CategoryUpdate) ClearBlogPosts

func (cu *CategoryUpdate) ClearBlogPosts() *CategoryUpdate

ClearBlogPosts clears all "blog_posts" edges to the BlogPost entity.

func (*CategoryUpdate) Exec

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

Exec executes the query.

func (*CategoryUpdate) ExecX

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

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

func (*CategoryUpdate) Mutation

func (cu *CategoryUpdate) Mutation() *CategoryMutation

Mutation returns the CategoryMutation object of the builder.

func (*CategoryUpdate) RemoveBlogPostIDs

func (cu *CategoryUpdate) RemoveBlogPostIDs(ids ...int) *CategoryUpdate

RemoveBlogPostIDs removes the "blog_posts" edge to BlogPost entities by IDs.

func (*CategoryUpdate) RemoveBlogPosts

func (cu *CategoryUpdate) RemoveBlogPosts(b ...*BlogPost) *CategoryUpdate

RemoveBlogPosts removes "blog_posts" edges to BlogPost entities.

func (*CategoryUpdate) Save

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

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

func (*CategoryUpdate) SaveX

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

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

func (*CategoryUpdate) SetDescription

func (cu *CategoryUpdate) SetDescription(s string) *CategoryUpdate

SetDescription sets the "description" field.

func (*CategoryUpdate) SetName

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

SetName sets the "name" field.

func (*CategoryUpdate) Where

func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate

Where appends a list predicates to the CategoryUpdate builder.

type CategoryUpdateOne

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

CategoryUpdateOne is the builder for updating a single Category entity.

func (*CategoryUpdateOne) AddBlogPostIDs

func (cuo *CategoryUpdateOne) AddBlogPostIDs(ids ...int) *CategoryUpdateOne

AddBlogPostIDs adds the "blog_posts" edge to the BlogPost entity by IDs.

func (*CategoryUpdateOne) AddBlogPosts

func (cuo *CategoryUpdateOne) AddBlogPosts(b ...*BlogPost) *CategoryUpdateOne

AddBlogPosts adds the "blog_posts" edges to the BlogPost entity.

func (*CategoryUpdateOne) ClearBlogPosts

func (cuo *CategoryUpdateOne) ClearBlogPosts() *CategoryUpdateOne

ClearBlogPosts clears all "blog_posts" edges to the BlogPost entity.

func (*CategoryUpdateOne) Exec

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

Exec executes the query on the entity.

func (*CategoryUpdateOne) ExecX

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

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

func (*CategoryUpdateOne) Mutation

func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation

Mutation returns the CategoryMutation object of the builder.

func (*CategoryUpdateOne) RemoveBlogPostIDs

func (cuo *CategoryUpdateOne) RemoveBlogPostIDs(ids ...int) *CategoryUpdateOne

RemoveBlogPostIDs removes the "blog_posts" edge to BlogPost entities by IDs.

func (*CategoryUpdateOne) RemoveBlogPosts

func (cuo *CategoryUpdateOne) RemoveBlogPosts(b ...*BlogPost) *CategoryUpdateOne

RemoveBlogPosts removes "blog_posts" edges to BlogPost entities.

func (*CategoryUpdateOne) Save

func (cuo *CategoryUpdateOne) Save(ctx context.Context) (*Category, error)

Save executes the query and returns the updated Category entity.

func (*CategoryUpdateOne) SaveX

func (cuo *CategoryUpdateOne) SaveX(ctx context.Context) *Category

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

func (*CategoryUpdateOne) Select

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

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

func (*CategoryUpdateOne) SetDescription

func (cuo *CategoryUpdateOne) SetDescription(s string) *CategoryUpdateOne

SetDescription sets the "description" field.

func (*CategoryUpdateOne) SetName

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

SetName sets the "name" field.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// AllMethodsService is the client for interacting with the AllMethodsService builders.
	AllMethodsService *AllMethodsServiceClient
	// BlogPost is the client for interacting with the BlogPost builders.
	BlogPost *BlogPostClient
	// Category is the client for interacting with the Category builders.
	Category *CategoryClient
	// DependsOnSkipped is the client for interacting with the DependsOnSkipped builders.
	DependsOnSkipped *DependsOnSkippedClient
	// DuplicateNumberMessage is the client for interacting with the DuplicateNumberMessage builders.
	DuplicateNumberMessage *DuplicateNumberMessageClient
	// ExplicitSkippedMessage is the client for interacting with the ExplicitSkippedMessage builders.
	ExplicitSkippedMessage *ExplicitSkippedMessageClient
	// Image is the client for interacting with the Image builders.
	Image *ImageClient
	// ImplicitSkippedMessage is the client for interacting with the ImplicitSkippedMessage builders.
	ImplicitSkippedMessage *ImplicitSkippedMessageClient
	// InvalidFieldMessage is the client for interacting with the InvalidFieldMessage builders.
	InvalidFieldMessage *InvalidFieldMessageClient
	// MessageWithEnum is the client for interacting with the MessageWithEnum builders.
	MessageWithEnum *MessageWithEnumClient
	// MessageWithFieldOne is the client for interacting with the MessageWithFieldOne builders.
	MessageWithFieldOne *MessageWithFieldOneClient
	// MessageWithID is the client for interacting with the MessageWithID builders.
	MessageWithID *MessageWithIDClient
	// MessageWithOptionals is the client for interacting with the MessageWithOptionals builders.
	MessageWithOptionals *MessageWithOptionalsClient
	// MessageWithPackageName is the client for interacting with the MessageWithPackageName builders.
	MessageWithPackageName *MessageWithPackageNameClient
	// MessageWithStrings is the client for interacting with the MessageWithStrings builders.
	MessageWithStrings *MessageWithStringsClient
	// NoBackref is the client for interacting with the NoBackref builders.
	NoBackref *NoBackrefClient
	// OneMethodService is the client for interacting with the OneMethodService builders.
	OneMethodService *OneMethodServiceClient
	// Portal is the client for interacting with the Portal builders.
	Portal *PortalClient
	// SkipEdgeExample is the client for interacting with the SkipEdgeExample builders.
	SkipEdgeExample *SkipEdgeExampleClient
	// TwoMethodService is the client for interacting with the TwoMethodService builders.
	TwoMethodService *TwoMethodServiceClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// ValidMessage is the client for interacting with the ValidMessage builders.
	ValidMessage *ValidMessageClient
	// 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().
	AllMethodsService.
	Query().
	Count(ctx)

func (*Client) Intercept added in v0.3.5

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 added in v0.3.5

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 DependsOnSkipped

type DependsOnSkipped struct {

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

DependsOnSkipped is the model entity for the DependsOnSkipped schema.

func (*DependsOnSkipped) QuerySkipped

func (dos *DependsOnSkipped) QuerySkipped() *ImplicitSkippedMessageQuery

QuerySkipped queries the "skipped" edge of the DependsOnSkipped entity.

func (*DependsOnSkipped) String

func (dos *DependsOnSkipped) String() string

String implements the fmt.Stringer.

func (*DependsOnSkipped) Unwrap

func (dos *DependsOnSkipped) Unwrap() *DependsOnSkipped

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

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

type DependsOnSkippedClient

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

DependsOnSkippedClient is a client for the DependsOnSkipped schema.

func NewDependsOnSkippedClient

func NewDependsOnSkippedClient(c config) *DependsOnSkippedClient

NewDependsOnSkippedClient returns a client for the DependsOnSkipped from the given config.

func (*DependsOnSkippedClient) Create

Create returns a builder for creating a DependsOnSkipped entity.

func (*DependsOnSkippedClient) CreateBulk

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

func (*DependsOnSkippedClient) Delete

Delete returns a delete builder for DependsOnSkipped.

func (*DependsOnSkippedClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DependsOnSkippedClient) DeleteOneID

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

func (*DependsOnSkippedClient) Get

Get returns a DependsOnSkipped entity by its id.

func (*DependsOnSkippedClient) GetX

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

func (*DependsOnSkippedClient) Hooks

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

Hooks returns the client hooks.

func (*DependsOnSkippedClient) Intercept added in v0.3.5

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

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

func (*DependsOnSkippedClient) Interceptors added in v0.3.5

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

Interceptors returns the client interceptors.

func (*DependsOnSkippedClient) Query

Query returns a query builder for DependsOnSkipped.

func (*DependsOnSkippedClient) QuerySkipped

QuerySkipped queries the skipped edge of a DependsOnSkipped.

func (*DependsOnSkippedClient) Update

Update returns an update builder for DependsOnSkipped.

func (*DependsOnSkippedClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DependsOnSkippedClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DependsOnSkippedClient) Use

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

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

type DependsOnSkippedCreate

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

DependsOnSkippedCreate is the builder for creating a DependsOnSkipped entity.

func (*DependsOnSkippedCreate) AddSkipped

AddSkipped adds the "skipped" edges to the ImplicitSkippedMessage entity.

func (*DependsOnSkippedCreate) AddSkippedIDs

func (dosc *DependsOnSkippedCreate) AddSkippedIDs(ids ...int) *DependsOnSkippedCreate

AddSkippedIDs adds the "skipped" edge to the ImplicitSkippedMessage entity by IDs.

func (*DependsOnSkippedCreate) Exec added in v0.2.0

func (dosc *DependsOnSkippedCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DependsOnSkippedCreate) ExecX added in v0.2.0

func (dosc *DependsOnSkippedCreate) ExecX(ctx context.Context)

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

func (*DependsOnSkippedCreate) Mutation

Mutation returns the DependsOnSkippedMutation object of the builder.

func (*DependsOnSkippedCreate) Save

Save creates the DependsOnSkipped in the database.

func (*DependsOnSkippedCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DependsOnSkippedCreate) SetName

SetName sets the "name" field.

type DependsOnSkippedCreateBulk

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

DependsOnSkippedCreateBulk is the builder for creating many DependsOnSkipped entities in bulk.

func (*DependsOnSkippedCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*DependsOnSkippedCreateBulk) ExecX added in v0.2.0

func (doscb *DependsOnSkippedCreateBulk) ExecX(ctx context.Context)

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

func (*DependsOnSkippedCreateBulk) Save

Save creates the DependsOnSkipped entities in the database.

func (*DependsOnSkippedCreateBulk) SaveX

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

type DependsOnSkippedDelete

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

DependsOnSkippedDelete is the builder for deleting a DependsOnSkipped entity.

func (*DependsOnSkippedDelete) Exec

func (dosd *DependsOnSkippedDelete) Exec(ctx context.Context) (int, error)

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

func (*DependsOnSkippedDelete) ExecX

func (dosd *DependsOnSkippedDelete) ExecX(ctx context.Context) int

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

func (*DependsOnSkippedDelete) Where

Where appends a list predicates to the DependsOnSkippedDelete builder.

type DependsOnSkippedDeleteOne

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

DependsOnSkippedDeleteOne is the builder for deleting a single DependsOnSkipped entity.

func (*DependsOnSkippedDeleteOne) Exec

Exec executes the deletion query.

func (*DependsOnSkippedDeleteOne) ExecX

func (dosdo *DependsOnSkippedDeleteOne) ExecX(ctx context.Context)

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

type DependsOnSkippedEdges

type DependsOnSkippedEdges struct {
	// Skipped holds the value of the skipped edge.
	Skipped []*ImplicitSkippedMessage `json:"skipped,omitempty"`
	// contains filtered or unexported fields
}

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

func (DependsOnSkippedEdges) SkippedOrErr

func (e DependsOnSkippedEdges) SkippedOrErr() ([]*ImplicitSkippedMessage, error)

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

type DependsOnSkippedGroupBy

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

DependsOnSkippedGroupBy is the group-by builder for DependsOnSkipped entities.

func (*DependsOnSkippedGroupBy) Aggregate

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

func (*DependsOnSkippedGroupBy) Bool

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

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

func (*DependsOnSkippedGroupBy) BoolX

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

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

func (*DependsOnSkippedGroupBy) Bools

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

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

func (*DependsOnSkippedGroupBy) BoolsX

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

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

func (*DependsOnSkippedGroupBy) Float64

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

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

func (*DependsOnSkippedGroupBy) Float64X

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

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

func (*DependsOnSkippedGroupBy) Float64s

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

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

func (*DependsOnSkippedGroupBy) Float64sX

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

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

func (*DependsOnSkippedGroupBy) Int

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

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

func (*DependsOnSkippedGroupBy) IntX

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

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

func (*DependsOnSkippedGroupBy) Ints

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

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

func (*DependsOnSkippedGroupBy) IntsX

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

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

func (*DependsOnSkippedGroupBy) Scan

func (dosgb *DependsOnSkippedGroupBy) Scan(ctx context.Context, v any) error

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

func (*DependsOnSkippedGroupBy) ScanX

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

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

func (*DependsOnSkippedGroupBy) String

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

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

func (*DependsOnSkippedGroupBy) StringX

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

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

func (*DependsOnSkippedGroupBy) Strings

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

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

func (*DependsOnSkippedGroupBy) StringsX

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

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

type DependsOnSkippedMutation

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

DependsOnSkippedMutation represents an operation that mutates the DependsOnSkipped nodes in the graph.

func (*DependsOnSkippedMutation) AddField

func (m *DependsOnSkippedMutation) 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 (*DependsOnSkippedMutation) AddSkippedIDs

func (m *DependsOnSkippedMutation) AddSkippedIDs(ids ...int)

AddSkippedIDs adds the "skipped" edge to the ImplicitSkippedMessage entity by ids.

func (*DependsOnSkippedMutation) AddedEdges

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

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

func (*DependsOnSkippedMutation) AddedField

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

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

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

func (*DependsOnSkippedMutation) AddedIDs

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

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

func (*DependsOnSkippedMutation) ClearEdge

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

func (m *DependsOnSkippedMutation) 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 (*DependsOnSkippedMutation) ClearSkipped

func (m *DependsOnSkippedMutation) ClearSkipped()

ClearSkipped clears the "skipped" edge to the ImplicitSkippedMessage entity.

func (*DependsOnSkippedMutation) ClearedEdges

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

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

func (*DependsOnSkippedMutation) ClearedFields

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

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

func (DependsOnSkippedMutation) Client

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

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

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

func (*DependsOnSkippedMutation) Field

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

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

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

func (*DependsOnSkippedMutation) Fields

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

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

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 (*DependsOnSkippedMutation) Name

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

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

func (*DependsOnSkippedMutation) OldField

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

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

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

func (m *DependsOnSkippedMutation) Op() Op

Op returns the operation name.

func (*DependsOnSkippedMutation) RemoveSkippedIDs

func (m *DependsOnSkippedMutation) RemoveSkippedIDs(ids ...int)

RemoveSkippedIDs removes the "skipped" edge to the ImplicitSkippedMessage entity by IDs.

func (*DependsOnSkippedMutation) RemovedEdges

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

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

func (*DependsOnSkippedMutation) RemovedIDs

func (m *DependsOnSkippedMutation) 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 (*DependsOnSkippedMutation) RemovedSkippedIDs

func (m *DependsOnSkippedMutation) RemovedSkippedIDs() (ids []int)

RemovedSkipped returns the removed IDs of the "skipped" edge to the ImplicitSkippedMessage entity.

func (*DependsOnSkippedMutation) ResetEdge

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

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

func (m *DependsOnSkippedMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*DependsOnSkippedMutation) ResetSkipped

func (m *DependsOnSkippedMutation) ResetSkipped()

ResetSkipped resets all changes to the "skipped" edge.

func (*DependsOnSkippedMutation) SetField

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

func (m *DependsOnSkippedMutation) SetName(s string)

SetName sets the "name" field.

func (*DependsOnSkippedMutation) SetOp added in v0.3.5

func (m *DependsOnSkippedMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DependsOnSkippedMutation) SkippedCleared

func (m *DependsOnSkippedMutation) SkippedCleared() bool

SkippedCleared reports if the "skipped" edge to the ImplicitSkippedMessage entity was cleared.

func (*DependsOnSkippedMutation) SkippedIDs

func (m *DependsOnSkippedMutation) SkippedIDs() (ids []int)

SkippedIDs returns the "skipped" edge IDs in the mutation.

func (DependsOnSkippedMutation) Tx

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

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

func (*DependsOnSkippedMutation) Type

func (m *DependsOnSkippedMutation) Type() string

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

func (*DependsOnSkippedMutation) Where added in v0.2.0

Where appends a list predicates to the DependsOnSkippedMutation builder.

func (*DependsOnSkippedMutation) WhereP added in v0.3.5

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

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

type DependsOnSkippedQuery

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

DependsOnSkippedQuery is the builder for querying DependsOnSkipped entities.

func (*DependsOnSkippedQuery) Aggregate added in v0.3.4

Aggregate returns a DependsOnSkippedSelect configured with the given aggregations.

func (*DependsOnSkippedQuery) All

All executes the query and returns a list of DependsOnSkippeds.

func (*DependsOnSkippedQuery) AllX

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

func (*DependsOnSkippedQuery) Clone

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

func (*DependsOnSkippedQuery) Count

func (dosq *DependsOnSkippedQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DependsOnSkippedQuery) CountX

func (dosq *DependsOnSkippedQuery) CountX(ctx context.Context) int

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

func (*DependsOnSkippedQuery) Exist

func (dosq *DependsOnSkippedQuery) Exist(ctx context.Context) (bool, error)

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

func (*DependsOnSkippedQuery) ExistX

func (dosq *DependsOnSkippedQuery) ExistX(ctx context.Context) bool

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

func (*DependsOnSkippedQuery) First

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

func (*DependsOnSkippedQuery) FirstID

func (dosq *DependsOnSkippedQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*DependsOnSkippedQuery) FirstIDX

func (dosq *DependsOnSkippedQuery) FirstIDX(ctx context.Context) int

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

func (*DependsOnSkippedQuery) FirstX

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

func (*DependsOnSkippedQuery) GroupBy

func (dosq *DependsOnSkippedQuery) GroupBy(field string, fields ...string) *DependsOnSkippedGroupBy

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

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DependsOnSkipped.Query().
	GroupBy(dependsonskipped.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DependsOnSkippedQuery) IDs

func (dosq *DependsOnSkippedQuery) IDs(ctx context.Context) ([]int, error)

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

func (*DependsOnSkippedQuery) IDsX

func (dosq *DependsOnSkippedQuery) IDsX(ctx context.Context) []int

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

func (*DependsOnSkippedQuery) Limit

func (dosq *DependsOnSkippedQuery) Limit(limit int) *DependsOnSkippedQuery

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

func (*DependsOnSkippedQuery) Offset

func (dosq *DependsOnSkippedQuery) Offset(offset int) *DependsOnSkippedQuery

Offset to start from.

func (*DependsOnSkippedQuery) Only

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

func (*DependsOnSkippedQuery) OnlyID

func (dosq *DependsOnSkippedQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*DependsOnSkippedQuery) OnlyIDX

func (dosq *DependsOnSkippedQuery) OnlyIDX(ctx context.Context) int

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

func (*DependsOnSkippedQuery) OnlyX

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

func (*DependsOnSkippedQuery) Order

Order specifies how the records should be ordered.

func (*DependsOnSkippedQuery) QuerySkipped

func (dosq *DependsOnSkippedQuery) QuerySkipped() *ImplicitSkippedMessageQuery

QuerySkipped chains the current query on the "skipped" edge.

func (*DependsOnSkippedQuery) Select

func (dosq *DependsOnSkippedQuery) Select(fields ...string) *DependsOnSkippedSelect

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

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.DependsOnSkipped.Query().
	Select(dependsonskipped.FieldName).
	Scan(ctx, &v)

func (*DependsOnSkippedQuery) Unique

func (dosq *DependsOnSkippedQuery) Unique(unique bool) *DependsOnSkippedQuery

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

Where adds a new predicate for the DependsOnSkippedQuery builder.

func (*DependsOnSkippedQuery) WithSkipped

func (dosq *DependsOnSkippedQuery) WithSkipped(opts ...func(*ImplicitSkippedMessageQuery)) *DependsOnSkippedQuery

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

type DependsOnSkippedSelect

type DependsOnSkippedSelect struct {
	*DependsOnSkippedQuery
	// contains filtered or unexported fields
}

DependsOnSkippedSelect is the builder for selecting fields of DependsOnSkipped entities.

func (*DependsOnSkippedSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*DependsOnSkippedSelect) Bool

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

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

func (*DependsOnSkippedSelect) BoolX

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

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

func (*DependsOnSkippedSelect) Bools

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

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

func (*DependsOnSkippedSelect) BoolsX

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

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

func (*DependsOnSkippedSelect) Float64

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

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

func (*DependsOnSkippedSelect) Float64X

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

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

func (*DependsOnSkippedSelect) Float64s

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

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

func (*DependsOnSkippedSelect) Float64sX

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

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

func (*DependsOnSkippedSelect) Int

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

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

func (*DependsOnSkippedSelect) IntX

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

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

func (*DependsOnSkippedSelect) Ints

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

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

func (*DependsOnSkippedSelect) IntsX

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

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

func (*DependsOnSkippedSelect) Scan

func (doss *DependsOnSkippedSelect) Scan(ctx context.Context, v any) error

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

func (*DependsOnSkippedSelect) ScanX

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

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

func (*DependsOnSkippedSelect) String

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

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

func (*DependsOnSkippedSelect) StringX

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

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

func (*DependsOnSkippedSelect) Strings

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

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

func (*DependsOnSkippedSelect) StringsX

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

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

type DependsOnSkippedUpdate

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

DependsOnSkippedUpdate is the builder for updating DependsOnSkipped entities.

func (*DependsOnSkippedUpdate) AddSkipped

AddSkipped adds the "skipped" edges to the ImplicitSkippedMessage entity.

func (*DependsOnSkippedUpdate) AddSkippedIDs

func (dosu *DependsOnSkippedUpdate) AddSkippedIDs(ids ...int) *DependsOnSkippedUpdate

AddSkippedIDs adds the "skipped" edge to the ImplicitSkippedMessage entity by IDs.

func (*DependsOnSkippedUpdate) ClearSkipped

func (dosu *DependsOnSkippedUpdate) ClearSkipped() *DependsOnSkippedUpdate

ClearSkipped clears all "skipped" edges to the ImplicitSkippedMessage entity.

func (*DependsOnSkippedUpdate) Exec

func (dosu *DependsOnSkippedUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DependsOnSkippedUpdate) ExecX

func (dosu *DependsOnSkippedUpdate) ExecX(ctx context.Context)

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

func (*DependsOnSkippedUpdate) Mutation

Mutation returns the DependsOnSkippedMutation object of the builder.

func (*DependsOnSkippedUpdate) RemoveSkipped

RemoveSkipped removes "skipped" edges to ImplicitSkippedMessage entities.

func (*DependsOnSkippedUpdate) RemoveSkippedIDs

func (dosu *DependsOnSkippedUpdate) RemoveSkippedIDs(ids ...int) *DependsOnSkippedUpdate

RemoveSkippedIDs removes the "skipped" edge to ImplicitSkippedMessage entities by IDs.

func (*DependsOnSkippedUpdate) Save

func (dosu *DependsOnSkippedUpdate) Save(ctx context.Context) (int, error)

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

func (*DependsOnSkippedUpdate) SaveX

func (dosu *DependsOnSkippedUpdate) SaveX(ctx context.Context) int

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

func (*DependsOnSkippedUpdate) SetName

SetName sets the "name" field.

func (*DependsOnSkippedUpdate) Where

Where appends a list predicates to the DependsOnSkippedUpdate builder.

type DependsOnSkippedUpdateOne

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

DependsOnSkippedUpdateOne is the builder for updating a single DependsOnSkipped entity.

func (*DependsOnSkippedUpdateOne) AddSkipped

AddSkipped adds the "skipped" edges to the ImplicitSkippedMessage entity.

func (*DependsOnSkippedUpdateOne) AddSkippedIDs

func (dosuo *DependsOnSkippedUpdateOne) AddSkippedIDs(ids ...int) *DependsOnSkippedUpdateOne

AddSkippedIDs adds the "skipped" edge to the ImplicitSkippedMessage entity by IDs.

func (*DependsOnSkippedUpdateOne) ClearSkipped

ClearSkipped clears all "skipped" edges to the ImplicitSkippedMessage entity.

func (*DependsOnSkippedUpdateOne) Exec

Exec executes the query on the entity.

func (*DependsOnSkippedUpdateOne) ExecX

func (dosuo *DependsOnSkippedUpdateOne) ExecX(ctx context.Context)

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

func (*DependsOnSkippedUpdateOne) Mutation

Mutation returns the DependsOnSkippedMutation object of the builder.

func (*DependsOnSkippedUpdateOne) RemoveSkipped

RemoveSkipped removes "skipped" edges to ImplicitSkippedMessage entities.

func (*DependsOnSkippedUpdateOne) RemoveSkippedIDs

func (dosuo *DependsOnSkippedUpdateOne) RemoveSkippedIDs(ids ...int) *DependsOnSkippedUpdateOne

RemoveSkippedIDs removes the "skipped" edge to ImplicitSkippedMessage entities by IDs.

func (*DependsOnSkippedUpdateOne) Save

Save executes the query and returns the updated DependsOnSkipped entity.

func (*DependsOnSkippedUpdateOne) SaveX

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

func (*DependsOnSkippedUpdateOne) Select

func (dosuo *DependsOnSkippedUpdateOne) Select(field string, fields ...string) *DependsOnSkippedUpdateOne

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

func (*DependsOnSkippedUpdateOne) SetName

SetName sets the "name" field.

type DependsOnSkippeds

type DependsOnSkippeds []*DependsOnSkipped

DependsOnSkippeds is a parsable slice of DependsOnSkipped.

type DuplicateNumberMessage

type DuplicateNumberMessage struct {

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

DuplicateNumberMessage is the model entity for the DuplicateNumberMessage schema.

func (*DuplicateNumberMessage) String

func (dnm *DuplicateNumberMessage) String() string

String implements the fmt.Stringer.

func (*DuplicateNumberMessage) Unwrap

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

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

type DuplicateNumberMessageClient

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

DuplicateNumberMessageClient is a client for the DuplicateNumberMessage schema.

func NewDuplicateNumberMessageClient

func NewDuplicateNumberMessageClient(c config) *DuplicateNumberMessageClient

NewDuplicateNumberMessageClient returns a client for the DuplicateNumberMessage from the given config.

func (*DuplicateNumberMessageClient) Create

Create returns a builder for creating a DuplicateNumberMessage entity.

func (*DuplicateNumberMessageClient) CreateBulk

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

func (*DuplicateNumberMessageClient) Delete

Delete returns a delete builder for DuplicateNumberMessage.

func (*DuplicateNumberMessageClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DuplicateNumberMessageClient) DeleteOneID

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

func (*DuplicateNumberMessageClient) Get

Get returns a DuplicateNumberMessage entity by its id.

func (*DuplicateNumberMessageClient) GetX

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

func (*DuplicateNumberMessageClient) Hooks

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

Hooks returns the client hooks.

func (*DuplicateNumberMessageClient) Intercept added in v0.3.5

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

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

func (*DuplicateNumberMessageClient) Interceptors added in v0.3.5

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

Interceptors returns the client interceptors.

func (*DuplicateNumberMessageClient) Query

Query returns a query builder for DuplicateNumberMessage.

func (*DuplicateNumberMessageClient) Update

Update returns an update builder for DuplicateNumberMessage.

func (*DuplicateNumberMessageClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DuplicateNumberMessageClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DuplicateNumberMessageClient) Use

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

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

type DuplicateNumberMessageCreate

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

DuplicateNumberMessageCreate is the builder for creating a DuplicateNumberMessage entity.

func (*DuplicateNumberMessageCreate) Exec added in v0.2.0

Exec executes the query.

func (*DuplicateNumberMessageCreate) ExecX added in v0.2.0

func (dnmc *DuplicateNumberMessageCreate) ExecX(ctx context.Context)

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

func (*DuplicateNumberMessageCreate) Mutation

Mutation returns the DuplicateNumberMessageMutation object of the builder.

func (*DuplicateNumberMessageCreate) Save

Save creates the DuplicateNumberMessage in the database.

func (*DuplicateNumberMessageCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DuplicateNumberMessageCreate) SetHello

SetHello sets the "hello" field.

func (*DuplicateNumberMessageCreate) SetWorld

SetWorld sets the "world" field.

type DuplicateNumberMessageCreateBulk

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

DuplicateNumberMessageCreateBulk is the builder for creating many DuplicateNumberMessage entities in bulk.

func (*DuplicateNumberMessageCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*DuplicateNumberMessageCreateBulk) ExecX added in v0.2.0

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

func (*DuplicateNumberMessageCreateBulk) Save

Save creates the DuplicateNumberMessage entities in the database.

func (*DuplicateNumberMessageCreateBulk) SaveX

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

type DuplicateNumberMessageDelete

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

DuplicateNumberMessageDelete is the builder for deleting a DuplicateNumberMessage entity.

func (*DuplicateNumberMessageDelete) Exec

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

func (*DuplicateNumberMessageDelete) ExecX

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

func (*DuplicateNumberMessageDelete) Where

Where appends a list predicates to the DuplicateNumberMessageDelete builder.

type DuplicateNumberMessageDeleteOne

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

DuplicateNumberMessageDeleteOne is the builder for deleting a single DuplicateNumberMessage entity.

func (*DuplicateNumberMessageDeleteOne) Exec

Exec executes the deletion query.

func (*DuplicateNumberMessageDeleteOne) ExecX

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

type DuplicateNumberMessageGroupBy

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

DuplicateNumberMessageGroupBy is the group-by builder for DuplicateNumberMessage entities.

func (*DuplicateNumberMessageGroupBy) Aggregate

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

func (*DuplicateNumberMessageGroupBy) Bool

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

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

func (*DuplicateNumberMessageGroupBy) BoolX

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

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

func (*DuplicateNumberMessageGroupBy) Bools

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

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

func (*DuplicateNumberMessageGroupBy) BoolsX

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

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

func (*DuplicateNumberMessageGroupBy) Float64

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

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

func (*DuplicateNumberMessageGroupBy) Float64X

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

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

func (*DuplicateNumberMessageGroupBy) Float64s

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

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

func (*DuplicateNumberMessageGroupBy) Float64sX

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

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

func (*DuplicateNumberMessageGroupBy) Int

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

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

func (*DuplicateNumberMessageGroupBy) IntX

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

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

func (*DuplicateNumberMessageGroupBy) Ints

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

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

func (*DuplicateNumberMessageGroupBy) IntsX

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

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

func (*DuplicateNumberMessageGroupBy) Scan

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

func (*DuplicateNumberMessageGroupBy) ScanX

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

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

func (*DuplicateNumberMessageGroupBy) String

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

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

func (*DuplicateNumberMessageGroupBy) StringX

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

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

func (*DuplicateNumberMessageGroupBy) Strings

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

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

func (*DuplicateNumberMessageGroupBy) StringsX

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

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

type DuplicateNumberMessageMutation

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

DuplicateNumberMessageMutation represents an operation that mutates the DuplicateNumberMessage nodes in the graph.

func (*DuplicateNumberMessageMutation) AddField

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

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

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

func (*DuplicateNumberMessageMutation) AddedField

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

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

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

func (*DuplicateNumberMessageMutation) AddedIDs

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

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

func (*DuplicateNumberMessageMutation) ClearEdge

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

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

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

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

func (*DuplicateNumberMessageMutation) ClearedFields

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

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

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

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

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

func (*DuplicateNumberMessageMutation) Field

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

func (*DuplicateNumberMessageMutation) FieldCleared

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

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

func (*DuplicateNumberMessageMutation) Fields

func (m *DuplicateNumberMessageMutation) 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 (*DuplicateNumberMessageMutation) Hello

func (m *DuplicateNumberMessageMutation) Hello() (r string, exists bool)

Hello returns the value of the "hello" field in the mutation.

func (*DuplicateNumberMessageMutation) ID

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

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 (*DuplicateNumberMessageMutation) OldField

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DuplicateNumberMessageMutation) OldHello

func (m *DuplicateNumberMessageMutation) OldHello(ctx context.Context) (v string, err error)

OldHello returns the old "hello" field's value of the DuplicateNumberMessage entity. If the DuplicateNumberMessage 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 (*DuplicateNumberMessageMutation) OldWorld

func (m *DuplicateNumberMessageMutation) OldWorld(ctx context.Context) (v string, err error)

OldWorld returns the old "world" field's value of the DuplicateNumberMessage entity. If the DuplicateNumberMessage 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 (*DuplicateNumberMessageMutation) Op

Op returns the operation name.

func (*DuplicateNumberMessageMutation) RemovedEdges

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

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

func (*DuplicateNumberMessageMutation) RemovedIDs

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

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

func (m *DuplicateNumberMessageMutation) 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 (*DuplicateNumberMessageMutation) ResetHello

func (m *DuplicateNumberMessageMutation) ResetHello()

ResetHello resets all changes to the "hello" field.

func (*DuplicateNumberMessageMutation) ResetWorld

func (m *DuplicateNumberMessageMutation) ResetWorld()

ResetWorld resets all changes to the "world" field.

func (*DuplicateNumberMessageMutation) SetField

func (m *DuplicateNumberMessageMutation) 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 (*DuplicateNumberMessageMutation) SetHello

func (m *DuplicateNumberMessageMutation) SetHello(s string)

SetHello sets the "hello" field.

func (*DuplicateNumberMessageMutation) SetOp added in v0.3.5

func (m *DuplicateNumberMessageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DuplicateNumberMessageMutation) SetWorld

func (m *DuplicateNumberMessageMutation) SetWorld(s string)

SetWorld sets the "world" field.

func (DuplicateNumberMessageMutation) Tx

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

func (*DuplicateNumberMessageMutation) Type

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

func (*DuplicateNumberMessageMutation) Where added in v0.2.0

Where appends a list predicates to the DuplicateNumberMessageMutation builder.

func (*DuplicateNumberMessageMutation) WhereP added in v0.3.5

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

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

func (*DuplicateNumberMessageMutation) World

func (m *DuplicateNumberMessageMutation) World() (r string, exists bool)

World returns the value of the "world" field in the mutation.

type DuplicateNumberMessageQuery

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

DuplicateNumberMessageQuery is the builder for querying DuplicateNumberMessage entities.

func (*DuplicateNumberMessageQuery) Aggregate added in v0.3.4

Aggregate returns a DuplicateNumberMessageSelect configured with the given aggregations.

func (*DuplicateNumberMessageQuery) All

All executes the query and returns a list of DuplicateNumberMessages.

func (*DuplicateNumberMessageQuery) AllX

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

func (*DuplicateNumberMessageQuery) Clone

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

func (*DuplicateNumberMessageQuery) Count

func (dnmq *DuplicateNumberMessageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DuplicateNumberMessageQuery) CountX

func (dnmq *DuplicateNumberMessageQuery) CountX(ctx context.Context) int

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

func (*DuplicateNumberMessageQuery) Exist

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

func (*DuplicateNumberMessageQuery) ExistX

func (dnmq *DuplicateNumberMessageQuery) ExistX(ctx context.Context) bool

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

func (*DuplicateNumberMessageQuery) First

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

func (*DuplicateNumberMessageQuery) FirstID

func (dnmq *DuplicateNumberMessageQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*DuplicateNumberMessageQuery) FirstIDX

func (dnmq *DuplicateNumberMessageQuery) FirstIDX(ctx context.Context) int

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

func (*DuplicateNumberMessageQuery) FirstX

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

func (*DuplicateNumberMessageQuery) GroupBy

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

client.DuplicateNumberMessage.Query().
	GroupBy(duplicatenumbermessage.FieldHello).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DuplicateNumberMessageQuery) IDs

func (dnmq *DuplicateNumberMessageQuery) IDs(ctx context.Context) ([]int, error)

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

func (*DuplicateNumberMessageQuery) IDsX

func (dnmq *DuplicateNumberMessageQuery) IDsX(ctx context.Context) []int

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

func (*DuplicateNumberMessageQuery) Limit

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

func (*DuplicateNumberMessageQuery) Offset

Offset to start from.

func (*DuplicateNumberMessageQuery) Only

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

func (*DuplicateNumberMessageQuery) OnlyID

func (dnmq *DuplicateNumberMessageQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*DuplicateNumberMessageQuery) OnlyIDX

func (dnmq *DuplicateNumberMessageQuery) OnlyIDX(ctx context.Context) int

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

func (*DuplicateNumberMessageQuery) OnlyX

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

func (*DuplicateNumberMessageQuery) Order

Order specifies how the records should be ordered.

func (*DuplicateNumberMessageQuery) Select

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

Example:

var v []struct {
	Hello string `json:"hello,omitempty"`
}

client.DuplicateNumberMessage.Query().
	Select(duplicatenumbermessage.FieldHello).
	Scan(ctx, &v)

func (*DuplicateNumberMessageQuery) Unique

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

func (*DuplicateNumberMessageQuery) Where

Where adds a new predicate for the DuplicateNumberMessageQuery builder.

type DuplicateNumberMessageSelect

type DuplicateNumberMessageSelect struct {
	*DuplicateNumberMessageQuery
	// contains filtered or unexported fields
}

DuplicateNumberMessageSelect is the builder for selecting fields of DuplicateNumberMessage entities.

func (*DuplicateNumberMessageSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*DuplicateNumberMessageSelect) Bool

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

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

func (*DuplicateNumberMessageSelect) BoolX

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

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

func (*DuplicateNumberMessageSelect) Bools

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

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

func (*DuplicateNumberMessageSelect) BoolsX

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

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

func (*DuplicateNumberMessageSelect) Float64

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

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

func (*DuplicateNumberMessageSelect) Float64X

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

Float64X is like Float64, but panics if an error occurs.

func (*DuplicateNumberMessageSelect) Float64s

func (s *DuplicateNumberMessageSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DuplicateNumberMessageSelect) Float64sX

func (s *DuplicateNumberMessageSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DuplicateNumberMessageSelect) Int

func (s *DuplicateNumberMessageSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DuplicateNumberMessageSelect) IntX

func (s *DuplicateNumberMessageSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DuplicateNumberMessageSelect) Ints

func (s *DuplicateNumberMessageSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DuplicateNumberMessageSelect) IntsX

func (s *DuplicateNumberMessageSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DuplicateNumberMessageSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*DuplicateNumberMessageSelect) ScanX

func (s *DuplicateNumberMessageSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DuplicateNumberMessageSelect) String

func (s *DuplicateNumberMessageSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DuplicateNumberMessageSelect) StringX

func (s *DuplicateNumberMessageSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DuplicateNumberMessageSelect) Strings

func (s *DuplicateNumberMessageSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DuplicateNumberMessageSelect) StringsX

func (s *DuplicateNumberMessageSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DuplicateNumberMessageUpdate

type DuplicateNumberMessageUpdate struct {
	// contains filtered or unexported fields
}

DuplicateNumberMessageUpdate is the builder for updating DuplicateNumberMessage entities.

func (*DuplicateNumberMessageUpdate) Exec

Exec executes the query.

func (*DuplicateNumberMessageUpdate) ExecX

func (dnmu *DuplicateNumberMessageUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DuplicateNumberMessageUpdate) Mutation

Mutation returns the DuplicateNumberMessageMutation object of the builder.

func (*DuplicateNumberMessageUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*DuplicateNumberMessageUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DuplicateNumberMessageUpdate) SetHello

SetHello sets the "hello" field.

func (*DuplicateNumberMessageUpdate) SetWorld

SetWorld sets the "world" field.

func (*DuplicateNumberMessageUpdate) Where

Where appends a list predicates to the DuplicateNumberMessageUpdate builder.

type DuplicateNumberMessageUpdateOne

type DuplicateNumberMessageUpdateOne struct {
	// contains filtered or unexported fields
}

DuplicateNumberMessageUpdateOne is the builder for updating a single DuplicateNumberMessage entity.

func (*DuplicateNumberMessageUpdateOne) Exec

Exec executes the query on the entity.

func (*DuplicateNumberMessageUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DuplicateNumberMessageUpdateOne) Mutation

Mutation returns the DuplicateNumberMessageMutation object of the builder.

func (*DuplicateNumberMessageUpdateOne) Save

Save executes the query and returns the updated DuplicateNumberMessage entity.

func (*DuplicateNumberMessageUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DuplicateNumberMessageUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DuplicateNumberMessageUpdateOne) SetHello

SetHello sets the "hello" field.

func (*DuplicateNumberMessageUpdateOne) SetWorld

SetWorld sets the "world" field.

type DuplicateNumberMessages

type DuplicateNumberMessages []*DuplicateNumberMessage

DuplicateNumberMessages is a parsable slice of DuplicateNumberMessage.

type ExplicitSkippedMessage

type ExplicitSkippedMessage struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// contains filtered or unexported fields
}

ExplicitSkippedMessage is the model entity for the ExplicitSkippedMessage schema.

func (*ExplicitSkippedMessage) String

func (esm *ExplicitSkippedMessage) String() string

String implements the fmt.Stringer.

func (*ExplicitSkippedMessage) Unwrap

Unwrap unwraps the ExplicitSkippedMessage 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 (*ExplicitSkippedMessage) Update

Update returns a builder for updating this ExplicitSkippedMessage. Note that you need to call ExplicitSkippedMessage.Unwrap() before calling this method if this ExplicitSkippedMessage was returned from a transaction, and the transaction was committed or rolled back.

type ExplicitSkippedMessageClient

type ExplicitSkippedMessageClient struct {
	// contains filtered or unexported fields
}

ExplicitSkippedMessageClient is a client for the ExplicitSkippedMessage schema.

func NewExplicitSkippedMessageClient

func NewExplicitSkippedMessageClient(c config) *ExplicitSkippedMessageClient

NewExplicitSkippedMessageClient returns a client for the ExplicitSkippedMessage from the given config.

func (*ExplicitSkippedMessageClient) Create

Create returns a builder for creating a ExplicitSkippedMessage entity.

func (*ExplicitSkippedMessageClient) CreateBulk

CreateBulk returns a builder for creating a bulk of ExplicitSkippedMessage entities.

func (*ExplicitSkippedMessageClient) Delete

Delete returns a delete builder for ExplicitSkippedMessage.

func (*ExplicitSkippedMessageClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ExplicitSkippedMessageClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ExplicitSkippedMessageClient) Get

Get returns a ExplicitSkippedMessage entity by its id.

func (*ExplicitSkippedMessageClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ExplicitSkippedMessageClient) Hooks

func (c *ExplicitSkippedMessageClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ExplicitSkippedMessageClient) Intercept added in v0.3.5

func (c *ExplicitSkippedMessageClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `explicitskippedmessage.Intercept(f(g(h())))`.

func (*ExplicitSkippedMessageClient) Interceptors added in v0.3.5

func (c *ExplicitSkippedMessageClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ExplicitSkippedMessageClient) Query

Query returns a query builder for ExplicitSkippedMessage.

func (*ExplicitSkippedMessageClient) Update

Update returns an update builder for ExplicitSkippedMessage.

func (*ExplicitSkippedMessageClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ExplicitSkippedMessageClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ExplicitSkippedMessageClient) Use

func (c *ExplicitSkippedMessageClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `explicitskippedmessage.Hooks(f(g(h())))`.

type ExplicitSkippedMessageCreate

type ExplicitSkippedMessageCreate struct {
	// contains filtered or unexported fields
}

ExplicitSkippedMessageCreate is the builder for creating a ExplicitSkippedMessage entity.

func (*ExplicitSkippedMessageCreate) Exec added in v0.2.0

Exec executes the query.

func (*ExplicitSkippedMessageCreate) ExecX added in v0.2.0

func (esmc *ExplicitSkippedMessageCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExplicitSkippedMessageCreate) Mutation

Mutation returns the ExplicitSkippedMessageMutation object of the builder.

func (*ExplicitSkippedMessageCreate) Save

Save creates the ExplicitSkippedMessage in the database.

func (*ExplicitSkippedMessageCreate) SaveX

SaveX calls Save and panics if Save returns an error.

type ExplicitSkippedMessageCreateBulk

type ExplicitSkippedMessageCreateBulk struct {
	// contains filtered or unexported fields
}

ExplicitSkippedMessageCreateBulk is the builder for creating many ExplicitSkippedMessage entities in bulk.

func (*ExplicitSkippedMessageCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*ExplicitSkippedMessageCreateBulk) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*ExplicitSkippedMessageCreateBulk) Save

Save creates the ExplicitSkippedMessage entities in the database.

func (*ExplicitSkippedMessageCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type ExplicitSkippedMessageDelete

type ExplicitSkippedMessageDelete struct {
	// contains filtered or unexported fields
}

ExplicitSkippedMessageDelete is the builder for deleting a ExplicitSkippedMessage entity.

func (*ExplicitSkippedMessageDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*ExplicitSkippedMessageDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ExplicitSkippedMessageDelete) Where

Where appends a list predicates to the ExplicitSkippedMessageDelete builder.

type ExplicitSkippedMessageDeleteOne

type ExplicitSkippedMessageDeleteOne struct {
	// contains filtered or unexported fields
}

ExplicitSkippedMessageDeleteOne is the builder for deleting a single ExplicitSkippedMessage entity.

func (*ExplicitSkippedMessageDeleteOne) Exec

Exec executes the deletion query.

func (*ExplicitSkippedMessageDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

type ExplicitSkippedMessageGroupBy

type ExplicitSkippedMessageGroupBy struct {
	// contains filtered or unexported fields
}

ExplicitSkippedMessageGroupBy is the group-by builder for ExplicitSkippedMessage entities.

func (*ExplicitSkippedMessageGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*ExplicitSkippedMessageGroupBy) Bool

func (s *ExplicitSkippedMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageGroupBy) BoolX

func (s *ExplicitSkippedMessageGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ExplicitSkippedMessageGroupBy) Bools

func (s *ExplicitSkippedMessageGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageGroupBy) BoolsX

func (s *ExplicitSkippedMessageGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ExplicitSkippedMessageGroupBy) Float64

func (s *ExplicitSkippedMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageGroupBy) Float64X

func (s *ExplicitSkippedMessageGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ExplicitSkippedMessageGroupBy) Float64s

func (s *ExplicitSkippedMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageGroupBy) Float64sX

func (s *ExplicitSkippedMessageGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ExplicitSkippedMessageGroupBy) Int

func (s *ExplicitSkippedMessageGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageGroupBy) IntX

func (s *ExplicitSkippedMessageGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ExplicitSkippedMessageGroupBy) Ints

func (s *ExplicitSkippedMessageGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageGroupBy) IntsX

func (s *ExplicitSkippedMessageGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ExplicitSkippedMessageGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*ExplicitSkippedMessageGroupBy) ScanX

func (s *ExplicitSkippedMessageGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ExplicitSkippedMessageGroupBy) String

func (s *ExplicitSkippedMessageGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageGroupBy) StringX

func (s *ExplicitSkippedMessageGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ExplicitSkippedMessageGroupBy) Strings

func (s *ExplicitSkippedMessageGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageGroupBy) StringsX

func (s *ExplicitSkippedMessageGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ExplicitSkippedMessageMutation

type ExplicitSkippedMessageMutation struct {
	// contains filtered or unexported fields
}

ExplicitSkippedMessageMutation represents an operation that mutates the ExplicitSkippedMessage nodes in the graph.

func (*ExplicitSkippedMessageMutation) AddField

func (m *ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) AddedEdges

func (m *ExplicitSkippedMessageMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ExplicitSkippedMessageMutation) AddedField

func (m *ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) AddedFields

func (m *ExplicitSkippedMessageMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ExplicitSkippedMessageMutation) AddedIDs

func (m *ExplicitSkippedMessageMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ExplicitSkippedMessageMutation) ClearEdge

func (m *ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) ClearField

func (m *ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) ClearedEdges

func (m *ExplicitSkippedMessageMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ExplicitSkippedMessageMutation) ClearedFields

func (m *ExplicitSkippedMessageMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) EdgeCleared

func (m *ExplicitSkippedMessageMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ExplicitSkippedMessageMutation) Field

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ExplicitSkippedMessageMutation) FieldCleared

func (m *ExplicitSkippedMessageMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ExplicitSkippedMessageMutation) Fields

func (m *ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) ID

func (m *ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) IDs added in v0.3.0

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 (*ExplicitSkippedMessageMutation) OldField

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ExplicitSkippedMessageMutation) Op

Op returns the operation name.

func (*ExplicitSkippedMessageMutation) RemovedEdges

func (m *ExplicitSkippedMessageMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ExplicitSkippedMessageMutation) RemovedIDs

func (m *ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) ResetEdge

func (m *ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) ResetField

func (m *ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) SetField

func (m *ExplicitSkippedMessageMutation) 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 (*ExplicitSkippedMessageMutation) SetOp added in v0.3.5

func (m *ExplicitSkippedMessageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (ExplicitSkippedMessageMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ExplicitSkippedMessageMutation) Type

Type returns the node type of this mutation (ExplicitSkippedMessage).

func (*ExplicitSkippedMessageMutation) Where added in v0.2.0

Where appends a list predicates to the ExplicitSkippedMessageMutation builder.

func (*ExplicitSkippedMessageMutation) WhereP added in v0.3.5

func (m *ExplicitSkippedMessageMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ExplicitSkippedMessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ExplicitSkippedMessageQuery

type ExplicitSkippedMessageQuery struct {
	// contains filtered or unexported fields
}

ExplicitSkippedMessageQuery is the builder for querying ExplicitSkippedMessage entities.

func (*ExplicitSkippedMessageQuery) Aggregate added in v0.3.4

Aggregate returns a ExplicitSkippedMessageSelect configured with the given aggregations.

func (*ExplicitSkippedMessageQuery) All

All executes the query and returns a list of ExplicitSkippedMessages.

func (*ExplicitSkippedMessageQuery) AllX

AllX is like All, but panics if an error occurs.

func (*ExplicitSkippedMessageQuery) Clone

Clone returns a duplicate of the ExplicitSkippedMessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ExplicitSkippedMessageQuery) Count

func (esmq *ExplicitSkippedMessageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ExplicitSkippedMessageQuery) CountX

func (esmq *ExplicitSkippedMessageQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ExplicitSkippedMessageQuery) Exist

Exist returns true if the query has elements in the graph.

func (*ExplicitSkippedMessageQuery) ExistX

func (esmq *ExplicitSkippedMessageQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ExplicitSkippedMessageQuery) First

First returns the first ExplicitSkippedMessage entity from the query. Returns a *NotFoundError when no ExplicitSkippedMessage was found.

func (*ExplicitSkippedMessageQuery) FirstID

func (esmq *ExplicitSkippedMessageQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first ExplicitSkippedMessage ID from the query. Returns a *NotFoundError when no ExplicitSkippedMessage ID was found.

func (*ExplicitSkippedMessageQuery) FirstIDX

func (esmq *ExplicitSkippedMessageQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ExplicitSkippedMessageQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*ExplicitSkippedMessageQuery) GroupBy

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 (*ExplicitSkippedMessageQuery) IDs

func (esmq *ExplicitSkippedMessageQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of ExplicitSkippedMessage IDs.

func (*ExplicitSkippedMessageQuery) IDsX

func (esmq *ExplicitSkippedMessageQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ExplicitSkippedMessageQuery) Limit

Limit the number of records to be returned by this query.

func (*ExplicitSkippedMessageQuery) Offset

Offset to start from.

func (*ExplicitSkippedMessageQuery) Only

Only returns a single ExplicitSkippedMessage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ExplicitSkippedMessage entity is found. Returns a *NotFoundError when no ExplicitSkippedMessage entities are found.

func (*ExplicitSkippedMessageQuery) OnlyID

func (esmq *ExplicitSkippedMessageQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only ExplicitSkippedMessage ID in the query. Returns a *NotSingularError when more than one ExplicitSkippedMessage ID is found. Returns a *NotFoundError when no entities are found.

func (*ExplicitSkippedMessageQuery) OnlyIDX

func (esmq *ExplicitSkippedMessageQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ExplicitSkippedMessageQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ExplicitSkippedMessageQuery) Order

Order specifies how the records should be ordered.

func (*ExplicitSkippedMessageQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*ExplicitSkippedMessageQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ExplicitSkippedMessageQuery) Where

Where adds a new predicate for the ExplicitSkippedMessageQuery builder.

type ExplicitSkippedMessageSelect

type ExplicitSkippedMessageSelect struct {
	*ExplicitSkippedMessageQuery
	// contains filtered or unexported fields
}

ExplicitSkippedMessageSelect is the builder for selecting fields of ExplicitSkippedMessage entities.

func (*ExplicitSkippedMessageSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*ExplicitSkippedMessageSelect) Bool

func (s *ExplicitSkippedMessageSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageSelect) BoolX

func (s *ExplicitSkippedMessageSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ExplicitSkippedMessageSelect) Bools

func (s *ExplicitSkippedMessageSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageSelect) BoolsX

func (s *ExplicitSkippedMessageSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ExplicitSkippedMessageSelect) Float64

func (s *ExplicitSkippedMessageSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageSelect) Float64X

func (s *ExplicitSkippedMessageSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ExplicitSkippedMessageSelect) Float64s

func (s *ExplicitSkippedMessageSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageSelect) Float64sX

func (s *ExplicitSkippedMessageSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ExplicitSkippedMessageSelect) Int

func (s *ExplicitSkippedMessageSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageSelect) IntX

func (s *ExplicitSkippedMessageSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ExplicitSkippedMessageSelect) Ints

func (s *ExplicitSkippedMessageSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageSelect) IntsX

func (s *ExplicitSkippedMessageSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ExplicitSkippedMessageSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*ExplicitSkippedMessageSelect) ScanX

func (s *ExplicitSkippedMessageSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ExplicitSkippedMessageSelect) String

func (s *ExplicitSkippedMessageSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageSelect) StringX

func (s *ExplicitSkippedMessageSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ExplicitSkippedMessageSelect) Strings

func (s *ExplicitSkippedMessageSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ExplicitSkippedMessageSelect) StringsX

func (s *ExplicitSkippedMessageSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ExplicitSkippedMessageUpdate

type ExplicitSkippedMessageUpdate struct {
	// contains filtered or unexported fields
}

ExplicitSkippedMessageUpdate is the builder for updating ExplicitSkippedMessage entities.

func (*ExplicitSkippedMessageUpdate) Exec

Exec executes the query.

func (*ExplicitSkippedMessageUpdate) ExecX

func (esmu *ExplicitSkippedMessageUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ExplicitSkippedMessageUpdate) Mutation

Mutation returns the ExplicitSkippedMessageMutation object of the builder.

func (*ExplicitSkippedMessageUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*ExplicitSkippedMessageUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ExplicitSkippedMessageUpdate) Where

Where appends a list predicates to the ExplicitSkippedMessageUpdate builder.

type ExplicitSkippedMessageUpdateOne

type ExplicitSkippedMessageUpdateOne struct {
	// contains filtered or unexported fields
}

ExplicitSkippedMessageUpdateOne is the builder for updating a single ExplicitSkippedMessage entity.

func (*ExplicitSkippedMessageUpdateOne) Exec

Exec executes the query on the entity.

func (*ExplicitSkippedMessageUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ExplicitSkippedMessageUpdateOne) Mutation

Mutation returns the ExplicitSkippedMessageMutation object of the builder.

func (*ExplicitSkippedMessageUpdateOne) Save

Save executes the query and returns the updated ExplicitSkippedMessage entity.

func (*ExplicitSkippedMessageUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ExplicitSkippedMessageUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

type ExplicitSkippedMessages

type ExplicitSkippedMessages []*ExplicitSkippedMessage

ExplicitSkippedMessages is a parsable slice of ExplicitSkippedMessage.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type Image

type Image struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// URLPath holds the value of the "url_path" field.
	URLPath string `json:"url_path,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ImageQuery when eager-loading is set.
	Edges ImageEdges `json:"edges"`
	// contains filtered or unexported fields
}

Image is the model entity for the Image schema.

func (*Image) QueryUserProfilePic

func (i *Image) QueryUserProfilePic() *UserQuery

QueryUserProfilePic queries the "user_profile_pic" edge of the Image entity.

func (*Image) String

func (i *Image) String() string

String implements the fmt.Stringer.

func (*Image) Unwrap

func (i *Image) Unwrap() *Image

Unwrap unwraps the Image 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 (*Image) Update

func (i *Image) Update() *ImageUpdateOne

Update returns a builder for updating this Image. Note that you need to call Image.Unwrap() before calling this method if this Image was returned from a transaction, and the transaction was committed or rolled back.

type ImageClient

type ImageClient struct {
	// contains filtered or unexported fields
}

ImageClient is a client for the Image schema.

func NewImageClient

func NewImageClient(c config) *ImageClient

NewImageClient returns a client for the Image from the given config.

func (*ImageClient) Create

func (c *ImageClient) Create() *ImageCreate

Create returns a builder for creating a Image entity.

func (*ImageClient) CreateBulk

func (c *ImageClient) CreateBulk(builders ...*ImageCreate) *ImageCreateBulk

CreateBulk returns a builder for creating a bulk of Image entities.

func (*ImageClient) Delete

func (c *ImageClient) Delete() *ImageDelete

Delete returns a delete builder for Image.

func (*ImageClient) DeleteOne

func (c *ImageClient) DeleteOne(i *Image) *ImageDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ImageClient) DeleteOneID

func (c *ImageClient) DeleteOneID(id uuid.UUID) *ImageDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ImageClient) Get

func (c *ImageClient) Get(ctx context.Context, id uuid.UUID) (*Image, error)

Get returns a Image entity by its id.

func (*ImageClient) GetX

func (c *ImageClient) GetX(ctx context.Context, id uuid.UUID) *Image

GetX is like Get, but panics if an error occurs.

func (*ImageClient) Hooks

func (c *ImageClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ImageClient) Intercept added in v0.3.5

func (c *ImageClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `image.Intercept(f(g(h())))`.

func (*ImageClient) Interceptors added in v0.3.5

func (c *ImageClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ImageClient) Query

func (c *ImageClient) Query() *ImageQuery

Query returns a query builder for Image.

func (*ImageClient) QueryUserProfilePic

func (c *ImageClient) QueryUserProfilePic(i *Image) *UserQuery

QueryUserProfilePic queries the user_profile_pic edge of a Image.

func (*ImageClient) Update

func (c *ImageClient) Update() *ImageUpdate

Update returns an update builder for Image.

func (*ImageClient) UpdateOne

func (c *ImageClient) UpdateOne(i *Image) *ImageUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ImageClient) UpdateOneID

func (c *ImageClient) UpdateOneID(id uuid.UUID) *ImageUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ImageClient) Use

func (c *ImageClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `image.Hooks(f(g(h())))`.

type ImageCreate

type ImageCreate struct {
	// contains filtered or unexported fields
}

ImageCreate is the builder for creating a Image entity.

func (*ImageCreate) AddUserProfilePic

func (ic *ImageCreate) AddUserProfilePic(u ...*User) *ImageCreate

AddUserProfilePic adds the "user_profile_pic" edges to the User entity.

func (*ImageCreate) AddUserProfilePicIDs

func (ic *ImageCreate) AddUserProfilePicIDs(ids ...int) *ImageCreate

AddUserProfilePicIDs adds the "user_profile_pic" edge to the User entity by IDs.

func (*ImageCreate) Exec added in v0.2.0

func (ic *ImageCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ImageCreate) ExecX added in v0.2.0

func (ic *ImageCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImageCreate) Mutation

func (ic *ImageCreate) Mutation() *ImageMutation

Mutation returns the ImageMutation object of the builder.

func (*ImageCreate) Save

func (ic *ImageCreate) Save(ctx context.Context) (*Image, error)

Save creates the Image in the database.

func (*ImageCreate) SaveX

func (ic *ImageCreate) SaveX(ctx context.Context) *Image

SaveX calls Save and panics if Save returns an error.

func (*ImageCreate) SetID

func (ic *ImageCreate) SetID(u uuid.UUID) *ImageCreate

SetID sets the "id" field.

func (*ImageCreate) SetURLPath

func (ic *ImageCreate) SetURLPath(s string) *ImageCreate

SetURLPath sets the "url_path" field.

type ImageCreateBulk

type ImageCreateBulk struct {
	// contains filtered or unexported fields
}

ImageCreateBulk is the builder for creating many Image entities in bulk.

func (*ImageCreateBulk) Exec added in v0.2.0

func (icb *ImageCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ImageCreateBulk) ExecX added in v0.2.0

func (icb *ImageCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImageCreateBulk) Save

func (icb *ImageCreateBulk) Save(ctx context.Context) ([]*Image, error)

Save creates the Image entities in the database.

func (*ImageCreateBulk) SaveX

func (icb *ImageCreateBulk) SaveX(ctx context.Context) []*Image

SaveX is like Save, but panics if an error occurs.

type ImageDelete

type ImageDelete struct {
	// contains filtered or unexported fields
}

ImageDelete is the builder for deleting a Image entity.

func (*ImageDelete) Exec

func (id *ImageDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ImageDelete) ExecX

func (id *ImageDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ImageDelete) Where

func (id *ImageDelete) Where(ps ...predicate.Image) *ImageDelete

Where appends a list predicates to the ImageDelete builder.

type ImageDeleteOne

type ImageDeleteOne struct {
	// contains filtered or unexported fields
}

ImageDeleteOne is the builder for deleting a single Image entity.

func (*ImageDeleteOne) Exec

func (ido *ImageDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ImageDeleteOne) ExecX

func (ido *ImageDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ImageEdges

type ImageEdges struct {
	// UserProfilePic holds the value of the user_profile_pic edge.
	UserProfilePic []*User `json:"user_profile_pic,omitempty"`
	// contains filtered or unexported fields
}

ImageEdges holds the relations/edges for other nodes in the graph.

func (ImageEdges) UserProfilePicOrErr

func (e ImageEdges) UserProfilePicOrErr() ([]*User, error)

UserProfilePicOrErr returns the UserProfilePic value or an error if the edge was not loaded in eager-loading.

type ImageGroupBy

type ImageGroupBy struct {
	// contains filtered or unexported fields
}

ImageGroupBy is the group-by builder for Image entities.

func (*ImageGroupBy) Aggregate

func (igb *ImageGroupBy) Aggregate(fns ...AggregateFunc) *ImageGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ImageGroupBy) Bool

func (s *ImageGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ImageGroupBy) BoolX

func (s *ImageGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ImageGroupBy) Bools

func (s *ImageGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ImageGroupBy) BoolsX

func (s *ImageGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ImageGroupBy) Float64

func (s *ImageGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ImageGroupBy) Float64X

func (s *ImageGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ImageGroupBy) Float64s

func (s *ImageGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ImageGroupBy) Float64sX

func (s *ImageGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ImageGroupBy) Int

func (s *ImageGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ImageGroupBy) IntX

func (s *ImageGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ImageGroupBy) Ints

func (s *ImageGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ImageGroupBy) IntsX

func (s *ImageGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ImageGroupBy) Scan

func (igb *ImageGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ImageGroupBy) ScanX

func (s *ImageGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ImageGroupBy) String

func (s *ImageGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ImageGroupBy) StringX

func (s *ImageGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ImageGroupBy) Strings

func (s *ImageGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ImageGroupBy) StringsX

func (s *ImageGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ImageMutation

type ImageMutation struct {
	// contains filtered or unexported fields
}

ImageMutation represents an operation that mutates the Image nodes in the graph.

func (*ImageMutation) AddField

func (m *ImageMutation) 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 (*ImageMutation) AddUserProfilePicIDs

func (m *ImageMutation) AddUserProfilePicIDs(ids ...int)

AddUserProfilePicIDs adds the "user_profile_pic" edge to the User entity by ids.

func (*ImageMutation) AddedEdges

func (m *ImageMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ImageMutation) AddedField

func (m *ImageMutation) 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 (*ImageMutation) AddedFields

func (m *ImageMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ImageMutation) AddedIDs

func (m *ImageMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ImageMutation) ClearEdge

func (m *ImageMutation) 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 (*ImageMutation) ClearField

func (m *ImageMutation) 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 (*ImageMutation) ClearUserProfilePic

func (m *ImageMutation) ClearUserProfilePic()

ClearUserProfilePic clears the "user_profile_pic" edge to the User entity.

func (*ImageMutation) ClearedEdges

func (m *ImageMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ImageMutation) ClearedFields

func (m *ImageMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ImageMutation) Client

func (m ImageMutation) 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 (*ImageMutation) EdgeCleared

func (m *ImageMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ImageMutation) Field

func (m *ImageMutation) 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 (*ImageMutation) FieldCleared

func (m *ImageMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ImageMutation) Fields

func (m *ImageMutation) 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 (*ImageMutation) ID

func (m *ImageMutation) ID() (id uuid.UUID, 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 (*ImageMutation) IDs added in v0.3.0

func (m *ImageMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*ImageMutation) OldField

func (m *ImageMutation) 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 (*ImageMutation) OldURLPath

func (m *ImageMutation) OldURLPath(ctx context.Context) (v string, err error)

OldURLPath returns the old "url_path" field's value of the Image entity. If the Image 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 (*ImageMutation) Op

func (m *ImageMutation) Op() Op

Op returns the operation name.

func (*ImageMutation) RemoveUserProfilePicIDs

func (m *ImageMutation) RemoveUserProfilePicIDs(ids ...int)

RemoveUserProfilePicIDs removes the "user_profile_pic" edge to the User entity by IDs.

func (*ImageMutation) RemovedEdges

func (m *ImageMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ImageMutation) RemovedIDs

func (m *ImageMutation) 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 (*ImageMutation) RemovedUserProfilePicIDs

func (m *ImageMutation) RemovedUserProfilePicIDs() (ids []int)

RemovedUserProfilePic returns the removed IDs of the "user_profile_pic" edge to the User entity.

func (*ImageMutation) ResetEdge

func (m *ImageMutation) 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 (*ImageMutation) ResetField

func (m *ImageMutation) 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 (*ImageMutation) ResetURLPath

func (m *ImageMutation) ResetURLPath()

ResetURLPath resets all changes to the "url_path" field.

func (*ImageMutation) ResetUserProfilePic

func (m *ImageMutation) ResetUserProfilePic()

ResetUserProfilePic resets all changes to the "user_profile_pic" edge.

func (*ImageMutation) SetField

func (m *ImageMutation) 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 (*ImageMutation) SetID

func (m *ImageMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Image entities.

func (*ImageMutation) SetOp added in v0.3.5

func (m *ImageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ImageMutation) SetURLPath

func (m *ImageMutation) SetURLPath(s string)

SetURLPath sets the "url_path" field.

func (ImageMutation) Tx

func (m ImageMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ImageMutation) Type

func (m *ImageMutation) Type() string

Type returns the node type of this mutation (Image).

func (*ImageMutation) URLPath

func (m *ImageMutation) URLPath() (r string, exists bool)

URLPath returns the value of the "url_path" field in the mutation.

func (*ImageMutation) UserProfilePicCleared

func (m *ImageMutation) UserProfilePicCleared() bool

UserProfilePicCleared reports if the "user_profile_pic" edge to the User entity was cleared.

func (*ImageMutation) UserProfilePicIDs

func (m *ImageMutation) UserProfilePicIDs() (ids []int)

UserProfilePicIDs returns the "user_profile_pic" edge IDs in the mutation.

func (*ImageMutation) Where added in v0.2.0

func (m *ImageMutation) Where(ps ...predicate.Image)

Where appends a list predicates to the ImageMutation builder.

func (*ImageMutation) WhereP added in v0.3.5

func (m *ImageMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ImageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ImageQuery

type ImageQuery struct {
	// contains filtered or unexported fields
}

ImageQuery is the builder for querying Image entities.

func (*ImageQuery) Aggregate added in v0.3.4

func (iq *ImageQuery) Aggregate(fns ...AggregateFunc) *ImageSelect

Aggregate returns a ImageSelect configured with the given aggregations.

func (*ImageQuery) All

func (iq *ImageQuery) All(ctx context.Context) ([]*Image, error)

All executes the query and returns a list of Images.

func (*ImageQuery) AllX

func (iq *ImageQuery) AllX(ctx context.Context) []*Image

AllX is like All, but panics if an error occurs.

func (*ImageQuery) Clone

func (iq *ImageQuery) Clone() *ImageQuery

Clone returns a duplicate of the ImageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ImageQuery) Count

func (iq *ImageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ImageQuery) CountX

func (iq *ImageQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ImageQuery) Exist

func (iq *ImageQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ImageQuery) ExistX

func (iq *ImageQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ImageQuery) First

func (iq *ImageQuery) First(ctx context.Context) (*Image, error)

First returns the first Image entity from the query. Returns a *NotFoundError when no Image was found.

func (*ImageQuery) FirstID

func (iq *ImageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Image ID from the query. Returns a *NotFoundError when no Image ID was found.

func (*ImageQuery) FirstIDX

func (iq *ImageQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ImageQuery) FirstX

func (iq *ImageQuery) FirstX(ctx context.Context) *Image

FirstX is like First, but panics if an error occurs.

func (*ImageQuery) GroupBy

func (iq *ImageQuery) GroupBy(field string, fields ...string) *ImageGroupBy

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 {
	URLPath string `json:"url_path,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Image.Query().
	GroupBy(image.FieldURLPath).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ImageQuery) IDs

func (iq *ImageQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Image IDs.

func (*ImageQuery) IDsX

func (iq *ImageQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ImageQuery) Limit

func (iq *ImageQuery) Limit(limit int) *ImageQuery

Limit the number of records to be returned by this query.

func (*ImageQuery) Offset

func (iq *ImageQuery) Offset(offset int) *ImageQuery

Offset to start from.

func (*ImageQuery) Only

func (iq *ImageQuery) Only(ctx context.Context) (*Image, error)

Only returns a single Image entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Image entity is found. Returns a *NotFoundError when no Image entities are found.

func (*ImageQuery) OnlyID

func (iq *ImageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Image ID in the query. Returns a *NotSingularError when more than one Image ID is found. Returns a *NotFoundError when no entities are found.

func (*ImageQuery) OnlyIDX

func (iq *ImageQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ImageQuery) OnlyX

func (iq *ImageQuery) OnlyX(ctx context.Context) *Image

OnlyX is like Only, but panics if an error occurs.

func (*ImageQuery) Order

func (iq *ImageQuery) Order(o ...OrderFunc) *ImageQuery

Order specifies how the records should be ordered.

func (*ImageQuery) QueryUserProfilePic

func (iq *ImageQuery) QueryUserProfilePic() *UserQuery

QueryUserProfilePic chains the current query on the "user_profile_pic" edge.

func (*ImageQuery) Select

func (iq *ImageQuery) Select(fields ...string) *ImageSelect

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 {
	URLPath string `json:"url_path,omitempty"`
}

client.Image.Query().
	Select(image.FieldURLPath).
	Scan(ctx, &v)

func (*ImageQuery) Unique

func (iq *ImageQuery) Unique(unique bool) *ImageQuery

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 (*ImageQuery) Where

func (iq *ImageQuery) Where(ps ...predicate.Image) *ImageQuery

Where adds a new predicate for the ImageQuery builder.

func (*ImageQuery) WithUserProfilePic

func (iq *ImageQuery) WithUserProfilePic(opts ...func(*UserQuery)) *ImageQuery

WithUserProfilePic tells the query-builder to eager-load the nodes that are connected to the "user_profile_pic" edge. The optional arguments are used to configure the query builder of the edge.

type ImageSelect

type ImageSelect struct {
	*ImageQuery
	// contains filtered or unexported fields
}

ImageSelect is the builder for selecting fields of Image entities.

func (*ImageSelect) Aggregate added in v0.3.4

func (is *ImageSelect) Aggregate(fns ...AggregateFunc) *ImageSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ImageSelect) Bool

func (s *ImageSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ImageSelect) BoolX

func (s *ImageSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ImageSelect) Bools

func (s *ImageSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ImageSelect) BoolsX

func (s *ImageSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ImageSelect) Float64

func (s *ImageSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ImageSelect) Float64X

func (s *ImageSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ImageSelect) Float64s

func (s *ImageSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ImageSelect) Float64sX

func (s *ImageSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ImageSelect) Int

func (s *ImageSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ImageSelect) IntX

func (s *ImageSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ImageSelect) Ints

func (s *ImageSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ImageSelect) IntsX

func (s *ImageSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ImageSelect) Scan

func (is *ImageSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ImageSelect) ScanX

func (s *ImageSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ImageSelect) String

func (s *ImageSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ImageSelect) StringX

func (s *ImageSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ImageSelect) Strings

func (s *ImageSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ImageSelect) StringsX

func (s *ImageSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ImageUpdate

type ImageUpdate struct {
	// contains filtered or unexported fields
}

ImageUpdate is the builder for updating Image entities.

func (*ImageUpdate) AddUserProfilePic

func (iu *ImageUpdate) AddUserProfilePic(u ...*User) *ImageUpdate

AddUserProfilePic adds the "user_profile_pic" edges to the User entity.

func (*ImageUpdate) AddUserProfilePicIDs

func (iu *ImageUpdate) AddUserProfilePicIDs(ids ...int) *ImageUpdate

AddUserProfilePicIDs adds the "user_profile_pic" edge to the User entity by IDs.

func (*ImageUpdate) ClearUserProfilePic

func (iu *ImageUpdate) ClearUserProfilePic() *ImageUpdate

ClearUserProfilePic clears all "user_profile_pic" edges to the User entity.

func (*ImageUpdate) Exec

func (iu *ImageUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ImageUpdate) ExecX

func (iu *ImageUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImageUpdate) Mutation

func (iu *ImageUpdate) Mutation() *ImageMutation

Mutation returns the ImageMutation object of the builder.

func (*ImageUpdate) RemoveUserProfilePic

func (iu *ImageUpdate) RemoveUserProfilePic(u ...*User) *ImageUpdate

RemoveUserProfilePic removes "user_profile_pic" edges to User entities.

func (*ImageUpdate) RemoveUserProfilePicIDs

func (iu *ImageUpdate) RemoveUserProfilePicIDs(ids ...int) *ImageUpdate

RemoveUserProfilePicIDs removes the "user_profile_pic" edge to User entities by IDs.

func (*ImageUpdate) Save

func (iu *ImageUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ImageUpdate) SaveX

func (iu *ImageUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ImageUpdate) SetURLPath

func (iu *ImageUpdate) SetURLPath(s string) *ImageUpdate

SetURLPath sets the "url_path" field.

func (*ImageUpdate) Where

func (iu *ImageUpdate) Where(ps ...predicate.Image) *ImageUpdate

Where appends a list predicates to the ImageUpdate builder.

type ImageUpdateOne

type ImageUpdateOne struct {
	// contains filtered or unexported fields
}

ImageUpdateOne is the builder for updating a single Image entity.

func (*ImageUpdateOne) AddUserProfilePic

func (iuo *ImageUpdateOne) AddUserProfilePic(u ...*User) *ImageUpdateOne

AddUserProfilePic adds the "user_profile_pic" edges to the User entity.

func (*ImageUpdateOne) AddUserProfilePicIDs

func (iuo *ImageUpdateOne) AddUserProfilePicIDs(ids ...int) *ImageUpdateOne

AddUserProfilePicIDs adds the "user_profile_pic" edge to the User entity by IDs.

func (*ImageUpdateOne) ClearUserProfilePic

func (iuo *ImageUpdateOne) ClearUserProfilePic() *ImageUpdateOne

ClearUserProfilePic clears all "user_profile_pic" edges to the User entity.

func (*ImageUpdateOne) Exec

func (iuo *ImageUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ImageUpdateOne) ExecX

func (iuo *ImageUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImageUpdateOne) Mutation

func (iuo *ImageUpdateOne) Mutation() *ImageMutation

Mutation returns the ImageMutation object of the builder.

func (*ImageUpdateOne) RemoveUserProfilePic

func (iuo *ImageUpdateOne) RemoveUserProfilePic(u ...*User) *ImageUpdateOne

RemoveUserProfilePic removes "user_profile_pic" edges to User entities.

func (*ImageUpdateOne) RemoveUserProfilePicIDs

func (iuo *ImageUpdateOne) RemoveUserProfilePicIDs(ids ...int) *ImageUpdateOne

RemoveUserProfilePicIDs removes the "user_profile_pic" edge to User entities by IDs.

func (*ImageUpdateOne) Save

func (iuo *ImageUpdateOne) Save(ctx context.Context) (*Image, error)

Save executes the query and returns the updated Image entity.

func (*ImageUpdateOne) SaveX

func (iuo *ImageUpdateOne) SaveX(ctx context.Context) *Image

SaveX is like Save, but panics if an error occurs.

func (*ImageUpdateOne) Select

func (iuo *ImageUpdateOne) Select(field string, fields ...string) *ImageUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ImageUpdateOne) SetURLPath

func (iuo *ImageUpdateOne) SetURLPath(s string) *ImageUpdateOne

SetURLPath sets the "url_path" field.

type Images

type Images []*Image

Images is a parsable slice of Image.

type ImplicitSkippedMessage

type ImplicitSkippedMessage struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// contains filtered or unexported fields
}

ImplicitSkippedMessage is the model entity for the ImplicitSkippedMessage schema.

func (*ImplicitSkippedMessage) String

func (ism *ImplicitSkippedMessage) String() string

String implements the fmt.Stringer.

func (*ImplicitSkippedMessage) Unwrap

Unwrap unwraps the ImplicitSkippedMessage 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 (*ImplicitSkippedMessage) Update

Update returns a builder for updating this ImplicitSkippedMessage. Note that you need to call ImplicitSkippedMessage.Unwrap() before calling this method if this ImplicitSkippedMessage was returned from a transaction, and the transaction was committed or rolled back.

type ImplicitSkippedMessageClient

type ImplicitSkippedMessageClient struct {
	// contains filtered or unexported fields
}

ImplicitSkippedMessageClient is a client for the ImplicitSkippedMessage schema.

func NewImplicitSkippedMessageClient

func NewImplicitSkippedMessageClient(c config) *ImplicitSkippedMessageClient

NewImplicitSkippedMessageClient returns a client for the ImplicitSkippedMessage from the given config.

func (*ImplicitSkippedMessageClient) Create

Create returns a builder for creating a ImplicitSkippedMessage entity.

func (*ImplicitSkippedMessageClient) CreateBulk

CreateBulk returns a builder for creating a bulk of ImplicitSkippedMessage entities.

func (*ImplicitSkippedMessageClient) Delete

Delete returns a delete builder for ImplicitSkippedMessage.

func (*ImplicitSkippedMessageClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ImplicitSkippedMessageClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ImplicitSkippedMessageClient) Get

Get returns a ImplicitSkippedMessage entity by its id.

func (*ImplicitSkippedMessageClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ImplicitSkippedMessageClient) Hooks

func (c *ImplicitSkippedMessageClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ImplicitSkippedMessageClient) Intercept added in v0.3.5

func (c *ImplicitSkippedMessageClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `implicitskippedmessage.Intercept(f(g(h())))`.

func (*ImplicitSkippedMessageClient) Interceptors added in v0.3.5

func (c *ImplicitSkippedMessageClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ImplicitSkippedMessageClient) Query

Query returns a query builder for ImplicitSkippedMessage.

func (*ImplicitSkippedMessageClient) Update

Update returns an update builder for ImplicitSkippedMessage.

func (*ImplicitSkippedMessageClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ImplicitSkippedMessageClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ImplicitSkippedMessageClient) Use

func (c *ImplicitSkippedMessageClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `implicitskippedmessage.Hooks(f(g(h())))`.

type ImplicitSkippedMessageCreate

type ImplicitSkippedMessageCreate struct {
	// contains filtered or unexported fields
}

ImplicitSkippedMessageCreate is the builder for creating a ImplicitSkippedMessage entity.

func (*ImplicitSkippedMessageCreate) Exec added in v0.2.0

Exec executes the query.

func (*ImplicitSkippedMessageCreate) ExecX added in v0.2.0

func (ismc *ImplicitSkippedMessageCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImplicitSkippedMessageCreate) Mutation

Mutation returns the ImplicitSkippedMessageMutation object of the builder.

func (*ImplicitSkippedMessageCreate) Save

Save creates the ImplicitSkippedMessage in the database.

func (*ImplicitSkippedMessageCreate) SaveX

SaveX calls Save and panics if Save returns an error.

type ImplicitSkippedMessageCreateBulk

type ImplicitSkippedMessageCreateBulk struct {
	// contains filtered or unexported fields
}

ImplicitSkippedMessageCreateBulk is the builder for creating many ImplicitSkippedMessage entities in bulk.

func (*ImplicitSkippedMessageCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*ImplicitSkippedMessageCreateBulk) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*ImplicitSkippedMessageCreateBulk) Save

Save creates the ImplicitSkippedMessage entities in the database.

func (*ImplicitSkippedMessageCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type ImplicitSkippedMessageDelete

type ImplicitSkippedMessageDelete struct {
	// contains filtered or unexported fields
}

ImplicitSkippedMessageDelete is the builder for deleting a ImplicitSkippedMessage entity.

func (*ImplicitSkippedMessageDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*ImplicitSkippedMessageDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ImplicitSkippedMessageDelete) Where

Where appends a list predicates to the ImplicitSkippedMessageDelete builder.

type ImplicitSkippedMessageDeleteOne

type ImplicitSkippedMessageDeleteOne struct {
	// contains filtered or unexported fields
}

ImplicitSkippedMessageDeleteOne is the builder for deleting a single ImplicitSkippedMessage entity.

func (*ImplicitSkippedMessageDeleteOne) Exec

Exec executes the deletion query.

func (*ImplicitSkippedMessageDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

type ImplicitSkippedMessageGroupBy

type ImplicitSkippedMessageGroupBy struct {
	// contains filtered or unexported fields
}

ImplicitSkippedMessageGroupBy is the group-by builder for ImplicitSkippedMessage entities.

func (*ImplicitSkippedMessageGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*ImplicitSkippedMessageGroupBy) Bool

func (s *ImplicitSkippedMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageGroupBy) BoolX

func (s *ImplicitSkippedMessageGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ImplicitSkippedMessageGroupBy) Bools

func (s *ImplicitSkippedMessageGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageGroupBy) BoolsX

func (s *ImplicitSkippedMessageGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ImplicitSkippedMessageGroupBy) Float64

func (s *ImplicitSkippedMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageGroupBy) Float64X

func (s *ImplicitSkippedMessageGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ImplicitSkippedMessageGroupBy) Float64s

func (s *ImplicitSkippedMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageGroupBy) Float64sX

func (s *ImplicitSkippedMessageGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ImplicitSkippedMessageGroupBy) Int

func (s *ImplicitSkippedMessageGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageGroupBy) IntX

func (s *ImplicitSkippedMessageGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ImplicitSkippedMessageGroupBy) Ints

func (s *ImplicitSkippedMessageGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageGroupBy) IntsX

func (s *ImplicitSkippedMessageGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ImplicitSkippedMessageGroupBy) Scan

Scan applies the selector query and scans the result into the given value.

func (*ImplicitSkippedMessageGroupBy) ScanX

func (s *ImplicitSkippedMessageGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ImplicitSkippedMessageGroupBy) String

func (s *ImplicitSkippedMessageGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageGroupBy) StringX

func (s *ImplicitSkippedMessageGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ImplicitSkippedMessageGroupBy) Strings

func (s *ImplicitSkippedMessageGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageGroupBy) StringsX

func (s *ImplicitSkippedMessageGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ImplicitSkippedMessageMutation

type ImplicitSkippedMessageMutation struct {
	// contains filtered or unexported fields
}

ImplicitSkippedMessageMutation represents an operation that mutates the ImplicitSkippedMessage nodes in the graph.

func (*ImplicitSkippedMessageMutation) AddField

func (m *ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) AddedEdges

func (m *ImplicitSkippedMessageMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ImplicitSkippedMessageMutation) AddedField

func (m *ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) AddedFields

func (m *ImplicitSkippedMessageMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ImplicitSkippedMessageMutation) AddedIDs

func (m *ImplicitSkippedMessageMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ImplicitSkippedMessageMutation) ClearEdge

func (m *ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) ClearField

func (m *ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) ClearedEdges

func (m *ImplicitSkippedMessageMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ImplicitSkippedMessageMutation) ClearedFields

func (m *ImplicitSkippedMessageMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) EdgeCleared

func (m *ImplicitSkippedMessageMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ImplicitSkippedMessageMutation) Field

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ImplicitSkippedMessageMutation) FieldCleared

func (m *ImplicitSkippedMessageMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ImplicitSkippedMessageMutation) Fields

func (m *ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) ID

func (m *ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) IDs added in v0.3.0

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 (*ImplicitSkippedMessageMutation) OldField

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ImplicitSkippedMessageMutation) Op

Op returns the operation name.

func (*ImplicitSkippedMessageMutation) RemovedEdges

func (m *ImplicitSkippedMessageMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ImplicitSkippedMessageMutation) RemovedIDs

func (m *ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) ResetEdge

func (m *ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) ResetField

func (m *ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) SetField

func (m *ImplicitSkippedMessageMutation) 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 (*ImplicitSkippedMessageMutation) SetOp added in v0.3.5

func (m *ImplicitSkippedMessageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (ImplicitSkippedMessageMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ImplicitSkippedMessageMutation) Type

Type returns the node type of this mutation (ImplicitSkippedMessage).

func (*ImplicitSkippedMessageMutation) Where added in v0.2.0

Where appends a list predicates to the ImplicitSkippedMessageMutation builder.

func (*ImplicitSkippedMessageMutation) WhereP added in v0.3.5

func (m *ImplicitSkippedMessageMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ImplicitSkippedMessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ImplicitSkippedMessageQuery

type ImplicitSkippedMessageQuery struct {
	// contains filtered or unexported fields
}

ImplicitSkippedMessageQuery is the builder for querying ImplicitSkippedMessage entities.

func (*ImplicitSkippedMessageQuery) Aggregate added in v0.3.4

Aggregate returns a ImplicitSkippedMessageSelect configured with the given aggregations.

func (*ImplicitSkippedMessageQuery) All

All executes the query and returns a list of ImplicitSkippedMessages.

func (*ImplicitSkippedMessageQuery) AllX

AllX is like All, but panics if an error occurs.

func (*ImplicitSkippedMessageQuery) Clone

Clone returns a duplicate of the ImplicitSkippedMessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ImplicitSkippedMessageQuery) Count

func (ismq *ImplicitSkippedMessageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ImplicitSkippedMessageQuery) CountX

func (ismq *ImplicitSkippedMessageQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ImplicitSkippedMessageQuery) Exist

Exist returns true if the query has elements in the graph.

func (*ImplicitSkippedMessageQuery) ExistX

func (ismq *ImplicitSkippedMessageQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ImplicitSkippedMessageQuery) First

First returns the first ImplicitSkippedMessage entity from the query. Returns a *NotFoundError when no ImplicitSkippedMessage was found.

func (*ImplicitSkippedMessageQuery) FirstID

func (ismq *ImplicitSkippedMessageQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first ImplicitSkippedMessage ID from the query. Returns a *NotFoundError when no ImplicitSkippedMessage ID was found.

func (*ImplicitSkippedMessageQuery) FirstIDX

func (ismq *ImplicitSkippedMessageQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ImplicitSkippedMessageQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*ImplicitSkippedMessageQuery) GroupBy

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 (*ImplicitSkippedMessageQuery) IDs

func (ismq *ImplicitSkippedMessageQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of ImplicitSkippedMessage IDs.

func (*ImplicitSkippedMessageQuery) IDsX

func (ismq *ImplicitSkippedMessageQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ImplicitSkippedMessageQuery) Limit

Limit the number of records to be returned by this query.

func (*ImplicitSkippedMessageQuery) Offset

Offset to start from.

func (*ImplicitSkippedMessageQuery) Only

Only returns a single ImplicitSkippedMessage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ImplicitSkippedMessage entity is found. Returns a *NotFoundError when no ImplicitSkippedMessage entities are found.

func (*ImplicitSkippedMessageQuery) OnlyID

func (ismq *ImplicitSkippedMessageQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only ImplicitSkippedMessage ID in the query. Returns a *NotSingularError when more than one ImplicitSkippedMessage ID is found. Returns a *NotFoundError when no entities are found.

func (*ImplicitSkippedMessageQuery) OnlyIDX

func (ismq *ImplicitSkippedMessageQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ImplicitSkippedMessageQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ImplicitSkippedMessageQuery) Order

Order specifies how the records should be ordered.

func (*ImplicitSkippedMessageQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*ImplicitSkippedMessageQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ImplicitSkippedMessageQuery) Where

Where adds a new predicate for the ImplicitSkippedMessageQuery builder.

type ImplicitSkippedMessageSelect

type ImplicitSkippedMessageSelect struct {
	*ImplicitSkippedMessageQuery
	// contains filtered or unexported fields
}

ImplicitSkippedMessageSelect is the builder for selecting fields of ImplicitSkippedMessage entities.

func (*ImplicitSkippedMessageSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*ImplicitSkippedMessageSelect) Bool

func (s *ImplicitSkippedMessageSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageSelect) BoolX

func (s *ImplicitSkippedMessageSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ImplicitSkippedMessageSelect) Bools

func (s *ImplicitSkippedMessageSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageSelect) BoolsX

func (s *ImplicitSkippedMessageSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ImplicitSkippedMessageSelect) Float64

func (s *ImplicitSkippedMessageSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageSelect) Float64X

func (s *ImplicitSkippedMessageSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ImplicitSkippedMessageSelect) Float64s

func (s *ImplicitSkippedMessageSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageSelect) Float64sX

func (s *ImplicitSkippedMessageSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ImplicitSkippedMessageSelect) Int

func (s *ImplicitSkippedMessageSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageSelect) IntX

func (s *ImplicitSkippedMessageSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ImplicitSkippedMessageSelect) Ints

func (s *ImplicitSkippedMessageSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageSelect) IntsX

func (s *ImplicitSkippedMessageSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ImplicitSkippedMessageSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*ImplicitSkippedMessageSelect) ScanX

func (s *ImplicitSkippedMessageSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ImplicitSkippedMessageSelect) String

func (s *ImplicitSkippedMessageSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageSelect) StringX

func (s *ImplicitSkippedMessageSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ImplicitSkippedMessageSelect) Strings

func (s *ImplicitSkippedMessageSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ImplicitSkippedMessageSelect) StringsX

func (s *ImplicitSkippedMessageSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ImplicitSkippedMessageUpdate

type ImplicitSkippedMessageUpdate struct {
	// contains filtered or unexported fields
}

ImplicitSkippedMessageUpdate is the builder for updating ImplicitSkippedMessage entities.

func (*ImplicitSkippedMessageUpdate) Exec

Exec executes the query.

func (*ImplicitSkippedMessageUpdate) ExecX

func (ismu *ImplicitSkippedMessageUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImplicitSkippedMessageUpdate) Mutation

Mutation returns the ImplicitSkippedMessageMutation object of the builder.

func (*ImplicitSkippedMessageUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*ImplicitSkippedMessageUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ImplicitSkippedMessageUpdate) Where

Where appends a list predicates to the ImplicitSkippedMessageUpdate builder.

type ImplicitSkippedMessageUpdateOne

type ImplicitSkippedMessageUpdateOne struct {
	// contains filtered or unexported fields
}

ImplicitSkippedMessageUpdateOne is the builder for updating a single ImplicitSkippedMessage entity.

func (*ImplicitSkippedMessageUpdateOne) Exec

Exec executes the query on the entity.

func (*ImplicitSkippedMessageUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ImplicitSkippedMessageUpdateOne) Mutation

Mutation returns the ImplicitSkippedMessageMutation object of the builder.

func (*ImplicitSkippedMessageUpdateOne) Save

Save executes the query and returns the updated ImplicitSkippedMessage entity.

func (*ImplicitSkippedMessageUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ImplicitSkippedMessageUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

type ImplicitSkippedMessages

type ImplicitSkippedMessages []*ImplicitSkippedMessage

ImplicitSkippedMessages is a parsable slice of ImplicitSkippedMessage.

type InterceptFunc added in v0.3.5

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor added in v0.3.5

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type InvalidFieldMessage

type InvalidFieldMessage struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// JSON holds the value of the "json" field.
	JSON *schema.SomeJSON `json:"json,omitempty"`
	// contains filtered or unexported fields
}

InvalidFieldMessage is the model entity for the InvalidFieldMessage schema.

func (*InvalidFieldMessage) String

func (ifm *InvalidFieldMessage) String() string

String implements the fmt.Stringer.

func (*InvalidFieldMessage) Unwrap

Unwrap unwraps the InvalidFieldMessage 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 (*InvalidFieldMessage) Update

Update returns a builder for updating this InvalidFieldMessage. Note that you need to call InvalidFieldMessage.Unwrap() before calling this method if this InvalidFieldMessage was returned from a transaction, and the transaction was committed or rolled back.

type InvalidFieldMessageClient

type InvalidFieldMessageClient struct {
	// contains filtered or unexported fields
}

InvalidFieldMessageClient is a client for the InvalidFieldMessage schema.

func NewInvalidFieldMessageClient

func NewInvalidFieldMessageClient(c config) *InvalidFieldMessageClient

NewInvalidFieldMessageClient returns a client for the InvalidFieldMessage from the given config.

func (*InvalidFieldMessageClient) Create

Create returns a builder for creating a InvalidFieldMessage entity.

func (*InvalidFieldMessageClient) CreateBulk

CreateBulk returns a builder for creating a bulk of InvalidFieldMessage entities.

func (*InvalidFieldMessageClient) Delete

Delete returns a delete builder for InvalidFieldMessage.

func (*InvalidFieldMessageClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*InvalidFieldMessageClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*InvalidFieldMessageClient) Get

Get returns a InvalidFieldMessage entity by its id.

func (*InvalidFieldMessageClient) GetX

GetX is like Get, but panics if an error occurs.

func (*InvalidFieldMessageClient) Hooks

func (c *InvalidFieldMessageClient) Hooks() []Hook

Hooks returns the client hooks.

func (*InvalidFieldMessageClient) Intercept added in v0.3.5

func (c *InvalidFieldMessageClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `invalidfieldmessage.Intercept(f(g(h())))`.

func (*InvalidFieldMessageClient) Interceptors added in v0.3.5

func (c *InvalidFieldMessageClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*InvalidFieldMessageClient) Query

Query returns a query builder for InvalidFieldMessage.

func (*InvalidFieldMessageClient) Update

Update returns an update builder for InvalidFieldMessage.

func (*InvalidFieldMessageClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*InvalidFieldMessageClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*InvalidFieldMessageClient) Use

func (c *InvalidFieldMessageClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `invalidfieldmessage.Hooks(f(g(h())))`.

type InvalidFieldMessageCreate

type InvalidFieldMessageCreate struct {
	// contains filtered or unexported fields
}

InvalidFieldMessageCreate is the builder for creating a InvalidFieldMessage entity.

func (*InvalidFieldMessageCreate) Exec added in v0.2.0

Exec executes the query.

func (*InvalidFieldMessageCreate) ExecX added in v0.2.0

func (ifmc *InvalidFieldMessageCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InvalidFieldMessageCreate) Mutation

Mutation returns the InvalidFieldMessageMutation object of the builder.

func (*InvalidFieldMessageCreate) Save

Save creates the InvalidFieldMessage in the database.

func (*InvalidFieldMessageCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*InvalidFieldMessageCreate) SetJSON

SetJSON sets the "json" field.

type InvalidFieldMessageCreateBulk

type InvalidFieldMessageCreateBulk struct {
	// contains filtered or unexported fields
}

InvalidFieldMessageCreateBulk is the builder for creating many InvalidFieldMessage entities in bulk.

func (*InvalidFieldMessageCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*InvalidFieldMessageCreateBulk) ExecX added in v0.2.0

func (ifmcb *InvalidFieldMessageCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InvalidFieldMessageCreateBulk) Save

Save creates the InvalidFieldMessage entities in the database.

func (*InvalidFieldMessageCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type InvalidFieldMessageDelete

type InvalidFieldMessageDelete struct {
	// contains filtered or unexported fields
}

InvalidFieldMessageDelete is the builder for deleting a InvalidFieldMessage entity.

func (*InvalidFieldMessageDelete) Exec

func (ifmd *InvalidFieldMessageDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*InvalidFieldMessageDelete) ExecX

func (ifmd *InvalidFieldMessageDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*InvalidFieldMessageDelete) Where

Where appends a list predicates to the InvalidFieldMessageDelete builder.

type InvalidFieldMessageDeleteOne

type InvalidFieldMessageDeleteOne struct {
	// contains filtered or unexported fields
}

InvalidFieldMessageDeleteOne is the builder for deleting a single InvalidFieldMessage entity.

func (*InvalidFieldMessageDeleteOne) Exec

Exec executes the deletion query.

func (*InvalidFieldMessageDeleteOne) ExecX

func (ifmdo *InvalidFieldMessageDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type InvalidFieldMessageGroupBy

type InvalidFieldMessageGroupBy struct {
	// contains filtered or unexported fields
}

InvalidFieldMessageGroupBy is the group-by builder for InvalidFieldMessage entities.

func (*InvalidFieldMessageGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*InvalidFieldMessageGroupBy) Bool

func (s *InvalidFieldMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageGroupBy) BoolX

func (s *InvalidFieldMessageGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*InvalidFieldMessageGroupBy) Bools

func (s *InvalidFieldMessageGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageGroupBy) BoolsX

func (s *InvalidFieldMessageGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*InvalidFieldMessageGroupBy) Float64

func (s *InvalidFieldMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageGroupBy) Float64X

func (s *InvalidFieldMessageGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*InvalidFieldMessageGroupBy) Float64s

func (s *InvalidFieldMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageGroupBy) Float64sX

func (s *InvalidFieldMessageGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*InvalidFieldMessageGroupBy) Int

func (s *InvalidFieldMessageGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageGroupBy) IntX

func (s *InvalidFieldMessageGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*InvalidFieldMessageGroupBy) Ints

func (s *InvalidFieldMessageGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageGroupBy) IntsX

func (s *InvalidFieldMessageGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*InvalidFieldMessageGroupBy) Scan

func (ifmgb *InvalidFieldMessageGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*InvalidFieldMessageGroupBy) ScanX

func (s *InvalidFieldMessageGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*InvalidFieldMessageGroupBy) String

func (s *InvalidFieldMessageGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageGroupBy) StringX

func (s *InvalidFieldMessageGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*InvalidFieldMessageGroupBy) Strings

func (s *InvalidFieldMessageGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageGroupBy) StringsX

func (s *InvalidFieldMessageGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type InvalidFieldMessageMutation

type InvalidFieldMessageMutation struct {
	// contains filtered or unexported fields
}

InvalidFieldMessageMutation represents an operation that mutates the InvalidFieldMessage nodes in the graph.

func (*InvalidFieldMessageMutation) AddField

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) AddedEdges

func (m *InvalidFieldMessageMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*InvalidFieldMessageMutation) AddedField

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) AddedFields

func (m *InvalidFieldMessageMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*InvalidFieldMessageMutation) AddedIDs

func (m *InvalidFieldMessageMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*InvalidFieldMessageMutation) ClearEdge

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) ClearField

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) ClearedEdges

func (m *InvalidFieldMessageMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*InvalidFieldMessageMutation) ClearedFields

func (m *InvalidFieldMessageMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (InvalidFieldMessageMutation) Client

func (m InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) EdgeCleared

func (m *InvalidFieldMessageMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*InvalidFieldMessageMutation) Field

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) FieldCleared

func (m *InvalidFieldMessageMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*InvalidFieldMessageMutation) Fields

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) ID

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) IDs added in v0.3.0

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 (*InvalidFieldMessageMutation) JSON

func (m *InvalidFieldMessageMutation) JSON() (r *schema.SomeJSON, exists bool)

JSON returns the value of the "json" field in the mutation.

func (*InvalidFieldMessageMutation) OldField

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) OldJSON

func (m *InvalidFieldMessageMutation) OldJSON(ctx context.Context) (v *schema.SomeJSON, err error)

OldJSON returns the old "json" field's value of the InvalidFieldMessage entity. If the InvalidFieldMessage 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 (*InvalidFieldMessageMutation) Op

Op returns the operation name.

func (*InvalidFieldMessageMutation) RemovedEdges

func (m *InvalidFieldMessageMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*InvalidFieldMessageMutation) RemovedIDs

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) ResetEdge

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) ResetField

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) ResetJSON

func (m *InvalidFieldMessageMutation) ResetJSON()

ResetJSON resets all changes to the "json" field.

func (*InvalidFieldMessageMutation) SetField

func (m *InvalidFieldMessageMutation) 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 (*InvalidFieldMessageMutation) SetJSON

SetJSON sets the "json" field.

func (*InvalidFieldMessageMutation) SetOp added in v0.3.5

func (m *InvalidFieldMessageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (InvalidFieldMessageMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*InvalidFieldMessageMutation) Type

Type returns the node type of this mutation (InvalidFieldMessage).

func (*InvalidFieldMessageMutation) Where added in v0.2.0

Where appends a list predicates to the InvalidFieldMessageMutation builder.

func (*InvalidFieldMessageMutation) WhereP added in v0.3.5

func (m *InvalidFieldMessageMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the InvalidFieldMessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type InvalidFieldMessageQuery

type InvalidFieldMessageQuery struct {
	// contains filtered or unexported fields
}

InvalidFieldMessageQuery is the builder for querying InvalidFieldMessage entities.

func (*InvalidFieldMessageQuery) Aggregate added in v0.3.4

Aggregate returns a InvalidFieldMessageSelect configured with the given aggregations.

func (*InvalidFieldMessageQuery) All

All executes the query and returns a list of InvalidFieldMessages.

func (*InvalidFieldMessageQuery) AllX

AllX is like All, but panics if an error occurs.

func (*InvalidFieldMessageQuery) Clone

Clone returns a duplicate of the InvalidFieldMessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*InvalidFieldMessageQuery) Count

func (ifmq *InvalidFieldMessageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*InvalidFieldMessageQuery) CountX

func (ifmq *InvalidFieldMessageQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*InvalidFieldMessageQuery) Exist

func (ifmq *InvalidFieldMessageQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*InvalidFieldMessageQuery) ExistX

func (ifmq *InvalidFieldMessageQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*InvalidFieldMessageQuery) First

First returns the first InvalidFieldMessage entity from the query. Returns a *NotFoundError when no InvalidFieldMessage was found.

func (*InvalidFieldMessageQuery) FirstID

func (ifmq *InvalidFieldMessageQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first InvalidFieldMessage ID from the query. Returns a *NotFoundError when no InvalidFieldMessage ID was found.

func (*InvalidFieldMessageQuery) FirstIDX

func (ifmq *InvalidFieldMessageQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*InvalidFieldMessageQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*InvalidFieldMessageQuery) GroupBy

func (ifmq *InvalidFieldMessageQuery) GroupBy(field string, fields ...string) *InvalidFieldMessageGroupBy

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 {
	JSON *schema.SomeJSON `json:"json,omitempty"`
	Count int `json:"count,omitempty"`
}

client.InvalidFieldMessage.Query().
	GroupBy(invalidfieldmessage.FieldJSON).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*InvalidFieldMessageQuery) IDs

func (ifmq *InvalidFieldMessageQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of InvalidFieldMessage IDs.

func (*InvalidFieldMessageQuery) IDsX

func (ifmq *InvalidFieldMessageQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*InvalidFieldMessageQuery) Limit

Limit the number of records to be returned by this query.

func (*InvalidFieldMessageQuery) Offset

Offset to start from.

func (*InvalidFieldMessageQuery) Only

Only returns a single InvalidFieldMessage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one InvalidFieldMessage entity is found. Returns a *NotFoundError when no InvalidFieldMessage entities are found.

func (*InvalidFieldMessageQuery) OnlyID

func (ifmq *InvalidFieldMessageQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only InvalidFieldMessage ID in the query. Returns a *NotSingularError when more than one InvalidFieldMessage ID is found. Returns a *NotFoundError when no entities are found.

func (*InvalidFieldMessageQuery) OnlyIDX

func (ifmq *InvalidFieldMessageQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*InvalidFieldMessageQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*InvalidFieldMessageQuery) Order

Order specifies how the records should be ordered.

func (*InvalidFieldMessageQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	JSON *schema.SomeJSON `json:"json,omitempty"`
}

client.InvalidFieldMessage.Query().
	Select(invalidfieldmessage.FieldJSON).
	Scan(ctx, &v)

func (*InvalidFieldMessageQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*InvalidFieldMessageQuery) Where

Where adds a new predicate for the InvalidFieldMessageQuery builder.

type InvalidFieldMessageSelect

type InvalidFieldMessageSelect struct {
	*InvalidFieldMessageQuery
	// contains filtered or unexported fields
}

InvalidFieldMessageSelect is the builder for selecting fields of InvalidFieldMessage entities.

func (*InvalidFieldMessageSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*InvalidFieldMessageSelect) Bool

func (s *InvalidFieldMessageSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageSelect) BoolX

func (s *InvalidFieldMessageSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*InvalidFieldMessageSelect) Bools

func (s *InvalidFieldMessageSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageSelect) BoolsX

func (s *InvalidFieldMessageSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*InvalidFieldMessageSelect) Float64

func (s *InvalidFieldMessageSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageSelect) Float64X

func (s *InvalidFieldMessageSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*InvalidFieldMessageSelect) Float64s

func (s *InvalidFieldMessageSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageSelect) Float64sX

func (s *InvalidFieldMessageSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*InvalidFieldMessageSelect) Int

func (s *InvalidFieldMessageSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageSelect) IntX

func (s *InvalidFieldMessageSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*InvalidFieldMessageSelect) Ints

func (s *InvalidFieldMessageSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageSelect) IntsX

func (s *InvalidFieldMessageSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*InvalidFieldMessageSelect) Scan

func (ifms *InvalidFieldMessageSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*InvalidFieldMessageSelect) ScanX

func (s *InvalidFieldMessageSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*InvalidFieldMessageSelect) String

func (s *InvalidFieldMessageSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageSelect) StringX

func (s *InvalidFieldMessageSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*InvalidFieldMessageSelect) Strings

func (s *InvalidFieldMessageSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*InvalidFieldMessageSelect) StringsX

func (s *InvalidFieldMessageSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type InvalidFieldMessageUpdate

type InvalidFieldMessageUpdate struct {
	// contains filtered or unexported fields
}

InvalidFieldMessageUpdate is the builder for updating InvalidFieldMessage entities.

func (*InvalidFieldMessageUpdate) Exec

Exec executes the query.

func (*InvalidFieldMessageUpdate) ExecX

func (ifmu *InvalidFieldMessageUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InvalidFieldMessageUpdate) Mutation

Mutation returns the InvalidFieldMessageMutation object of the builder.

func (*InvalidFieldMessageUpdate) Save

func (ifmu *InvalidFieldMessageUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*InvalidFieldMessageUpdate) SaveX

func (ifmu *InvalidFieldMessageUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*InvalidFieldMessageUpdate) SetJSON

SetJSON sets the "json" field.

func (*InvalidFieldMessageUpdate) Where

Where appends a list predicates to the InvalidFieldMessageUpdate builder.

type InvalidFieldMessageUpdateOne

type InvalidFieldMessageUpdateOne struct {
	// contains filtered or unexported fields
}

InvalidFieldMessageUpdateOne is the builder for updating a single InvalidFieldMessage entity.

func (*InvalidFieldMessageUpdateOne) Exec

Exec executes the query on the entity.

func (*InvalidFieldMessageUpdateOne) ExecX

func (ifmuo *InvalidFieldMessageUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InvalidFieldMessageUpdateOne) Mutation

Mutation returns the InvalidFieldMessageMutation object of the builder.

func (*InvalidFieldMessageUpdateOne) Save

Save executes the query and returns the updated InvalidFieldMessage entity.

func (*InvalidFieldMessageUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*InvalidFieldMessageUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*InvalidFieldMessageUpdateOne) SetJSON

SetJSON sets the "json" field.

type InvalidFieldMessages

type InvalidFieldMessages []*InvalidFieldMessage

InvalidFieldMessages is a parsable slice of InvalidFieldMessage.

type MessageWithEnum

type MessageWithEnum struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// EnumType holds the value of the "enum_type" field.
	EnumType messagewithenum.EnumType `json:"enum_type,omitempty"`
	// EnumWithoutDefault holds the value of the "enum_without_default" field.
	EnumWithoutDefault messagewithenum.EnumWithoutDefault `json:"enum_without_default,omitempty"`
	// contains filtered or unexported fields
}

MessageWithEnum is the model entity for the MessageWithEnum schema.

func (*MessageWithEnum) String

func (mwe *MessageWithEnum) String() string

String implements the fmt.Stringer.

func (*MessageWithEnum) Unwrap

func (mwe *MessageWithEnum) Unwrap() *MessageWithEnum

Unwrap unwraps the MessageWithEnum 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 (*MessageWithEnum) Update

Update returns a builder for updating this MessageWithEnum. Note that you need to call MessageWithEnum.Unwrap() before calling this method if this MessageWithEnum was returned from a transaction, and the transaction was committed or rolled back.

type MessageWithEnumClient

type MessageWithEnumClient struct {
	// contains filtered or unexported fields
}

MessageWithEnumClient is a client for the MessageWithEnum schema.

func NewMessageWithEnumClient

func NewMessageWithEnumClient(c config) *MessageWithEnumClient

NewMessageWithEnumClient returns a client for the MessageWithEnum from the given config.

func (*MessageWithEnumClient) Create

Create returns a builder for creating a MessageWithEnum entity.

func (*MessageWithEnumClient) CreateBulk

CreateBulk returns a builder for creating a bulk of MessageWithEnum entities.

func (*MessageWithEnumClient) Delete

Delete returns a delete builder for MessageWithEnum.

func (*MessageWithEnumClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MessageWithEnumClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MessageWithEnumClient) Get

Get returns a MessageWithEnum entity by its id.

func (*MessageWithEnumClient) GetX

GetX is like Get, but panics if an error occurs.

func (*MessageWithEnumClient) Hooks

func (c *MessageWithEnumClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MessageWithEnumClient) Intercept added in v0.3.5

func (c *MessageWithEnumClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `messagewithenum.Intercept(f(g(h())))`.

func (*MessageWithEnumClient) Interceptors added in v0.3.5

func (c *MessageWithEnumClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MessageWithEnumClient) Query

Query returns a query builder for MessageWithEnum.

func (*MessageWithEnumClient) Update

Update returns an update builder for MessageWithEnum.

func (*MessageWithEnumClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MessageWithEnumClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*MessageWithEnumClient) Use

func (c *MessageWithEnumClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `messagewithenum.Hooks(f(g(h())))`.

type MessageWithEnumCreate

type MessageWithEnumCreate struct {
	// contains filtered or unexported fields
}

MessageWithEnumCreate is the builder for creating a MessageWithEnum entity.

func (*MessageWithEnumCreate) Exec added in v0.2.0

func (mwec *MessageWithEnumCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageWithEnumCreate) ExecX added in v0.2.0

func (mwec *MessageWithEnumCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithEnumCreate) Mutation

Mutation returns the MessageWithEnumMutation object of the builder.

func (*MessageWithEnumCreate) Save

Save creates the MessageWithEnum in the database.

func (*MessageWithEnumCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*MessageWithEnumCreate) SetEnumType

SetEnumType sets the "enum_type" field.

func (*MessageWithEnumCreate) SetEnumWithoutDefault

SetEnumWithoutDefault sets the "enum_without_default" field.

func (*MessageWithEnumCreate) SetNillableEnumType

func (mwec *MessageWithEnumCreate) SetNillableEnumType(mt *messagewithenum.EnumType) *MessageWithEnumCreate

SetNillableEnumType sets the "enum_type" field if the given value is not nil.

type MessageWithEnumCreateBulk

type MessageWithEnumCreateBulk struct {
	// contains filtered or unexported fields
}

MessageWithEnumCreateBulk is the builder for creating many MessageWithEnum entities in bulk.

func (*MessageWithEnumCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*MessageWithEnumCreateBulk) ExecX added in v0.2.0

func (mwecb *MessageWithEnumCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithEnumCreateBulk) Save

Save creates the MessageWithEnum entities in the database.

func (*MessageWithEnumCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type MessageWithEnumDelete

type MessageWithEnumDelete struct {
	// contains filtered or unexported fields
}

MessageWithEnumDelete is the builder for deleting a MessageWithEnum entity.

func (*MessageWithEnumDelete) Exec

func (mwed *MessageWithEnumDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MessageWithEnumDelete) ExecX

func (mwed *MessageWithEnumDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithEnumDelete) Where

Where appends a list predicates to the MessageWithEnumDelete builder.

type MessageWithEnumDeleteOne

type MessageWithEnumDeleteOne struct {
	// contains filtered or unexported fields
}

MessageWithEnumDeleteOne is the builder for deleting a single MessageWithEnum entity.

func (*MessageWithEnumDeleteOne) Exec

func (mwedo *MessageWithEnumDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MessageWithEnumDeleteOne) ExecX

func (mwedo *MessageWithEnumDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MessageWithEnumGroupBy

type MessageWithEnumGroupBy struct {
	// contains filtered or unexported fields
}

MessageWithEnumGroupBy is the group-by builder for MessageWithEnum entities.

func (*MessageWithEnumGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*MessageWithEnumGroupBy) Bool

func (s *MessageWithEnumGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumGroupBy) BoolX

func (s *MessageWithEnumGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithEnumGroupBy) Bools

func (s *MessageWithEnumGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumGroupBy) BoolsX

func (s *MessageWithEnumGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithEnumGroupBy) Float64

func (s *MessageWithEnumGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumGroupBy) Float64X

func (s *MessageWithEnumGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithEnumGroupBy) Float64s

func (s *MessageWithEnumGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumGroupBy) Float64sX

func (s *MessageWithEnumGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithEnumGroupBy) Int

func (s *MessageWithEnumGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumGroupBy) IntX

func (s *MessageWithEnumGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithEnumGroupBy) Ints

func (s *MessageWithEnumGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumGroupBy) IntsX

func (s *MessageWithEnumGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithEnumGroupBy) Scan

func (mwegb *MessageWithEnumGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithEnumGroupBy) ScanX

func (s *MessageWithEnumGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithEnumGroupBy) String

func (s *MessageWithEnumGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumGroupBy) StringX

func (s *MessageWithEnumGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithEnumGroupBy) Strings

func (s *MessageWithEnumGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumGroupBy) StringsX

func (s *MessageWithEnumGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithEnumMutation

type MessageWithEnumMutation struct {
	// contains filtered or unexported fields
}

MessageWithEnumMutation represents an operation that mutates the MessageWithEnum nodes in the graph.

func (*MessageWithEnumMutation) AddField

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) AddedEdges

func (m *MessageWithEnumMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MessageWithEnumMutation) AddedField

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) AddedFields

func (m *MessageWithEnumMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MessageWithEnumMutation) AddedIDs

func (m *MessageWithEnumMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MessageWithEnumMutation) ClearEdge

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) ClearField

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) ClearedEdges

func (m *MessageWithEnumMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MessageWithEnumMutation) ClearedFields

func (m *MessageWithEnumMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MessageWithEnumMutation) Client

func (m MessageWithEnumMutation) 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 (*MessageWithEnumMutation) EdgeCleared

func (m *MessageWithEnumMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MessageWithEnumMutation) EnumType

func (m *MessageWithEnumMutation) EnumType() (r messagewithenum.EnumType, exists bool)

EnumType returns the value of the "enum_type" field in the mutation.

func (*MessageWithEnumMutation) EnumWithoutDefault

func (m *MessageWithEnumMutation) EnumWithoutDefault() (r messagewithenum.EnumWithoutDefault, exists bool)

EnumWithoutDefault returns the value of the "enum_without_default" field in the mutation.

func (*MessageWithEnumMutation) Field

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) FieldCleared

func (m *MessageWithEnumMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MessageWithEnumMutation) Fields

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) ID

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) IDs added in v0.3.0

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) OldEnumType

OldEnumType returns the old "enum_type" field's value of the MessageWithEnum entity. If the MessageWithEnum 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 (*MessageWithEnumMutation) OldEnumWithoutDefault

func (m *MessageWithEnumMutation) OldEnumWithoutDefault(ctx context.Context) (v messagewithenum.EnumWithoutDefault, err error)

OldEnumWithoutDefault returns the old "enum_without_default" field's value of the MessageWithEnum entity. If the MessageWithEnum 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 (*MessageWithEnumMutation) OldField

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) Op

func (m *MessageWithEnumMutation) Op() Op

Op returns the operation name.

func (*MessageWithEnumMutation) RemovedEdges

func (m *MessageWithEnumMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MessageWithEnumMutation) RemovedIDs

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) ResetEdge

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) ResetEnumType

func (m *MessageWithEnumMutation) ResetEnumType()

ResetEnumType resets all changes to the "enum_type" field.

func (*MessageWithEnumMutation) ResetEnumWithoutDefault

func (m *MessageWithEnumMutation) ResetEnumWithoutDefault()

ResetEnumWithoutDefault resets all changes to the "enum_without_default" field.

func (*MessageWithEnumMutation) ResetField

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) SetEnumType

SetEnumType sets the "enum_type" field.

func (*MessageWithEnumMutation) SetEnumWithoutDefault

func (m *MessageWithEnumMutation) SetEnumWithoutDefault(mwd messagewithenum.EnumWithoutDefault)

SetEnumWithoutDefault sets the "enum_without_default" field.

func (*MessageWithEnumMutation) SetField

func (m *MessageWithEnumMutation) 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 (*MessageWithEnumMutation) SetOp added in v0.3.5

func (m *MessageWithEnumMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (MessageWithEnumMutation) Tx

func (m MessageWithEnumMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MessageWithEnumMutation) Type

func (m *MessageWithEnumMutation) Type() string

Type returns the node type of this mutation (MessageWithEnum).

func (*MessageWithEnumMutation) Where added in v0.2.0

Where appends a list predicates to the MessageWithEnumMutation builder.

func (*MessageWithEnumMutation) WhereP added in v0.3.5

func (m *MessageWithEnumMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MessageWithEnumMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MessageWithEnumQuery

type MessageWithEnumQuery struct {
	// contains filtered or unexported fields
}

MessageWithEnumQuery is the builder for querying MessageWithEnum entities.

func (*MessageWithEnumQuery) Aggregate added in v0.3.4

func (mweq *MessageWithEnumQuery) Aggregate(fns ...AggregateFunc) *MessageWithEnumSelect

Aggregate returns a MessageWithEnumSelect configured with the given aggregations.

func (*MessageWithEnumQuery) All

All executes the query and returns a list of MessageWithEnums.

func (*MessageWithEnumQuery) AllX

AllX is like All, but panics if an error occurs.

func (*MessageWithEnumQuery) Clone

Clone returns a duplicate of the MessageWithEnumQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MessageWithEnumQuery) Count

func (mweq *MessageWithEnumQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MessageWithEnumQuery) CountX

func (mweq *MessageWithEnumQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MessageWithEnumQuery) Exist

func (mweq *MessageWithEnumQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MessageWithEnumQuery) ExistX

func (mweq *MessageWithEnumQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MessageWithEnumQuery) First

First returns the first MessageWithEnum entity from the query. Returns a *NotFoundError when no MessageWithEnum was found.

func (*MessageWithEnumQuery) FirstID

func (mweq *MessageWithEnumQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MessageWithEnum ID from the query. Returns a *NotFoundError when no MessageWithEnum ID was found.

func (*MessageWithEnumQuery) FirstIDX

func (mweq *MessageWithEnumQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MessageWithEnumQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*MessageWithEnumQuery) GroupBy

func (mweq *MessageWithEnumQuery) GroupBy(field string, fields ...string) *MessageWithEnumGroupBy

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 {
	EnumType messagewithenum.EnumType `json:"enum_type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MessageWithEnum.Query().
	GroupBy(messagewithenum.FieldEnumType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MessageWithEnumQuery) IDs

func (mweq *MessageWithEnumQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of MessageWithEnum IDs.

func (*MessageWithEnumQuery) IDsX

func (mweq *MessageWithEnumQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MessageWithEnumQuery) Limit

func (mweq *MessageWithEnumQuery) Limit(limit int) *MessageWithEnumQuery

Limit the number of records to be returned by this query.

func (*MessageWithEnumQuery) Offset

func (mweq *MessageWithEnumQuery) Offset(offset int) *MessageWithEnumQuery

Offset to start from.

func (*MessageWithEnumQuery) Only

Only returns a single MessageWithEnum entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MessageWithEnum entity is found. Returns a *NotFoundError when no MessageWithEnum entities are found.

func (*MessageWithEnumQuery) OnlyID

func (mweq *MessageWithEnumQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MessageWithEnum ID in the query. Returns a *NotSingularError when more than one MessageWithEnum ID is found. Returns a *NotFoundError when no entities are found.

func (*MessageWithEnumQuery) OnlyIDX

func (mweq *MessageWithEnumQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MessageWithEnumQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*MessageWithEnumQuery) Order

Order specifies how the records should be ordered.

func (*MessageWithEnumQuery) Select

func (mweq *MessageWithEnumQuery) Select(fields ...string) *MessageWithEnumSelect

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 {
	EnumType messagewithenum.EnumType `json:"enum_type,omitempty"`
}

client.MessageWithEnum.Query().
	Select(messagewithenum.FieldEnumType).
	Scan(ctx, &v)

func (*MessageWithEnumQuery) Unique

func (mweq *MessageWithEnumQuery) Unique(unique bool) *MessageWithEnumQuery

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 (*MessageWithEnumQuery) Where

Where adds a new predicate for the MessageWithEnumQuery builder.

type MessageWithEnumSelect

type MessageWithEnumSelect struct {
	*MessageWithEnumQuery
	// contains filtered or unexported fields
}

MessageWithEnumSelect is the builder for selecting fields of MessageWithEnum entities.

func (*MessageWithEnumSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*MessageWithEnumSelect) Bool

func (s *MessageWithEnumSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumSelect) BoolX

func (s *MessageWithEnumSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithEnumSelect) Bools

func (s *MessageWithEnumSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumSelect) BoolsX

func (s *MessageWithEnumSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithEnumSelect) Float64

func (s *MessageWithEnumSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumSelect) Float64X

func (s *MessageWithEnumSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithEnumSelect) Float64s

func (s *MessageWithEnumSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumSelect) Float64sX

func (s *MessageWithEnumSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithEnumSelect) Int

func (s *MessageWithEnumSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumSelect) IntX

func (s *MessageWithEnumSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithEnumSelect) Ints

func (s *MessageWithEnumSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumSelect) IntsX

func (s *MessageWithEnumSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithEnumSelect) Scan

func (mwes *MessageWithEnumSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithEnumSelect) ScanX

func (s *MessageWithEnumSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithEnumSelect) String

func (s *MessageWithEnumSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumSelect) StringX

func (s *MessageWithEnumSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithEnumSelect) Strings

func (s *MessageWithEnumSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithEnumSelect) StringsX

func (s *MessageWithEnumSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithEnumUpdate

type MessageWithEnumUpdate struct {
	// contains filtered or unexported fields
}

MessageWithEnumUpdate is the builder for updating MessageWithEnum entities.

func (*MessageWithEnumUpdate) Exec

func (mweu *MessageWithEnumUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageWithEnumUpdate) ExecX

func (mweu *MessageWithEnumUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithEnumUpdate) Mutation

Mutation returns the MessageWithEnumMutation object of the builder.

func (*MessageWithEnumUpdate) Save

func (mweu *MessageWithEnumUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MessageWithEnumUpdate) SaveX

func (mweu *MessageWithEnumUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MessageWithEnumUpdate) SetEnumType

SetEnumType sets the "enum_type" field.

func (*MessageWithEnumUpdate) SetEnumWithoutDefault

SetEnumWithoutDefault sets the "enum_without_default" field.

func (*MessageWithEnumUpdate) SetNillableEnumType

func (mweu *MessageWithEnumUpdate) SetNillableEnumType(mt *messagewithenum.EnumType) *MessageWithEnumUpdate

SetNillableEnumType sets the "enum_type" field if the given value is not nil.

func (*MessageWithEnumUpdate) Where

Where appends a list predicates to the MessageWithEnumUpdate builder.

type MessageWithEnumUpdateOne

type MessageWithEnumUpdateOne struct {
	// contains filtered or unexported fields
}

MessageWithEnumUpdateOne is the builder for updating a single MessageWithEnum entity.

func (*MessageWithEnumUpdateOne) Exec

func (mweuo *MessageWithEnumUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MessageWithEnumUpdateOne) ExecX

func (mweuo *MessageWithEnumUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithEnumUpdateOne) Mutation

Mutation returns the MessageWithEnumMutation object of the builder.

func (*MessageWithEnumUpdateOne) Save

Save executes the query and returns the updated MessageWithEnum entity.

func (*MessageWithEnumUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*MessageWithEnumUpdateOne) Select

func (mweuo *MessageWithEnumUpdateOne) Select(field string, fields ...string) *MessageWithEnumUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MessageWithEnumUpdateOne) SetEnumType

SetEnumType sets the "enum_type" field.

func (*MessageWithEnumUpdateOne) SetEnumWithoutDefault

SetEnumWithoutDefault sets the "enum_without_default" field.

func (*MessageWithEnumUpdateOne) SetNillableEnumType

SetNillableEnumType sets the "enum_type" field if the given value is not nil.

type MessageWithEnums

type MessageWithEnums []*MessageWithEnum

MessageWithEnums is a parsable slice of MessageWithEnum.

type MessageWithFieldOne

type MessageWithFieldOne struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// FieldOne holds the value of the "field_one" field.
	FieldOne int32 `json:"field_one,omitempty"`
	// contains filtered or unexported fields
}

MessageWithFieldOne is the model entity for the MessageWithFieldOne schema.

func (*MessageWithFieldOne) String

func (mwfo *MessageWithFieldOne) String() string

String implements the fmt.Stringer.

func (*MessageWithFieldOne) Unwrap

func (mwfo *MessageWithFieldOne) Unwrap() *MessageWithFieldOne

Unwrap unwraps the MessageWithFieldOne 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 (*MessageWithFieldOne) Update

Update returns a builder for updating this MessageWithFieldOne. Note that you need to call MessageWithFieldOne.Unwrap() before calling this method if this MessageWithFieldOne was returned from a transaction, and the transaction was committed or rolled back.

type MessageWithFieldOneClient

type MessageWithFieldOneClient struct {
	// contains filtered or unexported fields
}

MessageWithFieldOneClient is a client for the MessageWithFieldOne schema.

func NewMessageWithFieldOneClient

func NewMessageWithFieldOneClient(c config) *MessageWithFieldOneClient

NewMessageWithFieldOneClient returns a client for the MessageWithFieldOne from the given config.

func (*MessageWithFieldOneClient) Create

Create returns a builder for creating a MessageWithFieldOne entity.

func (*MessageWithFieldOneClient) CreateBulk

CreateBulk returns a builder for creating a bulk of MessageWithFieldOne entities.

func (*MessageWithFieldOneClient) Delete

Delete returns a delete builder for MessageWithFieldOne.

func (*MessageWithFieldOneClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MessageWithFieldOneClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MessageWithFieldOneClient) Get

Get returns a MessageWithFieldOne entity by its id.

func (*MessageWithFieldOneClient) GetX

GetX is like Get, but panics if an error occurs.

func (*MessageWithFieldOneClient) Hooks

func (c *MessageWithFieldOneClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MessageWithFieldOneClient) Intercept added in v0.3.5

func (c *MessageWithFieldOneClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `messagewithfieldone.Intercept(f(g(h())))`.

func (*MessageWithFieldOneClient) Interceptors added in v0.3.5

func (c *MessageWithFieldOneClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MessageWithFieldOneClient) Query

Query returns a query builder for MessageWithFieldOne.

func (*MessageWithFieldOneClient) Update

Update returns an update builder for MessageWithFieldOne.

func (*MessageWithFieldOneClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MessageWithFieldOneClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*MessageWithFieldOneClient) Use

func (c *MessageWithFieldOneClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `messagewithfieldone.Hooks(f(g(h())))`.

type MessageWithFieldOneCreate

type MessageWithFieldOneCreate struct {
	// contains filtered or unexported fields
}

MessageWithFieldOneCreate is the builder for creating a MessageWithFieldOne entity.

func (*MessageWithFieldOneCreate) Exec added in v0.2.0

Exec executes the query.

func (*MessageWithFieldOneCreate) ExecX added in v0.2.0

func (mwfoc *MessageWithFieldOneCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithFieldOneCreate) Mutation

Mutation returns the MessageWithFieldOneMutation object of the builder.

func (*MessageWithFieldOneCreate) Save

Save creates the MessageWithFieldOne in the database.

func (*MessageWithFieldOneCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*MessageWithFieldOneCreate) SetFieldOne

SetFieldOne sets the "field_one" field.

type MessageWithFieldOneCreateBulk

type MessageWithFieldOneCreateBulk struct {
	// contains filtered or unexported fields
}

MessageWithFieldOneCreateBulk is the builder for creating many MessageWithFieldOne entities in bulk.

func (*MessageWithFieldOneCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*MessageWithFieldOneCreateBulk) ExecX added in v0.2.0

func (mwfocb *MessageWithFieldOneCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithFieldOneCreateBulk) Save

Save creates the MessageWithFieldOne entities in the database.

func (*MessageWithFieldOneCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type MessageWithFieldOneDelete

type MessageWithFieldOneDelete struct {
	// contains filtered or unexported fields
}

MessageWithFieldOneDelete is the builder for deleting a MessageWithFieldOne entity.

func (*MessageWithFieldOneDelete) Exec

func (mwfod *MessageWithFieldOneDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MessageWithFieldOneDelete) ExecX

func (mwfod *MessageWithFieldOneDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithFieldOneDelete) Where

Where appends a list predicates to the MessageWithFieldOneDelete builder.

type MessageWithFieldOneDeleteOne

type MessageWithFieldOneDeleteOne struct {
	// contains filtered or unexported fields
}

MessageWithFieldOneDeleteOne is the builder for deleting a single MessageWithFieldOne entity.

func (*MessageWithFieldOneDeleteOne) Exec

Exec executes the deletion query.

func (*MessageWithFieldOneDeleteOne) ExecX

func (mwfodo *MessageWithFieldOneDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MessageWithFieldOneGroupBy

type MessageWithFieldOneGroupBy struct {
	// contains filtered or unexported fields
}

MessageWithFieldOneGroupBy is the group-by builder for MessageWithFieldOne entities.

func (*MessageWithFieldOneGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*MessageWithFieldOneGroupBy) Bool

func (s *MessageWithFieldOneGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneGroupBy) BoolX

func (s *MessageWithFieldOneGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithFieldOneGroupBy) Bools

func (s *MessageWithFieldOneGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneGroupBy) BoolsX

func (s *MessageWithFieldOneGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithFieldOneGroupBy) Float64

func (s *MessageWithFieldOneGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneGroupBy) Float64X

func (s *MessageWithFieldOneGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithFieldOneGroupBy) Float64s

func (s *MessageWithFieldOneGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneGroupBy) Float64sX

func (s *MessageWithFieldOneGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithFieldOneGroupBy) Int

func (s *MessageWithFieldOneGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneGroupBy) IntX

func (s *MessageWithFieldOneGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithFieldOneGroupBy) Ints

func (s *MessageWithFieldOneGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneGroupBy) IntsX

func (s *MessageWithFieldOneGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithFieldOneGroupBy) Scan

func (mwfogb *MessageWithFieldOneGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithFieldOneGroupBy) ScanX

func (s *MessageWithFieldOneGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithFieldOneGroupBy) String

func (s *MessageWithFieldOneGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneGroupBy) StringX

func (s *MessageWithFieldOneGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithFieldOneGroupBy) Strings

func (s *MessageWithFieldOneGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneGroupBy) StringsX

func (s *MessageWithFieldOneGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithFieldOneMutation

type MessageWithFieldOneMutation struct {
	// contains filtered or unexported fields
}

MessageWithFieldOneMutation represents an operation that mutates the MessageWithFieldOne nodes in the graph.

func (*MessageWithFieldOneMutation) AddField

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) AddFieldOne

func (m *MessageWithFieldOneMutation) AddFieldOne(i int32)

AddFieldOne adds i to the "field_one" field.

func (*MessageWithFieldOneMutation) AddedEdges

func (m *MessageWithFieldOneMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MessageWithFieldOneMutation) AddedField

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) AddedFieldOne

func (m *MessageWithFieldOneMutation) AddedFieldOne() (r int32, exists bool)

AddedFieldOne returns the value that was added to the "field_one" field in this mutation.

func (*MessageWithFieldOneMutation) AddedFields

func (m *MessageWithFieldOneMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MessageWithFieldOneMutation) AddedIDs

func (m *MessageWithFieldOneMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MessageWithFieldOneMutation) ClearEdge

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) ClearField

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) ClearedEdges

func (m *MessageWithFieldOneMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MessageWithFieldOneMutation) ClearedFields

func (m *MessageWithFieldOneMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MessageWithFieldOneMutation) Client

func (m MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) EdgeCleared

func (m *MessageWithFieldOneMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MessageWithFieldOneMutation) Field

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) FieldCleared

func (m *MessageWithFieldOneMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MessageWithFieldOneMutation) FieldOne

func (m *MessageWithFieldOneMutation) FieldOne() (r int32, exists bool)

FieldOne returns the value of the "field_one" field in the mutation.

func (*MessageWithFieldOneMutation) Fields

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) ID

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) IDs added in v0.3.0

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 (*MessageWithFieldOneMutation) OldField

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) OldFieldOne

func (m *MessageWithFieldOneMutation) OldFieldOne(ctx context.Context) (v int32, err error)

OldFieldOne returns the old "field_one" field's value of the MessageWithFieldOne entity. If the MessageWithFieldOne 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 (*MessageWithFieldOneMutation) Op

Op returns the operation name.

func (*MessageWithFieldOneMutation) RemovedEdges

func (m *MessageWithFieldOneMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MessageWithFieldOneMutation) RemovedIDs

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) ResetEdge

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) ResetField

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) ResetFieldOne

func (m *MessageWithFieldOneMutation) ResetFieldOne()

ResetFieldOne resets all changes to the "field_one" field.

func (*MessageWithFieldOneMutation) SetField

func (m *MessageWithFieldOneMutation) 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 (*MessageWithFieldOneMutation) SetFieldOne

func (m *MessageWithFieldOneMutation) SetFieldOne(i int32)

SetFieldOne sets the "field_one" field.

func (*MessageWithFieldOneMutation) SetOp added in v0.3.5

func (m *MessageWithFieldOneMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (MessageWithFieldOneMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MessageWithFieldOneMutation) Type

Type returns the node type of this mutation (MessageWithFieldOne).

func (*MessageWithFieldOneMutation) Where added in v0.2.0

Where appends a list predicates to the MessageWithFieldOneMutation builder.

func (*MessageWithFieldOneMutation) WhereP added in v0.3.5

func (m *MessageWithFieldOneMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MessageWithFieldOneMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MessageWithFieldOneQuery

type MessageWithFieldOneQuery struct {
	// contains filtered or unexported fields
}

MessageWithFieldOneQuery is the builder for querying MessageWithFieldOne entities.

func (*MessageWithFieldOneQuery) Aggregate added in v0.3.4

Aggregate returns a MessageWithFieldOneSelect configured with the given aggregations.

func (*MessageWithFieldOneQuery) All

All executes the query and returns a list of MessageWithFieldOnes.

func (*MessageWithFieldOneQuery) AllX

AllX is like All, but panics if an error occurs.

func (*MessageWithFieldOneQuery) Clone

Clone returns a duplicate of the MessageWithFieldOneQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MessageWithFieldOneQuery) Count

func (mwfoq *MessageWithFieldOneQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MessageWithFieldOneQuery) CountX

func (mwfoq *MessageWithFieldOneQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MessageWithFieldOneQuery) Exist

func (mwfoq *MessageWithFieldOneQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MessageWithFieldOneQuery) ExistX

func (mwfoq *MessageWithFieldOneQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MessageWithFieldOneQuery) First

First returns the first MessageWithFieldOne entity from the query. Returns a *NotFoundError when no MessageWithFieldOne was found.

func (*MessageWithFieldOneQuery) FirstID

func (mwfoq *MessageWithFieldOneQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MessageWithFieldOne ID from the query. Returns a *NotFoundError when no MessageWithFieldOne ID was found.

func (*MessageWithFieldOneQuery) FirstIDX

func (mwfoq *MessageWithFieldOneQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MessageWithFieldOneQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*MessageWithFieldOneQuery) GroupBy

func (mwfoq *MessageWithFieldOneQuery) GroupBy(field string, fields ...string) *MessageWithFieldOneGroupBy

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 {
	FieldOne int32 `json:"field_one,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MessageWithFieldOne.Query().
	GroupBy(messagewithfieldone.FieldFieldOne).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MessageWithFieldOneQuery) IDs

func (mwfoq *MessageWithFieldOneQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of MessageWithFieldOne IDs.

func (*MessageWithFieldOneQuery) IDsX

func (mwfoq *MessageWithFieldOneQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MessageWithFieldOneQuery) Limit

Limit the number of records to be returned by this query.

func (*MessageWithFieldOneQuery) Offset

func (mwfoq *MessageWithFieldOneQuery) Offset(offset int) *MessageWithFieldOneQuery

Offset to start from.

func (*MessageWithFieldOneQuery) Only

Only returns a single MessageWithFieldOne entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MessageWithFieldOne entity is found. Returns a *NotFoundError when no MessageWithFieldOne entities are found.

func (*MessageWithFieldOneQuery) OnlyID

func (mwfoq *MessageWithFieldOneQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MessageWithFieldOne ID in the query. Returns a *NotSingularError when more than one MessageWithFieldOne ID is found. Returns a *NotFoundError when no entities are found.

func (*MessageWithFieldOneQuery) OnlyIDX

func (mwfoq *MessageWithFieldOneQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MessageWithFieldOneQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*MessageWithFieldOneQuery) Order

Order specifies how the records should be ordered.

func (*MessageWithFieldOneQuery) Select

func (mwfoq *MessageWithFieldOneQuery) Select(fields ...string) *MessageWithFieldOneSelect

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 {
	FieldOne int32 `json:"field_one,omitempty"`
}

client.MessageWithFieldOne.Query().
	Select(messagewithfieldone.FieldFieldOne).
	Scan(ctx, &v)

func (*MessageWithFieldOneQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*MessageWithFieldOneQuery) Where

Where adds a new predicate for the MessageWithFieldOneQuery builder.

type MessageWithFieldOneSelect

type MessageWithFieldOneSelect struct {
	*MessageWithFieldOneQuery
	// contains filtered or unexported fields
}

MessageWithFieldOneSelect is the builder for selecting fields of MessageWithFieldOne entities.

func (*MessageWithFieldOneSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*MessageWithFieldOneSelect) Bool

func (s *MessageWithFieldOneSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneSelect) BoolX

func (s *MessageWithFieldOneSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithFieldOneSelect) Bools

func (s *MessageWithFieldOneSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneSelect) BoolsX

func (s *MessageWithFieldOneSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithFieldOneSelect) Float64

func (s *MessageWithFieldOneSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneSelect) Float64X

func (s *MessageWithFieldOneSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithFieldOneSelect) Float64s

func (s *MessageWithFieldOneSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneSelect) Float64sX

func (s *MessageWithFieldOneSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithFieldOneSelect) Int

func (s *MessageWithFieldOneSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneSelect) IntX

func (s *MessageWithFieldOneSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithFieldOneSelect) Ints

func (s *MessageWithFieldOneSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneSelect) IntsX

func (s *MessageWithFieldOneSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithFieldOneSelect) Scan

func (mwfos *MessageWithFieldOneSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithFieldOneSelect) ScanX

func (s *MessageWithFieldOneSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithFieldOneSelect) String

func (s *MessageWithFieldOneSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneSelect) StringX

func (s *MessageWithFieldOneSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithFieldOneSelect) Strings

func (s *MessageWithFieldOneSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithFieldOneSelect) StringsX

func (s *MessageWithFieldOneSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithFieldOneUpdate

type MessageWithFieldOneUpdate struct {
	// contains filtered or unexported fields
}

MessageWithFieldOneUpdate is the builder for updating MessageWithFieldOne entities.

func (*MessageWithFieldOneUpdate) AddFieldOne

AddFieldOne adds i to the "field_one" field.

func (*MessageWithFieldOneUpdate) Exec

Exec executes the query.

func (*MessageWithFieldOneUpdate) ExecX

func (mwfou *MessageWithFieldOneUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithFieldOneUpdate) Mutation

Mutation returns the MessageWithFieldOneMutation object of the builder.

func (*MessageWithFieldOneUpdate) Save

func (mwfou *MessageWithFieldOneUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MessageWithFieldOneUpdate) SaveX

func (mwfou *MessageWithFieldOneUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MessageWithFieldOneUpdate) SetFieldOne

SetFieldOne sets the "field_one" field.

func (*MessageWithFieldOneUpdate) Where

Where appends a list predicates to the MessageWithFieldOneUpdate builder.

type MessageWithFieldOneUpdateOne

type MessageWithFieldOneUpdateOne struct {
	// contains filtered or unexported fields
}

MessageWithFieldOneUpdateOne is the builder for updating a single MessageWithFieldOne entity.

func (*MessageWithFieldOneUpdateOne) AddFieldOne

AddFieldOne adds i to the "field_one" field.

func (*MessageWithFieldOneUpdateOne) Exec

Exec executes the query on the entity.

func (*MessageWithFieldOneUpdateOne) ExecX

func (mwfouo *MessageWithFieldOneUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithFieldOneUpdateOne) Mutation

Mutation returns the MessageWithFieldOneMutation object of the builder.

func (*MessageWithFieldOneUpdateOne) Save

Save executes the query and returns the updated MessageWithFieldOne entity.

func (*MessageWithFieldOneUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*MessageWithFieldOneUpdateOne) Select

func (mwfouo *MessageWithFieldOneUpdateOne) Select(field string, fields ...string) *MessageWithFieldOneUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MessageWithFieldOneUpdateOne) SetFieldOne

SetFieldOne sets the "field_one" field.

type MessageWithFieldOnes

type MessageWithFieldOnes []*MessageWithFieldOne

MessageWithFieldOnes is a parsable slice of MessageWithFieldOne.

type MessageWithID

type MessageWithID struct {

	// ID of the ent.
	ID int32 `json:"id,omitempty"`
	// contains filtered or unexported fields
}

MessageWithID is the model entity for the MessageWithID schema.

func (*MessageWithID) String

func (mwi *MessageWithID) String() string

String implements the fmt.Stringer.

func (*MessageWithID) Unwrap

func (mwi *MessageWithID) Unwrap() *MessageWithID

Unwrap unwraps the MessageWithID 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 (*MessageWithID) Update

func (mwi *MessageWithID) Update() *MessageWithIDUpdateOne

Update returns a builder for updating this MessageWithID. Note that you need to call MessageWithID.Unwrap() before calling this method if this MessageWithID was returned from a transaction, and the transaction was committed or rolled back.

type MessageWithIDClient

type MessageWithIDClient struct {
	// contains filtered or unexported fields
}

MessageWithIDClient is a client for the MessageWithID schema.

func NewMessageWithIDClient

func NewMessageWithIDClient(c config) *MessageWithIDClient

NewMessageWithIDClient returns a client for the MessageWithID from the given config.

func (*MessageWithIDClient) Create

Create returns a builder for creating a MessageWithID entity.

func (*MessageWithIDClient) CreateBulk

CreateBulk returns a builder for creating a bulk of MessageWithID entities.

func (*MessageWithIDClient) Delete

Delete returns a delete builder for MessageWithID.

func (*MessageWithIDClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MessageWithIDClient) DeleteOneID

func (c *MessageWithIDClient) DeleteOneID(id int32) *MessageWithIDDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MessageWithIDClient) Get

Get returns a MessageWithID entity by its id.

func (*MessageWithIDClient) GetX

GetX is like Get, but panics if an error occurs.

func (*MessageWithIDClient) Hooks

func (c *MessageWithIDClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MessageWithIDClient) Intercept added in v0.3.5

func (c *MessageWithIDClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `messagewithid.Intercept(f(g(h())))`.

func (*MessageWithIDClient) Interceptors added in v0.3.5

func (c *MessageWithIDClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MessageWithIDClient) Query

Query returns a query builder for MessageWithID.

func (*MessageWithIDClient) Update

Update returns an update builder for MessageWithID.

func (*MessageWithIDClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MessageWithIDClient) UpdateOneID

func (c *MessageWithIDClient) UpdateOneID(id int32) *MessageWithIDUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MessageWithIDClient) Use

func (c *MessageWithIDClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `messagewithid.Hooks(f(g(h())))`.

type MessageWithIDCreate

type MessageWithIDCreate struct {
	// contains filtered or unexported fields
}

MessageWithIDCreate is the builder for creating a MessageWithID entity.

func (*MessageWithIDCreate) Exec added in v0.2.0

func (mwic *MessageWithIDCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageWithIDCreate) ExecX added in v0.2.0

func (mwic *MessageWithIDCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithIDCreate) Mutation

func (mwic *MessageWithIDCreate) Mutation() *MessageWithIDMutation

Mutation returns the MessageWithIDMutation object of the builder.

func (*MessageWithIDCreate) Save

Save creates the MessageWithID in the database.

func (*MessageWithIDCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*MessageWithIDCreate) SetID

SetID sets the "id" field.

type MessageWithIDCreateBulk

type MessageWithIDCreateBulk struct {
	// contains filtered or unexported fields
}

MessageWithIDCreateBulk is the builder for creating many MessageWithID entities in bulk.

func (*MessageWithIDCreateBulk) Exec added in v0.2.0

func (mwicb *MessageWithIDCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageWithIDCreateBulk) ExecX added in v0.2.0

func (mwicb *MessageWithIDCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithIDCreateBulk) Save

Save creates the MessageWithID entities in the database.

func (*MessageWithIDCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type MessageWithIDDelete

type MessageWithIDDelete struct {
	// contains filtered or unexported fields
}

MessageWithIDDelete is the builder for deleting a MessageWithID entity.

func (*MessageWithIDDelete) Exec

func (mwid *MessageWithIDDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MessageWithIDDelete) ExecX

func (mwid *MessageWithIDDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithIDDelete) Where

Where appends a list predicates to the MessageWithIDDelete builder.

type MessageWithIDDeleteOne

type MessageWithIDDeleteOne struct {
	// contains filtered or unexported fields
}

MessageWithIDDeleteOne is the builder for deleting a single MessageWithID entity.

func (*MessageWithIDDeleteOne) Exec

func (mwido *MessageWithIDDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MessageWithIDDeleteOne) ExecX

func (mwido *MessageWithIDDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MessageWithIDGroupBy

type MessageWithIDGroupBy struct {
	// contains filtered or unexported fields
}

MessageWithIDGroupBy is the group-by builder for MessageWithID entities.

func (*MessageWithIDGroupBy) Aggregate

func (mwigb *MessageWithIDGroupBy) Aggregate(fns ...AggregateFunc) *MessageWithIDGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MessageWithIDGroupBy) Bool

func (s *MessageWithIDGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithIDGroupBy) BoolX

func (s *MessageWithIDGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithIDGroupBy) Bools

func (s *MessageWithIDGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithIDGroupBy) BoolsX

func (s *MessageWithIDGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithIDGroupBy) Float64

func (s *MessageWithIDGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithIDGroupBy) Float64X

func (s *MessageWithIDGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithIDGroupBy) Float64s

func (s *MessageWithIDGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithIDGroupBy) Float64sX

func (s *MessageWithIDGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithIDGroupBy) Int

func (s *MessageWithIDGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithIDGroupBy) IntX

func (s *MessageWithIDGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithIDGroupBy) Ints

func (s *MessageWithIDGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithIDGroupBy) IntsX

func (s *MessageWithIDGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithIDGroupBy) Scan

func (mwigb *MessageWithIDGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithIDGroupBy) ScanX

func (s *MessageWithIDGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithIDGroupBy) String

func (s *MessageWithIDGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithIDGroupBy) StringX

func (s *MessageWithIDGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithIDGroupBy) Strings

func (s *MessageWithIDGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithIDGroupBy) StringsX

func (s *MessageWithIDGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithIDMutation

type MessageWithIDMutation struct {
	// contains filtered or unexported fields
}

MessageWithIDMutation represents an operation that mutates the MessageWithID nodes in the graph.

func (*MessageWithIDMutation) AddField

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) AddedEdges

func (m *MessageWithIDMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MessageWithIDMutation) AddedField

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) AddedFields

func (m *MessageWithIDMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MessageWithIDMutation) AddedIDs

func (m *MessageWithIDMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MessageWithIDMutation) ClearEdge

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) ClearField

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) ClearedEdges

func (m *MessageWithIDMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MessageWithIDMutation) ClearedFields

func (m *MessageWithIDMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MessageWithIDMutation) Client

func (m MessageWithIDMutation) 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 (*MessageWithIDMutation) EdgeCleared

func (m *MessageWithIDMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MessageWithIDMutation) Field

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) FieldCleared

func (m *MessageWithIDMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MessageWithIDMutation) Fields

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) ID

func (m *MessageWithIDMutation) ID() (id int32, 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 (*MessageWithIDMutation) IDs added in v0.3.0

func (m *MessageWithIDMutation) IDs(ctx context.Context) ([]int32, 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 (*MessageWithIDMutation) OldField

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) Op

func (m *MessageWithIDMutation) Op() Op

Op returns the operation name.

func (*MessageWithIDMutation) RemovedEdges

func (m *MessageWithIDMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MessageWithIDMutation) RemovedIDs

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) ResetEdge

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) ResetField

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) SetField

func (m *MessageWithIDMutation) 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 (*MessageWithIDMutation) SetID

func (m *MessageWithIDMutation) SetID(id int32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of MessageWithID entities.

func (*MessageWithIDMutation) SetOp added in v0.3.5

func (m *MessageWithIDMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (MessageWithIDMutation) Tx

func (m MessageWithIDMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MessageWithIDMutation) Type

func (m *MessageWithIDMutation) Type() string

Type returns the node type of this mutation (MessageWithID).

func (*MessageWithIDMutation) Where added in v0.2.0

Where appends a list predicates to the MessageWithIDMutation builder.

func (*MessageWithIDMutation) WhereP added in v0.3.5

func (m *MessageWithIDMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MessageWithIDMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MessageWithIDQuery

type MessageWithIDQuery struct {
	// contains filtered or unexported fields
}

MessageWithIDQuery is the builder for querying MessageWithID entities.

func (*MessageWithIDQuery) Aggregate added in v0.3.4

func (mwiq *MessageWithIDQuery) Aggregate(fns ...AggregateFunc) *MessageWithIDSelect

Aggregate returns a MessageWithIDSelect configured with the given aggregations.

func (*MessageWithIDQuery) All

func (mwiq *MessageWithIDQuery) All(ctx context.Context) ([]*MessageWithID, error)

All executes the query and returns a list of MessageWithIDs.

func (*MessageWithIDQuery) AllX

func (mwiq *MessageWithIDQuery) AllX(ctx context.Context) []*MessageWithID

AllX is like All, but panics if an error occurs.

func (*MessageWithIDQuery) Clone

func (mwiq *MessageWithIDQuery) Clone() *MessageWithIDQuery

Clone returns a duplicate of the MessageWithIDQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MessageWithIDQuery) Count

func (mwiq *MessageWithIDQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MessageWithIDQuery) CountX

func (mwiq *MessageWithIDQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MessageWithIDQuery) Exist

func (mwiq *MessageWithIDQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MessageWithIDQuery) ExistX

func (mwiq *MessageWithIDQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MessageWithIDQuery) First

func (mwiq *MessageWithIDQuery) First(ctx context.Context) (*MessageWithID, error)

First returns the first MessageWithID entity from the query. Returns a *NotFoundError when no MessageWithID was found.

func (*MessageWithIDQuery) FirstID

func (mwiq *MessageWithIDQuery) FirstID(ctx context.Context) (id int32, err error)

FirstID returns the first MessageWithID ID from the query. Returns a *NotFoundError when no MessageWithID ID was found.

func (*MessageWithIDQuery) FirstIDX

func (mwiq *MessageWithIDQuery) FirstIDX(ctx context.Context) int32

FirstIDX is like FirstID, but panics if an error occurs.

func (*MessageWithIDQuery) FirstX

func (mwiq *MessageWithIDQuery) FirstX(ctx context.Context) *MessageWithID

FirstX is like First, but panics if an error occurs.

func (*MessageWithIDQuery) GroupBy

func (mwiq *MessageWithIDQuery) GroupBy(field string, fields ...string) *MessageWithIDGroupBy

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 (*MessageWithIDQuery) IDs

func (mwiq *MessageWithIDQuery) IDs(ctx context.Context) ([]int32, error)

IDs executes the query and returns a list of MessageWithID IDs.

func (*MessageWithIDQuery) IDsX

func (mwiq *MessageWithIDQuery) IDsX(ctx context.Context) []int32

IDsX is like IDs, but panics if an error occurs.

func (*MessageWithIDQuery) Limit

func (mwiq *MessageWithIDQuery) Limit(limit int) *MessageWithIDQuery

Limit the number of records to be returned by this query.

func (*MessageWithIDQuery) Offset

func (mwiq *MessageWithIDQuery) Offset(offset int) *MessageWithIDQuery

Offset to start from.

func (*MessageWithIDQuery) Only

Only returns a single MessageWithID entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MessageWithID entity is found. Returns a *NotFoundError when no MessageWithID entities are found.

func (*MessageWithIDQuery) OnlyID

func (mwiq *MessageWithIDQuery) OnlyID(ctx context.Context) (id int32, err error)

OnlyID is like Only, but returns the only MessageWithID ID in the query. Returns a *NotSingularError when more than one MessageWithID ID is found. Returns a *NotFoundError when no entities are found.

func (*MessageWithIDQuery) OnlyIDX

func (mwiq *MessageWithIDQuery) OnlyIDX(ctx context.Context) int32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MessageWithIDQuery) OnlyX

func (mwiq *MessageWithIDQuery) OnlyX(ctx context.Context) *MessageWithID

OnlyX is like Only, but panics if an error occurs.

func (*MessageWithIDQuery) Order

func (mwiq *MessageWithIDQuery) Order(o ...OrderFunc) *MessageWithIDQuery

Order specifies how the records should be ordered.

func (*MessageWithIDQuery) Select

func (mwiq *MessageWithIDQuery) Select(fields ...string) *MessageWithIDSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*MessageWithIDQuery) Unique

func (mwiq *MessageWithIDQuery) Unique(unique bool) *MessageWithIDQuery

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 (*MessageWithIDQuery) Where

Where adds a new predicate for the MessageWithIDQuery builder.

type MessageWithIDSelect

type MessageWithIDSelect struct {
	*MessageWithIDQuery
	// contains filtered or unexported fields
}

MessageWithIDSelect is the builder for selecting fields of MessageWithID entities.

func (*MessageWithIDSelect) Aggregate added in v0.3.4

func (mwis *MessageWithIDSelect) Aggregate(fns ...AggregateFunc) *MessageWithIDSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MessageWithIDSelect) Bool

func (s *MessageWithIDSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithIDSelect) BoolX

func (s *MessageWithIDSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithIDSelect) Bools

func (s *MessageWithIDSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithIDSelect) BoolsX

func (s *MessageWithIDSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithIDSelect) Float64

func (s *MessageWithIDSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithIDSelect) Float64X

func (s *MessageWithIDSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithIDSelect) Float64s

func (s *MessageWithIDSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithIDSelect) Float64sX

func (s *MessageWithIDSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithIDSelect) Int

func (s *MessageWithIDSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithIDSelect) IntX

func (s *MessageWithIDSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithIDSelect) Ints

func (s *MessageWithIDSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithIDSelect) IntsX

func (s *MessageWithIDSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithIDSelect) Scan

func (mwis *MessageWithIDSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithIDSelect) ScanX

func (s *MessageWithIDSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithIDSelect) String

func (s *MessageWithIDSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithIDSelect) StringX

func (s *MessageWithIDSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithIDSelect) Strings

func (s *MessageWithIDSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithIDSelect) StringsX

func (s *MessageWithIDSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithIDUpdate

type MessageWithIDUpdate struct {
	// contains filtered or unexported fields
}

MessageWithIDUpdate is the builder for updating MessageWithID entities.

func (*MessageWithIDUpdate) Exec

func (mwiu *MessageWithIDUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageWithIDUpdate) ExecX

func (mwiu *MessageWithIDUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithIDUpdate) Mutation

func (mwiu *MessageWithIDUpdate) Mutation() *MessageWithIDMutation

Mutation returns the MessageWithIDMutation object of the builder.

func (*MessageWithIDUpdate) Save

func (mwiu *MessageWithIDUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MessageWithIDUpdate) SaveX

func (mwiu *MessageWithIDUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MessageWithIDUpdate) Where

Where appends a list predicates to the MessageWithIDUpdate builder.

type MessageWithIDUpdateOne

type MessageWithIDUpdateOne struct {
	// contains filtered or unexported fields
}

MessageWithIDUpdateOne is the builder for updating a single MessageWithID entity.

func (*MessageWithIDUpdateOne) Exec

func (mwiuo *MessageWithIDUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MessageWithIDUpdateOne) ExecX

func (mwiuo *MessageWithIDUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithIDUpdateOne) Mutation

func (mwiuo *MessageWithIDUpdateOne) Mutation() *MessageWithIDMutation

Mutation returns the MessageWithIDMutation object of the builder.

func (*MessageWithIDUpdateOne) Save

Save executes the query and returns the updated MessageWithID entity.

func (*MessageWithIDUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*MessageWithIDUpdateOne) Select

func (mwiuo *MessageWithIDUpdateOne) Select(field string, fields ...string) *MessageWithIDUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

type MessageWithIDs

type MessageWithIDs []*MessageWithID

MessageWithIDs is a parsable slice of MessageWithID.

type MessageWithOptionals

type MessageWithOptionals struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// StrOptional holds the value of the "str_optional" field.
	StrOptional string `json:"str_optional,omitempty"`
	// IntOptional holds the value of the "int_optional" field.
	IntOptional int8 `json:"int_optional,omitempty"`
	// UintOptional holds the value of the "uint_optional" field.
	UintOptional uint8 `json:"uint_optional,omitempty"`
	// FloatOptional holds the value of the "float_optional" field.
	FloatOptional float32 `json:"float_optional,omitempty"`
	// BoolOptional holds the value of the "bool_optional" field.
	BoolOptional bool `json:"bool_optional,omitempty"`
	// BytesOptional holds the value of the "bytes_optional" field.
	BytesOptional []byte `json:"bytes_optional,omitempty"`
	// UUIDOptional holds the value of the "uuid_optional" field.
	UUIDOptional uuid.UUID `json:"uuid_optional,omitempty"`
	// TimeOptional holds the value of the "time_optional" field.
	TimeOptional time.Time `json:"time_optional,omitempty"`
	// contains filtered or unexported fields
}

MessageWithOptionals is the model entity for the MessageWithOptionals schema.

func (*MessageWithOptionals) String

func (mwo *MessageWithOptionals) String() string

String implements the fmt.Stringer.

func (*MessageWithOptionals) Unwrap

Unwrap unwraps the MessageWithOptionals 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 (*MessageWithOptionals) Update

Update returns a builder for updating this MessageWithOptionals. Note that you need to call MessageWithOptionals.Unwrap() before calling this method if this MessageWithOptionals was returned from a transaction, and the transaction was committed or rolled back.

type MessageWithOptionalsClient

type MessageWithOptionalsClient struct {
	// contains filtered or unexported fields
}

MessageWithOptionalsClient is a client for the MessageWithOptionals schema.

func NewMessageWithOptionalsClient

func NewMessageWithOptionalsClient(c config) *MessageWithOptionalsClient

NewMessageWithOptionalsClient returns a client for the MessageWithOptionals from the given config.

func (*MessageWithOptionalsClient) Create

Create returns a builder for creating a MessageWithOptionals entity.

func (*MessageWithOptionalsClient) CreateBulk

CreateBulk returns a builder for creating a bulk of MessageWithOptionals entities.

func (*MessageWithOptionalsClient) Delete

Delete returns a delete builder for MessageWithOptionals.

func (*MessageWithOptionalsClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MessageWithOptionalsClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MessageWithOptionalsClient) Get

Get returns a MessageWithOptionals entity by its id.

func (*MessageWithOptionalsClient) GetX

GetX is like Get, but panics if an error occurs.

func (*MessageWithOptionalsClient) Hooks

func (c *MessageWithOptionalsClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MessageWithOptionalsClient) Intercept added in v0.3.5

func (c *MessageWithOptionalsClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `messagewithoptionals.Intercept(f(g(h())))`.

func (*MessageWithOptionalsClient) Interceptors added in v0.3.5

func (c *MessageWithOptionalsClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MessageWithOptionalsClient) Query

Query returns a query builder for MessageWithOptionals.

func (*MessageWithOptionalsClient) Update

Update returns an update builder for MessageWithOptionals.

func (*MessageWithOptionalsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MessageWithOptionalsClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*MessageWithOptionalsClient) Use

func (c *MessageWithOptionalsClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `messagewithoptionals.Hooks(f(g(h())))`.

type MessageWithOptionalsCreate

type MessageWithOptionalsCreate struct {
	// contains filtered or unexported fields
}

MessageWithOptionalsCreate is the builder for creating a MessageWithOptionals entity.

func (*MessageWithOptionalsCreate) Exec added in v0.2.0

Exec executes the query.

func (*MessageWithOptionalsCreate) ExecX added in v0.2.0

func (mwoc *MessageWithOptionalsCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithOptionalsCreate) Mutation

Mutation returns the MessageWithOptionalsMutation object of the builder.

func (*MessageWithOptionalsCreate) Save

Save creates the MessageWithOptionals in the database.

func (*MessageWithOptionalsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*MessageWithOptionalsCreate) SetBoolOptional

SetBoolOptional sets the "bool_optional" field.

func (*MessageWithOptionalsCreate) SetBytesOptional

func (mwoc *MessageWithOptionalsCreate) SetBytesOptional(b []byte) *MessageWithOptionalsCreate

SetBytesOptional sets the "bytes_optional" field.

func (*MessageWithOptionalsCreate) SetFloatOptional

SetFloatOptional sets the "float_optional" field.

func (*MessageWithOptionalsCreate) SetIntOptional

SetIntOptional sets the "int_optional" field.

func (*MessageWithOptionalsCreate) SetNillableBoolOptional

func (mwoc *MessageWithOptionalsCreate) SetNillableBoolOptional(b *bool) *MessageWithOptionalsCreate

SetNillableBoolOptional sets the "bool_optional" field if the given value is not nil.

func (*MessageWithOptionalsCreate) SetNillableFloatOptional

func (mwoc *MessageWithOptionalsCreate) SetNillableFloatOptional(f *float32) *MessageWithOptionalsCreate

SetNillableFloatOptional sets the "float_optional" field if the given value is not nil.

func (*MessageWithOptionalsCreate) SetNillableIntOptional

func (mwoc *MessageWithOptionalsCreate) SetNillableIntOptional(i *int8) *MessageWithOptionalsCreate

SetNillableIntOptional sets the "int_optional" field if the given value is not nil.

func (*MessageWithOptionalsCreate) SetNillableStrOptional

func (mwoc *MessageWithOptionalsCreate) SetNillableStrOptional(s *string) *MessageWithOptionalsCreate

SetNillableStrOptional sets the "str_optional" field if the given value is not nil.

func (*MessageWithOptionalsCreate) SetNillableTimeOptional

func (mwoc *MessageWithOptionalsCreate) SetNillableTimeOptional(t *time.Time) *MessageWithOptionalsCreate

SetNillableTimeOptional sets the "time_optional" field if the given value is not nil.

func (*MessageWithOptionalsCreate) SetNillableUUIDOptional added in v0.3.0

func (mwoc *MessageWithOptionalsCreate) SetNillableUUIDOptional(u *uuid.UUID) *MessageWithOptionalsCreate

SetNillableUUIDOptional sets the "uuid_optional" field if the given value is not nil.

func (*MessageWithOptionalsCreate) SetNillableUintOptional

func (mwoc *MessageWithOptionalsCreate) SetNillableUintOptional(u *uint8) *MessageWithOptionalsCreate

SetNillableUintOptional sets the "uint_optional" field if the given value is not nil.

func (*MessageWithOptionalsCreate) SetStrOptional

SetStrOptional sets the "str_optional" field.

func (*MessageWithOptionalsCreate) SetTimeOptional

SetTimeOptional sets the "time_optional" field.

func (*MessageWithOptionalsCreate) SetUUIDOptional

SetUUIDOptional sets the "uuid_optional" field.

func (*MessageWithOptionalsCreate) SetUintOptional

SetUintOptional sets the "uint_optional" field.

type MessageWithOptionalsCreateBulk

type MessageWithOptionalsCreateBulk struct {
	// contains filtered or unexported fields
}

MessageWithOptionalsCreateBulk is the builder for creating many MessageWithOptionals entities in bulk.

func (*MessageWithOptionalsCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*MessageWithOptionalsCreateBulk) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithOptionalsCreateBulk) Save

Save creates the MessageWithOptionals entities in the database.

func (*MessageWithOptionalsCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type MessageWithOptionalsDelete

type MessageWithOptionalsDelete struct {
	// contains filtered or unexported fields
}

MessageWithOptionalsDelete is the builder for deleting a MessageWithOptionals entity.

func (*MessageWithOptionalsDelete) Exec

func (mwod *MessageWithOptionalsDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MessageWithOptionalsDelete) ExecX

func (mwod *MessageWithOptionalsDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithOptionalsDelete) Where

Where appends a list predicates to the MessageWithOptionalsDelete builder.

type MessageWithOptionalsDeleteOne

type MessageWithOptionalsDeleteOne struct {
	// contains filtered or unexported fields
}

MessageWithOptionalsDeleteOne is the builder for deleting a single MessageWithOptionals entity.

func (*MessageWithOptionalsDeleteOne) Exec

Exec executes the deletion query.

func (*MessageWithOptionalsDeleteOne) ExecX

func (mwodo *MessageWithOptionalsDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MessageWithOptionalsGroupBy

type MessageWithOptionalsGroupBy struct {
	// contains filtered or unexported fields
}

MessageWithOptionalsGroupBy is the group-by builder for MessageWithOptionals entities.

func (*MessageWithOptionalsGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*MessageWithOptionalsGroupBy) Bool

func (s *MessageWithOptionalsGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsGroupBy) BoolX

func (s *MessageWithOptionalsGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithOptionalsGroupBy) Bools

func (s *MessageWithOptionalsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsGroupBy) BoolsX

func (s *MessageWithOptionalsGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithOptionalsGroupBy) Float64

func (s *MessageWithOptionalsGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsGroupBy) Float64X

func (s *MessageWithOptionalsGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithOptionalsGroupBy) Float64s

func (s *MessageWithOptionalsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsGroupBy) Float64sX

func (s *MessageWithOptionalsGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithOptionalsGroupBy) Int

func (s *MessageWithOptionalsGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsGroupBy) IntX

func (s *MessageWithOptionalsGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithOptionalsGroupBy) Ints

func (s *MessageWithOptionalsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsGroupBy) IntsX

func (s *MessageWithOptionalsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithOptionalsGroupBy) Scan

func (mwogb *MessageWithOptionalsGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithOptionalsGroupBy) ScanX

func (s *MessageWithOptionalsGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithOptionalsGroupBy) String

func (s *MessageWithOptionalsGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsGroupBy) StringX

func (s *MessageWithOptionalsGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithOptionalsGroupBy) Strings

func (s *MessageWithOptionalsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsGroupBy) StringsX

func (s *MessageWithOptionalsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithOptionalsMutation

type MessageWithOptionalsMutation struct {
	// contains filtered or unexported fields
}

MessageWithOptionalsMutation represents an operation that mutates the MessageWithOptionals nodes in the graph.

func (*MessageWithOptionalsMutation) AddField

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) AddFloatOptional

func (m *MessageWithOptionalsMutation) AddFloatOptional(f float32)

AddFloatOptional adds f to the "float_optional" field.

func (*MessageWithOptionalsMutation) AddIntOptional

func (m *MessageWithOptionalsMutation) AddIntOptional(i int8)

AddIntOptional adds i to the "int_optional" field.

func (*MessageWithOptionalsMutation) AddUintOptional

func (m *MessageWithOptionalsMutation) AddUintOptional(u int8)

AddUintOptional adds u to the "uint_optional" field.

func (*MessageWithOptionalsMutation) AddedEdges

func (m *MessageWithOptionalsMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MessageWithOptionalsMutation) AddedField

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) AddedFields

func (m *MessageWithOptionalsMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MessageWithOptionalsMutation) AddedFloatOptional

func (m *MessageWithOptionalsMutation) AddedFloatOptional() (r float32, exists bool)

AddedFloatOptional returns the value that was added to the "float_optional" field in this mutation.

func (*MessageWithOptionalsMutation) AddedIDs

func (m *MessageWithOptionalsMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MessageWithOptionalsMutation) AddedIntOptional

func (m *MessageWithOptionalsMutation) AddedIntOptional() (r int8, exists bool)

AddedIntOptional returns the value that was added to the "int_optional" field in this mutation.

func (*MessageWithOptionalsMutation) AddedUintOptional

func (m *MessageWithOptionalsMutation) AddedUintOptional() (r int8, exists bool)

AddedUintOptional returns the value that was added to the "uint_optional" field in this mutation.

func (*MessageWithOptionalsMutation) BoolOptional

func (m *MessageWithOptionalsMutation) BoolOptional() (r bool, exists bool)

BoolOptional returns the value of the "bool_optional" field in the mutation.

func (*MessageWithOptionalsMutation) BoolOptionalCleared

func (m *MessageWithOptionalsMutation) BoolOptionalCleared() bool

BoolOptionalCleared returns if the "bool_optional" field was cleared in this mutation.

func (*MessageWithOptionalsMutation) BytesOptional

func (m *MessageWithOptionalsMutation) BytesOptional() (r []byte, exists bool)

BytesOptional returns the value of the "bytes_optional" field in the mutation.

func (*MessageWithOptionalsMutation) BytesOptionalCleared

func (m *MessageWithOptionalsMutation) BytesOptionalCleared() bool

BytesOptionalCleared returns if the "bytes_optional" field was cleared in this mutation.

func (*MessageWithOptionalsMutation) ClearBoolOptional

func (m *MessageWithOptionalsMutation) ClearBoolOptional()

ClearBoolOptional clears the value of the "bool_optional" field.

func (*MessageWithOptionalsMutation) ClearBytesOptional

func (m *MessageWithOptionalsMutation) ClearBytesOptional()

ClearBytesOptional clears the value of the "bytes_optional" field.

func (*MessageWithOptionalsMutation) ClearEdge

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) ClearField

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) ClearFloatOptional

func (m *MessageWithOptionalsMutation) ClearFloatOptional()

ClearFloatOptional clears the value of the "float_optional" field.

func (*MessageWithOptionalsMutation) ClearIntOptional

func (m *MessageWithOptionalsMutation) ClearIntOptional()

ClearIntOptional clears the value of the "int_optional" field.

func (*MessageWithOptionalsMutation) ClearStrOptional

func (m *MessageWithOptionalsMutation) ClearStrOptional()

ClearStrOptional clears the value of the "str_optional" field.

func (*MessageWithOptionalsMutation) ClearTimeOptional

func (m *MessageWithOptionalsMutation) ClearTimeOptional()

ClearTimeOptional clears the value of the "time_optional" field.

func (*MessageWithOptionalsMutation) ClearUUIDOptional

func (m *MessageWithOptionalsMutation) ClearUUIDOptional()

ClearUUIDOptional clears the value of the "uuid_optional" field.

func (*MessageWithOptionalsMutation) ClearUintOptional

func (m *MessageWithOptionalsMutation) ClearUintOptional()

ClearUintOptional clears the value of the "uint_optional" field.

func (*MessageWithOptionalsMutation) ClearedEdges

func (m *MessageWithOptionalsMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MessageWithOptionalsMutation) ClearedFields

func (m *MessageWithOptionalsMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) EdgeCleared

func (m *MessageWithOptionalsMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MessageWithOptionalsMutation) Field

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) FieldCleared

func (m *MessageWithOptionalsMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MessageWithOptionalsMutation) Fields

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) FloatOptional

func (m *MessageWithOptionalsMutation) FloatOptional() (r float32, exists bool)

FloatOptional returns the value of the "float_optional" field in the mutation.

func (*MessageWithOptionalsMutation) FloatOptionalCleared

func (m *MessageWithOptionalsMutation) FloatOptionalCleared() bool

FloatOptionalCleared returns if the "float_optional" field was cleared in this mutation.

func (*MessageWithOptionalsMutation) ID

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) IDs added in v0.3.0

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 (*MessageWithOptionalsMutation) IntOptional

func (m *MessageWithOptionalsMutation) IntOptional() (r int8, exists bool)

IntOptional returns the value of the "int_optional" field in the mutation.

func (*MessageWithOptionalsMutation) IntOptionalCleared

func (m *MessageWithOptionalsMutation) IntOptionalCleared() bool

IntOptionalCleared returns if the "int_optional" field was cleared in this mutation.

func (*MessageWithOptionalsMutation) OldBoolOptional

func (m *MessageWithOptionalsMutation) OldBoolOptional(ctx context.Context) (v bool, err error)

OldBoolOptional returns the old "bool_optional" field's value of the MessageWithOptionals entity. If the MessageWithOptionals 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 (*MessageWithOptionalsMutation) OldBytesOptional

func (m *MessageWithOptionalsMutation) OldBytesOptional(ctx context.Context) (v []byte, err error)

OldBytesOptional returns the old "bytes_optional" field's value of the MessageWithOptionals entity. If the MessageWithOptionals 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 (*MessageWithOptionalsMutation) OldField

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) OldFloatOptional

func (m *MessageWithOptionalsMutation) OldFloatOptional(ctx context.Context) (v float32, err error)

OldFloatOptional returns the old "float_optional" field's value of the MessageWithOptionals entity. If the MessageWithOptionals 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 (*MessageWithOptionalsMutation) OldIntOptional

func (m *MessageWithOptionalsMutation) OldIntOptional(ctx context.Context) (v int8, err error)

OldIntOptional returns the old "int_optional" field's value of the MessageWithOptionals entity. If the MessageWithOptionals 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 (*MessageWithOptionalsMutation) OldStrOptional

func (m *MessageWithOptionalsMutation) OldStrOptional(ctx context.Context) (v string, err error)

OldStrOptional returns the old "str_optional" field's value of the MessageWithOptionals entity. If the MessageWithOptionals 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 (*MessageWithOptionalsMutation) OldTimeOptional

func (m *MessageWithOptionalsMutation) OldTimeOptional(ctx context.Context) (v time.Time, err error)

OldTimeOptional returns the old "time_optional" field's value of the MessageWithOptionals entity. If the MessageWithOptionals 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 (*MessageWithOptionalsMutation) OldUUIDOptional

func (m *MessageWithOptionalsMutation) OldUUIDOptional(ctx context.Context) (v uuid.UUID, err error)

OldUUIDOptional returns the old "uuid_optional" field's value of the MessageWithOptionals entity. If the MessageWithOptionals 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 (*MessageWithOptionalsMutation) OldUintOptional

func (m *MessageWithOptionalsMutation) OldUintOptional(ctx context.Context) (v uint8, err error)

OldUintOptional returns the old "uint_optional" field's value of the MessageWithOptionals entity. If the MessageWithOptionals 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 (*MessageWithOptionalsMutation) Op

Op returns the operation name.

func (*MessageWithOptionalsMutation) RemovedEdges

func (m *MessageWithOptionalsMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MessageWithOptionalsMutation) RemovedIDs

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) ResetBoolOptional

func (m *MessageWithOptionalsMutation) ResetBoolOptional()

ResetBoolOptional resets all changes to the "bool_optional" field.

func (*MessageWithOptionalsMutation) ResetBytesOptional

func (m *MessageWithOptionalsMutation) ResetBytesOptional()

ResetBytesOptional resets all changes to the "bytes_optional" field.

func (*MessageWithOptionalsMutation) ResetEdge

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) ResetField

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) ResetFloatOptional

func (m *MessageWithOptionalsMutation) ResetFloatOptional()

ResetFloatOptional resets all changes to the "float_optional" field.

func (*MessageWithOptionalsMutation) ResetIntOptional

func (m *MessageWithOptionalsMutation) ResetIntOptional()

ResetIntOptional resets all changes to the "int_optional" field.

func (*MessageWithOptionalsMutation) ResetStrOptional

func (m *MessageWithOptionalsMutation) ResetStrOptional()

ResetStrOptional resets all changes to the "str_optional" field.

func (*MessageWithOptionalsMutation) ResetTimeOptional

func (m *MessageWithOptionalsMutation) ResetTimeOptional()

ResetTimeOptional resets all changes to the "time_optional" field.

func (*MessageWithOptionalsMutation) ResetUUIDOptional

func (m *MessageWithOptionalsMutation) ResetUUIDOptional()

ResetUUIDOptional resets all changes to the "uuid_optional" field.

func (*MessageWithOptionalsMutation) ResetUintOptional

func (m *MessageWithOptionalsMutation) ResetUintOptional()

ResetUintOptional resets all changes to the "uint_optional" field.

func (*MessageWithOptionalsMutation) SetBoolOptional

func (m *MessageWithOptionalsMutation) SetBoolOptional(b bool)

SetBoolOptional sets the "bool_optional" field.

func (*MessageWithOptionalsMutation) SetBytesOptional

func (m *MessageWithOptionalsMutation) SetBytesOptional(b []byte)

SetBytesOptional sets the "bytes_optional" field.

func (*MessageWithOptionalsMutation) SetField

func (m *MessageWithOptionalsMutation) 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 (*MessageWithOptionalsMutation) SetFloatOptional

func (m *MessageWithOptionalsMutation) SetFloatOptional(f float32)

SetFloatOptional sets the "float_optional" field.

func (*MessageWithOptionalsMutation) SetIntOptional

func (m *MessageWithOptionalsMutation) SetIntOptional(i int8)

SetIntOptional sets the "int_optional" field.

func (*MessageWithOptionalsMutation) SetOp added in v0.3.5

func (m *MessageWithOptionalsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MessageWithOptionalsMutation) SetStrOptional

func (m *MessageWithOptionalsMutation) SetStrOptional(s string)

SetStrOptional sets the "str_optional" field.

func (*MessageWithOptionalsMutation) SetTimeOptional

func (m *MessageWithOptionalsMutation) SetTimeOptional(t time.Time)

SetTimeOptional sets the "time_optional" field.

func (*MessageWithOptionalsMutation) SetUUIDOptional

func (m *MessageWithOptionalsMutation) SetUUIDOptional(u uuid.UUID)

SetUUIDOptional sets the "uuid_optional" field.

func (*MessageWithOptionalsMutation) SetUintOptional

func (m *MessageWithOptionalsMutation) SetUintOptional(u uint8)

SetUintOptional sets the "uint_optional" field.

func (*MessageWithOptionalsMutation) StrOptional

func (m *MessageWithOptionalsMutation) StrOptional() (r string, exists bool)

StrOptional returns the value of the "str_optional" field in the mutation.

func (*MessageWithOptionalsMutation) StrOptionalCleared

func (m *MessageWithOptionalsMutation) StrOptionalCleared() bool

StrOptionalCleared returns if the "str_optional" field was cleared in this mutation.

func (*MessageWithOptionalsMutation) TimeOptional

func (m *MessageWithOptionalsMutation) TimeOptional() (r time.Time, exists bool)

TimeOptional returns the value of the "time_optional" field in the mutation.

func (*MessageWithOptionalsMutation) TimeOptionalCleared

func (m *MessageWithOptionalsMutation) TimeOptionalCleared() bool

TimeOptionalCleared returns if the "time_optional" field was cleared in this mutation.

func (MessageWithOptionalsMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MessageWithOptionalsMutation) Type

Type returns the node type of this mutation (MessageWithOptionals).

func (*MessageWithOptionalsMutation) UUIDOptional

func (m *MessageWithOptionalsMutation) UUIDOptional() (r uuid.UUID, exists bool)

UUIDOptional returns the value of the "uuid_optional" field in the mutation.

func (*MessageWithOptionalsMutation) UUIDOptionalCleared

func (m *MessageWithOptionalsMutation) UUIDOptionalCleared() bool

UUIDOptionalCleared returns if the "uuid_optional" field was cleared in this mutation.

func (*MessageWithOptionalsMutation) UintOptional

func (m *MessageWithOptionalsMutation) UintOptional() (r uint8, exists bool)

UintOptional returns the value of the "uint_optional" field in the mutation.

func (*MessageWithOptionalsMutation) UintOptionalCleared

func (m *MessageWithOptionalsMutation) UintOptionalCleared() bool

UintOptionalCleared returns if the "uint_optional" field was cleared in this mutation.

func (*MessageWithOptionalsMutation) Where added in v0.2.0

Where appends a list predicates to the MessageWithOptionalsMutation builder.

func (*MessageWithOptionalsMutation) WhereP added in v0.3.5

func (m *MessageWithOptionalsMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MessageWithOptionalsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MessageWithOptionalsQuery

type MessageWithOptionalsQuery struct {
	// contains filtered or unexported fields
}

MessageWithOptionalsQuery is the builder for querying MessageWithOptionals entities.

func (*MessageWithOptionalsQuery) Aggregate added in v0.3.4

Aggregate returns a MessageWithOptionalsSelect configured with the given aggregations.

func (*MessageWithOptionalsQuery) All

All executes the query and returns a list of MessageWithOptionalsSlice.

func (*MessageWithOptionalsQuery) AllX

AllX is like All, but panics if an error occurs.

func (*MessageWithOptionalsQuery) Clone

Clone returns a duplicate of the MessageWithOptionalsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MessageWithOptionalsQuery) Count

func (mwoq *MessageWithOptionalsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MessageWithOptionalsQuery) CountX

func (mwoq *MessageWithOptionalsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MessageWithOptionalsQuery) Exist

func (mwoq *MessageWithOptionalsQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MessageWithOptionalsQuery) ExistX

func (mwoq *MessageWithOptionalsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MessageWithOptionalsQuery) First

First returns the first MessageWithOptionals entity from the query. Returns a *NotFoundError when no MessageWithOptionals was found.

func (*MessageWithOptionalsQuery) FirstID

func (mwoq *MessageWithOptionalsQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MessageWithOptionals ID from the query. Returns a *NotFoundError when no MessageWithOptionals ID was found.

func (*MessageWithOptionalsQuery) FirstIDX

func (mwoq *MessageWithOptionalsQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MessageWithOptionalsQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*MessageWithOptionalsQuery) GroupBy

func (mwoq *MessageWithOptionalsQuery) GroupBy(field string, fields ...string) *MessageWithOptionalsGroupBy

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 {
	StrOptional string `json:"str_optional,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MessageWithOptionals.Query().
	GroupBy(messagewithoptionals.FieldStrOptional).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MessageWithOptionalsQuery) IDs

func (mwoq *MessageWithOptionalsQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of MessageWithOptionals IDs.

func (*MessageWithOptionalsQuery) IDsX

func (mwoq *MessageWithOptionalsQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MessageWithOptionalsQuery) Limit

Limit the number of records to be returned by this query.

func (*MessageWithOptionalsQuery) Offset

Offset to start from.

func (*MessageWithOptionalsQuery) Only

Only returns a single MessageWithOptionals entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MessageWithOptionals entity is found. Returns a *NotFoundError when no MessageWithOptionals entities are found.

func (*MessageWithOptionalsQuery) OnlyID

func (mwoq *MessageWithOptionalsQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MessageWithOptionals ID in the query. Returns a *NotSingularError when more than one MessageWithOptionals ID is found. Returns a *NotFoundError when no entities are found.

func (*MessageWithOptionalsQuery) OnlyIDX

func (mwoq *MessageWithOptionalsQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MessageWithOptionalsQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*MessageWithOptionalsQuery) Order

Order specifies how the records should be ordered.

func (*MessageWithOptionalsQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	StrOptional string `json:"str_optional,omitempty"`
}

client.MessageWithOptionals.Query().
	Select(messagewithoptionals.FieldStrOptional).
	Scan(ctx, &v)

func (*MessageWithOptionalsQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*MessageWithOptionalsQuery) Where

Where adds a new predicate for the MessageWithOptionalsQuery builder.

type MessageWithOptionalsSelect

type MessageWithOptionalsSelect struct {
	*MessageWithOptionalsQuery
	// contains filtered or unexported fields
}

MessageWithOptionalsSelect is the builder for selecting fields of MessageWithOptionals entities.

func (*MessageWithOptionalsSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*MessageWithOptionalsSelect) Bool

func (s *MessageWithOptionalsSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsSelect) BoolX

func (s *MessageWithOptionalsSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithOptionalsSelect) Bools

func (s *MessageWithOptionalsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsSelect) BoolsX

func (s *MessageWithOptionalsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithOptionalsSelect) Float64

func (s *MessageWithOptionalsSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsSelect) Float64X

func (s *MessageWithOptionalsSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithOptionalsSelect) Float64s

func (s *MessageWithOptionalsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsSelect) Float64sX

func (s *MessageWithOptionalsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithOptionalsSelect) Int

func (s *MessageWithOptionalsSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsSelect) IntX

func (s *MessageWithOptionalsSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithOptionalsSelect) Ints

func (s *MessageWithOptionalsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsSelect) IntsX

func (s *MessageWithOptionalsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithOptionalsSelect) Scan

func (mwos *MessageWithOptionalsSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithOptionalsSelect) ScanX

func (s *MessageWithOptionalsSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithOptionalsSelect) String

func (s *MessageWithOptionalsSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsSelect) StringX

func (s *MessageWithOptionalsSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithOptionalsSelect) Strings

func (s *MessageWithOptionalsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithOptionalsSelect) StringsX

func (s *MessageWithOptionalsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithOptionalsSlice

type MessageWithOptionalsSlice []*MessageWithOptionals

MessageWithOptionalsSlice is a parsable slice of MessageWithOptionals.

type MessageWithOptionalsUpdate

type MessageWithOptionalsUpdate struct {
	// contains filtered or unexported fields
}

MessageWithOptionalsUpdate is the builder for updating MessageWithOptionals entities.

func (*MessageWithOptionalsUpdate) AddFloatOptional

AddFloatOptional adds f to the "float_optional" field.

func (*MessageWithOptionalsUpdate) AddIntOptional

AddIntOptional adds i to the "int_optional" field.

func (*MessageWithOptionalsUpdate) AddUintOptional

AddUintOptional adds u to the "uint_optional" field.

func (*MessageWithOptionalsUpdate) ClearBoolOptional

func (mwou *MessageWithOptionalsUpdate) ClearBoolOptional() *MessageWithOptionalsUpdate

ClearBoolOptional clears the value of the "bool_optional" field.

func (*MessageWithOptionalsUpdate) ClearBytesOptional

func (mwou *MessageWithOptionalsUpdate) ClearBytesOptional() *MessageWithOptionalsUpdate

ClearBytesOptional clears the value of the "bytes_optional" field.

func (*MessageWithOptionalsUpdate) ClearFloatOptional

func (mwou *MessageWithOptionalsUpdate) ClearFloatOptional() *MessageWithOptionalsUpdate

ClearFloatOptional clears the value of the "float_optional" field.

func (*MessageWithOptionalsUpdate) ClearIntOptional

func (mwou *MessageWithOptionalsUpdate) ClearIntOptional() *MessageWithOptionalsUpdate

ClearIntOptional clears the value of the "int_optional" field.

func (*MessageWithOptionalsUpdate) ClearStrOptional

func (mwou *MessageWithOptionalsUpdate) ClearStrOptional() *MessageWithOptionalsUpdate

ClearStrOptional clears the value of the "str_optional" field.

func (*MessageWithOptionalsUpdate) ClearTimeOptional

func (mwou *MessageWithOptionalsUpdate) ClearTimeOptional() *MessageWithOptionalsUpdate

ClearTimeOptional clears the value of the "time_optional" field.

func (*MessageWithOptionalsUpdate) ClearUUIDOptional

func (mwou *MessageWithOptionalsUpdate) ClearUUIDOptional() *MessageWithOptionalsUpdate

ClearUUIDOptional clears the value of the "uuid_optional" field.

func (*MessageWithOptionalsUpdate) ClearUintOptional

func (mwou *MessageWithOptionalsUpdate) ClearUintOptional() *MessageWithOptionalsUpdate

ClearUintOptional clears the value of the "uint_optional" field.

func (*MessageWithOptionalsUpdate) Exec

Exec executes the query.

func (*MessageWithOptionalsUpdate) ExecX

func (mwou *MessageWithOptionalsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithOptionalsUpdate) Mutation

Mutation returns the MessageWithOptionalsMutation object of the builder.

func (*MessageWithOptionalsUpdate) Save

func (mwou *MessageWithOptionalsUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MessageWithOptionalsUpdate) SaveX

func (mwou *MessageWithOptionalsUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MessageWithOptionalsUpdate) SetBoolOptional

SetBoolOptional sets the "bool_optional" field.

func (*MessageWithOptionalsUpdate) SetBytesOptional

func (mwou *MessageWithOptionalsUpdate) SetBytesOptional(b []byte) *MessageWithOptionalsUpdate

SetBytesOptional sets the "bytes_optional" field.

func (*MessageWithOptionalsUpdate) SetFloatOptional

SetFloatOptional sets the "float_optional" field.

func (*MessageWithOptionalsUpdate) SetIntOptional

SetIntOptional sets the "int_optional" field.

func (*MessageWithOptionalsUpdate) SetNillableBoolOptional

func (mwou *MessageWithOptionalsUpdate) SetNillableBoolOptional(b *bool) *MessageWithOptionalsUpdate

SetNillableBoolOptional sets the "bool_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdate) SetNillableFloatOptional

func (mwou *MessageWithOptionalsUpdate) SetNillableFloatOptional(f *float32) *MessageWithOptionalsUpdate

SetNillableFloatOptional sets the "float_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdate) SetNillableIntOptional

func (mwou *MessageWithOptionalsUpdate) SetNillableIntOptional(i *int8) *MessageWithOptionalsUpdate

SetNillableIntOptional sets the "int_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdate) SetNillableStrOptional

func (mwou *MessageWithOptionalsUpdate) SetNillableStrOptional(s *string) *MessageWithOptionalsUpdate

SetNillableStrOptional sets the "str_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdate) SetNillableTimeOptional

func (mwou *MessageWithOptionalsUpdate) SetNillableTimeOptional(t *time.Time) *MessageWithOptionalsUpdate

SetNillableTimeOptional sets the "time_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdate) SetNillableUUIDOptional added in v0.3.0

func (mwou *MessageWithOptionalsUpdate) SetNillableUUIDOptional(u *uuid.UUID) *MessageWithOptionalsUpdate

SetNillableUUIDOptional sets the "uuid_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdate) SetNillableUintOptional

func (mwou *MessageWithOptionalsUpdate) SetNillableUintOptional(u *uint8) *MessageWithOptionalsUpdate

SetNillableUintOptional sets the "uint_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdate) SetStrOptional

SetStrOptional sets the "str_optional" field.

func (*MessageWithOptionalsUpdate) SetTimeOptional

SetTimeOptional sets the "time_optional" field.

func (*MessageWithOptionalsUpdate) SetUUIDOptional

SetUUIDOptional sets the "uuid_optional" field.

func (*MessageWithOptionalsUpdate) SetUintOptional

SetUintOptional sets the "uint_optional" field.

func (*MessageWithOptionalsUpdate) Where

Where appends a list predicates to the MessageWithOptionalsUpdate builder.

type MessageWithOptionalsUpdateOne

type MessageWithOptionalsUpdateOne struct {
	// contains filtered or unexported fields
}

MessageWithOptionalsUpdateOne is the builder for updating a single MessageWithOptionals entity.

func (*MessageWithOptionalsUpdateOne) AddFloatOptional

AddFloatOptional adds f to the "float_optional" field.

func (*MessageWithOptionalsUpdateOne) AddIntOptional

AddIntOptional adds i to the "int_optional" field.

func (*MessageWithOptionalsUpdateOne) AddUintOptional

AddUintOptional adds u to the "uint_optional" field.

func (*MessageWithOptionalsUpdateOne) ClearBoolOptional

ClearBoolOptional clears the value of the "bool_optional" field.

func (*MessageWithOptionalsUpdateOne) ClearBytesOptional

func (mwouo *MessageWithOptionalsUpdateOne) ClearBytesOptional() *MessageWithOptionalsUpdateOne

ClearBytesOptional clears the value of the "bytes_optional" field.

func (*MessageWithOptionalsUpdateOne) ClearFloatOptional

func (mwouo *MessageWithOptionalsUpdateOne) ClearFloatOptional() *MessageWithOptionalsUpdateOne

ClearFloatOptional clears the value of the "float_optional" field.

func (*MessageWithOptionalsUpdateOne) ClearIntOptional

ClearIntOptional clears the value of the "int_optional" field.

func (*MessageWithOptionalsUpdateOne) ClearStrOptional

ClearStrOptional clears the value of the "str_optional" field.

func (*MessageWithOptionalsUpdateOne) ClearTimeOptional

ClearTimeOptional clears the value of the "time_optional" field.

func (*MessageWithOptionalsUpdateOne) ClearUUIDOptional

ClearUUIDOptional clears the value of the "uuid_optional" field.

func (*MessageWithOptionalsUpdateOne) ClearUintOptional

ClearUintOptional clears the value of the "uint_optional" field.

func (*MessageWithOptionalsUpdateOne) Exec

Exec executes the query on the entity.

func (*MessageWithOptionalsUpdateOne) ExecX

func (mwouo *MessageWithOptionalsUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithOptionalsUpdateOne) Mutation

Mutation returns the MessageWithOptionalsMutation object of the builder.

func (*MessageWithOptionalsUpdateOne) Save

Save executes the query and returns the updated MessageWithOptionals entity.

func (*MessageWithOptionalsUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*MessageWithOptionalsUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MessageWithOptionalsUpdateOne) SetBoolOptional

SetBoolOptional sets the "bool_optional" field.

func (*MessageWithOptionalsUpdateOne) SetBytesOptional

SetBytesOptional sets the "bytes_optional" field.

func (*MessageWithOptionalsUpdateOne) SetFloatOptional

SetFloatOptional sets the "float_optional" field.

func (*MessageWithOptionalsUpdateOne) SetIntOptional

SetIntOptional sets the "int_optional" field.

func (*MessageWithOptionalsUpdateOne) SetNillableBoolOptional

func (mwouo *MessageWithOptionalsUpdateOne) SetNillableBoolOptional(b *bool) *MessageWithOptionalsUpdateOne

SetNillableBoolOptional sets the "bool_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdateOne) SetNillableFloatOptional

func (mwouo *MessageWithOptionalsUpdateOne) SetNillableFloatOptional(f *float32) *MessageWithOptionalsUpdateOne

SetNillableFloatOptional sets the "float_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdateOne) SetNillableIntOptional

func (mwouo *MessageWithOptionalsUpdateOne) SetNillableIntOptional(i *int8) *MessageWithOptionalsUpdateOne

SetNillableIntOptional sets the "int_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdateOne) SetNillableStrOptional

func (mwouo *MessageWithOptionalsUpdateOne) SetNillableStrOptional(s *string) *MessageWithOptionalsUpdateOne

SetNillableStrOptional sets the "str_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdateOne) SetNillableTimeOptional

func (mwouo *MessageWithOptionalsUpdateOne) SetNillableTimeOptional(t *time.Time) *MessageWithOptionalsUpdateOne

SetNillableTimeOptional sets the "time_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdateOne) SetNillableUUIDOptional added in v0.3.0

func (mwouo *MessageWithOptionalsUpdateOne) SetNillableUUIDOptional(u *uuid.UUID) *MessageWithOptionalsUpdateOne

SetNillableUUIDOptional sets the "uuid_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdateOne) SetNillableUintOptional

func (mwouo *MessageWithOptionalsUpdateOne) SetNillableUintOptional(u *uint8) *MessageWithOptionalsUpdateOne

SetNillableUintOptional sets the "uint_optional" field if the given value is not nil.

func (*MessageWithOptionalsUpdateOne) SetStrOptional

SetStrOptional sets the "str_optional" field.

func (*MessageWithOptionalsUpdateOne) SetTimeOptional

SetTimeOptional sets the "time_optional" field.

func (*MessageWithOptionalsUpdateOne) SetUUIDOptional

SetUUIDOptional sets the "uuid_optional" field.

func (*MessageWithOptionalsUpdateOne) SetUintOptional

SetUintOptional sets the "uint_optional" field.

type MessageWithPackageName

type MessageWithPackageName struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// contains filtered or unexported fields
}

MessageWithPackageName is the model entity for the MessageWithPackageName schema.

func (*MessageWithPackageName) String

func (mwpn *MessageWithPackageName) String() string

String implements the fmt.Stringer.

func (*MessageWithPackageName) Unwrap

Unwrap unwraps the MessageWithPackageName 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 (*MessageWithPackageName) Update

Update returns a builder for updating this MessageWithPackageName. Note that you need to call MessageWithPackageName.Unwrap() before calling this method if this MessageWithPackageName was returned from a transaction, and the transaction was committed or rolled back.

type MessageWithPackageNameClient

type MessageWithPackageNameClient struct {
	// contains filtered or unexported fields
}

MessageWithPackageNameClient is a client for the MessageWithPackageName schema.

func NewMessageWithPackageNameClient

func NewMessageWithPackageNameClient(c config) *MessageWithPackageNameClient

NewMessageWithPackageNameClient returns a client for the MessageWithPackageName from the given config.

func (*MessageWithPackageNameClient) Create

Create returns a builder for creating a MessageWithPackageName entity.

func (*MessageWithPackageNameClient) CreateBulk

CreateBulk returns a builder for creating a bulk of MessageWithPackageName entities.

func (*MessageWithPackageNameClient) Delete

Delete returns a delete builder for MessageWithPackageName.

func (*MessageWithPackageNameClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MessageWithPackageNameClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MessageWithPackageNameClient) Get

Get returns a MessageWithPackageName entity by its id.

func (*MessageWithPackageNameClient) GetX

GetX is like Get, but panics if an error occurs.

func (*MessageWithPackageNameClient) Hooks

func (c *MessageWithPackageNameClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MessageWithPackageNameClient) Intercept added in v0.3.5

func (c *MessageWithPackageNameClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `messagewithpackagename.Intercept(f(g(h())))`.

func (*MessageWithPackageNameClient) Interceptors added in v0.3.5

func (c *MessageWithPackageNameClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MessageWithPackageNameClient) Query

Query returns a query builder for MessageWithPackageName.

func (*MessageWithPackageNameClient) Update

Update returns an update builder for MessageWithPackageName.

func (*MessageWithPackageNameClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MessageWithPackageNameClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*MessageWithPackageNameClient) Use

func (c *MessageWithPackageNameClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `messagewithpackagename.Hooks(f(g(h())))`.

type MessageWithPackageNameCreate

type MessageWithPackageNameCreate struct {
	// contains filtered or unexported fields
}

MessageWithPackageNameCreate is the builder for creating a MessageWithPackageName entity.

func (*MessageWithPackageNameCreate) Exec added in v0.2.0

Exec executes the query.

func (*MessageWithPackageNameCreate) ExecX added in v0.2.0

func (mwpnc *MessageWithPackageNameCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithPackageNameCreate) Mutation

Mutation returns the MessageWithPackageNameMutation object of the builder.

func (*MessageWithPackageNameCreate) Save

Save creates the MessageWithPackageName in the database.

func (*MessageWithPackageNameCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*MessageWithPackageNameCreate) SetName

SetName sets the "name" field.

type MessageWithPackageNameCreateBulk

type MessageWithPackageNameCreateBulk struct {
	// contains filtered or unexported fields
}

MessageWithPackageNameCreateBulk is the builder for creating many MessageWithPackageName entities in bulk.

func (*MessageWithPackageNameCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*MessageWithPackageNameCreateBulk) ExecX added in v0.2.0

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithPackageNameCreateBulk) Save

Save creates the MessageWithPackageName entities in the database.

func (*MessageWithPackageNameCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type MessageWithPackageNameDelete

type MessageWithPackageNameDelete struct {
	// contains filtered or unexported fields
}

MessageWithPackageNameDelete is the builder for deleting a MessageWithPackageName entity.

func (*MessageWithPackageNameDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*MessageWithPackageNameDelete) ExecX

func (mwpnd *MessageWithPackageNameDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithPackageNameDelete) Where

Where appends a list predicates to the MessageWithPackageNameDelete builder.

type MessageWithPackageNameDeleteOne

type MessageWithPackageNameDeleteOne struct {
	// contains filtered or unexported fields
}

MessageWithPackageNameDeleteOne is the builder for deleting a single MessageWithPackageName entity.

func (*MessageWithPackageNameDeleteOne) Exec

Exec executes the deletion query.

func (*MessageWithPackageNameDeleteOne) ExecX

func (mwpndo *MessageWithPackageNameDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MessageWithPackageNameGroupBy

type MessageWithPackageNameGroupBy struct {
	// contains filtered or unexported fields
}

MessageWithPackageNameGroupBy is the group-by builder for MessageWithPackageName entities.

func (*MessageWithPackageNameGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*MessageWithPackageNameGroupBy) Bool

func (s *MessageWithPackageNameGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameGroupBy) BoolX

func (s *MessageWithPackageNameGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithPackageNameGroupBy) Bools

func (s *MessageWithPackageNameGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameGroupBy) BoolsX

func (s *MessageWithPackageNameGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithPackageNameGroupBy) Float64

func (s *MessageWithPackageNameGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameGroupBy) Float64X

func (s *MessageWithPackageNameGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithPackageNameGroupBy) Float64s

func (s *MessageWithPackageNameGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameGroupBy) Float64sX

func (s *MessageWithPackageNameGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithPackageNameGroupBy) Int

func (s *MessageWithPackageNameGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameGroupBy) IntX

func (s *MessageWithPackageNameGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithPackageNameGroupBy) Ints

func (s *MessageWithPackageNameGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameGroupBy) IntsX

func (s *MessageWithPackageNameGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithPackageNameGroupBy) Scan

func (mwpngb *MessageWithPackageNameGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithPackageNameGroupBy) ScanX

func (s *MessageWithPackageNameGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithPackageNameGroupBy) String

func (s *MessageWithPackageNameGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameGroupBy) StringX

func (s *MessageWithPackageNameGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithPackageNameGroupBy) Strings

func (s *MessageWithPackageNameGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameGroupBy) StringsX

func (s *MessageWithPackageNameGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithPackageNameMutation

type MessageWithPackageNameMutation struct {
	// contains filtered or unexported fields
}

MessageWithPackageNameMutation represents an operation that mutates the MessageWithPackageName nodes in the graph.

func (*MessageWithPackageNameMutation) AddField

func (m *MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) AddedEdges

func (m *MessageWithPackageNameMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MessageWithPackageNameMutation) AddedField

func (m *MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) AddedFields

func (m *MessageWithPackageNameMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MessageWithPackageNameMutation) AddedIDs

func (m *MessageWithPackageNameMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MessageWithPackageNameMutation) ClearEdge

func (m *MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) ClearField

func (m *MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) ClearedEdges

func (m *MessageWithPackageNameMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MessageWithPackageNameMutation) ClearedFields

func (m *MessageWithPackageNameMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) EdgeCleared

func (m *MessageWithPackageNameMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MessageWithPackageNameMutation) Field

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*MessageWithPackageNameMutation) FieldCleared

func (m *MessageWithPackageNameMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MessageWithPackageNameMutation) Fields

func (m *MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) ID

func (m *MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) IDs added in v0.3.0

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 (*MessageWithPackageNameMutation) Name

func (m *MessageWithPackageNameMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*MessageWithPackageNameMutation) OldField

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*MessageWithPackageNameMutation) OldName

func (m *MessageWithPackageNameMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the MessageWithPackageName entity. If the MessageWithPackageName 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 (*MessageWithPackageNameMutation) Op

Op returns the operation name.

func (*MessageWithPackageNameMutation) RemovedEdges

func (m *MessageWithPackageNameMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MessageWithPackageNameMutation) RemovedIDs

func (m *MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) ResetEdge

func (m *MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) ResetField

func (m *MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) ResetName

func (m *MessageWithPackageNameMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*MessageWithPackageNameMutation) SetField

func (m *MessageWithPackageNameMutation) 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 (*MessageWithPackageNameMutation) SetName

func (m *MessageWithPackageNameMutation) SetName(s string)

SetName sets the "name" field.

func (*MessageWithPackageNameMutation) SetOp added in v0.3.5

func (m *MessageWithPackageNameMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (MessageWithPackageNameMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MessageWithPackageNameMutation) Type

Type returns the node type of this mutation (MessageWithPackageName).

func (*MessageWithPackageNameMutation) Where added in v0.2.0

Where appends a list predicates to the MessageWithPackageNameMutation builder.

func (*MessageWithPackageNameMutation) WhereP added in v0.3.5

func (m *MessageWithPackageNameMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MessageWithPackageNameMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MessageWithPackageNameQuery

type MessageWithPackageNameQuery struct {
	// contains filtered or unexported fields
}

MessageWithPackageNameQuery is the builder for querying MessageWithPackageName entities.

func (*MessageWithPackageNameQuery) Aggregate added in v0.3.4

Aggregate returns a MessageWithPackageNameSelect configured with the given aggregations.

func (*MessageWithPackageNameQuery) All

All executes the query and returns a list of MessageWithPackageNames.

func (*MessageWithPackageNameQuery) AllX

AllX is like All, but panics if an error occurs.

func (*MessageWithPackageNameQuery) Clone

Clone returns a duplicate of the MessageWithPackageNameQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MessageWithPackageNameQuery) Count

func (mwpnq *MessageWithPackageNameQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MessageWithPackageNameQuery) CountX

func (mwpnq *MessageWithPackageNameQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MessageWithPackageNameQuery) Exist

func (mwpnq *MessageWithPackageNameQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MessageWithPackageNameQuery) ExistX

func (mwpnq *MessageWithPackageNameQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MessageWithPackageNameQuery) First

First returns the first MessageWithPackageName entity from the query. Returns a *NotFoundError when no MessageWithPackageName was found.

func (*MessageWithPackageNameQuery) FirstID

func (mwpnq *MessageWithPackageNameQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MessageWithPackageName ID from the query. Returns a *NotFoundError when no MessageWithPackageName ID was found.

func (*MessageWithPackageNameQuery) FirstIDX

func (mwpnq *MessageWithPackageNameQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MessageWithPackageNameQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*MessageWithPackageNameQuery) GroupBy

func (mwpnq *MessageWithPackageNameQuery) GroupBy(field string, fields ...string) *MessageWithPackageNameGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MessageWithPackageName.Query().
	GroupBy(messagewithpackagename.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MessageWithPackageNameQuery) IDs

func (mwpnq *MessageWithPackageNameQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of MessageWithPackageName IDs.

func (*MessageWithPackageNameQuery) IDsX

func (mwpnq *MessageWithPackageNameQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MessageWithPackageNameQuery) Limit

Limit the number of records to be returned by this query.

func (*MessageWithPackageNameQuery) Offset

Offset to start from.

func (*MessageWithPackageNameQuery) Only

Only returns a single MessageWithPackageName entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MessageWithPackageName entity is found. Returns a *NotFoundError when no MessageWithPackageName entities are found.

func (*MessageWithPackageNameQuery) OnlyID

func (mwpnq *MessageWithPackageNameQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MessageWithPackageName ID in the query. Returns a *NotSingularError when more than one MessageWithPackageName ID is found. Returns a *NotFoundError when no entities are found.

func (*MessageWithPackageNameQuery) OnlyIDX

func (mwpnq *MessageWithPackageNameQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MessageWithPackageNameQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*MessageWithPackageNameQuery) Order

Order specifies how the records should be ordered.

func (*MessageWithPackageNameQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.MessageWithPackageName.Query().
	Select(messagewithpackagename.FieldName).
	Scan(ctx, &v)

func (*MessageWithPackageNameQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*MessageWithPackageNameQuery) Where

Where adds a new predicate for the MessageWithPackageNameQuery builder.

type MessageWithPackageNameSelect

type MessageWithPackageNameSelect struct {
	*MessageWithPackageNameQuery
	// contains filtered or unexported fields
}

MessageWithPackageNameSelect is the builder for selecting fields of MessageWithPackageName entities.

func (*MessageWithPackageNameSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*MessageWithPackageNameSelect) Bool

func (s *MessageWithPackageNameSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameSelect) BoolX

func (s *MessageWithPackageNameSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithPackageNameSelect) Bools

func (s *MessageWithPackageNameSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameSelect) BoolsX

func (s *MessageWithPackageNameSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithPackageNameSelect) Float64

func (s *MessageWithPackageNameSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameSelect) Float64X

func (s *MessageWithPackageNameSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithPackageNameSelect) Float64s

func (s *MessageWithPackageNameSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameSelect) Float64sX

func (s *MessageWithPackageNameSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithPackageNameSelect) Int

func (s *MessageWithPackageNameSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameSelect) IntX

func (s *MessageWithPackageNameSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithPackageNameSelect) Ints

func (s *MessageWithPackageNameSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameSelect) IntsX

func (s *MessageWithPackageNameSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithPackageNameSelect) Scan

Scan applies the selector query and scans the result into the given value.

func (*MessageWithPackageNameSelect) ScanX

func (s *MessageWithPackageNameSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithPackageNameSelect) String

func (s *MessageWithPackageNameSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameSelect) StringX

func (s *MessageWithPackageNameSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithPackageNameSelect) Strings

func (s *MessageWithPackageNameSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithPackageNameSelect) StringsX

func (s *MessageWithPackageNameSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithPackageNameUpdate

type MessageWithPackageNameUpdate struct {
	// contains filtered or unexported fields
}

MessageWithPackageNameUpdate is the builder for updating MessageWithPackageName entities.

func (*MessageWithPackageNameUpdate) Exec

Exec executes the query.

func (*MessageWithPackageNameUpdate) ExecX

func (mwpnu *MessageWithPackageNameUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithPackageNameUpdate) Mutation

Mutation returns the MessageWithPackageNameMutation object of the builder.

func (*MessageWithPackageNameUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*MessageWithPackageNameUpdate) SaveX

func (mwpnu *MessageWithPackageNameUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MessageWithPackageNameUpdate) SetName

SetName sets the "name" field.

func (*MessageWithPackageNameUpdate) Where

Where appends a list predicates to the MessageWithPackageNameUpdate builder.

type MessageWithPackageNameUpdateOne

type MessageWithPackageNameUpdateOne struct {
	// contains filtered or unexported fields
}

MessageWithPackageNameUpdateOne is the builder for updating a single MessageWithPackageName entity.

func (*MessageWithPackageNameUpdateOne) Exec

Exec executes the query on the entity.

func (*MessageWithPackageNameUpdateOne) ExecX

func (mwpnuo *MessageWithPackageNameUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithPackageNameUpdateOne) Mutation

Mutation returns the MessageWithPackageNameMutation object of the builder.

func (*MessageWithPackageNameUpdateOne) Save

Save executes the query and returns the updated MessageWithPackageName entity.

func (*MessageWithPackageNameUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*MessageWithPackageNameUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MessageWithPackageNameUpdateOne) SetName

SetName sets the "name" field.

type MessageWithPackageNames

type MessageWithPackageNames []*MessageWithPackageName

MessageWithPackageNames is a parsable slice of MessageWithPackageName.

type MessageWithStrings added in v0.3.0

type MessageWithStrings struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Strings holds the value of the "strings" field.
	Strings []string `json:"strings,omitempty"`
	// contains filtered or unexported fields
}

MessageWithStrings is the model entity for the MessageWithStrings schema.

func (*MessageWithStrings) String added in v0.3.0

func (mws *MessageWithStrings) String() string

String implements the fmt.Stringer.

func (*MessageWithStrings) Unwrap added in v0.3.0

func (mws *MessageWithStrings) Unwrap() *MessageWithStrings

Unwrap unwraps the MessageWithStrings 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 (*MessageWithStrings) Update added in v0.3.0

Update returns a builder for updating this MessageWithStrings. Note that you need to call MessageWithStrings.Unwrap() before calling this method if this MessageWithStrings was returned from a transaction, and the transaction was committed or rolled back.

type MessageWithStringsClient added in v0.3.0

type MessageWithStringsClient struct {
	// contains filtered or unexported fields
}

MessageWithStringsClient is a client for the MessageWithStrings schema.

func NewMessageWithStringsClient added in v0.3.0

func NewMessageWithStringsClient(c config) *MessageWithStringsClient

NewMessageWithStringsClient returns a client for the MessageWithStrings from the given config.

func (*MessageWithStringsClient) Create added in v0.3.0

Create returns a builder for creating a MessageWithStrings entity.

func (*MessageWithStringsClient) CreateBulk added in v0.3.0

CreateBulk returns a builder for creating a bulk of MessageWithStrings entities.

func (*MessageWithStringsClient) Delete added in v0.3.0

Delete returns a delete builder for MessageWithStrings.

func (*MessageWithStringsClient) DeleteOne added in v0.3.0

DeleteOne returns a builder for deleting the given entity.

func (*MessageWithStringsClient) DeleteOneID added in v0.3.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MessageWithStringsClient) Get added in v0.3.0

Get returns a MessageWithStrings entity by its id.

func (*MessageWithStringsClient) GetX added in v0.3.0

GetX is like Get, but panics if an error occurs.

func (*MessageWithStringsClient) Hooks added in v0.3.0

func (c *MessageWithStringsClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MessageWithStringsClient) Intercept added in v0.3.5

func (c *MessageWithStringsClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `messagewithstrings.Intercept(f(g(h())))`.

func (*MessageWithStringsClient) Interceptors added in v0.3.5

func (c *MessageWithStringsClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MessageWithStringsClient) Query added in v0.3.0

Query returns a query builder for MessageWithStrings.

func (*MessageWithStringsClient) Update added in v0.3.0

Update returns an update builder for MessageWithStrings.

func (*MessageWithStringsClient) UpdateOne added in v0.3.0

UpdateOne returns an update builder for the given entity.

func (*MessageWithStringsClient) UpdateOneID added in v0.3.0

UpdateOneID returns an update builder for the given id.

func (*MessageWithStringsClient) Use added in v0.3.0

func (c *MessageWithStringsClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `messagewithstrings.Hooks(f(g(h())))`.

type MessageWithStringsCreate added in v0.3.0

type MessageWithStringsCreate struct {
	// contains filtered or unexported fields
}

MessageWithStringsCreate is the builder for creating a MessageWithStrings entity.

func (*MessageWithStringsCreate) Exec added in v0.3.0

Exec executes the query.

func (*MessageWithStringsCreate) ExecX added in v0.3.0

func (mwsc *MessageWithStringsCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithStringsCreate) Mutation added in v0.3.0

Mutation returns the MessageWithStringsMutation object of the builder.

func (*MessageWithStringsCreate) Save added in v0.3.0

Save creates the MessageWithStrings in the database.

func (*MessageWithStringsCreate) SaveX added in v0.3.0

SaveX calls Save and panics if Save returns an error.

func (*MessageWithStringsCreate) SetStrings added in v0.3.0

SetStrings sets the "strings" field.

type MessageWithStringsCreateBulk added in v0.3.0

type MessageWithStringsCreateBulk struct {
	// contains filtered or unexported fields
}

MessageWithStringsCreateBulk is the builder for creating many MessageWithStrings entities in bulk.

func (*MessageWithStringsCreateBulk) Exec added in v0.3.0

Exec executes the query.

func (*MessageWithStringsCreateBulk) ExecX added in v0.3.0

func (mwscb *MessageWithStringsCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithStringsCreateBulk) Save added in v0.3.0

Save creates the MessageWithStrings entities in the database.

func (*MessageWithStringsCreateBulk) SaveX added in v0.3.0

SaveX is like Save, but panics if an error occurs.

type MessageWithStringsDelete added in v0.3.0

type MessageWithStringsDelete struct {
	// contains filtered or unexported fields
}

MessageWithStringsDelete is the builder for deleting a MessageWithStrings entity.

func (*MessageWithStringsDelete) Exec added in v0.3.0

func (mwsd *MessageWithStringsDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MessageWithStringsDelete) ExecX added in v0.3.0

func (mwsd *MessageWithStringsDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithStringsDelete) Where added in v0.3.0

Where appends a list predicates to the MessageWithStringsDelete builder.

type MessageWithStringsDeleteOne added in v0.3.0

type MessageWithStringsDeleteOne struct {
	// contains filtered or unexported fields
}

MessageWithStringsDeleteOne is the builder for deleting a single MessageWithStrings entity.

func (*MessageWithStringsDeleteOne) Exec added in v0.3.0

Exec executes the deletion query.

func (*MessageWithStringsDeleteOne) ExecX added in v0.3.0

func (mwsdo *MessageWithStringsDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MessageWithStringsGroupBy added in v0.3.0

type MessageWithStringsGroupBy struct {
	// contains filtered or unexported fields
}

MessageWithStringsGroupBy is the group-by builder for MessageWithStrings entities.

func (*MessageWithStringsGroupBy) Aggregate added in v0.3.0

Aggregate adds the given aggregation functions to the group-by query.

func (*MessageWithStringsGroupBy) Bool added in v0.3.0

func (s *MessageWithStringsGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsGroupBy) BoolX added in v0.3.0

func (s *MessageWithStringsGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithStringsGroupBy) Bools added in v0.3.0

func (s *MessageWithStringsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsGroupBy) BoolsX added in v0.3.0

func (s *MessageWithStringsGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithStringsGroupBy) Float64 added in v0.3.0

func (s *MessageWithStringsGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsGroupBy) Float64X added in v0.3.0

func (s *MessageWithStringsGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithStringsGroupBy) Float64s added in v0.3.0

func (s *MessageWithStringsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsGroupBy) Float64sX added in v0.3.0

func (s *MessageWithStringsGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithStringsGroupBy) Int added in v0.3.0

func (s *MessageWithStringsGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsGroupBy) IntX added in v0.3.0

func (s *MessageWithStringsGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithStringsGroupBy) Ints added in v0.3.0

func (s *MessageWithStringsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsGroupBy) IntsX added in v0.3.0

func (s *MessageWithStringsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithStringsGroupBy) Scan added in v0.3.0

func (mwsgb *MessageWithStringsGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithStringsGroupBy) ScanX added in v0.3.0

func (s *MessageWithStringsGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithStringsGroupBy) String added in v0.3.0

func (s *MessageWithStringsGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsGroupBy) StringX added in v0.3.0

func (s *MessageWithStringsGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithStringsGroupBy) Strings added in v0.3.0

func (s *MessageWithStringsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsGroupBy) StringsX added in v0.3.0

func (s *MessageWithStringsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithStringsMutation added in v0.3.0

type MessageWithStringsMutation struct {
	// contains filtered or unexported fields
}

MessageWithStringsMutation represents an operation that mutates the MessageWithStrings nodes in the graph.

func (*MessageWithStringsMutation) AddField added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) AddedEdges added in v0.3.0

func (m *MessageWithStringsMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MessageWithStringsMutation) AddedField added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) AddedFields added in v0.3.0

func (m *MessageWithStringsMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MessageWithStringsMutation) AddedIDs added in v0.3.0

func (m *MessageWithStringsMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MessageWithStringsMutation) AppendStrings added in v0.3.3

func (m *MessageWithStringsMutation) AppendStrings(s []string)

AppendStrings adds s to the "strings" field.

func (*MessageWithStringsMutation) AppendedStrings added in v0.3.3

func (m *MessageWithStringsMutation) AppendedStrings() ([]string, bool)

AppendedStrings returns the list of values that were appended to the "strings" field in this mutation.

func (*MessageWithStringsMutation) ClearEdge added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) ClearField added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) ClearedEdges added in v0.3.0

func (m *MessageWithStringsMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MessageWithStringsMutation) ClearedFields added in v0.3.0

func (m *MessageWithStringsMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MessageWithStringsMutation) Client added in v0.3.0

func (m MessageWithStringsMutation) 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 (*MessageWithStringsMutation) EdgeCleared added in v0.3.0

func (m *MessageWithStringsMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MessageWithStringsMutation) Field added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) FieldCleared added in v0.3.0

func (m *MessageWithStringsMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MessageWithStringsMutation) Fields added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) ID added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) IDs added in v0.3.0

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 (*MessageWithStringsMutation) OldField added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) OldStrings added in v0.3.0

func (m *MessageWithStringsMutation) OldStrings(ctx context.Context) (v []string, err error)

OldStrings returns the old "strings" field's value of the MessageWithStrings entity. If the MessageWithStrings 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 (*MessageWithStringsMutation) Op added in v0.3.0

Op returns the operation name.

func (*MessageWithStringsMutation) RemovedEdges added in v0.3.0

func (m *MessageWithStringsMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MessageWithStringsMutation) RemovedIDs added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) ResetEdge added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) ResetField added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) ResetStrings added in v0.3.0

func (m *MessageWithStringsMutation) ResetStrings()

ResetStrings resets all changes to the "strings" field.

func (*MessageWithStringsMutation) SetField added in v0.3.0

func (m *MessageWithStringsMutation) 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 (*MessageWithStringsMutation) SetOp added in v0.3.5

func (m *MessageWithStringsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MessageWithStringsMutation) SetStrings added in v0.3.0

func (m *MessageWithStringsMutation) SetStrings(s []string)

SetStrings sets the "strings" field.

func (*MessageWithStringsMutation) Strings added in v0.3.0

func (m *MessageWithStringsMutation) Strings() (r []string, exists bool)

Strings returns the value of the "strings" field in the mutation.

func (MessageWithStringsMutation) Tx added in v0.3.0

func (m MessageWithStringsMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MessageWithStringsMutation) Type added in v0.3.0

Type returns the node type of this mutation (MessageWithStrings).

func (*MessageWithStringsMutation) Where added in v0.3.0

Where appends a list predicates to the MessageWithStringsMutation builder.

func (*MessageWithStringsMutation) WhereP added in v0.3.5

func (m *MessageWithStringsMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MessageWithStringsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MessageWithStringsQuery added in v0.3.0

type MessageWithStringsQuery struct {
	// contains filtered or unexported fields
}

MessageWithStringsQuery is the builder for querying MessageWithStrings entities.

func (*MessageWithStringsQuery) Aggregate added in v0.3.4

Aggregate returns a MessageWithStringsSelect configured with the given aggregations.

func (*MessageWithStringsQuery) All added in v0.3.0

All executes the query and returns a list of MessageWithStringsSlice.

func (*MessageWithStringsQuery) AllX added in v0.3.0

AllX is like All, but panics if an error occurs.

func (*MessageWithStringsQuery) Clone added in v0.3.0

Clone returns a duplicate of the MessageWithStringsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MessageWithStringsQuery) Count added in v0.3.0

func (mwsq *MessageWithStringsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MessageWithStringsQuery) CountX added in v0.3.0

func (mwsq *MessageWithStringsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MessageWithStringsQuery) Exist added in v0.3.0

func (mwsq *MessageWithStringsQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MessageWithStringsQuery) ExistX added in v0.3.0

func (mwsq *MessageWithStringsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MessageWithStringsQuery) First added in v0.3.0

First returns the first MessageWithStrings entity from the query. Returns a *NotFoundError when no MessageWithStrings was found.

func (*MessageWithStringsQuery) FirstID added in v0.3.0

func (mwsq *MessageWithStringsQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MessageWithStrings ID from the query. Returns a *NotFoundError when no MessageWithStrings ID was found.

func (*MessageWithStringsQuery) FirstIDX added in v0.3.0

func (mwsq *MessageWithStringsQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MessageWithStringsQuery) FirstX added in v0.3.0

FirstX is like First, but panics if an error occurs.

func (*MessageWithStringsQuery) GroupBy added in v0.3.0

func (mwsq *MessageWithStringsQuery) GroupBy(field string, fields ...string) *MessageWithStringsGroupBy

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 {
	Strings []string `json:"strings,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MessageWithStrings.Query().
	GroupBy(messagewithstrings.FieldStrings).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MessageWithStringsQuery) IDs added in v0.3.0

func (mwsq *MessageWithStringsQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of MessageWithStrings IDs.

func (*MessageWithStringsQuery) IDsX added in v0.3.0

func (mwsq *MessageWithStringsQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MessageWithStringsQuery) Limit added in v0.3.0

Limit the number of records to be returned by this query.

func (*MessageWithStringsQuery) Offset added in v0.3.0

func (mwsq *MessageWithStringsQuery) Offset(offset int) *MessageWithStringsQuery

Offset to start from.

func (*MessageWithStringsQuery) Only added in v0.3.0

Only returns a single MessageWithStrings entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MessageWithStrings entity is found. Returns a *NotFoundError when no MessageWithStrings entities are found.

func (*MessageWithStringsQuery) OnlyID added in v0.3.0

func (mwsq *MessageWithStringsQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MessageWithStrings ID in the query. Returns a *NotSingularError when more than one MessageWithStrings ID is found. Returns a *NotFoundError when no entities are found.

func (*MessageWithStringsQuery) OnlyIDX added in v0.3.0

func (mwsq *MessageWithStringsQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MessageWithStringsQuery) OnlyX added in v0.3.0

OnlyX is like Only, but panics if an error occurs.

func (*MessageWithStringsQuery) Order added in v0.3.0

Order specifies how the records should be ordered.

func (*MessageWithStringsQuery) Select added in v0.3.0

func (mwsq *MessageWithStringsQuery) Select(fields ...string) *MessageWithStringsSelect

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 {
	Strings []string `json:"strings,omitempty"`
}

client.MessageWithStrings.Query().
	Select(messagewithstrings.FieldStrings).
	Scan(ctx, &v)

func (*MessageWithStringsQuery) Unique added in v0.3.0

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 (*MessageWithStringsQuery) Where added in v0.3.0

Where adds a new predicate for the MessageWithStringsQuery builder.

type MessageWithStringsSelect added in v0.3.0

type MessageWithStringsSelect struct {
	*MessageWithStringsQuery
	// contains filtered or unexported fields
}

MessageWithStringsSelect is the builder for selecting fields of MessageWithStrings entities.

func (*MessageWithStringsSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*MessageWithStringsSelect) Bool added in v0.3.0

func (s *MessageWithStringsSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsSelect) BoolX added in v0.3.0

func (s *MessageWithStringsSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MessageWithStringsSelect) Bools added in v0.3.0

func (s *MessageWithStringsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsSelect) BoolsX added in v0.3.0

func (s *MessageWithStringsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MessageWithStringsSelect) Float64 added in v0.3.0

func (s *MessageWithStringsSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsSelect) Float64X added in v0.3.0

func (s *MessageWithStringsSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MessageWithStringsSelect) Float64s added in v0.3.0

func (s *MessageWithStringsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsSelect) Float64sX added in v0.3.0

func (s *MessageWithStringsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MessageWithStringsSelect) Int added in v0.3.0

func (s *MessageWithStringsSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsSelect) IntX added in v0.3.0

func (s *MessageWithStringsSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MessageWithStringsSelect) Ints added in v0.3.0

func (s *MessageWithStringsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsSelect) IntsX added in v0.3.0

func (s *MessageWithStringsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MessageWithStringsSelect) Scan added in v0.3.0

func (mwss *MessageWithStringsSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MessageWithStringsSelect) ScanX added in v0.3.0

func (s *MessageWithStringsSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MessageWithStringsSelect) String added in v0.3.0

func (s *MessageWithStringsSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsSelect) StringX added in v0.3.0

func (s *MessageWithStringsSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MessageWithStringsSelect) Strings added in v0.3.0

func (s *MessageWithStringsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MessageWithStringsSelect) StringsX added in v0.3.0

func (s *MessageWithStringsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MessageWithStringsSlice added in v0.3.0

type MessageWithStringsSlice []*MessageWithStrings

MessageWithStringsSlice is a parsable slice of MessageWithStrings.

type MessageWithStringsUpdate added in v0.3.0

type MessageWithStringsUpdate struct {
	// contains filtered or unexported fields
}

MessageWithStringsUpdate is the builder for updating MessageWithStrings entities.

func (*MessageWithStringsUpdate) AppendStrings added in v0.3.3

func (mwsu *MessageWithStringsUpdate) AppendStrings(s []string) *MessageWithStringsUpdate

AppendStrings appends s to the "strings" field.

func (*MessageWithStringsUpdate) Exec added in v0.3.0

Exec executes the query.

func (*MessageWithStringsUpdate) ExecX added in v0.3.0

func (mwsu *MessageWithStringsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithStringsUpdate) Mutation added in v0.3.0

Mutation returns the MessageWithStringsMutation object of the builder.

func (*MessageWithStringsUpdate) Save added in v0.3.0

func (mwsu *MessageWithStringsUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MessageWithStringsUpdate) SaveX added in v0.3.0

func (mwsu *MessageWithStringsUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MessageWithStringsUpdate) SetStrings added in v0.3.0

SetStrings sets the "strings" field.

func (*MessageWithStringsUpdate) Where added in v0.3.0

Where appends a list predicates to the MessageWithStringsUpdate builder.

type MessageWithStringsUpdateOne added in v0.3.0

type MessageWithStringsUpdateOne struct {
	// contains filtered or unexported fields
}

MessageWithStringsUpdateOne is the builder for updating a single MessageWithStrings entity.

func (*MessageWithStringsUpdateOne) AppendStrings added in v0.3.3

AppendStrings appends s to the "strings" field.

func (*MessageWithStringsUpdateOne) Exec added in v0.3.0

Exec executes the query on the entity.

func (*MessageWithStringsUpdateOne) ExecX added in v0.3.0

func (mwsuo *MessageWithStringsUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MessageWithStringsUpdateOne) Mutation added in v0.3.0

Mutation returns the MessageWithStringsMutation object of the builder.

func (*MessageWithStringsUpdateOne) Save added in v0.3.0

Save executes the query and returns the updated MessageWithStrings entity.

func (*MessageWithStringsUpdateOne) SaveX added in v0.3.0

SaveX is like Save, but panics if an error occurs.

func (*MessageWithStringsUpdateOne) Select added in v0.3.0

func (mwsuo *MessageWithStringsUpdateOne) Select(field string, fields ...string) *MessageWithStringsUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MessageWithStringsUpdateOne) SetStrings added in v0.3.0

SetStrings sets the "strings" field.

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 NoBackref added in v0.3.0

type NoBackref 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 NoBackrefQuery when eager-loading is set.
	Edges NoBackrefEdges `json:"edges"`
	// contains filtered or unexported fields
}

NoBackref is the model entity for the NoBackref schema.

func (*NoBackref) QueryImages added in v0.3.0

func (nb *NoBackref) QueryImages() *ImageQuery

QueryImages queries the "images" edge of the NoBackref entity.

func (*NoBackref) String added in v0.3.0

func (nb *NoBackref) String() string

String implements the fmt.Stringer.

func (*NoBackref) Unwrap added in v0.3.0

func (nb *NoBackref) Unwrap() *NoBackref

Unwrap unwraps the NoBackref 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 (*NoBackref) Update added in v0.3.0

func (nb *NoBackref) Update() *NoBackrefUpdateOne

Update returns a builder for updating this NoBackref. Note that you need to call NoBackref.Unwrap() before calling this method if this NoBackref was returned from a transaction, and the transaction was committed or rolled back.

type NoBackrefClient added in v0.3.0

type NoBackrefClient struct {
	// contains filtered or unexported fields
}

NoBackrefClient is a client for the NoBackref schema.

func NewNoBackrefClient added in v0.3.0

func NewNoBackrefClient(c config) *NoBackrefClient

NewNoBackrefClient returns a client for the NoBackref from the given config.

func (*NoBackrefClient) Create added in v0.3.0

func (c *NoBackrefClient) Create() *NoBackrefCreate

Create returns a builder for creating a NoBackref entity.

func (*NoBackrefClient) CreateBulk added in v0.3.0

func (c *NoBackrefClient) CreateBulk(builders ...*NoBackrefCreate) *NoBackrefCreateBulk

CreateBulk returns a builder for creating a bulk of NoBackref entities.

func (*NoBackrefClient) Delete added in v0.3.0

func (c *NoBackrefClient) Delete() *NoBackrefDelete

Delete returns a delete builder for NoBackref.

func (*NoBackrefClient) DeleteOne added in v0.3.0

func (c *NoBackrefClient) DeleteOne(nb *NoBackref) *NoBackrefDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NoBackrefClient) DeleteOneID added in v0.3.0

func (c *NoBackrefClient) DeleteOneID(id int) *NoBackrefDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*NoBackrefClient) Get added in v0.3.0

func (c *NoBackrefClient) Get(ctx context.Context, id int) (*NoBackref, error)

Get returns a NoBackref entity by its id.

func (*NoBackrefClient) GetX added in v0.3.0

func (c *NoBackrefClient) GetX(ctx context.Context, id int) *NoBackref

GetX is like Get, but panics if an error occurs.

func (*NoBackrefClient) Hooks added in v0.3.0

func (c *NoBackrefClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NoBackrefClient) Intercept added in v0.3.5

func (c *NoBackrefClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `nobackref.Intercept(f(g(h())))`.

func (*NoBackrefClient) Interceptors added in v0.3.5

func (c *NoBackrefClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*NoBackrefClient) Query added in v0.3.0

func (c *NoBackrefClient) Query() *NoBackrefQuery

Query returns a query builder for NoBackref.

func (*NoBackrefClient) QueryImages added in v0.3.0

func (c *NoBackrefClient) QueryImages(nb *NoBackref) *ImageQuery

QueryImages queries the images edge of a NoBackref.

func (*NoBackrefClient) Update added in v0.3.0

func (c *NoBackrefClient) Update() *NoBackrefUpdate

Update returns an update builder for NoBackref.

func (*NoBackrefClient) UpdateOne added in v0.3.0

func (c *NoBackrefClient) UpdateOne(nb *NoBackref) *NoBackrefUpdateOne

UpdateOne returns an update builder for the given entity.

func (*NoBackrefClient) UpdateOneID added in v0.3.0

func (c *NoBackrefClient) UpdateOneID(id int) *NoBackrefUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NoBackrefClient) Use added in v0.3.0

func (c *NoBackrefClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `nobackref.Hooks(f(g(h())))`.

type NoBackrefCreate added in v0.3.0

type NoBackrefCreate struct {
	// contains filtered or unexported fields
}

NoBackrefCreate is the builder for creating a NoBackref entity.

func (*NoBackrefCreate) AddImageIDs added in v0.3.0

func (nbc *NoBackrefCreate) AddImageIDs(ids ...uuid.UUID) *NoBackrefCreate

AddImageIDs adds the "images" edge to the Image entity by IDs.

func (*NoBackrefCreate) AddImages added in v0.3.0

func (nbc *NoBackrefCreate) AddImages(i ...*Image) *NoBackrefCreate

AddImages adds the "images" edges to the Image entity.

func (*NoBackrefCreate) Exec added in v0.3.0

func (nbc *NoBackrefCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NoBackrefCreate) ExecX added in v0.3.0

func (nbc *NoBackrefCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NoBackrefCreate) Mutation added in v0.3.0

func (nbc *NoBackrefCreate) Mutation() *NoBackrefMutation

Mutation returns the NoBackrefMutation object of the builder.

func (*NoBackrefCreate) Save added in v0.3.0

func (nbc *NoBackrefCreate) Save(ctx context.Context) (*NoBackref, error)

Save creates the NoBackref in the database.

func (*NoBackrefCreate) SaveX added in v0.3.0

func (nbc *NoBackrefCreate) SaveX(ctx context.Context) *NoBackref

SaveX calls Save and panics if Save returns an error.

type NoBackrefCreateBulk added in v0.3.0

type NoBackrefCreateBulk struct {
	// contains filtered or unexported fields
}

NoBackrefCreateBulk is the builder for creating many NoBackref entities in bulk.

func (*NoBackrefCreateBulk) Exec added in v0.3.0

func (nbcb *NoBackrefCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NoBackrefCreateBulk) ExecX added in v0.3.0

func (nbcb *NoBackrefCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NoBackrefCreateBulk) Save added in v0.3.0

func (nbcb *NoBackrefCreateBulk) Save(ctx context.Context) ([]*NoBackref, error)

Save creates the NoBackref entities in the database.

func (*NoBackrefCreateBulk) SaveX added in v0.3.0

func (nbcb *NoBackrefCreateBulk) SaveX(ctx context.Context) []*NoBackref

SaveX is like Save, but panics if an error occurs.

type NoBackrefDelete added in v0.3.0

type NoBackrefDelete struct {
	// contains filtered or unexported fields
}

NoBackrefDelete is the builder for deleting a NoBackref entity.

func (*NoBackrefDelete) Exec added in v0.3.0

func (nbd *NoBackrefDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NoBackrefDelete) ExecX added in v0.3.0

func (nbd *NoBackrefDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NoBackrefDelete) Where added in v0.3.0

Where appends a list predicates to the NoBackrefDelete builder.

type NoBackrefDeleteOne added in v0.3.0

type NoBackrefDeleteOne struct {
	// contains filtered or unexported fields
}

NoBackrefDeleteOne is the builder for deleting a single NoBackref entity.

func (*NoBackrefDeleteOne) Exec added in v0.3.0

func (nbdo *NoBackrefDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*NoBackrefDeleteOne) ExecX added in v0.3.0

func (nbdo *NoBackrefDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type NoBackrefEdges added in v0.3.0

type NoBackrefEdges struct {
	// Images holds the value of the images edge.
	Images []*Image `json:"images,omitempty"`
	// contains filtered or unexported fields
}

NoBackrefEdges holds the relations/edges for other nodes in the graph.

func (NoBackrefEdges) ImagesOrErr added in v0.3.0

func (e NoBackrefEdges) ImagesOrErr() ([]*Image, error)

ImagesOrErr returns the Images value or an error if the edge was not loaded in eager-loading.

type NoBackrefGroupBy added in v0.3.0

type NoBackrefGroupBy struct {
	// contains filtered or unexported fields
}

NoBackrefGroupBy is the group-by builder for NoBackref entities.

func (*NoBackrefGroupBy) Aggregate added in v0.3.0

func (nbgb *NoBackrefGroupBy) Aggregate(fns ...AggregateFunc) *NoBackrefGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*NoBackrefGroupBy) Bool added in v0.3.0

func (s *NoBackrefGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NoBackrefGroupBy) BoolX added in v0.3.0

func (s *NoBackrefGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NoBackrefGroupBy) Bools added in v0.3.0

func (s *NoBackrefGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NoBackrefGroupBy) BoolsX added in v0.3.0

func (s *NoBackrefGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NoBackrefGroupBy) Float64 added in v0.3.0

func (s *NoBackrefGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NoBackrefGroupBy) Float64X added in v0.3.0

func (s *NoBackrefGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NoBackrefGroupBy) Float64s added in v0.3.0

func (s *NoBackrefGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NoBackrefGroupBy) Float64sX added in v0.3.0

func (s *NoBackrefGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NoBackrefGroupBy) Int added in v0.3.0

func (s *NoBackrefGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NoBackrefGroupBy) IntX added in v0.3.0

func (s *NoBackrefGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NoBackrefGroupBy) Ints added in v0.3.0

func (s *NoBackrefGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NoBackrefGroupBy) IntsX added in v0.3.0

func (s *NoBackrefGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NoBackrefGroupBy) Scan added in v0.3.0

func (nbgb *NoBackrefGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NoBackrefGroupBy) ScanX added in v0.3.0

func (s *NoBackrefGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NoBackrefGroupBy) String added in v0.3.0

func (s *NoBackrefGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NoBackrefGroupBy) StringX added in v0.3.0

func (s *NoBackrefGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NoBackrefGroupBy) Strings added in v0.3.0

func (s *NoBackrefGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NoBackrefGroupBy) StringsX added in v0.3.0

func (s *NoBackrefGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NoBackrefMutation added in v0.3.0

type NoBackrefMutation struct {
	// contains filtered or unexported fields
}

NoBackrefMutation represents an operation that mutates the NoBackref nodes in the graph.

func (*NoBackrefMutation) AddField added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) AddImageIDs added in v0.3.0

func (m *NoBackrefMutation) AddImageIDs(ids ...uuid.UUID)

AddImageIDs adds the "images" edge to the Image entity by ids.

func (*NoBackrefMutation) AddedEdges added in v0.3.0

func (m *NoBackrefMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NoBackrefMutation) AddedField added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) AddedFields added in v0.3.0

func (m *NoBackrefMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NoBackrefMutation) AddedIDs added in v0.3.0

func (m *NoBackrefMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NoBackrefMutation) ClearEdge added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) ClearField added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) ClearImages added in v0.3.0

func (m *NoBackrefMutation) ClearImages()

ClearImages clears the "images" edge to the Image entity.

func (*NoBackrefMutation) ClearedEdges added in v0.3.0

func (m *NoBackrefMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NoBackrefMutation) ClearedFields added in v0.3.0

func (m *NoBackrefMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NoBackrefMutation) Client added in v0.3.0

func (m NoBackrefMutation) 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 (*NoBackrefMutation) EdgeCleared added in v0.3.0

func (m *NoBackrefMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NoBackrefMutation) Field added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) FieldCleared added in v0.3.0

func (m *NoBackrefMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NoBackrefMutation) Fields added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) ID added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) IDs added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) ImagesCleared added in v0.3.0

func (m *NoBackrefMutation) ImagesCleared() bool

ImagesCleared reports if the "images" edge to the Image entity was cleared.

func (*NoBackrefMutation) ImagesIDs added in v0.3.0

func (m *NoBackrefMutation) ImagesIDs() (ids []uuid.UUID)

ImagesIDs returns the "images" edge IDs in the mutation.

func (*NoBackrefMutation) OldField added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) Op added in v0.3.0

func (m *NoBackrefMutation) Op() Op

Op returns the operation name.

func (*NoBackrefMutation) RemoveImageIDs added in v0.3.0

func (m *NoBackrefMutation) RemoveImageIDs(ids ...uuid.UUID)

RemoveImageIDs removes the "images" edge to the Image entity by IDs.

func (*NoBackrefMutation) RemovedEdges added in v0.3.0

func (m *NoBackrefMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NoBackrefMutation) RemovedIDs added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) RemovedImagesIDs added in v0.3.0

func (m *NoBackrefMutation) RemovedImagesIDs() (ids []uuid.UUID)

RemovedImages returns the removed IDs of the "images" edge to the Image entity.

func (*NoBackrefMutation) ResetEdge added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) ResetField added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) ResetImages added in v0.3.0

func (m *NoBackrefMutation) ResetImages()

ResetImages resets all changes to the "images" edge.

func (*NoBackrefMutation) SetField added in v0.3.0

func (m *NoBackrefMutation) 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 (*NoBackrefMutation) SetOp added in v0.3.5

func (m *NoBackrefMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (NoBackrefMutation) Tx added in v0.3.0

func (m NoBackrefMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NoBackrefMutation) Type added in v0.3.0

func (m *NoBackrefMutation) Type() string

Type returns the node type of this mutation (NoBackref).

func (*NoBackrefMutation) Where added in v0.3.0

func (m *NoBackrefMutation) Where(ps ...predicate.NoBackref)

Where appends a list predicates to the NoBackrefMutation builder.

func (*NoBackrefMutation) WhereP added in v0.3.5

func (m *NoBackrefMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NoBackrefMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NoBackrefQuery added in v0.3.0

type NoBackrefQuery struct {
	// contains filtered or unexported fields
}

NoBackrefQuery is the builder for querying NoBackref entities.

func (*NoBackrefQuery) Aggregate added in v0.3.4

func (nbq *NoBackrefQuery) Aggregate(fns ...AggregateFunc) *NoBackrefSelect

Aggregate returns a NoBackrefSelect configured with the given aggregations.

func (*NoBackrefQuery) All added in v0.3.0

func (nbq *NoBackrefQuery) All(ctx context.Context) ([]*NoBackref, error)

All executes the query and returns a list of NoBackrefs.

func (*NoBackrefQuery) AllX added in v0.3.0

func (nbq *NoBackrefQuery) AllX(ctx context.Context) []*NoBackref

AllX is like All, but panics if an error occurs.

func (*NoBackrefQuery) Clone added in v0.3.0

func (nbq *NoBackrefQuery) Clone() *NoBackrefQuery

Clone returns a duplicate of the NoBackrefQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NoBackrefQuery) Count added in v0.3.0

func (nbq *NoBackrefQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NoBackrefQuery) CountX added in v0.3.0

func (nbq *NoBackrefQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NoBackrefQuery) Exist added in v0.3.0

func (nbq *NoBackrefQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NoBackrefQuery) ExistX added in v0.3.0

func (nbq *NoBackrefQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NoBackrefQuery) First added in v0.3.0

func (nbq *NoBackrefQuery) First(ctx context.Context) (*NoBackref, error)

First returns the first NoBackref entity from the query. Returns a *NotFoundError when no NoBackref was found.

func (*NoBackrefQuery) FirstID added in v0.3.0

func (nbq *NoBackrefQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first NoBackref ID from the query. Returns a *NotFoundError when no NoBackref ID was found.

func (*NoBackrefQuery) FirstIDX added in v0.3.0

func (nbq *NoBackrefQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*NoBackrefQuery) FirstX added in v0.3.0

func (nbq *NoBackrefQuery) FirstX(ctx context.Context) *NoBackref

FirstX is like First, but panics if an error occurs.

func (*NoBackrefQuery) GroupBy added in v0.3.0

func (nbq *NoBackrefQuery) GroupBy(field string, fields ...string) *NoBackrefGroupBy

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 (*NoBackrefQuery) IDs added in v0.3.0

func (nbq *NoBackrefQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of NoBackref IDs.

func (*NoBackrefQuery) IDsX added in v0.3.0

func (nbq *NoBackrefQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*NoBackrefQuery) Limit added in v0.3.0

func (nbq *NoBackrefQuery) Limit(limit int) *NoBackrefQuery

Limit the number of records to be returned by this query.

func (*NoBackrefQuery) Offset added in v0.3.0

func (nbq *NoBackrefQuery) Offset(offset int) *NoBackrefQuery

Offset to start from.

func (*NoBackrefQuery) Only added in v0.3.0

func (nbq *NoBackrefQuery) Only(ctx context.Context) (*NoBackref, error)

Only returns a single NoBackref entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NoBackref entity is found. Returns a *NotFoundError when no NoBackref entities are found.

func (*NoBackrefQuery) OnlyID added in v0.3.0

func (nbq *NoBackrefQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only NoBackref ID in the query. Returns a *NotSingularError when more than one NoBackref ID is found. Returns a *NotFoundError when no entities are found.

func (*NoBackrefQuery) OnlyIDX added in v0.3.0

func (nbq *NoBackrefQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NoBackrefQuery) OnlyX added in v0.3.0

func (nbq *NoBackrefQuery) OnlyX(ctx context.Context) *NoBackref

OnlyX is like Only, but panics if an error occurs.

func (*NoBackrefQuery) Order added in v0.3.0

func (nbq *NoBackrefQuery) Order(o ...OrderFunc) *NoBackrefQuery

Order specifies how the records should be ordered.

func (*NoBackrefQuery) QueryImages added in v0.3.0

func (nbq *NoBackrefQuery) QueryImages() *ImageQuery

QueryImages chains the current query on the "images" edge.

func (*NoBackrefQuery) Select added in v0.3.0

func (nbq *NoBackrefQuery) Select(fields ...string) *NoBackrefSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*NoBackrefQuery) Unique added in v0.3.0

func (nbq *NoBackrefQuery) Unique(unique bool) *NoBackrefQuery

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 (*NoBackrefQuery) Where added in v0.3.0

func (nbq *NoBackrefQuery) Where(ps ...predicate.NoBackref) *NoBackrefQuery

Where adds a new predicate for the NoBackrefQuery builder.

func (*NoBackrefQuery) WithImages added in v0.3.0

func (nbq *NoBackrefQuery) WithImages(opts ...func(*ImageQuery)) *NoBackrefQuery

WithImages tells the query-builder to eager-load the nodes that are connected to the "images" edge. The optional arguments are used to configure the query builder of the edge.

type NoBackrefSelect added in v0.3.0

type NoBackrefSelect struct {
	*NoBackrefQuery
	// contains filtered or unexported fields
}

NoBackrefSelect is the builder for selecting fields of NoBackref entities.

func (*NoBackrefSelect) Aggregate added in v0.3.4

func (nbs *NoBackrefSelect) Aggregate(fns ...AggregateFunc) *NoBackrefSelect

Aggregate adds the given aggregation functions to the selector query.

func (*NoBackrefSelect) Bool added in v0.3.0

func (s *NoBackrefSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NoBackrefSelect) BoolX added in v0.3.0

func (s *NoBackrefSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NoBackrefSelect) Bools added in v0.3.0

func (s *NoBackrefSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NoBackrefSelect) BoolsX added in v0.3.0

func (s *NoBackrefSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NoBackrefSelect) Float64 added in v0.3.0

func (s *NoBackrefSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NoBackrefSelect) Float64X added in v0.3.0

func (s *NoBackrefSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NoBackrefSelect) Float64s added in v0.3.0

func (s *NoBackrefSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NoBackrefSelect) Float64sX added in v0.3.0

func (s *NoBackrefSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NoBackrefSelect) Int added in v0.3.0

func (s *NoBackrefSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NoBackrefSelect) IntX added in v0.3.0

func (s *NoBackrefSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NoBackrefSelect) Ints added in v0.3.0

func (s *NoBackrefSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NoBackrefSelect) IntsX added in v0.3.0

func (s *NoBackrefSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NoBackrefSelect) Scan added in v0.3.0

func (nbs *NoBackrefSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NoBackrefSelect) ScanX added in v0.3.0

func (s *NoBackrefSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NoBackrefSelect) String added in v0.3.0

func (s *NoBackrefSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NoBackrefSelect) StringX added in v0.3.0

func (s *NoBackrefSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NoBackrefSelect) Strings added in v0.3.0

func (s *NoBackrefSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NoBackrefSelect) StringsX added in v0.3.0

func (s *NoBackrefSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NoBackrefUpdate added in v0.3.0

type NoBackrefUpdate struct {
	// contains filtered or unexported fields
}

NoBackrefUpdate is the builder for updating NoBackref entities.

func (*NoBackrefUpdate) AddImageIDs added in v0.3.0

func (nbu *NoBackrefUpdate) AddImageIDs(ids ...uuid.UUID) *NoBackrefUpdate

AddImageIDs adds the "images" edge to the Image entity by IDs.

func (*NoBackrefUpdate) AddImages added in v0.3.0

func (nbu *NoBackrefUpdate) AddImages(i ...*Image) *NoBackrefUpdate

AddImages adds the "images" edges to the Image entity.

func (*NoBackrefUpdate) ClearImages added in v0.3.0

func (nbu *NoBackrefUpdate) ClearImages() *NoBackrefUpdate

ClearImages clears all "images" edges to the Image entity.

func (*NoBackrefUpdate) Exec added in v0.3.0

func (nbu *NoBackrefUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NoBackrefUpdate) ExecX added in v0.3.0

func (nbu *NoBackrefUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NoBackrefUpdate) Mutation added in v0.3.0

func (nbu *NoBackrefUpdate) Mutation() *NoBackrefMutation

Mutation returns the NoBackrefMutation object of the builder.

func (*NoBackrefUpdate) RemoveImageIDs added in v0.3.0

func (nbu *NoBackrefUpdate) RemoveImageIDs(ids ...uuid.UUID) *NoBackrefUpdate

RemoveImageIDs removes the "images" edge to Image entities by IDs.

func (*NoBackrefUpdate) RemoveImages added in v0.3.0

func (nbu *NoBackrefUpdate) RemoveImages(i ...*Image) *NoBackrefUpdate

RemoveImages removes "images" edges to Image entities.

func (*NoBackrefUpdate) Save added in v0.3.0

func (nbu *NoBackrefUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NoBackrefUpdate) SaveX added in v0.3.0

func (nbu *NoBackrefUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NoBackrefUpdate) Where added in v0.3.0

Where appends a list predicates to the NoBackrefUpdate builder.

type NoBackrefUpdateOne added in v0.3.0

type NoBackrefUpdateOne struct {
	// contains filtered or unexported fields
}

NoBackrefUpdateOne is the builder for updating a single NoBackref entity.

func (*NoBackrefUpdateOne) AddImageIDs added in v0.3.0

func (nbuo *NoBackrefUpdateOne) AddImageIDs(ids ...uuid.UUID) *NoBackrefUpdateOne

AddImageIDs adds the "images" edge to the Image entity by IDs.

func (*NoBackrefUpdateOne) AddImages added in v0.3.0

func (nbuo *NoBackrefUpdateOne) AddImages(i ...*Image) *NoBackrefUpdateOne

AddImages adds the "images" edges to the Image entity.

func (*NoBackrefUpdateOne) ClearImages added in v0.3.0

func (nbuo *NoBackrefUpdateOne) ClearImages() *NoBackrefUpdateOne

ClearImages clears all "images" edges to the Image entity.

func (*NoBackrefUpdateOne) Exec added in v0.3.0

func (nbuo *NoBackrefUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*NoBackrefUpdateOne) ExecX added in v0.3.0

func (nbuo *NoBackrefUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NoBackrefUpdateOne) Mutation added in v0.3.0

func (nbuo *NoBackrefUpdateOne) Mutation() *NoBackrefMutation

Mutation returns the NoBackrefMutation object of the builder.

func (*NoBackrefUpdateOne) RemoveImageIDs added in v0.3.0

func (nbuo *NoBackrefUpdateOne) RemoveImageIDs(ids ...uuid.UUID) *NoBackrefUpdateOne

RemoveImageIDs removes the "images" edge to Image entities by IDs.

func (*NoBackrefUpdateOne) RemoveImages added in v0.3.0

func (nbuo *NoBackrefUpdateOne) RemoveImages(i ...*Image) *NoBackrefUpdateOne

RemoveImages removes "images" edges to Image entities.

func (*NoBackrefUpdateOne) Save added in v0.3.0

func (nbuo *NoBackrefUpdateOne) Save(ctx context.Context) (*NoBackref, error)

Save executes the query and returns the updated NoBackref entity.

func (*NoBackrefUpdateOne) SaveX added in v0.3.0

func (nbuo *NoBackrefUpdateOne) SaveX(ctx context.Context) *NoBackref

SaveX is like Save, but panics if an error occurs.

func (*NoBackrefUpdateOne) Select added in v0.3.0

func (nbuo *NoBackrefUpdateOne) Select(field string, fields ...string) *NoBackrefUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

type NoBackrefs added in v0.3.0

type NoBackrefs []*NoBackref

NoBackrefs is a parsable slice of NoBackref.

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 OneMethodService added in v0.2.0

type OneMethodService struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// contains filtered or unexported fields
}

OneMethodService is the model entity for the OneMethodService schema.

func (*OneMethodService) String added in v0.2.0

func (oms *OneMethodService) String() string

String implements the fmt.Stringer.

func (*OneMethodService) Unwrap added in v0.2.0

func (oms *OneMethodService) Unwrap() *OneMethodService

Unwrap unwraps the OneMethodService 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 (*OneMethodService) Update added in v0.2.0

Update returns a builder for updating this OneMethodService. Note that you need to call OneMethodService.Unwrap() before calling this method if this OneMethodService was returned from a transaction, and the transaction was committed or rolled back.

type OneMethodServiceClient added in v0.2.0

type OneMethodServiceClient struct {
	// contains filtered or unexported fields
}

OneMethodServiceClient is a client for the OneMethodService schema.

func NewOneMethodServiceClient added in v0.2.0

func NewOneMethodServiceClient(c config) *OneMethodServiceClient

NewOneMethodServiceClient returns a client for the OneMethodService from the given config.

func (*OneMethodServiceClient) Create added in v0.2.0

Create returns a builder for creating a OneMethodService entity.

func (*OneMethodServiceClient) CreateBulk added in v0.2.0

CreateBulk returns a builder for creating a bulk of OneMethodService entities.

func (*OneMethodServiceClient) Delete added in v0.2.0

Delete returns a delete builder for OneMethodService.

func (*OneMethodServiceClient) DeleteOne added in v0.2.0

DeleteOne returns a builder for deleting the given entity.

func (*OneMethodServiceClient) DeleteOneID added in v0.2.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OneMethodServiceClient) Get added in v0.2.0

Get returns a OneMethodService entity by its id.

func (*OneMethodServiceClient) GetX added in v0.2.0

GetX is like Get, but panics if an error occurs.

func (*OneMethodServiceClient) Hooks added in v0.2.0

func (c *OneMethodServiceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OneMethodServiceClient) Intercept added in v0.3.5

func (c *OneMethodServiceClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `onemethodservice.Intercept(f(g(h())))`.

func (*OneMethodServiceClient) Interceptors added in v0.3.5

func (c *OneMethodServiceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OneMethodServiceClient) Query added in v0.2.0

Query returns a query builder for OneMethodService.

func (*OneMethodServiceClient) Update added in v0.2.0

Update returns an update builder for OneMethodService.

func (*OneMethodServiceClient) UpdateOne added in v0.2.0

UpdateOne returns an update builder for the given entity.

func (*OneMethodServiceClient) UpdateOneID added in v0.2.0

UpdateOneID returns an update builder for the given id.

func (*OneMethodServiceClient) Use added in v0.2.0

func (c *OneMethodServiceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `onemethodservice.Hooks(f(g(h())))`.

type OneMethodServiceCreate added in v0.2.0

type OneMethodServiceCreate struct {
	// contains filtered or unexported fields
}

OneMethodServiceCreate is the builder for creating a OneMethodService entity.

func (*OneMethodServiceCreate) Exec added in v0.2.0

func (omsc *OneMethodServiceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OneMethodServiceCreate) ExecX added in v0.2.0

func (omsc *OneMethodServiceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OneMethodServiceCreate) Mutation added in v0.2.0

Mutation returns the OneMethodServiceMutation object of the builder.

func (*OneMethodServiceCreate) Save added in v0.2.0

Save creates the OneMethodService in the database.

func (*OneMethodServiceCreate) SaveX added in v0.2.0

SaveX calls Save and panics if Save returns an error.

type OneMethodServiceCreateBulk added in v0.2.0

type OneMethodServiceCreateBulk struct {
	// contains filtered or unexported fields
}

OneMethodServiceCreateBulk is the builder for creating many OneMethodService entities in bulk.

func (*OneMethodServiceCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*OneMethodServiceCreateBulk) ExecX added in v0.2.0

func (omscb *OneMethodServiceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OneMethodServiceCreateBulk) Save added in v0.2.0

Save creates the OneMethodService entities in the database.

func (*OneMethodServiceCreateBulk) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

type OneMethodServiceDelete added in v0.2.0

type OneMethodServiceDelete struct {
	// contains filtered or unexported fields
}

OneMethodServiceDelete is the builder for deleting a OneMethodService entity.

func (*OneMethodServiceDelete) Exec added in v0.2.0

func (omsd *OneMethodServiceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OneMethodServiceDelete) ExecX added in v0.2.0

func (omsd *OneMethodServiceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OneMethodServiceDelete) Where added in v0.2.0

Where appends a list predicates to the OneMethodServiceDelete builder.

type OneMethodServiceDeleteOne added in v0.2.0

type OneMethodServiceDeleteOne struct {
	// contains filtered or unexported fields
}

OneMethodServiceDeleteOne is the builder for deleting a single OneMethodService entity.

func (*OneMethodServiceDeleteOne) Exec added in v0.2.0

Exec executes the deletion query.

func (*OneMethodServiceDeleteOne) ExecX added in v0.2.0

func (omsdo *OneMethodServiceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type OneMethodServiceGroupBy added in v0.2.0

type OneMethodServiceGroupBy struct {
	// contains filtered or unexported fields
}

OneMethodServiceGroupBy is the group-by builder for OneMethodService entities.

func (*OneMethodServiceGroupBy) Aggregate added in v0.2.0

Aggregate adds the given aggregation functions to the group-by query.

func (*OneMethodServiceGroupBy) Bool added in v0.2.0

func (s *OneMethodServiceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceGroupBy) BoolX added in v0.2.0

func (s *OneMethodServiceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OneMethodServiceGroupBy) Bools added in v0.2.0

func (s *OneMethodServiceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceGroupBy) BoolsX added in v0.2.0

func (s *OneMethodServiceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OneMethodServiceGroupBy) Float64 added in v0.2.0

func (s *OneMethodServiceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceGroupBy) Float64X added in v0.2.0

func (s *OneMethodServiceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OneMethodServiceGroupBy) Float64s added in v0.2.0

func (s *OneMethodServiceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceGroupBy) Float64sX added in v0.2.0

func (s *OneMethodServiceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OneMethodServiceGroupBy) Int added in v0.2.0

func (s *OneMethodServiceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceGroupBy) IntX added in v0.2.0

func (s *OneMethodServiceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OneMethodServiceGroupBy) Ints added in v0.2.0

func (s *OneMethodServiceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceGroupBy) IntsX added in v0.2.0

func (s *OneMethodServiceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OneMethodServiceGroupBy) Scan added in v0.2.0

func (omsgb *OneMethodServiceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OneMethodServiceGroupBy) ScanX added in v0.2.0

func (s *OneMethodServiceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OneMethodServiceGroupBy) String added in v0.2.0

func (s *OneMethodServiceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceGroupBy) StringX added in v0.2.0

func (s *OneMethodServiceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OneMethodServiceGroupBy) Strings added in v0.2.0

func (s *OneMethodServiceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceGroupBy) StringsX added in v0.2.0

func (s *OneMethodServiceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OneMethodServiceMutation added in v0.2.0

type OneMethodServiceMutation struct {
	// contains filtered or unexported fields
}

OneMethodServiceMutation represents an operation that mutates the OneMethodService nodes in the graph.

func (*OneMethodServiceMutation) AddField added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) AddedEdges added in v0.2.0

func (m *OneMethodServiceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OneMethodServiceMutation) AddedField added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) AddedFields added in v0.2.0

func (m *OneMethodServiceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OneMethodServiceMutation) AddedIDs added in v0.2.0

func (m *OneMethodServiceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OneMethodServiceMutation) ClearEdge added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) ClearField added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) ClearedEdges added in v0.2.0

func (m *OneMethodServiceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OneMethodServiceMutation) ClearedFields added in v0.2.0

func (m *OneMethodServiceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OneMethodServiceMutation) Client added in v0.2.0

func (m OneMethodServiceMutation) 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 (*OneMethodServiceMutation) EdgeCleared added in v0.2.0

func (m *OneMethodServiceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OneMethodServiceMutation) Field added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) FieldCleared added in v0.2.0

func (m *OneMethodServiceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OneMethodServiceMutation) Fields added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) ID added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) IDs added in v0.3.0

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 (*OneMethodServiceMutation) OldField added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) Op added in v0.2.0

func (m *OneMethodServiceMutation) Op() Op

Op returns the operation name.

func (*OneMethodServiceMutation) RemovedEdges added in v0.2.0

func (m *OneMethodServiceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OneMethodServiceMutation) RemovedIDs added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) ResetEdge added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) ResetField added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) SetField added in v0.2.0

func (m *OneMethodServiceMutation) 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 (*OneMethodServiceMutation) SetOp added in v0.3.5

func (m *OneMethodServiceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (OneMethodServiceMutation) Tx added in v0.2.0

func (m OneMethodServiceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OneMethodServiceMutation) Type added in v0.2.0

func (m *OneMethodServiceMutation) Type() string

Type returns the node type of this mutation (OneMethodService).

func (*OneMethodServiceMutation) Where added in v0.2.0

Where appends a list predicates to the OneMethodServiceMutation builder.

func (*OneMethodServiceMutation) WhereP added in v0.3.5

func (m *OneMethodServiceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OneMethodServiceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OneMethodServiceQuery added in v0.2.0

type OneMethodServiceQuery struct {
	// contains filtered or unexported fields
}

OneMethodServiceQuery is the builder for querying OneMethodService entities.

func (*OneMethodServiceQuery) Aggregate added in v0.3.4

Aggregate returns a OneMethodServiceSelect configured with the given aggregations.

func (*OneMethodServiceQuery) All added in v0.2.0

All executes the query and returns a list of OneMethodServices.

func (*OneMethodServiceQuery) AllX added in v0.2.0

AllX is like All, but panics if an error occurs.

func (*OneMethodServiceQuery) Clone added in v0.2.0

Clone returns a duplicate of the OneMethodServiceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OneMethodServiceQuery) Count added in v0.2.0

func (omsq *OneMethodServiceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OneMethodServiceQuery) CountX added in v0.2.0

func (omsq *OneMethodServiceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OneMethodServiceQuery) Exist added in v0.2.0

func (omsq *OneMethodServiceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OneMethodServiceQuery) ExistX added in v0.2.0

func (omsq *OneMethodServiceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OneMethodServiceQuery) First added in v0.2.0

First returns the first OneMethodService entity from the query. Returns a *NotFoundError when no OneMethodService was found.

func (*OneMethodServiceQuery) FirstID added in v0.2.0

func (omsq *OneMethodServiceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OneMethodService ID from the query. Returns a *NotFoundError when no OneMethodService ID was found.

func (*OneMethodServiceQuery) FirstIDX added in v0.2.0

func (omsq *OneMethodServiceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OneMethodServiceQuery) FirstX added in v0.2.0

FirstX is like First, but panics if an error occurs.

func (*OneMethodServiceQuery) GroupBy added in v0.2.0

func (omsq *OneMethodServiceQuery) GroupBy(field string, fields ...string) *OneMethodServiceGroupBy

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 (*OneMethodServiceQuery) IDs added in v0.2.0

func (omsq *OneMethodServiceQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of OneMethodService IDs.

func (*OneMethodServiceQuery) IDsX added in v0.2.0

func (omsq *OneMethodServiceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OneMethodServiceQuery) Limit added in v0.2.0

func (omsq *OneMethodServiceQuery) Limit(limit int) *OneMethodServiceQuery

Limit the number of records to be returned by this query.

func (*OneMethodServiceQuery) Offset added in v0.2.0

func (omsq *OneMethodServiceQuery) Offset(offset int) *OneMethodServiceQuery

Offset to start from.

func (*OneMethodServiceQuery) Only added in v0.2.0

Only returns a single OneMethodService entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OneMethodService entity is found. Returns a *NotFoundError when no OneMethodService entities are found.

func (*OneMethodServiceQuery) OnlyID added in v0.2.0

func (omsq *OneMethodServiceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OneMethodService ID in the query. Returns a *NotSingularError when more than one OneMethodService ID is found. Returns a *NotFoundError when no entities are found.

func (*OneMethodServiceQuery) OnlyIDX added in v0.2.0

func (omsq *OneMethodServiceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OneMethodServiceQuery) OnlyX added in v0.2.0

OnlyX is like Only, but panics if an error occurs.

func (*OneMethodServiceQuery) Order added in v0.2.0

Order specifies how the records should be ordered.

func (*OneMethodServiceQuery) Select added in v0.2.0

func (omsq *OneMethodServiceQuery) Select(fields ...string) *OneMethodServiceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*OneMethodServiceQuery) Unique added in v0.2.0

func (omsq *OneMethodServiceQuery) Unique(unique bool) *OneMethodServiceQuery

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 (*OneMethodServiceQuery) Where added in v0.2.0

Where adds a new predicate for the OneMethodServiceQuery builder.

type OneMethodServiceSelect added in v0.2.0

type OneMethodServiceSelect struct {
	*OneMethodServiceQuery
	// contains filtered or unexported fields
}

OneMethodServiceSelect is the builder for selecting fields of OneMethodService entities.

func (*OneMethodServiceSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*OneMethodServiceSelect) Bool added in v0.2.0

func (s *OneMethodServiceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceSelect) BoolX added in v0.2.0

func (s *OneMethodServiceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OneMethodServiceSelect) Bools added in v0.2.0

func (s *OneMethodServiceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceSelect) BoolsX added in v0.2.0

func (s *OneMethodServiceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OneMethodServiceSelect) Float64 added in v0.2.0

func (s *OneMethodServiceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceSelect) Float64X added in v0.2.0

func (s *OneMethodServiceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OneMethodServiceSelect) Float64s added in v0.2.0

func (s *OneMethodServiceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceSelect) Float64sX added in v0.2.0

func (s *OneMethodServiceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OneMethodServiceSelect) Int added in v0.2.0

func (s *OneMethodServiceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceSelect) IntX added in v0.2.0

func (s *OneMethodServiceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OneMethodServiceSelect) Ints added in v0.2.0

func (s *OneMethodServiceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceSelect) IntsX added in v0.2.0

func (s *OneMethodServiceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OneMethodServiceSelect) Scan added in v0.2.0

func (omss *OneMethodServiceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OneMethodServiceSelect) ScanX added in v0.2.0

func (s *OneMethodServiceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OneMethodServiceSelect) String added in v0.2.0

func (s *OneMethodServiceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceSelect) StringX added in v0.2.0

func (s *OneMethodServiceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OneMethodServiceSelect) Strings added in v0.2.0

func (s *OneMethodServiceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OneMethodServiceSelect) StringsX added in v0.2.0

func (s *OneMethodServiceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OneMethodServiceUpdate added in v0.2.0

type OneMethodServiceUpdate struct {
	// contains filtered or unexported fields
}

OneMethodServiceUpdate is the builder for updating OneMethodService entities.

func (*OneMethodServiceUpdate) Exec added in v0.2.0

func (omsu *OneMethodServiceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OneMethodServiceUpdate) ExecX added in v0.2.0

func (omsu *OneMethodServiceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OneMethodServiceUpdate) Mutation added in v0.2.0

Mutation returns the OneMethodServiceMutation object of the builder.

func (*OneMethodServiceUpdate) Save added in v0.2.0

func (omsu *OneMethodServiceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OneMethodServiceUpdate) SaveX added in v0.2.0

func (omsu *OneMethodServiceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OneMethodServiceUpdate) Where added in v0.2.0

Where appends a list predicates to the OneMethodServiceUpdate builder.

type OneMethodServiceUpdateOne added in v0.2.0

type OneMethodServiceUpdateOne struct {
	// contains filtered or unexported fields
}

OneMethodServiceUpdateOne is the builder for updating a single OneMethodService entity.

func (*OneMethodServiceUpdateOne) Exec added in v0.2.0

Exec executes the query on the entity.

func (*OneMethodServiceUpdateOne) ExecX added in v0.2.0

func (omsuo *OneMethodServiceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OneMethodServiceUpdateOne) Mutation added in v0.2.0

Mutation returns the OneMethodServiceMutation object of the builder.

func (*OneMethodServiceUpdateOne) Save added in v0.2.0

Save executes the query and returns the updated OneMethodService entity.

func (*OneMethodServiceUpdateOne) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

func (*OneMethodServiceUpdateOne) Select added in v0.2.0

func (omsuo *OneMethodServiceUpdateOne) Select(field string, fields ...string) *OneMethodServiceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

type OneMethodServices added in v0.2.0

type OneMethodServices []*OneMethodService

OneMethodServices is a parsable slice of OneMethodService.

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.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Portal

type Portal struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PortalQuery when eager-loading is set.
	Edges PortalEdges `json:"edges"`
	// contains filtered or unexported fields
}

Portal is the model entity for the Portal schema.

func (*Portal) QueryCategory

func (po *Portal) QueryCategory() *CategoryQuery

QueryCategory queries the "category" edge of the Portal entity.

func (*Portal) String

func (po *Portal) String() string

String implements the fmt.Stringer.

func (*Portal) Unwrap

func (po *Portal) Unwrap() *Portal

Unwrap unwraps the Portal 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 (*Portal) Update

func (po *Portal) Update() *PortalUpdateOne

Update returns a builder for updating this Portal. Note that you need to call Portal.Unwrap() before calling this method if this Portal was returned from a transaction, and the transaction was committed or rolled back.

type PortalClient

type PortalClient struct {
	// contains filtered or unexported fields
}

PortalClient is a client for the Portal schema.

func NewPortalClient

func NewPortalClient(c config) *PortalClient

NewPortalClient returns a client for the Portal from the given config.

func (*PortalClient) Create

func (c *PortalClient) Create() *PortalCreate

Create returns a builder for creating a Portal entity.

func (*PortalClient) CreateBulk

func (c *PortalClient) CreateBulk(builders ...*PortalCreate) *PortalCreateBulk

CreateBulk returns a builder for creating a bulk of Portal entities.

func (*PortalClient) Delete

func (c *PortalClient) Delete() *PortalDelete

Delete returns a delete builder for Portal.

func (*PortalClient) DeleteOne

func (c *PortalClient) DeleteOne(po *Portal) *PortalDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PortalClient) DeleteOneID

func (c *PortalClient) DeleteOneID(id int) *PortalDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PortalClient) Get

func (c *PortalClient) Get(ctx context.Context, id int) (*Portal, error)

Get returns a Portal entity by its id.

func (*PortalClient) GetX

func (c *PortalClient) GetX(ctx context.Context, id int) *Portal

GetX is like Get, but panics if an error occurs.

func (*PortalClient) Hooks

func (c *PortalClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PortalClient) Intercept added in v0.3.5

func (c *PortalClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `portal.Intercept(f(g(h())))`.

func (*PortalClient) Interceptors added in v0.3.5

func (c *PortalClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PortalClient) Query

func (c *PortalClient) Query() *PortalQuery

Query returns a query builder for Portal.

func (*PortalClient) QueryCategory

func (c *PortalClient) QueryCategory(po *Portal) *CategoryQuery

QueryCategory queries the category edge of a Portal.

func (*PortalClient) Update

func (c *PortalClient) Update() *PortalUpdate

Update returns an update builder for Portal.

func (*PortalClient) UpdateOne

func (c *PortalClient) UpdateOne(po *Portal) *PortalUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PortalClient) UpdateOneID

func (c *PortalClient) UpdateOneID(id int) *PortalUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PortalClient) Use

func (c *PortalClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `portal.Hooks(f(g(h())))`.

type PortalCreate

type PortalCreate struct {
	// contains filtered or unexported fields
}

PortalCreate is the builder for creating a Portal entity.

func (*PortalCreate) Exec added in v0.2.0

func (pc *PortalCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PortalCreate) ExecX added in v0.2.0

func (pc *PortalCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PortalCreate) Mutation

func (pc *PortalCreate) Mutation() *PortalMutation

Mutation returns the PortalMutation object of the builder.

func (*PortalCreate) Save

func (pc *PortalCreate) Save(ctx context.Context) (*Portal, error)

Save creates the Portal in the database.

func (*PortalCreate) SaveX

func (pc *PortalCreate) SaveX(ctx context.Context) *Portal

SaveX calls Save and panics if Save returns an error.

func (*PortalCreate) SetCategory

func (pc *PortalCreate) SetCategory(c *Category) *PortalCreate

SetCategory sets the "category" edge to the Category entity.

func (*PortalCreate) SetCategoryID

func (pc *PortalCreate) SetCategoryID(id int) *PortalCreate

SetCategoryID sets the "category" edge to the Category entity by ID.

func (*PortalCreate) SetDescription

func (pc *PortalCreate) SetDescription(s string) *PortalCreate

SetDescription sets the "description" field.

func (*PortalCreate) SetName

func (pc *PortalCreate) SetName(s string) *PortalCreate

SetName sets the "name" field.

func (*PortalCreate) SetNillableCategoryID

func (pc *PortalCreate) SetNillableCategoryID(id *int) *PortalCreate

SetNillableCategoryID sets the "category" edge to the Category entity by ID if the given value is not nil.

type PortalCreateBulk

type PortalCreateBulk struct {
	// contains filtered or unexported fields
}

PortalCreateBulk is the builder for creating many Portal entities in bulk.

func (*PortalCreateBulk) Exec added in v0.2.0

func (pcb *PortalCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PortalCreateBulk) ExecX added in v0.2.0

func (pcb *PortalCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PortalCreateBulk) Save

func (pcb *PortalCreateBulk) Save(ctx context.Context) ([]*Portal, error)

Save creates the Portal entities in the database.

func (*PortalCreateBulk) SaveX

func (pcb *PortalCreateBulk) SaveX(ctx context.Context) []*Portal

SaveX is like Save, but panics if an error occurs.

type PortalDelete

type PortalDelete struct {
	// contains filtered or unexported fields
}

PortalDelete is the builder for deleting a Portal entity.

func (*PortalDelete) Exec

func (pd *PortalDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PortalDelete) ExecX

func (pd *PortalDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PortalDelete) Where

func (pd *PortalDelete) Where(ps ...predicate.Portal) *PortalDelete

Where appends a list predicates to the PortalDelete builder.

type PortalDeleteOne

type PortalDeleteOne struct {
	// contains filtered or unexported fields
}

PortalDeleteOne is the builder for deleting a single Portal entity.

func (*PortalDeleteOne) Exec

func (pdo *PortalDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PortalDeleteOne) ExecX

func (pdo *PortalDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type PortalEdges

type PortalEdges struct {
	// Category holds the value of the category edge.
	Category *Category `json:"category,omitempty"`
	// contains filtered or unexported fields
}

PortalEdges holds the relations/edges for other nodes in the graph.

func (PortalEdges) CategoryOrErr

func (e PortalEdges) CategoryOrErr() (*Category, error)

CategoryOrErr returns the Category value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type PortalGroupBy

type PortalGroupBy struct {
	// contains filtered or unexported fields
}

PortalGroupBy is the group-by builder for Portal entities.

func (*PortalGroupBy) Aggregate

func (pgb *PortalGroupBy) Aggregate(fns ...AggregateFunc) *PortalGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PortalGroupBy) Bool

func (s *PortalGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PortalGroupBy) BoolX

func (s *PortalGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PortalGroupBy) Bools

func (s *PortalGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PortalGroupBy) BoolsX

func (s *PortalGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PortalGroupBy) Float64

func (s *PortalGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PortalGroupBy) Float64X

func (s *PortalGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PortalGroupBy) Float64s

func (s *PortalGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PortalGroupBy) Float64sX

func (s *PortalGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PortalGroupBy) Int

func (s *PortalGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PortalGroupBy) IntX

func (s *PortalGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PortalGroupBy) Ints

func (s *PortalGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PortalGroupBy) IntsX

func (s *PortalGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PortalGroupBy) Scan

func (pgb *PortalGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PortalGroupBy) ScanX

func (s *PortalGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PortalGroupBy) String

func (s *PortalGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PortalGroupBy) StringX

func (s *PortalGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PortalGroupBy) Strings

func (s *PortalGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PortalGroupBy) StringsX

func (s *PortalGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PortalMutation

type PortalMutation struct {
	// contains filtered or unexported fields
}

PortalMutation represents an operation that mutates the Portal nodes in the graph.

func (*PortalMutation) AddField

func (m *PortalMutation) 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 (*PortalMutation) AddedEdges

func (m *PortalMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PortalMutation) AddedField

func (m *PortalMutation) 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 (*PortalMutation) AddedFields

func (m *PortalMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PortalMutation) AddedIDs

func (m *PortalMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PortalMutation) CategoryCleared

func (m *PortalMutation) CategoryCleared() bool

CategoryCleared reports if the "category" edge to the Category entity was cleared.

func (*PortalMutation) CategoryID

func (m *PortalMutation) CategoryID() (id int, exists bool)

CategoryID returns the "category" edge ID in the mutation.

func (*PortalMutation) CategoryIDs

func (m *PortalMutation) CategoryIDs() (ids []int)

CategoryIDs returns the "category" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CategoryID instead. It exists only for internal usage by the builders.

func (*PortalMutation) ClearCategory

func (m *PortalMutation) ClearCategory()

ClearCategory clears the "category" edge to the Category entity.

func (*PortalMutation) ClearEdge

func (m *PortalMutation) 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 (*PortalMutation) ClearField

func (m *PortalMutation) 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 (*PortalMutation) ClearedEdges

func (m *PortalMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PortalMutation) ClearedFields

func (m *PortalMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PortalMutation) Client

func (m PortalMutation) 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 (*PortalMutation) Description

func (m *PortalMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*PortalMutation) EdgeCleared

func (m *PortalMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PortalMutation) Field

func (m *PortalMutation) 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 (*PortalMutation) FieldCleared

func (m *PortalMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PortalMutation) Fields

func (m *PortalMutation) 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 (*PortalMutation) ID

func (m *PortalMutation) 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 (*PortalMutation) IDs added in v0.3.0

func (m *PortalMutation) 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 (*PortalMutation) Name

func (m *PortalMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*PortalMutation) OldDescription

func (m *PortalMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Portal entity. If the Portal 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 (*PortalMutation) OldField

func (m *PortalMutation) 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 (*PortalMutation) OldName

func (m *PortalMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Portal entity. If the Portal 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 (*PortalMutation) Op

func (m *PortalMutation) Op() Op

Op returns the operation name.

func (*PortalMutation) RemovedEdges

func (m *PortalMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PortalMutation) RemovedIDs

func (m *PortalMutation) 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 (*PortalMutation) ResetCategory

func (m *PortalMutation) ResetCategory()

ResetCategory resets all changes to the "category" edge.

func (*PortalMutation) ResetDescription

func (m *PortalMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*PortalMutation) ResetEdge

func (m *PortalMutation) 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 (*PortalMutation) ResetField

func (m *PortalMutation) 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 (*PortalMutation) ResetName

func (m *PortalMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PortalMutation) SetCategoryID

func (m *PortalMutation) SetCategoryID(id int)

SetCategoryID sets the "category" edge to the Category entity by id.

func (*PortalMutation) SetDescription

func (m *PortalMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*PortalMutation) SetField

func (m *PortalMutation) 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 (*PortalMutation) SetName

func (m *PortalMutation) SetName(s string)

SetName sets the "name" field.

func (*PortalMutation) SetOp added in v0.3.5

func (m *PortalMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (PortalMutation) Tx

func (m PortalMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PortalMutation) Type

func (m *PortalMutation) Type() string

Type returns the node type of this mutation (Portal).

func (*PortalMutation) Where added in v0.2.0

func (m *PortalMutation) Where(ps ...predicate.Portal)

Where appends a list predicates to the PortalMutation builder.

func (*PortalMutation) WhereP added in v0.3.5

func (m *PortalMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PortalMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PortalQuery

type PortalQuery struct {
	// contains filtered or unexported fields
}

PortalQuery is the builder for querying Portal entities.

func (*PortalQuery) Aggregate added in v0.3.4

func (pq *PortalQuery) Aggregate(fns ...AggregateFunc) *PortalSelect

Aggregate returns a PortalSelect configured with the given aggregations.

func (*PortalQuery) All

func (pq *PortalQuery) All(ctx context.Context) ([]*Portal, error)

All executes the query and returns a list of Portals.

func (*PortalQuery) AllX

func (pq *PortalQuery) AllX(ctx context.Context) []*Portal

AllX is like All, but panics if an error occurs.

func (*PortalQuery) Clone

func (pq *PortalQuery) Clone() *PortalQuery

Clone returns a duplicate of the PortalQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PortalQuery) Count

func (pq *PortalQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PortalQuery) CountX

func (pq *PortalQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PortalQuery) Exist

func (pq *PortalQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PortalQuery) ExistX

func (pq *PortalQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PortalQuery) First

func (pq *PortalQuery) First(ctx context.Context) (*Portal, error)

First returns the first Portal entity from the query. Returns a *NotFoundError when no Portal was found.

func (*PortalQuery) FirstID

func (pq *PortalQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Portal ID from the query. Returns a *NotFoundError when no Portal ID was found.

func (*PortalQuery) FirstIDX

func (pq *PortalQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*PortalQuery) FirstX

func (pq *PortalQuery) FirstX(ctx context.Context) *Portal

FirstX is like First, but panics if an error occurs.

func (*PortalQuery) GroupBy

func (pq *PortalQuery) GroupBy(field string, fields ...string) *PortalGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Portal.Query().
	GroupBy(portal.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PortalQuery) IDs

func (pq *PortalQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Portal IDs.

func (*PortalQuery) IDsX

func (pq *PortalQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*PortalQuery) Limit

func (pq *PortalQuery) Limit(limit int) *PortalQuery

Limit the number of records to be returned by this query.

func (*PortalQuery) Offset

func (pq *PortalQuery) Offset(offset int) *PortalQuery

Offset to start from.

func (*PortalQuery) Only

func (pq *PortalQuery) Only(ctx context.Context) (*Portal, error)

Only returns a single Portal entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Portal entity is found. Returns a *NotFoundError when no Portal entities are found.

func (*PortalQuery) OnlyID

func (pq *PortalQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Portal ID in the query. Returns a *NotSingularError when more than one Portal ID is found. Returns a *NotFoundError when no entities are found.

func (*PortalQuery) OnlyIDX

func (pq *PortalQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PortalQuery) OnlyX

func (pq *PortalQuery) OnlyX(ctx context.Context) *Portal

OnlyX is like Only, but panics if an error occurs.

func (*PortalQuery) Order

func (pq *PortalQuery) Order(o ...OrderFunc) *PortalQuery

Order specifies how the records should be ordered.

func (*PortalQuery) QueryCategory

func (pq *PortalQuery) QueryCategory() *CategoryQuery

QueryCategory chains the current query on the "category" edge.

func (*PortalQuery) Select

func (pq *PortalQuery) Select(fields ...string) *PortalSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.Portal.Query().
	Select(portal.FieldName).
	Scan(ctx, &v)

func (*PortalQuery) Unique

func (pq *PortalQuery) Unique(unique bool) *PortalQuery

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 (*PortalQuery) Where

func (pq *PortalQuery) Where(ps ...predicate.Portal) *PortalQuery

Where adds a new predicate for the PortalQuery builder.

func (*PortalQuery) WithCategory

func (pq *PortalQuery) WithCategory(opts ...func(*CategoryQuery)) *PortalQuery

WithCategory tells the query-builder to eager-load the nodes that are connected to the "category" edge. The optional arguments are used to configure the query builder of the edge.

type PortalSelect

type PortalSelect struct {
	*PortalQuery
	// contains filtered or unexported fields
}

PortalSelect is the builder for selecting fields of Portal entities.

func (*PortalSelect) Aggregate added in v0.3.4

func (ps *PortalSelect) Aggregate(fns ...AggregateFunc) *PortalSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PortalSelect) Bool

func (s *PortalSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PortalSelect) BoolX

func (s *PortalSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PortalSelect) Bools

func (s *PortalSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PortalSelect) BoolsX

func (s *PortalSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PortalSelect) Float64

func (s *PortalSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PortalSelect) Float64X

func (s *PortalSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PortalSelect) Float64s

func (s *PortalSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PortalSelect) Float64sX

func (s *PortalSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PortalSelect) Int

func (s *PortalSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PortalSelect) IntX

func (s *PortalSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PortalSelect) Ints

func (s *PortalSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PortalSelect) IntsX

func (s *PortalSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PortalSelect) Scan

func (ps *PortalSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PortalSelect) ScanX

func (s *PortalSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PortalSelect) String

func (s *PortalSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PortalSelect) StringX

func (s *PortalSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PortalSelect) Strings

func (s *PortalSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PortalSelect) StringsX

func (s *PortalSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PortalUpdate

type PortalUpdate struct {
	// contains filtered or unexported fields
}

PortalUpdate is the builder for updating Portal entities.

func (*PortalUpdate) ClearCategory

func (pu *PortalUpdate) ClearCategory() *PortalUpdate

ClearCategory clears the "category" edge to the Category entity.

func (*PortalUpdate) Exec

func (pu *PortalUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PortalUpdate) ExecX

func (pu *PortalUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PortalUpdate) Mutation

func (pu *PortalUpdate) Mutation() *PortalMutation

Mutation returns the PortalMutation object of the builder.

func (*PortalUpdate) Save

func (pu *PortalUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PortalUpdate) SaveX

func (pu *PortalUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PortalUpdate) SetCategory

func (pu *PortalUpdate) SetCategory(c *Category) *PortalUpdate

SetCategory sets the "category" edge to the Category entity.

func (*PortalUpdate) SetCategoryID

func (pu *PortalUpdate) SetCategoryID(id int) *PortalUpdate

SetCategoryID sets the "category" edge to the Category entity by ID.

func (*PortalUpdate) SetDescription

func (pu *PortalUpdate) SetDescription(s string) *PortalUpdate

SetDescription sets the "description" field.

func (*PortalUpdate) SetName

func (pu *PortalUpdate) SetName(s string) *PortalUpdate

SetName sets the "name" field.

func (*PortalUpdate) SetNillableCategoryID

func (pu *PortalUpdate) SetNillableCategoryID(id *int) *PortalUpdate

SetNillableCategoryID sets the "category" edge to the Category entity by ID if the given value is not nil.

func (*PortalUpdate) Where

func (pu *PortalUpdate) Where(ps ...predicate.Portal) *PortalUpdate

Where appends a list predicates to the PortalUpdate builder.

type PortalUpdateOne

type PortalUpdateOne struct {
	// contains filtered or unexported fields
}

PortalUpdateOne is the builder for updating a single Portal entity.

func (*PortalUpdateOne) ClearCategory

func (puo *PortalUpdateOne) ClearCategory() *PortalUpdateOne

ClearCategory clears the "category" edge to the Category entity.

func (*PortalUpdateOne) Exec

func (puo *PortalUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PortalUpdateOne) ExecX

func (puo *PortalUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PortalUpdateOne) Mutation

func (puo *PortalUpdateOne) Mutation() *PortalMutation

Mutation returns the PortalMutation object of the builder.

func (*PortalUpdateOne) Save

func (puo *PortalUpdateOne) Save(ctx context.Context) (*Portal, error)

Save executes the query and returns the updated Portal entity.

func (*PortalUpdateOne) SaveX

func (puo *PortalUpdateOne) SaveX(ctx context.Context) *Portal

SaveX is like Save, but panics if an error occurs.

func (*PortalUpdateOne) Select

func (puo *PortalUpdateOne) Select(field string, fields ...string) *PortalUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PortalUpdateOne) SetCategory

func (puo *PortalUpdateOne) SetCategory(c *Category) *PortalUpdateOne

SetCategory sets the "category" edge to the Category entity.

func (*PortalUpdateOne) SetCategoryID

func (puo *PortalUpdateOne) SetCategoryID(id int) *PortalUpdateOne

SetCategoryID sets the "category" edge to the Category entity by ID.

func (*PortalUpdateOne) SetDescription

func (puo *PortalUpdateOne) SetDescription(s string) *PortalUpdateOne

SetDescription sets the "description" field.

func (*PortalUpdateOne) SetName

func (puo *PortalUpdateOne) SetName(s string) *PortalUpdateOne

SetName sets the "name" field.

func (*PortalUpdateOne) SetNillableCategoryID

func (puo *PortalUpdateOne) SetNillableCategoryID(id *int) *PortalUpdateOne

SetNillableCategoryID sets the "category" edge to the Category entity by ID if the given value is not nil.

type Portals

type Portals []*Portal

Portals is a parsable slice of Portal.

type Querier added in v0.3.5

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc added in v0.3.5

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 added in v0.3.5

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type SkipEdgeExample added in v0.3.0

type SkipEdgeExample 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 SkipEdgeExampleQuery when eager-loading is set.
	Edges SkipEdgeExampleEdges `json:"edges"`
	// contains filtered or unexported fields
}

SkipEdgeExample is the model entity for the SkipEdgeExample schema.

func (*SkipEdgeExample) QueryUser added in v0.3.0

func (see *SkipEdgeExample) QueryUser() *UserQuery

QueryUser queries the "user" edge of the SkipEdgeExample entity.

func (*SkipEdgeExample) String added in v0.3.0

func (see *SkipEdgeExample) String() string

String implements the fmt.Stringer.

func (*SkipEdgeExample) Unwrap added in v0.3.0

func (see *SkipEdgeExample) Unwrap() *SkipEdgeExample

Unwrap unwraps the SkipEdgeExample 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 (*SkipEdgeExample) Update added in v0.3.0

Update returns a builder for updating this SkipEdgeExample. Note that you need to call SkipEdgeExample.Unwrap() before calling this method if this SkipEdgeExample was returned from a transaction, and the transaction was committed or rolled back.

type SkipEdgeExampleClient added in v0.3.0

type SkipEdgeExampleClient struct {
	// contains filtered or unexported fields
}

SkipEdgeExampleClient is a client for the SkipEdgeExample schema.

func NewSkipEdgeExampleClient added in v0.3.0

func NewSkipEdgeExampleClient(c config) *SkipEdgeExampleClient

NewSkipEdgeExampleClient returns a client for the SkipEdgeExample from the given config.

func (*SkipEdgeExampleClient) Create added in v0.3.0

Create returns a builder for creating a SkipEdgeExample entity.

func (*SkipEdgeExampleClient) CreateBulk added in v0.3.0

CreateBulk returns a builder for creating a bulk of SkipEdgeExample entities.

func (*SkipEdgeExampleClient) Delete added in v0.3.0

Delete returns a delete builder for SkipEdgeExample.

func (*SkipEdgeExampleClient) DeleteOne added in v0.3.0

DeleteOne returns a builder for deleting the given entity.

func (*SkipEdgeExampleClient) DeleteOneID added in v0.3.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SkipEdgeExampleClient) Get added in v0.3.0

Get returns a SkipEdgeExample entity by its id.

func (*SkipEdgeExampleClient) GetX added in v0.3.0

GetX is like Get, but panics if an error occurs.

func (*SkipEdgeExampleClient) Hooks added in v0.3.0

func (c *SkipEdgeExampleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SkipEdgeExampleClient) Intercept added in v0.3.5

func (c *SkipEdgeExampleClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `skipedgeexample.Intercept(f(g(h())))`.

func (*SkipEdgeExampleClient) Interceptors added in v0.3.5

func (c *SkipEdgeExampleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SkipEdgeExampleClient) Query added in v0.3.0

Query returns a query builder for SkipEdgeExample.

func (*SkipEdgeExampleClient) QueryUser added in v0.3.0

func (c *SkipEdgeExampleClient) QueryUser(see *SkipEdgeExample) *UserQuery

QueryUser queries the user edge of a SkipEdgeExample.

func (*SkipEdgeExampleClient) Update added in v0.3.0

Update returns an update builder for SkipEdgeExample.

func (*SkipEdgeExampleClient) UpdateOne added in v0.3.0

UpdateOne returns an update builder for the given entity.

func (*SkipEdgeExampleClient) UpdateOneID added in v0.3.0

UpdateOneID returns an update builder for the given id.

func (*SkipEdgeExampleClient) Use added in v0.3.0

func (c *SkipEdgeExampleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `skipedgeexample.Hooks(f(g(h())))`.

type SkipEdgeExampleCreate added in v0.3.0

type SkipEdgeExampleCreate struct {
	// contains filtered or unexported fields
}

SkipEdgeExampleCreate is the builder for creating a SkipEdgeExample entity.

func (*SkipEdgeExampleCreate) Exec added in v0.3.0

func (seec *SkipEdgeExampleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SkipEdgeExampleCreate) ExecX added in v0.3.0

func (seec *SkipEdgeExampleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkipEdgeExampleCreate) Mutation added in v0.3.0

Mutation returns the SkipEdgeExampleMutation object of the builder.

func (*SkipEdgeExampleCreate) Save added in v0.3.0

Save creates the SkipEdgeExample in the database.

func (*SkipEdgeExampleCreate) SaveX added in v0.3.0

SaveX calls Save and panics if Save returns an error.

func (*SkipEdgeExampleCreate) SetNillableUserID added in v0.3.0

func (seec *SkipEdgeExampleCreate) SetNillableUserID(id *int) *SkipEdgeExampleCreate

SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.

func (*SkipEdgeExampleCreate) SetUser added in v0.3.0

SetUser sets the "user" edge to the User entity.

func (*SkipEdgeExampleCreate) SetUserID added in v0.3.0

func (seec *SkipEdgeExampleCreate) SetUserID(id int) *SkipEdgeExampleCreate

SetUserID sets the "user" edge to the User entity by ID.

type SkipEdgeExampleCreateBulk added in v0.3.0

type SkipEdgeExampleCreateBulk struct {
	// contains filtered or unexported fields
}

SkipEdgeExampleCreateBulk is the builder for creating many SkipEdgeExample entities in bulk.

func (*SkipEdgeExampleCreateBulk) Exec added in v0.3.0

Exec executes the query.

func (*SkipEdgeExampleCreateBulk) ExecX added in v0.3.0

func (seecb *SkipEdgeExampleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkipEdgeExampleCreateBulk) Save added in v0.3.0

Save creates the SkipEdgeExample entities in the database.

func (*SkipEdgeExampleCreateBulk) SaveX added in v0.3.0

SaveX is like Save, but panics if an error occurs.

type SkipEdgeExampleDelete added in v0.3.0

type SkipEdgeExampleDelete struct {
	// contains filtered or unexported fields
}

SkipEdgeExampleDelete is the builder for deleting a SkipEdgeExample entity.

func (*SkipEdgeExampleDelete) Exec added in v0.3.0

func (seed *SkipEdgeExampleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SkipEdgeExampleDelete) ExecX added in v0.3.0

func (seed *SkipEdgeExampleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SkipEdgeExampleDelete) Where added in v0.3.0

Where appends a list predicates to the SkipEdgeExampleDelete builder.

type SkipEdgeExampleDeleteOne added in v0.3.0

type SkipEdgeExampleDeleteOne struct {
	// contains filtered or unexported fields
}

SkipEdgeExampleDeleteOne is the builder for deleting a single SkipEdgeExample entity.

func (*SkipEdgeExampleDeleteOne) Exec added in v0.3.0

func (seedo *SkipEdgeExampleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SkipEdgeExampleDeleteOne) ExecX added in v0.3.0

func (seedo *SkipEdgeExampleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SkipEdgeExampleEdges added in v0.3.0

type SkipEdgeExampleEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

SkipEdgeExampleEdges holds the relations/edges for other nodes in the graph.

func (SkipEdgeExampleEdges) UserOrErr added in v0.3.0

func (e SkipEdgeExampleEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SkipEdgeExampleGroupBy added in v0.3.0

type SkipEdgeExampleGroupBy struct {
	// contains filtered or unexported fields
}

SkipEdgeExampleGroupBy is the group-by builder for SkipEdgeExample entities.

func (*SkipEdgeExampleGroupBy) Aggregate added in v0.3.0

Aggregate adds the given aggregation functions to the group-by query.

func (*SkipEdgeExampleGroupBy) Bool added in v0.3.0

func (s *SkipEdgeExampleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleGroupBy) BoolX added in v0.3.0

func (s *SkipEdgeExampleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SkipEdgeExampleGroupBy) Bools added in v0.3.0

func (s *SkipEdgeExampleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleGroupBy) BoolsX added in v0.3.0

func (s *SkipEdgeExampleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SkipEdgeExampleGroupBy) Float64 added in v0.3.0

func (s *SkipEdgeExampleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleGroupBy) Float64X added in v0.3.0

func (s *SkipEdgeExampleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SkipEdgeExampleGroupBy) Float64s added in v0.3.0

func (s *SkipEdgeExampleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleGroupBy) Float64sX added in v0.3.0

func (s *SkipEdgeExampleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SkipEdgeExampleGroupBy) Int added in v0.3.0

func (s *SkipEdgeExampleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleGroupBy) IntX added in v0.3.0

func (s *SkipEdgeExampleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SkipEdgeExampleGroupBy) Ints added in v0.3.0

func (s *SkipEdgeExampleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleGroupBy) IntsX added in v0.3.0

func (s *SkipEdgeExampleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SkipEdgeExampleGroupBy) Scan added in v0.3.0

func (seegb *SkipEdgeExampleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SkipEdgeExampleGroupBy) ScanX added in v0.3.0

func (s *SkipEdgeExampleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SkipEdgeExampleGroupBy) String added in v0.3.0

func (s *SkipEdgeExampleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleGroupBy) StringX added in v0.3.0

func (s *SkipEdgeExampleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SkipEdgeExampleGroupBy) Strings added in v0.3.0

func (s *SkipEdgeExampleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleGroupBy) StringsX added in v0.3.0

func (s *SkipEdgeExampleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SkipEdgeExampleMutation added in v0.3.0

type SkipEdgeExampleMutation struct {
	// contains filtered or unexported fields
}

SkipEdgeExampleMutation represents an operation that mutates the SkipEdgeExample nodes in the graph.

func (*SkipEdgeExampleMutation) AddField added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) AddedEdges added in v0.3.0

func (m *SkipEdgeExampleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SkipEdgeExampleMutation) AddedField added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) AddedFields added in v0.3.0

func (m *SkipEdgeExampleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SkipEdgeExampleMutation) AddedIDs added in v0.3.0

func (m *SkipEdgeExampleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SkipEdgeExampleMutation) ClearEdge added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ClearField added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ClearUser added in v0.3.0

func (m *SkipEdgeExampleMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*SkipEdgeExampleMutation) ClearedEdges added in v0.3.0

func (m *SkipEdgeExampleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SkipEdgeExampleMutation) ClearedFields added in v0.3.0

func (m *SkipEdgeExampleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SkipEdgeExampleMutation) Client added in v0.3.0

func (m SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) EdgeCleared added in v0.3.0

func (m *SkipEdgeExampleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SkipEdgeExampleMutation) Field added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) FieldCleared added in v0.3.0

func (m *SkipEdgeExampleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SkipEdgeExampleMutation) Fields added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ID added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) IDs added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) OldField added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) Op added in v0.3.0

func (m *SkipEdgeExampleMutation) Op() Op

Op returns the operation name.

func (*SkipEdgeExampleMutation) RemovedEdges added in v0.3.0

func (m *SkipEdgeExampleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SkipEdgeExampleMutation) RemovedIDs added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ResetEdge added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ResetField added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) ResetUser added in v0.3.0

func (m *SkipEdgeExampleMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*SkipEdgeExampleMutation) SetField added in v0.3.0

func (m *SkipEdgeExampleMutation) 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 (*SkipEdgeExampleMutation) SetOp added in v0.3.5

func (m *SkipEdgeExampleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SkipEdgeExampleMutation) SetUserID added in v0.3.0

func (m *SkipEdgeExampleMutation) SetUserID(id int)

SetUserID sets the "user" edge to the User entity by id.

func (SkipEdgeExampleMutation) Tx added in v0.3.0

func (m SkipEdgeExampleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SkipEdgeExampleMutation) Type added in v0.3.0

func (m *SkipEdgeExampleMutation) Type() string

Type returns the node type of this mutation (SkipEdgeExample).

func (*SkipEdgeExampleMutation) UserCleared added in v0.3.0

func (m *SkipEdgeExampleMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*SkipEdgeExampleMutation) UserID added in v0.3.0

func (m *SkipEdgeExampleMutation) UserID() (id int, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*SkipEdgeExampleMutation) UserIDs added in v0.3.0

func (m *SkipEdgeExampleMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*SkipEdgeExampleMutation) Where added in v0.3.0

Where appends a list predicates to the SkipEdgeExampleMutation builder.

func (*SkipEdgeExampleMutation) WhereP added in v0.3.5

func (m *SkipEdgeExampleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SkipEdgeExampleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SkipEdgeExampleQuery added in v0.3.0

type SkipEdgeExampleQuery struct {
	// contains filtered or unexported fields
}

SkipEdgeExampleQuery is the builder for querying SkipEdgeExample entities.

func (*SkipEdgeExampleQuery) Aggregate added in v0.3.4

func (seeq *SkipEdgeExampleQuery) Aggregate(fns ...AggregateFunc) *SkipEdgeExampleSelect

Aggregate returns a SkipEdgeExampleSelect configured with the given aggregations.

func (*SkipEdgeExampleQuery) All added in v0.3.0

All executes the query and returns a list of SkipEdgeExamples.

func (*SkipEdgeExampleQuery) AllX added in v0.3.0

AllX is like All, but panics if an error occurs.

func (*SkipEdgeExampleQuery) Clone added in v0.3.0

Clone returns a duplicate of the SkipEdgeExampleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SkipEdgeExampleQuery) Count added in v0.3.0

func (seeq *SkipEdgeExampleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SkipEdgeExampleQuery) CountX added in v0.3.0

func (seeq *SkipEdgeExampleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SkipEdgeExampleQuery) Exist added in v0.3.0

func (seeq *SkipEdgeExampleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SkipEdgeExampleQuery) ExistX added in v0.3.0

func (seeq *SkipEdgeExampleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SkipEdgeExampleQuery) First added in v0.3.0

First returns the first SkipEdgeExample entity from the query. Returns a *NotFoundError when no SkipEdgeExample was found.

func (*SkipEdgeExampleQuery) FirstID added in v0.3.0

func (seeq *SkipEdgeExampleQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first SkipEdgeExample ID from the query. Returns a *NotFoundError when no SkipEdgeExample ID was found.

func (*SkipEdgeExampleQuery) FirstIDX added in v0.3.0

func (seeq *SkipEdgeExampleQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SkipEdgeExampleQuery) FirstX added in v0.3.0

FirstX is like First, but panics if an error occurs.

func (*SkipEdgeExampleQuery) GroupBy added in v0.3.0

func (seeq *SkipEdgeExampleQuery) GroupBy(field string, fields ...string) *SkipEdgeExampleGroupBy

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 (*SkipEdgeExampleQuery) IDs added in v0.3.0

func (seeq *SkipEdgeExampleQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of SkipEdgeExample IDs.

func (*SkipEdgeExampleQuery) IDsX added in v0.3.0

func (seeq *SkipEdgeExampleQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SkipEdgeExampleQuery) Limit added in v0.3.0

func (seeq *SkipEdgeExampleQuery) Limit(limit int) *SkipEdgeExampleQuery

Limit the number of records to be returned by this query.

func (*SkipEdgeExampleQuery) Offset added in v0.3.0

func (seeq *SkipEdgeExampleQuery) Offset(offset int) *SkipEdgeExampleQuery

Offset to start from.

func (*SkipEdgeExampleQuery) Only added in v0.3.0

Only returns a single SkipEdgeExample entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one SkipEdgeExample entity is found. Returns a *NotFoundError when no SkipEdgeExample entities are found.

func (*SkipEdgeExampleQuery) OnlyID added in v0.3.0

func (seeq *SkipEdgeExampleQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only SkipEdgeExample ID in the query. Returns a *NotSingularError when more than one SkipEdgeExample ID is found. Returns a *NotFoundError when no entities are found.

func (*SkipEdgeExampleQuery) OnlyIDX added in v0.3.0

func (seeq *SkipEdgeExampleQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SkipEdgeExampleQuery) OnlyX added in v0.3.0

OnlyX is like Only, but panics if an error occurs.

func (*SkipEdgeExampleQuery) Order added in v0.3.0

Order specifies how the records should be ordered.

func (*SkipEdgeExampleQuery) QueryUser added in v0.3.0

func (seeq *SkipEdgeExampleQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*SkipEdgeExampleQuery) Select added in v0.3.0

func (seeq *SkipEdgeExampleQuery) Select(fields ...string) *SkipEdgeExampleSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*SkipEdgeExampleQuery) Unique added in v0.3.0

func (seeq *SkipEdgeExampleQuery) Unique(unique bool) *SkipEdgeExampleQuery

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 (*SkipEdgeExampleQuery) Where added in v0.3.0

Where adds a new predicate for the SkipEdgeExampleQuery builder.

func (*SkipEdgeExampleQuery) WithUser added in v0.3.0

func (seeq *SkipEdgeExampleQuery) WithUser(opts ...func(*UserQuery)) *SkipEdgeExampleQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type SkipEdgeExampleSelect added in v0.3.0

type SkipEdgeExampleSelect struct {
	*SkipEdgeExampleQuery
	// contains filtered or unexported fields
}

SkipEdgeExampleSelect is the builder for selecting fields of SkipEdgeExample entities.

func (*SkipEdgeExampleSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*SkipEdgeExampleSelect) Bool added in v0.3.0

func (s *SkipEdgeExampleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleSelect) BoolX added in v0.3.0

func (s *SkipEdgeExampleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SkipEdgeExampleSelect) Bools added in v0.3.0

func (s *SkipEdgeExampleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleSelect) BoolsX added in v0.3.0

func (s *SkipEdgeExampleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SkipEdgeExampleSelect) Float64 added in v0.3.0

func (s *SkipEdgeExampleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleSelect) Float64X added in v0.3.0

func (s *SkipEdgeExampleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SkipEdgeExampleSelect) Float64s added in v0.3.0

func (s *SkipEdgeExampleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleSelect) Float64sX added in v0.3.0

func (s *SkipEdgeExampleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SkipEdgeExampleSelect) Int added in v0.3.0

func (s *SkipEdgeExampleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleSelect) IntX added in v0.3.0

func (s *SkipEdgeExampleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SkipEdgeExampleSelect) Ints added in v0.3.0

func (s *SkipEdgeExampleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleSelect) IntsX added in v0.3.0

func (s *SkipEdgeExampleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SkipEdgeExampleSelect) Scan added in v0.3.0

func (sees *SkipEdgeExampleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SkipEdgeExampleSelect) ScanX added in v0.3.0

func (s *SkipEdgeExampleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SkipEdgeExampleSelect) String added in v0.3.0

func (s *SkipEdgeExampleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleSelect) StringX added in v0.3.0

func (s *SkipEdgeExampleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SkipEdgeExampleSelect) Strings added in v0.3.0

func (s *SkipEdgeExampleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SkipEdgeExampleSelect) StringsX added in v0.3.0

func (s *SkipEdgeExampleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SkipEdgeExampleUpdate added in v0.3.0

type SkipEdgeExampleUpdate struct {
	// contains filtered or unexported fields
}

SkipEdgeExampleUpdate is the builder for updating SkipEdgeExample entities.

func (*SkipEdgeExampleUpdate) ClearUser added in v0.3.0

func (seeu *SkipEdgeExampleUpdate) ClearUser() *SkipEdgeExampleUpdate

ClearUser clears the "user" edge to the User entity.

func (*SkipEdgeExampleUpdate) Exec added in v0.3.0

func (seeu *SkipEdgeExampleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SkipEdgeExampleUpdate) ExecX added in v0.3.0

func (seeu *SkipEdgeExampleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkipEdgeExampleUpdate) Mutation added in v0.3.0

Mutation returns the SkipEdgeExampleMutation object of the builder.

func (*SkipEdgeExampleUpdate) Save added in v0.3.0

func (seeu *SkipEdgeExampleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SkipEdgeExampleUpdate) SaveX added in v0.3.0

func (seeu *SkipEdgeExampleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SkipEdgeExampleUpdate) SetNillableUserID added in v0.3.0

func (seeu *SkipEdgeExampleUpdate) SetNillableUserID(id *int) *SkipEdgeExampleUpdate

SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.

func (*SkipEdgeExampleUpdate) SetUser added in v0.3.0

SetUser sets the "user" edge to the User entity.

func (*SkipEdgeExampleUpdate) SetUserID added in v0.3.0

func (seeu *SkipEdgeExampleUpdate) SetUserID(id int) *SkipEdgeExampleUpdate

SetUserID sets the "user" edge to the User entity by ID.

func (*SkipEdgeExampleUpdate) Where added in v0.3.0

Where appends a list predicates to the SkipEdgeExampleUpdate builder.

type SkipEdgeExampleUpdateOne added in v0.3.0

type SkipEdgeExampleUpdateOne struct {
	// contains filtered or unexported fields
}

SkipEdgeExampleUpdateOne is the builder for updating a single SkipEdgeExample entity.

func (*SkipEdgeExampleUpdateOne) ClearUser added in v0.3.0

ClearUser clears the "user" edge to the User entity.

func (*SkipEdgeExampleUpdateOne) Exec added in v0.3.0

func (seeuo *SkipEdgeExampleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SkipEdgeExampleUpdateOne) ExecX added in v0.3.0

func (seeuo *SkipEdgeExampleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SkipEdgeExampleUpdateOne) Mutation added in v0.3.0

Mutation returns the SkipEdgeExampleMutation object of the builder.

func (*SkipEdgeExampleUpdateOne) Save added in v0.3.0

Save executes the query and returns the updated SkipEdgeExample entity.

func (*SkipEdgeExampleUpdateOne) SaveX added in v0.3.0

SaveX is like Save, but panics if an error occurs.

func (*SkipEdgeExampleUpdateOne) Select added in v0.3.0

func (seeuo *SkipEdgeExampleUpdateOne) Select(field string, fields ...string) *SkipEdgeExampleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SkipEdgeExampleUpdateOne) SetNillableUserID added in v0.3.0

func (seeuo *SkipEdgeExampleUpdateOne) SetNillableUserID(id *int) *SkipEdgeExampleUpdateOne

SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.

func (*SkipEdgeExampleUpdateOne) SetUser added in v0.3.0

SetUser sets the "user" edge to the User entity.

func (*SkipEdgeExampleUpdateOne) SetUserID added in v0.3.0

SetUserID sets the "user" edge to the User entity by ID.

type SkipEdgeExamples added in v0.3.0

type SkipEdgeExamples []*SkipEdgeExample

SkipEdgeExamples is a parsable slice of SkipEdgeExample.

type TraverseFunc added in v0.3.5

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser added in v0.3.5

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type TwoMethodService added in v0.2.0

type TwoMethodService struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// contains filtered or unexported fields
}

TwoMethodService is the model entity for the TwoMethodService schema.

func (*TwoMethodService) String added in v0.2.0

func (tms *TwoMethodService) String() string

String implements the fmt.Stringer.

func (*TwoMethodService) Unwrap added in v0.2.0

func (tms *TwoMethodService) Unwrap() *TwoMethodService

Unwrap unwraps the TwoMethodService 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 (*TwoMethodService) Update added in v0.2.0

Update returns a builder for updating this TwoMethodService. Note that you need to call TwoMethodService.Unwrap() before calling this method if this TwoMethodService was returned from a transaction, and the transaction was committed or rolled back.

type TwoMethodServiceClient added in v0.2.0

type TwoMethodServiceClient struct {
	// contains filtered or unexported fields
}

TwoMethodServiceClient is a client for the TwoMethodService schema.

func NewTwoMethodServiceClient added in v0.2.0

func NewTwoMethodServiceClient(c config) *TwoMethodServiceClient

NewTwoMethodServiceClient returns a client for the TwoMethodService from the given config.

func (*TwoMethodServiceClient) Create added in v0.2.0

Create returns a builder for creating a TwoMethodService entity.

func (*TwoMethodServiceClient) CreateBulk added in v0.2.0

CreateBulk returns a builder for creating a bulk of TwoMethodService entities.

func (*TwoMethodServiceClient) Delete added in v0.2.0

Delete returns a delete builder for TwoMethodService.

func (*TwoMethodServiceClient) DeleteOne added in v0.2.0

DeleteOne returns a builder for deleting the given entity.

func (*TwoMethodServiceClient) DeleteOneID added in v0.2.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TwoMethodServiceClient) Get added in v0.2.0

Get returns a TwoMethodService entity by its id.

func (*TwoMethodServiceClient) GetX added in v0.2.0

GetX is like Get, but panics if an error occurs.

func (*TwoMethodServiceClient) Hooks added in v0.2.0

func (c *TwoMethodServiceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TwoMethodServiceClient) Intercept added in v0.3.5

func (c *TwoMethodServiceClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `twomethodservice.Intercept(f(g(h())))`.

func (*TwoMethodServiceClient) Interceptors added in v0.3.5

func (c *TwoMethodServiceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TwoMethodServiceClient) Query added in v0.2.0

Query returns a query builder for TwoMethodService.

func (*TwoMethodServiceClient) Update added in v0.2.0

Update returns an update builder for TwoMethodService.

func (*TwoMethodServiceClient) UpdateOne added in v0.2.0

UpdateOne returns an update builder for the given entity.

func (*TwoMethodServiceClient) UpdateOneID added in v0.2.0

UpdateOneID returns an update builder for the given id.

func (*TwoMethodServiceClient) Use added in v0.2.0

func (c *TwoMethodServiceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `twomethodservice.Hooks(f(g(h())))`.

type TwoMethodServiceCreate added in v0.2.0

type TwoMethodServiceCreate struct {
	// contains filtered or unexported fields
}

TwoMethodServiceCreate is the builder for creating a TwoMethodService entity.

func (*TwoMethodServiceCreate) Exec added in v0.2.0

func (tmsc *TwoMethodServiceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TwoMethodServiceCreate) ExecX added in v0.2.0

func (tmsc *TwoMethodServiceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TwoMethodServiceCreate) Mutation added in v0.2.0

Mutation returns the TwoMethodServiceMutation object of the builder.

func (*TwoMethodServiceCreate) Save added in v0.2.0

Save creates the TwoMethodService in the database.

func (*TwoMethodServiceCreate) SaveX added in v0.2.0

SaveX calls Save and panics if Save returns an error.

type TwoMethodServiceCreateBulk added in v0.2.0

type TwoMethodServiceCreateBulk struct {
	// contains filtered or unexported fields
}

TwoMethodServiceCreateBulk is the builder for creating many TwoMethodService entities in bulk.

func (*TwoMethodServiceCreateBulk) Exec added in v0.2.0

Exec executes the query.

func (*TwoMethodServiceCreateBulk) ExecX added in v0.2.0

func (tmscb *TwoMethodServiceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TwoMethodServiceCreateBulk) Save added in v0.2.0

Save creates the TwoMethodService entities in the database.

func (*TwoMethodServiceCreateBulk) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

type TwoMethodServiceDelete added in v0.2.0

type TwoMethodServiceDelete struct {
	// contains filtered or unexported fields
}

TwoMethodServiceDelete is the builder for deleting a TwoMethodService entity.

func (*TwoMethodServiceDelete) Exec added in v0.2.0

func (tmsd *TwoMethodServiceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TwoMethodServiceDelete) ExecX added in v0.2.0

func (tmsd *TwoMethodServiceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TwoMethodServiceDelete) Where added in v0.2.0

Where appends a list predicates to the TwoMethodServiceDelete builder.

type TwoMethodServiceDeleteOne added in v0.2.0

type TwoMethodServiceDeleteOne struct {
	// contains filtered or unexported fields
}

TwoMethodServiceDeleteOne is the builder for deleting a single TwoMethodService entity.

func (*TwoMethodServiceDeleteOne) Exec added in v0.2.0

Exec executes the deletion query.

func (*TwoMethodServiceDeleteOne) ExecX added in v0.2.0

func (tmsdo *TwoMethodServiceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TwoMethodServiceGroupBy added in v0.2.0

type TwoMethodServiceGroupBy struct {
	// contains filtered or unexported fields
}

TwoMethodServiceGroupBy is the group-by builder for TwoMethodService entities.

func (*TwoMethodServiceGroupBy) Aggregate added in v0.2.0

Aggregate adds the given aggregation functions to the group-by query.

func (*TwoMethodServiceGroupBy) Bool added in v0.2.0

func (s *TwoMethodServiceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceGroupBy) BoolX added in v0.2.0

func (s *TwoMethodServiceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TwoMethodServiceGroupBy) Bools added in v0.2.0

func (s *TwoMethodServiceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceGroupBy) BoolsX added in v0.2.0

func (s *TwoMethodServiceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TwoMethodServiceGroupBy) Float64 added in v0.2.0

func (s *TwoMethodServiceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceGroupBy) Float64X added in v0.2.0

func (s *TwoMethodServiceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TwoMethodServiceGroupBy) Float64s added in v0.2.0

func (s *TwoMethodServiceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceGroupBy) Float64sX added in v0.2.0

func (s *TwoMethodServiceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TwoMethodServiceGroupBy) Int added in v0.2.0

func (s *TwoMethodServiceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceGroupBy) IntX added in v0.2.0

func (s *TwoMethodServiceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TwoMethodServiceGroupBy) Ints added in v0.2.0

func (s *TwoMethodServiceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceGroupBy) IntsX added in v0.2.0

func (s *TwoMethodServiceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TwoMethodServiceGroupBy) Scan added in v0.2.0

func (tmsgb *TwoMethodServiceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TwoMethodServiceGroupBy) ScanX added in v0.2.0

func (s *TwoMethodServiceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TwoMethodServiceGroupBy) String added in v0.2.0

func (s *TwoMethodServiceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceGroupBy) StringX added in v0.2.0

func (s *TwoMethodServiceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TwoMethodServiceGroupBy) Strings added in v0.2.0

func (s *TwoMethodServiceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceGroupBy) StringsX added in v0.2.0

func (s *TwoMethodServiceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TwoMethodServiceMutation added in v0.2.0

type TwoMethodServiceMutation struct {
	// contains filtered or unexported fields
}

TwoMethodServiceMutation represents an operation that mutates the TwoMethodService nodes in the graph.

func (*TwoMethodServiceMutation) AddField added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) AddedEdges added in v0.2.0

func (m *TwoMethodServiceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TwoMethodServiceMutation) AddedField added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) AddedFields added in v0.2.0

func (m *TwoMethodServiceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TwoMethodServiceMutation) AddedIDs added in v0.2.0

func (m *TwoMethodServiceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TwoMethodServiceMutation) ClearEdge added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) ClearField added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) ClearedEdges added in v0.2.0

func (m *TwoMethodServiceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TwoMethodServiceMutation) ClearedFields added in v0.2.0

func (m *TwoMethodServiceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TwoMethodServiceMutation) Client added in v0.2.0

func (m TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) EdgeCleared added in v0.2.0

func (m *TwoMethodServiceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TwoMethodServiceMutation) Field added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) FieldCleared added in v0.2.0

func (m *TwoMethodServiceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TwoMethodServiceMutation) Fields added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) ID added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) IDs added in v0.3.0

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 (*TwoMethodServiceMutation) OldField added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) Op added in v0.2.0

func (m *TwoMethodServiceMutation) Op() Op

Op returns the operation name.

func (*TwoMethodServiceMutation) RemovedEdges added in v0.2.0

func (m *TwoMethodServiceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TwoMethodServiceMutation) RemovedIDs added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) ResetEdge added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) ResetField added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) SetField added in v0.2.0

func (m *TwoMethodServiceMutation) 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 (*TwoMethodServiceMutation) SetOp added in v0.3.5

func (m *TwoMethodServiceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (TwoMethodServiceMutation) Tx added in v0.2.0

func (m TwoMethodServiceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TwoMethodServiceMutation) Type added in v0.2.0

func (m *TwoMethodServiceMutation) Type() string

Type returns the node type of this mutation (TwoMethodService).

func (*TwoMethodServiceMutation) Where added in v0.2.0

Where appends a list predicates to the TwoMethodServiceMutation builder.

func (*TwoMethodServiceMutation) WhereP added in v0.3.5

func (m *TwoMethodServiceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TwoMethodServiceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TwoMethodServiceQuery added in v0.2.0

type TwoMethodServiceQuery struct {
	// contains filtered or unexported fields
}

TwoMethodServiceQuery is the builder for querying TwoMethodService entities.

func (*TwoMethodServiceQuery) Aggregate added in v0.3.4

Aggregate returns a TwoMethodServiceSelect configured with the given aggregations.

func (*TwoMethodServiceQuery) All added in v0.2.0

All executes the query and returns a list of TwoMethodServices.

func (*TwoMethodServiceQuery) AllX added in v0.2.0

AllX is like All, but panics if an error occurs.

func (*TwoMethodServiceQuery) Clone added in v0.2.0

Clone returns a duplicate of the TwoMethodServiceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TwoMethodServiceQuery) Count added in v0.2.0

func (tmsq *TwoMethodServiceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TwoMethodServiceQuery) CountX added in v0.2.0

func (tmsq *TwoMethodServiceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TwoMethodServiceQuery) Exist added in v0.2.0

func (tmsq *TwoMethodServiceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TwoMethodServiceQuery) ExistX added in v0.2.0

func (tmsq *TwoMethodServiceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TwoMethodServiceQuery) First added in v0.2.0

First returns the first TwoMethodService entity from the query. Returns a *NotFoundError when no TwoMethodService was found.

func (*TwoMethodServiceQuery) FirstID added in v0.2.0

func (tmsq *TwoMethodServiceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first TwoMethodService ID from the query. Returns a *NotFoundError when no TwoMethodService ID was found.

func (*TwoMethodServiceQuery) FirstIDX added in v0.2.0

func (tmsq *TwoMethodServiceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*TwoMethodServiceQuery) FirstX added in v0.2.0

FirstX is like First, but panics if an error occurs.

func (*TwoMethodServiceQuery) GroupBy added in v0.2.0

func (tmsq *TwoMethodServiceQuery) GroupBy(field string, fields ...string) *TwoMethodServiceGroupBy

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 (*TwoMethodServiceQuery) IDs added in v0.2.0

func (tmsq *TwoMethodServiceQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of TwoMethodService IDs.

func (*TwoMethodServiceQuery) IDsX added in v0.2.0

func (tmsq *TwoMethodServiceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*TwoMethodServiceQuery) Limit added in v0.2.0

func (tmsq *TwoMethodServiceQuery) Limit(limit int) *TwoMethodServiceQuery

Limit the number of records to be returned by this query.

func (*TwoMethodServiceQuery) Offset added in v0.2.0

func (tmsq *TwoMethodServiceQuery) Offset(offset int) *TwoMethodServiceQuery

Offset to start from.

func (*TwoMethodServiceQuery) Only added in v0.2.0

Only returns a single TwoMethodService entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TwoMethodService entity is found. Returns a *NotFoundError when no TwoMethodService entities are found.

func (*TwoMethodServiceQuery) OnlyID added in v0.2.0

func (tmsq *TwoMethodServiceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only TwoMethodService ID in the query. Returns a *NotSingularError when more than one TwoMethodService ID is found. Returns a *NotFoundError when no entities are found.

func (*TwoMethodServiceQuery) OnlyIDX added in v0.2.0

func (tmsq *TwoMethodServiceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TwoMethodServiceQuery) OnlyX added in v0.2.0

OnlyX is like Only, but panics if an error occurs.

func (*TwoMethodServiceQuery) Order added in v0.2.0

Order specifies how the records should be ordered.

func (*TwoMethodServiceQuery) Select added in v0.2.0

func (tmsq *TwoMethodServiceQuery) Select(fields ...string) *TwoMethodServiceSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

func (*TwoMethodServiceQuery) Unique added in v0.2.0

func (tmsq *TwoMethodServiceQuery) Unique(unique bool) *TwoMethodServiceQuery

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 (*TwoMethodServiceQuery) Where added in v0.2.0

Where adds a new predicate for the TwoMethodServiceQuery builder.

type TwoMethodServiceSelect added in v0.2.0

type TwoMethodServiceSelect struct {
	*TwoMethodServiceQuery
	// contains filtered or unexported fields
}

TwoMethodServiceSelect is the builder for selecting fields of TwoMethodService entities.

func (*TwoMethodServiceSelect) Aggregate added in v0.3.4

Aggregate adds the given aggregation functions to the selector query.

func (*TwoMethodServiceSelect) Bool added in v0.2.0

func (s *TwoMethodServiceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceSelect) BoolX added in v0.2.0

func (s *TwoMethodServiceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TwoMethodServiceSelect) Bools added in v0.2.0

func (s *TwoMethodServiceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceSelect) BoolsX added in v0.2.0

func (s *TwoMethodServiceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TwoMethodServiceSelect) Float64 added in v0.2.0

func (s *TwoMethodServiceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceSelect) Float64X added in v0.2.0

func (s *TwoMethodServiceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TwoMethodServiceSelect) Float64s added in v0.2.0

func (s *TwoMethodServiceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceSelect) Float64sX added in v0.2.0

func (s *TwoMethodServiceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TwoMethodServiceSelect) Int added in v0.2.0

func (s *TwoMethodServiceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceSelect) IntX added in v0.2.0

func (s *TwoMethodServiceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TwoMethodServiceSelect) Ints added in v0.2.0

func (s *TwoMethodServiceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceSelect) IntsX added in v0.2.0

func (s *TwoMethodServiceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TwoMethodServiceSelect) Scan added in v0.2.0

func (tmss *TwoMethodServiceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TwoMethodServiceSelect) ScanX added in v0.2.0

func (s *TwoMethodServiceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TwoMethodServiceSelect) String added in v0.2.0

func (s *TwoMethodServiceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceSelect) StringX added in v0.2.0

func (s *TwoMethodServiceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TwoMethodServiceSelect) Strings added in v0.2.0

func (s *TwoMethodServiceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TwoMethodServiceSelect) StringsX added in v0.2.0

func (s *TwoMethodServiceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TwoMethodServiceUpdate added in v0.2.0

type TwoMethodServiceUpdate struct {
	// contains filtered or unexported fields
}

TwoMethodServiceUpdate is the builder for updating TwoMethodService entities.

func (*TwoMethodServiceUpdate) Exec added in v0.2.0

func (tmsu *TwoMethodServiceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TwoMethodServiceUpdate) ExecX added in v0.2.0

func (tmsu *TwoMethodServiceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TwoMethodServiceUpdate) Mutation added in v0.2.0

Mutation returns the TwoMethodServiceMutation object of the builder.

func (*TwoMethodServiceUpdate) Save added in v0.2.0

func (tmsu *TwoMethodServiceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TwoMethodServiceUpdate) SaveX added in v0.2.0

func (tmsu *TwoMethodServiceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TwoMethodServiceUpdate) Where added in v0.2.0

Where appends a list predicates to the TwoMethodServiceUpdate builder.

type TwoMethodServiceUpdateOne added in v0.2.0

type TwoMethodServiceUpdateOne struct {
	// contains filtered or unexported fields
}

TwoMethodServiceUpdateOne is the builder for updating a single TwoMethodService entity.

func (*TwoMethodServiceUpdateOne) Exec added in v0.2.0

Exec executes the query on the entity.

func (*TwoMethodServiceUpdateOne) ExecX added in v0.2.0

func (tmsuo *TwoMethodServiceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TwoMethodServiceUpdateOne) Mutation added in v0.2.0

Mutation returns the TwoMethodServiceMutation object of the builder.

func (*TwoMethodServiceUpdateOne) Save added in v0.2.0

Save executes the query and returns the updated TwoMethodService entity.

func (*TwoMethodServiceUpdateOne) SaveX added in v0.2.0

SaveX is like Save, but panics if an error occurs.

func (*TwoMethodServiceUpdateOne) Select added in v0.2.0

func (tmsuo *TwoMethodServiceUpdateOne) Select(field string, fields ...string) *TwoMethodServiceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

type TwoMethodServices added in v0.2.0

type TwoMethodServices []*TwoMethodService

TwoMethodServices is a parsable slice of TwoMethodService.

type Tx

type Tx struct {

	// AllMethodsService is the client for interacting with the AllMethodsService builders.
	AllMethodsService *AllMethodsServiceClient
	// BlogPost is the client for interacting with the BlogPost builders.
	BlogPost *BlogPostClient
	// Category is the client for interacting with the Category builders.
	Category *CategoryClient
	// DependsOnSkipped is the client for interacting with the DependsOnSkipped builders.
	DependsOnSkipped *DependsOnSkippedClient
	// DuplicateNumberMessage is the client for interacting with the DuplicateNumberMessage builders.
	DuplicateNumberMessage *DuplicateNumberMessageClient
	// ExplicitSkippedMessage is the client for interacting with the ExplicitSkippedMessage builders.
	ExplicitSkippedMessage *ExplicitSkippedMessageClient
	// Image is the client for interacting with the Image builders.
	Image *ImageClient
	// ImplicitSkippedMessage is the client for interacting with the ImplicitSkippedMessage builders.
	ImplicitSkippedMessage *ImplicitSkippedMessageClient
	// InvalidFieldMessage is the client for interacting with the InvalidFieldMessage builders.
	InvalidFieldMessage *InvalidFieldMessageClient
	// MessageWithEnum is the client for interacting with the MessageWithEnum builders.
	MessageWithEnum *MessageWithEnumClient
	// MessageWithFieldOne is the client for interacting with the MessageWithFieldOne builders.
	MessageWithFieldOne *MessageWithFieldOneClient
	// MessageWithID is the client for interacting with the MessageWithID builders.
	MessageWithID *MessageWithIDClient
	// MessageWithOptionals is the client for interacting with the MessageWithOptionals builders.
	MessageWithOptionals *MessageWithOptionalsClient
	// MessageWithPackageName is the client for interacting with the MessageWithPackageName builders.
	MessageWithPackageName *MessageWithPackageNameClient
	// MessageWithStrings is the client for interacting with the MessageWithStrings builders.
	MessageWithStrings *MessageWithStringsClient
	// NoBackref is the client for interacting with the NoBackref builders.
	NoBackref *NoBackrefClient
	// OneMethodService is the client for interacting with the OneMethodService builders.
	OneMethodService *OneMethodServiceClient
	// Portal is the client for interacting with the Portal builders.
	Portal *PortalClient
	// SkipEdgeExample is the client for interacting with the SkipEdgeExample builders.
	SkipEdgeExample *SkipEdgeExampleClient
	// TwoMethodService is the client for interacting with the TwoMethodService builders.
	TwoMethodService *TwoMethodServiceClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// ValidMessage is the client for interacting with the ValidMessage builders.
	ValidMessage *ValidMessageClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type User

type User struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// UserName holds the value of the "user_name" field.
	UserName string `json:"user_name,omitempty"`
	// Status holds the value of the "status" field.
	Status user.Status `json:"status,omitempty"`
	// Unnecessary holds the value of the "unnecessary" field.
	Unnecessary string `json:"unnecessary,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) QueryBlogPosts

func (u *User) QueryBlogPosts() *BlogPostQuery

QueryBlogPosts queries the "blog_posts" edge of the User entity.

func (*User) QueryProfilePic

func (u *User) QueryProfilePic() *ImageQuery

QueryProfilePic queries the "profile_pic" edge of the User entity.

func (*User) QuerySkipEdge added in v0.3.0

func (u *User) QuerySkipEdge() *SkipEdgeExampleQuery

QuerySkipEdge queries the "skip_edge" edge of the User entity.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept added in v0.3.5

func (c *UserClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors added in v0.3.5

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryBlogPosts

func (c *UserClient) QueryBlogPosts(u *User) *BlogPostQuery

QueryBlogPosts queries the blog_posts edge of a User.

func (*UserClient) QueryProfilePic

func (c *UserClient) QueryProfilePic(u *User) *ImageQuery

QueryProfilePic queries the profile_pic edge of a User.

func (*UserClient) QuerySkipEdge added in v0.3.0

func (c *UserClient) QuerySkipEdge(u *User) *SkipEdgeExampleQuery

QuerySkipEdge queries the skip_edge edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id int) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddBlogPostIDs

func (uc *UserCreate) AddBlogPostIDs(ids ...int) *UserCreate

AddBlogPostIDs adds the "blog_posts" edge to the BlogPost entity by IDs.

func (*UserCreate) AddBlogPosts

func (uc *UserCreate) AddBlogPosts(b ...*BlogPost) *UserCreate

AddBlogPosts adds the "blog_posts" edges to the BlogPost entity.

func (*UserCreate) Exec added in v0.2.0

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX added in v0.2.0

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetNillableProfilePicID

func (uc *UserCreate) SetNillableProfilePicID(id *uuid.UUID) *UserCreate

SetNillableProfilePicID sets the "profile_pic" edge to the Image entity by ID if the given value is not nil.

func (*UserCreate) SetNillableSkipEdgeID added in v0.3.0

func (uc *UserCreate) SetNillableSkipEdgeID(id *int) *UserCreate

SetNillableSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID if the given value is not nil.

func (*UserCreate) SetNillableUnnecessary added in v0.3.0

func (uc *UserCreate) SetNillableUnnecessary(s *string) *UserCreate

SetNillableUnnecessary sets the "unnecessary" field if the given value is not nil.

func (*UserCreate) SetProfilePic

func (uc *UserCreate) SetProfilePic(i *Image) *UserCreate

SetProfilePic sets the "profile_pic" edge to the Image entity.

func (*UserCreate) SetProfilePicID

func (uc *UserCreate) SetProfilePicID(id uuid.UUID) *UserCreate

SetProfilePicID sets the "profile_pic" edge to the Image entity by ID.

func (*UserCreate) SetSkipEdge added in v0.3.0

func (uc *UserCreate) SetSkipEdge(s *SkipEdgeExample) *UserCreate

SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserCreate) SetSkipEdgeID added in v0.3.0

func (uc *UserCreate) SetSkipEdgeID(id int) *UserCreate

SetSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID.

func (*UserCreate) SetStatus

func (uc *UserCreate) SetStatus(u user.Status) *UserCreate

SetStatus sets the "status" field.

func (*UserCreate) SetUnnecessary added in v0.3.0

func (uc *UserCreate) SetUnnecessary(s string) *UserCreate

SetUnnecessary sets the "unnecessary" field.

func (*UserCreate) SetUserName

func (uc *UserCreate) SetUserName(s string) *UserCreate

SetUserName sets the "user_name" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec added in v0.2.0

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX added in v0.2.0

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type UserEdges

type UserEdges struct {
	// BlogPosts holds the value of the blog_posts edge.
	BlogPosts []*BlogPost `json:"blog_posts,omitempty"`
	// ProfilePic holds the value of the profile_pic edge.
	ProfilePic *Image `json:"profile_pic,omitempty"`
	// SkipEdge holds the value of the skip_edge edge.
	SkipEdge *SkipEdgeExample `json:"skip_edge,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) BlogPostsOrErr

func (e UserEdges) BlogPostsOrErr() ([]*BlogPost, error)

BlogPostsOrErr returns the BlogPosts value or an error if the edge was not loaded in eager-loading.

func (UserEdges) ProfilePicOrErr

func (e UserEdges) ProfilePicOrErr() (*Image, error)

ProfilePicOrErr returns the ProfilePic value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UserEdges) SkipEdgeOrErr added in v0.3.0

func (e UserEdges) SkipEdgeOrErr() (*SkipEdgeExample, error)

SkipEdgeOrErr returns the SkipEdge value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddBlogPostIDs

func (m *UserMutation) AddBlogPostIDs(ids ...int)

AddBlogPostIDs adds the "blog_posts" edge to the BlogPost entity by ids.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) BlogPostsCleared

func (m *UserMutation) BlogPostsCleared() bool

BlogPostsCleared reports if the "blog_posts" edge to the BlogPost entity was cleared.

func (*UserMutation) BlogPostsIDs

func (m *UserMutation) BlogPostsIDs() (ids []int)

BlogPostsIDs returns the "blog_posts" edge IDs in the mutation.

func (*UserMutation) ClearBlogPosts

func (m *UserMutation) ClearBlogPosts()

ClearBlogPosts clears the "blog_posts" edge to the BlogPost entity.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearProfilePic

func (m *UserMutation) ClearProfilePic()

ClearProfilePic clears the "profile_pic" edge to the Image entity.

func (*UserMutation) ClearSkipEdge added in v0.3.0

func (m *UserMutation) ClearSkipEdge()

ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserMutation) ClearUnnecessary added in v0.3.0

func (m *UserMutation) ClearUnnecessary()

ClearUnnecessary clears the value of the "unnecessary" field.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) ID

func (m *UserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs added in v0.3.0

func (m *UserMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserMutation) OldField

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserMutation) OldStatus

func (m *UserMutation) OldStatus(ctx context.Context) (v user.Status, err error)

OldStatus returns the old "status" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUnnecessary added in v0.3.0

func (m *UserMutation) OldUnnecessary(ctx context.Context) (v string, err error)

OldUnnecessary returns the old "unnecessary" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUserName

func (m *UserMutation) OldUserName(ctx context.Context) (v string, err error)

OldUserName returns the old "user_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) ProfilePicCleared

func (m *UserMutation) ProfilePicCleared() bool

ProfilePicCleared reports if the "profile_pic" edge to the Image entity was cleared.

func (*UserMutation) ProfilePicID

func (m *UserMutation) ProfilePicID() (id uuid.UUID, exists bool)

ProfilePicID returns the "profile_pic" edge ID in the mutation.

func (*UserMutation) ProfilePicIDs

func (m *UserMutation) ProfilePicIDs() (ids []uuid.UUID)

ProfilePicIDs returns the "profile_pic" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProfilePicID instead. It exists only for internal usage by the builders.

func (*UserMutation) RemoveBlogPostIDs

func (m *UserMutation) RemoveBlogPostIDs(ids ...int)

RemoveBlogPostIDs removes the "blog_posts" edge to the BlogPost entity by IDs.

func (*UserMutation) RemovedBlogPostsIDs

func (m *UserMutation) RemovedBlogPostsIDs() (ids []int)

RemovedBlogPosts returns the removed IDs of the "blog_posts" edge to the BlogPost entity.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) ResetBlogPosts

func (m *UserMutation) ResetBlogPosts()

ResetBlogPosts resets all changes to the "blog_posts" edge.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetProfilePic

func (m *UserMutation) ResetProfilePic()

ResetProfilePic resets all changes to the "profile_pic" edge.

func (*UserMutation) ResetSkipEdge added in v0.3.0

func (m *UserMutation) ResetSkipEdge()

ResetSkipEdge resets all changes to the "skip_edge" edge.

func (*UserMutation) ResetStatus

func (m *UserMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*UserMutation) ResetUnnecessary added in v0.3.0

func (m *UserMutation) ResetUnnecessary()

ResetUnnecessary resets all changes to the "unnecessary" field.

func (*UserMutation) ResetUserName

func (m *UserMutation) ResetUserName()

ResetUserName resets all changes to the "user_name" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetOp added in v0.3.5

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetProfilePicID

func (m *UserMutation) SetProfilePicID(id uuid.UUID)

SetProfilePicID sets the "profile_pic" edge to the Image entity by id.

func (*UserMutation) SetSkipEdgeID added in v0.3.0

func (m *UserMutation) SetSkipEdgeID(id int)

SetSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by id.

func (*UserMutation) SetStatus

func (m *UserMutation) SetStatus(u user.Status)

SetStatus sets the "status" field.

func (*UserMutation) SetUnnecessary added in v0.3.0

func (m *UserMutation) SetUnnecessary(s string)

SetUnnecessary sets the "unnecessary" field.

func (*UserMutation) SetUserName

func (m *UserMutation) SetUserName(s string)

SetUserName sets the "user_name" field.

func (*UserMutation) SkipEdgeCleared added in v0.3.0

func (m *UserMutation) SkipEdgeCleared() bool

SkipEdgeCleared reports if the "skip_edge" edge to the SkipEdgeExample entity was cleared.

func (*UserMutation) SkipEdgeID added in v0.3.0

func (m *UserMutation) SkipEdgeID() (id int, exists bool)

SkipEdgeID returns the "skip_edge" edge ID in the mutation.

func (*UserMutation) SkipEdgeIDs added in v0.3.0

func (m *UserMutation) SkipEdgeIDs() (ids []int)

SkipEdgeIDs returns the "skip_edge" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SkipEdgeID instead. It exists only for internal usage by the builders.

func (*UserMutation) Status

func (m *UserMutation) Status() (r user.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) Unnecessary added in v0.3.0

func (m *UserMutation) Unnecessary() (r string, exists bool)

Unnecessary returns the value of the "unnecessary" field in the mutation.

func (*UserMutation) UnnecessaryCleared added in v0.3.0

func (m *UserMutation) UnnecessaryCleared() bool

UnnecessaryCleared returns if the "unnecessary" field was cleared in this mutation.

func (*UserMutation) UserName

func (m *UserMutation) UserName() (r string, exists bool)

UserName returns the value of the "user_name" field in the mutation.

func (*UserMutation) Where added in v0.2.0

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP added in v0.3.5

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate added in v0.3.4

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	UserName string `json:"user_name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldUserName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) QueryBlogPosts

func (uq *UserQuery) QueryBlogPosts() *BlogPostQuery

QueryBlogPosts chains the current query on the "blog_posts" edge.

func (*UserQuery) QueryProfilePic

func (uq *UserQuery) QueryProfilePic() *ImageQuery

QueryProfilePic chains the current query on the "profile_pic" edge.

func (*UserQuery) QuerySkipEdge added in v0.3.0

func (uq *UserQuery) QuerySkipEdge() *SkipEdgeExampleQuery

QuerySkipEdge chains the current query on the "skip_edge" edge.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	UserName string `json:"user_name,omitempty"`
}

client.User.Query().
	Select(user.FieldUserName).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithBlogPosts

func (uq *UserQuery) WithBlogPosts(opts ...func(*BlogPostQuery)) *UserQuery

WithBlogPosts tells the query-builder to eager-load the nodes that are connected to the "blog_posts" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithProfilePic

func (uq *UserQuery) WithProfilePic(opts ...func(*ImageQuery)) *UserQuery

WithProfilePic tells the query-builder to eager-load the nodes that are connected to the "profile_pic" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithSkipEdge added in v0.3.0

func (uq *UserQuery) WithSkipEdge(opts ...func(*SkipEdgeExampleQuery)) *UserQuery

WithSkipEdge tells the query-builder to eager-load the nodes that are connected to the "skip_edge" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate added in v0.3.4

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) AddBlogPostIDs

func (uu *UserUpdate) AddBlogPostIDs(ids ...int) *UserUpdate

AddBlogPostIDs adds the "blog_posts" edge to the BlogPost entity by IDs.

func (*UserUpdate) AddBlogPosts

func (uu *UserUpdate) AddBlogPosts(b ...*BlogPost) *UserUpdate

AddBlogPosts adds the "blog_posts" edges to the BlogPost entity.

func (*UserUpdate) ClearBlogPosts

func (uu *UserUpdate) ClearBlogPosts() *UserUpdate

ClearBlogPosts clears all "blog_posts" edges to the BlogPost entity.

func (*UserUpdate) ClearProfilePic

func (uu *UserUpdate) ClearProfilePic() *UserUpdate

ClearProfilePic clears the "profile_pic" edge to the Image entity.

func (*UserUpdate) ClearSkipEdge added in v0.3.0

func (uu *UserUpdate) ClearSkipEdge() *UserUpdate

ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserUpdate) ClearUnnecessary added in v0.3.0

func (uu *UserUpdate) ClearUnnecessary() *UserUpdate

ClearUnnecessary clears the value of the "unnecessary" field.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveBlogPostIDs

func (uu *UserUpdate) RemoveBlogPostIDs(ids ...int) *UserUpdate

RemoveBlogPostIDs removes the "blog_posts" edge to BlogPost entities by IDs.

func (*UserUpdate) RemoveBlogPosts

func (uu *UserUpdate) RemoveBlogPosts(b ...*BlogPost) *UserUpdate

RemoveBlogPosts removes "blog_posts" edges to BlogPost entities.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetNillableProfilePicID

func (uu *UserUpdate) SetNillableProfilePicID(id *uuid.UUID) *UserUpdate

SetNillableProfilePicID sets the "profile_pic" edge to the Image entity by ID if the given value is not nil.

func (*UserUpdate) SetNillableSkipEdgeID added in v0.3.0

func (uu *UserUpdate) SetNillableSkipEdgeID(id *int) *UserUpdate

SetNillableSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID if the given value is not nil.

func (*UserUpdate) SetNillableUnnecessary added in v0.3.0

func (uu *UserUpdate) SetNillableUnnecessary(s *string) *UserUpdate

SetNillableUnnecessary sets the "unnecessary" field if the given value is not nil.

func (*UserUpdate) SetProfilePic

func (uu *UserUpdate) SetProfilePic(i *Image) *UserUpdate

SetProfilePic sets the "profile_pic" edge to the Image entity.

func (*UserUpdate) SetProfilePicID

func (uu *UserUpdate) SetProfilePicID(id uuid.UUID) *UserUpdate

SetProfilePicID sets the "profile_pic" edge to the Image entity by ID.

func (*UserUpdate) SetSkipEdge added in v0.3.0

func (uu *UserUpdate) SetSkipEdge(s *SkipEdgeExample) *UserUpdate

SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserUpdate) SetSkipEdgeID added in v0.3.0

func (uu *UserUpdate) SetSkipEdgeID(id int) *UserUpdate

SetSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID.

func (*UserUpdate) SetStatus

func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate

SetStatus sets the "status" field.

func (*UserUpdate) SetUnnecessary added in v0.3.0

func (uu *UserUpdate) SetUnnecessary(s string) *UserUpdate

SetUnnecessary sets the "unnecessary" field.

func (*UserUpdate) SetUserName

func (uu *UserUpdate) SetUserName(s string) *UserUpdate

SetUserName sets the "user_name" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddBlogPostIDs

func (uuo *UserUpdateOne) AddBlogPostIDs(ids ...int) *UserUpdateOne

AddBlogPostIDs adds the "blog_posts" edge to the BlogPost entity by IDs.

func (*UserUpdateOne) AddBlogPosts

func (uuo *UserUpdateOne) AddBlogPosts(b ...*BlogPost) *UserUpdateOne

AddBlogPosts adds the "blog_posts" edges to the BlogPost entity.

func (*UserUpdateOne) ClearBlogPosts

func (uuo *UserUpdateOne) ClearBlogPosts() *UserUpdateOne

ClearBlogPosts clears all "blog_posts" edges to the BlogPost entity.

func (*UserUpdateOne) ClearProfilePic

func (uuo *UserUpdateOne) ClearProfilePic() *UserUpdateOne

ClearProfilePic clears the "profile_pic" edge to the Image entity.

func (*UserUpdateOne) ClearSkipEdge added in v0.3.0

func (uuo *UserUpdateOne) ClearSkipEdge() *UserUpdateOne

ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserUpdateOne) ClearUnnecessary added in v0.3.0

func (uuo *UserUpdateOne) ClearUnnecessary() *UserUpdateOne

ClearUnnecessary clears the value of the "unnecessary" field.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveBlogPostIDs

func (uuo *UserUpdateOne) RemoveBlogPostIDs(ids ...int) *UserUpdateOne

RemoveBlogPostIDs removes the "blog_posts" edge to BlogPost entities by IDs.

func (*UserUpdateOne) RemoveBlogPosts

func (uuo *UserUpdateOne) RemoveBlogPosts(b ...*BlogPost) *UserUpdateOne

RemoveBlogPosts removes "blog_posts" edges to BlogPost entities.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetNillableProfilePicID

func (uuo *UserUpdateOne) SetNillableProfilePicID(id *uuid.UUID) *UserUpdateOne

SetNillableProfilePicID sets the "profile_pic" edge to the Image entity by ID if the given value is not nil.

func (*UserUpdateOne) SetNillableSkipEdgeID added in v0.3.0

func (uuo *UserUpdateOne) SetNillableSkipEdgeID(id *int) *UserUpdateOne

SetNillableSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID if the given value is not nil.

func (*UserUpdateOne) SetNillableUnnecessary added in v0.3.0

func (uuo *UserUpdateOne) SetNillableUnnecessary(s *string) *UserUpdateOne

SetNillableUnnecessary sets the "unnecessary" field if the given value is not nil.

func (*UserUpdateOne) SetProfilePic

func (uuo *UserUpdateOne) SetProfilePic(i *Image) *UserUpdateOne

SetProfilePic sets the "profile_pic" edge to the Image entity.

func (*UserUpdateOne) SetProfilePicID

func (uuo *UserUpdateOne) SetProfilePicID(id uuid.UUID) *UserUpdateOne

SetProfilePicID sets the "profile_pic" edge to the Image entity by ID.

func (*UserUpdateOne) SetSkipEdge added in v0.3.0

func (uuo *UserUpdateOne) SetSkipEdge(s *SkipEdgeExample) *UserUpdateOne

SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserUpdateOne) SetSkipEdgeID added in v0.3.0

func (uuo *UserUpdateOne) SetSkipEdgeID(id int) *UserUpdateOne

SetSkipEdgeID sets the "skip_edge" edge to the SkipEdgeExample entity by ID.

func (*UserUpdateOne) SetStatus

func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne

SetStatus sets the "status" field.

func (*UserUpdateOne) SetUnnecessary added in v0.3.0

func (uuo *UserUpdateOne) SetUnnecessary(s string) *UserUpdateOne

SetUnnecessary sets the "unnecessary" field.

func (*UserUpdateOne) SetUserName

func (uuo *UserUpdateOne) SetUserName(s string) *UserUpdateOne

SetUserName sets the "user_name" field.

type Users

type Users []*User

Users is a parsable slice of User.

type ValidMessage

type ValidMessage struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Ts holds the value of the "ts" field.
	Ts time.Time `json:"ts,omitempty"`
	// UUID holds the value of the "uuid" field.
	UUID uuid.UUID `json:"uuid,omitempty"`
	// U8 holds the value of the "u8" field.
	U8 uint8 `json:"u8,omitempty"`
	// Opti8 holds the value of the "opti8" field.
	Opti8 *int8 `json:"opti8,omitempty"`
	// contains filtered or unexported fields
}

ValidMessage is the model entity for the ValidMessage schema.

func (*ValidMessage) String

func (vm *ValidMessage) String() string

String implements the fmt.Stringer.

func (*ValidMessage) Unwrap

func (vm *ValidMessage) Unwrap() *ValidMessage

Unwrap unwraps the ValidMessage 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 (*ValidMessage) Update

func (vm *ValidMessage) Update() *ValidMessageUpdateOne

Update returns a builder for updating this ValidMessage. Note that you need to call ValidMessage.Unwrap() before calling this method if this ValidMessage was returned from a transaction, and the transaction was committed or rolled back.

type ValidMessageClient

type ValidMessageClient struct {
	// contains filtered or unexported fields
}

ValidMessageClient is a client for the ValidMessage schema.

func NewValidMessageClient

func NewValidMessageClient(c config) *ValidMessageClient

NewValidMessageClient returns a client for the ValidMessage from the given config.

func (*ValidMessageClient) Create

Create returns a builder for creating a ValidMessage entity.

func (*ValidMessageClient) CreateBulk

func (c *ValidMessageClient) CreateBulk(builders ...*ValidMessageCreate) *ValidMessageCreateBulk

CreateBulk returns a builder for creating a bulk of ValidMessage entities.

func (*ValidMessageClient) Delete

Delete returns a delete builder for ValidMessage.

func (*ValidMessageClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ValidMessageClient) DeleteOneID

func (c *ValidMessageClient) DeleteOneID(id int) *ValidMessageDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ValidMessageClient) Get

Get returns a ValidMessage entity by its id.

func (*ValidMessageClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ValidMessageClient) Hooks

func (c *ValidMessageClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ValidMessageClient) Intercept added in v0.3.5

func (c *ValidMessageClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `validmessage.Intercept(f(g(h())))`.

func (*ValidMessageClient) Interceptors added in v0.3.5

func (c *ValidMessageClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ValidMessageClient) Query

Query returns a query builder for ValidMessage.

func (*ValidMessageClient) Update

Update returns an update builder for ValidMessage.

func (*ValidMessageClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ValidMessageClient) UpdateOneID

func (c *ValidMessageClient) UpdateOneID(id int) *ValidMessageUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ValidMessageClient) Use

func (c *ValidMessageClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `validmessage.Hooks(f(g(h())))`.

type ValidMessageCreate

type ValidMessageCreate struct {
	// contains filtered or unexported fields
}

ValidMessageCreate is the builder for creating a ValidMessage entity.

func (*ValidMessageCreate) Exec added in v0.2.0

func (vmc *ValidMessageCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ValidMessageCreate) ExecX added in v0.2.0

func (vmc *ValidMessageCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ValidMessageCreate) Mutation

func (vmc *ValidMessageCreate) Mutation() *ValidMessageMutation

Mutation returns the ValidMessageMutation object of the builder.

func (*ValidMessageCreate) Save

Save creates the ValidMessage in the database.

func (*ValidMessageCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ValidMessageCreate) SetName

func (vmc *ValidMessageCreate) SetName(s string) *ValidMessageCreate

SetName sets the "name" field.

func (*ValidMessageCreate) SetNillableOpti8

func (vmc *ValidMessageCreate) SetNillableOpti8(i *int8) *ValidMessageCreate

SetNillableOpti8 sets the "opti8" field if the given value is not nil.

func (*ValidMessageCreate) SetOpti8

func (vmc *ValidMessageCreate) SetOpti8(i int8) *ValidMessageCreate

SetOpti8 sets the "opti8" field.

func (*ValidMessageCreate) SetTs

SetTs sets the "ts" field.

func (*ValidMessageCreate) SetU8

SetU8 sets the "u8" field.

func (*ValidMessageCreate) SetUUID

SetUUID sets the "uuid" field.

type ValidMessageCreateBulk

type ValidMessageCreateBulk struct {
	// contains filtered or unexported fields
}

ValidMessageCreateBulk is the builder for creating many ValidMessage entities in bulk.

func (*ValidMessageCreateBulk) Exec added in v0.2.0

func (vmcb *ValidMessageCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ValidMessageCreateBulk) ExecX added in v0.2.0

func (vmcb *ValidMessageCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ValidMessageCreateBulk) Save

Save creates the ValidMessage entities in the database.

func (*ValidMessageCreateBulk) SaveX

func (vmcb *ValidMessageCreateBulk) SaveX(ctx context.Context) []*ValidMessage

SaveX is like Save, but panics if an error occurs.

type ValidMessageDelete

type ValidMessageDelete struct {
	// contains filtered or unexported fields
}

ValidMessageDelete is the builder for deleting a ValidMessage entity.

func (*ValidMessageDelete) Exec

func (vmd *ValidMessageDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ValidMessageDelete) ExecX

func (vmd *ValidMessageDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ValidMessageDelete) Where

Where appends a list predicates to the ValidMessageDelete builder.

type ValidMessageDeleteOne

type ValidMessageDeleteOne struct {
	// contains filtered or unexported fields
}

ValidMessageDeleteOne is the builder for deleting a single ValidMessage entity.

func (*ValidMessageDeleteOne) Exec

func (vmdo *ValidMessageDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ValidMessageDeleteOne) ExecX

func (vmdo *ValidMessageDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ValidMessageGroupBy

type ValidMessageGroupBy struct {
	// contains filtered or unexported fields
}

ValidMessageGroupBy is the group-by builder for ValidMessage entities.

func (*ValidMessageGroupBy) Aggregate

func (vmgb *ValidMessageGroupBy) Aggregate(fns ...AggregateFunc) *ValidMessageGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ValidMessageGroupBy) Bool

func (s *ValidMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ValidMessageGroupBy) BoolX

func (s *ValidMessageGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ValidMessageGroupBy) Bools

func (s *ValidMessageGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ValidMessageGroupBy) BoolsX

func (s *ValidMessageGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ValidMessageGroupBy) Float64

func (s *ValidMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ValidMessageGroupBy) Float64X

func (s *ValidMessageGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ValidMessageGroupBy) Float64s

func (s *ValidMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ValidMessageGroupBy) Float64sX

func (s *ValidMessageGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ValidMessageGroupBy) Int

func (s *ValidMessageGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ValidMessageGroupBy) IntX

func (s *ValidMessageGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ValidMessageGroupBy) Ints

func (s *ValidMessageGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ValidMessageGroupBy) IntsX

func (s *ValidMessageGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ValidMessageGroupBy) Scan

func (vmgb *ValidMessageGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ValidMessageGroupBy) ScanX

func (s *ValidMessageGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ValidMessageGroupBy) String

func (s *ValidMessageGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ValidMessageGroupBy) StringX

func (s *ValidMessageGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ValidMessageGroupBy) Strings

func (s *ValidMessageGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ValidMessageGroupBy) StringsX

func (s *ValidMessageGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ValidMessageMutation

type ValidMessageMutation struct {
	// contains filtered or unexported fields
}

ValidMessageMutation represents an operation that mutates the ValidMessage nodes in the graph.

func (*ValidMessageMutation) AddField

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) AddOpti8

func (m *ValidMessageMutation) AddOpti8(i int8)

AddOpti8 adds i to the "opti8" field.

func (*ValidMessageMutation) AddU8

func (m *ValidMessageMutation) AddU8(u int8)

AddU8 adds u to the "u8" field.

func (*ValidMessageMutation) AddedEdges

func (m *ValidMessageMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ValidMessageMutation) AddedField

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) AddedFields

func (m *ValidMessageMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ValidMessageMutation) AddedIDs

func (m *ValidMessageMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ValidMessageMutation) AddedOpti8

func (m *ValidMessageMutation) AddedOpti8() (r int8, exists bool)

AddedOpti8 returns the value that was added to the "opti8" field in this mutation.

func (*ValidMessageMutation) AddedU8

func (m *ValidMessageMutation) AddedU8() (r int8, exists bool)

AddedU8 returns the value that was added to the "u8" field in this mutation.

func (*ValidMessageMutation) ClearEdge

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) ClearField

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) ClearOpti8

func (m *ValidMessageMutation) ClearOpti8()

ClearOpti8 clears the value of the "opti8" field.

func (*ValidMessageMutation) ClearedEdges

func (m *ValidMessageMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ValidMessageMutation) ClearedFields

func (m *ValidMessageMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ValidMessageMutation) Client

func (m ValidMessageMutation) 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 (*ValidMessageMutation) EdgeCleared

func (m *ValidMessageMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ValidMessageMutation) Field

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) FieldCleared

func (m *ValidMessageMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ValidMessageMutation) Fields

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) ID

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) IDs added in v0.3.0

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) Name

func (m *ValidMessageMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ValidMessageMutation) OldField

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) OldName

func (m *ValidMessageMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the ValidMessage entity. If the ValidMessage 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 (*ValidMessageMutation) OldOpti8

func (m *ValidMessageMutation) OldOpti8(ctx context.Context) (v *int8, err error)

OldOpti8 returns the old "opti8" field's value of the ValidMessage entity. If the ValidMessage 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 (*ValidMessageMutation) OldTs

func (m *ValidMessageMutation) OldTs(ctx context.Context) (v time.Time, err error)

OldTs returns the old "ts" field's value of the ValidMessage entity. If the ValidMessage 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 (*ValidMessageMutation) OldU8

func (m *ValidMessageMutation) OldU8(ctx context.Context) (v uint8, err error)

OldU8 returns the old "u8" field's value of the ValidMessage entity. If the ValidMessage 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 (*ValidMessageMutation) OldUUID

func (m *ValidMessageMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)

OldUUID returns the old "uuid" field's value of the ValidMessage entity. If the ValidMessage 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 (*ValidMessageMutation) Op

func (m *ValidMessageMutation) Op() Op

Op returns the operation name.

func (*ValidMessageMutation) Opti8

func (m *ValidMessageMutation) Opti8() (r int8, exists bool)

Opti8 returns the value of the "opti8" field in the mutation.

func (*ValidMessageMutation) Opti8Cleared

func (m *ValidMessageMutation) Opti8Cleared() bool

Opti8Cleared returns if the "opti8" field was cleared in this mutation.

func (*ValidMessageMutation) RemovedEdges

func (m *ValidMessageMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ValidMessageMutation) RemovedIDs

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) ResetEdge

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) ResetField

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) ResetName

func (m *ValidMessageMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ValidMessageMutation) ResetOpti8

func (m *ValidMessageMutation) ResetOpti8()

ResetOpti8 resets all changes to the "opti8" field.

func (*ValidMessageMutation) ResetTs

func (m *ValidMessageMutation) ResetTs()

ResetTs resets all changes to the "ts" field.

func (*ValidMessageMutation) ResetU8

func (m *ValidMessageMutation) ResetU8()

ResetU8 resets all changes to the "u8" field.

func (*ValidMessageMutation) ResetUUID

func (m *ValidMessageMutation) ResetUUID()

ResetUUID resets all changes to the "uuid" field.

func (*ValidMessageMutation) SetField

func (m *ValidMessageMutation) 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 (*ValidMessageMutation) SetName

func (m *ValidMessageMutation) SetName(s string)

SetName sets the "name" field.

func (*ValidMessageMutation) SetOp added in v0.3.5

func (m *ValidMessageMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ValidMessageMutation) SetOpti8

func (m *ValidMessageMutation) SetOpti8(i int8)

SetOpti8 sets the "opti8" field.

func (*ValidMessageMutation) SetTs

func (m *ValidMessageMutation) SetTs(t time.Time)

SetTs sets the "ts" field.

func (*ValidMessageMutation) SetU8

func (m *ValidMessageMutation) SetU8(u uint8)

SetU8 sets the "u8" field.

func (*ValidMessageMutation) SetUUID

func (m *ValidMessageMutation) SetUUID(u uuid.UUID)

SetUUID sets the "uuid" field.

func (*ValidMessageMutation) Ts

func (m *ValidMessageMutation) Ts() (r time.Time, exists bool)

Ts returns the value of the "ts" field in the mutation.

func (ValidMessageMutation) Tx

func (m ValidMessageMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ValidMessageMutation) Type

func (m *ValidMessageMutation) Type() string

Type returns the node type of this mutation (ValidMessage).

func (*ValidMessageMutation) U8

func (m *ValidMessageMutation) U8() (r uint8, exists bool)

U8 returns the value of the "u8" field in the mutation.

func (*ValidMessageMutation) UUID

func (m *ValidMessageMutation) UUID() (r uuid.UUID, exists bool)

UUID returns the value of the "uuid" field in the mutation.

func (*ValidMessageMutation) Where added in v0.2.0

Where appends a list predicates to the ValidMessageMutation builder.

func (*ValidMessageMutation) WhereP added in v0.3.5

func (m *ValidMessageMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ValidMessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ValidMessageQuery

type ValidMessageQuery struct {
	// contains filtered or unexported fields
}

ValidMessageQuery is the builder for querying ValidMessage entities.

func (*ValidMessageQuery) Aggregate added in v0.3.4

func (vmq *ValidMessageQuery) Aggregate(fns ...AggregateFunc) *ValidMessageSelect

Aggregate returns a ValidMessageSelect configured with the given aggregations.

func (*ValidMessageQuery) All

func (vmq *ValidMessageQuery) All(ctx context.Context) ([]*ValidMessage, error)

All executes the query and returns a list of ValidMessages.

func (*ValidMessageQuery) AllX

func (vmq *ValidMessageQuery) AllX(ctx context.Context) []*ValidMessage

AllX is like All, but panics if an error occurs.

func (*ValidMessageQuery) Clone

func (vmq *ValidMessageQuery) Clone() *ValidMessageQuery

Clone returns a duplicate of the ValidMessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ValidMessageQuery) Count

func (vmq *ValidMessageQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ValidMessageQuery) CountX

func (vmq *ValidMessageQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ValidMessageQuery) Exist

func (vmq *ValidMessageQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ValidMessageQuery) ExistX

func (vmq *ValidMessageQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ValidMessageQuery) First

func (vmq *ValidMessageQuery) First(ctx context.Context) (*ValidMessage, error)

First returns the first ValidMessage entity from the query. Returns a *NotFoundError when no ValidMessage was found.

func (*ValidMessageQuery) FirstID

func (vmq *ValidMessageQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first ValidMessage ID from the query. Returns a *NotFoundError when no ValidMessage ID was found.

func (*ValidMessageQuery) FirstIDX

func (vmq *ValidMessageQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ValidMessageQuery) FirstX

func (vmq *ValidMessageQuery) FirstX(ctx context.Context) *ValidMessage

FirstX is like First, but panics if an error occurs.

func (*ValidMessageQuery) GroupBy

func (vmq *ValidMessageQuery) GroupBy(field string, fields ...string) *ValidMessageGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ValidMessage.Query().
	GroupBy(validmessage.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ValidMessageQuery) IDs

func (vmq *ValidMessageQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of ValidMessage IDs.

func (*ValidMessageQuery) IDsX

func (vmq *ValidMessageQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ValidMessageQuery) Limit

func (vmq *ValidMessageQuery) Limit(limit int) *ValidMessageQuery

Limit the number of records to be returned by this query.

func (*ValidMessageQuery) Offset

func (vmq *ValidMessageQuery) Offset(offset int) *ValidMessageQuery

Offset to start from.

func (*ValidMessageQuery) Only

func (vmq *ValidMessageQuery) Only(ctx context.Context) (*ValidMessage, error)

Only returns a single ValidMessage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ValidMessage entity is found. Returns a *NotFoundError when no ValidMessage entities are found.

func (*ValidMessageQuery) OnlyID

func (vmq *ValidMessageQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only ValidMessage ID in the query. Returns a *NotSingularError when more than one ValidMessage ID is found. Returns a *NotFoundError when no entities are found.

func (*ValidMessageQuery) OnlyIDX

func (vmq *ValidMessageQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ValidMessageQuery) OnlyX

func (vmq *ValidMessageQuery) OnlyX(ctx context.Context) *ValidMessage

OnlyX is like Only, but panics if an error occurs.

func (*ValidMessageQuery) Order

func (vmq *ValidMessageQuery) Order(o ...OrderFunc) *ValidMessageQuery

Order specifies how the records should be ordered.

func (*ValidMessageQuery) Select

func (vmq *ValidMessageQuery) Select(fields ...string) *ValidMessageSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.ValidMessage.Query().
	Select(validmessage.FieldName).
	Scan(ctx, &v)

func (*ValidMessageQuery) Unique

func (vmq *ValidMessageQuery) Unique(unique bool) *ValidMessageQuery

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 (*ValidMessageQuery) Where

Where adds a new predicate for the ValidMessageQuery builder.

type ValidMessageSelect

type ValidMessageSelect struct {
	*ValidMessageQuery
	// contains filtered or unexported fields
}

ValidMessageSelect is the builder for selecting fields of ValidMessage entities.

func (*ValidMessageSelect) Aggregate added in v0.3.4

func (vms *ValidMessageSelect) Aggregate(fns ...AggregateFunc) *ValidMessageSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ValidMessageSelect) Bool

func (s *ValidMessageSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ValidMessageSelect) BoolX

func (s *ValidMessageSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ValidMessageSelect) Bools

func (s *ValidMessageSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ValidMessageSelect) BoolsX

func (s *ValidMessageSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ValidMessageSelect) Float64

func (s *ValidMessageSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ValidMessageSelect) Float64X

func (s *ValidMessageSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ValidMessageSelect) Float64s

func (s *ValidMessageSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ValidMessageSelect) Float64sX

func (s *ValidMessageSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ValidMessageSelect) Int

func (s *ValidMessageSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ValidMessageSelect) IntX

func (s *ValidMessageSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ValidMessageSelect) Ints

func (s *ValidMessageSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ValidMessageSelect) IntsX

func (s *ValidMessageSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ValidMessageSelect) Scan

func (vms *ValidMessageSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ValidMessageSelect) ScanX

func (s *ValidMessageSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ValidMessageSelect) String

func (s *ValidMessageSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ValidMessageSelect) StringX

func (s *ValidMessageSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ValidMessageSelect) Strings

func (s *ValidMessageSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ValidMessageSelect) StringsX

func (s *ValidMessageSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ValidMessageUpdate

type ValidMessageUpdate struct {
	// contains filtered or unexported fields
}

ValidMessageUpdate is the builder for updating ValidMessage entities.

func (*ValidMessageUpdate) AddOpti8

func (vmu *ValidMessageUpdate) AddOpti8(i int8) *ValidMessageUpdate

AddOpti8 adds i to the "opti8" field.

func (*ValidMessageUpdate) AddU8

AddU8 adds u to the "u8" field.

func (*ValidMessageUpdate) ClearOpti8

func (vmu *ValidMessageUpdate) ClearOpti8() *ValidMessageUpdate

ClearOpti8 clears the value of the "opti8" field.

func (*ValidMessageUpdate) Exec

func (vmu *ValidMessageUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ValidMessageUpdate) ExecX

func (vmu *ValidMessageUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ValidMessageUpdate) Mutation

func (vmu *ValidMessageUpdate) Mutation() *ValidMessageMutation

Mutation returns the ValidMessageMutation object of the builder.

func (*ValidMessageUpdate) Save

func (vmu *ValidMessageUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ValidMessageUpdate) SaveX

func (vmu *ValidMessageUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ValidMessageUpdate) SetName

func (vmu *ValidMessageUpdate) SetName(s string) *ValidMessageUpdate

SetName sets the "name" field.

func (*ValidMessageUpdate) SetNillableOpti8

func (vmu *ValidMessageUpdate) SetNillableOpti8(i *int8) *ValidMessageUpdate

SetNillableOpti8 sets the "opti8" field if the given value is not nil.

func (*ValidMessageUpdate) SetOpti8

func (vmu *ValidMessageUpdate) SetOpti8(i int8) *ValidMessageUpdate

SetOpti8 sets the "opti8" field.

func (*ValidMessageUpdate) SetTs

SetTs sets the "ts" field.

func (*ValidMessageUpdate) SetU8

SetU8 sets the "u8" field.

func (*ValidMessageUpdate) SetUUID

SetUUID sets the "uuid" field.

func (*ValidMessageUpdate) Where

Where appends a list predicates to the ValidMessageUpdate builder.

type ValidMessageUpdateOne

type ValidMessageUpdateOne struct {
	// contains filtered or unexported fields
}

ValidMessageUpdateOne is the builder for updating a single ValidMessage entity.

func (*ValidMessageUpdateOne) AddOpti8

AddOpti8 adds i to the "opti8" field.

func (*ValidMessageUpdateOne) AddU8

AddU8 adds u to the "u8" field.

func (*ValidMessageUpdateOne) ClearOpti8

func (vmuo *ValidMessageUpdateOne) ClearOpti8() *ValidMessageUpdateOne

ClearOpti8 clears the value of the "opti8" field.

func (*ValidMessageUpdateOne) Exec

func (vmuo *ValidMessageUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ValidMessageUpdateOne) ExecX

func (vmuo *ValidMessageUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ValidMessageUpdateOne) Mutation

func (vmuo *ValidMessageUpdateOne) Mutation() *ValidMessageMutation

Mutation returns the ValidMessageMutation object of the builder.

func (*ValidMessageUpdateOne) Save

Save executes the query and returns the updated ValidMessage entity.

func (*ValidMessageUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ValidMessageUpdateOne) Select

func (vmuo *ValidMessageUpdateOne) Select(field string, fields ...string) *ValidMessageUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ValidMessageUpdateOne) SetName

SetName sets the "name" field.

func (*ValidMessageUpdateOne) SetNillableOpti8

func (vmuo *ValidMessageUpdateOne) SetNillableOpti8(i *int8) *ValidMessageUpdateOne

SetNillableOpti8 sets the "opti8" field if the given value is not nil.

func (*ValidMessageUpdateOne) SetOpti8

SetOpti8 sets the "opti8" field.

func (*ValidMessageUpdateOne) SetTs

SetTs sets the "ts" field.

func (*ValidMessageUpdateOne) SetU8

SetU8 sets the "u8" field.

func (*ValidMessageUpdateOne) SetUUID

SetUUID sets the "uuid" field.

type ValidMessages

type ValidMessages []*ValidMessage

ValidMessages is a parsable slice of ValidMessage.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL