ent

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 35 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.
	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"
	TypePortal                 = "Portal"
	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 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) 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) 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 adds a new predicate 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 (bpgb *BlogPostGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*BlogPostGroupBy) BoolX

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

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

func (*BlogPostGroupBy) Bools

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

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

func (*BlogPostGroupBy) BoolsX

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

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

func (*BlogPostGroupBy) Float64

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

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

func (*BlogPostGroupBy) Float64X

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

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

func (*BlogPostGroupBy) Float64s

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

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

func (*BlogPostGroupBy) Float64sX

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

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

func (*BlogPostGroupBy) Int

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

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

func (*BlogPostGroupBy) IntX

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

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

func (*BlogPostGroupBy) Ints

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

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

func (*BlogPostGroupBy) IntsX

func (bpgb *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 (bpgb *BlogPostGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*BlogPostGroupBy) String

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

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

func (*BlogPostGroupBy) StringX

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

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

func (*BlogPostGroupBy) Strings

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

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

func (*BlogPostGroupBy) StringsX

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

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 exactly one BlogPost entity is not 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 exactly one BlogPost ID is not 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(field string, 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 (bps *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 (bps *BlogPostSelect) BoolX(ctx context.Context) bool

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

func (*BlogPostSelect) Bools

func (bps *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 (bps *BlogPostSelect) BoolsX(ctx context.Context) []bool

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

func (*BlogPostSelect) Float64

func (bps *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 (bps *BlogPostSelect) Float64X(ctx context.Context) float64

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

func (*BlogPostSelect) Float64s

func (bps *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 (bps *BlogPostSelect) Float64sX(ctx context.Context) []float64

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

func (*BlogPostSelect) Int

func (bps *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 (bps *BlogPostSelect) IntX(ctx context.Context) int

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

func (*BlogPostSelect) Ints

func (bps *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 (bps *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 (bps *BlogPostSelect) ScanX(ctx context.Context, v interface{})

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

func (*BlogPostSelect) String

func (bps *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 (bps *BlogPostSelect) StringX(ctx context.Context) string

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

func (*BlogPostSelect) Strings

func (bps *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 (bps *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 adds a new predicate for 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) 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) 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 adds a new predicate 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 (cgb *CategoryGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*CategoryGroupBy) BoolX

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

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

func (*CategoryGroupBy) Bools

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

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

func (*CategoryGroupBy) BoolsX

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

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

func (*CategoryGroupBy) Float64

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

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

func (*CategoryGroupBy) Float64X

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

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

func (*CategoryGroupBy) Float64s

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

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

func (*CategoryGroupBy) Float64sX

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

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

func (*CategoryGroupBy) Int

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

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

func (*CategoryGroupBy) IntX

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

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

func (*CategoryGroupBy) Ints

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

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

func (*CategoryGroupBy) IntsX

func (cgb *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 (cgb *CategoryGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*CategoryGroupBy) String

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

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

func (*CategoryGroupBy) StringX

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

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

func (*CategoryGroupBy) Strings

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

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

func (*CategoryGroupBy) StringsX

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

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 exactly one Category entity is not 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 exactly one Category ID is not 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(field string, 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 (cs *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 (cs *CategorySelect) BoolX(ctx context.Context) bool

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

func (*CategorySelect) Bools

func (cs *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 (cs *CategorySelect) BoolsX(ctx context.Context) []bool

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

func (*CategorySelect) Float64

func (cs *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 (cs *CategorySelect) Float64X(ctx context.Context) float64

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

func (*CategorySelect) Float64s

func (cs *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 (cs *CategorySelect) Float64sX(ctx context.Context) []float64

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

func (*CategorySelect) Int

func (cs *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 (cs *CategorySelect) IntX(ctx context.Context) int

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

func (*CategorySelect) Ints

func (cs *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 (cs *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 (cs *CategorySelect) ScanX(ctx context.Context, v interface{})

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

func (*CategorySelect) String

func (cs *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 (cs *CategorySelect) StringX(ctx context.Context) string

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

func (*CategorySelect) Strings

func (cs *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 (cs *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 adds a new predicate for 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
	// 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
	// Portal is the client for interacting with the Portal builders.
	Portal *PortalClient
	// 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().
	BlogPost.
	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(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 Committer 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) 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) 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 adds a new predicate 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 (dosgb *DependsOnSkippedGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*DependsOnSkippedGroupBy) BoolX

func (dosgb *DependsOnSkippedGroupBy) BoolX(ctx context.Context) bool

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

func (*DependsOnSkippedGroupBy) Bools

func (dosgb *DependsOnSkippedGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*DependsOnSkippedGroupBy) BoolsX

func (dosgb *DependsOnSkippedGroupBy) BoolsX(ctx context.Context) []bool

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

func (*DependsOnSkippedGroupBy) Float64

func (dosgb *DependsOnSkippedGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*DependsOnSkippedGroupBy) Float64X

func (dosgb *DependsOnSkippedGroupBy) Float64X(ctx context.Context) float64

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

func (*DependsOnSkippedGroupBy) Float64s

func (dosgb *DependsOnSkippedGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*DependsOnSkippedGroupBy) Float64sX

func (dosgb *DependsOnSkippedGroupBy) Float64sX(ctx context.Context) []float64

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

func (*DependsOnSkippedGroupBy) Int

func (dosgb *DependsOnSkippedGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*DependsOnSkippedGroupBy) IntX

func (dosgb *DependsOnSkippedGroupBy) IntX(ctx context.Context) int

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

func (*DependsOnSkippedGroupBy) Ints

func (dosgb *DependsOnSkippedGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*DependsOnSkippedGroupBy) IntsX

func (dosgb *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 (dosgb *DependsOnSkippedGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*DependsOnSkippedGroupBy) String

func (dosgb *DependsOnSkippedGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*DependsOnSkippedGroupBy) StringX

func (dosgb *DependsOnSkippedGroupBy) StringX(ctx context.Context) string

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

func (*DependsOnSkippedGroupBy) Strings

func (dosgb *DependsOnSkippedGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*DependsOnSkippedGroupBy) StringsX

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

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 exactly one DependsOnSkipped entity is not 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 exactly one DependsOnSkipped ID is not 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(field string, 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 (doss *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 (doss *DependsOnSkippedSelect) BoolX(ctx context.Context) bool

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

func (*DependsOnSkippedSelect) Bools

func (doss *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 (doss *DependsOnSkippedSelect) BoolsX(ctx context.Context) []bool

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

func (*DependsOnSkippedSelect) Float64

func (doss *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 (doss *DependsOnSkippedSelect) Float64X(ctx context.Context) float64

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

func (*DependsOnSkippedSelect) Float64s

func (doss *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 (doss *DependsOnSkippedSelect) Float64sX(ctx context.Context) []float64

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

func (*DependsOnSkippedSelect) Int

func (doss *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 (doss *DependsOnSkippedSelect) IntX(ctx context.Context) int

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

func (*DependsOnSkippedSelect) Ints

func (doss *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 (doss *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 (doss *DependsOnSkippedSelect) ScanX(ctx context.Context, v interface{})

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

func (*DependsOnSkippedSelect) String

func (doss *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 (doss *DependsOnSkippedSelect) StringX(ctx context.Context) string

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

func (*DependsOnSkippedSelect) Strings

func (doss *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 (doss *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 adds a new predicate for 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) 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) 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 adds a new predicate 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 (dnmgb *DuplicateNumberMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*DuplicateNumberMessageGroupBy) BoolX

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

func (*DuplicateNumberMessageGroupBy) Bools

func (dnmgb *DuplicateNumberMessageGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*DuplicateNumberMessageGroupBy) BoolsX

func (dnmgb *DuplicateNumberMessageGroupBy) BoolsX(ctx context.Context) []bool

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

func (*DuplicateNumberMessageGroupBy) Float64

func (dnmgb *DuplicateNumberMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*DuplicateNumberMessageGroupBy) Float64X

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

func (*DuplicateNumberMessageGroupBy) Float64s

func (dnmgb *DuplicateNumberMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*DuplicateNumberMessageGroupBy) Float64sX

func (dnmgb *DuplicateNumberMessageGroupBy) Float64sX(ctx context.Context) []float64

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

func (*DuplicateNumberMessageGroupBy) Int

func (dnmgb *DuplicateNumberMessageGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*DuplicateNumberMessageGroupBy) IntX

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

func (*DuplicateNumberMessageGroupBy) Ints

func (dnmgb *DuplicateNumberMessageGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*DuplicateNumberMessageGroupBy) IntsX

func (dnmgb *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 (dnmgb *DuplicateNumberMessageGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*DuplicateNumberMessageGroupBy) String

func (dnmgb *DuplicateNumberMessageGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*DuplicateNumberMessageGroupBy) StringX

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

func (*DuplicateNumberMessageGroupBy) Strings

func (dnmgb *DuplicateNumberMessageGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*DuplicateNumberMessageGroupBy) StringsX

func (dnmgb *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) 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) 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 exactly one DuplicateNumberMessage entity is not 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 exactly one DuplicateNumberMessage ID is not 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 (dnms *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

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

func (*DuplicateNumberMessageSelect) Bools

func (dnms *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 (dnms *DuplicateNumberMessageSelect) BoolsX(ctx context.Context) []bool

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

func (*DuplicateNumberMessageSelect) Float64

func (dnms *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

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

func (*DuplicateNumberMessageSelect) Float64s

func (dnms *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 (dnms *DuplicateNumberMessageSelect) Float64sX(ctx context.Context) []float64

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

func (*DuplicateNumberMessageSelect) Int

func (dnms *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

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

func (*DuplicateNumberMessageSelect) Ints

func (dnms *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 (dnms *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 (dnms *DuplicateNumberMessageSelect) ScanX(ctx context.Context, v interface{})

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

func (*DuplicateNumberMessageSelect) String

func (dnms *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

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

func (*DuplicateNumberMessageSelect) Strings

func (dnms *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 (dnms *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 adds a new predicate for 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) 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) 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 adds a new predicate 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 (esmgb *ExplicitSkippedMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ExplicitSkippedMessageGroupBy) BoolX

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

func (*ExplicitSkippedMessageGroupBy) Bools

func (esmgb *ExplicitSkippedMessageGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*ExplicitSkippedMessageGroupBy) BoolsX

func (esmgb *ExplicitSkippedMessageGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ExplicitSkippedMessageGroupBy) Float64

func (esmgb *ExplicitSkippedMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ExplicitSkippedMessageGroupBy) Float64X

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

func (*ExplicitSkippedMessageGroupBy) Float64s

func (esmgb *ExplicitSkippedMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*ExplicitSkippedMessageGroupBy) Float64sX

func (esmgb *ExplicitSkippedMessageGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ExplicitSkippedMessageGroupBy) Int

func (esmgb *ExplicitSkippedMessageGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ExplicitSkippedMessageGroupBy) IntX

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

func (*ExplicitSkippedMessageGroupBy) Ints

func (esmgb *ExplicitSkippedMessageGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*ExplicitSkippedMessageGroupBy) IntsX

func (esmgb *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 (esmgb *ExplicitSkippedMessageGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ExplicitSkippedMessageGroupBy) String

func (esmgb *ExplicitSkippedMessageGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ExplicitSkippedMessageGroupBy) StringX

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

func (*ExplicitSkippedMessageGroupBy) Strings

func (esmgb *ExplicitSkippedMessageGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*ExplicitSkippedMessageGroupBy) StringsX

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

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 exactly one ExplicitSkippedMessage entity is not 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 exactly one ExplicitSkippedMessage ID is not 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 (esms *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

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

func (*ExplicitSkippedMessageSelect) Bools

func (esms *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 (esms *ExplicitSkippedMessageSelect) BoolsX(ctx context.Context) []bool

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

func (*ExplicitSkippedMessageSelect) Float64

func (esms *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

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

func (*ExplicitSkippedMessageSelect) Float64s

func (esms *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 (esms *ExplicitSkippedMessageSelect) Float64sX(ctx context.Context) []float64

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

func (*ExplicitSkippedMessageSelect) Int

func (esms *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

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

func (*ExplicitSkippedMessageSelect) Ints

func (esms *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 (esms *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 (esms *ExplicitSkippedMessageSelect) ScanX(ctx context.Context, v interface{})

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

func (*ExplicitSkippedMessageSelect) String

func (esms *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

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

func (*ExplicitSkippedMessageSelect) Strings

func (esms *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 (esms *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 adds a new predicate for 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) 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) 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 adds a new predicate 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 (igb *ImageGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ImageGroupBy) BoolX

func (igb *ImageGroupBy) BoolX(ctx context.Context) bool

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

func (*ImageGroupBy) Bools

func (igb *ImageGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*ImageGroupBy) BoolsX

func (igb *ImageGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ImageGroupBy) Float64

func (igb *ImageGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ImageGroupBy) Float64X

func (igb *ImageGroupBy) Float64X(ctx context.Context) float64

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

func (*ImageGroupBy) Float64s

func (igb *ImageGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*ImageGroupBy) Float64sX

func (igb *ImageGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ImageGroupBy) Int

func (igb *ImageGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ImageGroupBy) IntX

func (igb *ImageGroupBy) IntX(ctx context.Context) int

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

func (*ImageGroupBy) Ints

func (igb *ImageGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*ImageGroupBy) IntsX

func (igb *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 (igb *ImageGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ImageGroupBy) String

func (igb *ImageGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ImageGroupBy) StringX

func (igb *ImageGroupBy) StringX(ctx context.Context) string

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

func (*ImageGroupBy) Strings

func (igb *ImageGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*ImageGroupBy) StringsX

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

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 exactly one Image entity is not 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 exactly one Image ID is not 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(field string, 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 (is *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 (is *ImageSelect) BoolX(ctx context.Context) bool

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

func (*ImageSelect) Bools

func (is *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 (is *ImageSelect) BoolsX(ctx context.Context) []bool

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

func (*ImageSelect) Float64

func (is *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 (is *ImageSelect) Float64X(ctx context.Context) float64

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

func (*ImageSelect) Float64s

func (is *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 (is *ImageSelect) Float64sX(ctx context.Context) []float64

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

func (*ImageSelect) Int

func (is *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 (is *ImageSelect) IntX(ctx context.Context) int

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

func (*ImageSelect) Ints

func (is *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 (is *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 (is *ImageSelect) ScanX(ctx context.Context, v interface{})

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

func (*ImageSelect) String

func (is *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 (is *ImageSelect) StringX(ctx context.Context) string

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

func (*ImageSelect) Strings

func (is *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 (is *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 adds a new predicate for 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) 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) 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 adds a new predicate 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 (ismgb *ImplicitSkippedMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ImplicitSkippedMessageGroupBy) BoolX

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

func (*ImplicitSkippedMessageGroupBy) Bools

func (ismgb *ImplicitSkippedMessageGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*ImplicitSkippedMessageGroupBy) BoolsX

func (ismgb *ImplicitSkippedMessageGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ImplicitSkippedMessageGroupBy) Float64

func (ismgb *ImplicitSkippedMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ImplicitSkippedMessageGroupBy) Float64X

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

func (*ImplicitSkippedMessageGroupBy) Float64s

func (ismgb *ImplicitSkippedMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*ImplicitSkippedMessageGroupBy) Float64sX

func (ismgb *ImplicitSkippedMessageGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ImplicitSkippedMessageGroupBy) Int

func (ismgb *ImplicitSkippedMessageGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ImplicitSkippedMessageGroupBy) IntX

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

func (*ImplicitSkippedMessageGroupBy) Ints

func (ismgb *ImplicitSkippedMessageGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*ImplicitSkippedMessageGroupBy) IntsX

func (ismgb *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 (ismgb *ImplicitSkippedMessageGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ImplicitSkippedMessageGroupBy) String

func (ismgb *ImplicitSkippedMessageGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ImplicitSkippedMessageGroupBy) StringX

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

func (*ImplicitSkippedMessageGroupBy) Strings

func (ismgb *ImplicitSkippedMessageGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*ImplicitSkippedMessageGroupBy) StringsX

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

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 exactly one ImplicitSkippedMessage entity is not 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 exactly one ImplicitSkippedMessage ID is not 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 (isms *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

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

func (*ImplicitSkippedMessageSelect) Bools

func (isms *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 (isms *ImplicitSkippedMessageSelect) BoolsX(ctx context.Context) []bool

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

func (*ImplicitSkippedMessageSelect) Float64

func (isms *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

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

func (*ImplicitSkippedMessageSelect) Float64s

func (isms *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 (isms *ImplicitSkippedMessageSelect) Float64sX(ctx context.Context) []float64

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

func (*ImplicitSkippedMessageSelect) Int

func (isms *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

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

func (*ImplicitSkippedMessageSelect) Ints

func (isms *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 (isms *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 (isms *ImplicitSkippedMessageSelect) ScanX(ctx context.Context, v interface{})

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

func (*ImplicitSkippedMessageSelect) String

func (isms *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

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

func (*ImplicitSkippedMessageSelect) Strings

func (isms *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 (isms *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 adds a new predicate for 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) 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) 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 adds a new predicate 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 (ifmgb *InvalidFieldMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*InvalidFieldMessageGroupBy) BoolX

func (ifmgb *InvalidFieldMessageGroupBy) BoolX(ctx context.Context) bool

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

func (*InvalidFieldMessageGroupBy) Bools

func (ifmgb *InvalidFieldMessageGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*InvalidFieldMessageGroupBy) BoolsX

func (ifmgb *InvalidFieldMessageGroupBy) BoolsX(ctx context.Context) []bool

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

func (*InvalidFieldMessageGroupBy) Float64

func (ifmgb *InvalidFieldMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*InvalidFieldMessageGroupBy) Float64X

func (ifmgb *InvalidFieldMessageGroupBy) Float64X(ctx context.Context) float64

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

func (*InvalidFieldMessageGroupBy) Float64s

func (ifmgb *InvalidFieldMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*InvalidFieldMessageGroupBy) Float64sX

func (ifmgb *InvalidFieldMessageGroupBy) Float64sX(ctx context.Context) []float64

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

func (*InvalidFieldMessageGroupBy) Int

func (ifmgb *InvalidFieldMessageGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*InvalidFieldMessageGroupBy) IntX

func (ifmgb *InvalidFieldMessageGroupBy) IntX(ctx context.Context) int

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

func (*InvalidFieldMessageGroupBy) Ints

func (ifmgb *InvalidFieldMessageGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*InvalidFieldMessageGroupBy) IntsX

func (ifmgb *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 (ifmgb *InvalidFieldMessageGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*InvalidFieldMessageGroupBy) String

func (ifmgb *InvalidFieldMessageGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*InvalidFieldMessageGroupBy) StringX

func (ifmgb *InvalidFieldMessageGroupBy) StringX(ctx context.Context) string

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

func (*InvalidFieldMessageGroupBy) Strings

func (ifmgb *InvalidFieldMessageGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*InvalidFieldMessageGroupBy) StringsX

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

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 exactly one InvalidFieldMessage entity is not 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 exactly one InvalidFieldMessage ID is not 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

func (ifmq *InvalidFieldMessageQuery) Select(field string, fields ...string) *InvalidFieldMessageSelect

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 (ifms *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 (ifms *InvalidFieldMessageSelect) BoolX(ctx context.Context) bool

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

func (*InvalidFieldMessageSelect) Bools

func (ifms *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 (ifms *InvalidFieldMessageSelect) BoolsX(ctx context.Context) []bool

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

func (*InvalidFieldMessageSelect) Float64

func (ifms *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 (ifms *InvalidFieldMessageSelect) Float64X(ctx context.Context) float64

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

func (*InvalidFieldMessageSelect) Float64s

func (ifms *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 (ifms *InvalidFieldMessageSelect) Float64sX(ctx context.Context) []float64

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

func (*InvalidFieldMessageSelect) Int

func (ifms *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 (ifms *InvalidFieldMessageSelect) IntX(ctx context.Context) int

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

func (*InvalidFieldMessageSelect) Ints

func (ifms *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 (ifms *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 (ifms *InvalidFieldMessageSelect) ScanX(ctx context.Context, v interface{})

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

func (*InvalidFieldMessageSelect) String

func (ifms *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 (ifms *InvalidFieldMessageSelect) StringX(ctx context.Context) string

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

func (*InvalidFieldMessageSelect) Strings

func (ifms *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 (ifms *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 adds a new predicate for 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) 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) 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 adds a new predicate 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 (mwegb *MessageWithEnumGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*MessageWithEnumGroupBy) BoolX

func (mwegb *MessageWithEnumGroupBy) BoolX(ctx context.Context) bool

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

func (*MessageWithEnumGroupBy) Bools

func (mwegb *MessageWithEnumGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*MessageWithEnumGroupBy) BoolsX

func (mwegb *MessageWithEnumGroupBy) BoolsX(ctx context.Context) []bool

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

func (*MessageWithEnumGroupBy) Float64

func (mwegb *MessageWithEnumGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*MessageWithEnumGroupBy) Float64X

func (mwegb *MessageWithEnumGroupBy) Float64X(ctx context.Context) float64

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

func (*MessageWithEnumGroupBy) Float64s

func (mwegb *MessageWithEnumGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*MessageWithEnumGroupBy) Float64sX

func (mwegb *MessageWithEnumGroupBy) Float64sX(ctx context.Context) []float64

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

func (*MessageWithEnumGroupBy) Int

func (mwegb *MessageWithEnumGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*MessageWithEnumGroupBy) IntX

func (mwegb *MessageWithEnumGroupBy) IntX(ctx context.Context) int

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

func (*MessageWithEnumGroupBy) Ints

func (mwegb *MessageWithEnumGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*MessageWithEnumGroupBy) IntsX

func (mwegb *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 (mwegb *MessageWithEnumGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*MessageWithEnumGroupBy) String

func (mwegb *MessageWithEnumGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*MessageWithEnumGroupBy) StringX

func (mwegb *MessageWithEnumGroupBy) StringX(ctx context.Context) string

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

func (*MessageWithEnumGroupBy) Strings

func (mwegb *MessageWithEnumGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*MessageWithEnumGroupBy) StringsX

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

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 exactly one MessageWithEnum entity is not 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 exactly one MessageWithEnum ID is not 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(field string, 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 (mwes *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 (mwes *MessageWithEnumSelect) BoolX(ctx context.Context) bool

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

func (*MessageWithEnumSelect) Bools

func (mwes *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 (mwes *MessageWithEnumSelect) BoolsX(ctx context.Context) []bool

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

func (*MessageWithEnumSelect) Float64

func (mwes *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 (mwes *MessageWithEnumSelect) Float64X(ctx context.Context) float64

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

func (*MessageWithEnumSelect) Float64s

func (mwes *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 (mwes *MessageWithEnumSelect) Float64sX(ctx context.Context) []float64

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

func (*MessageWithEnumSelect) Int

func (mwes *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 (mwes *MessageWithEnumSelect) IntX(ctx context.Context) int

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

func (*MessageWithEnumSelect) Ints

func (mwes *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 (mwes *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 (mwes *MessageWithEnumSelect) ScanX(ctx context.Context, v interface{})

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

func (*MessageWithEnumSelect) String

func (mwes *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 (mwes *MessageWithEnumSelect) StringX(ctx context.Context) string

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

func (*MessageWithEnumSelect) Strings

func (mwes *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 (mwes *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 adds a new predicate for 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) 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) 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 adds a new predicate 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 (mwfogb *MessageWithFieldOneGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*MessageWithFieldOneGroupBy) BoolX

func (mwfogb *MessageWithFieldOneGroupBy) BoolX(ctx context.Context) bool

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

func (*MessageWithFieldOneGroupBy) Bools

func (mwfogb *MessageWithFieldOneGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*MessageWithFieldOneGroupBy) BoolsX

func (mwfogb *MessageWithFieldOneGroupBy) BoolsX(ctx context.Context) []bool

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

func (*MessageWithFieldOneGroupBy) Float64

func (mwfogb *MessageWithFieldOneGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*MessageWithFieldOneGroupBy) Float64X

func (mwfogb *MessageWithFieldOneGroupBy) Float64X(ctx context.Context) float64

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

func (*MessageWithFieldOneGroupBy) Float64s

func (mwfogb *MessageWithFieldOneGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*MessageWithFieldOneGroupBy) Float64sX

func (mwfogb *MessageWithFieldOneGroupBy) Float64sX(ctx context.Context) []float64

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

func (*MessageWithFieldOneGroupBy) Int

func (mwfogb *MessageWithFieldOneGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*MessageWithFieldOneGroupBy) IntX

func (mwfogb *MessageWithFieldOneGroupBy) IntX(ctx context.Context) int

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

func (*MessageWithFieldOneGroupBy) Ints

func (mwfogb *MessageWithFieldOneGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*MessageWithFieldOneGroupBy) IntsX

func (mwfogb *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 (mwfogb *MessageWithFieldOneGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*MessageWithFieldOneGroupBy) String

func (mwfogb *MessageWithFieldOneGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*MessageWithFieldOneGroupBy) StringX

func (mwfogb *MessageWithFieldOneGroupBy) StringX(ctx context.Context) string

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

func (*MessageWithFieldOneGroupBy) Strings

func (mwfogb *MessageWithFieldOneGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*MessageWithFieldOneGroupBy) StringsX

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

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 exactly one MessageWithFieldOne entity is not 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 exactly one MessageWithFieldOne ID is not 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(field string, 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 (mwfos *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 (mwfos *MessageWithFieldOneSelect) BoolX(ctx context.Context) bool

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

func (*MessageWithFieldOneSelect) Bools

func (mwfos *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 (mwfos *MessageWithFieldOneSelect) BoolsX(ctx context.Context) []bool

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

func (*MessageWithFieldOneSelect) Float64

func (mwfos *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 (mwfos *MessageWithFieldOneSelect) Float64X(ctx context.Context) float64

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

func (*MessageWithFieldOneSelect) Float64s

func (mwfos *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 (mwfos *MessageWithFieldOneSelect) Float64sX(ctx context.Context) []float64

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

func (*MessageWithFieldOneSelect) Int

func (mwfos *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 (mwfos *MessageWithFieldOneSelect) IntX(ctx context.Context) int

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

func (*MessageWithFieldOneSelect) Ints

func (mwfos *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 (mwfos *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 (mwfos *MessageWithFieldOneSelect) ScanX(ctx context.Context, v interface{})

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

func (*MessageWithFieldOneSelect) String

func (mwfos *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 (mwfos *MessageWithFieldOneSelect) StringX(ctx context.Context) string

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

func (*MessageWithFieldOneSelect) Strings

func (mwfos *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 (mwfos *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 adds a new predicate for 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) 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) 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 adds a new predicate 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 (mwigb *MessageWithIDGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*MessageWithIDGroupBy) BoolX

func (mwigb *MessageWithIDGroupBy) BoolX(ctx context.Context) bool

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

func (*MessageWithIDGroupBy) Bools

func (mwigb *MessageWithIDGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*MessageWithIDGroupBy) BoolsX

func (mwigb *MessageWithIDGroupBy) BoolsX(ctx context.Context) []bool

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

func (*MessageWithIDGroupBy) Float64

func (mwigb *MessageWithIDGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*MessageWithIDGroupBy) Float64X

func (mwigb *MessageWithIDGroupBy) Float64X(ctx context.Context) float64

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

func (*MessageWithIDGroupBy) Float64s

func (mwigb *MessageWithIDGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*MessageWithIDGroupBy) Float64sX

func (mwigb *MessageWithIDGroupBy) Float64sX(ctx context.Context) []float64

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

func (*MessageWithIDGroupBy) Int

func (mwigb *MessageWithIDGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*MessageWithIDGroupBy) IntX

func (mwigb *MessageWithIDGroupBy) IntX(ctx context.Context) int

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

func (*MessageWithIDGroupBy) Ints

func (mwigb *MessageWithIDGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*MessageWithIDGroupBy) IntsX

func (mwigb *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 (mwigb *MessageWithIDGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*MessageWithIDGroupBy) String

func (mwigb *MessageWithIDGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*MessageWithIDGroupBy) StringX

func (mwigb *MessageWithIDGroupBy) StringX(ctx context.Context) string

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

func (*MessageWithIDGroupBy) Strings

func (mwigb *MessageWithIDGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*MessageWithIDGroupBy) StringsX

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

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 exactly one MessageWithID entity is not 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 exactly one MessageWithID ID is not 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(field string, 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 (mwis *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 (mwis *MessageWithIDSelect) BoolX(ctx context.Context) bool

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

func (*MessageWithIDSelect) Bools

func (mwis *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 (mwis *MessageWithIDSelect) BoolsX(ctx context.Context) []bool

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

func (*MessageWithIDSelect) Float64

func (mwis *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 (mwis *MessageWithIDSelect) Float64X(ctx context.Context) float64

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

func (*MessageWithIDSelect) Float64s

func (mwis *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 (mwis *MessageWithIDSelect) Float64sX(ctx context.Context) []float64

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

func (*MessageWithIDSelect) Int

func (mwis *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 (mwis *MessageWithIDSelect) IntX(ctx context.Context) int

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

func (*MessageWithIDSelect) Ints

func (mwis *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 (mwis *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 (mwis *MessageWithIDSelect) ScanX(ctx context.Context, v interface{})

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

func (*MessageWithIDSelect) String

func (mwis *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 (mwis *MessageWithIDSelect) StringX(ctx context.Context) string

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

func (*MessageWithIDSelect) Strings

func (mwis *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 (mwis *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 adds a new predicate for 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) 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) 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) 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 adds a new predicate 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 (mwogb *MessageWithOptionalsGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*MessageWithOptionalsGroupBy) BoolX

func (mwogb *MessageWithOptionalsGroupBy) BoolX(ctx context.Context) bool

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

func (*MessageWithOptionalsGroupBy) Bools

func (mwogb *MessageWithOptionalsGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*MessageWithOptionalsGroupBy) BoolsX

func (mwogb *MessageWithOptionalsGroupBy) BoolsX(ctx context.Context) []bool

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

func (*MessageWithOptionalsGroupBy) Float64

func (mwogb *MessageWithOptionalsGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*MessageWithOptionalsGroupBy) Float64X

func (mwogb *MessageWithOptionalsGroupBy) Float64X(ctx context.Context) float64

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

func (*MessageWithOptionalsGroupBy) Float64s

func (mwogb *MessageWithOptionalsGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*MessageWithOptionalsGroupBy) Float64sX

func (mwogb *MessageWithOptionalsGroupBy) Float64sX(ctx context.Context) []float64

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

func (*MessageWithOptionalsGroupBy) Int

func (mwogb *MessageWithOptionalsGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*MessageWithOptionalsGroupBy) IntX

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

func (*MessageWithOptionalsGroupBy) Ints

func (mwogb *MessageWithOptionalsGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*MessageWithOptionalsGroupBy) IntsX

func (mwogb *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 (mwogb *MessageWithOptionalsGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*MessageWithOptionalsGroupBy) String

func (mwogb *MessageWithOptionalsGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*MessageWithOptionalsGroupBy) StringX

func (mwogb *MessageWithOptionalsGroupBy) StringX(ctx context.Context) string

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

func (*MessageWithOptionalsGroupBy) Strings

func (mwogb *MessageWithOptionalsGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*MessageWithOptionalsGroupBy) StringsX

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

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 uint8, 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) 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.

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 exactly one MessageWithOptionals entity is not 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 exactly one MessageWithOptionals ID is not 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

func (mwoq *MessageWithOptionalsQuery) Select(field string, fields ...string) *MessageWithOptionalsSelect

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 (mwos *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

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

func (*MessageWithOptionalsSelect) Bools

func (mwos *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 (mwos *MessageWithOptionalsSelect) BoolsX(ctx context.Context) []bool

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

func (*MessageWithOptionalsSelect) Float64

func (mwos *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 (mwos *MessageWithOptionalsSelect) Float64X(ctx context.Context) float64

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

func (*MessageWithOptionalsSelect) Float64s

func (mwos *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 (mwos *MessageWithOptionalsSelect) Float64sX(ctx context.Context) []float64

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

func (*MessageWithOptionalsSelect) Int

func (mwos *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

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

func (*MessageWithOptionalsSelect) Ints

func (mwos *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 (mwos *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 (mwos *MessageWithOptionalsSelect) ScanX(ctx context.Context, v interface{})

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

func (*MessageWithOptionalsSelect) String

func (mwos *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 (mwos *MessageWithOptionalsSelect) StringX(ctx context.Context) string

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

func (*MessageWithOptionalsSelect) Strings

func (mwos *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 (mwos *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) 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 adds a new predicate for 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) 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) 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) 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 adds a new predicate 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 (mwpngb *MessageWithPackageNameGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*MessageWithPackageNameGroupBy) BoolX

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

func (*MessageWithPackageNameGroupBy) Bools

func (mwpngb *MessageWithPackageNameGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*MessageWithPackageNameGroupBy) BoolsX

func (mwpngb *MessageWithPackageNameGroupBy) BoolsX(ctx context.Context) []bool

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

func (*MessageWithPackageNameGroupBy) Float64

func (mwpngb *MessageWithPackageNameGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*MessageWithPackageNameGroupBy) Float64X

func (mwpngb *MessageWithPackageNameGroupBy) Float64X(ctx context.Context) float64

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

func (*MessageWithPackageNameGroupBy) Float64s

func (mwpngb *MessageWithPackageNameGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*MessageWithPackageNameGroupBy) Float64sX

func (mwpngb *MessageWithPackageNameGroupBy) Float64sX(ctx context.Context) []float64

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

func (*MessageWithPackageNameGroupBy) Int

func (mwpngb *MessageWithPackageNameGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*MessageWithPackageNameGroupBy) IntX

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

func (*MessageWithPackageNameGroupBy) Ints

func (mwpngb *MessageWithPackageNameGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*MessageWithPackageNameGroupBy) IntsX

func (mwpngb *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 (mwpngb *MessageWithPackageNameGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*MessageWithPackageNameGroupBy) String

func (mwpngb *MessageWithPackageNameGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*MessageWithPackageNameGroupBy) StringX

func (mwpngb *MessageWithPackageNameGroupBy) StringX(ctx context.Context) string

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

func (*MessageWithPackageNameGroupBy) Strings

func (mwpngb *MessageWithPackageNameGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*MessageWithPackageNameGroupBy) StringsX

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

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 exactly one MessageWithPackageName entity is not 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 exactly one MessageWithPackageName ID is not 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

func (mwpnq *MessageWithPackageNameQuery) Select(field string, fields ...string) *MessageWithPackageNameSelect

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 (mwpns *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

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

func (*MessageWithPackageNameSelect) Bools

func (mwpns *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 (mwpns *MessageWithPackageNameSelect) BoolsX(ctx context.Context) []bool

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

func (*MessageWithPackageNameSelect) Float64

func (mwpns *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 (mwpns *MessageWithPackageNameSelect) Float64X(ctx context.Context) float64

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

func (*MessageWithPackageNameSelect) Float64s

func (mwpns *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 (mwpns *MessageWithPackageNameSelect) Float64sX(ctx context.Context) []float64

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

func (*MessageWithPackageNameSelect) Int

func (mwpns *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

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

func (*MessageWithPackageNameSelect) Ints

func (mwpns *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 (mwpns *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 (mwpns *MessageWithPackageNameSelect) ScanX(ctx context.Context, v interface{})

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

func (*MessageWithPackageNameSelect) String

func (mwpns *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 (mwpns *MessageWithPackageNameSelect) StringX(ctx context.Context) string

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

func (*MessageWithPackageNameSelect) Strings

func (mwpns *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 (mwpns *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 adds a new predicate for 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 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) 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) 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 adds a new predicate 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 (pgb *PortalGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*PortalGroupBy) BoolX

func (pgb *PortalGroupBy) BoolX(ctx context.Context) bool

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

func (*PortalGroupBy) Bools

func (pgb *PortalGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*PortalGroupBy) BoolsX

func (pgb *PortalGroupBy) BoolsX(ctx context.Context) []bool

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

func (*PortalGroupBy) Float64

func (pgb *PortalGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*PortalGroupBy) Float64X

func (pgb *PortalGroupBy) Float64X(ctx context.Context) float64

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

func (*PortalGroupBy) Float64s

func (pgb *PortalGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*PortalGroupBy) Float64sX

func (pgb *PortalGroupBy) Float64sX(ctx context.Context) []float64

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

func (*PortalGroupBy) Int

func (pgb *PortalGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*PortalGroupBy) IntX

func (pgb *PortalGroupBy) IntX(ctx context.Context) int

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

func (*PortalGroupBy) Ints

func (pgb *PortalGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*PortalGroupBy) IntsX

func (pgb *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 (pgb *PortalGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*PortalGroupBy) String

func (pgb *PortalGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*PortalGroupBy) StringX

func (pgb *PortalGroupBy) StringX(ctx context.Context) string

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

func (*PortalGroupBy) Strings

func (pgb *PortalGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*PortalGroupBy) StringsX

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

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 exactly one Portal entity is not 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 exactly one Portal ID is not 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(field string, 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 (ps *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 (ps *PortalSelect) BoolX(ctx context.Context) bool

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

func (*PortalSelect) Bools

func (ps *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 (ps *PortalSelect) BoolsX(ctx context.Context) []bool

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

func (*PortalSelect) Float64

func (ps *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 (ps *PortalSelect) Float64X(ctx context.Context) float64

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

func (*PortalSelect) Float64s

func (ps *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 (ps *PortalSelect) Float64sX(ctx context.Context) []float64

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

func (*PortalSelect) Int

func (ps *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 (ps *PortalSelect) IntX(ctx context.Context) int

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

func (*PortalSelect) Ints

func (ps *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 (ps *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 (ps *PortalSelect) ScanX(ctx context.Context, v interface{})

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

func (*PortalSelect) String

func (ps *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 (ps *PortalSelect) StringX(ctx context.Context) string

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

func (*PortalSelect) Strings

func (ps *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 (ps *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 adds a new predicate for 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(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 Rollbacker method.

type Tx

type Tx struct {

	// 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
	// Portal is the client for interacting with the Portal builders.
	Portal *PortalClient
	// 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"`
	// 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) 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) 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) 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) 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) SetStatus

func (uc *UserCreate) SetStatus(u user.Status) *UserCreate

SetStatus sets the "status" 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) 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 adds a new predicate 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"`
	// 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.

type UserGroupBy

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

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

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

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

func (*UserGroupBy) Bool

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

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

func (*UserGroupBy) BoolX

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

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

func (*UserGroupBy) Bools

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

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

func (*UserGroupBy) BoolsX

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

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

func (*UserGroupBy) Float64

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

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

func (*UserGroupBy) Float64X

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

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

func (*UserGroupBy) Float64s

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

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

func (*UserGroupBy) Float64sX

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

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

func (*UserGroupBy) Int

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

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

func (*UserGroupBy) IntX

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

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

func (*UserGroupBy) Ints

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

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

func (*UserGroupBy) IntsX

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

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

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*UserGroupBy) ScanX

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

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

func (*UserGroupBy) String

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

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

func (*UserGroupBy) StringX

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

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

func (*UserGroupBy) Strings

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

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

func (*UserGroupBy) StringsX

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

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

type UserMutation

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

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

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

func (m *UserMutation) ResetStatus()

ResetStatus resets all changes to the "status" 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) SetStatus

func (m *UserMutation) SetStatus(u user.Status)

SetStatus sets the "status" field.

func (*UserMutation) SetUserName

func (m *UserMutation) SetUserName(s string)

SetUserName sets the "user_name" field.

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

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

UserName returns the value of the "user_name" field in the mutation.

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 exactly one User entity is not found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

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

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

func (*UserQuery) OnlyIDX

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

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

func (*UserQuery) OnlyX

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

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

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery

Order adds an order step to the query.

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

func (uq *UserQuery) Select(field string, 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.

type UserSelect

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

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Bool

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

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

func (*UserSelect) BoolX

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

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

func (*UserSelect) Bools

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

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

func (*UserSelect) BoolsX

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

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

func (*UserSelect) Float64

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

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

func (*UserSelect) Float64X

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

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

func (*UserSelect) Float64s

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

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

func (*UserSelect) Float64sX

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

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

func (*UserSelect) Int

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

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

func (*UserSelect) IntX

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

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

func (*UserSelect) Ints

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

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

func (*UserSelect) IntsX

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

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

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v interface{}) error

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

func (*UserSelect) ScanX

func (us *UserSelect) ScanX(ctx context.Context, v interface{})

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

func (*UserSelect) String

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

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

func (*UserSelect) StringX

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

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

func (*UserSelect) Strings

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

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

func (*UserSelect) StringsX

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

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

type UserUpdate

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

UserUpdate is the builder for updating User entities.

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

func (uu *UserUpdate) SetStatus(u user.Status) *UserUpdate

SetStatus sets the "status" 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 adds a new predicate for 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) 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) 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) SetStatus

func (uuo *UserUpdateOne) SetStatus(u user.Status) *UserUpdateOne

SetStatus sets the "status" 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) 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) 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 adds a new predicate 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 (vmgb *ValidMessageGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ValidMessageGroupBy) BoolX

func (vmgb *ValidMessageGroupBy) BoolX(ctx context.Context) bool

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

func (*ValidMessageGroupBy) Bools

func (vmgb *ValidMessageGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*ValidMessageGroupBy) BoolsX

func (vmgb *ValidMessageGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ValidMessageGroupBy) Float64

func (vmgb *ValidMessageGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ValidMessageGroupBy) Float64X

func (vmgb *ValidMessageGroupBy) Float64X(ctx context.Context) float64

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

func (*ValidMessageGroupBy) Float64s

func (vmgb *ValidMessageGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*ValidMessageGroupBy) Float64sX

func (vmgb *ValidMessageGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ValidMessageGroupBy) Int

func (vmgb *ValidMessageGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ValidMessageGroupBy) IntX

func (vmgb *ValidMessageGroupBy) IntX(ctx context.Context) int

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

func (*ValidMessageGroupBy) Ints

func (vmgb *ValidMessageGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*ValidMessageGroupBy) IntsX

func (vmgb *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 (vmgb *ValidMessageGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ValidMessageGroupBy) String

func (vmgb *ValidMessageGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ValidMessageGroupBy) StringX

func (vmgb *ValidMessageGroupBy) StringX(ctx context.Context) string

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

func (*ValidMessageGroupBy) Strings

func (vmgb *ValidMessageGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*ValidMessageGroupBy) StringsX

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

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 uint8, 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) 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.

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 exactly one ValidMessage entity is not 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 exactly one ValidMessage ID is not 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(field string, 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 (vms *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 (vms *ValidMessageSelect) BoolX(ctx context.Context) bool

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

func (*ValidMessageSelect) Bools

func (vms *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 (vms *ValidMessageSelect) BoolsX(ctx context.Context) []bool

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

func (*ValidMessageSelect) Float64

func (vms *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 (vms *ValidMessageSelect) Float64X(ctx context.Context) float64

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

func (*ValidMessageSelect) Float64s

func (vms *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 (vms *ValidMessageSelect) Float64sX(ctx context.Context) []float64

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

func (*ValidMessageSelect) Int

func (vms *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 (vms *ValidMessageSelect) IntX(ctx context.Context) int

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

func (*ValidMessageSelect) Ints

func (vms *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 (vms *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 (vms *ValidMessageSelect) ScanX(ctx context.Context, v interface{})

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

func (*ValidMessageSelect) String

func (vms *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 (vms *ValidMessageSelect) StringX(ctx context.Context) string

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

func (*ValidMessageSelect) Strings

func (vms *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 (vms *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 adds a new predicate for 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 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