ent

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 26 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.
	TypeAccount               = "Account"
	TypeAccountNotifs         = "AccountNotifs"
	TypeLikeFeature           = "LikeFeature"
	TypePost                  = "Post"
	TypeQoute_retweet_feature = "Qoute_retweet_feature"
	TypeRetweet_feature       = "Retweet_feature"
	TypeTokens                = "Tokens"
	TypeUsers                 = "Users"
)

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 Account

type Account struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// Owner holds the value of the "owner" field.
	Owner string `json:"owner,omitempty"`
	// IsPrivate holds the value of the "is_private" field.
	IsPrivate bool `json:"is_private,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Follower holds the value of the "follower" field.
	Follower int64 `json:"follower,omitempty"`
	// Following holds the value of the "following" field.
	Following int64 `json:"following,omitempty"`
	// PhotoDir holds the value of the "photo_dir" field.
	PhotoDir *string `json:"photo_dir,omitempty"`
	// contains filtered or unexported fields
}

Account is the model entity for the Account schema.

func (*Account) String

func (a *Account) String() string

String implements the fmt.Stringer.

func (*Account) Unwrap

func (a *Account) Unwrap() *Account

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

func (a *Account) Update() *AccountUpdateOne

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

type AccountClient

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

AccountClient is a client for the Account schema.

func NewAccountClient

func NewAccountClient(c config) *AccountClient

NewAccountClient returns a client for the Account from the given config.

func (*AccountClient) Create

func (c *AccountClient) Create() *AccountCreate

Create returns a builder for creating a Account entity.

func (*AccountClient) CreateBulk

func (c *AccountClient) CreateBulk(builders ...*AccountCreate) *AccountCreateBulk

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

func (*AccountClient) Delete

func (c *AccountClient) Delete() *AccountDelete

Delete returns a delete builder for Account.

func (*AccountClient) DeleteOne

func (c *AccountClient) DeleteOne(a *Account) *AccountDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AccountClient) DeleteOneID

func (c *AccountClient) DeleteOneID(id int64) *AccountDeleteOne

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

func (*AccountClient) Get

func (c *AccountClient) Get(ctx context.Context, id int64) (*Account, error)

Get returns a Account entity by its id.

func (*AccountClient) GetX

func (c *AccountClient) GetX(ctx context.Context, id int64) *Account

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

func (*AccountClient) Hooks

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

Hooks returns the client hooks.

func (*AccountClient) Query

func (c *AccountClient) Query() *AccountQuery

Query returns a query builder for Account.

func (*AccountClient) Update

func (c *AccountClient) Update() *AccountUpdate

Update returns an update builder for Account.

func (*AccountClient) UpdateOne

func (c *AccountClient) UpdateOne(a *Account) *AccountUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AccountClient) UpdateOneID

func (c *AccountClient) UpdateOneID(id int64) *AccountUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AccountClient) Use

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

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

type AccountCreate

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

AccountCreate is the builder for creating a Account entity.

func (*AccountCreate) Exec

func (ac *AccountCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountCreate) ExecX

func (ac *AccountCreate) ExecX(ctx context.Context)

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

func (*AccountCreate) Mutation

func (ac *AccountCreate) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountCreate) Save

func (ac *AccountCreate) Save(ctx context.Context) (*Account, error)

Save creates the Account in the database.

func (*AccountCreate) SaveX

func (ac *AccountCreate) SaveX(ctx context.Context) *Account

SaveX calls Save and panics if Save returns an error.

func (*AccountCreate) SetCreatedAt

func (ac *AccountCreate) SetCreatedAt(t time.Time) *AccountCreate

SetCreatedAt sets the "created_at" field.

func (*AccountCreate) SetFollower

func (ac *AccountCreate) SetFollower(i int64) *AccountCreate

SetFollower sets the "follower" field.

func (*AccountCreate) SetFollowing

func (ac *AccountCreate) SetFollowing(i int64) *AccountCreate

SetFollowing sets the "following" field.

func (*AccountCreate) SetID

func (ac *AccountCreate) SetID(i int64) *AccountCreate

SetID sets the "id" field.

func (*AccountCreate) SetIsPrivate

func (ac *AccountCreate) SetIsPrivate(b bool) *AccountCreate

SetIsPrivate sets the "is_private" field.

func (*AccountCreate) SetNillableCreatedAt

func (ac *AccountCreate) SetNillableCreatedAt(t *time.Time) *AccountCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AccountCreate) SetNillableFollower

func (ac *AccountCreate) SetNillableFollower(i *int64) *AccountCreate

SetNillableFollower sets the "follower" field if the given value is not nil.

func (*AccountCreate) SetNillableFollowing

func (ac *AccountCreate) SetNillableFollowing(i *int64) *AccountCreate

SetNillableFollowing sets the "following" field if the given value is not nil.

func (*AccountCreate) SetNillableIsPrivate

func (ac *AccountCreate) SetNillableIsPrivate(b *bool) *AccountCreate

SetNillableIsPrivate sets the "is_private" field if the given value is not nil.

func (*AccountCreate) SetNillablePhotoDir

func (ac *AccountCreate) SetNillablePhotoDir(s *string) *AccountCreate

SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.

func (*AccountCreate) SetOwner

func (ac *AccountCreate) SetOwner(s string) *AccountCreate

SetOwner sets the "owner" field.

func (*AccountCreate) SetPhotoDir

func (ac *AccountCreate) SetPhotoDir(s string) *AccountCreate

SetPhotoDir sets the "photo_dir" field.

type AccountCreateBulk

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

AccountCreateBulk is the builder for creating many Account entities in bulk.

func (*AccountCreateBulk) Exec

func (acb *AccountCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountCreateBulk) ExecX

func (acb *AccountCreateBulk) ExecX(ctx context.Context)

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

func (*AccountCreateBulk) Save

func (acb *AccountCreateBulk) Save(ctx context.Context) ([]*Account, error)

Save creates the Account entities in the database.

func (*AccountCreateBulk) SaveX

func (acb *AccountCreateBulk) SaveX(ctx context.Context) []*Account

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

type AccountDelete

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

AccountDelete is the builder for deleting a Account entity.

func (*AccountDelete) Exec

func (ad *AccountDelete) Exec(ctx context.Context) (int, error)

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

func (*AccountDelete) ExecX

func (ad *AccountDelete) ExecX(ctx context.Context) int

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

func (*AccountDelete) Where

func (ad *AccountDelete) Where(ps ...predicate.Account) *AccountDelete

Where appends a list predicates to the AccountDelete builder.

type AccountDeleteOne

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

AccountDeleteOne is the builder for deleting a single Account entity.

func (*AccountDeleteOne) Exec

func (ado *AccountDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AccountDeleteOne) ExecX

func (ado *AccountDeleteOne) ExecX(ctx context.Context)

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

type AccountGroupBy

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

AccountGroupBy is the group-by builder for Account entities.

func (*AccountGroupBy) Aggregate

func (agb *AccountGroupBy) Aggregate(fns ...AggregateFunc) *AccountGroupBy

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

func (*AccountGroupBy) Bool

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

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

func (*AccountGroupBy) BoolX

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

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

func (*AccountGroupBy) Bools

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

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

func (*AccountGroupBy) BoolsX

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

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

func (*AccountGroupBy) Float64

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

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

func (*AccountGroupBy) Float64X

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

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

func (*AccountGroupBy) Float64s

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

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

func (*AccountGroupBy) Float64sX

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

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

func (*AccountGroupBy) Int

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

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

func (*AccountGroupBy) IntX

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

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

func (*AccountGroupBy) Ints

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

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

func (*AccountGroupBy) IntsX

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

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

func (*AccountGroupBy) Scan

func (agb *AccountGroupBy) Scan(ctx context.Context, v any) error

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

func (*AccountGroupBy) ScanX

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

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

func (*AccountGroupBy) String

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

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

func (*AccountGroupBy) StringX

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

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

func (*AccountGroupBy) Strings

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

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

func (*AccountGroupBy) StringsX

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

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

type AccountMutation

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

AccountMutation represents an operation that mutates the Account nodes in the graph.

func (*AccountMutation) AddField

func (m *AccountMutation) 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 (*AccountMutation) AddFollower

func (m *AccountMutation) AddFollower(i int64)

AddFollower adds i to the "follower" field.

func (*AccountMutation) AddFollowing

func (m *AccountMutation) AddFollowing(i int64)

AddFollowing adds i to the "following" field.

func (*AccountMutation) AddedEdges

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

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

func (*AccountMutation) AddedField

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

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

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

func (*AccountMutation) AddedFollower

func (m *AccountMutation) AddedFollower() (r int64, exists bool)

AddedFollower returns the value that was added to the "follower" field in this mutation.

func (*AccountMutation) AddedFollowing

func (m *AccountMutation) AddedFollowing() (r int64, exists bool)

AddedFollowing returns the value that was added to the "following" field in this mutation.

func (*AccountMutation) AddedIDs

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

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

func (*AccountMutation) ClearEdge

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

func (m *AccountMutation) 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 (*AccountMutation) ClearPhotoDir

func (m *AccountMutation) ClearPhotoDir()

ClearPhotoDir clears the value of the "photo_dir" field.

func (*AccountMutation) ClearedEdges

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

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

func (*AccountMutation) ClearedFields

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

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

func (AccountMutation) Client

func (m AccountMutation) 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 (*AccountMutation) CreatedAt

func (m *AccountMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AccountMutation) EdgeCleared

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

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

func (*AccountMutation) Field

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

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

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

func (*AccountMutation) Fields

func (m *AccountMutation) 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 (*AccountMutation) Follower

func (m *AccountMutation) Follower() (r int64, exists bool)

Follower returns the value of the "follower" field in the mutation.

func (*AccountMutation) Following

func (m *AccountMutation) Following() (r int64, exists bool)

Following returns the value of the "following" field in the mutation.

func (*AccountMutation) ID

func (m *AccountMutation) ID() (id int64, 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 (*AccountMutation) IDs

func (m *AccountMutation) IDs(ctx context.Context) ([]int64, error)

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

func (*AccountMutation) IsPrivate

func (m *AccountMutation) IsPrivate() (r bool, exists bool)

IsPrivate returns the value of the "is_private" field in the mutation.

func (*AccountMutation) OldCreatedAt

func (m *AccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Account entity. If the Account 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 (*AccountMutation) OldField

func (m *AccountMutation) 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 (*AccountMutation) OldFollower

func (m *AccountMutation) OldFollower(ctx context.Context) (v int64, err error)

OldFollower returns the old "follower" field's value of the Account entity. If the Account 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 (*AccountMutation) OldFollowing

func (m *AccountMutation) OldFollowing(ctx context.Context) (v int64, err error)

OldFollowing returns the old "following" field's value of the Account entity. If the Account 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 (*AccountMutation) OldIsPrivate

func (m *AccountMutation) OldIsPrivate(ctx context.Context) (v bool, err error)

OldIsPrivate returns the old "is_private" field's value of the Account entity. If the Account 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 (*AccountMutation) OldOwner

func (m *AccountMutation) OldOwner(ctx context.Context) (v string, err error)

OldOwner returns the old "owner" field's value of the Account entity. If the Account 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 (*AccountMutation) OldPhotoDir

func (m *AccountMutation) OldPhotoDir(ctx context.Context) (v *string, err error)

OldPhotoDir returns the old "photo_dir" field's value of the Account entity. If the Account 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 (*AccountMutation) Op

func (m *AccountMutation) Op() Op

Op returns the operation name.

func (*AccountMutation) Owner

func (m *AccountMutation) Owner() (r string, exists bool)

Owner returns the value of the "owner" field in the mutation.

func (*AccountMutation) PhotoDir

func (m *AccountMutation) PhotoDir() (r string, exists bool)

PhotoDir returns the value of the "photo_dir" field in the mutation.

func (*AccountMutation) PhotoDirCleared

func (m *AccountMutation) PhotoDirCleared() bool

PhotoDirCleared returns if the "photo_dir" field was cleared in this mutation.

func (*AccountMutation) RemovedEdges

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

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

func (*AccountMutation) RemovedIDs

func (m *AccountMutation) 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 (*AccountMutation) ResetCreatedAt

func (m *AccountMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AccountMutation) ResetEdge

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

func (m *AccountMutation) 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 (*AccountMutation) ResetFollower

func (m *AccountMutation) ResetFollower()

ResetFollower resets all changes to the "follower" field.

func (*AccountMutation) ResetFollowing

func (m *AccountMutation) ResetFollowing()

ResetFollowing resets all changes to the "following" field.

func (*AccountMutation) ResetIsPrivate

func (m *AccountMutation) ResetIsPrivate()

ResetIsPrivate resets all changes to the "is_private" field.

func (*AccountMutation) ResetOwner

func (m *AccountMutation) ResetOwner()

ResetOwner resets all changes to the "owner" field.

func (*AccountMutation) ResetPhotoDir

func (m *AccountMutation) ResetPhotoDir()

ResetPhotoDir resets all changes to the "photo_dir" field.

func (*AccountMutation) SetCreatedAt

func (m *AccountMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AccountMutation) SetField

func (m *AccountMutation) 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 (*AccountMutation) SetFollower

func (m *AccountMutation) SetFollower(i int64)

SetFollower sets the "follower" field.

func (*AccountMutation) SetFollowing

func (m *AccountMutation) SetFollowing(i int64)

SetFollowing sets the "following" field.

func (*AccountMutation) SetID

func (m *AccountMutation) SetID(id int64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Account entities.

func (*AccountMutation) SetIsPrivate

func (m *AccountMutation) SetIsPrivate(b bool)

SetIsPrivate sets the "is_private" field.

func (*AccountMutation) SetOwner

func (m *AccountMutation) SetOwner(s string)

SetOwner sets the "owner" field.

func (*AccountMutation) SetPhotoDir

func (m *AccountMutation) SetPhotoDir(s string)

SetPhotoDir sets the "photo_dir" field.

func (AccountMutation) Tx

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

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

func (*AccountMutation) Type

func (m *AccountMutation) Type() string

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

func (*AccountMutation) Where

func (m *AccountMutation) Where(ps ...predicate.Account)

Where appends a list predicates to the AccountMutation builder.

type AccountNotifs

type AccountNotifs struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// for deploy purpose
	AccountID *int64 `json:"account_id,omitempty"`
	// NotifType holds the value of the "notif_type" field.
	NotifType string `json:"notif_type,omitempty"`
	// NotifTitle holds the value of the "notif_title" field.
	NotifTitle string `json:"notif_title,omitempty"`
	// NotifContent holds the value of the "notif_content" field.
	NotifContent string `json:"notif_content,omitempty"`
	// for deploy purpose
	NotifTime *time.Time `json:"notif_time,omitempty"`
	// for deploy purpose
	Username *string `json:"username,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

AccountNotifs is the model entity for the AccountNotifs schema.

func (*AccountNotifs) String

func (an *AccountNotifs) String() string

String implements the fmt.Stringer.

func (*AccountNotifs) Unwrap

func (an *AccountNotifs) Unwrap() *AccountNotifs

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

func (an *AccountNotifs) Update() *AccountNotifsUpdateOne

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

type AccountNotifsClient

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

AccountNotifsClient is a client for the AccountNotifs schema.

func NewAccountNotifsClient

func NewAccountNotifsClient(c config) *AccountNotifsClient

NewAccountNotifsClient returns a client for the AccountNotifs from the given config.

func (*AccountNotifsClient) Create

Create returns a builder for creating a AccountNotifs entity.

func (*AccountNotifsClient) CreateBulk

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

func (*AccountNotifsClient) Delete

Delete returns a delete builder for AccountNotifs.

func (*AccountNotifsClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AccountNotifsClient) DeleteOneID

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

func (*AccountNotifsClient) Get

Get returns a AccountNotifs entity by its id.

func (*AccountNotifsClient) GetX

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

func (*AccountNotifsClient) Hooks

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

Hooks returns the client hooks.

func (*AccountNotifsClient) Query

Query returns a query builder for AccountNotifs.

func (*AccountNotifsClient) Update

Update returns an update builder for AccountNotifs.

func (*AccountNotifsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AccountNotifsClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*AccountNotifsClient) Use

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

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

type AccountNotifsCreate

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

AccountNotifsCreate is the builder for creating a AccountNotifs entity.

func (*AccountNotifsCreate) Exec

func (anc *AccountNotifsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountNotifsCreate) ExecX

func (anc *AccountNotifsCreate) ExecX(ctx context.Context)

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

func (*AccountNotifsCreate) Mutation

func (anc *AccountNotifsCreate) Mutation() *AccountNotifsMutation

Mutation returns the AccountNotifsMutation object of the builder.

func (*AccountNotifsCreate) Save

Save creates the AccountNotifs in the database.

func (*AccountNotifsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*AccountNotifsCreate) SetAccountID

func (anc *AccountNotifsCreate) SetAccountID(i int64) *AccountNotifsCreate

SetAccountID sets the "account_id" field.

func (*AccountNotifsCreate) SetCreatedAt

func (anc *AccountNotifsCreate) SetCreatedAt(t time.Time) *AccountNotifsCreate

SetCreatedAt sets the "created_at" field.

func (*AccountNotifsCreate) SetID

SetID sets the "id" field.

func (*AccountNotifsCreate) SetNillableAccountID

func (anc *AccountNotifsCreate) SetNillableAccountID(i *int64) *AccountNotifsCreate

SetNillableAccountID sets the "account_id" field if the given value is not nil.

func (*AccountNotifsCreate) SetNillableCreatedAt

func (anc *AccountNotifsCreate) SetNillableCreatedAt(t *time.Time) *AccountNotifsCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AccountNotifsCreate) SetNillableID

func (anc *AccountNotifsCreate) SetNillableID(u *uuid.UUID) *AccountNotifsCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*AccountNotifsCreate) SetNillableNotifContent

func (anc *AccountNotifsCreate) SetNillableNotifContent(s *string) *AccountNotifsCreate

SetNillableNotifContent sets the "notif_content" field if the given value is not nil.

func (*AccountNotifsCreate) SetNillableNotifTime

func (anc *AccountNotifsCreate) SetNillableNotifTime(t *time.Time) *AccountNotifsCreate

SetNillableNotifTime sets the "notif_time" field if the given value is not nil.

func (*AccountNotifsCreate) SetNillableNotifTitle

func (anc *AccountNotifsCreate) SetNillableNotifTitle(s *string) *AccountNotifsCreate

SetNillableNotifTitle sets the "notif_title" field if the given value is not nil.

func (*AccountNotifsCreate) SetNillableUsername

func (anc *AccountNotifsCreate) SetNillableUsername(s *string) *AccountNotifsCreate

SetNillableUsername sets the "username" field if the given value is not nil.

func (*AccountNotifsCreate) SetNotifContent

func (anc *AccountNotifsCreate) SetNotifContent(s string) *AccountNotifsCreate

SetNotifContent sets the "notif_content" field.

func (*AccountNotifsCreate) SetNotifTime

func (anc *AccountNotifsCreate) SetNotifTime(t time.Time) *AccountNotifsCreate

SetNotifTime sets the "notif_time" field.

func (*AccountNotifsCreate) SetNotifTitle

func (anc *AccountNotifsCreate) SetNotifTitle(s string) *AccountNotifsCreate

SetNotifTitle sets the "notif_title" field.

func (*AccountNotifsCreate) SetNotifType

func (anc *AccountNotifsCreate) SetNotifType(s string) *AccountNotifsCreate

SetNotifType sets the "notif_type" field.

func (*AccountNotifsCreate) SetUsername

func (anc *AccountNotifsCreate) SetUsername(s string) *AccountNotifsCreate

SetUsername sets the "username" field.

type AccountNotifsCreateBulk

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

AccountNotifsCreateBulk is the builder for creating many AccountNotifs entities in bulk.

func (*AccountNotifsCreateBulk) Exec

func (ancb *AccountNotifsCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountNotifsCreateBulk) ExecX

func (ancb *AccountNotifsCreateBulk) ExecX(ctx context.Context)

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

func (*AccountNotifsCreateBulk) Save

Save creates the AccountNotifs entities in the database.

func (*AccountNotifsCreateBulk) SaveX

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

type AccountNotifsDelete

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

AccountNotifsDelete is the builder for deleting a AccountNotifs entity.

func (*AccountNotifsDelete) Exec

func (and *AccountNotifsDelete) Exec(ctx context.Context) (int, error)

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

func (*AccountNotifsDelete) ExecX

func (and *AccountNotifsDelete) ExecX(ctx context.Context) int

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

func (*AccountNotifsDelete) Where

Where appends a list predicates to the AccountNotifsDelete builder.

type AccountNotifsDeleteOne

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

AccountNotifsDeleteOne is the builder for deleting a single AccountNotifs entity.

func (*AccountNotifsDeleteOne) Exec

func (ando *AccountNotifsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AccountNotifsDeleteOne) ExecX

func (ando *AccountNotifsDeleteOne) ExecX(ctx context.Context)

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

type AccountNotifsGroupBy

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

AccountNotifsGroupBy is the group-by builder for AccountNotifs entities.

func (*AccountNotifsGroupBy) Aggregate

func (angb *AccountNotifsGroupBy) Aggregate(fns ...AggregateFunc) *AccountNotifsGroupBy

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

func (*AccountNotifsGroupBy) Bool

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

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

func (*AccountNotifsGroupBy) BoolX

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

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

func (*AccountNotifsGroupBy) Bools

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

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

func (*AccountNotifsGroupBy) BoolsX

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

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

func (*AccountNotifsGroupBy) Float64

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

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

func (*AccountNotifsGroupBy) Float64X

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

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

func (*AccountNotifsGroupBy) Float64s

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

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

func (*AccountNotifsGroupBy) Float64sX

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

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

func (*AccountNotifsGroupBy) Int

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

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

func (*AccountNotifsGroupBy) IntX

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

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

func (*AccountNotifsGroupBy) Ints

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

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

func (*AccountNotifsGroupBy) IntsX

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

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

func (*AccountNotifsGroupBy) Scan

func (angb *AccountNotifsGroupBy) Scan(ctx context.Context, v any) error

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

func (*AccountNotifsGroupBy) ScanX

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

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

func (*AccountNotifsGroupBy) String

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

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

func (*AccountNotifsGroupBy) StringX

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

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

func (*AccountNotifsGroupBy) Strings

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

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

func (*AccountNotifsGroupBy) StringsX

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

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

type AccountNotifsMutation

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

AccountNotifsMutation represents an operation that mutates the AccountNotifs nodes in the graph.

func (*AccountNotifsMutation) AccountID

func (m *AccountNotifsMutation) AccountID() (r int64, exists bool)

AccountID returns the value of the "account_id" field in the mutation.

func (*AccountNotifsMutation) AccountIDCleared

func (m *AccountNotifsMutation) AccountIDCleared() bool

AccountIDCleared returns if the "account_id" field was cleared in this mutation.

func (*AccountNotifsMutation) AddAccountID

func (m *AccountNotifsMutation) AddAccountID(i int64)

AddAccountID adds i to the "account_id" field.

func (*AccountNotifsMutation) AddField

func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) AddedAccountID

func (m *AccountNotifsMutation) AddedAccountID() (r int64, exists bool)

AddedAccountID returns the value that was added to the "account_id" field in this mutation.

func (*AccountNotifsMutation) AddedEdges

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

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

func (*AccountNotifsMutation) AddedField

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

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

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

func (*AccountNotifsMutation) AddedIDs

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

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

func (*AccountNotifsMutation) ClearAccountID

func (m *AccountNotifsMutation) ClearAccountID()

ClearAccountID clears the value of the "account_id" field.

func (*AccountNotifsMutation) ClearEdge

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

func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) ClearNotifContent

func (m *AccountNotifsMutation) ClearNotifContent()

ClearNotifContent clears the value of the "notif_content" field.

func (*AccountNotifsMutation) ClearNotifTime

func (m *AccountNotifsMutation) ClearNotifTime()

ClearNotifTime clears the value of the "notif_time" field.

func (*AccountNotifsMutation) ClearNotifTitle

func (m *AccountNotifsMutation) ClearNotifTitle()

ClearNotifTitle clears the value of the "notif_title" field.

func (*AccountNotifsMutation) ClearUsername

func (m *AccountNotifsMutation) ClearUsername()

ClearUsername clears the value of the "username" field.

func (*AccountNotifsMutation) ClearedEdges

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

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

func (*AccountNotifsMutation) ClearedFields

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

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

func (AccountNotifsMutation) Client

func (m AccountNotifsMutation) 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 (*AccountNotifsMutation) CreatedAt

func (m *AccountNotifsMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AccountNotifsMutation) EdgeCleared

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

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

func (*AccountNotifsMutation) Field

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

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

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

func (*AccountNotifsMutation) Fields

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

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

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

func (*AccountNotifsMutation) NotifContent

func (m *AccountNotifsMutation) NotifContent() (r string, exists bool)

NotifContent returns the value of the "notif_content" field in the mutation.

func (*AccountNotifsMutation) NotifContentCleared

func (m *AccountNotifsMutation) NotifContentCleared() bool

NotifContentCleared returns if the "notif_content" field was cleared in this mutation.

func (*AccountNotifsMutation) NotifTime

func (m *AccountNotifsMutation) NotifTime() (r time.Time, exists bool)

NotifTime returns the value of the "notif_time" field in the mutation.

func (*AccountNotifsMutation) NotifTimeCleared

func (m *AccountNotifsMutation) NotifTimeCleared() bool

NotifTimeCleared returns if the "notif_time" field was cleared in this mutation.

func (*AccountNotifsMutation) NotifTitle

func (m *AccountNotifsMutation) NotifTitle() (r string, exists bool)

NotifTitle returns the value of the "notif_title" field in the mutation.

func (*AccountNotifsMutation) NotifTitleCleared

func (m *AccountNotifsMutation) NotifTitleCleared() bool

NotifTitleCleared returns if the "notif_title" field was cleared in this mutation.

func (*AccountNotifsMutation) NotifType

func (m *AccountNotifsMutation) NotifType() (r string, exists bool)

NotifType returns the value of the "notif_type" field in the mutation.

func (*AccountNotifsMutation) OldAccountID

func (m *AccountNotifsMutation) OldAccountID(ctx context.Context) (v *int64, err error)

OldAccountID returns the old "account_id" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldCreatedAt

func (m *AccountNotifsMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldField

func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) OldNotifContent

func (m *AccountNotifsMutation) OldNotifContent(ctx context.Context) (v string, err error)

OldNotifContent returns the old "notif_content" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldNotifTime

func (m *AccountNotifsMutation) OldNotifTime(ctx context.Context) (v *time.Time, err error)

OldNotifTime returns the old "notif_time" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldNotifTitle

func (m *AccountNotifsMutation) OldNotifTitle(ctx context.Context) (v string, err error)

OldNotifTitle returns the old "notif_title" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldNotifType

func (m *AccountNotifsMutation) OldNotifType(ctx context.Context) (v string, err error)

OldNotifType returns the old "notif_type" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) OldUsername

func (m *AccountNotifsMutation) OldUsername(ctx context.Context) (v *string, err error)

OldUsername returns the old "username" field's value of the AccountNotifs entity. If the AccountNotifs 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 (*AccountNotifsMutation) Op

func (m *AccountNotifsMutation) Op() Op

Op returns the operation name.

func (*AccountNotifsMutation) RemovedEdges

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

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

func (*AccountNotifsMutation) RemovedIDs

func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) ResetAccountID

func (m *AccountNotifsMutation) ResetAccountID()

ResetAccountID resets all changes to the "account_id" field.

func (*AccountNotifsMutation) ResetCreatedAt

func (m *AccountNotifsMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AccountNotifsMutation) ResetEdge

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

func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) ResetNotifContent

func (m *AccountNotifsMutation) ResetNotifContent()

ResetNotifContent resets all changes to the "notif_content" field.

func (*AccountNotifsMutation) ResetNotifTime

func (m *AccountNotifsMutation) ResetNotifTime()

ResetNotifTime resets all changes to the "notif_time" field.

func (*AccountNotifsMutation) ResetNotifTitle

func (m *AccountNotifsMutation) ResetNotifTitle()

ResetNotifTitle resets all changes to the "notif_title" field.

func (*AccountNotifsMutation) ResetNotifType

func (m *AccountNotifsMutation) ResetNotifType()

ResetNotifType resets all changes to the "notif_type" field.

func (*AccountNotifsMutation) ResetUsername

func (m *AccountNotifsMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*AccountNotifsMutation) SetAccountID

func (m *AccountNotifsMutation) SetAccountID(i int64)

SetAccountID sets the "account_id" field.

func (*AccountNotifsMutation) SetCreatedAt

func (m *AccountNotifsMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AccountNotifsMutation) SetField

func (m *AccountNotifsMutation) 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 (*AccountNotifsMutation) SetID

func (m *AccountNotifsMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of AccountNotifs entities.

func (*AccountNotifsMutation) SetNotifContent

func (m *AccountNotifsMutation) SetNotifContent(s string)

SetNotifContent sets the "notif_content" field.

func (*AccountNotifsMutation) SetNotifTime

func (m *AccountNotifsMutation) SetNotifTime(t time.Time)

SetNotifTime sets the "notif_time" field.

func (*AccountNotifsMutation) SetNotifTitle

func (m *AccountNotifsMutation) SetNotifTitle(s string)

SetNotifTitle sets the "notif_title" field.

func (*AccountNotifsMutation) SetNotifType

func (m *AccountNotifsMutation) SetNotifType(s string)

SetNotifType sets the "notif_type" field.

func (*AccountNotifsMutation) SetUsername

func (m *AccountNotifsMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (AccountNotifsMutation) Tx

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

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

func (*AccountNotifsMutation) Type

func (m *AccountNotifsMutation) Type() string

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

func (*AccountNotifsMutation) Username

func (m *AccountNotifsMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*AccountNotifsMutation) UsernameCleared

func (m *AccountNotifsMutation) UsernameCleared() bool

UsernameCleared returns if the "username" field was cleared in this mutation.

func (*AccountNotifsMutation) Where

Where appends a list predicates to the AccountNotifsMutation builder.

type AccountNotifsQuery

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

AccountNotifsQuery is the builder for querying AccountNotifs entities.

func (*AccountNotifsQuery) Aggregate

func (anq *AccountNotifsQuery) Aggregate(fns ...AggregateFunc) *AccountNotifsSelect

Aggregate returns a AccountNotifsSelect configured with the given aggregations.

func (*AccountNotifsQuery) All

All executes the query and returns a list of AccountNotifsSlice.

func (*AccountNotifsQuery) AllX

func (anq *AccountNotifsQuery) AllX(ctx context.Context) []*AccountNotifs

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

func (*AccountNotifsQuery) Clone

func (anq *AccountNotifsQuery) Clone() *AccountNotifsQuery

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

func (*AccountNotifsQuery) Count

func (anq *AccountNotifsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AccountNotifsQuery) CountX

func (anq *AccountNotifsQuery) CountX(ctx context.Context) int

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

func (*AccountNotifsQuery) Exist

func (anq *AccountNotifsQuery) Exist(ctx context.Context) (bool, error)

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

func (*AccountNotifsQuery) ExistX

func (anq *AccountNotifsQuery) ExistX(ctx context.Context) bool

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

func (*AccountNotifsQuery) First

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

func (*AccountNotifsQuery) FirstID

func (anq *AccountNotifsQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AccountNotifsQuery) FirstIDX

func (anq *AccountNotifsQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*AccountNotifsQuery) FirstX

func (anq *AccountNotifsQuery) FirstX(ctx context.Context) *AccountNotifs

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

func (*AccountNotifsQuery) GroupBy

func (anq *AccountNotifsQuery) GroupBy(field string, fields ...string) *AccountNotifsGroupBy

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 {
	AccountID int64 `json:"account_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AccountNotifs.Query().
	GroupBy(accountnotifs.FieldAccountID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AccountNotifsQuery) IDs

func (anq *AccountNotifsQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*AccountNotifsQuery) IDsX

func (anq *AccountNotifsQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*AccountNotifsQuery) Limit

func (anq *AccountNotifsQuery) Limit(limit int) *AccountNotifsQuery

Limit adds a limit step to the query.

func (*AccountNotifsQuery) Offset

func (anq *AccountNotifsQuery) Offset(offset int) *AccountNotifsQuery

Offset adds an offset step to the query.

func (*AccountNotifsQuery) Only

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

func (*AccountNotifsQuery) OnlyID

func (anq *AccountNotifsQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AccountNotifsQuery) OnlyIDX

func (anq *AccountNotifsQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*AccountNotifsQuery) OnlyX

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

func (*AccountNotifsQuery) Order

Order adds an order step to the query.

func (*AccountNotifsQuery) Select

func (anq *AccountNotifsQuery) Select(fields ...string) *AccountNotifsSelect

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 {
	AccountID int64 `json:"account_id,omitempty"`
}

client.AccountNotifs.Query().
	Select(accountnotifs.FieldAccountID).
	Scan(ctx, &v)

func (*AccountNotifsQuery) Unique

func (anq *AccountNotifsQuery) Unique(unique bool) *AccountNotifsQuery

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

Where adds a new predicate for the AccountNotifsQuery builder.

type AccountNotifsSelect

type AccountNotifsSelect struct {
	*AccountNotifsQuery
	// contains filtered or unexported fields
}

AccountNotifsSelect is the builder for selecting fields of AccountNotifs entities.

func (*AccountNotifsSelect) Aggregate

func (ans *AccountNotifsSelect) Aggregate(fns ...AggregateFunc) *AccountNotifsSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AccountNotifsSelect) Bool

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

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

func (*AccountNotifsSelect) BoolX

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

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

func (*AccountNotifsSelect) Bools

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

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

func (*AccountNotifsSelect) BoolsX

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

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

func (*AccountNotifsSelect) Float64

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

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

func (*AccountNotifsSelect) Float64X

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

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

func (*AccountNotifsSelect) Float64s

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

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

func (*AccountNotifsSelect) Float64sX

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

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

func (*AccountNotifsSelect) Int

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

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

func (*AccountNotifsSelect) IntX

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

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

func (*AccountNotifsSelect) Ints

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

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

func (*AccountNotifsSelect) IntsX

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

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

func (*AccountNotifsSelect) Scan

func (ans *AccountNotifsSelect) Scan(ctx context.Context, v any) error

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

func (*AccountNotifsSelect) ScanX

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

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

func (*AccountNotifsSelect) String

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

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

func (*AccountNotifsSelect) StringX

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

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

func (*AccountNotifsSelect) Strings

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

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

func (*AccountNotifsSelect) StringsX

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

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

type AccountNotifsSlice

type AccountNotifsSlice []*AccountNotifs

AccountNotifsSlice is a parsable slice of AccountNotifs.

type AccountNotifsUpdate

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

AccountNotifsUpdate is the builder for updating AccountNotifs entities.

func (*AccountNotifsUpdate) AddAccountID

func (anu *AccountNotifsUpdate) AddAccountID(i int64) *AccountNotifsUpdate

AddAccountID adds i to the "account_id" field.

func (*AccountNotifsUpdate) ClearAccountID

func (anu *AccountNotifsUpdate) ClearAccountID() *AccountNotifsUpdate

ClearAccountID clears the value of the "account_id" field.

func (*AccountNotifsUpdate) ClearNotifContent

func (anu *AccountNotifsUpdate) ClearNotifContent() *AccountNotifsUpdate

ClearNotifContent clears the value of the "notif_content" field.

func (*AccountNotifsUpdate) ClearNotifTime

func (anu *AccountNotifsUpdate) ClearNotifTime() *AccountNotifsUpdate

ClearNotifTime clears the value of the "notif_time" field.

func (*AccountNotifsUpdate) ClearNotifTitle

func (anu *AccountNotifsUpdate) ClearNotifTitle() *AccountNotifsUpdate

ClearNotifTitle clears the value of the "notif_title" field.

func (*AccountNotifsUpdate) ClearUsername

func (anu *AccountNotifsUpdate) ClearUsername() *AccountNotifsUpdate

ClearUsername clears the value of the "username" field.

func (*AccountNotifsUpdate) Exec

func (anu *AccountNotifsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountNotifsUpdate) ExecX

func (anu *AccountNotifsUpdate) ExecX(ctx context.Context)

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

func (*AccountNotifsUpdate) Mutation

func (anu *AccountNotifsUpdate) Mutation() *AccountNotifsMutation

Mutation returns the AccountNotifsMutation object of the builder.

func (*AccountNotifsUpdate) Save

func (anu *AccountNotifsUpdate) Save(ctx context.Context) (int, error)

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

func (*AccountNotifsUpdate) SaveX

func (anu *AccountNotifsUpdate) SaveX(ctx context.Context) int

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

func (*AccountNotifsUpdate) SetAccountID

func (anu *AccountNotifsUpdate) SetAccountID(i int64) *AccountNotifsUpdate

SetAccountID sets the "account_id" field.

func (*AccountNotifsUpdate) SetCreatedAt

func (anu *AccountNotifsUpdate) SetCreatedAt(t time.Time) *AccountNotifsUpdate

SetCreatedAt sets the "created_at" field.

func (*AccountNotifsUpdate) SetNillableAccountID

func (anu *AccountNotifsUpdate) SetNillableAccountID(i *int64) *AccountNotifsUpdate

SetNillableAccountID sets the "account_id" field if the given value is not nil.

func (*AccountNotifsUpdate) SetNillableCreatedAt

func (anu *AccountNotifsUpdate) SetNillableCreatedAt(t *time.Time) *AccountNotifsUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AccountNotifsUpdate) SetNillableNotifContent

func (anu *AccountNotifsUpdate) SetNillableNotifContent(s *string) *AccountNotifsUpdate

SetNillableNotifContent sets the "notif_content" field if the given value is not nil.

func (*AccountNotifsUpdate) SetNillableNotifTime

func (anu *AccountNotifsUpdate) SetNillableNotifTime(t *time.Time) *AccountNotifsUpdate

SetNillableNotifTime sets the "notif_time" field if the given value is not nil.

func (*AccountNotifsUpdate) SetNillableNotifTitle

func (anu *AccountNotifsUpdate) SetNillableNotifTitle(s *string) *AccountNotifsUpdate

SetNillableNotifTitle sets the "notif_title" field if the given value is not nil.

func (*AccountNotifsUpdate) SetNillableUsername

func (anu *AccountNotifsUpdate) SetNillableUsername(s *string) *AccountNotifsUpdate

SetNillableUsername sets the "username" field if the given value is not nil.

func (*AccountNotifsUpdate) SetNotifContent

func (anu *AccountNotifsUpdate) SetNotifContent(s string) *AccountNotifsUpdate

SetNotifContent sets the "notif_content" field.

func (*AccountNotifsUpdate) SetNotifTime

func (anu *AccountNotifsUpdate) SetNotifTime(t time.Time) *AccountNotifsUpdate

SetNotifTime sets the "notif_time" field.

func (*AccountNotifsUpdate) SetNotifTitle

func (anu *AccountNotifsUpdate) SetNotifTitle(s string) *AccountNotifsUpdate

SetNotifTitle sets the "notif_title" field.

func (*AccountNotifsUpdate) SetNotifType

func (anu *AccountNotifsUpdate) SetNotifType(s string) *AccountNotifsUpdate

SetNotifType sets the "notif_type" field.

func (*AccountNotifsUpdate) SetUsername

func (anu *AccountNotifsUpdate) SetUsername(s string) *AccountNotifsUpdate

SetUsername sets the "username" field.

func (*AccountNotifsUpdate) Where

Where appends a list predicates to the AccountNotifsUpdate builder.

type AccountNotifsUpdateOne

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

AccountNotifsUpdateOne is the builder for updating a single AccountNotifs entity.

func (*AccountNotifsUpdateOne) AddAccountID

func (anuo *AccountNotifsUpdateOne) AddAccountID(i int64) *AccountNotifsUpdateOne

AddAccountID adds i to the "account_id" field.

func (*AccountNotifsUpdateOne) ClearAccountID

func (anuo *AccountNotifsUpdateOne) ClearAccountID() *AccountNotifsUpdateOne

ClearAccountID clears the value of the "account_id" field.

func (*AccountNotifsUpdateOne) ClearNotifContent

func (anuo *AccountNotifsUpdateOne) ClearNotifContent() *AccountNotifsUpdateOne

ClearNotifContent clears the value of the "notif_content" field.

func (*AccountNotifsUpdateOne) ClearNotifTime

func (anuo *AccountNotifsUpdateOne) ClearNotifTime() *AccountNotifsUpdateOne

ClearNotifTime clears the value of the "notif_time" field.

func (*AccountNotifsUpdateOne) ClearNotifTitle

func (anuo *AccountNotifsUpdateOne) ClearNotifTitle() *AccountNotifsUpdateOne

ClearNotifTitle clears the value of the "notif_title" field.

func (*AccountNotifsUpdateOne) ClearUsername

func (anuo *AccountNotifsUpdateOne) ClearUsername() *AccountNotifsUpdateOne

ClearUsername clears the value of the "username" field.

func (*AccountNotifsUpdateOne) Exec

func (anuo *AccountNotifsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AccountNotifsUpdateOne) ExecX

func (anuo *AccountNotifsUpdateOne) ExecX(ctx context.Context)

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

func (*AccountNotifsUpdateOne) Mutation

Mutation returns the AccountNotifsMutation object of the builder.

func (*AccountNotifsUpdateOne) Save

Save executes the query and returns the updated AccountNotifs entity.

func (*AccountNotifsUpdateOne) SaveX

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

func (*AccountNotifsUpdateOne) Select

func (anuo *AccountNotifsUpdateOne) Select(field string, fields ...string) *AccountNotifsUpdateOne

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

func (*AccountNotifsUpdateOne) SetAccountID

func (anuo *AccountNotifsUpdateOne) SetAccountID(i int64) *AccountNotifsUpdateOne

SetAccountID sets the "account_id" field.

func (*AccountNotifsUpdateOne) SetCreatedAt

func (anuo *AccountNotifsUpdateOne) SetCreatedAt(t time.Time) *AccountNotifsUpdateOne

SetCreatedAt sets the "created_at" field.

func (*AccountNotifsUpdateOne) SetNillableAccountID

func (anuo *AccountNotifsUpdateOne) SetNillableAccountID(i *int64) *AccountNotifsUpdateOne

SetNillableAccountID sets the "account_id" field if the given value is not nil.

func (*AccountNotifsUpdateOne) SetNillableCreatedAt

func (anuo *AccountNotifsUpdateOne) SetNillableCreatedAt(t *time.Time) *AccountNotifsUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AccountNotifsUpdateOne) SetNillableNotifContent

func (anuo *AccountNotifsUpdateOne) SetNillableNotifContent(s *string) *AccountNotifsUpdateOne

SetNillableNotifContent sets the "notif_content" field if the given value is not nil.

func (*AccountNotifsUpdateOne) SetNillableNotifTime

func (anuo *AccountNotifsUpdateOne) SetNillableNotifTime(t *time.Time) *AccountNotifsUpdateOne

SetNillableNotifTime sets the "notif_time" field if the given value is not nil.

func (*AccountNotifsUpdateOne) SetNillableNotifTitle

func (anuo *AccountNotifsUpdateOne) SetNillableNotifTitle(s *string) *AccountNotifsUpdateOne

SetNillableNotifTitle sets the "notif_title" field if the given value is not nil.

func (*AccountNotifsUpdateOne) SetNillableUsername

func (anuo *AccountNotifsUpdateOne) SetNillableUsername(s *string) *AccountNotifsUpdateOne

SetNillableUsername sets the "username" field if the given value is not nil.

func (*AccountNotifsUpdateOne) SetNotifContent

func (anuo *AccountNotifsUpdateOne) SetNotifContent(s string) *AccountNotifsUpdateOne

SetNotifContent sets the "notif_content" field.

func (*AccountNotifsUpdateOne) SetNotifTime

func (anuo *AccountNotifsUpdateOne) SetNotifTime(t time.Time) *AccountNotifsUpdateOne

SetNotifTime sets the "notif_time" field.

func (*AccountNotifsUpdateOne) SetNotifTitle

func (anuo *AccountNotifsUpdateOne) SetNotifTitle(s string) *AccountNotifsUpdateOne

SetNotifTitle sets the "notif_title" field.

func (*AccountNotifsUpdateOne) SetNotifType

func (anuo *AccountNotifsUpdateOne) SetNotifType(s string) *AccountNotifsUpdateOne

SetNotifType sets the "notif_type" field.

func (*AccountNotifsUpdateOne) SetUsername

SetUsername sets the "username" field.

type AccountQuery

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

AccountQuery is the builder for querying Account entities.

func (*AccountQuery) Aggregate

func (aq *AccountQuery) Aggregate(fns ...AggregateFunc) *AccountSelect

Aggregate returns a AccountSelect configured with the given aggregations.

func (*AccountQuery) All

func (aq *AccountQuery) All(ctx context.Context) ([]*Account, error)

All executes the query and returns a list of Accounts.

func (*AccountQuery) AllX

func (aq *AccountQuery) AllX(ctx context.Context) []*Account

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

func (*AccountQuery) Clone

func (aq *AccountQuery) Clone() *AccountQuery

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

func (*AccountQuery) Count

func (aq *AccountQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AccountQuery) CountX

func (aq *AccountQuery) CountX(ctx context.Context) int

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

func (*AccountQuery) Exist

func (aq *AccountQuery) Exist(ctx context.Context) (bool, error)

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

func (*AccountQuery) ExistX

func (aq *AccountQuery) ExistX(ctx context.Context) bool

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

func (*AccountQuery) First

func (aq *AccountQuery) First(ctx context.Context) (*Account, error)

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

func (*AccountQuery) FirstID

func (aq *AccountQuery) FirstID(ctx context.Context) (id int64, err error)

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

func (*AccountQuery) FirstIDX

func (aq *AccountQuery) FirstIDX(ctx context.Context) int64

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

func (*AccountQuery) FirstX

func (aq *AccountQuery) FirstX(ctx context.Context) *Account

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

func (*AccountQuery) GroupBy

func (aq *AccountQuery) GroupBy(field string, fields ...string) *AccountGroupBy

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

client.Account.Query().
	GroupBy(account.FieldOwner).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AccountQuery) IDs

func (aq *AccountQuery) IDs(ctx context.Context) ([]int64, error)

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

func (*AccountQuery) IDsX

func (aq *AccountQuery) IDsX(ctx context.Context) []int64

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

func (*AccountQuery) Limit

func (aq *AccountQuery) Limit(limit int) *AccountQuery

Limit adds a limit step to the query.

func (*AccountQuery) Offset

func (aq *AccountQuery) Offset(offset int) *AccountQuery

Offset adds an offset step to the query.

func (*AccountQuery) Only

func (aq *AccountQuery) Only(ctx context.Context) (*Account, error)

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

func (*AccountQuery) OnlyID

func (aq *AccountQuery) OnlyID(ctx context.Context) (id int64, err error)

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

func (*AccountQuery) OnlyIDX

func (aq *AccountQuery) OnlyIDX(ctx context.Context) int64

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

func (*AccountQuery) OnlyX

func (aq *AccountQuery) OnlyX(ctx context.Context) *Account

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

func (*AccountQuery) Order

func (aq *AccountQuery) Order(o ...OrderFunc) *AccountQuery

Order adds an order step to the query.

func (*AccountQuery) Select

func (aq *AccountQuery) Select(fields ...string) *AccountSelect

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

client.Account.Query().
	Select(account.FieldOwner).
	Scan(ctx, &v)

func (*AccountQuery) Unique

func (aq *AccountQuery) Unique(unique bool) *AccountQuery

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

func (aq *AccountQuery) Where(ps ...predicate.Account) *AccountQuery

Where adds a new predicate for the AccountQuery builder.

type AccountSelect

type AccountSelect struct {
	*AccountQuery
	// contains filtered or unexported fields
}

AccountSelect is the builder for selecting fields of Account entities.

func (*AccountSelect) Aggregate

func (as *AccountSelect) Aggregate(fns ...AggregateFunc) *AccountSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AccountSelect) Bool

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

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

func (*AccountSelect) BoolX

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

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

func (*AccountSelect) Bools

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

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

func (*AccountSelect) BoolsX

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

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

func (*AccountSelect) Float64

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

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

func (*AccountSelect) Float64X

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

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

func (*AccountSelect) Float64s

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

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

func (*AccountSelect) Float64sX

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

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

func (*AccountSelect) Int

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

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

func (*AccountSelect) IntX

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

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

func (*AccountSelect) Ints

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

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

func (*AccountSelect) IntsX

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

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

func (*AccountSelect) Scan

func (as *AccountSelect) Scan(ctx context.Context, v any) error

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

func (*AccountSelect) ScanX

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

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

func (*AccountSelect) String

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

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

func (*AccountSelect) StringX

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

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

func (*AccountSelect) Strings

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

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

func (*AccountSelect) StringsX

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

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

type AccountUpdate

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

AccountUpdate is the builder for updating Account entities.

func (*AccountUpdate) AddFollower

func (au *AccountUpdate) AddFollower(i int64) *AccountUpdate

AddFollower adds i to the "follower" field.

func (*AccountUpdate) AddFollowing

func (au *AccountUpdate) AddFollowing(i int64) *AccountUpdate

AddFollowing adds i to the "following" field.

func (*AccountUpdate) ClearPhotoDir

func (au *AccountUpdate) ClearPhotoDir() *AccountUpdate

ClearPhotoDir clears the value of the "photo_dir" field.

func (*AccountUpdate) Exec

func (au *AccountUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AccountUpdate) ExecX

func (au *AccountUpdate) ExecX(ctx context.Context)

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

func (*AccountUpdate) Mutation

func (au *AccountUpdate) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountUpdate) Save

func (au *AccountUpdate) Save(ctx context.Context) (int, error)

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

func (*AccountUpdate) SaveX

func (au *AccountUpdate) SaveX(ctx context.Context) int

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

func (*AccountUpdate) SetCreatedAt

func (au *AccountUpdate) SetCreatedAt(t time.Time) *AccountUpdate

SetCreatedAt sets the "created_at" field.

func (*AccountUpdate) SetFollower

func (au *AccountUpdate) SetFollower(i int64) *AccountUpdate

SetFollower sets the "follower" field.

func (*AccountUpdate) SetFollowing

func (au *AccountUpdate) SetFollowing(i int64) *AccountUpdate

SetFollowing sets the "following" field.

func (*AccountUpdate) SetIsPrivate

func (au *AccountUpdate) SetIsPrivate(b bool) *AccountUpdate

SetIsPrivate sets the "is_private" field.

func (*AccountUpdate) SetNillableCreatedAt

func (au *AccountUpdate) SetNillableCreatedAt(t *time.Time) *AccountUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AccountUpdate) SetNillableFollower

func (au *AccountUpdate) SetNillableFollower(i *int64) *AccountUpdate

SetNillableFollower sets the "follower" field if the given value is not nil.

func (*AccountUpdate) SetNillableFollowing

func (au *AccountUpdate) SetNillableFollowing(i *int64) *AccountUpdate

SetNillableFollowing sets the "following" field if the given value is not nil.

func (*AccountUpdate) SetNillableIsPrivate

func (au *AccountUpdate) SetNillableIsPrivate(b *bool) *AccountUpdate

SetNillableIsPrivate sets the "is_private" field if the given value is not nil.

func (*AccountUpdate) SetNillablePhotoDir

func (au *AccountUpdate) SetNillablePhotoDir(s *string) *AccountUpdate

SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.

func (*AccountUpdate) SetOwner

func (au *AccountUpdate) SetOwner(s string) *AccountUpdate

SetOwner sets the "owner" field.

func (*AccountUpdate) SetPhotoDir

func (au *AccountUpdate) SetPhotoDir(s string) *AccountUpdate

SetPhotoDir sets the "photo_dir" field.

func (*AccountUpdate) Where

func (au *AccountUpdate) Where(ps ...predicate.Account) *AccountUpdate

Where appends a list predicates to the AccountUpdate builder.

type AccountUpdateOne

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

AccountUpdateOne is the builder for updating a single Account entity.

func (*AccountUpdateOne) AddFollower

func (auo *AccountUpdateOne) AddFollower(i int64) *AccountUpdateOne

AddFollower adds i to the "follower" field.

func (*AccountUpdateOne) AddFollowing

func (auo *AccountUpdateOne) AddFollowing(i int64) *AccountUpdateOne

AddFollowing adds i to the "following" field.

func (*AccountUpdateOne) ClearPhotoDir

func (auo *AccountUpdateOne) ClearPhotoDir() *AccountUpdateOne

ClearPhotoDir clears the value of the "photo_dir" field.

func (*AccountUpdateOne) Exec

func (auo *AccountUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AccountUpdateOne) ExecX

func (auo *AccountUpdateOne) ExecX(ctx context.Context)

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

func (*AccountUpdateOne) Mutation

func (auo *AccountUpdateOne) Mutation() *AccountMutation

Mutation returns the AccountMutation object of the builder.

func (*AccountUpdateOne) Save

func (auo *AccountUpdateOne) Save(ctx context.Context) (*Account, error)

Save executes the query and returns the updated Account entity.

func (*AccountUpdateOne) SaveX

func (auo *AccountUpdateOne) SaveX(ctx context.Context) *Account

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

func (*AccountUpdateOne) Select

func (auo *AccountUpdateOne) Select(field string, fields ...string) *AccountUpdateOne

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

func (*AccountUpdateOne) SetCreatedAt

func (auo *AccountUpdateOne) SetCreatedAt(t time.Time) *AccountUpdateOne

SetCreatedAt sets the "created_at" field.

func (*AccountUpdateOne) SetFollower

func (auo *AccountUpdateOne) SetFollower(i int64) *AccountUpdateOne

SetFollower sets the "follower" field.

func (*AccountUpdateOne) SetFollowing

func (auo *AccountUpdateOne) SetFollowing(i int64) *AccountUpdateOne

SetFollowing sets the "following" field.

func (*AccountUpdateOne) SetIsPrivate

func (auo *AccountUpdateOne) SetIsPrivate(b bool) *AccountUpdateOne

SetIsPrivate sets the "is_private" field.

func (*AccountUpdateOne) SetNillableCreatedAt

func (auo *AccountUpdateOne) SetNillableCreatedAt(t *time.Time) *AccountUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AccountUpdateOne) SetNillableFollower

func (auo *AccountUpdateOne) SetNillableFollower(i *int64) *AccountUpdateOne

SetNillableFollower sets the "follower" field if the given value is not nil.

func (*AccountUpdateOne) SetNillableFollowing

func (auo *AccountUpdateOne) SetNillableFollowing(i *int64) *AccountUpdateOne

SetNillableFollowing sets the "following" field if the given value is not nil.

func (*AccountUpdateOne) SetNillableIsPrivate

func (auo *AccountUpdateOne) SetNillableIsPrivate(b *bool) *AccountUpdateOne

SetNillableIsPrivate sets the "is_private" field if the given value is not nil.

func (*AccountUpdateOne) SetNillablePhotoDir

func (auo *AccountUpdateOne) SetNillablePhotoDir(s *string) *AccountUpdateOne

SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.

func (*AccountUpdateOne) SetOwner

func (auo *AccountUpdateOne) SetOwner(s string) *AccountUpdateOne

SetOwner sets the "owner" field.

func (*AccountUpdateOne) SetPhotoDir

func (auo *AccountUpdateOne) SetPhotoDir(s string) *AccountUpdateOne

SetPhotoDir sets the "photo_dir" field.

type Accounts

type Accounts []*Account

Accounts is a parsable slice of Account.

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

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

func Count

func Count() AggregateFunc

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

func Max

func Max(field string) AggregateFunc

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

func Mean

func Mean(field string) AggregateFunc

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

func Min

func Min(field string) AggregateFunc

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

func Sum

func Sum(field string) AggregateFunc

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

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Account is the client for interacting with the Account builders.
	Account *AccountClient
	// AccountNotifs is the client for interacting with the AccountNotifs builders.
	AccountNotifs *AccountNotifsClient
	// LikeFeature is the client for interacting with the LikeFeature builders.
	LikeFeature *LikeFeatureClient
	// Post is the client for interacting with the Post builders.
	Post *PostClient
	// Qoute_retweet_feature is the client for interacting with the Qoute_retweet_feature builders.
	Qoute_retweet_feature *Qoute_retweet_featureClient
	// Retweet_feature is the client for interacting with the Retweet_feature builders.
	Retweet_feature *Retweet_featureClient
	// Tokens is the client for interacting with the Tokens builders.
	Tokens *TokensClient
	// Users is the client for interacting with the Users builders.
	Users *UsersClient
	// 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().
	Account.
	Query().
	Count(ctx)

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

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

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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

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

type Committer

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

Committer is the interface that wraps the Commit method.

type ConstraintError

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

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

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Hook

type Hook = ent.Hook

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

type LikeFeature

type LikeFeature struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// FromAccountID holds the value of the "from_account_id" field.
	FromAccountID int64 `json:"from_account_id,omitempty"`
	// IsLike holds the value of the "is_like" field.
	IsLike bool `json:"is_like,omitempty"`
	// PostID holds the value of the "post_id" field.
	PostID uuid.UUID `json:"post_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

LikeFeature is the model entity for the LikeFeature schema.

func (*LikeFeature) String

func (lf *LikeFeature) String() string

String implements the fmt.Stringer.

func (*LikeFeature) Unwrap

func (lf *LikeFeature) Unwrap() *LikeFeature

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

func (lf *LikeFeature) Update() *LikeFeatureUpdateOne

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

type LikeFeatureClient

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

LikeFeatureClient is a client for the LikeFeature schema.

func NewLikeFeatureClient

func NewLikeFeatureClient(c config) *LikeFeatureClient

NewLikeFeatureClient returns a client for the LikeFeature from the given config.

func (*LikeFeatureClient) Create

func (c *LikeFeatureClient) Create() *LikeFeatureCreate

Create returns a builder for creating a LikeFeature entity.

func (*LikeFeatureClient) CreateBulk

func (c *LikeFeatureClient) CreateBulk(builders ...*LikeFeatureCreate) *LikeFeatureCreateBulk

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

func (*LikeFeatureClient) Delete

func (c *LikeFeatureClient) Delete() *LikeFeatureDelete

Delete returns a delete builder for LikeFeature.

func (*LikeFeatureClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*LikeFeatureClient) DeleteOneID

func (c *LikeFeatureClient) DeleteOneID(id int) *LikeFeatureDeleteOne

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

func (*LikeFeatureClient) Get

func (c *LikeFeatureClient) Get(ctx context.Context, id int) (*LikeFeature, error)

Get returns a LikeFeature entity by its id.

func (*LikeFeatureClient) GetX

func (c *LikeFeatureClient) GetX(ctx context.Context, id int) *LikeFeature

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

func (*LikeFeatureClient) Hooks

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

Hooks returns the client hooks.

func (*LikeFeatureClient) Query

func (c *LikeFeatureClient) Query() *LikeFeatureQuery

Query returns a query builder for LikeFeature.

func (*LikeFeatureClient) Update

func (c *LikeFeatureClient) Update() *LikeFeatureUpdate

Update returns an update builder for LikeFeature.

func (*LikeFeatureClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*LikeFeatureClient) UpdateOneID

func (c *LikeFeatureClient) UpdateOneID(id int) *LikeFeatureUpdateOne

UpdateOneID returns an update builder for the given id.

func (*LikeFeatureClient) Use

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

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

type LikeFeatureCreate

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

LikeFeatureCreate is the builder for creating a LikeFeature entity.

func (*LikeFeatureCreate) Exec

func (lfc *LikeFeatureCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*LikeFeatureCreate) ExecX

func (lfc *LikeFeatureCreate) ExecX(ctx context.Context)

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

func (*LikeFeatureCreate) Mutation

func (lfc *LikeFeatureCreate) Mutation() *LikeFeatureMutation

Mutation returns the LikeFeatureMutation object of the builder.

func (*LikeFeatureCreate) Save

func (lfc *LikeFeatureCreate) Save(ctx context.Context) (*LikeFeature, error)

Save creates the LikeFeature in the database.

func (*LikeFeatureCreate) SaveX

func (lfc *LikeFeatureCreate) SaveX(ctx context.Context) *LikeFeature

SaveX calls Save and panics if Save returns an error.

func (*LikeFeatureCreate) SetCreatedAt

func (lfc *LikeFeatureCreate) SetCreatedAt(t time.Time) *LikeFeatureCreate

SetCreatedAt sets the "created_at" field.

func (*LikeFeatureCreate) SetFromAccountID

func (lfc *LikeFeatureCreate) SetFromAccountID(i int64) *LikeFeatureCreate

SetFromAccountID sets the "from_account_id" field.

func (*LikeFeatureCreate) SetIsLike

func (lfc *LikeFeatureCreate) SetIsLike(b bool) *LikeFeatureCreate

SetIsLike sets the "is_like" field.

func (*LikeFeatureCreate) SetNillableCreatedAt

func (lfc *LikeFeatureCreate) SetNillableCreatedAt(t *time.Time) *LikeFeatureCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*LikeFeatureCreate) SetNillableIsLike

func (lfc *LikeFeatureCreate) SetNillableIsLike(b *bool) *LikeFeatureCreate

SetNillableIsLike sets the "is_like" field if the given value is not nil.

func (*LikeFeatureCreate) SetPostID

func (lfc *LikeFeatureCreate) SetPostID(u uuid.UUID) *LikeFeatureCreate

SetPostID sets the "post_id" field.

type LikeFeatureCreateBulk

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

LikeFeatureCreateBulk is the builder for creating many LikeFeature entities in bulk.

func (*LikeFeatureCreateBulk) Exec

func (lfcb *LikeFeatureCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*LikeFeatureCreateBulk) ExecX

func (lfcb *LikeFeatureCreateBulk) ExecX(ctx context.Context)

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

func (*LikeFeatureCreateBulk) Save

func (lfcb *LikeFeatureCreateBulk) Save(ctx context.Context) ([]*LikeFeature, error)

Save creates the LikeFeature entities in the database.

func (*LikeFeatureCreateBulk) SaveX

func (lfcb *LikeFeatureCreateBulk) SaveX(ctx context.Context) []*LikeFeature

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

type LikeFeatureDelete

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

LikeFeatureDelete is the builder for deleting a LikeFeature entity.

func (*LikeFeatureDelete) Exec

func (lfd *LikeFeatureDelete) Exec(ctx context.Context) (int, error)

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

func (*LikeFeatureDelete) ExecX

func (lfd *LikeFeatureDelete) ExecX(ctx context.Context) int

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

func (*LikeFeatureDelete) Where

Where appends a list predicates to the LikeFeatureDelete builder.

type LikeFeatureDeleteOne

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

LikeFeatureDeleteOne is the builder for deleting a single LikeFeature entity.

func (*LikeFeatureDeleteOne) Exec

func (lfdo *LikeFeatureDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*LikeFeatureDeleteOne) ExecX

func (lfdo *LikeFeatureDeleteOne) ExecX(ctx context.Context)

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

type LikeFeatureGroupBy

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

LikeFeatureGroupBy is the group-by builder for LikeFeature entities.

func (*LikeFeatureGroupBy) Aggregate

func (lfgb *LikeFeatureGroupBy) Aggregate(fns ...AggregateFunc) *LikeFeatureGroupBy

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

func (*LikeFeatureGroupBy) Bool

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

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

func (*LikeFeatureGroupBy) BoolX

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

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

func (*LikeFeatureGroupBy) Bools

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

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

func (*LikeFeatureGroupBy) BoolsX

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

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

func (*LikeFeatureGroupBy) Float64

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

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

func (*LikeFeatureGroupBy) Float64X

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

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

func (*LikeFeatureGroupBy) Float64s

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

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

func (*LikeFeatureGroupBy) Float64sX

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

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

func (*LikeFeatureGroupBy) Int

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

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

func (*LikeFeatureGroupBy) IntX

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

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

func (*LikeFeatureGroupBy) Ints

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

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

func (*LikeFeatureGroupBy) IntsX

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

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

func (*LikeFeatureGroupBy) Scan

func (lfgb *LikeFeatureGroupBy) Scan(ctx context.Context, v any) error

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

func (*LikeFeatureGroupBy) ScanX

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

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

func (*LikeFeatureGroupBy) String

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

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

func (*LikeFeatureGroupBy) StringX

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

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

func (*LikeFeatureGroupBy) Strings

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

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

func (*LikeFeatureGroupBy) StringsX

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

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

type LikeFeatureMutation

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

LikeFeatureMutation represents an operation that mutates the LikeFeature nodes in the graph.

func (*LikeFeatureMutation) AddField

func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) AddFromAccountID

func (m *LikeFeatureMutation) AddFromAccountID(i int64)

AddFromAccountID adds i to the "from_account_id" field.

func (*LikeFeatureMutation) AddedEdges

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

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

func (*LikeFeatureMutation) AddedField

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

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

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

func (*LikeFeatureMutation) AddedFromAccountID

func (m *LikeFeatureMutation) AddedFromAccountID() (r int64, exists bool)

AddedFromAccountID returns the value that was added to the "from_account_id" field in this mutation.

func (*LikeFeatureMutation) AddedIDs

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

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

func (*LikeFeatureMutation) ClearEdge

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

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

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

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

func (*LikeFeatureMutation) ClearedFields

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

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

func (LikeFeatureMutation) Client

func (m LikeFeatureMutation) 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 (*LikeFeatureMutation) CreatedAt

func (m *LikeFeatureMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*LikeFeatureMutation) EdgeCleared

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

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

func (*LikeFeatureMutation) Field

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

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

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

func (*LikeFeatureMutation) Fields

func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) FromAccountID

func (m *LikeFeatureMutation) FromAccountID() (r int64, exists bool)

FromAccountID returns the value of the "from_account_id" field in the mutation.

func (*LikeFeatureMutation) ID

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

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

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

func (*LikeFeatureMutation) IsLike

func (m *LikeFeatureMutation) IsLike() (r bool, exists bool)

IsLike returns the value of the "is_like" field in the mutation.

func (*LikeFeatureMutation) OldCreatedAt

func (m *LikeFeatureMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the LikeFeature entity. If the LikeFeature 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 (*LikeFeatureMutation) OldField

func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) OldFromAccountID

func (m *LikeFeatureMutation) OldFromAccountID(ctx context.Context) (v int64, err error)

OldFromAccountID returns the old "from_account_id" field's value of the LikeFeature entity. If the LikeFeature 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 (*LikeFeatureMutation) OldIsLike

func (m *LikeFeatureMutation) OldIsLike(ctx context.Context) (v bool, err error)

OldIsLike returns the old "is_like" field's value of the LikeFeature entity. If the LikeFeature 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 (*LikeFeatureMutation) OldPostID

func (m *LikeFeatureMutation) OldPostID(ctx context.Context) (v uuid.UUID, err error)

OldPostID returns the old "post_id" field's value of the LikeFeature entity. If the LikeFeature 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 (*LikeFeatureMutation) Op

func (m *LikeFeatureMutation) Op() Op

Op returns the operation name.

func (*LikeFeatureMutation) PostID

func (m *LikeFeatureMutation) PostID() (r uuid.UUID, exists bool)

PostID returns the value of the "post_id" field in the mutation.

func (*LikeFeatureMutation) RemovedEdges

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

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

func (*LikeFeatureMutation) RemovedIDs

func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) ResetCreatedAt

func (m *LikeFeatureMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*LikeFeatureMutation) ResetEdge

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

func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) ResetFromAccountID

func (m *LikeFeatureMutation) ResetFromAccountID()

ResetFromAccountID resets all changes to the "from_account_id" field.

func (*LikeFeatureMutation) ResetIsLike

func (m *LikeFeatureMutation) ResetIsLike()

ResetIsLike resets all changes to the "is_like" field.

func (*LikeFeatureMutation) ResetPostID

func (m *LikeFeatureMutation) ResetPostID()

ResetPostID resets all changes to the "post_id" field.

func (*LikeFeatureMutation) SetCreatedAt

func (m *LikeFeatureMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*LikeFeatureMutation) SetField

func (m *LikeFeatureMutation) 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 (*LikeFeatureMutation) SetFromAccountID

func (m *LikeFeatureMutation) SetFromAccountID(i int64)

SetFromAccountID sets the "from_account_id" field.

func (*LikeFeatureMutation) SetIsLike

func (m *LikeFeatureMutation) SetIsLike(b bool)

SetIsLike sets the "is_like" field.

func (*LikeFeatureMutation) SetPostID

func (m *LikeFeatureMutation) SetPostID(u uuid.UUID)

SetPostID sets the "post_id" field.

func (LikeFeatureMutation) Tx

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

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

func (*LikeFeatureMutation) Type

func (m *LikeFeatureMutation) Type() string

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

func (*LikeFeatureMutation) Where

func (m *LikeFeatureMutation) Where(ps ...predicate.LikeFeature)

Where appends a list predicates to the LikeFeatureMutation builder.

type LikeFeatureQuery

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

LikeFeatureQuery is the builder for querying LikeFeature entities.

func (*LikeFeatureQuery) Aggregate

func (lfq *LikeFeatureQuery) Aggregate(fns ...AggregateFunc) *LikeFeatureSelect

Aggregate returns a LikeFeatureSelect configured with the given aggregations.

func (*LikeFeatureQuery) All

func (lfq *LikeFeatureQuery) All(ctx context.Context) ([]*LikeFeature, error)

All executes the query and returns a list of LikeFeatures.

func (*LikeFeatureQuery) AllX

func (lfq *LikeFeatureQuery) AllX(ctx context.Context) []*LikeFeature

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

func (*LikeFeatureQuery) Clone

func (lfq *LikeFeatureQuery) Clone() *LikeFeatureQuery

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

func (*LikeFeatureQuery) Count

func (lfq *LikeFeatureQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*LikeFeatureQuery) CountX

func (lfq *LikeFeatureQuery) CountX(ctx context.Context) int

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

func (*LikeFeatureQuery) Exist

func (lfq *LikeFeatureQuery) Exist(ctx context.Context) (bool, error)

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

func (*LikeFeatureQuery) ExistX

func (lfq *LikeFeatureQuery) ExistX(ctx context.Context) bool

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

func (*LikeFeatureQuery) First

func (lfq *LikeFeatureQuery) First(ctx context.Context) (*LikeFeature, error)

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

func (*LikeFeatureQuery) FirstID

func (lfq *LikeFeatureQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*LikeFeatureQuery) FirstIDX

func (lfq *LikeFeatureQuery) FirstIDX(ctx context.Context) int

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

func (*LikeFeatureQuery) FirstX

func (lfq *LikeFeatureQuery) FirstX(ctx context.Context) *LikeFeature

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

func (*LikeFeatureQuery) GroupBy

func (lfq *LikeFeatureQuery) GroupBy(field string, fields ...string) *LikeFeatureGroupBy

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 {
	FromAccountID int64 `json:"from_account_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.LikeFeature.Query().
	GroupBy(likefeature.FieldFromAccountID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*LikeFeatureQuery) IDs

func (lfq *LikeFeatureQuery) IDs(ctx context.Context) ([]int, error)

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

func (*LikeFeatureQuery) IDsX

func (lfq *LikeFeatureQuery) IDsX(ctx context.Context) []int

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

func (*LikeFeatureQuery) Limit

func (lfq *LikeFeatureQuery) Limit(limit int) *LikeFeatureQuery

Limit adds a limit step to the query.

func (*LikeFeatureQuery) Offset

func (lfq *LikeFeatureQuery) Offset(offset int) *LikeFeatureQuery

Offset adds an offset step to the query.

func (*LikeFeatureQuery) Only

func (lfq *LikeFeatureQuery) Only(ctx context.Context) (*LikeFeature, error)

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

func (*LikeFeatureQuery) OnlyID

func (lfq *LikeFeatureQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*LikeFeatureQuery) OnlyIDX

func (lfq *LikeFeatureQuery) OnlyIDX(ctx context.Context) int

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

func (*LikeFeatureQuery) OnlyX

func (lfq *LikeFeatureQuery) OnlyX(ctx context.Context) *LikeFeature

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

func (*LikeFeatureQuery) Order

func (lfq *LikeFeatureQuery) Order(o ...OrderFunc) *LikeFeatureQuery

Order adds an order step to the query.

func (*LikeFeatureQuery) Select

func (lfq *LikeFeatureQuery) Select(fields ...string) *LikeFeatureSelect

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 {
	FromAccountID int64 `json:"from_account_id,omitempty"`
}

client.LikeFeature.Query().
	Select(likefeature.FieldFromAccountID).
	Scan(ctx, &v)

func (*LikeFeatureQuery) Unique

func (lfq *LikeFeatureQuery) Unique(unique bool) *LikeFeatureQuery

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

Where adds a new predicate for the LikeFeatureQuery builder.

type LikeFeatureSelect

type LikeFeatureSelect struct {
	*LikeFeatureQuery
	// contains filtered or unexported fields
}

LikeFeatureSelect is the builder for selecting fields of LikeFeature entities.

func (*LikeFeatureSelect) Aggregate

func (lfs *LikeFeatureSelect) Aggregate(fns ...AggregateFunc) *LikeFeatureSelect

Aggregate adds the given aggregation functions to the selector query.

func (*LikeFeatureSelect) Bool

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

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

func (*LikeFeatureSelect) BoolX

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

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

func (*LikeFeatureSelect) Bools

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

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

func (*LikeFeatureSelect) BoolsX

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

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

func (*LikeFeatureSelect) Float64

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

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

func (*LikeFeatureSelect) Float64X

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

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

func (*LikeFeatureSelect) Float64s

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

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

func (*LikeFeatureSelect) Float64sX

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

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

func (*LikeFeatureSelect) Int

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

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

func (*LikeFeatureSelect) IntX

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

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

func (*LikeFeatureSelect) Ints

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

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

func (*LikeFeatureSelect) IntsX

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

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

func (*LikeFeatureSelect) Scan

func (lfs *LikeFeatureSelect) Scan(ctx context.Context, v any) error

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

func (*LikeFeatureSelect) ScanX

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

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

func (*LikeFeatureSelect) String

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

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

func (*LikeFeatureSelect) StringX

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

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

func (*LikeFeatureSelect) Strings

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

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

func (*LikeFeatureSelect) StringsX

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

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

type LikeFeatureUpdate

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

LikeFeatureUpdate is the builder for updating LikeFeature entities.

func (*LikeFeatureUpdate) AddFromAccountID

func (lfu *LikeFeatureUpdate) AddFromAccountID(i int64) *LikeFeatureUpdate

AddFromAccountID adds i to the "from_account_id" field.

func (*LikeFeatureUpdate) Exec

func (lfu *LikeFeatureUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*LikeFeatureUpdate) ExecX

func (lfu *LikeFeatureUpdate) ExecX(ctx context.Context)

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

func (*LikeFeatureUpdate) Mutation

func (lfu *LikeFeatureUpdate) Mutation() *LikeFeatureMutation

Mutation returns the LikeFeatureMutation object of the builder.

func (*LikeFeatureUpdate) Save

func (lfu *LikeFeatureUpdate) Save(ctx context.Context) (int, error)

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

func (*LikeFeatureUpdate) SaveX

func (lfu *LikeFeatureUpdate) SaveX(ctx context.Context) int

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

func (*LikeFeatureUpdate) SetCreatedAt

func (lfu *LikeFeatureUpdate) SetCreatedAt(t time.Time) *LikeFeatureUpdate

SetCreatedAt sets the "created_at" field.

func (*LikeFeatureUpdate) SetFromAccountID

func (lfu *LikeFeatureUpdate) SetFromAccountID(i int64) *LikeFeatureUpdate

SetFromAccountID sets the "from_account_id" field.

func (*LikeFeatureUpdate) SetIsLike

func (lfu *LikeFeatureUpdate) SetIsLike(b bool) *LikeFeatureUpdate

SetIsLike sets the "is_like" field.

func (*LikeFeatureUpdate) SetNillableCreatedAt

func (lfu *LikeFeatureUpdate) SetNillableCreatedAt(t *time.Time) *LikeFeatureUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*LikeFeatureUpdate) SetNillableIsLike

func (lfu *LikeFeatureUpdate) SetNillableIsLike(b *bool) *LikeFeatureUpdate

SetNillableIsLike sets the "is_like" field if the given value is not nil.

func (*LikeFeatureUpdate) SetPostID

func (lfu *LikeFeatureUpdate) SetPostID(u uuid.UUID) *LikeFeatureUpdate

SetPostID sets the "post_id" field.

func (*LikeFeatureUpdate) Where

Where appends a list predicates to the LikeFeatureUpdate builder.

type LikeFeatureUpdateOne

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

LikeFeatureUpdateOne is the builder for updating a single LikeFeature entity.

func (*LikeFeatureUpdateOne) AddFromAccountID

func (lfuo *LikeFeatureUpdateOne) AddFromAccountID(i int64) *LikeFeatureUpdateOne

AddFromAccountID adds i to the "from_account_id" field.

func (*LikeFeatureUpdateOne) Exec

func (lfuo *LikeFeatureUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*LikeFeatureUpdateOne) ExecX

func (lfuo *LikeFeatureUpdateOne) ExecX(ctx context.Context)

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

func (*LikeFeatureUpdateOne) Mutation

func (lfuo *LikeFeatureUpdateOne) Mutation() *LikeFeatureMutation

Mutation returns the LikeFeatureMutation object of the builder.

func (*LikeFeatureUpdateOne) Save

Save executes the query and returns the updated LikeFeature entity.

func (*LikeFeatureUpdateOne) SaveX

func (lfuo *LikeFeatureUpdateOne) SaveX(ctx context.Context) *LikeFeature

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

func (*LikeFeatureUpdateOne) Select

func (lfuo *LikeFeatureUpdateOne) Select(field string, fields ...string) *LikeFeatureUpdateOne

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

func (*LikeFeatureUpdateOne) SetCreatedAt

func (lfuo *LikeFeatureUpdateOne) SetCreatedAt(t time.Time) *LikeFeatureUpdateOne

SetCreatedAt sets the "created_at" field.

func (*LikeFeatureUpdateOne) SetFromAccountID

func (lfuo *LikeFeatureUpdateOne) SetFromAccountID(i int64) *LikeFeatureUpdateOne

SetFromAccountID sets the "from_account_id" field.

func (*LikeFeatureUpdateOne) SetIsLike

func (lfuo *LikeFeatureUpdateOne) SetIsLike(b bool) *LikeFeatureUpdateOne

SetIsLike sets the "is_like" field.

func (*LikeFeatureUpdateOne) SetNillableCreatedAt

func (lfuo *LikeFeatureUpdateOne) SetNillableCreatedAt(t *time.Time) *LikeFeatureUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*LikeFeatureUpdateOne) SetNillableIsLike

func (lfuo *LikeFeatureUpdateOne) SetNillableIsLike(b *bool) *LikeFeatureUpdateOne

SetNillableIsLike sets the "is_like" field if the given value is not nil.

func (*LikeFeatureUpdateOne) SetPostID

func (lfuo *LikeFeatureUpdateOne) SetPostID(u uuid.UUID) *LikeFeatureUpdateOne

SetPostID sets the "post_id" field.

type LikeFeatures

type LikeFeatures []*LikeFeature

LikeFeatures is a parsable slice of LikeFeature.

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

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

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

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

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

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

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

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 Post

type Post struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Owner holds the value of the "owner" field.
	Owner string `json:"owner,omitempty"`
	// IsPrivate holds the value of the "is_private" field.
	IsPrivate bool `json:"is_private,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Follower holds the value of the "follower" field.
	Follower int64 `json:"follower,omitempty"`
	// Following holds the value of the "following" field.
	Following int64 `json:"following,omitempty"`
	// PhotoDir holds the value of the "photo_dir" field.
	PhotoDir string `json:"photo_dir,omitempty"`
	// contains filtered or unexported fields
}

Post is the model entity for the Post schema.

func (*Post) String

func (po *Post) String() string

String implements the fmt.Stringer.

func (*Post) Unwrap

func (po *Post) Unwrap() *Post

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

func (po *Post) Update() *PostUpdateOne

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

type PostClient

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

PostClient is a client for the Post schema.

func NewPostClient

func NewPostClient(c config) *PostClient

NewPostClient returns a client for the Post from the given config.

func (*PostClient) Create

func (c *PostClient) Create() *PostCreate

Create returns a builder for creating a Post entity.

func (*PostClient) CreateBulk

func (c *PostClient) CreateBulk(builders ...*PostCreate) *PostCreateBulk

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

func (*PostClient) Delete

func (c *PostClient) Delete() *PostDelete

Delete returns a delete builder for Post.

func (*PostClient) DeleteOne

func (c *PostClient) DeleteOne(po *Post) *PostDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PostClient) DeleteOneID

func (c *PostClient) DeleteOneID(id uuid.UUID) *PostDeleteOne

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

func (*PostClient) Get

func (c *PostClient) Get(ctx context.Context, id uuid.UUID) (*Post, error)

Get returns a Post entity by its id.

func (*PostClient) GetX

func (c *PostClient) GetX(ctx context.Context, id uuid.UUID) *Post

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

func (*PostClient) Hooks

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

Hooks returns the client hooks.

func (*PostClient) Query

func (c *PostClient) Query() *PostQuery

Query returns a query builder for Post.

func (*PostClient) Update

func (c *PostClient) Update() *PostUpdate

Update returns an update builder for Post.

func (*PostClient) UpdateOne

func (c *PostClient) UpdateOne(po *Post) *PostUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PostClient) UpdateOneID

func (c *PostClient) UpdateOneID(id uuid.UUID) *PostUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PostClient) Use

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

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

type PostCreate

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

PostCreate is the builder for creating a Post entity.

func (*PostCreate) Exec

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

Exec executes the query.

func (*PostCreate) ExecX

func (pc *PostCreate) ExecX(ctx context.Context)

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

func (*PostCreate) Mutation

func (pc *PostCreate) Mutation() *PostMutation

Mutation returns the PostMutation object of the builder.

func (*PostCreate) Save

func (pc *PostCreate) Save(ctx context.Context) (*Post, error)

Save creates the Post in the database.

func (*PostCreate) SaveX

func (pc *PostCreate) SaveX(ctx context.Context) *Post

SaveX calls Save and panics if Save returns an error.

func (*PostCreate) SetCreatedAt

func (pc *PostCreate) SetCreatedAt(t time.Time) *PostCreate

SetCreatedAt sets the "created_at" field.

func (*PostCreate) SetFollower

func (pc *PostCreate) SetFollower(i int64) *PostCreate

SetFollower sets the "follower" field.

func (*PostCreate) SetFollowing

func (pc *PostCreate) SetFollowing(i int64) *PostCreate

SetFollowing sets the "following" field.

func (*PostCreate) SetID

func (pc *PostCreate) SetID(u uuid.UUID) *PostCreate

SetID sets the "id" field.

func (*PostCreate) SetIsPrivate

func (pc *PostCreate) SetIsPrivate(b bool) *PostCreate

SetIsPrivate sets the "is_private" field.

func (*PostCreate) SetNillableCreatedAt

func (pc *PostCreate) SetNillableCreatedAt(t *time.Time) *PostCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PostCreate) SetNillableFollower

func (pc *PostCreate) SetNillableFollower(i *int64) *PostCreate

SetNillableFollower sets the "follower" field if the given value is not nil.

func (*PostCreate) SetNillableFollowing

func (pc *PostCreate) SetNillableFollowing(i *int64) *PostCreate

SetNillableFollowing sets the "following" field if the given value is not nil.

func (*PostCreate) SetNillableID

func (pc *PostCreate) SetNillableID(u *uuid.UUID) *PostCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PostCreate) SetNillableIsPrivate

func (pc *PostCreate) SetNillableIsPrivate(b *bool) *PostCreate

SetNillableIsPrivate sets the "is_private" field if the given value is not nil.

func (*PostCreate) SetNillablePhotoDir

func (pc *PostCreate) SetNillablePhotoDir(s *string) *PostCreate

SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.

func (*PostCreate) SetOwner

func (pc *PostCreate) SetOwner(s string) *PostCreate

SetOwner sets the "owner" field.

func (*PostCreate) SetPhotoDir

func (pc *PostCreate) SetPhotoDir(s string) *PostCreate

SetPhotoDir sets the "photo_dir" field.

type PostCreateBulk

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

PostCreateBulk is the builder for creating many Post entities in bulk.

func (*PostCreateBulk) Exec

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

Exec executes the query.

func (*PostCreateBulk) ExecX

func (pcb *PostCreateBulk) ExecX(ctx context.Context)

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

func (*PostCreateBulk) Save

func (pcb *PostCreateBulk) Save(ctx context.Context) ([]*Post, error)

Save creates the Post entities in the database.

func (*PostCreateBulk) SaveX

func (pcb *PostCreateBulk) SaveX(ctx context.Context) []*Post

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

type PostDelete

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

PostDelete is the builder for deleting a Post entity.

func (*PostDelete) Exec

func (pd *PostDelete) Exec(ctx context.Context) (int, error)

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

func (*PostDelete) ExecX

func (pd *PostDelete) ExecX(ctx context.Context) int

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

func (*PostDelete) Where

func (pd *PostDelete) Where(ps ...predicate.Post) *PostDelete

Where appends a list predicates to the PostDelete builder.

type PostDeleteOne

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

PostDeleteOne is the builder for deleting a single Post entity.

func (*PostDeleteOne) Exec

func (pdo *PostDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PostDeleteOne) ExecX

func (pdo *PostDeleteOne) ExecX(ctx context.Context)

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

type PostGroupBy

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

PostGroupBy is the group-by builder for Post entities.

func (*PostGroupBy) Aggregate

func (pgb *PostGroupBy) Aggregate(fns ...AggregateFunc) *PostGroupBy

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

func (*PostGroupBy) Bool

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

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

func (*PostGroupBy) BoolX

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

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

func (*PostGroupBy) Bools

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

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

func (*PostGroupBy) BoolsX

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

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

func (*PostGroupBy) Float64

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

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

func (*PostGroupBy) Float64X

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

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

func (*PostGroupBy) Float64s

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

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

func (*PostGroupBy) Float64sX

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

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

func (*PostGroupBy) Int

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

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

func (*PostGroupBy) IntX

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

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

func (*PostGroupBy) Ints

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

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

func (*PostGroupBy) IntsX

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

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

func (*PostGroupBy) Scan

func (pgb *PostGroupBy) Scan(ctx context.Context, v any) error

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

func (*PostGroupBy) ScanX

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

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

func (*PostGroupBy) String

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

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

func (*PostGroupBy) StringX

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

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

func (*PostGroupBy) Strings

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

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

func (*PostGroupBy) StringsX

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

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

type PostMutation

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

PostMutation represents an operation that mutates the Post nodes in the graph.

func (*PostMutation) AddField

func (m *PostMutation) 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 (*PostMutation) AddFollower

func (m *PostMutation) AddFollower(i int64)

AddFollower adds i to the "follower" field.

func (*PostMutation) AddFollowing

func (m *PostMutation) AddFollowing(i int64)

AddFollowing adds i to the "following" field.

func (*PostMutation) AddedEdges

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

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

func (*PostMutation) AddedField

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

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

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

func (*PostMutation) AddedFollower

func (m *PostMutation) AddedFollower() (r int64, exists bool)

AddedFollower returns the value that was added to the "follower" field in this mutation.

func (*PostMutation) AddedFollowing

func (m *PostMutation) AddedFollowing() (r int64, exists bool)

AddedFollowing returns the value that was added to the "following" field in this mutation.

func (*PostMutation) AddedIDs

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

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

func (*PostMutation) ClearEdge

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

func (m *PostMutation) 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 (*PostMutation) ClearPhotoDir

func (m *PostMutation) ClearPhotoDir()

ClearPhotoDir clears the value of the "photo_dir" field.

func (*PostMutation) ClearedEdges

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

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

func (*PostMutation) ClearedFields

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

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

func (PostMutation) Client

func (m PostMutation) 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 (*PostMutation) CreatedAt

func (m *PostMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PostMutation) EdgeCleared

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

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

func (*PostMutation) Field

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

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

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

func (*PostMutation) Fields

func (m *PostMutation) 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 (*PostMutation) Follower

func (m *PostMutation) Follower() (r int64, exists bool)

Follower returns the value of the "follower" field in the mutation.

func (*PostMutation) Following

func (m *PostMutation) Following() (r int64, exists bool)

Following returns the value of the "following" field in the mutation.

func (*PostMutation) ID

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

func (m *PostMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*PostMutation) IsPrivate

func (m *PostMutation) IsPrivate() (r bool, exists bool)

IsPrivate returns the value of the "is_private" field in the mutation.

func (*PostMutation) OldCreatedAt

func (m *PostMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Post entity. If the Post 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 (*PostMutation) OldField

func (m *PostMutation) 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 (*PostMutation) OldFollower

func (m *PostMutation) OldFollower(ctx context.Context) (v int64, err error)

OldFollower returns the old "follower" field's value of the Post entity. If the Post 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 (*PostMutation) OldFollowing

func (m *PostMutation) OldFollowing(ctx context.Context) (v int64, err error)

OldFollowing returns the old "following" field's value of the Post entity. If the Post 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 (*PostMutation) OldIsPrivate

func (m *PostMutation) OldIsPrivate(ctx context.Context) (v bool, err error)

OldIsPrivate returns the old "is_private" field's value of the Post entity. If the Post 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 (*PostMutation) OldOwner

func (m *PostMutation) OldOwner(ctx context.Context) (v string, err error)

OldOwner returns the old "owner" field's value of the Post entity. If the Post 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 (*PostMutation) OldPhotoDir

func (m *PostMutation) OldPhotoDir(ctx context.Context) (v string, err error)

OldPhotoDir returns the old "photo_dir" field's value of the Post entity. If the Post 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 (*PostMutation) Op

func (m *PostMutation) Op() Op

Op returns the operation name.

func (*PostMutation) Owner

func (m *PostMutation) Owner() (r string, exists bool)

Owner returns the value of the "owner" field in the mutation.

func (*PostMutation) PhotoDir

func (m *PostMutation) PhotoDir() (r string, exists bool)

PhotoDir returns the value of the "photo_dir" field in the mutation.

func (*PostMutation) PhotoDirCleared

func (m *PostMutation) PhotoDirCleared() bool

PhotoDirCleared returns if the "photo_dir" field was cleared in this mutation.

func (*PostMutation) RemovedEdges

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

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

func (*PostMutation) RemovedIDs

func (m *PostMutation) 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 (*PostMutation) ResetCreatedAt

func (m *PostMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PostMutation) ResetEdge

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

func (m *PostMutation) 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 (*PostMutation) ResetFollower

func (m *PostMutation) ResetFollower()

ResetFollower resets all changes to the "follower" field.

func (*PostMutation) ResetFollowing

func (m *PostMutation) ResetFollowing()

ResetFollowing resets all changes to the "following" field.

func (*PostMutation) ResetIsPrivate

func (m *PostMutation) ResetIsPrivate()

ResetIsPrivate resets all changes to the "is_private" field.

func (*PostMutation) ResetOwner

func (m *PostMutation) ResetOwner()

ResetOwner resets all changes to the "owner" field.

func (*PostMutation) ResetPhotoDir

func (m *PostMutation) ResetPhotoDir()

ResetPhotoDir resets all changes to the "photo_dir" field.

func (*PostMutation) SetCreatedAt

func (m *PostMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PostMutation) SetField

func (m *PostMutation) 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 (*PostMutation) SetFollower

func (m *PostMutation) SetFollower(i int64)

SetFollower sets the "follower" field.

func (*PostMutation) SetFollowing

func (m *PostMutation) SetFollowing(i int64)

SetFollowing sets the "following" field.

func (*PostMutation) SetID

func (m *PostMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Post entities.

func (*PostMutation) SetIsPrivate

func (m *PostMutation) SetIsPrivate(b bool)

SetIsPrivate sets the "is_private" field.

func (*PostMutation) SetOwner

func (m *PostMutation) SetOwner(s string)

SetOwner sets the "owner" field.

func (*PostMutation) SetPhotoDir

func (m *PostMutation) SetPhotoDir(s string)

SetPhotoDir sets the "photo_dir" field.

func (PostMutation) Tx

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

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

func (*PostMutation) Type

func (m *PostMutation) Type() string

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

func (*PostMutation) Where

func (m *PostMutation) Where(ps ...predicate.Post)

Where appends a list predicates to the PostMutation builder.

type PostQuery

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

PostQuery is the builder for querying Post entities.

func (*PostQuery) Aggregate

func (pq *PostQuery) Aggregate(fns ...AggregateFunc) *PostSelect

Aggregate returns a PostSelect configured with the given aggregations.

func (*PostQuery) All

func (pq *PostQuery) All(ctx context.Context) ([]*Post, error)

All executes the query and returns a list of Posts.

func (*PostQuery) AllX

func (pq *PostQuery) AllX(ctx context.Context) []*Post

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

func (*PostQuery) Clone

func (pq *PostQuery) Clone() *PostQuery

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

func (*PostQuery) Count

func (pq *PostQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PostQuery) CountX

func (pq *PostQuery) CountX(ctx context.Context) int

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

func (*PostQuery) Exist

func (pq *PostQuery) Exist(ctx context.Context) (bool, error)

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

func (*PostQuery) ExistX

func (pq *PostQuery) ExistX(ctx context.Context) bool

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

func (*PostQuery) First

func (pq *PostQuery) First(ctx context.Context) (*Post, error)

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

func (*PostQuery) FirstID

func (pq *PostQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*PostQuery) FirstIDX

func (pq *PostQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*PostQuery) FirstX

func (pq *PostQuery) FirstX(ctx context.Context) *Post

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

func (*PostQuery) GroupBy

func (pq *PostQuery) GroupBy(field string, fields ...string) *PostGroupBy

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

client.Post.Query().
	GroupBy(post.FieldOwner).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PostQuery) IDs

func (pq *PostQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*PostQuery) IDsX

func (pq *PostQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*PostQuery) Limit

func (pq *PostQuery) Limit(limit int) *PostQuery

Limit adds a limit step to the query.

func (*PostQuery) Offset

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

Offset adds an offset step to the query.

func (*PostQuery) Only

func (pq *PostQuery) Only(ctx context.Context) (*Post, error)

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

func (*PostQuery) OnlyID

func (pq *PostQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*PostQuery) OnlyIDX

func (pq *PostQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*PostQuery) OnlyX

func (pq *PostQuery) OnlyX(ctx context.Context) *Post

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

func (*PostQuery) Order

func (pq *PostQuery) Order(o ...OrderFunc) *PostQuery

Order adds an order step to the query.

func (*PostQuery) Select

func (pq *PostQuery) Select(fields ...string) *PostSelect

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

client.Post.Query().
	Select(post.FieldOwner).
	Scan(ctx, &v)

func (*PostQuery) Unique

func (pq *PostQuery) Unique(unique bool) *PostQuery

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

func (pq *PostQuery) Where(ps ...predicate.Post) *PostQuery

Where adds a new predicate for the PostQuery builder.

type PostSelect

type PostSelect struct {
	*PostQuery
	// contains filtered or unexported fields
}

PostSelect is the builder for selecting fields of Post entities.

func (*PostSelect) Aggregate

func (ps *PostSelect) Aggregate(fns ...AggregateFunc) *PostSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PostSelect) Bool

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

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

func (*PostSelect) BoolX

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

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

func (*PostSelect) Bools

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

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

func (*PostSelect) BoolsX

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

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

func (*PostSelect) Float64

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

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

func (*PostSelect) Float64X

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

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

func (*PostSelect) Float64s

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

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

func (*PostSelect) Float64sX

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

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

func (*PostSelect) Int

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

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

func (*PostSelect) IntX

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

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

func (*PostSelect) Ints

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

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

func (*PostSelect) IntsX

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

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

func (*PostSelect) Scan

func (ps *PostSelect) Scan(ctx context.Context, v any) error

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

func (*PostSelect) ScanX

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

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

func (*PostSelect) String

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

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

func (*PostSelect) StringX

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

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

func (*PostSelect) Strings

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

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

func (*PostSelect) StringsX

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

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

type PostUpdate

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

PostUpdate is the builder for updating Post entities.

func (*PostUpdate) AddFollower

func (pu *PostUpdate) AddFollower(i int64) *PostUpdate

AddFollower adds i to the "follower" field.

func (*PostUpdate) AddFollowing

func (pu *PostUpdate) AddFollowing(i int64) *PostUpdate

AddFollowing adds i to the "following" field.

func (*PostUpdate) ClearPhotoDir

func (pu *PostUpdate) ClearPhotoDir() *PostUpdate

ClearPhotoDir clears the value of the "photo_dir" field.

func (*PostUpdate) Exec

func (pu *PostUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PostUpdate) ExecX

func (pu *PostUpdate) ExecX(ctx context.Context)

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

func (*PostUpdate) Mutation

func (pu *PostUpdate) Mutation() *PostMutation

Mutation returns the PostMutation object of the builder.

func (*PostUpdate) Save

func (pu *PostUpdate) Save(ctx context.Context) (int, error)

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

func (*PostUpdate) SaveX

func (pu *PostUpdate) SaveX(ctx context.Context) int

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

func (*PostUpdate) SetCreatedAt

func (pu *PostUpdate) SetCreatedAt(t time.Time) *PostUpdate

SetCreatedAt sets the "created_at" field.

func (*PostUpdate) SetFollower

func (pu *PostUpdate) SetFollower(i int64) *PostUpdate

SetFollower sets the "follower" field.

func (*PostUpdate) SetFollowing

func (pu *PostUpdate) SetFollowing(i int64) *PostUpdate

SetFollowing sets the "following" field.

func (*PostUpdate) SetIsPrivate

func (pu *PostUpdate) SetIsPrivate(b bool) *PostUpdate

SetIsPrivate sets the "is_private" field.

func (*PostUpdate) SetNillableCreatedAt

func (pu *PostUpdate) SetNillableCreatedAt(t *time.Time) *PostUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PostUpdate) SetNillableFollower

func (pu *PostUpdate) SetNillableFollower(i *int64) *PostUpdate

SetNillableFollower sets the "follower" field if the given value is not nil.

func (*PostUpdate) SetNillableFollowing

func (pu *PostUpdate) SetNillableFollowing(i *int64) *PostUpdate

SetNillableFollowing sets the "following" field if the given value is not nil.

func (*PostUpdate) SetNillableIsPrivate

func (pu *PostUpdate) SetNillableIsPrivate(b *bool) *PostUpdate

SetNillableIsPrivate sets the "is_private" field if the given value is not nil.

func (*PostUpdate) SetNillablePhotoDir

func (pu *PostUpdate) SetNillablePhotoDir(s *string) *PostUpdate

SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.

func (*PostUpdate) SetOwner

func (pu *PostUpdate) SetOwner(s string) *PostUpdate

SetOwner sets the "owner" field.

func (*PostUpdate) SetPhotoDir

func (pu *PostUpdate) SetPhotoDir(s string) *PostUpdate

SetPhotoDir sets the "photo_dir" field.

func (*PostUpdate) Where

func (pu *PostUpdate) Where(ps ...predicate.Post) *PostUpdate

Where appends a list predicates to the PostUpdate builder.

type PostUpdateOne

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

PostUpdateOne is the builder for updating a single Post entity.

func (*PostUpdateOne) AddFollower

func (puo *PostUpdateOne) AddFollower(i int64) *PostUpdateOne

AddFollower adds i to the "follower" field.

func (*PostUpdateOne) AddFollowing

func (puo *PostUpdateOne) AddFollowing(i int64) *PostUpdateOne

AddFollowing adds i to the "following" field.

func (*PostUpdateOne) ClearPhotoDir

func (puo *PostUpdateOne) ClearPhotoDir() *PostUpdateOne

ClearPhotoDir clears the value of the "photo_dir" field.

func (*PostUpdateOne) Exec

func (puo *PostUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PostUpdateOne) ExecX

func (puo *PostUpdateOne) ExecX(ctx context.Context)

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

func (*PostUpdateOne) Mutation

func (puo *PostUpdateOne) Mutation() *PostMutation

Mutation returns the PostMutation object of the builder.

func (*PostUpdateOne) Save

func (puo *PostUpdateOne) Save(ctx context.Context) (*Post, error)

Save executes the query and returns the updated Post entity.

func (*PostUpdateOne) SaveX

func (puo *PostUpdateOne) SaveX(ctx context.Context) *Post

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

func (*PostUpdateOne) Select

func (puo *PostUpdateOne) Select(field string, fields ...string) *PostUpdateOne

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

func (*PostUpdateOne) SetCreatedAt

func (puo *PostUpdateOne) SetCreatedAt(t time.Time) *PostUpdateOne

SetCreatedAt sets the "created_at" field.

func (*PostUpdateOne) SetFollower

func (puo *PostUpdateOne) SetFollower(i int64) *PostUpdateOne

SetFollower sets the "follower" field.

func (*PostUpdateOne) SetFollowing

func (puo *PostUpdateOne) SetFollowing(i int64) *PostUpdateOne

SetFollowing sets the "following" field.

func (*PostUpdateOne) SetIsPrivate

func (puo *PostUpdateOne) SetIsPrivate(b bool) *PostUpdateOne

SetIsPrivate sets the "is_private" field.

func (*PostUpdateOne) SetNillableCreatedAt

func (puo *PostUpdateOne) SetNillableCreatedAt(t *time.Time) *PostUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PostUpdateOne) SetNillableFollower

func (puo *PostUpdateOne) SetNillableFollower(i *int64) *PostUpdateOne

SetNillableFollower sets the "follower" field if the given value is not nil.

func (*PostUpdateOne) SetNillableFollowing

func (puo *PostUpdateOne) SetNillableFollowing(i *int64) *PostUpdateOne

SetNillableFollowing sets the "following" field if the given value is not nil.

func (*PostUpdateOne) SetNillableIsPrivate

func (puo *PostUpdateOne) SetNillableIsPrivate(b *bool) *PostUpdateOne

SetNillableIsPrivate sets the "is_private" field if the given value is not nil.

func (*PostUpdateOne) SetNillablePhotoDir

func (puo *PostUpdateOne) SetNillablePhotoDir(s *string) *PostUpdateOne

SetNillablePhotoDir sets the "photo_dir" field if the given value is not nil.

func (*PostUpdateOne) SetOwner

func (puo *PostUpdateOne) SetOwner(s string) *PostUpdateOne

SetOwner sets the "owner" field.

func (*PostUpdateOne) SetPhotoDir

func (puo *PostUpdateOne) SetPhotoDir(s string) *PostUpdateOne

SetPhotoDir sets the "photo_dir" field.

type Posts

type Posts []*Post

Posts is a parsable slice of Post.

type QouteRetweetFeatureCreate

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

QouteRetweetFeatureCreate is the builder for creating a Qoute_retweet_feature entity.

func (*QouteRetweetFeatureCreate) Exec

Exec executes the query.

func (*QouteRetweetFeatureCreate) ExecX

func (qrfc *QouteRetweetFeatureCreate) ExecX(ctx context.Context)

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

func (*QouteRetweetFeatureCreate) Mutation

Mutation returns the QouteRetweetFeatureMutation object of the builder.

func (*QouteRetweetFeatureCreate) Save

Save creates the Qoute_retweet_feature in the database.

func (*QouteRetweetFeatureCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*QouteRetweetFeatureCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*QouteRetweetFeatureCreate) SetFromAccountID

func (qrfc *QouteRetweetFeatureCreate) SetFromAccountID(i int64) *QouteRetweetFeatureCreate

SetFromAccountID sets the "from_account_id" field.

func (*QouteRetweetFeatureCreate) SetNillableQouteRetweet

func (qrfc *QouteRetweetFeatureCreate) SetNillableQouteRetweet(b *bool) *QouteRetweetFeatureCreate

SetNillableQouteRetweet sets the "qoute_retweet" field if the given value is not nil.

func (*QouteRetweetFeatureCreate) SetPostID

SetPostID sets the "post_id" field.

func (*QouteRetweetFeatureCreate) SetQoute

SetQoute sets the "qoute" field.

func (*QouteRetweetFeatureCreate) SetQouteRetweet

func (qrfc *QouteRetweetFeatureCreate) SetQouteRetweet(b bool) *QouteRetweetFeatureCreate

SetQouteRetweet sets the "qoute_retweet" field.

type QouteRetweetFeatureCreateBulk

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

QouteRetweetFeatureCreateBulk is the builder for creating many Qoute_retweet_feature entities in bulk.

func (*QouteRetweetFeatureCreateBulk) Exec

Exec executes the query.

func (*QouteRetweetFeatureCreateBulk) ExecX

func (qrfcb *QouteRetweetFeatureCreateBulk) ExecX(ctx context.Context)

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

func (*QouteRetweetFeatureCreateBulk) Save

Save creates the Qoute_retweet_feature entities in the database.

func (*QouteRetweetFeatureCreateBulk) SaveX

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

type QouteRetweetFeatureDelete

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

QouteRetweetFeatureDelete is the builder for deleting a Qoute_retweet_feature entity.

func (*QouteRetweetFeatureDelete) Exec

func (qrfd *QouteRetweetFeatureDelete) Exec(ctx context.Context) (int, error)

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

func (*QouteRetweetFeatureDelete) ExecX

func (qrfd *QouteRetweetFeatureDelete) ExecX(ctx context.Context) int

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

func (*QouteRetweetFeatureDelete) Where

Where appends a list predicates to the QouteRetweetFeatureDelete builder.

type QouteRetweetFeatureDeleteOne

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

QouteRetweetFeatureDeleteOne is the builder for deleting a single Qoute_retweet_feature entity.

func (*QouteRetweetFeatureDeleteOne) Exec

Exec executes the deletion query.

func (*QouteRetweetFeatureDeleteOne) ExecX

func (qrfdo *QouteRetweetFeatureDeleteOne) ExecX(ctx context.Context)

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

type QouteRetweetFeatureGroupBy

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

QouteRetweetFeatureGroupBy is the group-by builder for Qoute_retweet_feature entities.

func (*QouteRetweetFeatureGroupBy) Aggregate

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

func (*QouteRetweetFeatureGroupBy) Bool

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

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

func (*QouteRetweetFeatureGroupBy) BoolX

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

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

func (*QouteRetweetFeatureGroupBy) Bools

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

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

func (*QouteRetweetFeatureGroupBy) BoolsX

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

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

func (*QouteRetweetFeatureGroupBy) Float64

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

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

func (*QouteRetweetFeatureGroupBy) Float64X

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

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

func (*QouteRetweetFeatureGroupBy) Float64s

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

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

func (*QouteRetweetFeatureGroupBy) Float64sX

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

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

func (*QouteRetweetFeatureGroupBy) Int

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

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

func (*QouteRetweetFeatureGroupBy) IntX

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

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

func (*QouteRetweetFeatureGroupBy) Ints

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

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

func (*QouteRetweetFeatureGroupBy) IntsX

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

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

func (*QouteRetweetFeatureGroupBy) Scan

func (qrfgb *QouteRetweetFeatureGroupBy) Scan(ctx context.Context, v any) error

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

func (*QouteRetweetFeatureGroupBy) ScanX

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

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

func (*QouteRetweetFeatureGroupBy) String

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

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

func (*QouteRetweetFeatureGroupBy) StringX

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

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

func (*QouteRetweetFeatureGroupBy) Strings

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

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

func (*QouteRetweetFeatureGroupBy) StringsX

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

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

type QouteRetweetFeatureMutation

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

QouteRetweetFeatureMutation represents an operation that mutates the Qoute_retweet_feature nodes in the graph.

func (*QouteRetweetFeatureMutation) AddField

func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) AddFromAccountID

func (m *QouteRetweetFeatureMutation) AddFromAccountID(i int64)

AddFromAccountID adds i to the "from_account_id" field.

func (*QouteRetweetFeatureMutation) AddedEdges

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

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

func (*QouteRetweetFeatureMutation) AddedField

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

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

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

func (*QouteRetweetFeatureMutation) AddedFromAccountID

func (m *QouteRetweetFeatureMutation) AddedFromAccountID() (r int64, exists bool)

AddedFromAccountID returns the value that was added to the "from_account_id" field in this mutation.

func (*QouteRetweetFeatureMutation) AddedIDs

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

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

func (*QouteRetweetFeatureMutation) ClearEdge

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

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

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

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

func (*QouteRetweetFeatureMutation) ClearedFields

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

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

func (QouteRetweetFeatureMutation) Client

func (m QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) CreatedAt

func (m *QouteRetweetFeatureMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*QouteRetweetFeatureMutation) EdgeCleared

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

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

func (*QouteRetweetFeatureMutation) Field

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

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

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

func (*QouteRetweetFeatureMutation) Fields

func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) FromAccountID

func (m *QouteRetweetFeatureMutation) FromAccountID() (r int64, exists bool)

FromAccountID returns the value of the "from_account_id" field in the mutation.

func (*QouteRetweetFeatureMutation) ID

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

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

func (*QouteRetweetFeatureMutation) OldCreatedAt

func (m *QouteRetweetFeatureMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Qoute_retweet_feature entity. If the Qoute_retweet_feature 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 (*QouteRetweetFeatureMutation) OldField

func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) OldFromAccountID

func (m *QouteRetweetFeatureMutation) OldFromAccountID(ctx context.Context) (v int64, err error)

OldFromAccountID returns the old "from_account_id" field's value of the Qoute_retweet_feature entity. If the Qoute_retweet_feature 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 (*QouteRetweetFeatureMutation) OldPostID

func (m *QouteRetweetFeatureMutation) OldPostID(ctx context.Context) (v uuid.UUID, err error)

OldPostID returns the old "post_id" field's value of the Qoute_retweet_feature entity. If the Qoute_retweet_feature 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 (*QouteRetweetFeatureMutation) OldQoute

func (m *QouteRetweetFeatureMutation) OldQoute(ctx context.Context) (v string, err error)

OldQoute returns the old "qoute" field's value of the Qoute_retweet_feature entity. If the Qoute_retweet_feature 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 (*QouteRetweetFeatureMutation) OldQouteRetweet

func (m *QouteRetweetFeatureMutation) OldQouteRetweet(ctx context.Context) (v bool, err error)

OldQouteRetweet returns the old "qoute_retweet" field's value of the Qoute_retweet_feature entity. If the Qoute_retweet_feature 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 (*QouteRetweetFeatureMutation) Op

Op returns the operation name.

func (*QouteRetweetFeatureMutation) PostID

func (m *QouteRetweetFeatureMutation) PostID() (r uuid.UUID, exists bool)

PostID returns the value of the "post_id" field in the mutation.

func (*QouteRetweetFeatureMutation) Qoute

func (m *QouteRetweetFeatureMutation) Qoute() (r string, exists bool)

Qoute returns the value of the "qoute" field in the mutation.

func (*QouteRetweetFeatureMutation) QouteRetweet

func (m *QouteRetweetFeatureMutation) QouteRetweet() (r bool, exists bool)

QouteRetweet returns the value of the "qoute_retweet" field in the mutation.

func (*QouteRetweetFeatureMutation) RemovedEdges

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

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

func (*QouteRetweetFeatureMutation) RemovedIDs

func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) ResetCreatedAt

func (m *QouteRetweetFeatureMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*QouteRetweetFeatureMutation) ResetEdge

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

func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) ResetFromAccountID

func (m *QouteRetweetFeatureMutation) ResetFromAccountID()

ResetFromAccountID resets all changes to the "from_account_id" field.

func (*QouteRetweetFeatureMutation) ResetPostID

func (m *QouteRetweetFeatureMutation) ResetPostID()

ResetPostID resets all changes to the "post_id" field.

func (*QouteRetweetFeatureMutation) ResetQoute

func (m *QouteRetweetFeatureMutation) ResetQoute()

ResetQoute resets all changes to the "qoute" field.

func (*QouteRetweetFeatureMutation) ResetQouteRetweet

func (m *QouteRetweetFeatureMutation) ResetQouteRetweet()

ResetQouteRetweet resets all changes to the "qoute_retweet" field.

func (*QouteRetweetFeatureMutation) SetCreatedAt

func (m *QouteRetweetFeatureMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*QouteRetweetFeatureMutation) SetField

func (m *QouteRetweetFeatureMutation) 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 (*QouteRetweetFeatureMutation) SetFromAccountID

func (m *QouteRetweetFeatureMutation) SetFromAccountID(i int64)

SetFromAccountID sets the "from_account_id" field.

func (*QouteRetweetFeatureMutation) SetPostID

func (m *QouteRetweetFeatureMutation) SetPostID(u uuid.UUID)

SetPostID sets the "post_id" field.

func (*QouteRetweetFeatureMutation) SetQoute

func (m *QouteRetweetFeatureMutation) SetQoute(s string)

SetQoute sets the "qoute" field.

func (*QouteRetweetFeatureMutation) SetQouteRetweet

func (m *QouteRetweetFeatureMutation) SetQouteRetweet(b bool)

SetQouteRetweet sets the "qoute_retweet" field.

func (QouteRetweetFeatureMutation) Tx

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

func (*QouteRetweetFeatureMutation) Type

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

func (*QouteRetweetFeatureMutation) Where

Where appends a list predicates to the QouteRetweetFeatureMutation builder.

type QouteRetweetFeatureQuery

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

QouteRetweetFeatureQuery is the builder for querying Qoute_retweet_feature entities.

func (*QouteRetweetFeatureQuery) Aggregate

Aggregate returns a QouteRetweetFeatureSelect configured with the given aggregations.

func (*QouteRetweetFeatureQuery) All

All executes the query and returns a list of Qoute_retweet_features.

func (*QouteRetweetFeatureQuery) AllX

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

func (*QouteRetweetFeatureQuery) Clone

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

func (*QouteRetweetFeatureQuery) Count

func (qrfq *QouteRetweetFeatureQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*QouteRetweetFeatureQuery) CountX

func (qrfq *QouteRetweetFeatureQuery) CountX(ctx context.Context) int

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

func (*QouteRetweetFeatureQuery) Exist

func (qrfq *QouteRetweetFeatureQuery) Exist(ctx context.Context) (bool, error)

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

func (*QouteRetweetFeatureQuery) ExistX

func (qrfq *QouteRetweetFeatureQuery) ExistX(ctx context.Context) bool

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

func (*QouteRetweetFeatureQuery) First

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

func (*QouteRetweetFeatureQuery) FirstID

func (qrfq *QouteRetweetFeatureQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*QouteRetweetFeatureQuery) FirstIDX

func (qrfq *QouteRetweetFeatureQuery) FirstIDX(ctx context.Context) int

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

func (*QouteRetweetFeatureQuery) FirstX

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

func (*QouteRetweetFeatureQuery) GroupBy

func (qrfq *QouteRetweetFeatureQuery) GroupBy(field string, fields ...string) *QouteRetweetFeatureGroupBy

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 {
	FromAccountID int64 `json:"from_account_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.QouteRetweetFeature.Query().
	GroupBy(qoute_retweet_feature.FieldFromAccountID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*QouteRetweetFeatureQuery) IDs

func (qrfq *QouteRetweetFeatureQuery) IDs(ctx context.Context) ([]int, error)

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

func (*QouteRetweetFeatureQuery) IDsX

func (qrfq *QouteRetweetFeatureQuery) IDsX(ctx context.Context) []int

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

func (*QouteRetweetFeatureQuery) Limit

Limit adds a limit step to the query.

func (*QouteRetweetFeatureQuery) Offset

Offset adds an offset step to the query.

func (*QouteRetweetFeatureQuery) Only

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

func (*QouteRetweetFeatureQuery) OnlyID

func (qrfq *QouteRetweetFeatureQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*QouteRetweetFeatureQuery) OnlyIDX

func (qrfq *QouteRetweetFeatureQuery) OnlyIDX(ctx context.Context) int

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

func (*QouteRetweetFeatureQuery) OnlyX

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

func (*QouteRetweetFeatureQuery) Order

Order adds an order step to the query.

func (*QouteRetweetFeatureQuery) 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 {
	FromAccountID int64 `json:"from_account_id,omitempty"`
}

client.QouteRetweetFeature.Query().
	Select(qoute_retweet_feature.FieldFromAccountID).
	Scan(ctx, &v)

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

Where adds a new predicate for the QouteRetweetFeatureQuery builder.

type QouteRetweetFeatureSelect

type QouteRetweetFeatureSelect struct {
	*QouteRetweetFeatureQuery
	// contains filtered or unexported fields
}

QouteRetweetFeatureSelect is the builder for selecting fields of QouteRetweetFeature entities.

func (*QouteRetweetFeatureSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*QouteRetweetFeatureSelect) Bool

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

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

func (*QouteRetweetFeatureSelect) BoolX

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

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

func (*QouteRetweetFeatureSelect) Bools

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

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

func (*QouteRetweetFeatureSelect) BoolsX

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

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

func (*QouteRetweetFeatureSelect) Float64

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

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

func (*QouteRetweetFeatureSelect) Float64X

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

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

func (*QouteRetweetFeatureSelect) Float64s

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

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

func (*QouteRetweetFeatureSelect) Float64sX

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

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

func (*QouteRetweetFeatureSelect) Int

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

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

func (*QouteRetweetFeatureSelect) IntX

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

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

func (*QouteRetweetFeatureSelect) Ints

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

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

func (*QouteRetweetFeatureSelect) IntsX

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

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

func (*QouteRetweetFeatureSelect) Scan

func (qrfs *QouteRetweetFeatureSelect) Scan(ctx context.Context, v any) error

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

func (*QouteRetweetFeatureSelect) ScanX

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

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

func (*QouteRetweetFeatureSelect) String

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

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

func (*QouteRetweetFeatureSelect) StringX

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

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

func (*QouteRetweetFeatureSelect) Strings

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

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

func (*QouteRetweetFeatureSelect) StringsX

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

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

type QouteRetweetFeatureUpdate

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

QouteRetweetFeatureUpdate is the builder for updating Qoute_retweet_feature entities.

func (*QouteRetweetFeatureUpdate) AddFromAccountID

func (qrfu *QouteRetweetFeatureUpdate) AddFromAccountID(i int64) *QouteRetweetFeatureUpdate

AddFromAccountID adds i to the "from_account_id" field.

func (*QouteRetweetFeatureUpdate) Exec

Exec executes the query.

func (*QouteRetweetFeatureUpdate) ExecX

func (qrfu *QouteRetweetFeatureUpdate) ExecX(ctx context.Context)

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

func (*QouteRetweetFeatureUpdate) Mutation

Mutation returns the QouteRetweetFeatureMutation object of the builder.

func (*QouteRetweetFeatureUpdate) Save

func (qrfu *QouteRetweetFeatureUpdate) Save(ctx context.Context) (int, error)

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

func (*QouteRetweetFeatureUpdate) SaveX

func (qrfu *QouteRetweetFeatureUpdate) SaveX(ctx context.Context) int

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

func (*QouteRetweetFeatureUpdate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*QouteRetweetFeatureUpdate) SetFromAccountID

func (qrfu *QouteRetweetFeatureUpdate) SetFromAccountID(i int64) *QouteRetweetFeatureUpdate

SetFromAccountID sets the "from_account_id" field.

func (*QouteRetweetFeatureUpdate) SetNillableQouteRetweet

func (qrfu *QouteRetweetFeatureUpdate) SetNillableQouteRetweet(b *bool) *QouteRetweetFeatureUpdate

SetNillableQouteRetweet sets the "qoute_retweet" field if the given value is not nil.

func (*QouteRetweetFeatureUpdate) SetPostID

SetPostID sets the "post_id" field.

func (*QouteRetweetFeatureUpdate) SetQoute

SetQoute sets the "qoute" field.

func (*QouteRetweetFeatureUpdate) SetQouteRetweet

func (qrfu *QouteRetweetFeatureUpdate) SetQouteRetweet(b bool) *QouteRetweetFeatureUpdate

SetQouteRetweet sets the "qoute_retweet" field.

func (*QouteRetweetFeatureUpdate) Where

Where appends a list predicates to the QouteRetweetFeatureUpdate builder.

type QouteRetweetFeatureUpdateOne

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

QouteRetweetFeatureUpdateOne is the builder for updating a single Qoute_retweet_feature entity.

func (*QouteRetweetFeatureUpdateOne) AddFromAccountID

AddFromAccountID adds i to the "from_account_id" field.

func (*QouteRetweetFeatureUpdateOne) Exec

Exec executes the query on the entity.

func (*QouteRetweetFeatureUpdateOne) ExecX

func (qrfuo *QouteRetweetFeatureUpdateOne) ExecX(ctx context.Context)

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

func (*QouteRetweetFeatureUpdateOne) Mutation

Mutation returns the QouteRetweetFeatureMutation object of the builder.

func (*QouteRetweetFeatureUpdateOne) Save

Save executes the query and returns the updated Qoute_retweet_feature entity.

func (*QouteRetweetFeatureUpdateOne) SaveX

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

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

SetCreatedAt sets the "created_at" field.

func (*QouteRetweetFeatureUpdateOne) SetFromAccountID

SetFromAccountID sets the "from_account_id" field.

func (*QouteRetweetFeatureUpdateOne) SetNillableQouteRetweet

func (qrfuo *QouteRetweetFeatureUpdateOne) SetNillableQouteRetweet(b *bool) *QouteRetweetFeatureUpdateOne

SetNillableQouteRetweet sets the "qoute_retweet" field if the given value is not nil.

func (*QouteRetweetFeatureUpdateOne) SetPostID

SetPostID sets the "post_id" field.

func (*QouteRetweetFeatureUpdateOne) SetQoute

SetQoute sets the "qoute" field.

func (*QouteRetweetFeatureUpdateOne) SetQouteRetweet

SetQouteRetweet sets the "qoute_retweet" field.

type Qoute_retweet_feature

type Qoute_retweet_feature struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// FromAccountID holds the value of the "from_account_id" field.
	FromAccountID int64 `json:"from_account_id,omitempty"`
	// QouteRetweet holds the value of the "qoute_retweet" field.
	QouteRetweet bool `json:"qoute_retweet,omitempty"`
	// Qoute holds the value of the "qoute" field.
	Qoute string `json:"qoute,omitempty"`
	// PostID holds the value of the "post_id" field.
	PostID uuid.UUID `json:"post_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Qoute_retweet_feature is the model entity for the Qoute_retweet_feature schema.

func (*Qoute_retweet_feature) String

func (qrf *Qoute_retweet_feature) String() string

String implements the fmt.Stringer.

func (*Qoute_retweet_feature) Unwrap

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

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

type Qoute_retweet_featureClient

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

Qoute_retweet_featureClient is a client for the Qoute_retweet_feature schema.

func NewQoute_retweet_featureClient

func NewQoute_retweet_featureClient(c config) *Qoute_retweet_featureClient

NewQoute_retweet_featureClient returns a client for the Qoute_retweet_feature from the given config.

func (*Qoute_retweet_featureClient) Create

Create returns a builder for creating a Qoute_retweet_feature entity.

func (*Qoute_retweet_featureClient) CreateBulk

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

func (*Qoute_retweet_featureClient) Delete

Delete returns a delete builder for Qoute_retweet_feature.

func (*Qoute_retweet_featureClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*Qoute_retweet_featureClient) DeleteOneID

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

func (*Qoute_retweet_featureClient) Get

Get returns a Qoute_retweet_feature entity by its id.

func (*Qoute_retweet_featureClient) GetX

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

func (*Qoute_retweet_featureClient) Hooks

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

Hooks returns the client hooks.

func (*Qoute_retweet_featureClient) Query

Query returns a query builder for Qoute_retweet_feature.

func (*Qoute_retweet_featureClient) Update

Update returns an update builder for Qoute_retweet_feature.

func (*Qoute_retweet_featureClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*Qoute_retweet_featureClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*Qoute_retweet_featureClient) Use

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

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

type Qoute_retweet_features

type Qoute_retweet_features []*Qoute_retweet_feature

Qoute_retweet_features is a parsable slice of Qoute_retweet_feature.

type Query

type Query = ent.Query

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

type RetweetFeatureCreate

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

RetweetFeatureCreate is the builder for creating a Retweet_feature entity.

func (*RetweetFeatureCreate) Exec

func (rfc *RetweetFeatureCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RetweetFeatureCreate) ExecX

func (rfc *RetweetFeatureCreate) ExecX(ctx context.Context)

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

func (*RetweetFeatureCreate) Mutation

Mutation returns the RetweetFeatureMutation object of the builder.

func (*RetweetFeatureCreate) Save

Save creates the Retweet_feature in the database.

func (*RetweetFeatureCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*RetweetFeatureCreate) SetCreatedAt

func (rfc *RetweetFeatureCreate) SetCreatedAt(t time.Time) *RetweetFeatureCreate

SetCreatedAt sets the "created_at" field.

func (*RetweetFeatureCreate) SetFromAccountID

func (rfc *RetweetFeatureCreate) SetFromAccountID(i int64) *RetweetFeatureCreate

SetFromAccountID sets the "from_account_id" field.

func (*RetweetFeatureCreate) SetNillableCreatedAt

func (rfc *RetweetFeatureCreate) SetNillableCreatedAt(t *time.Time) *RetweetFeatureCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RetweetFeatureCreate) SetNillableRetweet

func (rfc *RetweetFeatureCreate) SetNillableRetweet(b *bool) *RetweetFeatureCreate

SetNillableRetweet sets the "retweet" field if the given value is not nil.

func (*RetweetFeatureCreate) SetPostID

SetPostID sets the "post_id" field.

func (*RetweetFeatureCreate) SetRetweet

func (rfc *RetweetFeatureCreate) SetRetweet(b bool) *RetweetFeatureCreate

SetRetweet sets the "retweet" field.

type RetweetFeatureCreateBulk

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

RetweetFeatureCreateBulk is the builder for creating many Retweet_feature entities in bulk.

func (*RetweetFeatureCreateBulk) Exec

Exec executes the query.

func (*RetweetFeatureCreateBulk) ExecX

func (rfcb *RetweetFeatureCreateBulk) ExecX(ctx context.Context)

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

func (*RetweetFeatureCreateBulk) Save

Save creates the Retweet_feature entities in the database.

func (*RetweetFeatureCreateBulk) SaveX

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

type RetweetFeatureDelete

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

RetweetFeatureDelete is the builder for deleting a Retweet_feature entity.

func (*RetweetFeatureDelete) Exec

func (rfd *RetweetFeatureDelete) Exec(ctx context.Context) (int, error)

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

func (*RetweetFeatureDelete) ExecX

func (rfd *RetweetFeatureDelete) ExecX(ctx context.Context) int

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

func (*RetweetFeatureDelete) Where

Where appends a list predicates to the RetweetFeatureDelete builder.

type RetweetFeatureDeleteOne

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

RetweetFeatureDeleteOne is the builder for deleting a single Retweet_feature entity.

func (*RetweetFeatureDeleteOne) Exec

func (rfdo *RetweetFeatureDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RetweetFeatureDeleteOne) ExecX

func (rfdo *RetweetFeatureDeleteOne) ExecX(ctx context.Context)

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

type RetweetFeatureGroupBy

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

RetweetFeatureGroupBy is the group-by builder for Retweet_feature entities.

func (*RetweetFeatureGroupBy) Aggregate

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

func (*RetweetFeatureGroupBy) Bool

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

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

func (*RetweetFeatureGroupBy) BoolX

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

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

func (*RetweetFeatureGroupBy) Bools

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

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

func (*RetweetFeatureGroupBy) BoolsX

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

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

func (*RetweetFeatureGroupBy) Float64

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

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

func (*RetweetFeatureGroupBy) Float64X

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

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

func (*RetweetFeatureGroupBy) Float64s

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

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

func (*RetweetFeatureGroupBy) Float64sX

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

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

func (*RetweetFeatureGroupBy) Int

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

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

func (*RetweetFeatureGroupBy) IntX

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

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

func (*RetweetFeatureGroupBy) Ints

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

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

func (*RetweetFeatureGroupBy) IntsX

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

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

func (*RetweetFeatureGroupBy) Scan

func (rfgb *RetweetFeatureGroupBy) Scan(ctx context.Context, v any) error

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

func (*RetweetFeatureGroupBy) ScanX

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

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

func (*RetweetFeatureGroupBy) String

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

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

func (*RetweetFeatureGroupBy) StringX

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

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

func (*RetweetFeatureGroupBy) Strings

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

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

func (*RetweetFeatureGroupBy) StringsX

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

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

type RetweetFeatureMutation

type RetweetFeatureMutation struct {
	// contains filtered or unexported fields
}

RetweetFeatureMutation represents an operation that mutates the Retweet_feature nodes in the graph.

func (*RetweetFeatureMutation) AddField

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) AddFromAccountID

func (m *RetweetFeatureMutation) AddFromAccountID(i int64)

AddFromAccountID adds i to the "from_account_id" field.

func (*RetweetFeatureMutation) AddedEdges

func (m *RetweetFeatureMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RetweetFeatureMutation) AddedField

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) AddedFields

func (m *RetweetFeatureMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RetweetFeatureMutation) AddedFromAccountID

func (m *RetweetFeatureMutation) AddedFromAccountID() (r int64, exists bool)

AddedFromAccountID returns the value that was added to the "from_account_id" field in this mutation.

func (*RetweetFeatureMutation) AddedIDs

func (m *RetweetFeatureMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RetweetFeatureMutation) ClearEdge

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) ClearField

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) ClearedEdges

func (m *RetweetFeatureMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RetweetFeatureMutation) ClearedFields

func (m *RetweetFeatureMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RetweetFeatureMutation) Client

func (m RetweetFeatureMutation) 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 (*RetweetFeatureMutation) CreatedAt

func (m *RetweetFeatureMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*RetweetFeatureMutation) EdgeCleared

func (m *RetweetFeatureMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RetweetFeatureMutation) Field

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) FieldCleared

func (m *RetweetFeatureMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RetweetFeatureMutation) Fields

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) FromAccountID

func (m *RetweetFeatureMutation) FromAccountID() (r int64, exists bool)

FromAccountID returns the value of the "from_account_id" field in the mutation.

func (*RetweetFeatureMutation) ID

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) IDs

func (m *RetweetFeatureMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*RetweetFeatureMutation) OldCreatedAt

func (m *RetweetFeatureMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Retweet_feature entity. If the Retweet_feature 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 (*RetweetFeatureMutation) OldField

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) OldFromAccountID

func (m *RetweetFeatureMutation) OldFromAccountID(ctx context.Context) (v int64, err error)

OldFromAccountID returns the old "from_account_id" field's value of the Retweet_feature entity. If the Retweet_feature 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 (*RetweetFeatureMutation) OldPostID

func (m *RetweetFeatureMutation) OldPostID(ctx context.Context) (v uuid.UUID, err error)

OldPostID returns the old "post_id" field's value of the Retweet_feature entity. If the Retweet_feature 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 (*RetweetFeatureMutation) OldRetweet

func (m *RetweetFeatureMutation) OldRetweet(ctx context.Context) (v bool, err error)

OldRetweet returns the old "retweet" field's value of the Retweet_feature entity. If the Retweet_feature 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 (*RetweetFeatureMutation) Op

func (m *RetweetFeatureMutation) Op() Op

Op returns the operation name.

func (*RetweetFeatureMutation) PostID

func (m *RetweetFeatureMutation) PostID() (r uuid.UUID, exists bool)

PostID returns the value of the "post_id" field in the mutation.

func (*RetweetFeatureMutation) RemovedEdges

func (m *RetweetFeatureMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RetweetFeatureMutation) RemovedIDs

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) ResetCreatedAt

func (m *RetweetFeatureMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RetweetFeatureMutation) ResetEdge

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) ResetField

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) ResetFromAccountID

func (m *RetweetFeatureMutation) ResetFromAccountID()

ResetFromAccountID resets all changes to the "from_account_id" field.

func (*RetweetFeatureMutation) ResetPostID

func (m *RetweetFeatureMutation) ResetPostID()

ResetPostID resets all changes to the "post_id" field.

func (*RetweetFeatureMutation) ResetRetweet

func (m *RetweetFeatureMutation) ResetRetweet()

ResetRetweet resets all changes to the "retweet" field.

func (*RetweetFeatureMutation) Retweet

func (m *RetweetFeatureMutation) Retweet() (r bool, exists bool)

Retweet returns the value of the "retweet" field in the mutation.

func (*RetweetFeatureMutation) SetCreatedAt

func (m *RetweetFeatureMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RetweetFeatureMutation) SetField

func (m *RetweetFeatureMutation) 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 (*RetweetFeatureMutation) SetFromAccountID

func (m *RetweetFeatureMutation) SetFromAccountID(i int64)

SetFromAccountID sets the "from_account_id" field.

func (*RetweetFeatureMutation) SetPostID

func (m *RetweetFeatureMutation) SetPostID(u uuid.UUID)

SetPostID sets the "post_id" field.

func (*RetweetFeatureMutation) SetRetweet

func (m *RetweetFeatureMutation) SetRetweet(b bool)

SetRetweet sets the "retweet" field.

func (RetweetFeatureMutation) Tx

func (m RetweetFeatureMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RetweetFeatureMutation) Type

func (m *RetweetFeatureMutation) Type() string

Type returns the node type of this mutation (Retweet_feature).

func (*RetweetFeatureMutation) Where

Where appends a list predicates to the RetweetFeatureMutation builder.

type RetweetFeatureQuery

type RetweetFeatureQuery struct {
	// contains filtered or unexported fields
}

RetweetFeatureQuery is the builder for querying Retweet_feature entities.

func (*RetweetFeatureQuery) Aggregate

func (rfq *RetweetFeatureQuery) Aggregate(fns ...AggregateFunc) *RetweetFeatureSelect

Aggregate returns a RetweetFeatureSelect configured with the given aggregations.

func (*RetweetFeatureQuery) All

All executes the query and returns a list of Retweet_features.

func (*RetweetFeatureQuery) AllX

AllX is like All, but panics if an error occurs.

func (*RetweetFeatureQuery) Clone

Clone returns a duplicate of the RetweetFeatureQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RetweetFeatureQuery) Count

func (rfq *RetweetFeatureQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RetweetFeatureQuery) CountX

func (rfq *RetweetFeatureQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RetweetFeatureQuery) Exist

func (rfq *RetweetFeatureQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RetweetFeatureQuery) ExistX

func (rfq *RetweetFeatureQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RetweetFeatureQuery) First

First returns the first Retweet_feature entity from the query. Returns a *NotFoundError when no Retweet_feature was found.

func (*RetweetFeatureQuery) FirstID

func (rfq *RetweetFeatureQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Retweet_feature ID from the query. Returns a *NotFoundError when no Retweet_feature ID was found.

func (*RetweetFeatureQuery) FirstIDX

func (rfq *RetweetFeatureQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*RetweetFeatureQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*RetweetFeatureQuery) GroupBy

func (rfq *RetweetFeatureQuery) GroupBy(field string, fields ...string) *RetweetFeatureGroupBy

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 {
	FromAccountID int64 `json:"from_account_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.RetweetFeature.Query().
	GroupBy(retweet_feature.FieldFromAccountID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RetweetFeatureQuery) IDs

func (rfq *RetweetFeatureQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Retweet_feature IDs.

func (*RetweetFeatureQuery) IDsX

func (rfq *RetweetFeatureQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*RetweetFeatureQuery) Limit

func (rfq *RetweetFeatureQuery) Limit(limit int) *RetweetFeatureQuery

Limit adds a limit step to the query.

func (*RetweetFeatureQuery) Offset

func (rfq *RetweetFeatureQuery) Offset(offset int) *RetweetFeatureQuery

Offset adds an offset step to the query.

func (*RetweetFeatureQuery) Only

Only returns a single Retweet_feature entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Retweet_feature entity is found. Returns a *NotFoundError when no Retweet_feature entities are found.

func (*RetweetFeatureQuery) OnlyID

func (rfq *RetweetFeatureQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Retweet_feature ID in the query. Returns a *NotSingularError when more than one Retweet_feature ID is found. Returns a *NotFoundError when no entities are found.

func (*RetweetFeatureQuery) OnlyIDX

func (rfq *RetweetFeatureQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RetweetFeatureQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*RetweetFeatureQuery) Order

Order adds an order step to the query.

func (*RetweetFeatureQuery) Select

func (rfq *RetweetFeatureQuery) Select(fields ...string) *RetweetFeatureSelect

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 {
	FromAccountID int64 `json:"from_account_id,omitempty"`
}

client.RetweetFeature.Query().
	Select(retweet_feature.FieldFromAccountID).
	Scan(ctx, &v)

func (*RetweetFeatureQuery) Unique

func (rfq *RetweetFeatureQuery) Unique(unique bool) *RetweetFeatureQuery

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 (*RetweetFeatureQuery) Where

Where adds a new predicate for the RetweetFeatureQuery builder.

type RetweetFeatureSelect

type RetweetFeatureSelect struct {
	*RetweetFeatureQuery
	// contains filtered or unexported fields
}

RetweetFeatureSelect is the builder for selecting fields of RetweetFeature entities.

func (*RetweetFeatureSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*RetweetFeatureSelect) Bool

func (s *RetweetFeatureSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RetweetFeatureSelect) BoolX

func (s *RetweetFeatureSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RetweetFeatureSelect) Bools

func (s *RetweetFeatureSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RetweetFeatureSelect) BoolsX

func (s *RetweetFeatureSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RetweetFeatureSelect) Float64

func (s *RetweetFeatureSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RetweetFeatureSelect) Float64X

func (s *RetweetFeatureSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RetweetFeatureSelect) Float64s

func (s *RetweetFeatureSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RetweetFeatureSelect) Float64sX

func (s *RetweetFeatureSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RetweetFeatureSelect) Int

func (s *RetweetFeatureSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RetweetFeatureSelect) IntX

func (s *RetweetFeatureSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RetweetFeatureSelect) Ints

func (s *RetweetFeatureSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RetweetFeatureSelect) IntsX

func (s *RetweetFeatureSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RetweetFeatureSelect) Scan

func (rfs *RetweetFeatureSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RetweetFeatureSelect) ScanX

func (s *RetweetFeatureSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RetweetFeatureSelect) String

func (s *RetweetFeatureSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RetweetFeatureSelect) StringX

func (s *RetweetFeatureSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RetweetFeatureSelect) Strings

func (s *RetweetFeatureSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RetweetFeatureSelect) StringsX

func (s *RetweetFeatureSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RetweetFeatureUpdate

type RetweetFeatureUpdate struct {
	// contains filtered or unexported fields
}

RetweetFeatureUpdate is the builder for updating Retweet_feature entities.

func (*RetweetFeatureUpdate) AddFromAccountID

func (rfu *RetweetFeatureUpdate) AddFromAccountID(i int64) *RetweetFeatureUpdate

AddFromAccountID adds i to the "from_account_id" field.

func (*RetweetFeatureUpdate) Exec

func (rfu *RetweetFeatureUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RetweetFeatureUpdate) ExecX

func (rfu *RetweetFeatureUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RetweetFeatureUpdate) Mutation

Mutation returns the RetweetFeatureMutation object of the builder.

func (*RetweetFeatureUpdate) Save

func (rfu *RetweetFeatureUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RetweetFeatureUpdate) SaveX

func (rfu *RetweetFeatureUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RetweetFeatureUpdate) SetCreatedAt

func (rfu *RetweetFeatureUpdate) SetCreatedAt(t time.Time) *RetweetFeatureUpdate

SetCreatedAt sets the "created_at" field.

func (*RetweetFeatureUpdate) SetFromAccountID

func (rfu *RetweetFeatureUpdate) SetFromAccountID(i int64) *RetweetFeatureUpdate

SetFromAccountID sets the "from_account_id" field.

func (*RetweetFeatureUpdate) SetNillableCreatedAt

func (rfu *RetweetFeatureUpdate) SetNillableCreatedAt(t *time.Time) *RetweetFeatureUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RetweetFeatureUpdate) SetNillableRetweet

func (rfu *RetweetFeatureUpdate) SetNillableRetweet(b *bool) *RetweetFeatureUpdate

SetNillableRetweet sets the "retweet" field if the given value is not nil.

func (*RetweetFeatureUpdate) SetPostID

SetPostID sets the "post_id" field.

func (*RetweetFeatureUpdate) SetRetweet

func (rfu *RetweetFeatureUpdate) SetRetweet(b bool) *RetweetFeatureUpdate

SetRetweet sets the "retweet" field.

func (*RetweetFeatureUpdate) Where

Where appends a list predicates to the RetweetFeatureUpdate builder.

type RetweetFeatureUpdateOne

type RetweetFeatureUpdateOne struct {
	// contains filtered or unexported fields
}

RetweetFeatureUpdateOne is the builder for updating a single Retweet_feature entity.

func (*RetweetFeatureUpdateOne) AddFromAccountID

func (rfuo *RetweetFeatureUpdateOne) AddFromAccountID(i int64) *RetweetFeatureUpdateOne

AddFromAccountID adds i to the "from_account_id" field.

func (*RetweetFeatureUpdateOne) Exec

func (rfuo *RetweetFeatureUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RetweetFeatureUpdateOne) ExecX

func (rfuo *RetweetFeatureUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RetweetFeatureUpdateOne) Mutation

Mutation returns the RetweetFeatureMutation object of the builder.

func (*RetweetFeatureUpdateOne) Save

Save executes the query and returns the updated Retweet_feature entity.

func (*RetweetFeatureUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*RetweetFeatureUpdateOne) Select

func (rfuo *RetweetFeatureUpdateOne) Select(field string, fields ...string) *RetweetFeatureUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RetweetFeatureUpdateOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*RetweetFeatureUpdateOne) SetFromAccountID

func (rfuo *RetweetFeatureUpdateOne) SetFromAccountID(i int64) *RetweetFeatureUpdateOne

SetFromAccountID sets the "from_account_id" field.

func (*RetweetFeatureUpdateOne) SetNillableCreatedAt

func (rfuo *RetweetFeatureUpdateOne) SetNillableCreatedAt(t *time.Time) *RetweetFeatureUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RetweetFeatureUpdateOne) SetNillableRetweet

func (rfuo *RetweetFeatureUpdateOne) SetNillableRetweet(b *bool) *RetweetFeatureUpdateOne

SetNillableRetweet sets the "retweet" field if the given value is not nil.

func (*RetweetFeatureUpdateOne) SetPostID

SetPostID sets the "post_id" field.

func (*RetweetFeatureUpdateOne) SetRetweet

SetRetweet sets the "retweet" field.

type Retweet_feature

type Retweet_feature struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// FromAccountID holds the value of the "from_account_id" field.
	FromAccountID int64 `json:"from_account_id,omitempty"`
	// Retweet holds the value of the "retweet" field.
	Retweet bool `json:"retweet,omitempty"`
	// PostID holds the value of the "post_id" field.
	PostID uuid.UUID `json:"post_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Retweet_feature is the model entity for the Retweet_feature schema.

func (*Retweet_feature) String

func (rf *Retweet_feature) String() string

String implements the fmt.Stringer.

func (*Retweet_feature) Unwrap

func (rf *Retweet_feature) Unwrap() *Retweet_feature

Unwrap unwraps the Retweet_feature 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 (*Retweet_feature) Update

Update returns a builder for updating this Retweet_feature. Note that you need to call Retweet_feature.Unwrap() before calling this method if this Retweet_feature was returned from a transaction, and the transaction was committed or rolled back.

type Retweet_featureClient

type Retweet_featureClient struct {
	// contains filtered or unexported fields
}

Retweet_featureClient is a client for the Retweet_feature schema.

func NewRetweet_featureClient

func NewRetweet_featureClient(c config) *Retweet_featureClient

NewRetweet_featureClient returns a client for the Retweet_feature from the given config.

func (*Retweet_featureClient) Create

Create returns a builder for creating a Retweet_feature entity.

func (*Retweet_featureClient) CreateBulk

CreateBulk returns a builder for creating a bulk of Retweet_feature entities.

func (*Retweet_featureClient) Delete

Delete returns a delete builder for Retweet_feature.

func (*Retweet_featureClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*Retweet_featureClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*Retweet_featureClient) Get

Get returns a Retweet_feature entity by its id.

func (*Retweet_featureClient) GetX

GetX is like Get, but panics if an error occurs.

func (*Retweet_featureClient) Hooks

func (c *Retweet_featureClient) Hooks() []Hook

Hooks returns the client hooks.

func (*Retweet_featureClient) Query

Query returns a query builder for Retweet_feature.

func (*Retweet_featureClient) Update

Update returns an update builder for Retweet_feature.

func (*Retweet_featureClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*Retweet_featureClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*Retweet_featureClient) Use

func (c *Retweet_featureClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `retweet_feature.Hooks(f(g(h())))`.

type Retweet_features

type Retweet_features []*Retweet_feature

Retweet_features is a parsable slice of Retweet_feature.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type Tokens

type Tokens struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// AccessToken holds the value of the "access_token" field.
	AccessToken string `json:"access_token,omitempty"`
	// RefreshToken holds the value of the "refresh_token" field.
	RefreshToken string `json:"refresh_token,omitempty"`
	// TokenType holds the value of the "token_type" field.
	TokenType string `json:"token_type,omitempty"`
	// Expiry holds the value of the "expiry" field.
	Expiry time.Time `json:"expiry,omitempty"`
	// Raw holds the value of the "raw" field.
	Raw map[string]interface{} `json:"raw,omitempty"`
	// contains filtered or unexported fields
}

Tokens is the model entity for the Tokens schema.

func (*Tokens) String

func (t *Tokens) String() string

String implements the fmt.Stringer.

func (*Tokens) Unwrap

func (t *Tokens) Unwrap() *Tokens

Unwrap unwraps the Tokens 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 (*Tokens) Update

func (t *Tokens) Update() *TokensUpdateOne

Update returns a builder for updating this Tokens. Note that you need to call Tokens.Unwrap() before calling this method if this Tokens was returned from a transaction, and the transaction was committed or rolled back.

type TokensClient

type TokensClient struct {
	// contains filtered or unexported fields
}

TokensClient is a client for the Tokens schema.

func NewTokensClient

func NewTokensClient(c config) *TokensClient

NewTokensClient returns a client for the Tokens from the given config.

func (*TokensClient) Create

func (c *TokensClient) Create() *TokensCreate

Create returns a builder for creating a Tokens entity.

func (*TokensClient) CreateBulk

func (c *TokensClient) CreateBulk(builders ...*TokensCreate) *TokensCreateBulk

CreateBulk returns a builder for creating a bulk of Tokens entities.

func (*TokensClient) Delete

func (c *TokensClient) Delete() *TokensDelete

Delete returns a delete builder for Tokens.

func (*TokensClient) DeleteOne

func (c *TokensClient) DeleteOne(t *Tokens) *TokensDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TokensClient) DeleteOneID

func (c *TokensClient) DeleteOneID(id uuid.UUID) *TokensDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TokensClient) Get

func (c *TokensClient) Get(ctx context.Context, id uuid.UUID) (*Tokens, error)

Get returns a Tokens entity by its id.

func (*TokensClient) GetX

func (c *TokensClient) GetX(ctx context.Context, id uuid.UUID) *Tokens

GetX is like Get, but panics if an error occurs.

func (*TokensClient) Hooks

func (c *TokensClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TokensClient) Query

func (c *TokensClient) Query() *TokensQuery

Query returns a query builder for Tokens.

func (*TokensClient) Update

func (c *TokensClient) Update() *TokensUpdate

Update returns an update builder for Tokens.

func (*TokensClient) UpdateOne

func (c *TokensClient) UpdateOne(t *Tokens) *TokensUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TokensClient) UpdateOneID

func (c *TokensClient) UpdateOneID(id uuid.UUID) *TokensUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TokensClient) Use

func (c *TokensClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tokens.Hooks(f(g(h())))`.

type TokensCreate

type TokensCreate struct {
	// contains filtered or unexported fields
}

TokensCreate is the builder for creating a Tokens entity.

func (*TokensCreate) Exec

func (tc *TokensCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TokensCreate) ExecX

func (tc *TokensCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokensCreate) Mutation

func (tc *TokensCreate) Mutation() *TokensMutation

Mutation returns the TokensMutation object of the builder.

func (*TokensCreate) Save

func (tc *TokensCreate) Save(ctx context.Context) (*Tokens, error)

Save creates the Tokens in the database.

func (*TokensCreate) SaveX

func (tc *TokensCreate) SaveX(ctx context.Context) *Tokens

SaveX calls Save and panics if Save returns an error.

func (*TokensCreate) SetAccessToken

func (tc *TokensCreate) SetAccessToken(s string) *TokensCreate

SetAccessToken sets the "access_token" field.

func (*TokensCreate) SetEmail

func (tc *TokensCreate) SetEmail(s string) *TokensCreate

SetEmail sets the "email" field.

func (*TokensCreate) SetExpiry

func (tc *TokensCreate) SetExpiry(t time.Time) *TokensCreate

SetExpiry sets the "expiry" field.

func (*TokensCreate) SetID

func (tc *TokensCreate) SetID(u uuid.UUID) *TokensCreate

SetID sets the "id" field.

func (*TokensCreate) SetNillableID

func (tc *TokensCreate) SetNillableID(u *uuid.UUID) *TokensCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*TokensCreate) SetRaw

func (tc *TokensCreate) SetRaw(m map[string]interface{}) *TokensCreate

SetRaw sets the "raw" field.

func (*TokensCreate) SetRefreshToken

func (tc *TokensCreate) SetRefreshToken(s string) *TokensCreate

SetRefreshToken sets the "refresh_token" field.

func (*TokensCreate) SetTokenType

func (tc *TokensCreate) SetTokenType(s string) *TokensCreate

SetTokenType sets the "token_type" field.

type TokensCreateBulk

type TokensCreateBulk struct {
	// contains filtered or unexported fields
}

TokensCreateBulk is the builder for creating many Tokens entities in bulk.

func (*TokensCreateBulk) Exec

func (tcb *TokensCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TokensCreateBulk) ExecX

func (tcb *TokensCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokensCreateBulk) Save

func (tcb *TokensCreateBulk) Save(ctx context.Context) ([]*Tokens, error)

Save creates the Tokens entities in the database.

func (*TokensCreateBulk) SaveX

func (tcb *TokensCreateBulk) SaveX(ctx context.Context) []*Tokens

SaveX is like Save, but panics if an error occurs.

type TokensDelete

type TokensDelete struct {
	// contains filtered or unexported fields
}

TokensDelete is the builder for deleting a Tokens entity.

func (*TokensDelete) Exec

func (td *TokensDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TokensDelete) ExecX

func (td *TokensDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TokensDelete) Where

func (td *TokensDelete) Where(ps ...predicate.Tokens) *TokensDelete

Where appends a list predicates to the TokensDelete builder.

type TokensDeleteOne

type TokensDeleteOne struct {
	// contains filtered or unexported fields
}

TokensDeleteOne is the builder for deleting a single Tokens entity.

func (*TokensDeleteOne) Exec

func (tdo *TokensDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TokensDeleteOne) ExecX

func (tdo *TokensDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TokensGroupBy

type TokensGroupBy struct {
	// contains filtered or unexported fields
}

TokensGroupBy is the group-by builder for Tokens entities.

func (*TokensGroupBy) Aggregate

func (tgb *TokensGroupBy) Aggregate(fns ...AggregateFunc) *TokensGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TokensGroupBy) Bool

func (s *TokensGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TokensGroupBy) BoolX

func (s *TokensGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TokensGroupBy) Bools

func (s *TokensGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TokensGroupBy) BoolsX

func (s *TokensGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TokensGroupBy) Float64

func (s *TokensGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TokensGroupBy) Float64X

func (s *TokensGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TokensGroupBy) Float64s

func (s *TokensGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TokensGroupBy) Float64sX

func (s *TokensGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TokensGroupBy) Int

func (s *TokensGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TokensGroupBy) IntX

func (s *TokensGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TokensGroupBy) Ints

func (s *TokensGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TokensGroupBy) IntsX

func (s *TokensGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TokensGroupBy) Scan

func (tgb *TokensGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*TokensGroupBy) ScanX

func (s *TokensGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TokensGroupBy) String

func (s *TokensGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TokensGroupBy) StringX

func (s *TokensGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TokensGroupBy) Strings

func (s *TokensGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TokensGroupBy) StringsX

func (s *TokensGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TokensMutation

type TokensMutation struct {
	// contains filtered or unexported fields
}

TokensMutation represents an operation that mutates the Tokens nodes in the graph.

func (*TokensMutation) AccessToken

func (m *TokensMutation) AccessToken() (r string, exists bool)

AccessToken returns the value of the "access_token" field in the mutation.

func (*TokensMutation) AddField

func (m *TokensMutation) 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 (*TokensMutation) AddedEdges

func (m *TokensMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TokensMutation) AddedField

func (m *TokensMutation) 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 (*TokensMutation) AddedFields

func (m *TokensMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TokensMutation) AddedIDs

func (m *TokensMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TokensMutation) ClearEdge

func (m *TokensMutation) 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 (*TokensMutation) ClearField

func (m *TokensMutation) 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 (*TokensMutation) ClearedEdges

func (m *TokensMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TokensMutation) ClearedFields

func (m *TokensMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TokensMutation) Client

func (m TokensMutation) 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 (*TokensMutation) EdgeCleared

func (m *TokensMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TokensMutation) Email

func (m *TokensMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*TokensMutation) Expiry

func (m *TokensMutation) Expiry() (r time.Time, exists bool)

Expiry returns the value of the "expiry" field in the mutation.

func (*TokensMutation) Field

func (m *TokensMutation) 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 (*TokensMutation) FieldCleared

func (m *TokensMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TokensMutation) Fields

func (m *TokensMutation) 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 (*TokensMutation) ID

func (m *TokensMutation) 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 (*TokensMutation) IDs

func (m *TokensMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TokensMutation) OldAccessToken

func (m *TokensMutation) OldAccessToken(ctx context.Context) (v string, err error)

OldAccessToken returns the old "access_token" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) OldEmail

func (m *TokensMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) OldExpiry

func (m *TokensMutation) OldExpiry(ctx context.Context) (v time.Time, err error)

OldExpiry returns the old "expiry" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) OldField

func (m *TokensMutation) 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 (*TokensMutation) OldRaw

func (m *TokensMutation) OldRaw(ctx context.Context) (v map[string]interface{}, err error)

OldRaw returns the old "raw" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) OldRefreshToken

func (m *TokensMutation) OldRefreshToken(ctx context.Context) (v string, err error)

OldRefreshToken returns the old "refresh_token" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) OldTokenType

func (m *TokensMutation) OldTokenType(ctx context.Context) (v string, err error)

OldTokenType returns the old "token_type" field's value of the Tokens entity. If the Tokens 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 (*TokensMutation) Op

func (m *TokensMutation) Op() Op

Op returns the operation name.

func (*TokensMutation) Raw

func (m *TokensMutation) Raw() (r map[string]interface{}, exists bool)

Raw returns the value of the "raw" field in the mutation.

func (*TokensMutation) RefreshToken

func (m *TokensMutation) RefreshToken() (r string, exists bool)

RefreshToken returns the value of the "refresh_token" field in the mutation.

func (*TokensMutation) RemovedEdges

func (m *TokensMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TokensMutation) RemovedIDs

func (m *TokensMutation) 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 (*TokensMutation) ResetAccessToken

func (m *TokensMutation) ResetAccessToken()

ResetAccessToken resets all changes to the "access_token" field.

func (*TokensMutation) ResetEdge

func (m *TokensMutation) 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 (*TokensMutation) ResetEmail

func (m *TokensMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*TokensMutation) ResetExpiry

func (m *TokensMutation) ResetExpiry()

ResetExpiry resets all changes to the "expiry" field.

func (*TokensMutation) ResetField

func (m *TokensMutation) 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 (*TokensMutation) ResetRaw

func (m *TokensMutation) ResetRaw()

ResetRaw resets all changes to the "raw" field.

func (*TokensMutation) ResetRefreshToken

func (m *TokensMutation) ResetRefreshToken()

ResetRefreshToken resets all changes to the "refresh_token" field.

func (*TokensMutation) ResetTokenType

func (m *TokensMutation) ResetTokenType()

ResetTokenType resets all changes to the "token_type" field.

func (*TokensMutation) SetAccessToken

func (m *TokensMutation) SetAccessToken(s string)

SetAccessToken sets the "access_token" field.

func (*TokensMutation) SetEmail

func (m *TokensMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*TokensMutation) SetExpiry

func (m *TokensMutation) SetExpiry(t time.Time)

SetExpiry sets the "expiry" field.

func (*TokensMutation) SetField

func (m *TokensMutation) 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 (*TokensMutation) SetID

func (m *TokensMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Tokens entities.

func (*TokensMutation) SetRaw

func (m *TokensMutation) SetRaw(value map[string]interface{})

SetRaw sets the "raw" field.

func (*TokensMutation) SetRefreshToken

func (m *TokensMutation) SetRefreshToken(s string)

SetRefreshToken sets the "refresh_token" field.

func (*TokensMutation) SetTokenType

func (m *TokensMutation) SetTokenType(s string)

SetTokenType sets the "token_type" field.

func (*TokensMutation) TokenType

func (m *TokensMutation) TokenType() (r string, exists bool)

TokenType returns the value of the "token_type" field in the mutation.

func (TokensMutation) Tx

func (m TokensMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TokensMutation) Type

func (m *TokensMutation) Type() string

Type returns the node type of this mutation (Tokens).

func (*TokensMutation) Where

func (m *TokensMutation) Where(ps ...predicate.Tokens)

Where appends a list predicates to the TokensMutation builder.

type TokensQuery

type TokensQuery struct {
	// contains filtered or unexported fields
}

TokensQuery is the builder for querying Tokens entities.

func (*TokensQuery) Aggregate

func (tq *TokensQuery) Aggregate(fns ...AggregateFunc) *TokensSelect

Aggregate returns a TokensSelect configured with the given aggregations.

func (*TokensQuery) All

func (tq *TokensQuery) All(ctx context.Context) ([]*Tokens, error)

All executes the query and returns a list of TokensSlice.

func (*TokensQuery) AllX

func (tq *TokensQuery) AllX(ctx context.Context) []*Tokens

AllX is like All, but panics if an error occurs.

func (*TokensQuery) Clone

func (tq *TokensQuery) Clone() *TokensQuery

Clone returns a duplicate of the TokensQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TokensQuery) Count

func (tq *TokensQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TokensQuery) CountX

func (tq *TokensQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TokensQuery) Exist

func (tq *TokensQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TokensQuery) ExistX

func (tq *TokensQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TokensQuery) First

func (tq *TokensQuery) First(ctx context.Context) (*Tokens, error)

First returns the first Tokens entity from the query. Returns a *NotFoundError when no Tokens was found.

func (*TokensQuery) FirstID

func (tq *TokensQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Tokens ID from the query. Returns a *NotFoundError when no Tokens ID was found.

func (*TokensQuery) FirstIDX

func (tq *TokensQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TokensQuery) FirstX

func (tq *TokensQuery) FirstX(ctx context.Context) *Tokens

FirstX is like First, but panics if an error occurs.

func (*TokensQuery) GroupBy

func (tq *TokensQuery) GroupBy(field string, fields ...string) *TokensGroupBy

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 {
	Email string `json:"email,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Tokens.Query().
	GroupBy(tokens.FieldEmail).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TokensQuery) IDs

func (tq *TokensQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Tokens IDs.

func (*TokensQuery) IDsX

func (tq *TokensQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*TokensQuery) Limit

func (tq *TokensQuery) Limit(limit int) *TokensQuery

Limit adds a limit step to the query.

func (*TokensQuery) Offset

func (tq *TokensQuery) Offset(offset int) *TokensQuery

Offset adds an offset step to the query.

func (*TokensQuery) Only

func (tq *TokensQuery) Only(ctx context.Context) (*Tokens, error)

Only returns a single Tokens entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tokens entity is found. Returns a *NotFoundError when no Tokens entities are found.

func (*TokensQuery) OnlyID

func (tq *TokensQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Tokens ID in the query. Returns a *NotSingularError when more than one Tokens ID is found. Returns a *NotFoundError when no entities are found.

func (*TokensQuery) OnlyIDX

func (tq *TokensQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TokensQuery) OnlyX

func (tq *TokensQuery) OnlyX(ctx context.Context) *Tokens

OnlyX is like Only, but panics if an error occurs.

func (*TokensQuery) Order

func (tq *TokensQuery) Order(o ...OrderFunc) *TokensQuery

Order adds an order step to the query.

func (*TokensQuery) Select

func (tq *TokensQuery) Select(fields ...string) *TokensSelect

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 {
	Email string `json:"email,omitempty"`
}

client.Tokens.Query().
	Select(tokens.FieldEmail).
	Scan(ctx, &v)

func (*TokensQuery) Unique

func (tq *TokensQuery) Unique(unique bool) *TokensQuery

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 (*TokensQuery) Where

func (tq *TokensQuery) Where(ps ...predicate.Tokens) *TokensQuery

Where adds a new predicate for the TokensQuery builder.

type TokensSelect

type TokensSelect struct {
	*TokensQuery
	// contains filtered or unexported fields
}

TokensSelect is the builder for selecting fields of Tokens entities.

func (*TokensSelect) Aggregate

func (ts *TokensSelect) Aggregate(fns ...AggregateFunc) *TokensSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TokensSelect) Bool

func (s *TokensSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TokensSelect) BoolX

func (s *TokensSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TokensSelect) Bools

func (s *TokensSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TokensSelect) BoolsX

func (s *TokensSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TokensSelect) Float64

func (s *TokensSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TokensSelect) Float64X

func (s *TokensSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TokensSelect) Float64s

func (s *TokensSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TokensSelect) Float64sX

func (s *TokensSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TokensSelect) Int

func (s *TokensSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TokensSelect) IntX

func (s *TokensSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TokensSelect) Ints

func (s *TokensSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TokensSelect) IntsX

func (s *TokensSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TokensSelect) Scan

func (ts *TokensSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TokensSelect) ScanX

func (s *TokensSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TokensSelect) String

func (s *TokensSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TokensSelect) StringX

func (s *TokensSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TokensSelect) Strings

func (s *TokensSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TokensSelect) StringsX

func (s *TokensSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TokensSlice

type TokensSlice []*Tokens

TokensSlice is a parsable slice of Tokens.

type TokensUpdate

type TokensUpdate struct {
	// contains filtered or unexported fields
}

TokensUpdate is the builder for updating Tokens entities.

func (*TokensUpdate) Exec

func (tu *TokensUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TokensUpdate) ExecX

func (tu *TokensUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokensUpdate) Mutation

func (tu *TokensUpdate) Mutation() *TokensMutation

Mutation returns the TokensMutation object of the builder.

func (*TokensUpdate) Save

func (tu *TokensUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TokensUpdate) SaveX

func (tu *TokensUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TokensUpdate) SetAccessToken

func (tu *TokensUpdate) SetAccessToken(s string) *TokensUpdate

SetAccessToken sets the "access_token" field.

func (*TokensUpdate) SetEmail

func (tu *TokensUpdate) SetEmail(s string) *TokensUpdate

SetEmail sets the "email" field.

func (*TokensUpdate) SetExpiry

func (tu *TokensUpdate) SetExpiry(t time.Time) *TokensUpdate

SetExpiry sets the "expiry" field.

func (*TokensUpdate) SetRaw

func (tu *TokensUpdate) SetRaw(m map[string]interface{}) *TokensUpdate

SetRaw sets the "raw" field.

func (*TokensUpdate) SetRefreshToken

func (tu *TokensUpdate) SetRefreshToken(s string) *TokensUpdate

SetRefreshToken sets the "refresh_token" field.

func (*TokensUpdate) SetTokenType

func (tu *TokensUpdate) SetTokenType(s string) *TokensUpdate

SetTokenType sets the "token_type" field.

func (*TokensUpdate) Where

func (tu *TokensUpdate) Where(ps ...predicate.Tokens) *TokensUpdate

Where appends a list predicates to the TokensUpdate builder.

type TokensUpdateOne

type TokensUpdateOne struct {
	// contains filtered or unexported fields
}

TokensUpdateOne is the builder for updating a single Tokens entity.

func (*TokensUpdateOne) Exec

func (tuo *TokensUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TokensUpdateOne) ExecX

func (tuo *TokensUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TokensUpdateOne) Mutation

func (tuo *TokensUpdateOne) Mutation() *TokensMutation

Mutation returns the TokensMutation object of the builder.

func (*TokensUpdateOne) Save

func (tuo *TokensUpdateOne) Save(ctx context.Context) (*Tokens, error)

Save executes the query and returns the updated Tokens entity.

func (*TokensUpdateOne) SaveX

func (tuo *TokensUpdateOne) SaveX(ctx context.Context) *Tokens

SaveX is like Save, but panics if an error occurs.

func (*TokensUpdateOne) Select

func (tuo *TokensUpdateOne) Select(field string, fields ...string) *TokensUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TokensUpdateOne) SetAccessToken

func (tuo *TokensUpdateOne) SetAccessToken(s string) *TokensUpdateOne

SetAccessToken sets the "access_token" field.

func (*TokensUpdateOne) SetEmail

func (tuo *TokensUpdateOne) SetEmail(s string) *TokensUpdateOne

SetEmail sets the "email" field.

func (*TokensUpdateOne) SetExpiry

func (tuo *TokensUpdateOne) SetExpiry(t time.Time) *TokensUpdateOne

SetExpiry sets the "expiry" field.

func (*TokensUpdateOne) SetRaw

func (tuo *TokensUpdateOne) SetRaw(m map[string]interface{}) *TokensUpdateOne

SetRaw sets the "raw" field.

func (*TokensUpdateOne) SetRefreshToken

func (tuo *TokensUpdateOne) SetRefreshToken(s string) *TokensUpdateOne

SetRefreshToken sets the "refresh_token" field.

func (*TokensUpdateOne) SetTokenType

func (tuo *TokensUpdateOne) SetTokenType(s string) *TokensUpdateOne

SetTokenType sets the "token_type" field.

type Tx

type Tx struct {

	// Account is the client for interacting with the Account builders.
	Account *AccountClient
	// AccountNotifs is the client for interacting with the AccountNotifs builders.
	AccountNotifs *AccountNotifsClient
	// LikeFeature is the client for interacting with the LikeFeature builders.
	LikeFeature *LikeFeatureClient
	// Post is the client for interacting with the Post builders.
	Post *PostClient
	// Qoute_retweet_feature is the client for interacting with the Qoute_retweet_feature builders.
	Qoute_retweet_feature *Qoute_retweet_featureClient
	// Retweet_feature is the client for interacting with the Retweet_feature builders.
	Retweet_feature *Retweet_featureClient
	// Tokens is the client for interacting with the Tokens builders.
	Tokens *TokensClient
	// Users is the client for interacting with the Users builders.
	Users *UsersClient
	// 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 Users

type Users struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// HashedPassword holds the value of the "hashed_password" field.
	HashedPassword string `json:"hashed_password,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// FullName holds the value of the "full_name" field.
	FullName string `json:"full_name,omitempty"`
	// PasswordChangedAt holds the value of the "password_changed_at" field.
	PasswordChangedAt time.Time `json:"password_changed_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Users is the model entity for the Users schema.

func (*Users) String

func (u *Users) String() string

String implements the fmt.Stringer.

func (*Users) Unwrap

func (u *Users) Unwrap() *Users

Unwrap unwraps the Users 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 (*Users) Update

func (u *Users) Update() *UsersUpdateOne

Update returns a builder for updating this Users. Note that you need to call Users.Unwrap() before calling this method if this Users was returned from a transaction, and the transaction was committed or rolled back.

type UsersClient

type UsersClient struct {
	// contains filtered or unexported fields
}

UsersClient is a client for the Users schema.

func NewUsersClient

func NewUsersClient(c config) *UsersClient

NewUsersClient returns a client for the Users from the given config.

func (*UsersClient) Create

func (c *UsersClient) Create() *UsersCreate

Create returns a builder for creating a Users entity.

func (*UsersClient) CreateBulk

func (c *UsersClient) CreateBulk(builders ...*UsersCreate) *UsersCreateBulk

CreateBulk returns a builder for creating a bulk of Users entities.

func (*UsersClient) Delete

func (c *UsersClient) Delete() *UsersDelete

Delete returns a delete builder for Users.

func (*UsersClient) DeleteOne

func (c *UsersClient) DeleteOne(u *Users) *UsersDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UsersClient) DeleteOneID

func (c *UsersClient) DeleteOneID(id uuid.UUID) *UsersDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UsersClient) Get

func (c *UsersClient) Get(ctx context.Context, id uuid.UUID) (*Users, error)

Get returns a Users entity by its id.

func (*UsersClient) GetX

func (c *UsersClient) GetX(ctx context.Context, id uuid.UUID) *Users

GetX is like Get, but panics if an error occurs.

func (*UsersClient) Hooks

func (c *UsersClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UsersClient) Query

func (c *UsersClient) Query() *UsersQuery

Query returns a query builder for Users.

func (*UsersClient) Update

func (c *UsersClient) Update() *UsersUpdate

Update returns an update builder for Users.

func (*UsersClient) UpdateOne

func (c *UsersClient) UpdateOne(u *Users) *UsersUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UsersClient) UpdateOneID

func (c *UsersClient) UpdateOneID(id uuid.UUID) *UsersUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UsersClient) Use

func (c *UsersClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `users.Hooks(f(g(h())))`.

type UsersCreate

type UsersCreate struct {
	// contains filtered or unexported fields
}

UsersCreate is the builder for creating a Users entity.

func (*UsersCreate) Exec

func (uc *UsersCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UsersCreate) ExecX

func (uc *UsersCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersCreate) Mutation

func (uc *UsersCreate) Mutation() *UsersMutation

Mutation returns the UsersMutation object of the builder.

func (*UsersCreate) Save

func (uc *UsersCreate) Save(ctx context.Context) (*Users, error)

Save creates the Users in the database.

func (*UsersCreate) SaveX

func (uc *UsersCreate) SaveX(ctx context.Context) *Users

SaveX calls Save and panics if Save returns an error.

func (*UsersCreate) SetCreatedAt

func (uc *UsersCreate) SetCreatedAt(t time.Time) *UsersCreate

SetCreatedAt sets the "created_at" field.

func (*UsersCreate) SetEmail

func (uc *UsersCreate) SetEmail(s string) *UsersCreate

SetEmail sets the "email" field.

func (*UsersCreate) SetFullName

func (uc *UsersCreate) SetFullName(s string) *UsersCreate

SetFullName sets the "full_name" field.

func (*UsersCreate) SetHashedPassword

func (uc *UsersCreate) SetHashedPassword(s string) *UsersCreate

SetHashedPassword sets the "hashed_password" field.

func (*UsersCreate) SetID

func (uc *UsersCreate) SetID(u uuid.UUID) *UsersCreate

SetID sets the "id" field.

func (*UsersCreate) SetNillableCreatedAt

func (uc *UsersCreate) SetNillableCreatedAt(t *time.Time) *UsersCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UsersCreate) SetNillableHashedPassword

func (uc *UsersCreate) SetNillableHashedPassword(s *string) *UsersCreate

SetNillableHashedPassword sets the "hashed_password" field if the given value is not nil.

func (*UsersCreate) SetNillablePasswordChangedAt

func (uc *UsersCreate) SetNillablePasswordChangedAt(t *time.Time) *UsersCreate

SetNillablePasswordChangedAt sets the "password_changed_at" field if the given value is not nil.

func (*UsersCreate) SetPasswordChangedAt

func (uc *UsersCreate) SetPasswordChangedAt(t time.Time) *UsersCreate

SetPasswordChangedAt sets the "password_changed_at" field.

func (*UsersCreate) SetUsername

func (uc *UsersCreate) SetUsername(s string) *UsersCreate

SetUsername sets the "username" field.

type UsersCreateBulk

type UsersCreateBulk struct {
	// contains filtered or unexported fields
}

UsersCreateBulk is the builder for creating many Users entities in bulk.

func (*UsersCreateBulk) Exec

func (ucb *UsersCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UsersCreateBulk) ExecX

func (ucb *UsersCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersCreateBulk) Save

func (ucb *UsersCreateBulk) Save(ctx context.Context) ([]*Users, error)

Save creates the Users entities in the database.

func (*UsersCreateBulk) SaveX

func (ucb *UsersCreateBulk) SaveX(ctx context.Context) []*Users

SaveX is like Save, but panics if an error occurs.

type UsersDelete

type UsersDelete struct {
	// contains filtered or unexported fields
}

UsersDelete is the builder for deleting a Users entity.

func (*UsersDelete) Exec

func (ud *UsersDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UsersDelete) ExecX

func (ud *UsersDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UsersDelete) Where

func (ud *UsersDelete) Where(ps ...predicate.Users) *UsersDelete

Where appends a list predicates to the UsersDelete builder.

type UsersDeleteOne

type UsersDeleteOne struct {
	// contains filtered or unexported fields
}

UsersDeleteOne is the builder for deleting a single Users entity.

func (*UsersDeleteOne) Exec

func (udo *UsersDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UsersDeleteOne) ExecX

func (udo *UsersDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type UsersGroupBy

type UsersGroupBy struct {
	// contains filtered or unexported fields
}

UsersGroupBy is the group-by builder for Users entities.

func (*UsersGroupBy) Aggregate

func (ugb *UsersGroupBy) Aggregate(fns ...AggregateFunc) *UsersGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UsersGroupBy) Bool

func (s *UsersGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UsersGroupBy) BoolX

func (s *UsersGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UsersGroupBy) Bools

func (s *UsersGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UsersGroupBy) BoolsX

func (s *UsersGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UsersGroupBy) Float64

func (s *UsersGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UsersGroupBy) Float64X

func (s *UsersGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UsersGroupBy) Float64s

func (s *UsersGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UsersGroupBy) Float64sX

func (s *UsersGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UsersGroupBy) Int

func (s *UsersGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UsersGroupBy) IntX

func (s *UsersGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UsersGroupBy) Ints

func (s *UsersGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UsersGroupBy) IntsX

func (s *UsersGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UsersGroupBy) Scan

func (ugb *UsersGroupBy) Scan(ctx context.Context, v any) error

Scan applies the group-by query and scans the result into the given value.

func (*UsersGroupBy) ScanX

func (s *UsersGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UsersGroupBy) String

func (s *UsersGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UsersGroupBy) StringX

func (s *UsersGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UsersGroupBy) Strings

func (s *UsersGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UsersGroupBy) StringsX

func (s *UsersGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UsersMutation

type UsersMutation struct {
	// contains filtered or unexported fields
}

UsersMutation represents an operation that mutates the Users nodes in the graph.

func (*UsersMutation) AddField

func (m *UsersMutation) 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 (*UsersMutation) AddedEdges

func (m *UsersMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UsersMutation) AddedField

func (m *UsersMutation) 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 (*UsersMutation) AddedFields

func (m *UsersMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UsersMutation) AddedIDs

func (m *UsersMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UsersMutation) ClearEdge

func (m *UsersMutation) 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 (*UsersMutation) ClearField

func (m *UsersMutation) 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 (*UsersMutation) ClearHashedPassword

func (m *UsersMutation) ClearHashedPassword()

ClearHashedPassword clears the value of the "hashed_password" field.

func (*UsersMutation) ClearPasswordChangedAt

func (m *UsersMutation) ClearPasswordChangedAt()

ClearPasswordChangedAt clears the value of the "password_changed_at" field.

func (*UsersMutation) ClearedEdges

func (m *UsersMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UsersMutation) ClearedFields

func (m *UsersMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UsersMutation) Client

func (m UsersMutation) 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 (*UsersMutation) CreatedAt

func (m *UsersMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UsersMutation) EdgeCleared

func (m *UsersMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UsersMutation) Email

func (m *UsersMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UsersMutation) Field

func (m *UsersMutation) 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 (*UsersMutation) FieldCleared

func (m *UsersMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UsersMutation) Fields

func (m *UsersMutation) 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 (*UsersMutation) FullName

func (m *UsersMutation) FullName() (r string, exists bool)

FullName returns the value of the "full_name" field in the mutation.

func (*UsersMutation) HashedPassword

func (m *UsersMutation) HashedPassword() (r string, exists bool)

HashedPassword returns the value of the "hashed_password" field in the mutation.

func (*UsersMutation) HashedPasswordCleared

func (m *UsersMutation) HashedPasswordCleared() bool

HashedPasswordCleared returns if the "hashed_password" field was cleared in this mutation.

func (*UsersMutation) ID

func (m *UsersMutation) 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 (*UsersMutation) IDs

func (m *UsersMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UsersMutation) OldCreatedAt

func (m *UsersMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Users entity. If the Users 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 (*UsersMutation) OldEmail

func (m *UsersMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the Users entity. If the Users 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 (*UsersMutation) OldField

func (m *UsersMutation) 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 (*UsersMutation) OldFullName

func (m *UsersMutation) OldFullName(ctx context.Context) (v string, err error)

OldFullName returns the old "full_name" field's value of the Users entity. If the Users 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 (*UsersMutation) OldHashedPassword

func (m *UsersMutation) OldHashedPassword(ctx context.Context) (v string, err error)

OldHashedPassword returns the old "hashed_password" field's value of the Users entity. If the Users 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 (*UsersMutation) OldPasswordChangedAt

func (m *UsersMutation) OldPasswordChangedAt(ctx context.Context) (v time.Time, err error)

OldPasswordChangedAt returns the old "password_changed_at" field's value of the Users entity. If the Users 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 (*UsersMutation) OldUsername

func (m *UsersMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the Users entity. If the Users 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 (*UsersMutation) Op

func (m *UsersMutation) Op() Op

Op returns the operation name.

func (*UsersMutation) PasswordChangedAt

func (m *UsersMutation) PasswordChangedAt() (r time.Time, exists bool)

PasswordChangedAt returns the value of the "password_changed_at" field in the mutation.

func (*UsersMutation) PasswordChangedAtCleared

func (m *UsersMutation) PasswordChangedAtCleared() bool

PasswordChangedAtCleared returns if the "password_changed_at" field was cleared in this mutation.

func (*UsersMutation) RemovedEdges

func (m *UsersMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UsersMutation) RemovedIDs

func (m *UsersMutation) 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 (*UsersMutation) ResetCreatedAt

func (m *UsersMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UsersMutation) ResetEdge

func (m *UsersMutation) 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 (*UsersMutation) ResetEmail

func (m *UsersMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UsersMutation) ResetField

func (m *UsersMutation) 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 (*UsersMutation) ResetFullName

func (m *UsersMutation) ResetFullName()

ResetFullName resets all changes to the "full_name" field.

func (*UsersMutation) ResetHashedPassword

func (m *UsersMutation) ResetHashedPassword()

ResetHashedPassword resets all changes to the "hashed_password" field.

func (*UsersMutation) ResetPasswordChangedAt

func (m *UsersMutation) ResetPasswordChangedAt()

ResetPasswordChangedAt resets all changes to the "password_changed_at" field.

func (*UsersMutation) ResetUsername

func (m *UsersMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*UsersMutation) SetCreatedAt

func (m *UsersMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UsersMutation) SetEmail

func (m *UsersMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UsersMutation) SetField

func (m *UsersMutation) 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 (*UsersMutation) SetFullName

func (m *UsersMutation) SetFullName(s string)

SetFullName sets the "full_name" field.

func (*UsersMutation) SetHashedPassword

func (m *UsersMutation) SetHashedPassword(s string)

SetHashedPassword sets the "hashed_password" field.

func (*UsersMutation) SetID

func (m *UsersMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Users entities.

func (*UsersMutation) SetPasswordChangedAt

func (m *UsersMutation) SetPasswordChangedAt(t time.Time)

SetPasswordChangedAt sets the "password_changed_at" field.

func (*UsersMutation) SetUsername

func (m *UsersMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (UsersMutation) Tx

func (m UsersMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UsersMutation) Type

func (m *UsersMutation) Type() string

Type returns the node type of this mutation (Users).

func (*UsersMutation) Username

func (m *UsersMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*UsersMutation) Where

func (m *UsersMutation) Where(ps ...predicate.Users)

Where appends a list predicates to the UsersMutation builder.

type UsersQuery

type UsersQuery struct {
	// contains filtered or unexported fields
}

UsersQuery is the builder for querying Users entities.

func (*UsersQuery) Aggregate

func (uq *UsersQuery) Aggregate(fns ...AggregateFunc) *UsersSelect

Aggregate returns a UsersSelect configured with the given aggregations.

func (*UsersQuery) All

func (uq *UsersQuery) All(ctx context.Context) ([]*Users, error)

All executes the query and returns a list of UsersSlice.

func (*UsersQuery) AllX

func (uq *UsersQuery) AllX(ctx context.Context) []*Users

AllX is like All, but panics if an error occurs.

func (*UsersQuery) Clone

func (uq *UsersQuery) Clone() *UsersQuery

Clone returns a duplicate of the UsersQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UsersQuery) Count

func (uq *UsersQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UsersQuery) CountX

func (uq *UsersQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UsersQuery) Exist

func (uq *UsersQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UsersQuery) ExistX

func (uq *UsersQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UsersQuery) First

func (uq *UsersQuery) First(ctx context.Context) (*Users, error)

First returns the first Users entity from the query. Returns a *NotFoundError when no Users was found.

func (*UsersQuery) FirstID

func (uq *UsersQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Users ID from the query. Returns a *NotFoundError when no Users ID was found.

func (*UsersQuery) FirstIDX

func (uq *UsersQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UsersQuery) FirstX

func (uq *UsersQuery) FirstX(ctx context.Context) *Users

FirstX is like First, but panics if an error occurs.

func (*UsersQuery) GroupBy

func (uq *UsersQuery) GroupBy(field string, fields ...string) *UsersGroupBy

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:"username,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Users.Query().
	GroupBy(users.FieldUsername).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UsersQuery) IDs

func (uq *UsersQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Users IDs.

func (*UsersQuery) IDsX

func (uq *UsersQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UsersQuery) Limit

func (uq *UsersQuery) Limit(limit int) *UsersQuery

Limit adds a limit step to the query.

func (*UsersQuery) Offset

func (uq *UsersQuery) Offset(offset int) *UsersQuery

Offset adds an offset step to the query.

func (*UsersQuery) Only

func (uq *UsersQuery) Only(ctx context.Context) (*Users, error)

Only returns a single Users entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Users entity is found. Returns a *NotFoundError when no Users entities are found.

func (*UsersQuery) OnlyID

func (uq *UsersQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Users ID in the query. Returns a *NotSingularError when more than one Users ID is found. Returns a *NotFoundError when no entities are found.

func (*UsersQuery) OnlyIDX

func (uq *UsersQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UsersQuery) OnlyX

func (uq *UsersQuery) OnlyX(ctx context.Context) *Users

OnlyX is like Only, but panics if an error occurs.

func (*UsersQuery) Order

func (uq *UsersQuery) Order(o ...OrderFunc) *UsersQuery

Order adds an order step to the query.

func (*UsersQuery) Select

func (uq *UsersQuery) Select(fields ...string) *UsersSelect

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:"username,omitempty"`
}

client.Users.Query().
	Select(users.FieldUsername).
	Scan(ctx, &v)

func (*UsersQuery) Unique

func (uq *UsersQuery) Unique(unique bool) *UsersQuery

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 (*UsersQuery) Where

func (uq *UsersQuery) Where(ps ...predicate.Users) *UsersQuery

Where adds a new predicate for the UsersQuery builder.

type UsersSelect

type UsersSelect struct {
	*UsersQuery
	// contains filtered or unexported fields
}

UsersSelect is the builder for selecting fields of Users entities.

func (*UsersSelect) Aggregate

func (us *UsersSelect) Aggregate(fns ...AggregateFunc) *UsersSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UsersSelect) Bool

func (s *UsersSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UsersSelect) BoolX

func (s *UsersSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UsersSelect) Bools

func (s *UsersSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UsersSelect) BoolsX

func (s *UsersSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UsersSelect) Float64

func (s *UsersSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UsersSelect) Float64X

func (s *UsersSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UsersSelect) Float64s

func (s *UsersSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UsersSelect) Float64sX

func (s *UsersSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UsersSelect) Int

func (s *UsersSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UsersSelect) IntX

func (s *UsersSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UsersSelect) Ints

func (s *UsersSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UsersSelect) IntsX

func (s *UsersSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UsersSelect) Scan

func (us *UsersSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UsersSelect) ScanX

func (s *UsersSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UsersSelect) String

func (s *UsersSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UsersSelect) StringX

func (s *UsersSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UsersSelect) Strings

func (s *UsersSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UsersSelect) StringsX

func (s *UsersSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UsersSlice

type UsersSlice []*Users

UsersSlice is a parsable slice of Users.

type UsersUpdate

type UsersUpdate struct {
	// contains filtered or unexported fields
}

UsersUpdate is the builder for updating Users entities.

func (*UsersUpdate) ClearHashedPassword

func (uu *UsersUpdate) ClearHashedPassword() *UsersUpdate

ClearHashedPassword clears the value of the "hashed_password" field.

func (*UsersUpdate) ClearPasswordChangedAt

func (uu *UsersUpdate) ClearPasswordChangedAt() *UsersUpdate

ClearPasswordChangedAt clears the value of the "password_changed_at" field.

func (*UsersUpdate) Exec

func (uu *UsersUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UsersUpdate) ExecX

func (uu *UsersUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersUpdate) Mutation

func (uu *UsersUpdate) Mutation() *UsersMutation

Mutation returns the UsersMutation object of the builder.

func (*UsersUpdate) Save

func (uu *UsersUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UsersUpdate) SaveX

func (uu *UsersUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UsersUpdate) SetCreatedAt

func (uu *UsersUpdate) SetCreatedAt(t time.Time) *UsersUpdate

SetCreatedAt sets the "created_at" field.

func (*UsersUpdate) SetEmail

func (uu *UsersUpdate) SetEmail(s string) *UsersUpdate

SetEmail sets the "email" field.

func (*UsersUpdate) SetFullName

func (uu *UsersUpdate) SetFullName(s string) *UsersUpdate

SetFullName sets the "full_name" field.

func (*UsersUpdate) SetHashedPassword

func (uu *UsersUpdate) SetHashedPassword(s string) *UsersUpdate

SetHashedPassword sets the "hashed_password" field.

func (*UsersUpdate) SetNillableCreatedAt

func (uu *UsersUpdate) SetNillableCreatedAt(t *time.Time) *UsersUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UsersUpdate) SetNillableHashedPassword

func (uu *UsersUpdate) SetNillableHashedPassword(s *string) *UsersUpdate

SetNillableHashedPassword sets the "hashed_password" field if the given value is not nil.

func (*UsersUpdate) SetNillablePasswordChangedAt

func (uu *UsersUpdate) SetNillablePasswordChangedAt(t *time.Time) *UsersUpdate

SetNillablePasswordChangedAt sets the "password_changed_at" field if the given value is not nil.

func (*UsersUpdate) SetPasswordChangedAt

func (uu *UsersUpdate) SetPasswordChangedAt(t time.Time) *UsersUpdate

SetPasswordChangedAt sets the "password_changed_at" field.

func (*UsersUpdate) SetUsername

func (uu *UsersUpdate) SetUsername(s string) *UsersUpdate

SetUsername sets the "username" field.

func (*UsersUpdate) Where

func (uu *UsersUpdate) Where(ps ...predicate.Users) *UsersUpdate

Where appends a list predicates to the UsersUpdate builder.

type UsersUpdateOne

type UsersUpdateOne struct {
	// contains filtered or unexported fields
}

UsersUpdateOne is the builder for updating a single Users entity.

func (*UsersUpdateOne) ClearHashedPassword

func (uuo *UsersUpdateOne) ClearHashedPassword() *UsersUpdateOne

ClearHashedPassword clears the value of the "hashed_password" field.

func (*UsersUpdateOne) ClearPasswordChangedAt

func (uuo *UsersUpdateOne) ClearPasswordChangedAt() *UsersUpdateOne

ClearPasswordChangedAt clears the value of the "password_changed_at" field.

func (*UsersUpdateOne) Exec

func (uuo *UsersUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UsersUpdateOne) ExecX

func (uuo *UsersUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsersUpdateOne) Mutation

func (uuo *UsersUpdateOne) Mutation() *UsersMutation

Mutation returns the UsersMutation object of the builder.

func (*UsersUpdateOne) Save

func (uuo *UsersUpdateOne) Save(ctx context.Context) (*Users, error)

Save executes the query and returns the updated Users entity.

func (*UsersUpdateOne) SaveX

func (uuo *UsersUpdateOne) SaveX(ctx context.Context) *Users

SaveX is like Save, but panics if an error occurs.

func (*UsersUpdateOne) Select

func (uuo *UsersUpdateOne) Select(field string, fields ...string) *UsersUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UsersUpdateOne) SetCreatedAt

func (uuo *UsersUpdateOne) SetCreatedAt(t time.Time) *UsersUpdateOne

SetCreatedAt sets the "created_at" field.

func (*UsersUpdateOne) SetEmail

func (uuo *UsersUpdateOne) SetEmail(s string) *UsersUpdateOne

SetEmail sets the "email" field.

func (*UsersUpdateOne) SetFullName

func (uuo *UsersUpdateOne) SetFullName(s string) *UsersUpdateOne

SetFullName sets the "full_name" field.

func (*UsersUpdateOne) SetHashedPassword

func (uuo *UsersUpdateOne) SetHashedPassword(s string) *UsersUpdateOne

SetHashedPassword sets the "hashed_password" field.

func (*UsersUpdateOne) SetNillableCreatedAt

func (uuo *UsersUpdateOne) SetNillableCreatedAt(t *time.Time) *UsersUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UsersUpdateOne) SetNillableHashedPassword

func (uuo *UsersUpdateOne) SetNillableHashedPassword(s *string) *UsersUpdateOne

SetNillableHashedPassword sets the "hashed_password" field if the given value is not nil.

func (*UsersUpdateOne) SetNillablePasswordChangedAt

func (uuo *UsersUpdateOne) SetNillablePasswordChangedAt(t *time.Time) *UsersUpdateOne

SetNillablePasswordChangedAt sets the "password_changed_at" field if the given value is not nil.

func (*UsersUpdateOne) SetPasswordChangedAt

func (uuo *UsersUpdateOne) SetPasswordChangedAt(t time.Time) *UsersUpdateOne

SetPasswordChangedAt sets the "password_changed_at" field.

func (*UsersUpdateOne) SetUsername

func (uuo *UsersUpdateOne) SetUsername(s string) *UsersUpdateOne

SetUsername sets the "username" field.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL