ent

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 39 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"
	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

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

func (ams *AllMethodsService) String() string

String implements the fmt.Stringer.

func (*AllMethodsService) Unwrap

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

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

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

AllMethodsServiceClient is a client for the AllMethodsService schema.

func NewAllMethodsServiceClient

func NewAllMethodsServiceClient(c config) *AllMethodsServiceClient

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

func (*AllMethodsServiceClient) Create

Create returns a create builder for AllMethodsService.

func (*AllMethodsServiceClient) CreateBulk

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

func (*AllMethodsServiceClient) Delete

Delete returns a delete builder for AllMethodsService.

func (*AllMethodsServiceClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*AllMethodsServiceClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*AllMethodsServiceClient) Get

Get returns a AllMethodsService entity by its id.

func (*AllMethodsServiceClient) GetX

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

func (*AllMethodsServiceClient) Hooks

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

Hooks returns the client hooks.

func (*AllMethodsServiceClient) Query

Query returns a query builder for AllMethodsService.

func (*AllMethodsServiceClient) Update

Update returns an update builder for AllMethodsService.

func (*AllMethodsServiceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AllMethodsServiceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*AllMethodsServiceClient) Use

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

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

AllMethodsServiceCreate is the builder for creating a AllMethodsService entity.

func (*AllMethodsServiceCreate) Exec

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

Exec executes the query.

func (*AllMethodsServiceCreate) ExecX

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

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

func (*AllMethodsServiceCreate) Mutation

Mutation returns the AllMethodsServiceMutation object of the builder.

func (*AllMethodsServiceCreate) Save

Save creates the AllMethodsService in the database.

func (*AllMethodsServiceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

type AllMethodsServiceCreateBulk

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

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

func (*AllMethodsServiceCreateBulk) Exec

Exec executes the query.

func (*AllMethodsServiceCreateBulk) ExecX

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

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

func (*AllMethodsServiceCreateBulk) Save

Save creates the AllMethodsService entities in the database.

func (*AllMethodsServiceCreateBulk) SaveX

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

type AllMethodsServiceDelete

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

AllMethodsServiceDelete is the builder for deleting a AllMethodsService entity.

func (*AllMethodsServiceDelete) Exec

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

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

func (*AllMethodsServiceDelete) ExecX

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

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

func (*AllMethodsServiceDelete) Where

Where appends a list predicates to the AllMethodsServiceDelete builder.

type AllMethodsServiceDeleteOne

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

AllMethodsServiceDeleteOne is the builder for deleting a single AllMethodsService entity.

func (*AllMethodsServiceDeleteOne) Exec

Exec executes the deletion query.

func (*AllMethodsServiceDeleteOne) ExecX

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

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

type AllMethodsServiceGroupBy

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

AllMethodsServiceGroupBy is the group-by builder for AllMethodsService entities.

func (*AllMethodsServiceGroupBy) Aggregate

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

func (*AllMethodsServiceGroupBy) Bool

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

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

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

func (*AllMethodsServiceGroupBy) Bools

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

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

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

func (*AllMethodsServiceGroupBy) Float64

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

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

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

func (*AllMethodsServiceGroupBy) Float64s

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

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

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

func (*AllMethodsServiceGroupBy) Int

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

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

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

func (*AllMethodsServiceGroupBy) Ints

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

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

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

func (*AllMethodsServiceGroupBy) Scan

func (amsgb *AllMethodsServiceGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*AllMethodsServiceGroupBy) ScanX

func (s *AllMethodsServiceGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*AllMethodsServiceGroupBy) String

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

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

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

func (*AllMethodsServiceGroupBy) Strings

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

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

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

type AllMethodsServiceMutation

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

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

func (*AllMethodsServiceMutation) AddField

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

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

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

func (*AllMethodsServiceMutation) AddedField

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

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

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

func (*AllMethodsServiceMutation) AddedIDs

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

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

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

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

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

func (*AllMethodsServiceMutation) ClearedFields

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

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

func (AllMethodsServiceMutation) Client

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

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

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

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

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

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

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

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

func (m *AllMethodsServiceMutation) Op() Op

Op returns the operation name.

func (*AllMethodsServiceMutation) RemovedEdges

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

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

func (*AllMethodsServiceMutation) RemovedIDs

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

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

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

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) Tx

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

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

func (*AllMethodsServiceMutation) Where

Where appends a list predicates to the AllMethodsServiceMutation builder.

type AllMethodsServiceQuery

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

AllMethodsServiceQuery is the builder for querying AllMethodsService entities.

func (*AllMethodsServiceQuery) All

All executes the query and returns a list of AllMethodsServices.

func (*AllMethodsServiceQuery) AllX

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

func (*AllMethodsServiceQuery) Clone

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

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

Count returns the count of the given query.

func (*AllMethodsServiceQuery) CountX

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

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

func (*AllMethodsServiceQuery) Exist

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

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

func (*AllMethodsServiceQuery) ExistX

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

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

func (*AllMethodsServiceQuery) First

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

func (*AllMethodsServiceQuery) FirstID

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

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

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

func (*AllMethodsServiceQuery) FirstX

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

func (*AllMethodsServiceQuery) GroupBy

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

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

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

func (*AllMethodsServiceQuery) IDsX

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

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

func (*AllMethodsServiceQuery) Limit

Limit adds a limit step to the query.

func (*AllMethodsServiceQuery) Offset

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

Offset adds an offset step to the query.

func (*AllMethodsServiceQuery) Only

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

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

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

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

func (*AllMethodsServiceQuery) OnlyX

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

func (*AllMethodsServiceQuery) Order

Order adds an order step to the query.

func (*AllMethodsServiceQuery) Select

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

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

Where adds a new predicate for the AllMethodsServiceQuery builder.

type AllMethodsServiceSelect

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

AllMethodsServiceSelect is the builder for selecting fields of AllMethodsService entities.

func (*AllMethodsServiceSelect) Bool

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

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

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

func (*AllMethodsServiceSelect) Bools

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

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

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

func (*AllMethodsServiceSelect) Float64

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

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

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

func (*AllMethodsServiceSelect) Float64s

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

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

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

func (*AllMethodsServiceSelect) Int

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

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

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

func (*AllMethodsServiceSelect) Ints

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

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

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

func (*AllMethodsServiceSelect) Scan

func (amss *AllMethodsServiceSelect) Scan(ctx context.Context, v interface{}) error

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

func (*AllMethodsServiceSelect) ScanX

func (s *AllMethodsServiceSelect) ScanX(ctx context.Context, v interface{})

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

func (*AllMethodsServiceSelect) String

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

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

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

func (*AllMethodsServiceSelect) Strings

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

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

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

type AllMethodsServiceUpdate

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

AllMethodsServiceUpdate is the builder for updating AllMethodsService entities.

func (*AllMethodsServiceUpdate) Exec

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

Exec executes the query.

func (*AllMethodsServiceUpdate) ExecX

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

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

func (*AllMethodsServiceUpdate) Mutation

Mutation returns the AllMethodsServiceMutation object of the builder.

func (*AllMethodsServiceUpdate) Save

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

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

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

func (*AllMethodsServiceUpdate) Where

Where appends a list predicates to the AllMethodsServiceUpdate builder.

type AllMethodsServiceUpdateOne

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

AllMethodsServiceUpdateOne is the builder for updating a single AllMethodsService entity.

func (*AllMethodsServiceUpdateOne) Exec

Exec executes the query on the entity.

func (*AllMethodsServiceUpdateOne) ExecX

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

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

func (*AllMethodsServiceUpdateOne) Mutation

Mutation returns the AllMethodsServiceMutation object of the builder.

func (*AllMethodsServiceUpdateOne) Save

Save executes the query and returns the updated AllMethodsService entity.

func (*AllMethodsServiceUpdateOne) SaveX

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

func (*AllMethodsServiceUpdateOne) Select

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

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 create builder for BlogPost.

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 delete builder for the given entity.

func (*BlogPostClient) DeleteOneID

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

DeleteOneID returns a delete builder for the given 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) 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

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

Exec executes the query.

func (*BlogPostCreate) ExecX

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

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

Exec executes the query.

func (*BlogPostCreateBulk) ExecX

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 interface{}) error

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

func (*BlogPostGroupBy) ScanX

func (s *BlogPostGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

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

Where appends a list predicates to the BlogPostMutation builder.

type BlogPostQuery

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

BlogPostQuery is the builder for querying BlogPost entities.

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 adds a limit step to the query.

func (*BlogPostQuery) Offset

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

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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 create builder for Category.

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 delete builder for the given entity.

func (*CategoryClient) DeleteOneID

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

DeleteOneID returns a delete builder for the given 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) 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

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

Exec executes the query.

func (*CategoryCreate) ExecX

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

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

Exec executes the query.

func (*CategoryCreateBulk) ExecX

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 interface{}) error

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

func (*CategoryGroupBy) ScanX

func (s *CategoryGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

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

Where appends a list predicates to the CategoryMutation builder.

type CategoryQuery

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

CategoryQuery is the builder for querying Category entities.

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 adds a limit step to the query.

func (*CategoryQuery) Offset

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

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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
	// 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) 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 create builder for DependsOnSkipped.

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 delete builder for the given entity.

func (*DependsOnSkippedClient) DeleteOneID

DeleteOneID returns a delete builder for the given 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) 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

func (dosc *DependsOnSkippedCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DependsOnSkippedCreate) ExecX

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

Exec executes the query.

func (*DependsOnSkippedCreateBulk) ExecX

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 interface{}) error

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

func (*DependsOnSkippedGroupBy) ScanX

func (s *DependsOnSkippedGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the DependsOnSkippedMutation builder.

type DependsOnSkippedQuery

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

DependsOnSkippedQuery is the builder for querying DependsOnSkipped entities.

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 adds a limit step to the query.

func (*DependsOnSkippedQuery) Offset

func (dosq *DependsOnSkippedQuery) Offset(offset int) *DependsOnSkippedQuery

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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 create builder for DuplicateNumberMessage.

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 delete builder for the given entity.

func (*DuplicateNumberMessageClient) DeleteOneID

DeleteOneID returns a delete builder for the given 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) 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

Exec executes the query.

func (*DuplicateNumberMessageCreate) ExecX

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

Exec executes the query.

func (*DuplicateNumberMessageCreateBulk) ExecX

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

func (dnmgb *DuplicateNumberMessageGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*DuplicateNumberMessageGroupBy) ScanX

func (s *DuplicateNumberMessageGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the DuplicateNumberMessageMutation builder.

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) 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 adds a limit step to the query.

func (*DuplicateNumberMessageQuery) Offset

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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

func (dnms *DuplicateNumberMessageSelect) Scan(ctx context.Context, v interface{}) error

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

func (*DuplicateNumberMessageSelect) ScanX

func (s *DuplicateNumberMessageSelect) ScanX(ctx context.Context, v interface{})

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 create builder for ExplicitSkippedMessage.

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 delete builder for the given entity.

func (*ExplicitSkippedMessageClient) DeleteOneID

DeleteOneID returns a delete builder for the given 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) 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

Exec executes the query.

func (*ExplicitSkippedMessageCreate) ExecX

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

Exec executes the query.

func (*ExplicitSkippedMessageCreateBulk) ExecX

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

func (esmgb *ExplicitSkippedMessageGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ExplicitSkippedMessageGroupBy) ScanX

func (s *ExplicitSkippedMessageGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the ExplicitSkippedMessageMutation builder.

type ExplicitSkippedMessageQuery

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

ExplicitSkippedMessageQuery is the builder for querying ExplicitSkippedMessage entities.

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 adds a limit step to the query.

func (*ExplicitSkippedMessageQuery) Offset

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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

func (esms *ExplicitSkippedMessageSelect) Scan(ctx context.Context, v interface{}) error

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

func (*ExplicitSkippedMessageSelect) ScanX

func (s *ExplicitSkippedMessageSelect) ScanX(ctx context.Context, v interface{})

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 create builder for Image.

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 delete builder for the given entity.

func (*ImageClient) DeleteOneID

func (c *ImageClient) DeleteOneID(id uuid.UUID) *ImageDeleteOne

DeleteOneID returns a delete builder for the given 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) 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

func (ic *ImageCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ImageCreate) ExecX

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

func (icb *ImageCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ImageCreateBulk) ExecX

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 interface{}) error

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

func (*ImageGroupBy) ScanX

func (s *ImageGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

func (m *ImageMutation) Where(ps ...predicate.Image)

Where appends a list predicates to the ImageMutation builder.

type ImageQuery

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

ImageQuery is the builder for querying Image entities.

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 adds a limit step to the query.

func (*ImageQuery) Offset

func (iq *ImageQuery) Offset(offset int) *ImageQuery

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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 create builder for ImplicitSkippedMessage.

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 delete builder for the given entity.

func (*ImplicitSkippedMessageClient) DeleteOneID

DeleteOneID returns a delete builder for the given 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) 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

Exec executes the query.

func (*ImplicitSkippedMessageCreate) ExecX

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

Exec executes the query.

func (*ImplicitSkippedMessageCreateBulk) ExecX

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

func (ismgb *ImplicitSkippedMessageGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ImplicitSkippedMessageGroupBy) ScanX

func (s *ImplicitSkippedMessageGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the ImplicitSkippedMessageMutation builder.

type ImplicitSkippedMessageQuery

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

ImplicitSkippedMessageQuery is the builder for querying ImplicitSkippedMessage entities.

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 adds a limit step to the query.

func (*ImplicitSkippedMessageQuery) Offset

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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

func (isms *ImplicitSkippedMessageSelect) Scan(ctx context.Context, v interface{}) error

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

func (*ImplicitSkippedMessageSelect) ScanX

func (s *ImplicitSkippedMessageSelect) ScanX(ctx context.Context, v interface{})

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 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 create builder for InvalidFieldMessage.

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 delete builder for the given entity.

func (*InvalidFieldMessageClient) DeleteOneID

DeleteOneID returns a delete builder for the given 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) 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

Exec executes the query.

func (*InvalidFieldMessageCreate) ExecX

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

Exec executes the query.

func (*InvalidFieldMessageCreateBulk) ExecX

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 interface{}) error

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

func (*InvalidFieldMessageGroupBy) ScanX

func (s *InvalidFieldMessageGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the InvalidFieldMessageMutation builder.

type InvalidFieldMessageQuery

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

InvalidFieldMessageQuery is the builder for querying InvalidFieldMessage entities.

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 adds a limit step to the query.

func (*InvalidFieldMessageQuery) Offset

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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 create builder for MessageWithEnum.

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 delete builder for the given entity.

func (*MessageWithEnumClient) DeleteOneID

DeleteOneID returns a delete builder for the given 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) 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

func (mwec *MessageWithEnumCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageWithEnumCreate) ExecX

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

Exec executes the query.

func (*MessageWithEnumCreateBulk) ExecX

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 interface{}) error

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

func (*MessageWithEnumGroupBy) ScanX

func (s *MessageWithEnumGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the MessageWithEnumMutation builder.

type MessageWithEnumQuery

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

MessageWithEnumQuery is the builder for querying MessageWithEnum entities.

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 adds a limit step to the query.

func (*MessageWithEnumQuery) Offset

func (mweq *MessageWithEnumQuery) Offset(offset int) *MessageWithEnumQuery

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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 create builder for MessageWithFieldOne.

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 delete builder for the given entity.

func (*MessageWithFieldOneClient) DeleteOneID

DeleteOneID returns a delete builder for the given 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) 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

Exec executes the query.

func (*MessageWithFieldOneCreate) ExecX

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

Exec executes the query.

func (*MessageWithFieldOneCreateBulk) ExecX

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 interface{}) error

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

func (*MessageWithFieldOneGroupBy) ScanX

func (s *MessageWithFieldOneGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the MessageWithFieldOneMutation builder.

type MessageWithFieldOneQuery

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

MessageWithFieldOneQuery is the builder for querying MessageWithFieldOne entities.

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 adds a limit step to the query.

func (*MessageWithFieldOneQuery) Offset

func (mwfoq *MessageWithFieldOneQuery) Offset(offset int) *MessageWithFieldOneQuery

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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 create builder for MessageWithID.

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 delete builder for the given entity.

func (*MessageWithIDClient) DeleteOneID

func (c *MessageWithIDClient) DeleteOneID(id int32) *MessageWithIDDeleteOne

DeleteOneID returns a delete builder for the given 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) 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

func (mwic *MessageWithIDCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageWithIDCreate) ExecX

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

func (mwicb *MessageWithIDCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MessageWithIDCreateBulk) ExecX

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 interface{}) error

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

func (*MessageWithIDGroupBy) ScanX

func (s *MessageWithIDGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the MessageWithIDMutation builder.

type MessageWithIDQuery

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

MessageWithIDQuery is the builder for querying MessageWithID entities.

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 adds a limit step to the query.

func (*MessageWithIDQuery) Offset

func (mwiq *MessageWithIDQuery) Offset(offset int) *MessageWithIDQuery

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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 create builder for MessageWithOptionals.

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 delete builder for the given entity.

func (*MessageWithOptionalsClient) DeleteOneID

DeleteOneID returns a delete builder for the given 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) 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

Exec executes the query.

func (*MessageWithOptionalsCreate) ExecX

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

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

Exec executes the query.

func (*MessageWithOptionalsCreateBulk) ExecX

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 interface{}) error

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

func (*MessageWithOptionalsGroupBy) ScanX

func (s *MessageWithOptionalsGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the MessageWithOptionalsMutation builder.

type MessageWithOptionalsQuery

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

MessageWithOptionalsQuery is the builder for querying MessageWithOptionals entities.

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 adds a limit step to the query.

func (*MessageWithOptionalsQuery) Offset

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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

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

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 create builder for MessageWithPackageName.

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 delete builder for the given entity.

func (*MessageWithPackageNameClient) DeleteOneID

DeleteOneID returns a delete builder for the given 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) 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

Exec executes the query.

func (*MessageWithPackageNameCreate) ExecX

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

Exec executes the query.

func (*MessageWithPackageNameCreateBulk) ExecX

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 interface{}) error

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

func (*MessageWithPackageNameGroupBy) ScanX

func (s *MessageWithPackageNameGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the MessageWithPackageNameMutation builder.

type MessageWithPackageNameQuery

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

MessageWithPackageNameQuery is the builder for querying MessageWithPackageName entities.

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 adds a limit step to the query.

func (*MessageWithPackageNameQuery) Offset

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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

func (mwpns *MessageWithPackageNameSelect) Scan(ctx context.Context, v interface{}) error

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

func (*MessageWithPackageNameSelect) ScanX

func (s *MessageWithPackageNameSelect) ScanX(ctx context.Context, v interface{})

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 MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

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

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

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

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type OneMethodService

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

func (oms *OneMethodService) String() string

String implements the fmt.Stringer.

func (*OneMethodService) Unwrap

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

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

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

OneMethodServiceClient is a client for the OneMethodService schema.

func NewOneMethodServiceClient

func NewOneMethodServiceClient(c config) *OneMethodServiceClient

NewOneMethodServiceClient returns a client for the OneMethodService from the given config.

func (*OneMethodServiceClient) Create

Create returns a create builder for OneMethodService.

func (*OneMethodServiceClient) CreateBulk

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

func (*OneMethodServiceClient) Delete

Delete returns a delete builder for OneMethodService.

func (*OneMethodServiceClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*OneMethodServiceClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*OneMethodServiceClient) Get

Get returns a OneMethodService entity by its id.

func (*OneMethodServiceClient) GetX

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

func (*OneMethodServiceClient) Hooks

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

Hooks returns the client hooks.

func (*OneMethodServiceClient) Query

Query returns a query builder for OneMethodService.

func (*OneMethodServiceClient) Update

Update returns an update builder for OneMethodService.

func (*OneMethodServiceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OneMethodServiceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*OneMethodServiceClient) Use

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

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

OneMethodServiceCreate is the builder for creating a OneMethodService entity.

func (*OneMethodServiceCreate) Exec

func (omsc *OneMethodServiceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OneMethodServiceCreate) ExecX

func (omsc *OneMethodServiceCreate) ExecX(ctx context.Context)

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

func (*OneMethodServiceCreate) Mutation

Mutation returns the OneMethodServiceMutation object of the builder.

func (*OneMethodServiceCreate) Save

Save creates the OneMethodService in the database.

func (*OneMethodServiceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

type OneMethodServiceCreateBulk

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

OneMethodServiceCreateBulk is the builder for creating many OneMethodService entities in bulk.

func (*OneMethodServiceCreateBulk) Exec

Exec executes the query.

func (*OneMethodServiceCreateBulk) ExecX

func (omscb *OneMethodServiceCreateBulk) ExecX(ctx context.Context)

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

func (*OneMethodServiceCreateBulk) Save

Save creates the OneMethodService entities in the database.

func (*OneMethodServiceCreateBulk) SaveX

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

type OneMethodServiceDelete

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

OneMethodServiceDelete is the builder for deleting a OneMethodService entity.

func (*OneMethodServiceDelete) Exec

func (omsd *OneMethodServiceDelete) Exec(ctx context.Context) (int, error)

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

func (*OneMethodServiceDelete) ExecX

func (omsd *OneMethodServiceDelete) ExecX(ctx context.Context) int

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

func (*OneMethodServiceDelete) Where

Where appends a list predicates to the OneMethodServiceDelete builder.

type OneMethodServiceDeleteOne

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

OneMethodServiceDeleteOne is the builder for deleting a single OneMethodService entity.

func (*OneMethodServiceDeleteOne) Exec

Exec executes the deletion query.

func (*OneMethodServiceDeleteOne) ExecX

func (omsdo *OneMethodServiceDeleteOne) ExecX(ctx context.Context)

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

type OneMethodServiceGroupBy

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

OneMethodServiceGroupBy is the group-by builder for OneMethodService entities.

func (*OneMethodServiceGroupBy) Aggregate

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

func (*OneMethodServiceGroupBy) Bool

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

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

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

func (*OneMethodServiceGroupBy) Bools

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

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

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

func (*OneMethodServiceGroupBy) Float64

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

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

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

func (*OneMethodServiceGroupBy) Float64s

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

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

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

func (*OneMethodServiceGroupBy) Int

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

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

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

func (*OneMethodServiceGroupBy) Ints

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

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

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

func (*OneMethodServiceGroupBy) Scan

func (omsgb *OneMethodServiceGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*OneMethodServiceGroupBy) ScanX

func (s *OneMethodServiceGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*OneMethodServiceGroupBy) String

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

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

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

func (*OneMethodServiceGroupBy) Strings

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

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

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

type OneMethodServiceMutation

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

OneMethodServiceMutation represents an operation that mutates the OneMethodService nodes in the graph.

func (*OneMethodServiceMutation) AddField

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

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

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

func (*OneMethodServiceMutation) AddedField

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

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

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

func (*OneMethodServiceMutation) AddedIDs

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

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

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

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

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

func (*OneMethodServiceMutation) ClearedFields

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

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

func (OneMethodServiceMutation) Client

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

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

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

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

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

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

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

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

func (m *OneMethodServiceMutation) Op() Op

Op returns the operation name.

func (*OneMethodServiceMutation) RemovedEdges

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

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

func (*OneMethodServiceMutation) RemovedIDs

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

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

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

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) Tx

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

func (m *OneMethodServiceMutation) Type() string

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

func (*OneMethodServiceMutation) Where

Where appends a list predicates to the OneMethodServiceMutation builder.

type OneMethodServiceQuery

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

OneMethodServiceQuery is the builder for querying OneMethodService entities.

func (*OneMethodServiceQuery) All

All executes the query and returns a list of OneMethodServices.

func (*OneMethodServiceQuery) AllX

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

func (*OneMethodServiceQuery) Clone

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

func (omsq *OneMethodServiceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OneMethodServiceQuery) CountX

func (omsq *OneMethodServiceQuery) CountX(ctx context.Context) int

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

func (*OneMethodServiceQuery) Exist

func (omsq *OneMethodServiceQuery) Exist(ctx context.Context) (bool, error)

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

func (*OneMethodServiceQuery) ExistX

func (omsq *OneMethodServiceQuery) ExistX(ctx context.Context) bool

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

func (*OneMethodServiceQuery) First

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

func (*OneMethodServiceQuery) FirstID

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

func (omsq *OneMethodServiceQuery) FirstIDX(ctx context.Context) int

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

func (*OneMethodServiceQuery) FirstX

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

func (*OneMethodServiceQuery) GroupBy

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

func (omsq *OneMethodServiceQuery) IDs(ctx context.Context) ([]int, error)

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

func (*OneMethodServiceQuery) IDsX

func (omsq *OneMethodServiceQuery) IDsX(ctx context.Context) []int

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

func (*OneMethodServiceQuery) Limit

func (omsq *OneMethodServiceQuery) Limit(limit int) *OneMethodServiceQuery

Limit adds a limit step to the query.

func (*OneMethodServiceQuery) Offset

func (omsq *OneMethodServiceQuery) Offset(offset int) *OneMethodServiceQuery

Offset adds an offset step to the query.

func (*OneMethodServiceQuery) Only

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

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

func (omsq *OneMethodServiceQuery) OnlyIDX(ctx context.Context) int

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

func (*OneMethodServiceQuery) OnlyX

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

func (*OneMethodServiceQuery) Order

Order adds an order step to the query.

func (*OneMethodServiceQuery) Select

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

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

Where adds a new predicate for the OneMethodServiceQuery builder.

type OneMethodServiceSelect

type OneMethodServiceSelect struct {
	*OneMethodServiceQuery
	// contains filtered or unexported fields
}

OneMethodServiceSelect is the builder for selecting fields of OneMethodService entities.

func (*OneMethodServiceSelect) Bool

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

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

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

func (*OneMethodServiceSelect) Bools

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

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

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

func (*OneMethodServiceSelect) Float64

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

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

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

func (*OneMethodServiceSelect) Float64s

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

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

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

func (*OneMethodServiceSelect) Int

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

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

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

func (*OneMethodServiceSelect) Ints

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

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

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

func (*OneMethodServiceSelect) Scan

func (omss *OneMethodServiceSelect) Scan(ctx context.Context, v interface{}) error

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

func (*OneMethodServiceSelect) ScanX

func (s *OneMethodServiceSelect) ScanX(ctx context.Context, v interface{})

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

func (*OneMethodServiceSelect) String

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

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

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

func (*OneMethodServiceSelect) Strings

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

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

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

type OneMethodServiceUpdate

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

OneMethodServiceUpdate is the builder for updating OneMethodService entities.

func (*OneMethodServiceUpdate) Exec

func (omsu *OneMethodServiceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OneMethodServiceUpdate) ExecX

func (omsu *OneMethodServiceUpdate) ExecX(ctx context.Context)

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

func (*OneMethodServiceUpdate) Mutation

Mutation returns the OneMethodServiceMutation object of the builder.

func (*OneMethodServiceUpdate) Save

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

func (omsu *OneMethodServiceUpdate) SaveX(ctx context.Context) int

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

func (*OneMethodServiceUpdate) Where

Where appends a list predicates to the OneMethodServiceUpdate builder.

type OneMethodServiceUpdateOne

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

OneMethodServiceUpdateOne is the builder for updating a single OneMethodService entity.

func (*OneMethodServiceUpdateOne) Exec

Exec executes the query on the entity.

func (*OneMethodServiceUpdateOne) ExecX

func (omsuo *OneMethodServiceUpdateOne) ExecX(ctx context.Context)

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

func (*OneMethodServiceUpdateOne) Mutation

Mutation returns the OneMethodServiceMutation object of the builder.

func (*OneMethodServiceUpdateOne) Save

Save executes the query and returns the updated OneMethodService entity.

func (*OneMethodServiceUpdateOne) SaveX

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

func (*OneMethodServiceUpdateOne) Select

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

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(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type 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 create builder for Portal.

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 delete builder for the given entity.

func (*PortalClient) DeleteOneID

func (c *PortalClient) DeleteOneID(id int) *PortalDeleteOne

DeleteOneID returns a delete builder for the given 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) 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

func (pc *PortalCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PortalCreate) ExecX

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

func (pcb *PortalCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PortalCreateBulk) ExecX

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 interface{}) error

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

func (*PortalGroupBy) ScanX

func (s *PortalGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

func (m *PortalMutation) Where(ps ...predicate.Portal)

Where appends a list predicates to the PortalMutation builder.

type PortalQuery

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

PortalQuery is the builder for querying Portal entities.

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 adds a limit step to the query.

func (*PortalQuery) Offset

func (pq *PortalQuery) Offset(offset int) *PortalQuery

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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 Query

type Query = ent.Query

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

type RollbackFunc

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

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

func (RollbackFunc) Rollback

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

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

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

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

type Rollbacker

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

Rollbacker is the interface that wraps the Rollback method.

type SkipEdgeExample

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

func (see *SkipEdgeExample) QueryUser() *UserQuery

QueryUser queries the "user" edge of the SkipEdgeExample entity.

func (*SkipEdgeExample) String

func (see *SkipEdgeExample) String() string

String implements the fmt.Stringer.

func (*SkipEdgeExample) Unwrap

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

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

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

SkipEdgeExampleClient is a client for the SkipEdgeExample schema.

func NewSkipEdgeExampleClient

func NewSkipEdgeExampleClient(c config) *SkipEdgeExampleClient

NewSkipEdgeExampleClient returns a client for the SkipEdgeExample from the given config.

func (*SkipEdgeExampleClient) Create

Create returns a create builder for SkipEdgeExample.

func (*SkipEdgeExampleClient) CreateBulk

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

func (*SkipEdgeExampleClient) Delete

Delete returns a delete builder for SkipEdgeExample.

func (*SkipEdgeExampleClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SkipEdgeExampleClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*SkipEdgeExampleClient) Get

Get returns a SkipEdgeExample entity by its id.

func (*SkipEdgeExampleClient) GetX

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

func (*SkipEdgeExampleClient) Hooks

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

Hooks returns the client hooks.

func (*SkipEdgeExampleClient) Query

Query returns a query builder for SkipEdgeExample.

func (*SkipEdgeExampleClient) QueryUser

func (c *SkipEdgeExampleClient) QueryUser(see *SkipEdgeExample) *UserQuery

QueryUser queries the user edge of a SkipEdgeExample.

func (*SkipEdgeExampleClient) Update

Update returns an update builder for SkipEdgeExample.

func (*SkipEdgeExampleClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SkipEdgeExampleClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*SkipEdgeExampleClient) Use

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

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

SkipEdgeExampleCreate is the builder for creating a SkipEdgeExample entity.

func (*SkipEdgeExampleCreate) Exec

func (seec *SkipEdgeExampleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SkipEdgeExampleCreate) ExecX

func (seec *SkipEdgeExampleCreate) ExecX(ctx context.Context)

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

func (*SkipEdgeExampleCreate) Mutation

Mutation returns the SkipEdgeExampleMutation object of the builder.

func (*SkipEdgeExampleCreate) Save

Save creates the SkipEdgeExample in the database.

func (*SkipEdgeExampleCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*SkipEdgeExampleCreate) SetNillableUserID

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

SetUser sets the "user" edge to the User entity.

func (*SkipEdgeExampleCreate) SetUserID

func (seec *SkipEdgeExampleCreate) SetUserID(id int) *SkipEdgeExampleCreate

SetUserID sets the "user" edge to the User entity by ID.

type SkipEdgeExampleCreateBulk

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

SkipEdgeExampleCreateBulk is the builder for creating many SkipEdgeExample entities in bulk.

func (*SkipEdgeExampleCreateBulk) Exec

Exec executes the query.

func (*SkipEdgeExampleCreateBulk) ExecX

func (seecb *SkipEdgeExampleCreateBulk) ExecX(ctx context.Context)

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

func (*SkipEdgeExampleCreateBulk) Save

Save creates the SkipEdgeExample entities in the database.

func (*SkipEdgeExampleCreateBulk) SaveX

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

type SkipEdgeExampleDelete

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

SkipEdgeExampleDelete is the builder for deleting a SkipEdgeExample entity.

func (*SkipEdgeExampleDelete) Exec

func (seed *SkipEdgeExampleDelete) Exec(ctx context.Context) (int, error)

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

func (*SkipEdgeExampleDelete) ExecX

func (seed *SkipEdgeExampleDelete) ExecX(ctx context.Context) int

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

func (*SkipEdgeExampleDelete) Where

Where appends a list predicates to the SkipEdgeExampleDelete builder.

type SkipEdgeExampleDeleteOne

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

SkipEdgeExampleDeleteOne is the builder for deleting a single SkipEdgeExample entity.

func (*SkipEdgeExampleDeleteOne) Exec

func (seedo *SkipEdgeExampleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SkipEdgeExampleDeleteOne) ExecX

func (seedo *SkipEdgeExampleDeleteOne) ExecX(ctx context.Context)

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

type SkipEdgeExampleEdges

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

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

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

SkipEdgeExampleGroupBy is the group-by builder for SkipEdgeExample entities.

func (*SkipEdgeExampleGroupBy) Aggregate

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

func (*SkipEdgeExampleGroupBy) Bool

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

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

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

func (*SkipEdgeExampleGroupBy) Bools

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

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

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

func (*SkipEdgeExampleGroupBy) Float64

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

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

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

func (*SkipEdgeExampleGroupBy) Float64s

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

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

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

func (*SkipEdgeExampleGroupBy) Int

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

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

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

func (*SkipEdgeExampleGroupBy) Ints

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

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

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

func (*SkipEdgeExampleGroupBy) Scan

func (seegb *SkipEdgeExampleGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*SkipEdgeExampleGroupBy) ScanX

func (s *SkipEdgeExampleGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SkipEdgeExampleGroupBy) String

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

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

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

func (*SkipEdgeExampleGroupBy) Strings

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

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

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

type SkipEdgeExampleMutation

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

SkipEdgeExampleMutation represents an operation that mutates the SkipEdgeExample nodes in the graph.

func (*SkipEdgeExampleMutation) AddField

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

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

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

func (*SkipEdgeExampleMutation) AddedField

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

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

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

func (*SkipEdgeExampleMutation) AddedIDs

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

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

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

func (m *SkipEdgeExampleMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*SkipEdgeExampleMutation) ClearedEdges

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

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

func (*SkipEdgeExampleMutation) ClearedFields

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

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

func (SkipEdgeExampleMutation) Client

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

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

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

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

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

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

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

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

func (m *SkipEdgeExampleMutation) Op() Op

Op returns the operation name.

func (*SkipEdgeExampleMutation) RemovedEdges

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

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

func (*SkipEdgeExampleMutation) RemovedIDs

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

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

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

func (m *SkipEdgeExampleMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*SkipEdgeExampleMutation) SetField

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) SetUserID

func (m *SkipEdgeExampleMutation) SetUserID(id int)

SetUserID sets the "user" edge to the User entity by id.

func (SkipEdgeExampleMutation) Tx

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

func (m *SkipEdgeExampleMutation) Type() string

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

func (*SkipEdgeExampleMutation) UserCleared

func (m *SkipEdgeExampleMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*SkipEdgeExampleMutation) UserID

func (m *SkipEdgeExampleMutation) UserID() (id int, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*SkipEdgeExampleMutation) UserIDs

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

Where appends a list predicates to the SkipEdgeExampleMutation builder.

type SkipEdgeExampleQuery

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

SkipEdgeExampleQuery is the builder for querying SkipEdgeExample entities.

func (*SkipEdgeExampleQuery) All

All executes the query and returns a list of SkipEdgeExamples.

func (*SkipEdgeExampleQuery) AllX

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

func (*SkipEdgeExampleQuery) Clone

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

func (seeq *SkipEdgeExampleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SkipEdgeExampleQuery) CountX

func (seeq *SkipEdgeExampleQuery) CountX(ctx context.Context) int

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

func (*SkipEdgeExampleQuery) Exist

func (seeq *SkipEdgeExampleQuery) Exist(ctx context.Context) (bool, error)

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

func (*SkipEdgeExampleQuery) ExistX

func (seeq *SkipEdgeExampleQuery) ExistX(ctx context.Context) bool

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

func (*SkipEdgeExampleQuery) First

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

func (*SkipEdgeExampleQuery) FirstID

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

func (seeq *SkipEdgeExampleQuery) FirstIDX(ctx context.Context) int

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

func (*SkipEdgeExampleQuery) FirstX

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

func (*SkipEdgeExampleQuery) GroupBy

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

func (seeq *SkipEdgeExampleQuery) IDs(ctx context.Context) ([]int, error)

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

func (*SkipEdgeExampleQuery) IDsX

func (seeq *SkipEdgeExampleQuery) IDsX(ctx context.Context) []int

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

func (*SkipEdgeExampleQuery) Limit

func (seeq *SkipEdgeExampleQuery) Limit(limit int) *SkipEdgeExampleQuery

Limit adds a limit step to the query.

func (*SkipEdgeExampleQuery) Offset

func (seeq *SkipEdgeExampleQuery) Offset(offset int) *SkipEdgeExampleQuery

Offset adds an offset step to the query.

func (*SkipEdgeExampleQuery) Only

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

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

func (seeq *SkipEdgeExampleQuery) OnlyIDX(ctx context.Context) int

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

func (*SkipEdgeExampleQuery) OnlyX

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

func (*SkipEdgeExampleQuery) Order

Order adds an order step to the query.

func (*SkipEdgeExampleQuery) QueryUser

func (seeq *SkipEdgeExampleQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*SkipEdgeExampleQuery) Select

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

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

Where adds a new predicate for the SkipEdgeExampleQuery builder.

func (*SkipEdgeExampleQuery) WithUser

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

type SkipEdgeExampleSelect struct {
	*SkipEdgeExampleQuery
	// contains filtered or unexported fields
}

SkipEdgeExampleSelect is the builder for selecting fields of SkipEdgeExample entities.

func (*SkipEdgeExampleSelect) Bool

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

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

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

func (*SkipEdgeExampleSelect) Bools

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

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

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

func (*SkipEdgeExampleSelect) Float64

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

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

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

func (*SkipEdgeExampleSelect) Float64s

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

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

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

func (*SkipEdgeExampleSelect) Int

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

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

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

func (*SkipEdgeExampleSelect) Ints

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

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

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

func (*SkipEdgeExampleSelect) Scan

func (sees *SkipEdgeExampleSelect) Scan(ctx context.Context, v interface{}) error

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

func (*SkipEdgeExampleSelect) ScanX

func (s *SkipEdgeExampleSelect) ScanX(ctx context.Context, v interface{})

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

func (*SkipEdgeExampleSelect) String

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

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

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

func (*SkipEdgeExampleSelect) Strings

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

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

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

type SkipEdgeExampleUpdate

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

SkipEdgeExampleUpdate is the builder for updating SkipEdgeExample entities.

func (*SkipEdgeExampleUpdate) ClearUser

func (seeu *SkipEdgeExampleUpdate) ClearUser() *SkipEdgeExampleUpdate

ClearUser clears the "user" edge to the User entity.

func (*SkipEdgeExampleUpdate) Exec

func (seeu *SkipEdgeExampleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SkipEdgeExampleUpdate) ExecX

func (seeu *SkipEdgeExampleUpdate) ExecX(ctx context.Context)

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

func (*SkipEdgeExampleUpdate) Mutation

Mutation returns the SkipEdgeExampleMutation object of the builder.

func (*SkipEdgeExampleUpdate) Save

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

func (seeu *SkipEdgeExampleUpdate) SaveX(ctx context.Context) int

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

func (*SkipEdgeExampleUpdate) SetNillableUserID

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

SetUser sets the "user" edge to the User entity.

func (*SkipEdgeExampleUpdate) SetUserID

func (seeu *SkipEdgeExampleUpdate) SetUserID(id int) *SkipEdgeExampleUpdate

SetUserID sets the "user" edge to the User entity by ID.

func (*SkipEdgeExampleUpdate) Where

Where appends a list predicates to the SkipEdgeExampleUpdate builder.

type SkipEdgeExampleUpdateOne

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

SkipEdgeExampleUpdateOne is the builder for updating a single SkipEdgeExample entity.

func (*SkipEdgeExampleUpdateOne) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*SkipEdgeExampleUpdateOne) Exec

func (seeuo *SkipEdgeExampleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SkipEdgeExampleUpdateOne) ExecX

func (seeuo *SkipEdgeExampleUpdateOne) ExecX(ctx context.Context)

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

func (*SkipEdgeExampleUpdateOne) Mutation

Mutation returns the SkipEdgeExampleMutation object of the builder.

func (*SkipEdgeExampleUpdateOne) Save

Save executes the query and returns the updated SkipEdgeExample entity.

func (*SkipEdgeExampleUpdateOne) SaveX

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

func (*SkipEdgeExampleUpdateOne) Select

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

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

SetUser sets the "user" edge to the User entity.

func (*SkipEdgeExampleUpdateOne) SetUserID

SetUserID sets the "user" edge to the User entity by ID.

type SkipEdgeExamples

type SkipEdgeExamples []*SkipEdgeExample

SkipEdgeExamples is a parsable slice of SkipEdgeExample.

type TwoMethodService

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

func (tms *TwoMethodService) String() string

String implements the fmt.Stringer.

func (*TwoMethodService) Unwrap

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

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

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

TwoMethodServiceClient is a client for the TwoMethodService schema.

func NewTwoMethodServiceClient

func NewTwoMethodServiceClient(c config) *TwoMethodServiceClient

NewTwoMethodServiceClient returns a client for the TwoMethodService from the given config.

func (*TwoMethodServiceClient) Create

Create returns a create builder for TwoMethodService.

func (*TwoMethodServiceClient) CreateBulk

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

func (*TwoMethodServiceClient) Delete

Delete returns a delete builder for TwoMethodService.

func (*TwoMethodServiceClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*TwoMethodServiceClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*TwoMethodServiceClient) Get

Get returns a TwoMethodService entity by its id.

func (*TwoMethodServiceClient) GetX

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

func (*TwoMethodServiceClient) Hooks

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

Hooks returns the client hooks.

func (*TwoMethodServiceClient) Query

Query returns a query builder for TwoMethodService.

func (*TwoMethodServiceClient) Update

Update returns an update builder for TwoMethodService.

func (*TwoMethodServiceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*TwoMethodServiceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*TwoMethodServiceClient) Use

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

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

TwoMethodServiceCreate is the builder for creating a TwoMethodService entity.

func (*TwoMethodServiceCreate) Exec

func (tmsc *TwoMethodServiceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TwoMethodServiceCreate) ExecX

func (tmsc *TwoMethodServiceCreate) ExecX(ctx context.Context)

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

func (*TwoMethodServiceCreate) Mutation

Mutation returns the TwoMethodServiceMutation object of the builder.

func (*TwoMethodServiceCreate) Save

Save creates the TwoMethodService in the database.

func (*TwoMethodServiceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

type TwoMethodServiceCreateBulk

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

TwoMethodServiceCreateBulk is the builder for creating many TwoMethodService entities in bulk.

func (*TwoMethodServiceCreateBulk) Exec

Exec executes the query.

func (*TwoMethodServiceCreateBulk) ExecX

func (tmscb *TwoMethodServiceCreateBulk) ExecX(ctx context.Context)

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

func (*TwoMethodServiceCreateBulk) Save

Save creates the TwoMethodService entities in the database.

func (*TwoMethodServiceCreateBulk) SaveX

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

type TwoMethodServiceDelete

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

TwoMethodServiceDelete is the builder for deleting a TwoMethodService entity.

func (*TwoMethodServiceDelete) Exec

func (tmsd *TwoMethodServiceDelete) Exec(ctx context.Context) (int, error)

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

func (*TwoMethodServiceDelete) ExecX

func (tmsd *TwoMethodServiceDelete) ExecX(ctx context.Context) int

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

func (*TwoMethodServiceDelete) Where

Where appends a list predicates to the TwoMethodServiceDelete builder.

type TwoMethodServiceDeleteOne

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

TwoMethodServiceDeleteOne is the builder for deleting a single TwoMethodService entity.

func (*TwoMethodServiceDeleteOne) Exec

Exec executes the deletion query.

func (*TwoMethodServiceDeleteOne) ExecX

func (tmsdo *TwoMethodServiceDeleteOne) ExecX(ctx context.Context)

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

type TwoMethodServiceGroupBy

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

TwoMethodServiceGroupBy is the group-by builder for TwoMethodService entities.

func (*TwoMethodServiceGroupBy) Aggregate

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

func (*TwoMethodServiceGroupBy) Bool

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

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

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

func (*TwoMethodServiceGroupBy) Bools

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

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

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

func (*TwoMethodServiceGroupBy) Float64

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

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

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

func (*TwoMethodServiceGroupBy) Float64s

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

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

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

func (*TwoMethodServiceGroupBy) Int

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

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

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

func (*TwoMethodServiceGroupBy) Ints

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

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

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

func (*TwoMethodServiceGroupBy) Scan

func (tmsgb *TwoMethodServiceGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*TwoMethodServiceGroupBy) ScanX

func (s *TwoMethodServiceGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*TwoMethodServiceGroupBy) String

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

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

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

func (*TwoMethodServiceGroupBy) Strings

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

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

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

type TwoMethodServiceMutation

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

TwoMethodServiceMutation represents an operation that mutates the TwoMethodService nodes in the graph.

func (*TwoMethodServiceMutation) AddField

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

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

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

func (*TwoMethodServiceMutation) AddedField

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

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

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

func (*TwoMethodServiceMutation) AddedIDs

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

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

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

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

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

func (*TwoMethodServiceMutation) ClearedFields

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

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

func (TwoMethodServiceMutation) Client

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

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

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

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

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

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

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

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

func (m *TwoMethodServiceMutation) Op() Op

Op returns the operation name.

func (*TwoMethodServiceMutation) RemovedEdges

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

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

func (*TwoMethodServiceMutation) RemovedIDs

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

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

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

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) Tx

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

func (m *TwoMethodServiceMutation) Type() string

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

func (*TwoMethodServiceMutation) Where

Where appends a list predicates to the TwoMethodServiceMutation builder.

type TwoMethodServiceQuery

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

TwoMethodServiceQuery is the builder for querying TwoMethodService entities.

func (*TwoMethodServiceQuery) All

All executes the query and returns a list of TwoMethodServices.

func (*TwoMethodServiceQuery) AllX

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

func (*TwoMethodServiceQuery) Clone

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

func (tmsq *TwoMethodServiceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TwoMethodServiceQuery) CountX

func (tmsq *TwoMethodServiceQuery) CountX(ctx context.Context) int

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

func (*TwoMethodServiceQuery) Exist

func (tmsq *TwoMethodServiceQuery) Exist(ctx context.Context) (bool, error)

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

func (*TwoMethodServiceQuery) ExistX

func (tmsq *TwoMethodServiceQuery) ExistX(ctx context.Context) bool

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

func (*TwoMethodServiceQuery) First

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

func (*TwoMethodServiceQuery) FirstID

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

func (tmsq *TwoMethodServiceQuery) FirstIDX(ctx context.Context) int

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

func (*TwoMethodServiceQuery) FirstX

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

func (*TwoMethodServiceQuery) GroupBy

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

func (tmsq *TwoMethodServiceQuery) IDs(ctx context.Context) ([]int, error)

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

func (*TwoMethodServiceQuery) IDsX

func (tmsq *TwoMethodServiceQuery) IDsX(ctx context.Context) []int

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

func (*TwoMethodServiceQuery) Limit

func (tmsq *TwoMethodServiceQuery) Limit(limit int) *TwoMethodServiceQuery

Limit adds a limit step to the query.

func (*TwoMethodServiceQuery) Offset

func (tmsq *TwoMethodServiceQuery) Offset(offset int) *TwoMethodServiceQuery

Offset adds an offset step to the query.

func (*TwoMethodServiceQuery) Only

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

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

func (tmsq *TwoMethodServiceQuery) OnlyIDX(ctx context.Context) int

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

func (*TwoMethodServiceQuery) OnlyX

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

func (*TwoMethodServiceQuery) Order

Order adds an order step to the query.

func (*TwoMethodServiceQuery) Select

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

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

Where adds a new predicate for the TwoMethodServiceQuery builder.

type TwoMethodServiceSelect

type TwoMethodServiceSelect struct {
	*TwoMethodServiceQuery
	// contains filtered or unexported fields
}

TwoMethodServiceSelect is the builder for selecting fields of TwoMethodService entities.

func (*TwoMethodServiceSelect) Bool

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

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

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

func (*TwoMethodServiceSelect) Bools

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

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

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

func (*TwoMethodServiceSelect) Float64

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

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

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

func (*TwoMethodServiceSelect) Float64s

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

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

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

func (*TwoMethodServiceSelect) Int

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

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

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

func (*TwoMethodServiceSelect) Ints

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

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

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

func (*TwoMethodServiceSelect) Scan

func (tmss *TwoMethodServiceSelect) Scan(ctx context.Context, v interface{}) error

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

func (*TwoMethodServiceSelect) ScanX

func (s *TwoMethodServiceSelect) ScanX(ctx context.Context, v interface{})

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

func (*TwoMethodServiceSelect) String

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

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

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

func (*TwoMethodServiceSelect) Strings

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

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

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

type TwoMethodServiceUpdate

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

TwoMethodServiceUpdate is the builder for updating TwoMethodService entities.

func (*TwoMethodServiceUpdate) Exec

func (tmsu *TwoMethodServiceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TwoMethodServiceUpdate) ExecX

func (tmsu *TwoMethodServiceUpdate) ExecX(ctx context.Context)

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

func (*TwoMethodServiceUpdate) Mutation

Mutation returns the TwoMethodServiceMutation object of the builder.

func (*TwoMethodServiceUpdate) Save

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

func (tmsu *TwoMethodServiceUpdate) SaveX(ctx context.Context) int

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

func (*TwoMethodServiceUpdate) Where

Where appends a list predicates to the TwoMethodServiceUpdate builder.

type TwoMethodServiceUpdateOne

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

TwoMethodServiceUpdateOne is the builder for updating a single TwoMethodService entity.

func (*TwoMethodServiceUpdateOne) Exec

Exec executes the query on the entity.

func (*TwoMethodServiceUpdateOne) ExecX

func (tmsuo *TwoMethodServiceUpdateOne) ExecX(ctx context.Context)

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

func (*TwoMethodServiceUpdateOne) Mutation

Mutation returns the TwoMethodServiceMutation object of the builder.

func (*TwoMethodServiceUpdateOne) Save

Save executes the query and returns the updated TwoMethodService entity.

func (*TwoMethodServiceUpdateOne) SaveX

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

func (*TwoMethodServiceUpdateOne) Select

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

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
	// 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

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 create builder for User.

func (*UserClient) CreateBulk

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

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

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

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

DeleteOne returns a delete builder for the given entity.

func (*UserClient) DeleteOneID

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

DeleteOneID returns a delete builder for the given id.

func (*UserClient) Get

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

Get returns a User entity by its id.

func (*UserClient) GetX

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

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

func (*UserClient) Hooks

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

Hooks returns the client hooks.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

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

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

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

Exec executes the query.

func (*UserCreate) ExecX

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

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

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) Save

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

Save creates the User in the database.

func (*UserCreate) SaveX

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

SaveX calls Save and panics if Save returns an error.

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

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

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

func (uc *UserCreate) SetSkipEdge(s *SkipEdgeExample) *UserCreate

SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserCreate) SetSkipEdgeID

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

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

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

Exec executes the query.

func (*UserCreateBulk) ExecX

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

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

func (*UserCreateBulk) Save

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

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

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

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

type UserDelete

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

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

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

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

func (*UserDelete) ExecX

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

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

func (*UserDelete) Where

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

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

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

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

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

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

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

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

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

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 interface{}) error

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

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v interface{})

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

func (m *UserMutation) ClearSkipEdge()

ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserMutation) ClearUnnecessary

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

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

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

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

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) SetProfilePicID

func (m *UserMutation) SetProfilePicID(id uuid.UUID)

SetProfilePicID sets the "profile_pic" edge to the Image entity by id.

func (*UserMutation) SetSkipEdgeID

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

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

func (m *UserMutation) SkipEdgeCleared() bool

SkipEdgeCleared reports if the "skip_edge" edge to the SkipEdgeExample entity was cleared.

func (*UserMutation) SkipEdgeID

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

SkipEdgeID returns the "skip_edge" edge ID in the mutation.

func (*UserMutation) SkipEdgeIDs

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

func (m *UserMutation) Unnecessary() (r string, exists bool)

Unnecessary returns the value of the "unnecessary" field in the mutation.

func (*UserMutation) UnnecessaryCleared

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

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

Where appends a list predicates to the UserMutation builder.

type UserQuery

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

UserQuery is the builder for querying User entities.

func (*UserQuery) All

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

All executes the query and returns a list of Users.

func (*UserQuery) AllX

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

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

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

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

func (*UserQuery) Count

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

Count returns the count of the given query.

func (*UserQuery) CountX

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

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

func (*UserQuery) Exist

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

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

func (*UserQuery) ExistX

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

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

func (*UserQuery) 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 adds a limit step to the query.

func (*UserQuery) Offset

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

Offset adds an offset step to the query.

func (*UserQuery) Only

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

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when 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 adds an order step to the query.

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

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

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) 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 interface{}) 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 interface{})

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

func (uu *UserUpdate) ClearSkipEdge() *UserUpdate

ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserUpdate) ClearUnnecessary

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

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

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

func (uu *UserUpdate) SetSkipEdge(s *SkipEdgeExample) *UserUpdate

SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserUpdate) SetSkipEdgeID

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

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

func (uuo *UserUpdateOne) ClearSkipEdge() *UserUpdateOne

ClearSkipEdge clears the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserUpdateOne) ClearUnnecessary

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

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

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

func (uuo *UserUpdateOne) SetSkipEdge(s *SkipEdgeExample) *UserUpdateOne

SetSkipEdge sets the "skip_edge" edge to the SkipEdgeExample entity.

func (*UserUpdateOne) SetSkipEdgeID

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

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 create builder for ValidMessage.

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 delete builder for the given entity.

func (*ValidMessageClient) DeleteOneID

func (c *ValidMessageClient) DeleteOneID(id int) *ValidMessageDeleteOne

DeleteOneID returns a delete builder for the given 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) 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

func (vmc *ValidMessageCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ValidMessageCreate) ExecX

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

func (vmcb *ValidMessageCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ValidMessageCreateBulk) ExecX

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 interface{}) error

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

func (*ValidMessageGroupBy) ScanX

func (s *ValidMessageGroupBy) ScanX(ctx context.Context, v interface{})

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

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) 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

Where appends a list predicates to the ValidMessageMutation builder.

type ValidMessageQuery

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

ValidMessageQuery is the builder for querying ValidMessage entities.

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 adds a limit step to the query.

func (*ValidMessageQuery) Offset

func (vmq *ValidMessageQuery) Offset(offset int) *ValidMessageQuery

Offset adds an offset step to the query.

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 adds an order step to the query.

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) 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 interface{}) 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 interface{})

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