ent

package
v0.0.0-...-bfbcaf2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 51 Imported by: 13

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.
	TypeApiToken             = "ApiToken"
	TypeAuthClient           = "AuthClient"
	TypeBannedWords          = "BannedWords"
	TypeCredit               = "Credit"
	TypeCreditType           = "CreditType"
	TypeDeviceInfo           = "DeviceInfo"
	TypeDisposableEmail      = "DisposableEmail"
	TypeGeneration           = "Generation"
	TypeGenerationModel      = "GenerationModel"
	TypeGenerationOutput     = "GenerationOutput"
	TypeGenerationOutputLike = "GenerationOutputLike"
	TypeIPBlackList          = "IPBlackList"
	TypeMqLog                = "MqLog"
	TypeNegativePrompt       = "NegativePrompt"
	TypePrompt               = "Prompt"
	TypeRole                 = "Role"
	TypeScheduler            = "Scheduler"
	TypeThumbmarkIdBlackList = "ThumbmarkIdBlackList"
	TypeTipLog               = "TipLog"
	TypeUpscale              = "Upscale"
	TypeUpscaleModel         = "UpscaleModel"
	TypeUpscaleOutput        = "UpscaleOutput"
	TypeUser                 = "User"
	TypeUsernameBlacklist    = "UsernameBlacklist"
	TypeVoiceover            = "Voiceover"
	TypeVoiceoverModel       = "VoiceoverModel"
	TypeVoiceoverOutput      = "VoiceoverOutput"
	TypeVoiceoverSpeaker     = "VoiceoverSpeaker"
)

Variables

This section is empty.

Functions

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

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

func As

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

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

func Count

func Count() AggregateFunc

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

func Max

func Max(field string) AggregateFunc

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

func Mean

func Mean(field string) AggregateFunc

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

func Min

func Min(field string) AggregateFunc

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

func Sum

func Sum(field string) AggregateFunc

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

type ApiToken

type ApiToken struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// HashedToken holds the value of the "hashed_token" field.
	HashedToken string `json:"hashed_token,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// ShortString holds the value of the "short_string" field.
	ShortString string `json:"short_string,omitempty"`
	// IsActive holds the value of the "is_active" field.
	IsActive bool `json:"is_active,omitempty"`
	// Uses holds the value of the "uses" field.
	Uses int `json:"uses,omitempty"`
	// CreditsSpent holds the value of the "credits_spent" field.
	CreditsSpent int `json:"credits_spent,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// AuthClientID holds the value of the "auth_client_id" field.
	AuthClientID *uuid.UUID `json:"auth_client_id,omitempty"`
	// LastUsedAt holds the value of the "last_used_at" field.
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ApiTokenQuery when eager-loading is set.
	Edges ApiTokenEdges `json:"edges"`
	// contains filtered or unexported fields
}

ApiToken is the model entity for the ApiToken schema.

func (*ApiToken) ExecContext

func (c *ApiToken) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ApiToken) QueryAuthClients

func (at *ApiToken) QueryAuthClients() *AuthClientQuery

QueryAuthClients queries the "auth_clients" edge of the ApiToken entity.

func (*ApiToken) QueryContext

func (c *ApiToken) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ApiToken) QueryGenerations

func (at *ApiToken) QueryGenerations() *GenerationQuery

QueryGenerations queries the "generations" edge of the ApiToken entity.

func (*ApiToken) QueryUpscales

func (at *ApiToken) QueryUpscales() *UpscaleQuery

QueryUpscales queries the "upscales" edge of the ApiToken entity.

func (*ApiToken) QueryUser

func (at *ApiToken) QueryUser() *UserQuery

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

func (*ApiToken) QueryVoiceovers

func (at *ApiToken) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers queries the "voiceovers" edge of the ApiToken entity.

func (*ApiToken) String

func (at *ApiToken) String() string

String implements the fmt.Stringer.

func (*ApiToken) Unwrap

func (at *ApiToken) Unwrap() *ApiToken

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

func (at *ApiToken) Update() *ApiTokenUpdateOne

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

type ApiTokenClient

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

ApiTokenClient is a client for the ApiToken schema.

func NewApiTokenClient

func NewApiTokenClient(c config) *ApiTokenClient

NewApiTokenClient returns a client for the ApiToken from the given config.

func (*ApiTokenClient) Create

func (c *ApiTokenClient) Create() *ApiTokenCreate

Create returns a builder for creating a ApiToken entity.

func (*ApiTokenClient) CreateBulk

func (c *ApiTokenClient) CreateBulk(builders ...*ApiTokenCreate) *ApiTokenCreateBulk

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

func (*ApiTokenClient) Delete

func (c *ApiTokenClient) Delete() *ApiTokenDelete

Delete returns a delete builder for ApiToken.

func (*ApiTokenClient) DeleteOne

func (c *ApiTokenClient) DeleteOne(at *ApiToken) *ApiTokenDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ApiTokenClient) DeleteOneID

func (c *ApiTokenClient) DeleteOneID(id uuid.UUID) *ApiTokenDeleteOne

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

func (*ApiTokenClient) ExecContext

func (c *ApiTokenClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ApiTokenClient) Get

func (c *ApiTokenClient) Get(ctx context.Context, id uuid.UUID) (*ApiToken, error)

Get returns a ApiToken entity by its id.

func (*ApiTokenClient) GetX

func (c *ApiTokenClient) GetX(ctx context.Context, id uuid.UUID) *ApiToken

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

func (*ApiTokenClient) Hooks

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

Hooks returns the client hooks.

func (*ApiTokenClient) Intercept

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

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

func (*ApiTokenClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ApiTokenClient) Query

func (c *ApiTokenClient) Query() *ApiTokenQuery

Query returns a query builder for ApiToken.

func (*ApiTokenClient) QueryAuthClients

func (c *ApiTokenClient) QueryAuthClients(at *ApiToken) *AuthClientQuery

QueryAuthClients queries the auth_clients edge of a ApiToken.

func (*ApiTokenClient) QueryContext

func (c *ApiTokenClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ApiTokenClient) QueryGenerations

func (c *ApiTokenClient) QueryGenerations(at *ApiToken) *GenerationQuery

QueryGenerations queries the generations edge of a ApiToken.

func (*ApiTokenClient) QueryUpscales

func (c *ApiTokenClient) QueryUpscales(at *ApiToken) *UpscaleQuery

QueryUpscales queries the upscales edge of a ApiToken.

func (*ApiTokenClient) QueryUser

func (c *ApiTokenClient) QueryUser(at *ApiToken) *UserQuery

QueryUser queries the user edge of a ApiToken.

func (*ApiTokenClient) QueryVoiceovers

func (c *ApiTokenClient) QueryVoiceovers(at *ApiToken) *VoiceoverQuery

QueryVoiceovers queries the voiceovers edge of a ApiToken.

func (*ApiTokenClient) Update

func (c *ApiTokenClient) Update() *ApiTokenUpdate

Update returns an update builder for ApiToken.

func (*ApiTokenClient) UpdateOne

func (c *ApiTokenClient) UpdateOne(at *ApiToken) *ApiTokenUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ApiTokenClient) UpdateOneID

func (c *ApiTokenClient) UpdateOneID(id uuid.UUID) *ApiTokenUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ApiTokenClient) Use

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

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

type ApiTokenCreate

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

ApiTokenCreate is the builder for creating a ApiToken entity.

func (*ApiTokenCreate) AddGenerationIDs

func (atc *ApiTokenCreate) AddGenerationIDs(ids ...uuid.UUID) *ApiTokenCreate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*ApiTokenCreate) AddGenerations

func (atc *ApiTokenCreate) AddGenerations(g ...*Generation) *ApiTokenCreate

AddGenerations adds the "generations" edges to the Generation entity.

func (*ApiTokenCreate) AddUpscaleIDs

func (atc *ApiTokenCreate) AddUpscaleIDs(ids ...uuid.UUID) *ApiTokenCreate

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*ApiTokenCreate) AddUpscales

func (atc *ApiTokenCreate) AddUpscales(u ...*Upscale) *ApiTokenCreate

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*ApiTokenCreate) AddVoiceoverIDs

func (atc *ApiTokenCreate) AddVoiceoverIDs(ids ...uuid.UUID) *ApiTokenCreate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*ApiTokenCreate) AddVoiceovers

func (atc *ApiTokenCreate) AddVoiceovers(v ...*Voiceover) *ApiTokenCreate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*ApiTokenCreate) Exec

func (atc *ApiTokenCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ApiTokenCreate) ExecContext

func (c *ApiTokenCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ApiTokenCreate) ExecX

func (atc *ApiTokenCreate) ExecX(ctx context.Context)

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

func (*ApiTokenCreate) Mutation

func (atc *ApiTokenCreate) Mutation() *ApiTokenMutation

Mutation returns the ApiTokenMutation object of the builder.

func (*ApiTokenCreate) OnConflict

func (atc *ApiTokenCreate) OnConflict(opts ...sql.ConflictOption) *ApiTokenUpsertOne

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

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

func (*ApiTokenCreate) OnConflictColumns

func (atc *ApiTokenCreate) OnConflictColumns(columns ...string) *ApiTokenUpsertOne

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

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

func (*ApiTokenCreate) QueryContext

func (c *ApiTokenCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ApiTokenCreate) Save

func (atc *ApiTokenCreate) Save(ctx context.Context) (*ApiToken, error)

Save creates the ApiToken in the database.

func (*ApiTokenCreate) SaveX

func (atc *ApiTokenCreate) SaveX(ctx context.Context) *ApiToken

SaveX calls Save and panics if Save returns an error.

func (*ApiTokenCreate) SetAuthClientID

func (atc *ApiTokenCreate) SetAuthClientID(u uuid.UUID) *ApiTokenCreate

SetAuthClientID sets the "auth_client_id" field.

func (*ApiTokenCreate) SetAuthClients

func (atc *ApiTokenCreate) SetAuthClients(a *AuthClient) *ApiTokenCreate

SetAuthClients sets the "auth_clients" edge to the AuthClient entity.

func (*ApiTokenCreate) SetAuthClientsID

func (atc *ApiTokenCreate) SetAuthClientsID(id uuid.UUID) *ApiTokenCreate

SetAuthClientsID sets the "auth_clients" edge to the AuthClient entity by ID.

func (*ApiTokenCreate) SetCreatedAt

func (atc *ApiTokenCreate) SetCreatedAt(t time.Time) *ApiTokenCreate

SetCreatedAt sets the "created_at" field.

func (*ApiTokenCreate) SetCreditsSpent

func (atc *ApiTokenCreate) SetCreditsSpent(i int) *ApiTokenCreate

SetCreditsSpent sets the "credits_spent" field.

func (*ApiTokenCreate) SetHashedToken

func (atc *ApiTokenCreate) SetHashedToken(s string) *ApiTokenCreate

SetHashedToken sets the "hashed_token" field.

func (*ApiTokenCreate) SetID

func (atc *ApiTokenCreate) SetID(u uuid.UUID) *ApiTokenCreate

SetID sets the "id" field.

func (*ApiTokenCreate) SetIsActive

func (atc *ApiTokenCreate) SetIsActive(b bool) *ApiTokenCreate

SetIsActive sets the "is_active" field.

func (*ApiTokenCreate) SetLastUsedAt

func (atc *ApiTokenCreate) SetLastUsedAt(t time.Time) *ApiTokenCreate

SetLastUsedAt sets the "last_used_at" field.

func (*ApiTokenCreate) SetName

func (atc *ApiTokenCreate) SetName(s string) *ApiTokenCreate

SetName sets the "name" field.

func (*ApiTokenCreate) SetNillableAuthClientID

func (atc *ApiTokenCreate) SetNillableAuthClientID(u *uuid.UUID) *ApiTokenCreate

SetNillableAuthClientID sets the "auth_client_id" field if the given value is not nil.

func (*ApiTokenCreate) SetNillableAuthClientsID

func (atc *ApiTokenCreate) SetNillableAuthClientsID(id *uuid.UUID) *ApiTokenCreate

SetNillableAuthClientsID sets the "auth_clients" edge to the AuthClient entity by ID if the given value is not nil.

func (*ApiTokenCreate) SetNillableCreatedAt

func (atc *ApiTokenCreate) SetNillableCreatedAt(t *time.Time) *ApiTokenCreate

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

func (*ApiTokenCreate) SetNillableCreditsSpent

func (atc *ApiTokenCreate) SetNillableCreditsSpent(i *int) *ApiTokenCreate

SetNillableCreditsSpent sets the "credits_spent" field if the given value is not nil.

func (*ApiTokenCreate) SetNillableID

func (atc *ApiTokenCreate) SetNillableID(u *uuid.UUID) *ApiTokenCreate

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

func (*ApiTokenCreate) SetNillableIsActive

func (atc *ApiTokenCreate) SetNillableIsActive(b *bool) *ApiTokenCreate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*ApiTokenCreate) SetNillableLastUsedAt

func (atc *ApiTokenCreate) SetNillableLastUsedAt(t *time.Time) *ApiTokenCreate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ApiTokenCreate) SetNillableUpdatedAt

func (atc *ApiTokenCreate) SetNillableUpdatedAt(t *time.Time) *ApiTokenCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ApiTokenCreate) SetNillableUses

func (atc *ApiTokenCreate) SetNillableUses(i *int) *ApiTokenCreate

SetNillableUses sets the "uses" field if the given value is not nil.

func (*ApiTokenCreate) SetShortString

func (atc *ApiTokenCreate) SetShortString(s string) *ApiTokenCreate

SetShortString sets the "short_string" field.

func (*ApiTokenCreate) SetUpdatedAt

func (atc *ApiTokenCreate) SetUpdatedAt(t time.Time) *ApiTokenCreate

SetUpdatedAt sets the "updated_at" field.

func (*ApiTokenCreate) SetUser

func (atc *ApiTokenCreate) SetUser(u *User) *ApiTokenCreate

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

func (*ApiTokenCreate) SetUserID

func (atc *ApiTokenCreate) SetUserID(u uuid.UUID) *ApiTokenCreate

SetUserID sets the "user_id" field.

func (*ApiTokenCreate) SetUses

func (atc *ApiTokenCreate) SetUses(i int) *ApiTokenCreate

SetUses sets the "uses" field.

type ApiTokenCreateBulk

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

ApiTokenCreateBulk is the builder for creating many ApiToken entities in bulk.

func (*ApiTokenCreateBulk) Exec

func (atcb *ApiTokenCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ApiTokenCreateBulk) ExecContext

func (c *ApiTokenCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ApiTokenCreateBulk) ExecX

func (atcb *ApiTokenCreateBulk) ExecX(ctx context.Context)

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

func (*ApiTokenCreateBulk) OnConflict

func (atcb *ApiTokenCreateBulk) OnConflict(opts ...sql.ConflictOption) *ApiTokenUpsertBulk

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

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

func (*ApiTokenCreateBulk) OnConflictColumns

func (atcb *ApiTokenCreateBulk) OnConflictColumns(columns ...string) *ApiTokenUpsertBulk

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

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

func (*ApiTokenCreateBulk) QueryContext

func (c *ApiTokenCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ApiTokenCreateBulk) Save

func (atcb *ApiTokenCreateBulk) Save(ctx context.Context) ([]*ApiToken, error)

Save creates the ApiToken entities in the database.

func (*ApiTokenCreateBulk) SaveX

func (atcb *ApiTokenCreateBulk) SaveX(ctx context.Context) []*ApiToken

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

type ApiTokenDelete

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

ApiTokenDelete is the builder for deleting a ApiToken entity.

func (*ApiTokenDelete) Exec

func (atd *ApiTokenDelete) Exec(ctx context.Context) (int, error)

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

func (*ApiTokenDelete) ExecContext

func (c *ApiTokenDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ApiTokenDelete) ExecX

func (atd *ApiTokenDelete) ExecX(ctx context.Context) int

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

func (*ApiTokenDelete) QueryContext

func (c *ApiTokenDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ApiTokenDelete) Where

func (atd *ApiTokenDelete) Where(ps ...predicate.ApiToken) *ApiTokenDelete

Where appends a list predicates to the ApiTokenDelete builder.

type ApiTokenDeleteOne

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

ApiTokenDeleteOne is the builder for deleting a single ApiToken entity.

func (*ApiTokenDeleteOne) Exec

func (atdo *ApiTokenDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ApiTokenDeleteOne) ExecX

func (atdo *ApiTokenDeleteOne) ExecX(ctx context.Context)

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

type ApiTokenEdges

type ApiTokenEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Generations holds the value of the generations edge.
	Generations []*Generation `json:"generations,omitempty"`
	// Upscales holds the value of the upscales edge.
	Upscales []*Upscale `json:"upscales,omitempty"`
	// Voiceovers holds the value of the voiceovers edge.
	Voiceovers []*Voiceover `json:"voiceovers,omitempty"`
	// AuthClients holds the value of the auth_clients edge.
	AuthClients *AuthClient `json:"auth_clients,omitempty"`
	// contains filtered or unexported fields
}

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

func (ApiTokenEdges) AuthClientsOrErr

func (e ApiTokenEdges) AuthClientsOrErr() (*AuthClient, error)

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

func (ApiTokenEdges) GenerationsOrErr

func (e ApiTokenEdges) GenerationsOrErr() ([]*Generation, error)

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

func (ApiTokenEdges) UpscalesOrErr

func (e ApiTokenEdges) UpscalesOrErr() ([]*Upscale, error)

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

func (ApiTokenEdges) UserOrErr

func (e ApiTokenEdges) UserOrErr() (*User, error)

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

func (ApiTokenEdges) VoiceoversOrErr

func (e ApiTokenEdges) VoiceoversOrErr() ([]*Voiceover, error)

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

type ApiTokenGroupBy

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

ApiTokenGroupBy is the group-by builder for ApiToken entities.

func (*ApiTokenGroupBy) Aggregate

func (atgb *ApiTokenGroupBy) Aggregate(fns ...AggregateFunc) *ApiTokenGroupBy

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

func (*ApiTokenGroupBy) Bool

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

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

func (*ApiTokenGroupBy) BoolX

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

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

func (*ApiTokenGroupBy) Bools

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

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

func (*ApiTokenGroupBy) BoolsX

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

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

func (*ApiTokenGroupBy) Float64

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

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

func (*ApiTokenGroupBy) Float64X

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

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

func (*ApiTokenGroupBy) Float64s

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

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

func (*ApiTokenGroupBy) Float64sX

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

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

func (*ApiTokenGroupBy) Int

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

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

func (*ApiTokenGroupBy) IntX

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

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

func (*ApiTokenGroupBy) Ints

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

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

func (*ApiTokenGroupBy) IntsX

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

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

func (*ApiTokenGroupBy) Scan

func (atgb *ApiTokenGroupBy) Scan(ctx context.Context, v any) error

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

func (*ApiTokenGroupBy) ScanX

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

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

func (*ApiTokenGroupBy) String

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

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

func (*ApiTokenGroupBy) StringX

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

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

func (*ApiTokenGroupBy) Strings

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

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

func (*ApiTokenGroupBy) StringsX

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

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

type ApiTokenMutation

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

ApiTokenMutation represents an operation that mutates the ApiToken nodes in the graph.

func (*ApiTokenMutation) AddCreditsSpent

func (m *ApiTokenMutation) AddCreditsSpent(i int)

AddCreditsSpent adds i to the "credits_spent" field.

func (*ApiTokenMutation) AddField

func (m *ApiTokenMutation) 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 (*ApiTokenMutation) AddGenerationIDs

func (m *ApiTokenMutation) AddGenerationIDs(ids ...uuid.UUID)

AddGenerationIDs adds the "generations" edge to the Generation entity by ids.

func (*ApiTokenMutation) AddUpscaleIDs

func (m *ApiTokenMutation) AddUpscaleIDs(ids ...uuid.UUID)

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by ids.

func (*ApiTokenMutation) AddUses

func (m *ApiTokenMutation) AddUses(i int)

AddUses adds i to the "uses" field.

func (*ApiTokenMutation) AddVoiceoverIDs

func (m *ApiTokenMutation) AddVoiceoverIDs(ids ...uuid.UUID)

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by ids.

func (*ApiTokenMutation) AddedCreditsSpent

func (m *ApiTokenMutation) AddedCreditsSpent() (r int, exists bool)

AddedCreditsSpent returns the value that was added to the "credits_spent" field in this mutation.

func (*ApiTokenMutation) AddedEdges

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

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

func (*ApiTokenMutation) AddedField

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

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

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

func (*ApiTokenMutation) AddedIDs

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

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

func (*ApiTokenMutation) AddedUses

func (m *ApiTokenMutation) AddedUses() (r int, exists bool)

AddedUses returns the value that was added to the "uses" field in this mutation.

func (*ApiTokenMutation) AuthClientID

func (m *ApiTokenMutation) AuthClientID() (r uuid.UUID, exists bool)

AuthClientID returns the value of the "auth_client_id" field in the mutation.

func (*ApiTokenMutation) AuthClientIDCleared

func (m *ApiTokenMutation) AuthClientIDCleared() bool

AuthClientIDCleared returns if the "auth_client_id" field was cleared in this mutation.

func (*ApiTokenMutation) AuthClientsCleared

func (m *ApiTokenMutation) AuthClientsCleared() bool

AuthClientsCleared reports if the "auth_clients" edge to the AuthClient entity was cleared.

func (*ApiTokenMutation) AuthClientsID

func (m *ApiTokenMutation) AuthClientsID() (id uuid.UUID, exists bool)

AuthClientsID returns the "auth_clients" edge ID in the mutation.

func (*ApiTokenMutation) AuthClientsIDs

func (m *ApiTokenMutation) AuthClientsIDs() (ids []uuid.UUID)

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

func (*ApiTokenMutation) ClearAuthClientID

func (m *ApiTokenMutation) ClearAuthClientID()

ClearAuthClientID clears the value of the "auth_client_id" field.

func (*ApiTokenMutation) ClearAuthClients

func (m *ApiTokenMutation) ClearAuthClients()

ClearAuthClients clears the "auth_clients" edge to the AuthClient entity.

func (*ApiTokenMutation) ClearEdge

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

func (m *ApiTokenMutation) 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 (*ApiTokenMutation) ClearGenerations

func (m *ApiTokenMutation) ClearGenerations()

ClearGenerations clears the "generations" edge to the Generation entity.

func (*ApiTokenMutation) ClearLastUsedAt

func (m *ApiTokenMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ApiTokenMutation) ClearUpscales

func (m *ApiTokenMutation) ClearUpscales()

ClearUpscales clears the "upscales" edge to the Upscale entity.

func (*ApiTokenMutation) ClearUser

func (m *ApiTokenMutation) ClearUser()

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

func (*ApiTokenMutation) ClearVoiceovers

func (m *ApiTokenMutation) ClearVoiceovers()

ClearVoiceovers clears the "voiceovers" edge to the Voiceover entity.

func (*ApiTokenMutation) ClearedEdges

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

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

func (*ApiTokenMutation) ClearedFields

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

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

func (ApiTokenMutation) Client

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

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

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

func (*ApiTokenMutation) CreditsSpent

func (m *ApiTokenMutation) CreditsSpent() (r int, exists bool)

CreditsSpent returns the value of the "credits_spent" field in the mutation.

func (*ApiTokenMutation) EdgeCleared

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

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

func (*ApiTokenMutation) ExecContext

func (c *ApiTokenMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ApiTokenMutation) Field

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

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

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

func (*ApiTokenMutation) Fields

func (m *ApiTokenMutation) 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 (*ApiTokenMutation) GenerationsCleared

func (m *ApiTokenMutation) GenerationsCleared() bool

GenerationsCleared reports if the "generations" edge to the Generation entity was cleared.

func (*ApiTokenMutation) GenerationsIDs

func (m *ApiTokenMutation) GenerationsIDs() (ids []uuid.UUID)

GenerationsIDs returns the "generations" edge IDs in the mutation.

func (*ApiTokenMutation) HashedToken

func (m *ApiTokenMutation) HashedToken() (r string, exists bool)

HashedToken returns the value of the "hashed_token" field in the mutation.

func (*ApiTokenMutation) ID

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

func (m *ApiTokenMutation) 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 (*ApiTokenMutation) IsActive

func (m *ApiTokenMutation) IsActive() (r bool, exists bool)

IsActive returns the value of the "is_active" field in the mutation.

func (*ApiTokenMutation) LastUsedAt

func (m *ApiTokenMutation) LastUsedAt() (r time.Time, exists bool)

LastUsedAt returns the value of the "last_used_at" field in the mutation.

func (*ApiTokenMutation) LastUsedAtCleared

func (m *ApiTokenMutation) LastUsedAtCleared() bool

LastUsedAtCleared returns if the "last_used_at" field was cleared in this mutation.

func (*ApiTokenMutation) Name

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

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

func (*ApiTokenMutation) OldAuthClientID

func (m *ApiTokenMutation) OldAuthClientID(ctx context.Context) (v *uuid.UUID, err error)

OldAuthClientID returns the old "auth_client_id" field's value of the ApiToken entity. If the ApiToken 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 (*ApiTokenMutation) OldCreatedAt

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

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

func (m *ApiTokenMutation) OldCreditsSpent(ctx context.Context) (v int, err error)

OldCreditsSpent returns the old "credits_spent" field's value of the ApiToken entity. If the ApiToken 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 (*ApiTokenMutation) OldField

func (m *ApiTokenMutation) 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 (*ApiTokenMutation) OldHashedToken

func (m *ApiTokenMutation) OldHashedToken(ctx context.Context) (v string, err error)

OldHashedToken returns the old "hashed_token" field's value of the ApiToken entity. If the ApiToken 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 (*ApiTokenMutation) OldIsActive

func (m *ApiTokenMutation) OldIsActive(ctx context.Context) (v bool, err error)

OldIsActive returns the old "is_active" field's value of the ApiToken entity. If the ApiToken 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 (*ApiTokenMutation) OldLastUsedAt

func (m *ApiTokenMutation) OldLastUsedAt(ctx context.Context) (v *time.Time, err error)

OldLastUsedAt returns the old "last_used_at" field's value of the ApiToken entity. If the ApiToken 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 (*ApiTokenMutation) OldName

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

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

func (m *ApiTokenMutation) OldShortString(ctx context.Context) (v string, err error)

OldShortString returns the old "short_string" field's value of the ApiToken entity. If the ApiToken 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 (*ApiTokenMutation) OldUpdatedAt

func (m *ApiTokenMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ApiToken entity. If the ApiToken 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 (*ApiTokenMutation) OldUserID

func (m *ApiTokenMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the ApiToken entity. If the ApiToken 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 (*ApiTokenMutation) OldUses

func (m *ApiTokenMutation) OldUses(ctx context.Context) (v int, err error)

OldUses returns the old "uses" field's value of the ApiToken entity. If the ApiToken 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 (*ApiTokenMutation) Op

func (m *ApiTokenMutation) Op() Op

Op returns the operation name.

func (*ApiTokenMutation) QueryContext

func (c *ApiTokenMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ApiTokenMutation) RemoveGenerationIDs

func (m *ApiTokenMutation) RemoveGenerationIDs(ids ...uuid.UUID)

RemoveGenerationIDs removes the "generations" edge to the Generation entity by IDs.

func (*ApiTokenMutation) RemoveUpscaleIDs

func (m *ApiTokenMutation) RemoveUpscaleIDs(ids ...uuid.UUID)

RemoveUpscaleIDs removes the "upscales" edge to the Upscale entity by IDs.

func (*ApiTokenMutation) RemoveVoiceoverIDs

func (m *ApiTokenMutation) RemoveVoiceoverIDs(ids ...uuid.UUID)

RemoveVoiceoverIDs removes the "voiceovers" edge to the Voiceover entity by IDs.

func (*ApiTokenMutation) RemovedEdges

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

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

func (*ApiTokenMutation) RemovedGenerationsIDs

func (m *ApiTokenMutation) RemovedGenerationsIDs() (ids []uuid.UUID)

RemovedGenerations returns the removed IDs of the "generations" edge to the Generation entity.

func (*ApiTokenMutation) RemovedIDs

func (m *ApiTokenMutation) 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 (*ApiTokenMutation) RemovedUpscalesIDs

func (m *ApiTokenMutation) RemovedUpscalesIDs() (ids []uuid.UUID)

RemovedUpscales returns the removed IDs of the "upscales" edge to the Upscale entity.

func (*ApiTokenMutation) RemovedVoiceoversIDs

func (m *ApiTokenMutation) RemovedVoiceoversIDs() (ids []uuid.UUID)

RemovedVoiceovers returns the removed IDs of the "voiceovers" edge to the Voiceover entity.

func (*ApiTokenMutation) ResetAuthClientID

func (m *ApiTokenMutation) ResetAuthClientID()

ResetAuthClientID resets all changes to the "auth_client_id" field.

func (*ApiTokenMutation) ResetAuthClients

func (m *ApiTokenMutation) ResetAuthClients()

ResetAuthClients resets all changes to the "auth_clients" edge.

func (*ApiTokenMutation) ResetCreatedAt

func (m *ApiTokenMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ApiTokenMutation) ResetCreditsSpent

func (m *ApiTokenMutation) ResetCreditsSpent()

ResetCreditsSpent resets all changes to the "credits_spent" field.

func (*ApiTokenMutation) ResetEdge

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

func (m *ApiTokenMutation) 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 (*ApiTokenMutation) ResetGenerations

func (m *ApiTokenMutation) ResetGenerations()

ResetGenerations resets all changes to the "generations" edge.

func (*ApiTokenMutation) ResetHashedToken

func (m *ApiTokenMutation) ResetHashedToken()

ResetHashedToken resets all changes to the "hashed_token" field.

func (*ApiTokenMutation) ResetIsActive

func (m *ApiTokenMutation) ResetIsActive()

ResetIsActive resets all changes to the "is_active" field.

func (*ApiTokenMutation) ResetLastUsedAt

func (m *ApiTokenMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*ApiTokenMutation) ResetName

func (m *ApiTokenMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ApiTokenMutation) ResetShortString

func (m *ApiTokenMutation) ResetShortString()

ResetShortString resets all changes to the "short_string" field.

func (*ApiTokenMutation) ResetUpdatedAt

func (m *ApiTokenMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ApiTokenMutation) ResetUpscales

func (m *ApiTokenMutation) ResetUpscales()

ResetUpscales resets all changes to the "upscales" edge.

func (*ApiTokenMutation) ResetUser

func (m *ApiTokenMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*ApiTokenMutation) ResetUserID

func (m *ApiTokenMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*ApiTokenMutation) ResetUses

func (m *ApiTokenMutation) ResetUses()

ResetUses resets all changes to the "uses" field.

func (*ApiTokenMutation) ResetVoiceovers

func (m *ApiTokenMutation) ResetVoiceovers()

ResetVoiceovers resets all changes to the "voiceovers" edge.

func (*ApiTokenMutation) SetAuthClientID

func (m *ApiTokenMutation) SetAuthClientID(u uuid.UUID)

SetAuthClientID sets the "auth_client_id" field.

func (*ApiTokenMutation) SetAuthClientsID

func (m *ApiTokenMutation) SetAuthClientsID(id uuid.UUID)

SetAuthClientsID sets the "auth_clients" edge to the AuthClient entity by id.

func (*ApiTokenMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*ApiTokenMutation) SetCreditsSpent

func (m *ApiTokenMutation) SetCreditsSpent(i int)

SetCreditsSpent sets the "credits_spent" field.

func (*ApiTokenMutation) SetField

func (m *ApiTokenMutation) 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 (*ApiTokenMutation) SetHashedToken

func (m *ApiTokenMutation) SetHashedToken(s string)

SetHashedToken sets the "hashed_token" field.

func (*ApiTokenMutation) SetID

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

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

func (*ApiTokenMutation) SetIsActive

func (m *ApiTokenMutation) SetIsActive(b bool)

SetIsActive sets the "is_active" field.

func (*ApiTokenMutation) SetLastUsedAt

func (m *ApiTokenMutation) SetLastUsedAt(t time.Time)

SetLastUsedAt sets the "last_used_at" field.

func (*ApiTokenMutation) SetName

func (m *ApiTokenMutation) SetName(s string)

SetName sets the "name" field.

func (*ApiTokenMutation) SetOp

func (m *ApiTokenMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ApiTokenMutation) SetShortString

func (m *ApiTokenMutation) SetShortString(s string)

SetShortString sets the "short_string" field.

func (*ApiTokenMutation) SetUpdatedAt

func (m *ApiTokenMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ApiTokenMutation) SetUserID

func (m *ApiTokenMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (*ApiTokenMutation) SetUses

func (m *ApiTokenMutation) SetUses(i int)

SetUses sets the "uses" field.

func (*ApiTokenMutation) ShortString

func (m *ApiTokenMutation) ShortString() (r string, exists bool)

ShortString returns the value of the "short_string" field in the mutation.

func (ApiTokenMutation) Tx

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

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

func (*ApiTokenMutation) Type

func (m *ApiTokenMutation) Type() string

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

func (*ApiTokenMutation) UpdatedAt

func (m *ApiTokenMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ApiTokenMutation) UpscalesCleared

func (m *ApiTokenMutation) UpscalesCleared() bool

UpscalesCleared reports if the "upscales" edge to the Upscale entity was cleared.

func (*ApiTokenMutation) UpscalesIDs

func (m *ApiTokenMutation) UpscalesIDs() (ids []uuid.UUID)

UpscalesIDs returns the "upscales" edge IDs in the mutation.

func (*ApiTokenMutation) UserCleared

func (m *ApiTokenMutation) UserCleared() bool

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

func (*ApiTokenMutation) UserID

func (m *ApiTokenMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*ApiTokenMutation) UserIDs

func (m *ApiTokenMutation) UserIDs() (ids []uuid.UUID)

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

func (*ApiTokenMutation) Uses

func (m *ApiTokenMutation) Uses() (r int, exists bool)

Uses returns the value of the "uses" field in the mutation.

func (*ApiTokenMutation) VoiceoversCleared

func (m *ApiTokenMutation) VoiceoversCleared() bool

VoiceoversCleared reports if the "voiceovers" edge to the Voiceover entity was cleared.

func (*ApiTokenMutation) VoiceoversIDs

func (m *ApiTokenMutation) VoiceoversIDs() (ids []uuid.UUID)

VoiceoversIDs returns the "voiceovers" edge IDs in the mutation.

func (*ApiTokenMutation) Where

func (m *ApiTokenMutation) Where(ps ...predicate.ApiToken)

Where appends a list predicates to the ApiTokenMutation builder.

func (*ApiTokenMutation) WhereP

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

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

type ApiTokenQuery

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

ApiTokenQuery is the builder for querying ApiToken entities.

func (*ApiTokenQuery) Aggregate

func (atq *ApiTokenQuery) Aggregate(fns ...AggregateFunc) *ApiTokenSelect

Aggregate returns a ApiTokenSelect configured with the given aggregations.

func (*ApiTokenQuery) All

func (atq *ApiTokenQuery) All(ctx context.Context) ([]*ApiToken, error)

All executes the query and returns a list of ApiTokens.

func (*ApiTokenQuery) AllX

func (atq *ApiTokenQuery) AllX(ctx context.Context) []*ApiToken

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

func (*ApiTokenQuery) Clone

func (atq *ApiTokenQuery) Clone() *ApiTokenQuery

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

func (*ApiTokenQuery) Count

func (atq *ApiTokenQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ApiTokenQuery) CountX

func (atq *ApiTokenQuery) CountX(ctx context.Context) int

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

func (*ApiTokenQuery) ExecContext

func (c *ApiTokenQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ApiTokenQuery) Exist

func (atq *ApiTokenQuery) Exist(ctx context.Context) (bool, error)

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

func (*ApiTokenQuery) ExistX

func (atq *ApiTokenQuery) ExistX(ctx context.Context) bool

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

func (*ApiTokenQuery) First

func (atq *ApiTokenQuery) First(ctx context.Context) (*ApiToken, error)

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

func (*ApiTokenQuery) FirstID

func (atq *ApiTokenQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*ApiTokenQuery) FirstIDX

func (atq *ApiTokenQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*ApiTokenQuery) FirstX

func (atq *ApiTokenQuery) FirstX(ctx context.Context) *ApiToken

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

func (*ApiTokenQuery) GroupBy

func (atq *ApiTokenQuery) GroupBy(field string, fields ...string) *ApiTokenGroupBy

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

client.ApiToken.Query().
	GroupBy(apitoken.FieldHashedToken).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ApiTokenQuery) IDs

func (atq *ApiTokenQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*ApiTokenQuery) IDsX

func (atq *ApiTokenQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*ApiTokenQuery) Limit

func (atq *ApiTokenQuery) Limit(limit int) *ApiTokenQuery

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

func (*ApiTokenQuery) Modify

func (atq *ApiTokenQuery) Modify(modifiers ...func(s *sql.Selector)) *ApiTokenSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ApiTokenQuery) Offset

func (atq *ApiTokenQuery) Offset(offset int) *ApiTokenQuery

Offset to start from.

func (*ApiTokenQuery) Only

func (atq *ApiTokenQuery) Only(ctx context.Context) (*ApiToken, error)

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

func (*ApiTokenQuery) OnlyID

func (atq *ApiTokenQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*ApiTokenQuery) OnlyIDX

func (atq *ApiTokenQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*ApiTokenQuery) OnlyX

func (atq *ApiTokenQuery) OnlyX(ctx context.Context) *ApiToken

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

func (*ApiTokenQuery) Order

func (atq *ApiTokenQuery) Order(o ...OrderFunc) *ApiTokenQuery

Order specifies how the records should be ordered.

func (*ApiTokenQuery) QueryAuthClients

func (atq *ApiTokenQuery) QueryAuthClients() *AuthClientQuery

QueryAuthClients chains the current query on the "auth_clients" edge.

func (*ApiTokenQuery) QueryContext

func (c *ApiTokenQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ApiTokenQuery) QueryGenerations

func (atq *ApiTokenQuery) QueryGenerations() *GenerationQuery

QueryGenerations chains the current query on the "generations" edge.

func (*ApiTokenQuery) QueryUpscales

func (atq *ApiTokenQuery) QueryUpscales() *UpscaleQuery

QueryUpscales chains the current query on the "upscales" edge.

func (*ApiTokenQuery) QueryUser

func (atq *ApiTokenQuery) QueryUser() *UserQuery

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

func (*ApiTokenQuery) QueryVoiceovers

func (atq *ApiTokenQuery) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers chains the current query on the "voiceovers" edge.

func (*ApiTokenQuery) Select

func (atq *ApiTokenQuery) Select(fields ...string) *ApiTokenSelect

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

client.ApiToken.Query().
	Select(apitoken.FieldHashedToken).
	Scan(ctx, &v)

func (*ApiTokenQuery) Unique

func (atq *ApiTokenQuery) Unique(unique bool) *ApiTokenQuery

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

func (atq *ApiTokenQuery) Where(ps ...predicate.ApiToken) *ApiTokenQuery

Where adds a new predicate for the ApiTokenQuery builder.

func (*ApiTokenQuery) WithAuthClients

func (atq *ApiTokenQuery) WithAuthClients(opts ...func(*AuthClientQuery)) *ApiTokenQuery

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

func (*ApiTokenQuery) WithGenerations

func (atq *ApiTokenQuery) WithGenerations(opts ...func(*GenerationQuery)) *ApiTokenQuery

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

func (*ApiTokenQuery) WithUpscales

func (atq *ApiTokenQuery) WithUpscales(opts ...func(*UpscaleQuery)) *ApiTokenQuery

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

func (*ApiTokenQuery) WithUser

func (atq *ApiTokenQuery) WithUser(opts ...func(*UserQuery)) *ApiTokenQuery

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

func (*ApiTokenQuery) WithVoiceovers

func (atq *ApiTokenQuery) WithVoiceovers(opts ...func(*VoiceoverQuery)) *ApiTokenQuery

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

type ApiTokenSelect

type ApiTokenSelect struct {
	*ApiTokenQuery
	// contains filtered or unexported fields
}

ApiTokenSelect is the builder for selecting fields of ApiToken entities.

func (*ApiTokenSelect) Aggregate

func (ats *ApiTokenSelect) Aggregate(fns ...AggregateFunc) *ApiTokenSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ApiTokenSelect) Bool

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

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

func (*ApiTokenSelect) BoolX

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

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

func (*ApiTokenSelect) Bools

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

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

func (*ApiTokenSelect) BoolsX

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

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

func (ApiTokenSelect) ExecContext

func (c ApiTokenSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ApiTokenSelect) Float64

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

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

func (*ApiTokenSelect) Float64X

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

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

func (*ApiTokenSelect) Float64s

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

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

func (*ApiTokenSelect) Float64sX

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

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

func (*ApiTokenSelect) Int

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

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

func (*ApiTokenSelect) IntX

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

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

func (*ApiTokenSelect) Ints

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

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

func (*ApiTokenSelect) IntsX

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

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

func (*ApiTokenSelect) Modify

func (ats *ApiTokenSelect) Modify(modifiers ...func(s *sql.Selector)) *ApiTokenSelect

Modify adds a query modifier for attaching custom logic to queries.

func (ApiTokenSelect) QueryContext

func (c ApiTokenSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ApiTokenSelect) Scan

func (ats *ApiTokenSelect) Scan(ctx context.Context, v any) error

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

func (*ApiTokenSelect) ScanX

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

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

func (*ApiTokenSelect) String

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

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

func (*ApiTokenSelect) StringX

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

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

func (*ApiTokenSelect) Strings

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

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

func (*ApiTokenSelect) StringsX

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

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

type ApiTokenUpdate

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

ApiTokenUpdate is the builder for updating ApiToken entities.

func (*ApiTokenUpdate) AddCreditsSpent

func (atu *ApiTokenUpdate) AddCreditsSpent(i int) *ApiTokenUpdate

AddCreditsSpent adds i to the "credits_spent" field.

func (*ApiTokenUpdate) AddGenerationIDs

func (atu *ApiTokenUpdate) AddGenerationIDs(ids ...uuid.UUID) *ApiTokenUpdate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*ApiTokenUpdate) AddGenerations

func (atu *ApiTokenUpdate) AddGenerations(g ...*Generation) *ApiTokenUpdate

AddGenerations adds the "generations" edges to the Generation entity.

func (*ApiTokenUpdate) AddUpscaleIDs

func (atu *ApiTokenUpdate) AddUpscaleIDs(ids ...uuid.UUID) *ApiTokenUpdate

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*ApiTokenUpdate) AddUpscales

func (atu *ApiTokenUpdate) AddUpscales(u ...*Upscale) *ApiTokenUpdate

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*ApiTokenUpdate) AddUses

func (atu *ApiTokenUpdate) AddUses(i int) *ApiTokenUpdate

AddUses adds i to the "uses" field.

func (*ApiTokenUpdate) AddVoiceoverIDs

func (atu *ApiTokenUpdate) AddVoiceoverIDs(ids ...uuid.UUID) *ApiTokenUpdate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*ApiTokenUpdate) AddVoiceovers

func (atu *ApiTokenUpdate) AddVoiceovers(v ...*Voiceover) *ApiTokenUpdate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*ApiTokenUpdate) ClearAuthClientID

func (atu *ApiTokenUpdate) ClearAuthClientID() *ApiTokenUpdate

ClearAuthClientID clears the value of the "auth_client_id" field.

func (*ApiTokenUpdate) ClearAuthClients

func (atu *ApiTokenUpdate) ClearAuthClients() *ApiTokenUpdate

ClearAuthClients clears the "auth_clients" edge to the AuthClient entity.

func (*ApiTokenUpdate) ClearGenerations

func (atu *ApiTokenUpdate) ClearGenerations() *ApiTokenUpdate

ClearGenerations clears all "generations" edges to the Generation entity.

func (*ApiTokenUpdate) ClearLastUsedAt

func (atu *ApiTokenUpdate) ClearLastUsedAt() *ApiTokenUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ApiTokenUpdate) ClearUpscales

func (atu *ApiTokenUpdate) ClearUpscales() *ApiTokenUpdate

ClearUpscales clears all "upscales" edges to the Upscale entity.

func (*ApiTokenUpdate) ClearUser

func (atu *ApiTokenUpdate) ClearUser() *ApiTokenUpdate

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

func (*ApiTokenUpdate) ClearVoiceovers

func (atu *ApiTokenUpdate) ClearVoiceovers() *ApiTokenUpdate

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*ApiTokenUpdate) Exec

func (atu *ApiTokenUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ApiTokenUpdate) ExecContext

func (c *ApiTokenUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ApiTokenUpdate) ExecX

func (atu *ApiTokenUpdate) ExecX(ctx context.Context)

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

func (*ApiTokenUpdate) Modify

func (atu *ApiTokenUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ApiTokenUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ApiTokenUpdate) Mutation

func (atu *ApiTokenUpdate) Mutation() *ApiTokenMutation

Mutation returns the ApiTokenMutation object of the builder.

func (*ApiTokenUpdate) QueryContext

func (c *ApiTokenUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ApiTokenUpdate) RemoveGenerationIDs

func (atu *ApiTokenUpdate) RemoveGenerationIDs(ids ...uuid.UUID) *ApiTokenUpdate

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*ApiTokenUpdate) RemoveGenerations

func (atu *ApiTokenUpdate) RemoveGenerations(g ...*Generation) *ApiTokenUpdate

RemoveGenerations removes "generations" edges to Generation entities.

func (*ApiTokenUpdate) RemoveUpscaleIDs

func (atu *ApiTokenUpdate) RemoveUpscaleIDs(ids ...uuid.UUID) *ApiTokenUpdate

RemoveUpscaleIDs removes the "upscales" edge to Upscale entities by IDs.

func (*ApiTokenUpdate) RemoveUpscales

func (atu *ApiTokenUpdate) RemoveUpscales(u ...*Upscale) *ApiTokenUpdate

RemoveUpscales removes "upscales" edges to Upscale entities.

func (*ApiTokenUpdate) RemoveVoiceoverIDs

func (atu *ApiTokenUpdate) RemoveVoiceoverIDs(ids ...uuid.UUID) *ApiTokenUpdate

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*ApiTokenUpdate) RemoveVoiceovers

func (atu *ApiTokenUpdate) RemoveVoiceovers(v ...*Voiceover) *ApiTokenUpdate

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*ApiTokenUpdate) Save

func (atu *ApiTokenUpdate) Save(ctx context.Context) (int, error)

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

func (*ApiTokenUpdate) SaveX

func (atu *ApiTokenUpdate) SaveX(ctx context.Context) int

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

func (*ApiTokenUpdate) SetAuthClientID

func (atu *ApiTokenUpdate) SetAuthClientID(u uuid.UUID) *ApiTokenUpdate

SetAuthClientID sets the "auth_client_id" field.

func (*ApiTokenUpdate) SetAuthClients

func (atu *ApiTokenUpdate) SetAuthClients(a *AuthClient) *ApiTokenUpdate

SetAuthClients sets the "auth_clients" edge to the AuthClient entity.

func (*ApiTokenUpdate) SetAuthClientsID

func (atu *ApiTokenUpdate) SetAuthClientsID(id uuid.UUID) *ApiTokenUpdate

SetAuthClientsID sets the "auth_clients" edge to the AuthClient entity by ID.

func (*ApiTokenUpdate) SetCreditsSpent

func (atu *ApiTokenUpdate) SetCreditsSpent(i int) *ApiTokenUpdate

SetCreditsSpent sets the "credits_spent" field.

func (*ApiTokenUpdate) SetHashedToken

func (atu *ApiTokenUpdate) SetHashedToken(s string) *ApiTokenUpdate

SetHashedToken sets the "hashed_token" field.

func (*ApiTokenUpdate) SetIsActive

func (atu *ApiTokenUpdate) SetIsActive(b bool) *ApiTokenUpdate

SetIsActive sets the "is_active" field.

func (*ApiTokenUpdate) SetLastUsedAt

func (atu *ApiTokenUpdate) SetLastUsedAt(t time.Time) *ApiTokenUpdate

SetLastUsedAt sets the "last_used_at" field.

func (*ApiTokenUpdate) SetName

func (atu *ApiTokenUpdate) SetName(s string) *ApiTokenUpdate

SetName sets the "name" field.

func (*ApiTokenUpdate) SetNillableAuthClientID

func (atu *ApiTokenUpdate) SetNillableAuthClientID(u *uuid.UUID) *ApiTokenUpdate

SetNillableAuthClientID sets the "auth_client_id" field if the given value is not nil.

func (*ApiTokenUpdate) SetNillableAuthClientsID

func (atu *ApiTokenUpdate) SetNillableAuthClientsID(id *uuid.UUID) *ApiTokenUpdate

SetNillableAuthClientsID sets the "auth_clients" edge to the AuthClient entity by ID if the given value is not nil.

func (*ApiTokenUpdate) SetNillableCreditsSpent

func (atu *ApiTokenUpdate) SetNillableCreditsSpent(i *int) *ApiTokenUpdate

SetNillableCreditsSpent sets the "credits_spent" field if the given value is not nil.

func (*ApiTokenUpdate) SetNillableIsActive

func (atu *ApiTokenUpdate) SetNillableIsActive(b *bool) *ApiTokenUpdate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*ApiTokenUpdate) SetNillableLastUsedAt

func (atu *ApiTokenUpdate) SetNillableLastUsedAt(t *time.Time) *ApiTokenUpdate

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ApiTokenUpdate) SetNillableUses

func (atu *ApiTokenUpdate) SetNillableUses(i *int) *ApiTokenUpdate

SetNillableUses sets the "uses" field if the given value is not nil.

func (*ApiTokenUpdate) SetShortString

func (atu *ApiTokenUpdate) SetShortString(s string) *ApiTokenUpdate

SetShortString sets the "short_string" field.

func (*ApiTokenUpdate) SetUpdatedAt

func (atu *ApiTokenUpdate) SetUpdatedAt(t time.Time) *ApiTokenUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ApiTokenUpdate) SetUser

func (atu *ApiTokenUpdate) SetUser(u *User) *ApiTokenUpdate

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

func (*ApiTokenUpdate) SetUserID

func (atu *ApiTokenUpdate) SetUserID(u uuid.UUID) *ApiTokenUpdate

SetUserID sets the "user_id" field.

func (*ApiTokenUpdate) SetUses

func (atu *ApiTokenUpdate) SetUses(i int) *ApiTokenUpdate

SetUses sets the "uses" field.

func (*ApiTokenUpdate) Where

func (atu *ApiTokenUpdate) Where(ps ...predicate.ApiToken) *ApiTokenUpdate

Where appends a list predicates to the ApiTokenUpdate builder.

type ApiTokenUpdateOne

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

ApiTokenUpdateOne is the builder for updating a single ApiToken entity.

func (*ApiTokenUpdateOne) AddCreditsSpent

func (atuo *ApiTokenUpdateOne) AddCreditsSpent(i int) *ApiTokenUpdateOne

AddCreditsSpent adds i to the "credits_spent" field.

func (*ApiTokenUpdateOne) AddGenerationIDs

func (atuo *ApiTokenUpdateOne) AddGenerationIDs(ids ...uuid.UUID) *ApiTokenUpdateOne

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*ApiTokenUpdateOne) AddGenerations

func (atuo *ApiTokenUpdateOne) AddGenerations(g ...*Generation) *ApiTokenUpdateOne

AddGenerations adds the "generations" edges to the Generation entity.

func (*ApiTokenUpdateOne) AddUpscaleIDs

func (atuo *ApiTokenUpdateOne) AddUpscaleIDs(ids ...uuid.UUID) *ApiTokenUpdateOne

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*ApiTokenUpdateOne) AddUpscales

func (atuo *ApiTokenUpdateOne) AddUpscales(u ...*Upscale) *ApiTokenUpdateOne

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*ApiTokenUpdateOne) AddUses

func (atuo *ApiTokenUpdateOne) AddUses(i int) *ApiTokenUpdateOne

AddUses adds i to the "uses" field.

func (*ApiTokenUpdateOne) AddVoiceoverIDs

func (atuo *ApiTokenUpdateOne) AddVoiceoverIDs(ids ...uuid.UUID) *ApiTokenUpdateOne

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*ApiTokenUpdateOne) AddVoiceovers

func (atuo *ApiTokenUpdateOne) AddVoiceovers(v ...*Voiceover) *ApiTokenUpdateOne

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*ApiTokenUpdateOne) ClearAuthClientID

func (atuo *ApiTokenUpdateOne) ClearAuthClientID() *ApiTokenUpdateOne

ClearAuthClientID clears the value of the "auth_client_id" field.

func (*ApiTokenUpdateOne) ClearAuthClients

func (atuo *ApiTokenUpdateOne) ClearAuthClients() *ApiTokenUpdateOne

ClearAuthClients clears the "auth_clients" edge to the AuthClient entity.

func (*ApiTokenUpdateOne) ClearGenerations

func (atuo *ApiTokenUpdateOne) ClearGenerations() *ApiTokenUpdateOne

ClearGenerations clears all "generations" edges to the Generation entity.

func (*ApiTokenUpdateOne) ClearLastUsedAt

func (atuo *ApiTokenUpdateOne) ClearLastUsedAt() *ApiTokenUpdateOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ApiTokenUpdateOne) ClearUpscales

func (atuo *ApiTokenUpdateOne) ClearUpscales() *ApiTokenUpdateOne

ClearUpscales clears all "upscales" edges to the Upscale entity.

func (*ApiTokenUpdateOne) ClearUser

func (atuo *ApiTokenUpdateOne) ClearUser() *ApiTokenUpdateOne

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

func (*ApiTokenUpdateOne) ClearVoiceovers

func (atuo *ApiTokenUpdateOne) ClearVoiceovers() *ApiTokenUpdateOne

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*ApiTokenUpdateOne) Exec

func (atuo *ApiTokenUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ApiTokenUpdateOne) ExecContext

func (c *ApiTokenUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ApiTokenUpdateOne) ExecX

func (atuo *ApiTokenUpdateOne) ExecX(ctx context.Context)

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

func (*ApiTokenUpdateOne) Modify

func (atuo *ApiTokenUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ApiTokenUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ApiTokenUpdateOne) Mutation

func (atuo *ApiTokenUpdateOne) Mutation() *ApiTokenMutation

Mutation returns the ApiTokenMutation object of the builder.

func (*ApiTokenUpdateOne) QueryContext

func (c *ApiTokenUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ApiTokenUpdateOne) RemoveGenerationIDs

func (atuo *ApiTokenUpdateOne) RemoveGenerationIDs(ids ...uuid.UUID) *ApiTokenUpdateOne

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*ApiTokenUpdateOne) RemoveGenerations

func (atuo *ApiTokenUpdateOne) RemoveGenerations(g ...*Generation) *ApiTokenUpdateOne

RemoveGenerations removes "generations" edges to Generation entities.

func (*ApiTokenUpdateOne) RemoveUpscaleIDs

func (atuo *ApiTokenUpdateOne) RemoveUpscaleIDs(ids ...uuid.UUID) *ApiTokenUpdateOne

RemoveUpscaleIDs removes the "upscales" edge to Upscale entities by IDs.

func (*ApiTokenUpdateOne) RemoveUpscales

func (atuo *ApiTokenUpdateOne) RemoveUpscales(u ...*Upscale) *ApiTokenUpdateOne

RemoveUpscales removes "upscales" edges to Upscale entities.

func (*ApiTokenUpdateOne) RemoveVoiceoverIDs

func (atuo *ApiTokenUpdateOne) RemoveVoiceoverIDs(ids ...uuid.UUID) *ApiTokenUpdateOne

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*ApiTokenUpdateOne) RemoveVoiceovers

func (atuo *ApiTokenUpdateOne) RemoveVoiceovers(v ...*Voiceover) *ApiTokenUpdateOne

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*ApiTokenUpdateOne) Save

func (atuo *ApiTokenUpdateOne) Save(ctx context.Context) (*ApiToken, error)

Save executes the query and returns the updated ApiToken entity.

func (*ApiTokenUpdateOne) SaveX

func (atuo *ApiTokenUpdateOne) SaveX(ctx context.Context) *ApiToken

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

func (*ApiTokenUpdateOne) Select

func (atuo *ApiTokenUpdateOne) Select(field string, fields ...string) *ApiTokenUpdateOne

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

func (*ApiTokenUpdateOne) SetAuthClientID

func (atuo *ApiTokenUpdateOne) SetAuthClientID(u uuid.UUID) *ApiTokenUpdateOne

SetAuthClientID sets the "auth_client_id" field.

func (*ApiTokenUpdateOne) SetAuthClients

func (atuo *ApiTokenUpdateOne) SetAuthClients(a *AuthClient) *ApiTokenUpdateOne

SetAuthClients sets the "auth_clients" edge to the AuthClient entity.

func (*ApiTokenUpdateOne) SetAuthClientsID

func (atuo *ApiTokenUpdateOne) SetAuthClientsID(id uuid.UUID) *ApiTokenUpdateOne

SetAuthClientsID sets the "auth_clients" edge to the AuthClient entity by ID.

func (*ApiTokenUpdateOne) SetCreditsSpent

func (atuo *ApiTokenUpdateOne) SetCreditsSpent(i int) *ApiTokenUpdateOne

SetCreditsSpent sets the "credits_spent" field.

func (*ApiTokenUpdateOne) SetHashedToken

func (atuo *ApiTokenUpdateOne) SetHashedToken(s string) *ApiTokenUpdateOne

SetHashedToken sets the "hashed_token" field.

func (*ApiTokenUpdateOne) SetIsActive

func (atuo *ApiTokenUpdateOne) SetIsActive(b bool) *ApiTokenUpdateOne

SetIsActive sets the "is_active" field.

func (*ApiTokenUpdateOne) SetLastUsedAt

func (atuo *ApiTokenUpdateOne) SetLastUsedAt(t time.Time) *ApiTokenUpdateOne

SetLastUsedAt sets the "last_used_at" field.

func (*ApiTokenUpdateOne) SetName

func (atuo *ApiTokenUpdateOne) SetName(s string) *ApiTokenUpdateOne

SetName sets the "name" field.

func (*ApiTokenUpdateOne) SetNillableAuthClientID

func (atuo *ApiTokenUpdateOne) SetNillableAuthClientID(u *uuid.UUID) *ApiTokenUpdateOne

SetNillableAuthClientID sets the "auth_client_id" field if the given value is not nil.

func (*ApiTokenUpdateOne) SetNillableAuthClientsID

func (atuo *ApiTokenUpdateOne) SetNillableAuthClientsID(id *uuid.UUID) *ApiTokenUpdateOne

SetNillableAuthClientsID sets the "auth_clients" edge to the AuthClient entity by ID if the given value is not nil.

func (*ApiTokenUpdateOne) SetNillableCreditsSpent

func (atuo *ApiTokenUpdateOne) SetNillableCreditsSpent(i *int) *ApiTokenUpdateOne

SetNillableCreditsSpent sets the "credits_spent" field if the given value is not nil.

func (*ApiTokenUpdateOne) SetNillableIsActive

func (atuo *ApiTokenUpdateOne) SetNillableIsActive(b *bool) *ApiTokenUpdateOne

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*ApiTokenUpdateOne) SetNillableLastUsedAt

func (atuo *ApiTokenUpdateOne) SetNillableLastUsedAt(t *time.Time) *ApiTokenUpdateOne

SetNillableLastUsedAt sets the "last_used_at" field if the given value is not nil.

func (*ApiTokenUpdateOne) SetNillableUses

func (atuo *ApiTokenUpdateOne) SetNillableUses(i *int) *ApiTokenUpdateOne

SetNillableUses sets the "uses" field if the given value is not nil.

func (*ApiTokenUpdateOne) SetShortString

func (atuo *ApiTokenUpdateOne) SetShortString(s string) *ApiTokenUpdateOne

SetShortString sets the "short_string" field.

func (*ApiTokenUpdateOne) SetUpdatedAt

func (atuo *ApiTokenUpdateOne) SetUpdatedAt(t time.Time) *ApiTokenUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ApiTokenUpdateOne) SetUser

func (atuo *ApiTokenUpdateOne) SetUser(u *User) *ApiTokenUpdateOne

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

func (*ApiTokenUpdateOne) SetUserID

func (atuo *ApiTokenUpdateOne) SetUserID(u uuid.UUID) *ApiTokenUpdateOne

SetUserID sets the "user_id" field.

func (*ApiTokenUpdateOne) SetUses

func (atuo *ApiTokenUpdateOne) SetUses(i int) *ApiTokenUpdateOne

SetUses sets the "uses" field.

type ApiTokenUpsert

type ApiTokenUpsert struct {
	*sql.UpdateSet
}

ApiTokenUpsert is the "OnConflict" setter.

func (*ApiTokenUpsert) AddCreditsSpent

func (u *ApiTokenUpsert) AddCreditsSpent(v int) *ApiTokenUpsert

AddCreditsSpent adds v to the "credits_spent" field.

func (*ApiTokenUpsert) AddUses

func (u *ApiTokenUpsert) AddUses(v int) *ApiTokenUpsert

AddUses adds v to the "uses" field.

func (*ApiTokenUpsert) ClearAuthClientID

func (u *ApiTokenUpsert) ClearAuthClientID() *ApiTokenUpsert

ClearAuthClientID clears the value of the "auth_client_id" field.

func (*ApiTokenUpsert) ClearLastUsedAt

func (u *ApiTokenUpsert) ClearLastUsedAt() *ApiTokenUpsert

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ApiTokenUpsert) SetAuthClientID

func (u *ApiTokenUpsert) SetAuthClientID(v uuid.UUID) *ApiTokenUpsert

SetAuthClientID sets the "auth_client_id" field.

func (*ApiTokenUpsert) SetCreditsSpent

func (u *ApiTokenUpsert) SetCreditsSpent(v int) *ApiTokenUpsert

SetCreditsSpent sets the "credits_spent" field.

func (*ApiTokenUpsert) SetHashedToken

func (u *ApiTokenUpsert) SetHashedToken(v string) *ApiTokenUpsert

SetHashedToken sets the "hashed_token" field.

func (*ApiTokenUpsert) SetIsActive

func (u *ApiTokenUpsert) SetIsActive(v bool) *ApiTokenUpsert

SetIsActive sets the "is_active" field.

func (*ApiTokenUpsert) SetLastUsedAt

func (u *ApiTokenUpsert) SetLastUsedAt(v time.Time) *ApiTokenUpsert

SetLastUsedAt sets the "last_used_at" field.

func (*ApiTokenUpsert) SetName

func (u *ApiTokenUpsert) SetName(v string) *ApiTokenUpsert

SetName sets the "name" field.

func (*ApiTokenUpsert) SetShortString

func (u *ApiTokenUpsert) SetShortString(v string) *ApiTokenUpsert

SetShortString sets the "short_string" field.

func (*ApiTokenUpsert) SetUpdatedAt

func (u *ApiTokenUpsert) SetUpdatedAt(v time.Time) *ApiTokenUpsert

SetUpdatedAt sets the "updated_at" field.

func (*ApiTokenUpsert) SetUserID

func (u *ApiTokenUpsert) SetUserID(v uuid.UUID) *ApiTokenUpsert

SetUserID sets the "user_id" field.

func (*ApiTokenUpsert) SetUses

func (u *ApiTokenUpsert) SetUses(v int) *ApiTokenUpsert

SetUses sets the "uses" field.

func (*ApiTokenUpsert) UpdateAuthClientID

func (u *ApiTokenUpsert) UpdateAuthClientID() *ApiTokenUpsert

UpdateAuthClientID sets the "auth_client_id" field to the value that was provided on create.

func (*ApiTokenUpsert) UpdateCreditsSpent

func (u *ApiTokenUpsert) UpdateCreditsSpent() *ApiTokenUpsert

UpdateCreditsSpent sets the "credits_spent" field to the value that was provided on create.

func (*ApiTokenUpsert) UpdateHashedToken

func (u *ApiTokenUpsert) UpdateHashedToken() *ApiTokenUpsert

UpdateHashedToken sets the "hashed_token" field to the value that was provided on create.

func (*ApiTokenUpsert) UpdateIsActive

func (u *ApiTokenUpsert) UpdateIsActive() *ApiTokenUpsert

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*ApiTokenUpsert) UpdateLastUsedAt

func (u *ApiTokenUpsert) UpdateLastUsedAt() *ApiTokenUpsert

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ApiTokenUpsert) UpdateName

func (u *ApiTokenUpsert) UpdateName() *ApiTokenUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*ApiTokenUpsert) UpdateShortString

func (u *ApiTokenUpsert) UpdateShortString() *ApiTokenUpsert

UpdateShortString sets the "short_string" field to the value that was provided on create.

func (*ApiTokenUpsert) UpdateUpdatedAt

func (u *ApiTokenUpsert) UpdateUpdatedAt() *ApiTokenUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ApiTokenUpsert) UpdateUserID

func (u *ApiTokenUpsert) UpdateUserID() *ApiTokenUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*ApiTokenUpsert) UpdateUses

func (u *ApiTokenUpsert) UpdateUses() *ApiTokenUpsert

UpdateUses sets the "uses" field to the value that was provided on create.

type ApiTokenUpsertBulk

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

ApiTokenUpsertBulk is the builder for "upsert"-ing a bulk of ApiToken nodes.

func (*ApiTokenUpsertBulk) AddCreditsSpent

func (u *ApiTokenUpsertBulk) AddCreditsSpent(v int) *ApiTokenUpsertBulk

AddCreditsSpent adds v to the "credits_spent" field.

func (*ApiTokenUpsertBulk) AddUses

func (u *ApiTokenUpsertBulk) AddUses(v int) *ApiTokenUpsertBulk

AddUses adds v to the "uses" field.

func (*ApiTokenUpsertBulk) ClearAuthClientID

func (u *ApiTokenUpsertBulk) ClearAuthClientID() *ApiTokenUpsertBulk

ClearAuthClientID clears the value of the "auth_client_id" field.

func (*ApiTokenUpsertBulk) ClearLastUsedAt

func (u *ApiTokenUpsertBulk) ClearLastUsedAt() *ApiTokenUpsertBulk

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ApiTokenUpsertBulk) DoNothing

func (u *ApiTokenUpsertBulk) DoNothing() *ApiTokenUpsertBulk

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

func (*ApiTokenUpsertBulk) Exec

func (u *ApiTokenUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ApiTokenUpsertBulk) ExecX

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

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

func (*ApiTokenUpsertBulk) Ignore

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

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

func (*ApiTokenUpsertBulk) SetAuthClientID

func (u *ApiTokenUpsertBulk) SetAuthClientID(v uuid.UUID) *ApiTokenUpsertBulk

SetAuthClientID sets the "auth_client_id" field.

func (*ApiTokenUpsertBulk) SetCreditsSpent

func (u *ApiTokenUpsertBulk) SetCreditsSpent(v int) *ApiTokenUpsertBulk

SetCreditsSpent sets the "credits_spent" field.

func (*ApiTokenUpsertBulk) SetHashedToken

func (u *ApiTokenUpsertBulk) SetHashedToken(v string) *ApiTokenUpsertBulk

SetHashedToken sets the "hashed_token" field.

func (*ApiTokenUpsertBulk) SetIsActive

func (u *ApiTokenUpsertBulk) SetIsActive(v bool) *ApiTokenUpsertBulk

SetIsActive sets the "is_active" field.

func (*ApiTokenUpsertBulk) SetLastUsedAt

func (u *ApiTokenUpsertBulk) SetLastUsedAt(v time.Time) *ApiTokenUpsertBulk

SetLastUsedAt sets the "last_used_at" field.

func (*ApiTokenUpsertBulk) SetName

SetName sets the "name" field.

func (*ApiTokenUpsertBulk) SetShortString

func (u *ApiTokenUpsertBulk) SetShortString(v string) *ApiTokenUpsertBulk

SetShortString sets the "short_string" field.

func (*ApiTokenUpsertBulk) SetUpdatedAt

func (u *ApiTokenUpsertBulk) SetUpdatedAt(v time.Time) *ApiTokenUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*ApiTokenUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*ApiTokenUpsertBulk) SetUses

func (u *ApiTokenUpsertBulk) SetUses(v int) *ApiTokenUpsertBulk

SetUses sets the "uses" field.

func (*ApiTokenUpsertBulk) Update

func (u *ApiTokenUpsertBulk) Update(set func(*ApiTokenUpsert)) *ApiTokenUpsertBulk

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

func (*ApiTokenUpsertBulk) UpdateAuthClientID

func (u *ApiTokenUpsertBulk) UpdateAuthClientID() *ApiTokenUpsertBulk

UpdateAuthClientID sets the "auth_client_id" field to the value that was provided on create.

func (*ApiTokenUpsertBulk) UpdateCreditsSpent

func (u *ApiTokenUpsertBulk) UpdateCreditsSpent() *ApiTokenUpsertBulk

UpdateCreditsSpent sets the "credits_spent" field to the value that was provided on create.

func (*ApiTokenUpsertBulk) UpdateHashedToken

func (u *ApiTokenUpsertBulk) UpdateHashedToken() *ApiTokenUpsertBulk

UpdateHashedToken sets the "hashed_token" field to the value that was provided on create.

func (*ApiTokenUpsertBulk) UpdateIsActive

func (u *ApiTokenUpsertBulk) UpdateIsActive() *ApiTokenUpsertBulk

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*ApiTokenUpsertBulk) UpdateLastUsedAt

func (u *ApiTokenUpsertBulk) UpdateLastUsedAt() *ApiTokenUpsertBulk

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ApiTokenUpsertBulk) UpdateName

func (u *ApiTokenUpsertBulk) UpdateName() *ApiTokenUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*ApiTokenUpsertBulk) UpdateNewValues

func (u *ApiTokenUpsertBulk) UpdateNewValues() *ApiTokenUpsertBulk

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

client.ApiToken.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(apitoken.FieldID)
		}),
	).
	Exec(ctx)

func (*ApiTokenUpsertBulk) UpdateShortString

func (u *ApiTokenUpsertBulk) UpdateShortString() *ApiTokenUpsertBulk

UpdateShortString sets the "short_string" field to the value that was provided on create.

func (*ApiTokenUpsertBulk) UpdateUpdatedAt

func (u *ApiTokenUpsertBulk) UpdateUpdatedAt() *ApiTokenUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ApiTokenUpsertBulk) UpdateUserID

func (u *ApiTokenUpsertBulk) UpdateUserID() *ApiTokenUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*ApiTokenUpsertBulk) UpdateUses

func (u *ApiTokenUpsertBulk) UpdateUses() *ApiTokenUpsertBulk

UpdateUses sets the "uses" field to the value that was provided on create.

type ApiTokenUpsertOne

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

ApiTokenUpsertOne is the builder for "upsert"-ing

one ApiToken node.

func (*ApiTokenUpsertOne) AddCreditsSpent

func (u *ApiTokenUpsertOne) AddCreditsSpent(v int) *ApiTokenUpsertOne

AddCreditsSpent adds v to the "credits_spent" field.

func (*ApiTokenUpsertOne) AddUses

func (u *ApiTokenUpsertOne) AddUses(v int) *ApiTokenUpsertOne

AddUses adds v to the "uses" field.

func (*ApiTokenUpsertOne) ClearAuthClientID

func (u *ApiTokenUpsertOne) ClearAuthClientID() *ApiTokenUpsertOne

ClearAuthClientID clears the value of the "auth_client_id" field.

func (*ApiTokenUpsertOne) ClearLastUsedAt

func (u *ApiTokenUpsertOne) ClearLastUsedAt() *ApiTokenUpsertOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ApiTokenUpsertOne) DoNothing

func (u *ApiTokenUpsertOne) DoNothing() *ApiTokenUpsertOne

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

func (*ApiTokenUpsertOne) Exec

func (u *ApiTokenUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ApiTokenUpsertOne) ExecX

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

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

func (*ApiTokenUpsertOne) ID

func (u *ApiTokenUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

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

func (*ApiTokenUpsertOne) IDX

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

func (*ApiTokenUpsertOne) Ignore

func (u *ApiTokenUpsertOne) Ignore() *ApiTokenUpsertOne

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

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

func (*ApiTokenUpsertOne) SetAuthClientID

func (u *ApiTokenUpsertOne) SetAuthClientID(v uuid.UUID) *ApiTokenUpsertOne

SetAuthClientID sets the "auth_client_id" field.

func (*ApiTokenUpsertOne) SetCreditsSpent

func (u *ApiTokenUpsertOne) SetCreditsSpent(v int) *ApiTokenUpsertOne

SetCreditsSpent sets the "credits_spent" field.

func (*ApiTokenUpsertOne) SetHashedToken

func (u *ApiTokenUpsertOne) SetHashedToken(v string) *ApiTokenUpsertOne

SetHashedToken sets the "hashed_token" field.

func (*ApiTokenUpsertOne) SetIsActive

func (u *ApiTokenUpsertOne) SetIsActive(v bool) *ApiTokenUpsertOne

SetIsActive sets the "is_active" field.

func (*ApiTokenUpsertOne) SetLastUsedAt

func (u *ApiTokenUpsertOne) SetLastUsedAt(v time.Time) *ApiTokenUpsertOne

SetLastUsedAt sets the "last_used_at" field.

func (*ApiTokenUpsertOne) SetName

SetName sets the "name" field.

func (*ApiTokenUpsertOne) SetShortString

func (u *ApiTokenUpsertOne) SetShortString(v string) *ApiTokenUpsertOne

SetShortString sets the "short_string" field.

func (*ApiTokenUpsertOne) SetUpdatedAt

func (u *ApiTokenUpsertOne) SetUpdatedAt(v time.Time) *ApiTokenUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*ApiTokenUpsertOne) SetUserID

func (u *ApiTokenUpsertOne) SetUserID(v uuid.UUID) *ApiTokenUpsertOne

SetUserID sets the "user_id" field.

func (*ApiTokenUpsertOne) SetUses

func (u *ApiTokenUpsertOne) SetUses(v int) *ApiTokenUpsertOne

SetUses sets the "uses" field.

func (*ApiTokenUpsertOne) Update

func (u *ApiTokenUpsertOne) Update(set func(*ApiTokenUpsert)) *ApiTokenUpsertOne

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

func (*ApiTokenUpsertOne) UpdateAuthClientID

func (u *ApiTokenUpsertOne) UpdateAuthClientID() *ApiTokenUpsertOne

UpdateAuthClientID sets the "auth_client_id" field to the value that was provided on create.

func (*ApiTokenUpsertOne) UpdateCreditsSpent

func (u *ApiTokenUpsertOne) UpdateCreditsSpent() *ApiTokenUpsertOne

UpdateCreditsSpent sets the "credits_spent" field to the value that was provided on create.

func (*ApiTokenUpsertOne) UpdateHashedToken

func (u *ApiTokenUpsertOne) UpdateHashedToken() *ApiTokenUpsertOne

UpdateHashedToken sets the "hashed_token" field to the value that was provided on create.

func (*ApiTokenUpsertOne) UpdateIsActive

func (u *ApiTokenUpsertOne) UpdateIsActive() *ApiTokenUpsertOne

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*ApiTokenUpsertOne) UpdateLastUsedAt

func (u *ApiTokenUpsertOne) UpdateLastUsedAt() *ApiTokenUpsertOne

UpdateLastUsedAt sets the "last_used_at" field to the value that was provided on create.

func (*ApiTokenUpsertOne) UpdateName

func (u *ApiTokenUpsertOne) UpdateName() *ApiTokenUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*ApiTokenUpsertOne) UpdateNewValues

func (u *ApiTokenUpsertOne) UpdateNewValues() *ApiTokenUpsertOne

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

client.ApiToken.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(apitoken.FieldID)
		}),
	).
	Exec(ctx)

func (*ApiTokenUpsertOne) UpdateShortString

func (u *ApiTokenUpsertOne) UpdateShortString() *ApiTokenUpsertOne

UpdateShortString sets the "short_string" field to the value that was provided on create.

func (*ApiTokenUpsertOne) UpdateUpdatedAt

func (u *ApiTokenUpsertOne) UpdateUpdatedAt() *ApiTokenUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*ApiTokenUpsertOne) UpdateUserID

func (u *ApiTokenUpsertOne) UpdateUserID() *ApiTokenUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*ApiTokenUpsertOne) UpdateUses

func (u *ApiTokenUpsertOne) UpdateUses() *ApiTokenUpsertOne

UpdateUses sets the "uses" field to the value that was provided on create.

type ApiTokens

type ApiTokens []*ApiToken

ApiTokens is a parsable slice of ApiToken.

type AuthClient

type AuthClient struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AuthClientQuery when eager-loading is set.
	Edges AuthClientEdges `json:"edges"`
	// contains filtered or unexported fields
}

AuthClient is the model entity for the AuthClient schema.

func (*AuthClient) ExecContext

func (c *AuthClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AuthClient) QueryAPITokens

func (ac *AuthClient) QueryAPITokens() *ApiTokenQuery

QueryAPITokens queries the "api_tokens" edge of the AuthClient entity.

func (*AuthClient) QueryContext

func (c *AuthClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AuthClient) String

func (ac *AuthClient) String() string

String implements the fmt.Stringer.

func (*AuthClient) Unwrap

func (ac *AuthClient) Unwrap() *AuthClient

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

func (ac *AuthClient) Update() *AuthClientUpdateOne

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

type AuthClientClient

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

AuthClientClient is a client for the AuthClient schema.

func NewAuthClientClient

func NewAuthClientClient(c config) *AuthClientClient

NewAuthClientClient returns a client for the AuthClient from the given config.

func (*AuthClientClient) Create

func (c *AuthClientClient) Create() *AuthClientCreate

Create returns a builder for creating a AuthClient entity.

func (*AuthClientClient) CreateBulk

func (c *AuthClientClient) CreateBulk(builders ...*AuthClientCreate) *AuthClientCreateBulk

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

func (*AuthClientClient) Delete

func (c *AuthClientClient) Delete() *AuthClientDelete

Delete returns a delete builder for AuthClient.

func (*AuthClientClient) DeleteOne

func (c *AuthClientClient) DeleteOne(ac *AuthClient) *AuthClientDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AuthClientClient) DeleteOneID

func (c *AuthClientClient) DeleteOneID(id uuid.UUID) *AuthClientDeleteOne

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

func (*AuthClientClient) ExecContext

func (c *AuthClientClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AuthClientClient) Get

Get returns a AuthClient entity by its id.

func (*AuthClientClient) GetX

func (c *AuthClientClient) GetX(ctx context.Context, id uuid.UUID) *AuthClient

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

func (*AuthClientClient) Hooks

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

Hooks returns the client hooks.

func (*AuthClientClient) Intercept

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

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

func (*AuthClientClient) Interceptors

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

Interceptors returns the client interceptors.

func (*AuthClientClient) Query

func (c *AuthClientClient) Query() *AuthClientQuery

Query returns a query builder for AuthClient.

func (*AuthClientClient) QueryAPITokens

func (c *AuthClientClient) QueryAPITokens(ac *AuthClient) *ApiTokenQuery

QueryAPITokens queries the api_tokens edge of a AuthClient.

func (*AuthClientClient) QueryContext

func (c *AuthClientClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AuthClientClient) Update

func (c *AuthClientClient) Update() *AuthClientUpdate

Update returns an update builder for AuthClient.

func (*AuthClientClient) UpdateOne

func (c *AuthClientClient) UpdateOne(ac *AuthClient) *AuthClientUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AuthClientClient) UpdateOneID

func (c *AuthClientClient) UpdateOneID(id uuid.UUID) *AuthClientUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AuthClientClient) Use

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

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

type AuthClientCreate

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

AuthClientCreate is the builder for creating a AuthClient entity.

func (*AuthClientCreate) AddAPITokenIDs

func (acc *AuthClientCreate) AddAPITokenIDs(ids ...uuid.UUID) *AuthClientCreate

AddAPITokenIDs adds the "api_tokens" edge to the ApiToken entity by IDs.

func (*AuthClientCreate) AddAPITokens

func (acc *AuthClientCreate) AddAPITokens(a ...*ApiToken) *AuthClientCreate

AddAPITokens adds the "api_tokens" edges to the ApiToken entity.

func (*AuthClientCreate) Exec

func (acc *AuthClientCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthClientCreate) ExecContext

func (c *AuthClientCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AuthClientCreate) ExecX

func (acc *AuthClientCreate) ExecX(ctx context.Context)

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

func (*AuthClientCreate) Mutation

func (acc *AuthClientCreate) Mutation() *AuthClientMutation

Mutation returns the AuthClientMutation object of the builder.

func (*AuthClientCreate) OnConflict

func (acc *AuthClientCreate) OnConflict(opts ...sql.ConflictOption) *AuthClientUpsertOne

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

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

func (*AuthClientCreate) OnConflictColumns

func (acc *AuthClientCreate) OnConflictColumns(columns ...string) *AuthClientUpsertOne

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

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

func (*AuthClientCreate) QueryContext

func (c *AuthClientCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AuthClientCreate) Save

func (acc *AuthClientCreate) Save(ctx context.Context) (*AuthClient, error)

Save creates the AuthClient in the database.

func (*AuthClientCreate) SaveX

func (acc *AuthClientCreate) SaveX(ctx context.Context) *AuthClient

SaveX calls Save and panics if Save returns an error.

func (*AuthClientCreate) SetCreatedAt

func (acc *AuthClientCreate) SetCreatedAt(t time.Time) *AuthClientCreate

SetCreatedAt sets the "created_at" field.

func (*AuthClientCreate) SetID

func (acc *AuthClientCreate) SetID(u uuid.UUID) *AuthClientCreate

SetID sets the "id" field.

func (*AuthClientCreate) SetName

func (acc *AuthClientCreate) SetName(s string) *AuthClientCreate

SetName sets the "name" field.

func (*AuthClientCreate) SetNillableCreatedAt

func (acc *AuthClientCreate) SetNillableCreatedAt(t *time.Time) *AuthClientCreate

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

func (*AuthClientCreate) SetNillableID

func (acc *AuthClientCreate) SetNillableID(u *uuid.UUID) *AuthClientCreate

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

func (*AuthClientCreate) SetNillableUpdatedAt

func (acc *AuthClientCreate) SetNillableUpdatedAt(t *time.Time) *AuthClientCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AuthClientCreate) SetUpdatedAt

func (acc *AuthClientCreate) SetUpdatedAt(t time.Time) *AuthClientCreate

SetUpdatedAt sets the "updated_at" field.

type AuthClientCreateBulk

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

AuthClientCreateBulk is the builder for creating many AuthClient entities in bulk.

func (*AuthClientCreateBulk) Exec

func (accb *AuthClientCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthClientCreateBulk) ExecContext

func (c *AuthClientCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AuthClientCreateBulk) ExecX

func (accb *AuthClientCreateBulk) ExecX(ctx context.Context)

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

func (*AuthClientCreateBulk) OnConflict

func (accb *AuthClientCreateBulk) OnConflict(opts ...sql.ConflictOption) *AuthClientUpsertBulk

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

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

func (*AuthClientCreateBulk) OnConflictColumns

func (accb *AuthClientCreateBulk) OnConflictColumns(columns ...string) *AuthClientUpsertBulk

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

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

func (*AuthClientCreateBulk) QueryContext

func (c *AuthClientCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AuthClientCreateBulk) Save

func (accb *AuthClientCreateBulk) Save(ctx context.Context) ([]*AuthClient, error)

Save creates the AuthClient entities in the database.

func (*AuthClientCreateBulk) SaveX

func (accb *AuthClientCreateBulk) SaveX(ctx context.Context) []*AuthClient

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

type AuthClientDelete

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

AuthClientDelete is the builder for deleting a AuthClient entity.

func (*AuthClientDelete) Exec

func (acd *AuthClientDelete) Exec(ctx context.Context) (int, error)

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

func (*AuthClientDelete) ExecContext

func (c *AuthClientDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AuthClientDelete) ExecX

func (acd *AuthClientDelete) ExecX(ctx context.Context) int

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

func (*AuthClientDelete) QueryContext

func (c *AuthClientDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AuthClientDelete) Where

Where appends a list predicates to the AuthClientDelete builder.

type AuthClientDeleteOne

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

AuthClientDeleteOne is the builder for deleting a single AuthClient entity.

func (*AuthClientDeleteOne) Exec

func (acdo *AuthClientDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AuthClientDeleteOne) ExecX

func (acdo *AuthClientDeleteOne) ExecX(ctx context.Context)

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

type AuthClientEdges

type AuthClientEdges struct {
	// APITokens holds the value of the api_tokens edge.
	APITokens []*ApiToken `json:"api_tokens,omitempty"`
	// contains filtered or unexported fields
}

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

func (AuthClientEdges) APITokensOrErr

func (e AuthClientEdges) APITokensOrErr() ([]*ApiToken, error)

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

type AuthClientGroupBy

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

AuthClientGroupBy is the group-by builder for AuthClient entities.

func (*AuthClientGroupBy) Aggregate

func (acgb *AuthClientGroupBy) Aggregate(fns ...AggregateFunc) *AuthClientGroupBy

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

func (*AuthClientGroupBy) Bool

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

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

func (*AuthClientGroupBy) BoolX

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

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

func (*AuthClientGroupBy) Bools

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

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

func (*AuthClientGroupBy) BoolsX

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

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

func (*AuthClientGroupBy) Float64

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

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

func (*AuthClientGroupBy) Float64X

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

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

func (*AuthClientGroupBy) Float64s

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

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

func (*AuthClientGroupBy) Float64sX

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

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

func (*AuthClientGroupBy) Int

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

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

func (*AuthClientGroupBy) IntX

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

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

func (*AuthClientGroupBy) Ints

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

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

func (*AuthClientGroupBy) IntsX

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

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

func (*AuthClientGroupBy) Scan

func (acgb *AuthClientGroupBy) Scan(ctx context.Context, v any) error

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

func (*AuthClientGroupBy) ScanX

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

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

func (*AuthClientGroupBy) String

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

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

func (*AuthClientGroupBy) StringX

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

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

func (*AuthClientGroupBy) Strings

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

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

func (*AuthClientGroupBy) StringsX

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

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

type AuthClientMutation

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

AuthClientMutation represents an operation that mutates the AuthClient nodes in the graph.

func (*AuthClientMutation) APITokensCleared

func (m *AuthClientMutation) APITokensCleared() bool

APITokensCleared reports if the "api_tokens" edge to the ApiToken entity was cleared.

func (*AuthClientMutation) APITokensIDs

func (m *AuthClientMutation) APITokensIDs() (ids []uuid.UUID)

APITokensIDs returns the "api_tokens" edge IDs in the mutation.

func (*AuthClientMutation) AddAPITokenIDs

func (m *AuthClientMutation) AddAPITokenIDs(ids ...uuid.UUID)

AddAPITokenIDs adds the "api_tokens" edge to the ApiToken entity by ids.

func (*AuthClientMutation) AddField

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

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

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

func (*AuthClientMutation) AddedField

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

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

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

func (*AuthClientMutation) AddedIDs

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

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

func (*AuthClientMutation) ClearAPITokens

func (m *AuthClientMutation) ClearAPITokens()

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*AuthClientMutation) ClearEdge

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

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

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

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

func (*AuthClientMutation) ClearedFields

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

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

func (AuthClientMutation) Client

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

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

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

func (*AuthClientMutation) EdgeCleared

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

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

func (*AuthClientMutation) ExecContext

func (c *AuthClientMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AuthClientMutation) Field

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

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

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

func (*AuthClientMutation) Fields

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

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

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

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

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

func (*AuthClientMutation) OldCreatedAt

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

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

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

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

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

func (m *AuthClientMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the AuthClient entity. If the AuthClient 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 (*AuthClientMutation) Op

func (m *AuthClientMutation) Op() Op

Op returns the operation name.

func (*AuthClientMutation) QueryContext

func (c *AuthClientMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AuthClientMutation) RemoveAPITokenIDs

func (m *AuthClientMutation) RemoveAPITokenIDs(ids ...uuid.UUID)

RemoveAPITokenIDs removes the "api_tokens" edge to the ApiToken entity by IDs.

func (*AuthClientMutation) RemovedAPITokensIDs

func (m *AuthClientMutation) RemovedAPITokensIDs() (ids []uuid.UUID)

RemovedAPITokens returns the removed IDs of the "api_tokens" edge to the ApiToken entity.

func (*AuthClientMutation) RemovedEdges

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

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

func (*AuthClientMutation) RemovedIDs

func (m *AuthClientMutation) 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 (*AuthClientMutation) ResetAPITokens

func (m *AuthClientMutation) ResetAPITokens()

ResetAPITokens resets all changes to the "api_tokens" edge.

func (*AuthClientMutation) ResetCreatedAt

func (m *AuthClientMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AuthClientMutation) ResetEdge

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

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

func (m *AuthClientMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AuthClientMutation) ResetUpdatedAt

func (m *AuthClientMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AuthClientMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*AuthClientMutation) SetField

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

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

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

func (*AuthClientMutation) SetName

func (m *AuthClientMutation) SetName(s string)

SetName sets the "name" field.

func (*AuthClientMutation) SetOp

func (m *AuthClientMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AuthClientMutation) SetUpdatedAt

func (m *AuthClientMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (AuthClientMutation) Tx

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

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

func (*AuthClientMutation) Type

func (m *AuthClientMutation) Type() string

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

func (*AuthClientMutation) UpdatedAt

func (m *AuthClientMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AuthClientMutation) Where

func (m *AuthClientMutation) Where(ps ...predicate.AuthClient)

Where appends a list predicates to the AuthClientMutation builder.

func (*AuthClientMutation) WhereP

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

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

type AuthClientQuery

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

AuthClientQuery is the builder for querying AuthClient entities.

func (*AuthClientQuery) Aggregate

func (acq *AuthClientQuery) Aggregate(fns ...AggregateFunc) *AuthClientSelect

Aggregate returns a AuthClientSelect configured with the given aggregations.

func (*AuthClientQuery) All

func (acq *AuthClientQuery) All(ctx context.Context) ([]*AuthClient, error)

All executes the query and returns a list of AuthClients.

func (*AuthClientQuery) AllX

func (acq *AuthClientQuery) AllX(ctx context.Context) []*AuthClient

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

func (*AuthClientQuery) Clone

func (acq *AuthClientQuery) Clone() *AuthClientQuery

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

func (*AuthClientQuery) Count

func (acq *AuthClientQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AuthClientQuery) CountX

func (acq *AuthClientQuery) CountX(ctx context.Context) int

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

func (*AuthClientQuery) ExecContext

func (c *AuthClientQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AuthClientQuery) Exist

func (acq *AuthClientQuery) Exist(ctx context.Context) (bool, error)

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

func (*AuthClientQuery) ExistX

func (acq *AuthClientQuery) ExistX(ctx context.Context) bool

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

func (*AuthClientQuery) First

func (acq *AuthClientQuery) First(ctx context.Context) (*AuthClient, error)

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

func (*AuthClientQuery) FirstID

func (acq *AuthClientQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AuthClientQuery) FirstIDX

func (acq *AuthClientQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*AuthClientQuery) FirstX

func (acq *AuthClientQuery) FirstX(ctx context.Context) *AuthClient

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

func (*AuthClientQuery) GroupBy

func (acq *AuthClientQuery) GroupBy(field string, fields ...string) *AuthClientGroupBy

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

Example:

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

client.AuthClient.Query().
	GroupBy(authclient.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AuthClientQuery) IDs

func (acq *AuthClientQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*AuthClientQuery) IDsX

func (acq *AuthClientQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*AuthClientQuery) Limit

func (acq *AuthClientQuery) Limit(limit int) *AuthClientQuery

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

func (*AuthClientQuery) Modify

func (acq *AuthClientQuery) Modify(modifiers ...func(s *sql.Selector)) *AuthClientSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*AuthClientQuery) Offset

func (acq *AuthClientQuery) Offset(offset int) *AuthClientQuery

Offset to start from.

func (*AuthClientQuery) Only

func (acq *AuthClientQuery) Only(ctx context.Context) (*AuthClient, error)

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

func (*AuthClientQuery) OnlyID

func (acq *AuthClientQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AuthClientQuery) OnlyIDX

func (acq *AuthClientQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*AuthClientQuery) OnlyX

func (acq *AuthClientQuery) OnlyX(ctx context.Context) *AuthClient

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

func (*AuthClientQuery) Order

func (acq *AuthClientQuery) Order(o ...OrderFunc) *AuthClientQuery

Order specifies how the records should be ordered.

func (*AuthClientQuery) QueryAPITokens

func (acq *AuthClientQuery) QueryAPITokens() *ApiTokenQuery

QueryAPITokens chains the current query on the "api_tokens" edge.

func (*AuthClientQuery) QueryContext

func (c *AuthClientQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AuthClientQuery) Select

func (acq *AuthClientQuery) Select(fields ...string) *AuthClientSelect

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

Example:

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

client.AuthClient.Query().
	Select(authclient.FieldName).
	Scan(ctx, &v)

func (*AuthClientQuery) Unique

func (acq *AuthClientQuery) Unique(unique bool) *AuthClientQuery

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

Where adds a new predicate for the AuthClientQuery builder.

func (*AuthClientQuery) WithAPITokens

func (acq *AuthClientQuery) WithAPITokens(opts ...func(*ApiTokenQuery)) *AuthClientQuery

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

type AuthClientSelect

type AuthClientSelect struct {
	*AuthClientQuery
	// contains filtered or unexported fields
}

AuthClientSelect is the builder for selecting fields of AuthClient entities.

func (*AuthClientSelect) Aggregate

func (acs *AuthClientSelect) Aggregate(fns ...AggregateFunc) *AuthClientSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AuthClientSelect) Bool

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

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

func (*AuthClientSelect) BoolX

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

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

func (*AuthClientSelect) Bools

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

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

func (*AuthClientSelect) BoolsX

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

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

func (AuthClientSelect) ExecContext

func (c AuthClientSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AuthClientSelect) Float64

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

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

func (*AuthClientSelect) Float64X

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

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

func (*AuthClientSelect) Float64s

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

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

func (*AuthClientSelect) Float64sX

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

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

func (*AuthClientSelect) Int

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

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

func (*AuthClientSelect) IntX

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

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

func (*AuthClientSelect) Ints

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

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

func (*AuthClientSelect) IntsX

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

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

func (*AuthClientSelect) Modify

func (acs *AuthClientSelect) Modify(modifiers ...func(s *sql.Selector)) *AuthClientSelect

Modify adds a query modifier for attaching custom logic to queries.

func (AuthClientSelect) QueryContext

func (c AuthClientSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AuthClientSelect) Scan

func (acs *AuthClientSelect) Scan(ctx context.Context, v any) error

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

func (*AuthClientSelect) ScanX

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

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

func (*AuthClientSelect) String

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

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

func (*AuthClientSelect) StringX

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

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

func (*AuthClientSelect) Strings

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

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

func (*AuthClientSelect) StringsX

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

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

type AuthClientUpdate

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

AuthClientUpdate is the builder for updating AuthClient entities.

func (*AuthClientUpdate) AddAPITokenIDs

func (acu *AuthClientUpdate) AddAPITokenIDs(ids ...uuid.UUID) *AuthClientUpdate

AddAPITokenIDs adds the "api_tokens" edge to the ApiToken entity by IDs.

func (*AuthClientUpdate) AddAPITokens

func (acu *AuthClientUpdate) AddAPITokens(a ...*ApiToken) *AuthClientUpdate

AddAPITokens adds the "api_tokens" edges to the ApiToken entity.

func (*AuthClientUpdate) ClearAPITokens

func (acu *AuthClientUpdate) ClearAPITokens() *AuthClientUpdate

ClearAPITokens clears all "api_tokens" edges to the ApiToken entity.

func (*AuthClientUpdate) Exec

func (acu *AuthClientUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthClientUpdate) ExecContext

func (c *AuthClientUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AuthClientUpdate) ExecX

func (acu *AuthClientUpdate) ExecX(ctx context.Context)

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

func (*AuthClientUpdate) Modify

func (acu *AuthClientUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AuthClientUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*AuthClientUpdate) Mutation

func (acu *AuthClientUpdate) Mutation() *AuthClientMutation

Mutation returns the AuthClientMutation object of the builder.

func (*AuthClientUpdate) QueryContext

func (c *AuthClientUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AuthClientUpdate) RemoveAPITokenIDs

func (acu *AuthClientUpdate) RemoveAPITokenIDs(ids ...uuid.UUID) *AuthClientUpdate

RemoveAPITokenIDs removes the "api_tokens" edge to ApiToken entities by IDs.

func (*AuthClientUpdate) RemoveAPITokens

func (acu *AuthClientUpdate) RemoveAPITokens(a ...*ApiToken) *AuthClientUpdate

RemoveAPITokens removes "api_tokens" edges to ApiToken entities.

func (*AuthClientUpdate) Save

func (acu *AuthClientUpdate) Save(ctx context.Context) (int, error)

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

func (*AuthClientUpdate) SaveX

func (acu *AuthClientUpdate) SaveX(ctx context.Context) int

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

func (*AuthClientUpdate) SetName

func (acu *AuthClientUpdate) SetName(s string) *AuthClientUpdate

SetName sets the "name" field.

func (*AuthClientUpdate) SetUpdatedAt

func (acu *AuthClientUpdate) SetUpdatedAt(t time.Time) *AuthClientUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AuthClientUpdate) Where

Where appends a list predicates to the AuthClientUpdate builder.

type AuthClientUpdateOne

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

AuthClientUpdateOne is the builder for updating a single AuthClient entity.

func (*AuthClientUpdateOne) AddAPITokenIDs

func (acuo *AuthClientUpdateOne) AddAPITokenIDs(ids ...uuid.UUID) *AuthClientUpdateOne

AddAPITokenIDs adds the "api_tokens" edge to the ApiToken entity by IDs.

func (*AuthClientUpdateOne) AddAPITokens

func (acuo *AuthClientUpdateOne) AddAPITokens(a ...*ApiToken) *AuthClientUpdateOne

AddAPITokens adds the "api_tokens" edges to the ApiToken entity.

func (*AuthClientUpdateOne) ClearAPITokens

func (acuo *AuthClientUpdateOne) ClearAPITokens() *AuthClientUpdateOne

ClearAPITokens clears all "api_tokens" edges to the ApiToken entity.

func (*AuthClientUpdateOne) Exec

func (acuo *AuthClientUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AuthClientUpdateOne) ExecContext

func (c *AuthClientUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AuthClientUpdateOne) ExecX

func (acuo *AuthClientUpdateOne) ExecX(ctx context.Context)

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

func (*AuthClientUpdateOne) Modify

func (acuo *AuthClientUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *AuthClientUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*AuthClientUpdateOne) Mutation

func (acuo *AuthClientUpdateOne) Mutation() *AuthClientMutation

Mutation returns the AuthClientMutation object of the builder.

func (*AuthClientUpdateOne) QueryContext

func (c *AuthClientUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AuthClientUpdateOne) RemoveAPITokenIDs

func (acuo *AuthClientUpdateOne) RemoveAPITokenIDs(ids ...uuid.UUID) *AuthClientUpdateOne

RemoveAPITokenIDs removes the "api_tokens" edge to ApiToken entities by IDs.

func (*AuthClientUpdateOne) RemoveAPITokens

func (acuo *AuthClientUpdateOne) RemoveAPITokens(a ...*ApiToken) *AuthClientUpdateOne

RemoveAPITokens removes "api_tokens" edges to ApiToken entities.

func (*AuthClientUpdateOne) Save

func (acuo *AuthClientUpdateOne) Save(ctx context.Context) (*AuthClient, error)

Save executes the query and returns the updated AuthClient entity.

func (*AuthClientUpdateOne) SaveX

func (acuo *AuthClientUpdateOne) SaveX(ctx context.Context) *AuthClient

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

func (*AuthClientUpdateOne) Select

func (acuo *AuthClientUpdateOne) Select(field string, fields ...string) *AuthClientUpdateOne

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

func (*AuthClientUpdateOne) SetName

SetName sets the "name" field.

func (*AuthClientUpdateOne) SetUpdatedAt

func (acuo *AuthClientUpdateOne) SetUpdatedAt(t time.Time) *AuthClientUpdateOne

SetUpdatedAt sets the "updated_at" field.

type AuthClientUpsert

type AuthClientUpsert struct {
	*sql.UpdateSet
}

AuthClientUpsert is the "OnConflict" setter.

func (*AuthClientUpsert) SetName

func (u *AuthClientUpsert) SetName(v string) *AuthClientUpsert

SetName sets the "name" field.

func (*AuthClientUpsert) SetUpdatedAt

func (u *AuthClientUpsert) SetUpdatedAt(v time.Time) *AuthClientUpsert

SetUpdatedAt sets the "updated_at" field.

func (*AuthClientUpsert) UpdateName

func (u *AuthClientUpsert) UpdateName() *AuthClientUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*AuthClientUpsert) UpdateUpdatedAt

func (u *AuthClientUpsert) UpdateUpdatedAt() *AuthClientUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type AuthClientUpsertBulk

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

AuthClientUpsertBulk is the builder for "upsert"-ing a bulk of AuthClient nodes.

func (*AuthClientUpsertBulk) DoNothing

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

func (*AuthClientUpsertBulk) Exec

Exec executes the query.

func (*AuthClientUpsertBulk) ExecX

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

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

func (*AuthClientUpsertBulk) Ignore

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

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

func (*AuthClientUpsertBulk) SetName

SetName sets the "name" field.

func (*AuthClientUpsertBulk) SetUpdatedAt

func (u *AuthClientUpsertBulk) SetUpdatedAt(v time.Time) *AuthClientUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*AuthClientUpsertBulk) Update

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

func (*AuthClientUpsertBulk) UpdateName

func (u *AuthClientUpsertBulk) UpdateName() *AuthClientUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*AuthClientUpsertBulk) UpdateNewValues

func (u *AuthClientUpsertBulk) UpdateNewValues() *AuthClientUpsertBulk

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

client.AuthClient.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(authclient.FieldID)
		}),
	).
	Exec(ctx)

func (*AuthClientUpsertBulk) UpdateUpdatedAt

func (u *AuthClientUpsertBulk) UpdateUpdatedAt() *AuthClientUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type AuthClientUpsertOne

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

AuthClientUpsertOne is the builder for "upsert"-ing

one AuthClient node.

func (*AuthClientUpsertOne) DoNothing

func (u *AuthClientUpsertOne) DoNothing() *AuthClientUpsertOne

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

func (*AuthClientUpsertOne) Exec

Exec executes the query.

func (*AuthClientUpsertOne) ExecX

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

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

func (*AuthClientUpsertOne) ID

func (u *AuthClientUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

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

func (*AuthClientUpsertOne) IDX

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

func (*AuthClientUpsertOne) Ignore

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

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

func (*AuthClientUpsertOne) SetName

SetName sets the "name" field.

func (*AuthClientUpsertOne) SetUpdatedAt

func (u *AuthClientUpsertOne) SetUpdatedAt(v time.Time) *AuthClientUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*AuthClientUpsertOne) Update

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

func (*AuthClientUpsertOne) UpdateName

func (u *AuthClientUpsertOne) UpdateName() *AuthClientUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*AuthClientUpsertOne) UpdateNewValues

func (u *AuthClientUpsertOne) UpdateNewValues() *AuthClientUpsertOne

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

client.AuthClient.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(authclient.FieldID)
		}),
	).
	Exec(ctx)

func (*AuthClientUpsertOne) UpdateUpdatedAt

func (u *AuthClientUpsertOne) UpdateUpdatedAt() *AuthClientUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type AuthClients

type AuthClients []*AuthClient

AuthClients is a parsable slice of AuthClient.

type BannedWords

type BannedWords struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Words holds the value of the "words" field.
	Words []string `json:"words,omitempty"`
	// Reason holds the value of the "reason" field.
	Reason string `json:"reason,omitempty"`
	// SplitMatch holds the value of the "split_match" field.
	SplitMatch bool `json:"split_match,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

BannedWords is the model entity for the BannedWords schema.

func (*BannedWords) ExecContext

func (c *BannedWords) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*BannedWords) QueryContext

func (c *BannedWords) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*BannedWords) String

func (bw *BannedWords) String() string

String implements the fmt.Stringer.

func (*BannedWords) Unwrap

func (bw *BannedWords) Unwrap() *BannedWords

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

func (bw *BannedWords) Update() *BannedWordsUpdateOne

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

type BannedWordsClient

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

BannedWordsClient is a client for the BannedWords schema.

func NewBannedWordsClient

func NewBannedWordsClient(c config) *BannedWordsClient

NewBannedWordsClient returns a client for the BannedWords from the given config.

func (*BannedWordsClient) Create

func (c *BannedWordsClient) Create() *BannedWordsCreate

Create returns a builder for creating a BannedWords entity.

func (*BannedWordsClient) CreateBulk

func (c *BannedWordsClient) CreateBulk(builders ...*BannedWordsCreate) *BannedWordsCreateBulk

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

func (*BannedWordsClient) Delete

func (c *BannedWordsClient) Delete() *BannedWordsDelete

Delete returns a delete builder for BannedWords.

func (*BannedWordsClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*BannedWordsClient) DeleteOneID

func (c *BannedWordsClient) DeleteOneID(id uuid.UUID) *BannedWordsDeleteOne

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

func (*BannedWordsClient) ExecContext

func (c *BannedWordsClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*BannedWordsClient) Get

Get returns a BannedWords entity by its id.

func (*BannedWordsClient) GetX

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

func (*BannedWordsClient) Hooks

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

Hooks returns the client hooks.

func (*BannedWordsClient) Intercept

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

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

func (*BannedWordsClient) Interceptors

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

Interceptors returns the client interceptors.

func (*BannedWordsClient) Query

func (c *BannedWordsClient) Query() *BannedWordsQuery

Query returns a query builder for BannedWords.

func (*BannedWordsClient) QueryContext

func (c *BannedWordsClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*BannedWordsClient) Update

func (c *BannedWordsClient) Update() *BannedWordsUpdate

Update returns an update builder for BannedWords.

func (*BannedWordsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*BannedWordsClient) UpdateOneID

func (c *BannedWordsClient) UpdateOneID(id uuid.UUID) *BannedWordsUpdateOne

UpdateOneID returns an update builder for the given id.

func (*BannedWordsClient) Use

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

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

type BannedWordsCreate

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

BannedWordsCreate is the builder for creating a BannedWords entity.

func (*BannedWordsCreate) Exec

func (bwc *BannedWordsCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*BannedWordsCreate) ExecContext

func (c *BannedWordsCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*BannedWordsCreate) ExecX

func (bwc *BannedWordsCreate) ExecX(ctx context.Context)

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

func (*BannedWordsCreate) Mutation

func (bwc *BannedWordsCreate) Mutation() *BannedWordsMutation

Mutation returns the BannedWordsMutation object of the builder.

func (*BannedWordsCreate) OnConflict

func (bwc *BannedWordsCreate) OnConflict(opts ...sql.ConflictOption) *BannedWordsUpsertOne

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

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

func (*BannedWordsCreate) OnConflictColumns

func (bwc *BannedWordsCreate) OnConflictColumns(columns ...string) *BannedWordsUpsertOne

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

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

func (*BannedWordsCreate) QueryContext

func (c *BannedWordsCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*BannedWordsCreate) Save

func (bwc *BannedWordsCreate) Save(ctx context.Context) (*BannedWords, error)

Save creates the BannedWords in the database.

func (*BannedWordsCreate) SaveX

func (bwc *BannedWordsCreate) SaveX(ctx context.Context) *BannedWords

SaveX calls Save and panics if Save returns an error.

func (*BannedWordsCreate) SetCreatedAt

func (bwc *BannedWordsCreate) SetCreatedAt(t time.Time) *BannedWordsCreate

SetCreatedAt sets the "created_at" field.

func (*BannedWordsCreate) SetID

SetID sets the "id" field.

func (*BannedWordsCreate) SetNillableCreatedAt

func (bwc *BannedWordsCreate) SetNillableCreatedAt(t *time.Time) *BannedWordsCreate

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

func (*BannedWordsCreate) SetNillableID

func (bwc *BannedWordsCreate) SetNillableID(u *uuid.UUID) *BannedWordsCreate

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

func (*BannedWordsCreate) SetNillableSplitMatch

func (bwc *BannedWordsCreate) SetNillableSplitMatch(b *bool) *BannedWordsCreate

SetNillableSplitMatch sets the "split_match" field if the given value is not nil.

func (*BannedWordsCreate) SetNillableUpdatedAt

func (bwc *BannedWordsCreate) SetNillableUpdatedAt(t *time.Time) *BannedWordsCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*BannedWordsCreate) SetReason

func (bwc *BannedWordsCreate) SetReason(s string) *BannedWordsCreate

SetReason sets the "reason" field.

func (*BannedWordsCreate) SetSplitMatch

func (bwc *BannedWordsCreate) SetSplitMatch(b bool) *BannedWordsCreate

SetSplitMatch sets the "split_match" field.

func (*BannedWordsCreate) SetUpdatedAt

func (bwc *BannedWordsCreate) SetUpdatedAt(t time.Time) *BannedWordsCreate

SetUpdatedAt sets the "updated_at" field.

func (*BannedWordsCreate) SetWords

func (bwc *BannedWordsCreate) SetWords(s []string) *BannedWordsCreate

SetWords sets the "words" field.

type BannedWordsCreateBulk

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

BannedWordsCreateBulk is the builder for creating many BannedWords entities in bulk.

func (*BannedWordsCreateBulk) Exec

func (bwcb *BannedWordsCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*BannedWordsCreateBulk) ExecContext

func (c *BannedWordsCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*BannedWordsCreateBulk) ExecX

func (bwcb *BannedWordsCreateBulk) ExecX(ctx context.Context)

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

func (*BannedWordsCreateBulk) OnConflict

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

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

func (*BannedWordsCreateBulk) OnConflictColumns

func (bwcb *BannedWordsCreateBulk) OnConflictColumns(columns ...string) *BannedWordsUpsertBulk

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

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

func (*BannedWordsCreateBulk) QueryContext

func (c *BannedWordsCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*BannedWordsCreateBulk) Save

func (bwcb *BannedWordsCreateBulk) Save(ctx context.Context) ([]*BannedWords, error)

Save creates the BannedWords entities in the database.

func (*BannedWordsCreateBulk) SaveX

func (bwcb *BannedWordsCreateBulk) SaveX(ctx context.Context) []*BannedWords

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

type BannedWordsDelete

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

BannedWordsDelete is the builder for deleting a BannedWords entity.

func (*BannedWordsDelete) Exec

func (bwd *BannedWordsDelete) Exec(ctx context.Context) (int, error)

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

func (*BannedWordsDelete) ExecContext

func (c *BannedWordsDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*BannedWordsDelete) ExecX

func (bwd *BannedWordsDelete) ExecX(ctx context.Context) int

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

func (*BannedWordsDelete) QueryContext

func (c *BannedWordsDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*BannedWordsDelete) Where

Where appends a list predicates to the BannedWordsDelete builder.

type BannedWordsDeleteOne

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

BannedWordsDeleteOne is the builder for deleting a single BannedWords entity.

func (*BannedWordsDeleteOne) Exec

func (bwdo *BannedWordsDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*BannedWordsDeleteOne) ExecX

func (bwdo *BannedWordsDeleteOne) ExecX(ctx context.Context)

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

type BannedWordsGroupBy

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

BannedWordsGroupBy is the group-by builder for BannedWords entities.

func (*BannedWordsGroupBy) Aggregate

func (bwgb *BannedWordsGroupBy) Aggregate(fns ...AggregateFunc) *BannedWordsGroupBy

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

func (*BannedWordsGroupBy) Bool

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

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

func (*BannedWordsGroupBy) BoolX

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

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

func (*BannedWordsGroupBy) Bools

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

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

func (*BannedWordsGroupBy) BoolsX

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

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

func (*BannedWordsGroupBy) Float64

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

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

func (*BannedWordsGroupBy) Float64X

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

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

func (*BannedWordsGroupBy) Float64s

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

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

func (*BannedWordsGroupBy) Float64sX

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

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

func (*BannedWordsGroupBy) Int

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

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

func (*BannedWordsGroupBy) IntX

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

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

func (*BannedWordsGroupBy) Ints

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

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

func (*BannedWordsGroupBy) IntsX

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

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

func (*BannedWordsGroupBy) Scan

func (bwgb *BannedWordsGroupBy) Scan(ctx context.Context, v any) error

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

func (*BannedWordsGroupBy) ScanX

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

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

func (*BannedWordsGroupBy) String

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

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

func (*BannedWordsGroupBy) StringX

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

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

func (*BannedWordsGroupBy) Strings

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

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

func (*BannedWordsGroupBy) StringsX

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

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

type BannedWordsMutation

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

BannedWordsMutation represents an operation that mutates the BannedWords nodes in the graph.

func (*BannedWordsMutation) AddField

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

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

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

func (*BannedWordsMutation) AddedField

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

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

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

func (*BannedWordsMutation) AddedIDs

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

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

func (*BannedWordsMutation) AppendWords

func (m *BannedWordsMutation) AppendWords(s []string)

AppendWords adds s to the "words" field.

func (*BannedWordsMutation) AppendedWords

func (m *BannedWordsMutation) AppendedWords() ([]string, bool)

AppendedWords returns the list of values that were appended to the "words" field in this mutation.

func (*BannedWordsMutation) ClearEdge

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

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

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

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

func (*BannedWordsMutation) ClearedFields

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

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

func (BannedWordsMutation) Client

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

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

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

func (*BannedWordsMutation) EdgeCleared

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

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

func (*BannedWordsMutation) ExecContext

func (c *BannedWordsMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*BannedWordsMutation) Field

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

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

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

func (*BannedWordsMutation) Fields

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

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

func (m *BannedWordsMutation) 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 (*BannedWordsMutation) OldCreatedAt

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

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

func (m *BannedWordsMutation) 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 (*BannedWordsMutation) OldReason

func (m *BannedWordsMutation) OldReason(ctx context.Context) (v string, err error)

OldReason returns the old "reason" field's value of the BannedWords entity. If the BannedWords 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 (*BannedWordsMutation) OldSplitMatch

func (m *BannedWordsMutation) OldSplitMatch(ctx context.Context) (v bool, err error)

OldSplitMatch returns the old "split_match" field's value of the BannedWords entity. If the BannedWords 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 (*BannedWordsMutation) OldUpdatedAt

func (m *BannedWordsMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the BannedWords entity. If the BannedWords 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 (*BannedWordsMutation) OldWords

func (m *BannedWordsMutation) OldWords(ctx context.Context) (v []string, err error)

OldWords returns the old "words" field's value of the BannedWords entity. If the BannedWords 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 (*BannedWordsMutation) Op

func (m *BannedWordsMutation) Op() Op

Op returns the operation name.

func (*BannedWordsMutation) QueryContext

func (c *BannedWordsMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*BannedWordsMutation) Reason

func (m *BannedWordsMutation) Reason() (r string, exists bool)

Reason returns the value of the "reason" field in the mutation.

func (*BannedWordsMutation) RemovedEdges

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

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

func (*BannedWordsMutation) RemovedIDs

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

func (m *BannedWordsMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*BannedWordsMutation) ResetEdge

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

func (m *BannedWordsMutation) 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 (*BannedWordsMutation) ResetReason

func (m *BannedWordsMutation) ResetReason()

ResetReason resets all changes to the "reason" field.

func (*BannedWordsMutation) ResetSplitMatch

func (m *BannedWordsMutation) ResetSplitMatch()

ResetSplitMatch resets all changes to the "split_match" field.

func (*BannedWordsMutation) ResetUpdatedAt

func (m *BannedWordsMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*BannedWordsMutation) ResetWords

func (m *BannedWordsMutation) ResetWords()

ResetWords resets all changes to the "words" field.

func (*BannedWordsMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*BannedWordsMutation) SetField

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

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

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

func (*BannedWordsMutation) SetOp

func (m *BannedWordsMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*BannedWordsMutation) SetReason

func (m *BannedWordsMutation) SetReason(s string)

SetReason sets the "reason" field.

func (*BannedWordsMutation) SetSplitMatch

func (m *BannedWordsMutation) SetSplitMatch(b bool)

SetSplitMatch sets the "split_match" field.

func (*BannedWordsMutation) SetUpdatedAt

func (m *BannedWordsMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*BannedWordsMutation) SetWords

func (m *BannedWordsMutation) SetWords(s []string)

SetWords sets the "words" field.

func (*BannedWordsMutation) SplitMatch

func (m *BannedWordsMutation) SplitMatch() (r bool, exists bool)

SplitMatch returns the value of the "split_match" field in the mutation.

func (BannedWordsMutation) Tx

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

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

func (*BannedWordsMutation) Type

func (m *BannedWordsMutation) Type() string

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

func (*BannedWordsMutation) UpdatedAt

func (m *BannedWordsMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*BannedWordsMutation) Where

func (m *BannedWordsMutation) Where(ps ...predicate.BannedWords)

Where appends a list predicates to the BannedWordsMutation builder.

func (*BannedWordsMutation) WhereP

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

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

func (*BannedWordsMutation) Words

func (m *BannedWordsMutation) Words() (r []string, exists bool)

Words returns the value of the "words" field in the mutation.

type BannedWordsQuery

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

BannedWordsQuery is the builder for querying BannedWords entities.

func (*BannedWordsQuery) Aggregate

func (bwq *BannedWordsQuery) Aggregate(fns ...AggregateFunc) *BannedWordsSelect

Aggregate returns a BannedWordsSelect configured with the given aggregations.

func (*BannedWordsQuery) All

func (bwq *BannedWordsQuery) All(ctx context.Context) ([]*BannedWords, error)

All executes the query and returns a list of BannedWordsSlice.

func (*BannedWordsQuery) AllX

func (bwq *BannedWordsQuery) AllX(ctx context.Context) []*BannedWords

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

func (*BannedWordsQuery) Clone

func (bwq *BannedWordsQuery) Clone() *BannedWordsQuery

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

func (*BannedWordsQuery) Count

func (bwq *BannedWordsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*BannedWordsQuery) CountX

func (bwq *BannedWordsQuery) CountX(ctx context.Context) int

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

func (*BannedWordsQuery) ExecContext

func (c *BannedWordsQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*BannedWordsQuery) Exist

func (bwq *BannedWordsQuery) Exist(ctx context.Context) (bool, error)

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

func (*BannedWordsQuery) ExistX

func (bwq *BannedWordsQuery) ExistX(ctx context.Context) bool

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

func (*BannedWordsQuery) First

func (bwq *BannedWordsQuery) First(ctx context.Context) (*BannedWords, error)

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

func (*BannedWordsQuery) FirstID

func (bwq *BannedWordsQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*BannedWordsQuery) FirstIDX

func (bwq *BannedWordsQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*BannedWordsQuery) FirstX

func (bwq *BannedWordsQuery) FirstX(ctx context.Context) *BannedWords

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

func (*BannedWordsQuery) GroupBy

func (bwq *BannedWordsQuery) GroupBy(field string, fields ...string) *BannedWordsGroupBy

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 {
	Words []string `json:"words,omitempty"`
	Count int `json:"count,omitempty"`
}

client.BannedWords.Query().
	GroupBy(bannedwords.FieldWords).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*BannedWordsQuery) IDs

func (bwq *BannedWordsQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*BannedWordsQuery) IDsX

func (bwq *BannedWordsQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*BannedWordsQuery) Limit

func (bwq *BannedWordsQuery) Limit(limit int) *BannedWordsQuery

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

func (*BannedWordsQuery) Modify

func (bwq *BannedWordsQuery) Modify(modifiers ...func(s *sql.Selector)) *BannedWordsSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*BannedWordsQuery) Offset

func (bwq *BannedWordsQuery) Offset(offset int) *BannedWordsQuery

Offset to start from.

func (*BannedWordsQuery) Only

func (bwq *BannedWordsQuery) Only(ctx context.Context) (*BannedWords, error)

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

func (*BannedWordsQuery) OnlyID

func (bwq *BannedWordsQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*BannedWordsQuery) OnlyIDX

func (bwq *BannedWordsQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*BannedWordsQuery) OnlyX

func (bwq *BannedWordsQuery) OnlyX(ctx context.Context) *BannedWords

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

func (*BannedWordsQuery) Order

func (bwq *BannedWordsQuery) Order(o ...OrderFunc) *BannedWordsQuery

Order specifies how the records should be ordered.

func (*BannedWordsQuery) QueryContext

func (c *BannedWordsQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*BannedWordsQuery) Select

func (bwq *BannedWordsQuery) Select(fields ...string) *BannedWordsSelect

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 {
	Words []string `json:"words,omitempty"`
}

client.BannedWords.Query().
	Select(bannedwords.FieldWords).
	Scan(ctx, &v)

func (*BannedWordsQuery) Unique

func (bwq *BannedWordsQuery) Unique(unique bool) *BannedWordsQuery

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

Where adds a new predicate for the BannedWordsQuery builder.

type BannedWordsSelect

type BannedWordsSelect struct {
	*BannedWordsQuery
	// contains filtered or unexported fields
}

BannedWordsSelect is the builder for selecting fields of BannedWords entities.

func (*BannedWordsSelect) Aggregate

func (bws *BannedWordsSelect) Aggregate(fns ...AggregateFunc) *BannedWordsSelect

Aggregate adds the given aggregation functions to the selector query.

func (*BannedWordsSelect) Bool

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

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

func (*BannedWordsSelect) BoolX

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

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

func (*BannedWordsSelect) Bools

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

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

func (*BannedWordsSelect) BoolsX

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

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

func (BannedWordsSelect) ExecContext

func (c BannedWordsSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*BannedWordsSelect) Float64

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

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

func (*BannedWordsSelect) Float64X

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

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

func (*BannedWordsSelect) Float64s

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

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

func (*BannedWordsSelect) Float64sX

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

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

func (*BannedWordsSelect) Int

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

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

func (*BannedWordsSelect) IntX

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

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

func (*BannedWordsSelect) Ints

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

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

func (*BannedWordsSelect) IntsX

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

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

func (*BannedWordsSelect) Modify

func (bws *BannedWordsSelect) Modify(modifiers ...func(s *sql.Selector)) *BannedWordsSelect

Modify adds a query modifier for attaching custom logic to queries.

func (BannedWordsSelect) QueryContext

func (c BannedWordsSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*BannedWordsSelect) Scan

func (bws *BannedWordsSelect) Scan(ctx context.Context, v any) error

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

func (*BannedWordsSelect) ScanX

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

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

func (*BannedWordsSelect) String

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

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

func (*BannedWordsSelect) StringX

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

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

func (*BannedWordsSelect) Strings

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

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

func (*BannedWordsSelect) StringsX

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

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

type BannedWordsSlice

type BannedWordsSlice []*BannedWords

BannedWordsSlice is a parsable slice of BannedWords.

type BannedWordsUpdate

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

BannedWordsUpdate is the builder for updating BannedWords entities.

func (*BannedWordsUpdate) AppendWords

func (bwu *BannedWordsUpdate) AppendWords(s []string) *BannedWordsUpdate

AppendWords appends s to the "words" field.

func (*BannedWordsUpdate) Exec

func (bwu *BannedWordsUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*BannedWordsUpdate) ExecContext

func (c *BannedWordsUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*BannedWordsUpdate) ExecX

func (bwu *BannedWordsUpdate) ExecX(ctx context.Context)

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

func (*BannedWordsUpdate) Modify

func (bwu *BannedWordsUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *BannedWordsUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*BannedWordsUpdate) Mutation

func (bwu *BannedWordsUpdate) Mutation() *BannedWordsMutation

Mutation returns the BannedWordsMutation object of the builder.

func (*BannedWordsUpdate) QueryContext

func (c *BannedWordsUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*BannedWordsUpdate) Save

func (bwu *BannedWordsUpdate) Save(ctx context.Context) (int, error)

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

func (*BannedWordsUpdate) SaveX

func (bwu *BannedWordsUpdate) SaveX(ctx context.Context) int

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

func (*BannedWordsUpdate) SetNillableSplitMatch

func (bwu *BannedWordsUpdate) SetNillableSplitMatch(b *bool) *BannedWordsUpdate

SetNillableSplitMatch sets the "split_match" field if the given value is not nil.

func (*BannedWordsUpdate) SetReason

func (bwu *BannedWordsUpdate) SetReason(s string) *BannedWordsUpdate

SetReason sets the "reason" field.

func (*BannedWordsUpdate) SetSplitMatch

func (bwu *BannedWordsUpdate) SetSplitMatch(b bool) *BannedWordsUpdate

SetSplitMatch sets the "split_match" field.

func (*BannedWordsUpdate) SetUpdatedAt

func (bwu *BannedWordsUpdate) SetUpdatedAt(t time.Time) *BannedWordsUpdate

SetUpdatedAt sets the "updated_at" field.

func (*BannedWordsUpdate) SetWords

func (bwu *BannedWordsUpdate) SetWords(s []string) *BannedWordsUpdate

SetWords sets the "words" field.

func (*BannedWordsUpdate) Where

Where appends a list predicates to the BannedWordsUpdate builder.

type BannedWordsUpdateOne

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

BannedWordsUpdateOne is the builder for updating a single BannedWords entity.

func (*BannedWordsUpdateOne) AppendWords

func (bwuo *BannedWordsUpdateOne) AppendWords(s []string) *BannedWordsUpdateOne

AppendWords appends s to the "words" field.

func (*BannedWordsUpdateOne) Exec

func (bwuo *BannedWordsUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*BannedWordsUpdateOne) ExecContext

func (c *BannedWordsUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*BannedWordsUpdateOne) ExecX

func (bwuo *BannedWordsUpdateOne) ExecX(ctx context.Context)

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

func (*BannedWordsUpdateOne) Modify

func (bwuo *BannedWordsUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *BannedWordsUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*BannedWordsUpdateOne) Mutation

func (bwuo *BannedWordsUpdateOne) Mutation() *BannedWordsMutation

Mutation returns the BannedWordsMutation object of the builder.

func (*BannedWordsUpdateOne) QueryContext

func (c *BannedWordsUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*BannedWordsUpdateOne) Save

Save executes the query and returns the updated BannedWords entity.

func (*BannedWordsUpdateOne) SaveX

func (bwuo *BannedWordsUpdateOne) SaveX(ctx context.Context) *BannedWords

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

func (*BannedWordsUpdateOne) Select

func (bwuo *BannedWordsUpdateOne) Select(field string, fields ...string) *BannedWordsUpdateOne

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

func (*BannedWordsUpdateOne) SetNillableSplitMatch

func (bwuo *BannedWordsUpdateOne) SetNillableSplitMatch(b *bool) *BannedWordsUpdateOne

SetNillableSplitMatch sets the "split_match" field if the given value is not nil.

func (*BannedWordsUpdateOne) SetReason

func (bwuo *BannedWordsUpdateOne) SetReason(s string) *BannedWordsUpdateOne

SetReason sets the "reason" field.

func (*BannedWordsUpdateOne) SetSplitMatch

func (bwuo *BannedWordsUpdateOne) SetSplitMatch(b bool) *BannedWordsUpdateOne

SetSplitMatch sets the "split_match" field.

func (*BannedWordsUpdateOne) SetUpdatedAt

func (bwuo *BannedWordsUpdateOne) SetUpdatedAt(t time.Time) *BannedWordsUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*BannedWordsUpdateOne) SetWords

func (bwuo *BannedWordsUpdateOne) SetWords(s []string) *BannedWordsUpdateOne

SetWords sets the "words" field.

type BannedWordsUpsert

type BannedWordsUpsert struct {
	*sql.UpdateSet
}

BannedWordsUpsert is the "OnConflict" setter.

func (*BannedWordsUpsert) SetReason

func (u *BannedWordsUpsert) SetReason(v string) *BannedWordsUpsert

SetReason sets the "reason" field.

func (*BannedWordsUpsert) SetSplitMatch

func (u *BannedWordsUpsert) SetSplitMatch(v bool) *BannedWordsUpsert

SetSplitMatch sets the "split_match" field.

func (*BannedWordsUpsert) SetUpdatedAt

func (u *BannedWordsUpsert) SetUpdatedAt(v time.Time) *BannedWordsUpsert

SetUpdatedAt sets the "updated_at" field.

func (*BannedWordsUpsert) SetWords

func (u *BannedWordsUpsert) SetWords(v []string) *BannedWordsUpsert

SetWords sets the "words" field.

func (*BannedWordsUpsert) UpdateReason

func (u *BannedWordsUpsert) UpdateReason() *BannedWordsUpsert

UpdateReason sets the "reason" field to the value that was provided on create.

func (*BannedWordsUpsert) UpdateSplitMatch

func (u *BannedWordsUpsert) UpdateSplitMatch() *BannedWordsUpsert

UpdateSplitMatch sets the "split_match" field to the value that was provided on create.

func (*BannedWordsUpsert) UpdateUpdatedAt

func (u *BannedWordsUpsert) UpdateUpdatedAt() *BannedWordsUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*BannedWordsUpsert) UpdateWords

func (u *BannedWordsUpsert) UpdateWords() *BannedWordsUpsert

UpdateWords sets the "words" field to the value that was provided on create.

type BannedWordsUpsertBulk

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

BannedWordsUpsertBulk is the builder for "upsert"-ing a bulk of BannedWords nodes.

func (*BannedWordsUpsertBulk) DoNothing

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

func (*BannedWordsUpsertBulk) Exec

Exec executes the query.

func (*BannedWordsUpsertBulk) ExecX

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

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

func (*BannedWordsUpsertBulk) Ignore

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

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

func (*BannedWordsUpsertBulk) SetReason

SetReason sets the "reason" field.

func (*BannedWordsUpsertBulk) SetSplitMatch

func (u *BannedWordsUpsertBulk) SetSplitMatch(v bool) *BannedWordsUpsertBulk

SetSplitMatch sets the "split_match" field.

func (*BannedWordsUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*BannedWordsUpsertBulk) SetWords

SetWords sets the "words" field.

func (*BannedWordsUpsertBulk) Update

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

func (*BannedWordsUpsertBulk) UpdateNewValues

func (u *BannedWordsUpsertBulk) UpdateNewValues() *BannedWordsUpsertBulk

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

client.BannedWords.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(bannedwords.FieldID)
		}),
	).
	Exec(ctx)

func (*BannedWordsUpsertBulk) UpdateReason

func (u *BannedWordsUpsertBulk) UpdateReason() *BannedWordsUpsertBulk

UpdateReason sets the "reason" field to the value that was provided on create.

func (*BannedWordsUpsertBulk) UpdateSplitMatch

func (u *BannedWordsUpsertBulk) UpdateSplitMatch() *BannedWordsUpsertBulk

UpdateSplitMatch sets the "split_match" field to the value that was provided on create.

func (*BannedWordsUpsertBulk) UpdateUpdatedAt

func (u *BannedWordsUpsertBulk) UpdateUpdatedAt() *BannedWordsUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*BannedWordsUpsertBulk) UpdateWords

func (u *BannedWordsUpsertBulk) UpdateWords() *BannedWordsUpsertBulk

UpdateWords sets the "words" field to the value that was provided on create.

type BannedWordsUpsertOne

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

BannedWordsUpsertOne is the builder for "upsert"-ing

one BannedWords node.

func (*BannedWordsUpsertOne) DoNothing

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

func (*BannedWordsUpsertOne) Exec

Exec executes the query.

func (*BannedWordsUpsertOne) ExecX

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

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

func (*BannedWordsUpsertOne) ID

func (u *BannedWordsUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

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

func (*BannedWordsUpsertOne) IDX

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

func (*BannedWordsUpsertOne) Ignore

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

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

func (*BannedWordsUpsertOne) SetReason

SetReason sets the "reason" field.

func (*BannedWordsUpsertOne) SetSplitMatch

func (u *BannedWordsUpsertOne) SetSplitMatch(v bool) *BannedWordsUpsertOne

SetSplitMatch sets the "split_match" field.

func (*BannedWordsUpsertOne) SetUpdatedAt

func (u *BannedWordsUpsertOne) SetUpdatedAt(v time.Time) *BannedWordsUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*BannedWordsUpsertOne) SetWords

SetWords sets the "words" field.

func (*BannedWordsUpsertOne) Update

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

func (*BannedWordsUpsertOne) UpdateNewValues

func (u *BannedWordsUpsertOne) UpdateNewValues() *BannedWordsUpsertOne

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

client.BannedWords.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(bannedwords.FieldID)
		}),
	).
	Exec(ctx)

func (*BannedWordsUpsertOne) UpdateReason

func (u *BannedWordsUpsertOne) UpdateReason() *BannedWordsUpsertOne

UpdateReason sets the "reason" field to the value that was provided on create.

func (*BannedWordsUpsertOne) UpdateSplitMatch

func (u *BannedWordsUpsertOne) UpdateSplitMatch() *BannedWordsUpsertOne

UpdateSplitMatch sets the "split_match" field to the value that was provided on create.

func (*BannedWordsUpsertOne) UpdateUpdatedAt

func (u *BannedWordsUpsertOne) UpdateUpdatedAt() *BannedWordsUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*BannedWordsUpsertOne) UpdateWords

func (u *BannedWordsUpsertOne) UpdateWords() *BannedWordsUpsertOne

UpdateWords sets the "words" field to the value that was provided on create.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// ApiToken is the client for interacting with the ApiToken builders.
	ApiToken *ApiTokenClient
	// AuthClient is the client for interacting with the AuthClient builders.
	AuthClient *AuthClientClient
	// BannedWords is the client for interacting with the BannedWords builders.
	BannedWords *BannedWordsClient
	// Credit is the client for interacting with the Credit builders.
	Credit *CreditClient
	// CreditType is the client for interacting with the CreditType builders.
	CreditType *CreditTypeClient
	// DeviceInfo is the client for interacting with the DeviceInfo builders.
	DeviceInfo *DeviceInfoClient
	// DisposableEmail is the client for interacting with the DisposableEmail builders.
	DisposableEmail *DisposableEmailClient
	// Generation is the client for interacting with the Generation builders.
	Generation *GenerationClient
	// GenerationModel is the client for interacting with the GenerationModel builders.
	GenerationModel *GenerationModelClient
	// GenerationOutput is the client for interacting with the GenerationOutput builders.
	GenerationOutput *GenerationOutputClient
	// GenerationOutputLike is the client for interacting with the GenerationOutputLike builders.
	GenerationOutputLike *GenerationOutputLikeClient
	// IPBlackList is the client for interacting with the IPBlackList builders.
	IPBlackList *IPBlackListClient
	// MqLog is the client for interacting with the MqLog builders.
	MqLog *MqLogClient
	// NegativePrompt is the client for interacting with the NegativePrompt builders.
	NegativePrompt *NegativePromptClient
	// Prompt is the client for interacting with the Prompt builders.
	Prompt *PromptClient
	// Role is the client for interacting with the Role builders.
	Role *RoleClient
	// Scheduler is the client for interacting with the Scheduler builders.
	Scheduler *SchedulerClient
	// ThumbmarkIdBlackList is the client for interacting with the ThumbmarkIdBlackList builders.
	ThumbmarkIdBlackList *ThumbmarkIdBlackListClient
	// TipLog is the client for interacting with the TipLog builders.
	TipLog *TipLogClient
	// Upscale is the client for interacting with the Upscale builders.
	Upscale *UpscaleClient
	// UpscaleModel is the client for interacting with the UpscaleModel builders.
	UpscaleModel *UpscaleModelClient
	// UpscaleOutput is the client for interacting with the UpscaleOutput builders.
	UpscaleOutput *UpscaleOutputClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UsernameBlacklist is the client for interacting with the UsernameBlacklist builders.
	UsernameBlacklist *UsernameBlacklistClient
	// Voiceover is the client for interacting with the Voiceover builders.
	Voiceover *VoiceoverClient
	// VoiceoverModel is the client for interacting with the VoiceoverModel builders.
	VoiceoverModel *VoiceoverModelClient
	// VoiceoverOutput is the client for interacting with the VoiceoverOutput builders.
	VoiceoverOutput *VoiceoverOutputClient
	// VoiceoverSpeaker is the client for interacting with the VoiceoverSpeaker builders.
	VoiceoverSpeaker *VoiceoverSpeakerClient
	// 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().
	ApiToken.
	Query().
	Count(ctx)

func (*Client) ExecContext

func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Client) Intercept

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

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) QueryContext

func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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 Credit

type Credit struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// RemainingAmount holds the value of the "remaining_amount" field.
	RemainingAmount int32 `json:"remaining_amount,omitempty"`
	// ExpiresAt holds the value of the "expires_at" field.
	ExpiresAt time.Time `json:"expires_at,omitempty"`
	// StripeLineItemID holds the value of the "stripe_line_item_id" field.
	StripeLineItemID *string `json:"stripe_line_item_id,omitempty"`
	// ReplenishedAt holds the value of the "replenished_at" field.
	ReplenishedAt time.Time `json:"replenished_at,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// CreditTypeID holds the value of the "credit_type_id" field.
	CreditTypeID uuid.UUID `json:"credit_type_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CreditQuery when eager-loading is set.
	Edges CreditEdges `json:"edges"`
	// contains filtered or unexported fields
}

Credit is the model entity for the Credit schema.

func (*Credit) ExecContext

func (c *Credit) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Credit) QueryContext

func (c *Credit) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Credit) QueryCreditType

func (c *Credit) QueryCreditType() *CreditTypeQuery

QueryCreditType queries the "credit_type" edge of the Credit entity.

func (*Credit) QueryUsers

func (c *Credit) QueryUsers() *UserQuery

QueryUsers queries the "users" edge of the Credit entity.

func (*Credit) String

func (c *Credit) String() string

String implements the fmt.Stringer.

func (*Credit) Unwrap

func (c *Credit) Unwrap() *Credit

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

func (c *Credit) Update() *CreditUpdateOne

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

type CreditClient

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

CreditClient is a client for the Credit schema.

func NewCreditClient

func NewCreditClient(c config) *CreditClient

NewCreditClient returns a client for the Credit from the given config.

func (*CreditClient) Create

func (c *CreditClient) Create() *CreditCreate

Create returns a builder for creating a Credit entity.

func (*CreditClient) CreateBulk

func (c *CreditClient) CreateBulk(builders ...*CreditCreate) *CreditCreateBulk

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

func (*CreditClient) Delete

func (c *CreditClient) Delete() *CreditDelete

Delete returns a delete builder for Credit.

func (*CreditClient) DeleteOne

func (c *CreditClient) DeleteOne(cr *Credit) *CreditDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CreditClient) DeleteOneID

func (c *CreditClient) DeleteOneID(id uuid.UUID) *CreditDeleteOne

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

func (*CreditClient) ExecContext

func (c *CreditClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditClient) Get

func (c *CreditClient) Get(ctx context.Context, id uuid.UUID) (*Credit, error)

Get returns a Credit entity by its id.

func (*CreditClient) GetX

func (c *CreditClient) GetX(ctx context.Context, id uuid.UUID) *Credit

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

func (*CreditClient) Hooks

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

Hooks returns the client hooks.

func (*CreditClient) Intercept

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

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

func (*CreditClient) Interceptors

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

Interceptors returns the client interceptors.

func (*CreditClient) Query

func (c *CreditClient) Query() *CreditQuery

Query returns a query builder for Credit.

func (*CreditClient) QueryContext

func (c *CreditClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditClient) QueryCreditType

func (c *CreditClient) QueryCreditType(cr *Credit) *CreditTypeQuery

QueryCreditType queries the credit_type edge of a Credit.

func (*CreditClient) QueryUsers

func (c *CreditClient) QueryUsers(cr *Credit) *UserQuery

QueryUsers queries the users edge of a Credit.

func (*CreditClient) Update

func (c *CreditClient) Update() *CreditUpdate

Update returns an update builder for Credit.

func (*CreditClient) UpdateOne

func (c *CreditClient) UpdateOne(cr *Credit) *CreditUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CreditClient) UpdateOneID

func (c *CreditClient) UpdateOneID(id uuid.UUID) *CreditUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CreditClient) Use

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

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

type CreditCreate

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

CreditCreate is the builder for creating a Credit entity.

func (*CreditCreate) Exec

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

Exec executes the query.

func (*CreditCreate) ExecContext

func (c *CreditCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditCreate) ExecX

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

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

func (*CreditCreate) Mutation

func (cc *CreditCreate) Mutation() *CreditMutation

Mutation returns the CreditMutation object of the builder.

func (*CreditCreate) OnConflict

func (cc *CreditCreate) OnConflict(opts ...sql.ConflictOption) *CreditUpsertOne

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

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

func (*CreditCreate) OnConflictColumns

func (cc *CreditCreate) OnConflictColumns(columns ...string) *CreditUpsertOne

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

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

func (*CreditCreate) QueryContext

func (c *CreditCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditCreate) Save

func (cc *CreditCreate) Save(ctx context.Context) (*Credit, error)

Save creates the Credit in the database.

func (*CreditCreate) SaveX

func (cc *CreditCreate) SaveX(ctx context.Context) *Credit

SaveX calls Save and panics if Save returns an error.

func (*CreditCreate) SetCreatedAt

func (cc *CreditCreate) SetCreatedAt(t time.Time) *CreditCreate

SetCreatedAt sets the "created_at" field.

func (*CreditCreate) SetCreditType

func (cc *CreditCreate) SetCreditType(c *CreditType) *CreditCreate

SetCreditType sets the "credit_type" edge to the CreditType entity.

func (*CreditCreate) SetCreditTypeID

func (cc *CreditCreate) SetCreditTypeID(u uuid.UUID) *CreditCreate

SetCreditTypeID sets the "credit_type_id" field.

func (*CreditCreate) SetExpiresAt

func (cc *CreditCreate) SetExpiresAt(t time.Time) *CreditCreate

SetExpiresAt sets the "expires_at" field.

func (*CreditCreate) SetID

func (cc *CreditCreate) SetID(u uuid.UUID) *CreditCreate

SetID sets the "id" field.

func (*CreditCreate) SetNillableCreatedAt

func (cc *CreditCreate) SetNillableCreatedAt(t *time.Time) *CreditCreate

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

func (*CreditCreate) SetNillableID

func (cc *CreditCreate) SetNillableID(u *uuid.UUID) *CreditCreate

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

func (*CreditCreate) SetNillableReplenishedAt

func (cc *CreditCreate) SetNillableReplenishedAt(t *time.Time) *CreditCreate

SetNillableReplenishedAt sets the "replenished_at" field if the given value is not nil.

func (*CreditCreate) SetNillableStripeLineItemID

func (cc *CreditCreate) SetNillableStripeLineItemID(s *string) *CreditCreate

SetNillableStripeLineItemID sets the "stripe_line_item_id" field if the given value is not nil.

func (*CreditCreate) SetNillableUpdatedAt

func (cc *CreditCreate) SetNillableUpdatedAt(t *time.Time) *CreditCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*CreditCreate) SetRemainingAmount

func (cc *CreditCreate) SetRemainingAmount(i int32) *CreditCreate

SetRemainingAmount sets the "remaining_amount" field.

func (*CreditCreate) SetReplenishedAt

func (cc *CreditCreate) SetReplenishedAt(t time.Time) *CreditCreate

SetReplenishedAt sets the "replenished_at" field.

func (*CreditCreate) SetStripeLineItemID

func (cc *CreditCreate) SetStripeLineItemID(s string) *CreditCreate

SetStripeLineItemID sets the "stripe_line_item_id" field.

func (*CreditCreate) SetUpdatedAt

func (cc *CreditCreate) SetUpdatedAt(t time.Time) *CreditCreate

SetUpdatedAt sets the "updated_at" field.

func (*CreditCreate) SetUserID

func (cc *CreditCreate) SetUserID(u uuid.UUID) *CreditCreate

SetUserID sets the "user_id" field.

func (*CreditCreate) SetUsers

func (cc *CreditCreate) SetUsers(u *User) *CreditCreate

SetUsers sets the "users" edge to the User entity.

func (*CreditCreate) SetUsersID

func (cc *CreditCreate) SetUsersID(id uuid.UUID) *CreditCreate

SetUsersID sets the "users" edge to the User entity by ID.

type CreditCreateBulk

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

CreditCreateBulk is the builder for creating many Credit entities in bulk.

func (*CreditCreateBulk) Exec

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

Exec executes the query.

func (*CreditCreateBulk) ExecContext

func (c *CreditCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditCreateBulk) ExecX

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

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

func (*CreditCreateBulk) OnConflict

func (ccb *CreditCreateBulk) OnConflict(opts ...sql.ConflictOption) *CreditUpsertBulk

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

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

func (*CreditCreateBulk) OnConflictColumns

func (ccb *CreditCreateBulk) OnConflictColumns(columns ...string) *CreditUpsertBulk

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

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

func (*CreditCreateBulk) QueryContext

func (c *CreditCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditCreateBulk) Save

func (ccb *CreditCreateBulk) Save(ctx context.Context) ([]*Credit, error)

Save creates the Credit entities in the database.

func (*CreditCreateBulk) SaveX

func (ccb *CreditCreateBulk) SaveX(ctx context.Context) []*Credit

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

type CreditDelete

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

CreditDelete is the builder for deleting a Credit entity.

func (*CreditDelete) Exec

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

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

func (*CreditDelete) ExecContext

func (c *CreditDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditDelete) ExecX

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

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

func (*CreditDelete) QueryContext

func (c *CreditDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditDelete) Where

func (cd *CreditDelete) Where(ps ...predicate.Credit) *CreditDelete

Where appends a list predicates to the CreditDelete builder.

type CreditDeleteOne

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

CreditDeleteOne is the builder for deleting a single Credit entity.

func (*CreditDeleteOne) Exec

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

Exec executes the deletion query.

func (*CreditDeleteOne) ExecX

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

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

type CreditEdges

type CreditEdges struct {
	// Users holds the value of the users edge.
	Users *User `json:"users,omitempty"`
	// CreditType holds the value of the credit_type edge.
	CreditType *CreditType `json:"credit_type,omitempty"`
	// contains filtered or unexported fields
}

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

func (CreditEdges) CreditTypeOrErr

func (e CreditEdges) CreditTypeOrErr() (*CreditType, error)

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

func (CreditEdges) UsersOrErr

func (e CreditEdges) UsersOrErr() (*User, error)

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

type CreditGroupBy

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

CreditGroupBy is the group-by builder for Credit entities.

func (*CreditGroupBy) Aggregate

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

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

func (*CreditGroupBy) Bool

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

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

func (*CreditGroupBy) BoolX

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

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

func (*CreditGroupBy) Bools

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

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

func (*CreditGroupBy) BoolsX

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

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

func (*CreditGroupBy) Float64

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

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

func (*CreditGroupBy) Float64X

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

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

func (*CreditGroupBy) Float64s

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

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

func (*CreditGroupBy) Float64sX

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

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

func (*CreditGroupBy) Int

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

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

func (*CreditGroupBy) IntX

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

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

func (*CreditGroupBy) Ints

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

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

func (*CreditGroupBy) IntsX

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

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

func (*CreditGroupBy) Scan

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

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

func (*CreditGroupBy) ScanX

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

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

func (*CreditGroupBy) String

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

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

func (*CreditGroupBy) StringX

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

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

func (*CreditGroupBy) Strings

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

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

func (*CreditGroupBy) StringsX

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

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

type CreditMutation

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

CreditMutation represents an operation that mutates the Credit nodes in the graph.

func (*CreditMutation) AddField

func (m *CreditMutation) 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 (*CreditMutation) AddRemainingAmount

func (m *CreditMutation) AddRemainingAmount(i int32)

AddRemainingAmount adds i to the "remaining_amount" field.

func (*CreditMutation) AddedEdges

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

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

func (*CreditMutation) AddedField

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

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

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

func (*CreditMutation) AddedIDs

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

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

func (*CreditMutation) AddedRemainingAmount

func (m *CreditMutation) AddedRemainingAmount() (r int32, exists bool)

AddedRemainingAmount returns the value that was added to the "remaining_amount" field in this mutation.

func (*CreditMutation) ClearCreditType

func (m *CreditMutation) ClearCreditType()

ClearCreditType clears the "credit_type" edge to the CreditType entity.

func (*CreditMutation) ClearEdge

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

func (m *CreditMutation) 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 (*CreditMutation) ClearStripeLineItemID

func (m *CreditMutation) ClearStripeLineItemID()

ClearStripeLineItemID clears the value of the "stripe_line_item_id" field.

func (*CreditMutation) ClearUsers

func (m *CreditMutation) ClearUsers()

ClearUsers clears the "users" edge to the User entity.

func (*CreditMutation) ClearedEdges

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

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

func (*CreditMutation) ClearedFields

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

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

func (CreditMutation) Client

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

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

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

func (*CreditMutation) CreditTypeCleared

func (m *CreditMutation) CreditTypeCleared() bool

CreditTypeCleared reports if the "credit_type" edge to the CreditType entity was cleared.

func (*CreditMutation) CreditTypeID

func (m *CreditMutation) CreditTypeID() (r uuid.UUID, exists bool)

CreditTypeID returns the value of the "credit_type_id" field in the mutation.

func (*CreditMutation) CreditTypeIDs

func (m *CreditMutation) CreditTypeIDs() (ids []uuid.UUID)

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

func (*CreditMutation) EdgeCleared

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

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

func (*CreditMutation) ExecContext

func (c *CreditMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditMutation) ExpiresAt

func (m *CreditMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*CreditMutation) Field

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

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

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

func (*CreditMutation) Fields

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

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

func (m *CreditMutation) 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 (*CreditMutation) OldCreatedAt

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

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

func (m *CreditMutation) OldCreditTypeID(ctx context.Context) (v uuid.UUID, err error)

OldCreditTypeID returns the old "credit_type_id" field's value of the Credit entity. If the Credit 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 (*CreditMutation) OldExpiresAt

func (m *CreditMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)

OldExpiresAt returns the old "expires_at" field's value of the Credit entity. If the Credit 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 (*CreditMutation) OldField

func (m *CreditMutation) 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 (*CreditMutation) OldRemainingAmount

func (m *CreditMutation) OldRemainingAmount(ctx context.Context) (v int32, err error)

OldRemainingAmount returns the old "remaining_amount" field's value of the Credit entity. If the Credit 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 (*CreditMutation) OldReplenishedAt

func (m *CreditMutation) OldReplenishedAt(ctx context.Context) (v time.Time, err error)

OldReplenishedAt returns the old "replenished_at" field's value of the Credit entity. If the Credit 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 (*CreditMutation) OldStripeLineItemID

func (m *CreditMutation) OldStripeLineItemID(ctx context.Context) (v *string, err error)

OldStripeLineItemID returns the old "stripe_line_item_id" field's value of the Credit entity. If the Credit 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 (*CreditMutation) OldUpdatedAt

func (m *CreditMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Credit entity. If the Credit 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 (*CreditMutation) OldUserID

func (m *CreditMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the Credit entity. If the Credit 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 (*CreditMutation) Op

func (m *CreditMutation) Op() Op

Op returns the operation name.

func (*CreditMutation) QueryContext

func (c *CreditMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditMutation) RemainingAmount

func (m *CreditMutation) RemainingAmount() (r int32, exists bool)

RemainingAmount returns the value of the "remaining_amount" field in the mutation.

func (*CreditMutation) RemovedEdges

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

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

func (*CreditMutation) RemovedIDs

func (m *CreditMutation) 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 (*CreditMutation) ReplenishedAt

func (m *CreditMutation) ReplenishedAt() (r time.Time, exists bool)

ReplenishedAt returns the value of the "replenished_at" field in the mutation.

func (*CreditMutation) ResetCreatedAt

func (m *CreditMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CreditMutation) ResetCreditType

func (m *CreditMutation) ResetCreditType()

ResetCreditType resets all changes to the "credit_type" edge.

func (*CreditMutation) ResetCreditTypeID

func (m *CreditMutation) ResetCreditTypeID()

ResetCreditTypeID resets all changes to the "credit_type_id" field.

func (*CreditMutation) ResetEdge

func (m *CreditMutation) 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 (*CreditMutation) ResetExpiresAt

func (m *CreditMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*CreditMutation) ResetField

func (m *CreditMutation) 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 (*CreditMutation) ResetRemainingAmount

func (m *CreditMutation) ResetRemainingAmount()

ResetRemainingAmount resets all changes to the "remaining_amount" field.

func (*CreditMutation) ResetReplenishedAt

func (m *CreditMutation) ResetReplenishedAt()

ResetReplenishedAt resets all changes to the "replenished_at" field.

func (*CreditMutation) ResetStripeLineItemID

func (m *CreditMutation) ResetStripeLineItemID()

ResetStripeLineItemID resets all changes to the "stripe_line_item_id" field.

func (*CreditMutation) ResetUpdatedAt

func (m *CreditMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*CreditMutation) ResetUserID

func (m *CreditMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*CreditMutation) ResetUsers

func (m *CreditMutation) ResetUsers()

ResetUsers resets all changes to the "users" edge.

func (*CreditMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*CreditMutation) SetCreditTypeID

func (m *CreditMutation) SetCreditTypeID(u uuid.UUID)

SetCreditTypeID sets the "credit_type_id" field.

func (*CreditMutation) SetExpiresAt

func (m *CreditMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*CreditMutation) SetField

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

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

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

func (*CreditMutation) SetOp

func (m *CreditMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CreditMutation) SetRemainingAmount

func (m *CreditMutation) SetRemainingAmount(i int32)

SetRemainingAmount sets the "remaining_amount" field.

func (*CreditMutation) SetReplenishedAt

func (m *CreditMutation) SetReplenishedAt(t time.Time)

SetReplenishedAt sets the "replenished_at" field.

func (*CreditMutation) SetStripeLineItemID

func (m *CreditMutation) SetStripeLineItemID(s string)

SetStripeLineItemID sets the "stripe_line_item_id" field.

func (*CreditMutation) SetUpdatedAt

func (m *CreditMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*CreditMutation) SetUserID

func (m *CreditMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (*CreditMutation) SetUsersID

func (m *CreditMutation) SetUsersID(id uuid.UUID)

SetUsersID sets the "users" edge to the User entity by id.

func (*CreditMutation) StripeLineItemID

func (m *CreditMutation) StripeLineItemID() (r string, exists bool)

StripeLineItemID returns the value of the "stripe_line_item_id" field in the mutation.

func (*CreditMutation) StripeLineItemIDCleared

func (m *CreditMutation) StripeLineItemIDCleared() bool

StripeLineItemIDCleared returns if the "stripe_line_item_id" field was cleared in this mutation.

func (CreditMutation) Tx

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

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

func (*CreditMutation) Type

func (m *CreditMutation) Type() string

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

func (*CreditMutation) UpdatedAt

func (m *CreditMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*CreditMutation) UserID

func (m *CreditMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*CreditMutation) UsersCleared

func (m *CreditMutation) UsersCleared() bool

UsersCleared reports if the "users" edge to the User entity was cleared.

func (*CreditMutation) UsersID

func (m *CreditMutation) UsersID() (id uuid.UUID, exists bool)

UsersID returns the "users" edge ID in the mutation.

func (*CreditMutation) UsersIDs

func (m *CreditMutation) UsersIDs() (ids []uuid.UUID)

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

func (*CreditMutation) Where

func (m *CreditMutation) Where(ps ...predicate.Credit)

Where appends a list predicates to the CreditMutation builder.

func (*CreditMutation) WhereP

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

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

type CreditQuery

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

CreditQuery is the builder for querying Credit entities.

func (*CreditQuery) Aggregate

func (cq *CreditQuery) Aggregate(fns ...AggregateFunc) *CreditSelect

Aggregate returns a CreditSelect configured with the given aggregations.

func (*CreditQuery) All

func (cq *CreditQuery) All(ctx context.Context) ([]*Credit, error)

All executes the query and returns a list of Credits.

func (*CreditQuery) AllX

func (cq *CreditQuery) AllX(ctx context.Context) []*Credit

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

func (*CreditQuery) Clone

func (cq *CreditQuery) Clone() *CreditQuery

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

func (*CreditQuery) Count

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

Count returns the count of the given query.

func (*CreditQuery) CountX

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

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

func (*CreditQuery) ExecContext

func (c *CreditQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditQuery) Exist

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

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

func (*CreditQuery) ExistX

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

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

func (*CreditQuery) First

func (cq *CreditQuery) First(ctx context.Context) (*Credit, error)

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

func (*CreditQuery) FirstID

func (cq *CreditQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*CreditQuery) FirstIDX

func (cq *CreditQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*CreditQuery) FirstX

func (cq *CreditQuery) FirstX(ctx context.Context) *Credit

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

func (*CreditQuery) GroupBy

func (cq *CreditQuery) GroupBy(field string, fields ...string) *CreditGroupBy

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 {
	RemainingAmount int32 `json:"remaining_amount,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Credit.Query().
	GroupBy(credit.FieldRemainingAmount).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CreditQuery) IDs

func (cq *CreditQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*CreditQuery) IDsX

func (cq *CreditQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*CreditQuery) Limit

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

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

func (*CreditQuery) Modify

func (cq *CreditQuery) Modify(modifiers ...func(s *sql.Selector)) *CreditSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CreditQuery) Offset

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

Offset to start from.

func (*CreditQuery) Only

func (cq *CreditQuery) Only(ctx context.Context) (*Credit, error)

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

func (*CreditQuery) OnlyID

func (cq *CreditQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*CreditQuery) OnlyIDX

func (cq *CreditQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*CreditQuery) OnlyX

func (cq *CreditQuery) OnlyX(ctx context.Context) *Credit

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

func (*CreditQuery) Order

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

Order specifies how the records should be ordered.

func (*CreditQuery) QueryContext

func (c *CreditQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditQuery) QueryCreditType

func (cq *CreditQuery) QueryCreditType() *CreditTypeQuery

QueryCreditType chains the current query on the "credit_type" edge.

func (*CreditQuery) QueryUsers

func (cq *CreditQuery) QueryUsers() *UserQuery

QueryUsers chains the current query on the "users" edge.

func (*CreditQuery) Select

func (cq *CreditQuery) Select(fields ...string) *CreditSelect

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 {
	RemainingAmount int32 `json:"remaining_amount,omitempty"`
}

client.Credit.Query().
	Select(credit.FieldRemainingAmount).
	Scan(ctx, &v)

func (*CreditQuery) Unique

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

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

func (cq *CreditQuery) Where(ps ...predicate.Credit) *CreditQuery

Where adds a new predicate for the CreditQuery builder.

func (*CreditQuery) WithCreditType

func (cq *CreditQuery) WithCreditType(opts ...func(*CreditTypeQuery)) *CreditQuery

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

func (*CreditQuery) WithUsers

func (cq *CreditQuery) WithUsers(opts ...func(*UserQuery)) *CreditQuery

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

type CreditSelect

type CreditSelect struct {
	*CreditQuery
	// contains filtered or unexported fields
}

CreditSelect is the builder for selecting fields of Credit entities.

func (*CreditSelect) Aggregate

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

Aggregate adds the given aggregation functions to the selector query.

func (*CreditSelect) Bool

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

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

func (*CreditSelect) BoolX

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

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

func (*CreditSelect) Bools

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

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

func (*CreditSelect) BoolsX

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

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

func (CreditSelect) ExecContext

func (c CreditSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditSelect) Float64

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

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

func (*CreditSelect) Float64X

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

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

func (*CreditSelect) Float64s

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

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

func (*CreditSelect) Float64sX

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

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

func (*CreditSelect) Int

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

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

func (*CreditSelect) IntX

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

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

func (*CreditSelect) Ints

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

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

func (*CreditSelect) IntsX

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

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

func (*CreditSelect) Modify

func (cs *CreditSelect) Modify(modifiers ...func(s *sql.Selector)) *CreditSelect

Modify adds a query modifier for attaching custom logic to queries.

func (CreditSelect) QueryContext

func (c CreditSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditSelect) Scan

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

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

func (*CreditSelect) ScanX

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

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

func (*CreditSelect) String

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

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

func (*CreditSelect) StringX

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

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

func (*CreditSelect) Strings

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

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

func (*CreditSelect) StringsX

func (s *CreditSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CreditType

type CreditType struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description *string `json:"description,omitempty"`
	// Amount holds the value of the "amount" field.
	Amount int32 `json:"amount,omitempty"`
	// StripeProductID holds the value of the "stripe_product_id" field.
	StripeProductID *string `json:"stripe_product_id,omitempty"`
	// Type holds the value of the "type" field.
	Type credittype.Type `json:"type,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the CreditTypeQuery when eager-loading is set.
	Edges CreditTypeEdges `json:"edges"`
	// contains filtered or unexported fields
}

CreditType is the model entity for the CreditType schema.

func (*CreditType) ExecContext

func (c *CreditType) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditType) QueryContext

func (c *CreditType) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditType) QueryCredits

func (ct *CreditType) QueryCredits() *CreditQuery

QueryCredits queries the "credits" edge of the CreditType entity.

func (*CreditType) String

func (ct *CreditType) String() string

String implements the fmt.Stringer.

func (*CreditType) Unwrap

func (ct *CreditType) Unwrap() *CreditType

Unwrap unwraps the CreditType 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 (*CreditType) Update

func (ct *CreditType) Update() *CreditTypeUpdateOne

Update returns a builder for updating this CreditType. Note that you need to call CreditType.Unwrap() before calling this method if this CreditType was returned from a transaction, and the transaction was committed or rolled back.

type CreditTypeClient

type CreditTypeClient struct {
	// contains filtered or unexported fields
}

CreditTypeClient is a client for the CreditType schema.

func NewCreditTypeClient

func NewCreditTypeClient(c config) *CreditTypeClient

NewCreditTypeClient returns a client for the CreditType from the given config.

func (*CreditTypeClient) Create

func (c *CreditTypeClient) Create() *CreditTypeCreate

Create returns a builder for creating a CreditType entity.

func (*CreditTypeClient) CreateBulk

func (c *CreditTypeClient) CreateBulk(builders ...*CreditTypeCreate) *CreditTypeCreateBulk

CreateBulk returns a builder for creating a bulk of CreditType entities.

func (*CreditTypeClient) Delete

func (c *CreditTypeClient) Delete() *CreditTypeDelete

Delete returns a delete builder for CreditType.

func (*CreditTypeClient) DeleteOne

func (c *CreditTypeClient) DeleteOne(ct *CreditType) *CreditTypeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*CreditTypeClient) DeleteOneID

func (c *CreditTypeClient) DeleteOneID(id uuid.UUID) *CreditTypeDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*CreditTypeClient) ExecContext

func (c *CreditTypeClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditTypeClient) Get

Get returns a CreditType entity by its id.

func (*CreditTypeClient) GetX

func (c *CreditTypeClient) GetX(ctx context.Context, id uuid.UUID) *CreditType

GetX is like Get, but panics if an error occurs.

func (*CreditTypeClient) Hooks

func (c *CreditTypeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*CreditTypeClient) Intercept

func (c *CreditTypeClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `credittype.Intercept(f(g(h())))`.

func (*CreditTypeClient) Interceptors

func (c *CreditTypeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*CreditTypeClient) Query

func (c *CreditTypeClient) Query() *CreditTypeQuery

Query returns a query builder for CreditType.

func (*CreditTypeClient) QueryContext

func (c *CreditTypeClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditTypeClient) QueryCredits

func (c *CreditTypeClient) QueryCredits(ct *CreditType) *CreditQuery

QueryCredits queries the credits edge of a CreditType.

func (*CreditTypeClient) Update

func (c *CreditTypeClient) Update() *CreditTypeUpdate

Update returns an update builder for CreditType.

func (*CreditTypeClient) UpdateOne

func (c *CreditTypeClient) UpdateOne(ct *CreditType) *CreditTypeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*CreditTypeClient) UpdateOneID

func (c *CreditTypeClient) UpdateOneID(id uuid.UUID) *CreditTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*CreditTypeClient) Use

func (c *CreditTypeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `credittype.Hooks(f(g(h())))`.

type CreditTypeCreate

type CreditTypeCreate struct {
	// contains filtered or unexported fields
}

CreditTypeCreate is the builder for creating a CreditType entity.

func (*CreditTypeCreate) AddCreditIDs

func (ctc *CreditTypeCreate) AddCreditIDs(ids ...uuid.UUID) *CreditTypeCreate

AddCreditIDs adds the "credits" edge to the Credit entity by IDs.

func (*CreditTypeCreate) AddCredits

func (ctc *CreditTypeCreate) AddCredits(c ...*Credit) *CreditTypeCreate

AddCredits adds the "credits" edges to the Credit entity.

func (*CreditTypeCreate) Exec

func (ctc *CreditTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*CreditTypeCreate) ExecContext

func (c *CreditTypeCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditTypeCreate) ExecX

func (ctc *CreditTypeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CreditTypeCreate) Mutation

func (ctc *CreditTypeCreate) Mutation() *CreditTypeMutation

Mutation returns the CreditTypeMutation object of the builder.

func (*CreditTypeCreate) OnConflict

func (ctc *CreditTypeCreate) OnConflict(opts ...sql.ConflictOption) *CreditTypeUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CreditType.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CreditTypeUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*CreditTypeCreate) OnConflictColumns

func (ctc *CreditTypeCreate) OnConflictColumns(columns ...string) *CreditTypeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CreditType.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CreditTypeCreate) QueryContext

func (c *CreditTypeCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditTypeCreate) Save

func (ctc *CreditTypeCreate) Save(ctx context.Context) (*CreditType, error)

Save creates the CreditType in the database.

func (*CreditTypeCreate) SaveX

func (ctc *CreditTypeCreate) SaveX(ctx context.Context) *CreditType

SaveX calls Save and panics if Save returns an error.

func (*CreditTypeCreate) SetAmount

func (ctc *CreditTypeCreate) SetAmount(i int32) *CreditTypeCreate

SetAmount sets the "amount" field.

func (*CreditTypeCreate) SetCreatedAt

func (ctc *CreditTypeCreate) SetCreatedAt(t time.Time) *CreditTypeCreate

SetCreatedAt sets the "created_at" field.

func (*CreditTypeCreate) SetDescription

func (ctc *CreditTypeCreate) SetDescription(s string) *CreditTypeCreate

SetDescription sets the "description" field.

func (*CreditTypeCreate) SetID

func (ctc *CreditTypeCreate) SetID(u uuid.UUID) *CreditTypeCreate

SetID sets the "id" field.

func (*CreditTypeCreate) SetName

func (ctc *CreditTypeCreate) SetName(s string) *CreditTypeCreate

SetName sets the "name" field.

func (*CreditTypeCreate) SetNillableCreatedAt

func (ctc *CreditTypeCreate) SetNillableCreatedAt(t *time.Time) *CreditTypeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*CreditTypeCreate) SetNillableDescription

func (ctc *CreditTypeCreate) SetNillableDescription(s *string) *CreditTypeCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*CreditTypeCreate) SetNillableID

func (ctc *CreditTypeCreate) SetNillableID(u *uuid.UUID) *CreditTypeCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*CreditTypeCreate) SetNillableStripeProductID

func (ctc *CreditTypeCreate) SetNillableStripeProductID(s *string) *CreditTypeCreate

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*CreditTypeCreate) SetNillableUpdatedAt

func (ctc *CreditTypeCreate) SetNillableUpdatedAt(t *time.Time) *CreditTypeCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*CreditTypeCreate) SetStripeProductID

func (ctc *CreditTypeCreate) SetStripeProductID(s string) *CreditTypeCreate

SetStripeProductID sets the "stripe_product_id" field.

func (*CreditTypeCreate) SetType

SetType sets the "type" field.

func (*CreditTypeCreate) SetUpdatedAt

func (ctc *CreditTypeCreate) SetUpdatedAt(t time.Time) *CreditTypeCreate

SetUpdatedAt sets the "updated_at" field.

type CreditTypeCreateBulk

type CreditTypeCreateBulk struct {
	// contains filtered or unexported fields
}

CreditTypeCreateBulk is the builder for creating many CreditType entities in bulk.

func (*CreditTypeCreateBulk) Exec

func (ctcb *CreditTypeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CreditTypeCreateBulk) ExecContext

func (c *CreditTypeCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditTypeCreateBulk) ExecX

func (ctcb *CreditTypeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CreditTypeCreateBulk) OnConflict

func (ctcb *CreditTypeCreateBulk) OnConflict(opts ...sql.ConflictOption) *CreditTypeUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.CreditType.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.CreditTypeUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*CreditTypeCreateBulk) OnConflictColumns

func (ctcb *CreditTypeCreateBulk) OnConflictColumns(columns ...string) *CreditTypeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.CreditType.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*CreditTypeCreateBulk) QueryContext

func (c *CreditTypeCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditTypeCreateBulk) Save

func (ctcb *CreditTypeCreateBulk) Save(ctx context.Context) ([]*CreditType, error)

Save creates the CreditType entities in the database.

func (*CreditTypeCreateBulk) SaveX

func (ctcb *CreditTypeCreateBulk) SaveX(ctx context.Context) []*CreditType

SaveX is like Save, but panics if an error occurs.

type CreditTypeDelete

type CreditTypeDelete struct {
	// contains filtered or unexported fields
}

CreditTypeDelete is the builder for deleting a CreditType entity.

func (*CreditTypeDelete) Exec

func (ctd *CreditTypeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*CreditTypeDelete) ExecContext

func (c *CreditTypeDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditTypeDelete) ExecX

func (ctd *CreditTypeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*CreditTypeDelete) QueryContext

func (c *CreditTypeDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditTypeDelete) Where

Where appends a list predicates to the CreditTypeDelete builder.

type CreditTypeDeleteOne

type CreditTypeDeleteOne struct {
	// contains filtered or unexported fields
}

CreditTypeDeleteOne is the builder for deleting a single CreditType entity.

func (*CreditTypeDeleteOne) Exec

func (ctdo *CreditTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*CreditTypeDeleteOne) ExecX

func (ctdo *CreditTypeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type CreditTypeEdges

type CreditTypeEdges struct {
	// Credits holds the value of the credits edge.
	Credits []*Credit `json:"credits,omitempty"`
	// contains filtered or unexported fields
}

CreditTypeEdges holds the relations/edges for other nodes in the graph.

func (CreditTypeEdges) CreditsOrErr

func (e CreditTypeEdges) CreditsOrErr() ([]*Credit, error)

CreditsOrErr returns the Credits value or an error if the edge was not loaded in eager-loading.

type CreditTypeGroupBy

type CreditTypeGroupBy struct {
	// contains filtered or unexported fields
}

CreditTypeGroupBy is the group-by builder for CreditType entities.

func (*CreditTypeGroupBy) Aggregate

func (ctgb *CreditTypeGroupBy) Aggregate(fns ...AggregateFunc) *CreditTypeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*CreditTypeGroupBy) Bool

func (s *CreditTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CreditTypeGroupBy) BoolX

func (s *CreditTypeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CreditTypeGroupBy) Bools

func (s *CreditTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CreditTypeGroupBy) BoolsX

func (s *CreditTypeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*CreditTypeGroupBy) Float64

func (s *CreditTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CreditTypeGroupBy) Float64X

func (s *CreditTypeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CreditTypeGroupBy) Float64s

func (s *CreditTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CreditTypeGroupBy) Float64sX

func (s *CreditTypeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CreditTypeGroupBy) Int

func (s *CreditTypeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CreditTypeGroupBy) IntX

func (s *CreditTypeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CreditTypeGroupBy) Ints

func (s *CreditTypeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CreditTypeGroupBy) IntsX

func (s *CreditTypeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CreditTypeGroupBy) Scan

func (ctgb *CreditTypeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CreditTypeGroupBy) ScanX

func (s *CreditTypeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CreditTypeGroupBy) String

func (s *CreditTypeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CreditTypeGroupBy) StringX

func (s *CreditTypeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CreditTypeGroupBy) Strings

func (s *CreditTypeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CreditTypeGroupBy) StringsX

func (s *CreditTypeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CreditTypeMutation

type CreditTypeMutation struct {
	// contains filtered or unexported fields
}

CreditTypeMutation represents an operation that mutates the CreditType nodes in the graph.

func (*CreditTypeMutation) AddAmount

func (m *CreditTypeMutation) AddAmount(i int32)

AddAmount adds i to the "amount" field.

func (*CreditTypeMutation) AddCreditIDs

func (m *CreditTypeMutation) AddCreditIDs(ids ...uuid.UUID)

AddCreditIDs adds the "credits" edge to the Credit entity by ids.

func (*CreditTypeMutation) AddField

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) AddedAmount

func (m *CreditTypeMutation) AddedAmount() (r int32, exists bool)

AddedAmount returns the value that was added to the "amount" field in this mutation.

func (*CreditTypeMutation) AddedEdges

func (m *CreditTypeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*CreditTypeMutation) AddedField

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) AddedFields

func (m *CreditTypeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*CreditTypeMutation) AddedIDs

func (m *CreditTypeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*CreditTypeMutation) Amount

func (m *CreditTypeMutation) Amount() (r int32, exists bool)

Amount returns the value of the "amount" field in the mutation.

func (*CreditTypeMutation) ClearCredits

func (m *CreditTypeMutation) ClearCredits()

ClearCredits clears the "credits" edge to the Credit entity.

func (*CreditTypeMutation) ClearDescription

func (m *CreditTypeMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*CreditTypeMutation) ClearEdge

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) ClearField

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) ClearStripeProductID

func (m *CreditTypeMutation) ClearStripeProductID()

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*CreditTypeMutation) ClearedEdges

func (m *CreditTypeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*CreditTypeMutation) ClearedFields

func (m *CreditTypeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (CreditTypeMutation) Client

func (m CreditTypeMutation) 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 (*CreditTypeMutation) CreatedAt

func (m *CreditTypeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*CreditTypeMutation) CreditsCleared

func (m *CreditTypeMutation) CreditsCleared() bool

CreditsCleared reports if the "credits" edge to the Credit entity was cleared.

func (*CreditTypeMutation) CreditsIDs

func (m *CreditTypeMutation) CreditsIDs() (ids []uuid.UUID)

CreditsIDs returns the "credits" edge IDs in the mutation.

func (*CreditTypeMutation) Description

func (m *CreditTypeMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*CreditTypeMutation) DescriptionCleared

func (m *CreditTypeMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*CreditTypeMutation) EdgeCleared

func (m *CreditTypeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*CreditTypeMutation) ExecContext

func (c *CreditTypeMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditTypeMutation) Field

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) FieldCleared

func (m *CreditTypeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*CreditTypeMutation) Fields

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) GetType

func (m *CreditTypeMutation) GetType() (r credittype.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*CreditTypeMutation) ID

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) IDs

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) Name

func (m *CreditTypeMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*CreditTypeMutation) OldAmount

func (m *CreditTypeMutation) OldAmount(ctx context.Context) (v int32, err error)

OldAmount returns the old "amount" field's value of the CreditType entity. If the CreditType 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 (*CreditTypeMutation) OldCreatedAt

func (m *CreditTypeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the CreditType entity. If the CreditType 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 (*CreditTypeMutation) OldDescription

func (m *CreditTypeMutation) OldDescription(ctx context.Context) (v *string, err error)

OldDescription returns the old "description" field's value of the CreditType entity. If the CreditType 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 (*CreditTypeMutation) OldField

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) OldName

func (m *CreditTypeMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the CreditType entity. If the CreditType 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 (*CreditTypeMutation) OldStripeProductID

func (m *CreditTypeMutation) OldStripeProductID(ctx context.Context) (v *string, err error)

OldStripeProductID returns the old "stripe_product_id" field's value of the CreditType entity. If the CreditType 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 (*CreditTypeMutation) OldType

func (m *CreditTypeMutation) OldType(ctx context.Context) (v credittype.Type, err error)

OldType returns the old "type" field's value of the CreditType entity. If the CreditType 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 (*CreditTypeMutation) OldUpdatedAt

func (m *CreditTypeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the CreditType entity. If the CreditType 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 (*CreditTypeMutation) Op

func (m *CreditTypeMutation) Op() Op

Op returns the operation name.

func (*CreditTypeMutation) QueryContext

func (c *CreditTypeMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditTypeMutation) RemoveCreditIDs

func (m *CreditTypeMutation) RemoveCreditIDs(ids ...uuid.UUID)

RemoveCreditIDs removes the "credits" edge to the Credit entity by IDs.

func (*CreditTypeMutation) RemovedCreditsIDs

func (m *CreditTypeMutation) RemovedCreditsIDs() (ids []uuid.UUID)

RemovedCredits returns the removed IDs of the "credits" edge to the Credit entity.

func (*CreditTypeMutation) RemovedEdges

func (m *CreditTypeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*CreditTypeMutation) RemovedIDs

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) ResetAmount

func (m *CreditTypeMutation) ResetAmount()

ResetAmount resets all changes to the "amount" field.

func (*CreditTypeMutation) ResetCreatedAt

func (m *CreditTypeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*CreditTypeMutation) ResetCredits

func (m *CreditTypeMutation) ResetCredits()

ResetCredits resets all changes to the "credits" edge.

func (*CreditTypeMutation) ResetDescription

func (m *CreditTypeMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*CreditTypeMutation) ResetEdge

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) ResetField

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) ResetName

func (m *CreditTypeMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*CreditTypeMutation) ResetStripeProductID

func (m *CreditTypeMutation) ResetStripeProductID()

ResetStripeProductID resets all changes to the "stripe_product_id" field.

func (*CreditTypeMutation) ResetType

func (m *CreditTypeMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*CreditTypeMutation) ResetUpdatedAt

func (m *CreditTypeMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*CreditTypeMutation) SetAmount

func (m *CreditTypeMutation) SetAmount(i int32)

SetAmount sets the "amount" field.

func (*CreditTypeMutation) SetCreatedAt

func (m *CreditTypeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*CreditTypeMutation) SetDescription

func (m *CreditTypeMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*CreditTypeMutation) SetField

func (m *CreditTypeMutation) 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 (*CreditTypeMutation) SetID

func (m *CreditTypeMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of CreditType entities.

func (*CreditTypeMutation) SetName

func (m *CreditTypeMutation) SetName(s string)

SetName sets the "name" field.

func (*CreditTypeMutation) SetOp

func (m *CreditTypeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*CreditTypeMutation) SetStripeProductID

func (m *CreditTypeMutation) SetStripeProductID(s string)

SetStripeProductID sets the "stripe_product_id" field.

func (*CreditTypeMutation) SetType

func (m *CreditTypeMutation) SetType(c credittype.Type)

SetType sets the "type" field.

func (*CreditTypeMutation) SetUpdatedAt

func (m *CreditTypeMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*CreditTypeMutation) StripeProductID

func (m *CreditTypeMutation) StripeProductID() (r string, exists bool)

StripeProductID returns the value of the "stripe_product_id" field in the mutation.

func (*CreditTypeMutation) StripeProductIDCleared

func (m *CreditTypeMutation) StripeProductIDCleared() bool

StripeProductIDCleared returns if the "stripe_product_id" field was cleared in this mutation.

func (CreditTypeMutation) Tx

func (m CreditTypeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*CreditTypeMutation) Type

func (m *CreditTypeMutation) Type() string

Type returns the node type of this mutation (CreditType).

func (*CreditTypeMutation) UpdatedAt

func (m *CreditTypeMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*CreditTypeMutation) Where

func (m *CreditTypeMutation) Where(ps ...predicate.CreditType)

Where appends a list predicates to the CreditTypeMutation builder.

func (*CreditTypeMutation) WhereP

func (m *CreditTypeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the CreditTypeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type CreditTypeQuery

type CreditTypeQuery struct {
	// contains filtered or unexported fields
}

CreditTypeQuery is the builder for querying CreditType entities.

func (*CreditTypeQuery) Aggregate

func (ctq *CreditTypeQuery) Aggregate(fns ...AggregateFunc) *CreditTypeSelect

Aggregate returns a CreditTypeSelect configured with the given aggregations.

func (*CreditTypeQuery) All

func (ctq *CreditTypeQuery) All(ctx context.Context) ([]*CreditType, error)

All executes the query and returns a list of CreditTypes.

func (*CreditTypeQuery) AllX

func (ctq *CreditTypeQuery) AllX(ctx context.Context) []*CreditType

AllX is like All, but panics if an error occurs.

func (*CreditTypeQuery) Clone

func (ctq *CreditTypeQuery) Clone() *CreditTypeQuery

Clone returns a duplicate of the CreditTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*CreditTypeQuery) Count

func (ctq *CreditTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*CreditTypeQuery) CountX

func (ctq *CreditTypeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*CreditTypeQuery) ExecContext

func (c *CreditTypeQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditTypeQuery) Exist

func (ctq *CreditTypeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*CreditTypeQuery) ExistX

func (ctq *CreditTypeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*CreditTypeQuery) First

func (ctq *CreditTypeQuery) First(ctx context.Context) (*CreditType, error)

First returns the first CreditType entity from the query. Returns a *NotFoundError when no CreditType was found.

func (*CreditTypeQuery) FirstID

func (ctq *CreditTypeQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first CreditType ID from the query. Returns a *NotFoundError when no CreditType ID was found.

func (*CreditTypeQuery) FirstIDX

func (ctq *CreditTypeQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*CreditTypeQuery) FirstX

func (ctq *CreditTypeQuery) FirstX(ctx context.Context) *CreditType

FirstX is like First, but panics if an error occurs.

func (*CreditTypeQuery) GroupBy

func (ctq *CreditTypeQuery) GroupBy(field string, fields ...string) *CreditTypeGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.CreditType.Query().
	GroupBy(credittype.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*CreditTypeQuery) IDs

func (ctq *CreditTypeQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of CreditType IDs.

func (*CreditTypeQuery) IDsX

func (ctq *CreditTypeQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*CreditTypeQuery) Limit

func (ctq *CreditTypeQuery) Limit(limit int) *CreditTypeQuery

Limit the number of records to be returned by this query.

func (*CreditTypeQuery) Modify

func (ctq *CreditTypeQuery) Modify(modifiers ...func(s *sql.Selector)) *CreditTypeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*CreditTypeQuery) Offset

func (ctq *CreditTypeQuery) Offset(offset int) *CreditTypeQuery

Offset to start from.

func (*CreditTypeQuery) Only

func (ctq *CreditTypeQuery) Only(ctx context.Context) (*CreditType, error)

Only returns a single CreditType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CreditType entity is found. Returns a *NotFoundError when no CreditType entities are found.

func (*CreditTypeQuery) OnlyID

func (ctq *CreditTypeQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only CreditType ID in the query. Returns a *NotSingularError when more than one CreditType ID is found. Returns a *NotFoundError when no entities are found.

func (*CreditTypeQuery) OnlyIDX

func (ctq *CreditTypeQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*CreditTypeQuery) OnlyX

func (ctq *CreditTypeQuery) OnlyX(ctx context.Context) *CreditType

OnlyX is like Only, but panics if an error occurs.

func (*CreditTypeQuery) Order

func (ctq *CreditTypeQuery) Order(o ...OrderFunc) *CreditTypeQuery

Order specifies how the records should be ordered.

func (*CreditTypeQuery) QueryContext

func (c *CreditTypeQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditTypeQuery) QueryCredits

func (ctq *CreditTypeQuery) QueryCredits() *CreditQuery

QueryCredits chains the current query on the "credits" edge.

func (*CreditTypeQuery) Select

func (ctq *CreditTypeQuery) Select(fields ...string) *CreditTypeSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.CreditType.Query().
	Select(credittype.FieldName).
	Scan(ctx, &v)

func (*CreditTypeQuery) Unique

func (ctq *CreditTypeQuery) Unique(unique bool) *CreditTypeQuery

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 (*CreditTypeQuery) Where

Where adds a new predicate for the CreditTypeQuery builder.

func (*CreditTypeQuery) WithCredits

func (ctq *CreditTypeQuery) WithCredits(opts ...func(*CreditQuery)) *CreditTypeQuery

WithCredits tells the query-builder to eager-load the nodes that are connected to the "credits" edge. The optional arguments are used to configure the query builder of the edge.

type CreditTypeSelect

type CreditTypeSelect struct {
	*CreditTypeQuery
	// contains filtered or unexported fields
}

CreditTypeSelect is the builder for selecting fields of CreditType entities.

func (*CreditTypeSelect) Aggregate

func (cts *CreditTypeSelect) Aggregate(fns ...AggregateFunc) *CreditTypeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*CreditTypeSelect) Bool

func (s *CreditTypeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*CreditTypeSelect) BoolX

func (s *CreditTypeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*CreditTypeSelect) Bools

func (s *CreditTypeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*CreditTypeSelect) BoolsX

func (s *CreditTypeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (CreditTypeSelect) ExecContext

func (c CreditTypeSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditTypeSelect) Float64

func (s *CreditTypeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*CreditTypeSelect) Float64X

func (s *CreditTypeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*CreditTypeSelect) Float64s

func (s *CreditTypeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*CreditTypeSelect) Float64sX

func (s *CreditTypeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*CreditTypeSelect) Int

func (s *CreditTypeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*CreditTypeSelect) IntX

func (s *CreditTypeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*CreditTypeSelect) Ints

func (s *CreditTypeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*CreditTypeSelect) IntsX

func (s *CreditTypeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*CreditTypeSelect) Modify

func (cts *CreditTypeSelect) Modify(modifiers ...func(s *sql.Selector)) *CreditTypeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (CreditTypeSelect) QueryContext

func (c CreditTypeSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditTypeSelect) Scan

func (cts *CreditTypeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*CreditTypeSelect) ScanX

func (s *CreditTypeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*CreditTypeSelect) String

func (s *CreditTypeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*CreditTypeSelect) StringX

func (s *CreditTypeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*CreditTypeSelect) Strings

func (s *CreditTypeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*CreditTypeSelect) StringsX

func (s *CreditTypeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type CreditTypeUpdate

type CreditTypeUpdate struct {
	// contains filtered or unexported fields
}

CreditTypeUpdate is the builder for updating CreditType entities.

func (*CreditTypeUpdate) AddAmount

func (ctu *CreditTypeUpdate) AddAmount(i int32) *CreditTypeUpdate

AddAmount adds i to the "amount" field.

func (*CreditTypeUpdate) AddCreditIDs

func (ctu *CreditTypeUpdate) AddCreditIDs(ids ...uuid.UUID) *CreditTypeUpdate

AddCreditIDs adds the "credits" edge to the Credit entity by IDs.

func (*CreditTypeUpdate) AddCredits

func (ctu *CreditTypeUpdate) AddCredits(c ...*Credit) *CreditTypeUpdate

AddCredits adds the "credits" edges to the Credit entity.

func (*CreditTypeUpdate) ClearCredits

func (ctu *CreditTypeUpdate) ClearCredits() *CreditTypeUpdate

ClearCredits clears all "credits" edges to the Credit entity.

func (*CreditTypeUpdate) ClearDescription

func (ctu *CreditTypeUpdate) ClearDescription() *CreditTypeUpdate

ClearDescription clears the value of the "description" field.

func (*CreditTypeUpdate) ClearStripeProductID

func (ctu *CreditTypeUpdate) ClearStripeProductID() *CreditTypeUpdate

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*CreditTypeUpdate) Exec

func (ctu *CreditTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CreditTypeUpdate) ExecContext

func (c *CreditTypeUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditTypeUpdate) ExecX

func (ctu *CreditTypeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CreditTypeUpdate) Modify

func (ctu *CreditTypeUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CreditTypeUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*CreditTypeUpdate) Mutation

func (ctu *CreditTypeUpdate) Mutation() *CreditTypeMutation

Mutation returns the CreditTypeMutation object of the builder.

func (*CreditTypeUpdate) QueryContext

func (c *CreditTypeUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditTypeUpdate) RemoveCreditIDs

func (ctu *CreditTypeUpdate) RemoveCreditIDs(ids ...uuid.UUID) *CreditTypeUpdate

RemoveCreditIDs removes the "credits" edge to Credit entities by IDs.

func (*CreditTypeUpdate) RemoveCredits

func (ctu *CreditTypeUpdate) RemoveCredits(c ...*Credit) *CreditTypeUpdate

RemoveCredits removes "credits" edges to Credit entities.

func (*CreditTypeUpdate) Save

func (ctu *CreditTypeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CreditTypeUpdate) SaveX

func (ctu *CreditTypeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CreditTypeUpdate) SetAmount

func (ctu *CreditTypeUpdate) SetAmount(i int32) *CreditTypeUpdate

SetAmount sets the "amount" field.

func (*CreditTypeUpdate) SetDescription

func (ctu *CreditTypeUpdate) SetDescription(s string) *CreditTypeUpdate

SetDescription sets the "description" field.

func (*CreditTypeUpdate) SetName

func (ctu *CreditTypeUpdate) SetName(s string) *CreditTypeUpdate

SetName sets the "name" field.

func (*CreditTypeUpdate) SetNillableDescription

func (ctu *CreditTypeUpdate) SetNillableDescription(s *string) *CreditTypeUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*CreditTypeUpdate) SetNillableStripeProductID

func (ctu *CreditTypeUpdate) SetNillableStripeProductID(s *string) *CreditTypeUpdate

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*CreditTypeUpdate) SetStripeProductID

func (ctu *CreditTypeUpdate) SetStripeProductID(s string) *CreditTypeUpdate

SetStripeProductID sets the "stripe_product_id" field.

func (*CreditTypeUpdate) SetType

SetType sets the "type" field.

func (*CreditTypeUpdate) SetUpdatedAt

func (ctu *CreditTypeUpdate) SetUpdatedAt(t time.Time) *CreditTypeUpdate

SetUpdatedAt sets the "updated_at" field.

func (*CreditTypeUpdate) Where

Where appends a list predicates to the CreditTypeUpdate builder.

type CreditTypeUpdateOne

type CreditTypeUpdateOne struct {
	// contains filtered or unexported fields
}

CreditTypeUpdateOne is the builder for updating a single CreditType entity.

func (*CreditTypeUpdateOne) AddAmount

func (ctuo *CreditTypeUpdateOne) AddAmount(i int32) *CreditTypeUpdateOne

AddAmount adds i to the "amount" field.

func (*CreditTypeUpdateOne) AddCreditIDs

func (ctuo *CreditTypeUpdateOne) AddCreditIDs(ids ...uuid.UUID) *CreditTypeUpdateOne

AddCreditIDs adds the "credits" edge to the Credit entity by IDs.

func (*CreditTypeUpdateOne) AddCredits

func (ctuo *CreditTypeUpdateOne) AddCredits(c ...*Credit) *CreditTypeUpdateOne

AddCredits adds the "credits" edges to the Credit entity.

func (*CreditTypeUpdateOne) ClearCredits

func (ctuo *CreditTypeUpdateOne) ClearCredits() *CreditTypeUpdateOne

ClearCredits clears all "credits" edges to the Credit entity.

func (*CreditTypeUpdateOne) ClearDescription

func (ctuo *CreditTypeUpdateOne) ClearDescription() *CreditTypeUpdateOne

ClearDescription clears the value of the "description" field.

func (*CreditTypeUpdateOne) ClearStripeProductID

func (ctuo *CreditTypeUpdateOne) ClearStripeProductID() *CreditTypeUpdateOne

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*CreditTypeUpdateOne) Exec

func (ctuo *CreditTypeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CreditTypeUpdateOne) ExecContext

func (c *CreditTypeUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditTypeUpdateOne) ExecX

func (ctuo *CreditTypeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CreditTypeUpdateOne) Modify

func (ctuo *CreditTypeUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CreditTypeUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*CreditTypeUpdateOne) Mutation

func (ctuo *CreditTypeUpdateOne) Mutation() *CreditTypeMutation

Mutation returns the CreditTypeMutation object of the builder.

func (*CreditTypeUpdateOne) QueryContext

func (c *CreditTypeUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditTypeUpdateOne) RemoveCreditIDs

func (ctuo *CreditTypeUpdateOne) RemoveCreditIDs(ids ...uuid.UUID) *CreditTypeUpdateOne

RemoveCreditIDs removes the "credits" edge to Credit entities by IDs.

func (*CreditTypeUpdateOne) RemoveCredits

func (ctuo *CreditTypeUpdateOne) RemoveCredits(c ...*Credit) *CreditTypeUpdateOne

RemoveCredits removes "credits" edges to Credit entities.

func (*CreditTypeUpdateOne) Save

func (ctuo *CreditTypeUpdateOne) Save(ctx context.Context) (*CreditType, error)

Save executes the query and returns the updated CreditType entity.

func (*CreditTypeUpdateOne) SaveX

func (ctuo *CreditTypeUpdateOne) SaveX(ctx context.Context) *CreditType

SaveX is like Save, but panics if an error occurs.

func (*CreditTypeUpdateOne) Select

func (ctuo *CreditTypeUpdateOne) Select(field string, fields ...string) *CreditTypeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CreditTypeUpdateOne) SetAmount

func (ctuo *CreditTypeUpdateOne) SetAmount(i int32) *CreditTypeUpdateOne

SetAmount sets the "amount" field.

func (*CreditTypeUpdateOne) SetDescription

func (ctuo *CreditTypeUpdateOne) SetDescription(s string) *CreditTypeUpdateOne

SetDescription sets the "description" field.

func (*CreditTypeUpdateOne) SetName

SetName sets the "name" field.

func (*CreditTypeUpdateOne) SetNillableDescription

func (ctuo *CreditTypeUpdateOne) SetNillableDescription(s *string) *CreditTypeUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*CreditTypeUpdateOne) SetNillableStripeProductID

func (ctuo *CreditTypeUpdateOne) SetNillableStripeProductID(s *string) *CreditTypeUpdateOne

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*CreditTypeUpdateOne) SetStripeProductID

func (ctuo *CreditTypeUpdateOne) SetStripeProductID(s string) *CreditTypeUpdateOne

SetStripeProductID sets the "stripe_product_id" field.

func (*CreditTypeUpdateOne) SetType

SetType sets the "type" field.

func (*CreditTypeUpdateOne) SetUpdatedAt

func (ctuo *CreditTypeUpdateOne) SetUpdatedAt(t time.Time) *CreditTypeUpdateOne

SetUpdatedAt sets the "updated_at" field.

type CreditTypeUpsert

type CreditTypeUpsert struct {
	*sql.UpdateSet
}

CreditTypeUpsert is the "OnConflict" setter.

func (*CreditTypeUpsert) AddAmount

func (u *CreditTypeUpsert) AddAmount(v int32) *CreditTypeUpsert

AddAmount adds v to the "amount" field.

func (*CreditTypeUpsert) ClearDescription

func (u *CreditTypeUpsert) ClearDescription() *CreditTypeUpsert

ClearDescription clears the value of the "description" field.

func (*CreditTypeUpsert) ClearStripeProductID

func (u *CreditTypeUpsert) ClearStripeProductID() *CreditTypeUpsert

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*CreditTypeUpsert) SetAmount

func (u *CreditTypeUpsert) SetAmount(v int32) *CreditTypeUpsert

SetAmount sets the "amount" field.

func (*CreditTypeUpsert) SetDescription

func (u *CreditTypeUpsert) SetDescription(v string) *CreditTypeUpsert

SetDescription sets the "description" field.

func (*CreditTypeUpsert) SetName

func (u *CreditTypeUpsert) SetName(v string) *CreditTypeUpsert

SetName sets the "name" field.

func (*CreditTypeUpsert) SetStripeProductID

func (u *CreditTypeUpsert) SetStripeProductID(v string) *CreditTypeUpsert

SetStripeProductID sets the "stripe_product_id" field.

func (*CreditTypeUpsert) SetType

SetType sets the "type" field.

func (*CreditTypeUpsert) SetUpdatedAt

func (u *CreditTypeUpsert) SetUpdatedAt(v time.Time) *CreditTypeUpsert

SetUpdatedAt sets the "updated_at" field.

func (*CreditTypeUpsert) UpdateAmount

func (u *CreditTypeUpsert) UpdateAmount() *CreditTypeUpsert

UpdateAmount sets the "amount" field to the value that was provided on create.

func (*CreditTypeUpsert) UpdateDescription

func (u *CreditTypeUpsert) UpdateDescription() *CreditTypeUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*CreditTypeUpsert) UpdateName

func (u *CreditTypeUpsert) UpdateName() *CreditTypeUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*CreditTypeUpsert) UpdateStripeProductID

func (u *CreditTypeUpsert) UpdateStripeProductID() *CreditTypeUpsert

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*CreditTypeUpsert) UpdateType

func (u *CreditTypeUpsert) UpdateType() *CreditTypeUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*CreditTypeUpsert) UpdateUpdatedAt

func (u *CreditTypeUpsert) UpdateUpdatedAt() *CreditTypeUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type CreditTypeUpsertBulk

type CreditTypeUpsertBulk struct {
	// contains filtered or unexported fields
}

CreditTypeUpsertBulk is the builder for "upsert"-ing a bulk of CreditType nodes.

func (*CreditTypeUpsertBulk) AddAmount

AddAmount adds v to the "amount" field.

func (*CreditTypeUpsertBulk) ClearDescription

func (u *CreditTypeUpsertBulk) ClearDescription() *CreditTypeUpsertBulk

ClearDescription clears the value of the "description" field.

func (*CreditTypeUpsertBulk) ClearStripeProductID

func (u *CreditTypeUpsertBulk) ClearStripeProductID() *CreditTypeUpsertBulk

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*CreditTypeUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CreditTypeUpsertBulk) Exec

Exec executes the query.

func (*CreditTypeUpsertBulk) ExecX

func (u *CreditTypeUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CreditTypeUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CreditType.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CreditTypeUpsertBulk) SetAmount

SetAmount sets the "amount" field.

func (*CreditTypeUpsertBulk) SetDescription

func (u *CreditTypeUpsertBulk) SetDescription(v string) *CreditTypeUpsertBulk

SetDescription sets the "description" field.

func (*CreditTypeUpsertBulk) SetName

SetName sets the "name" field.

func (*CreditTypeUpsertBulk) SetStripeProductID

func (u *CreditTypeUpsertBulk) SetStripeProductID(v string) *CreditTypeUpsertBulk

SetStripeProductID sets the "stripe_product_id" field.

func (*CreditTypeUpsertBulk) SetType

SetType sets the "type" field.

func (*CreditTypeUpsertBulk) SetUpdatedAt

func (u *CreditTypeUpsertBulk) SetUpdatedAt(v time.Time) *CreditTypeUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*CreditTypeUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the CreditTypeCreateBulk.OnConflict documentation for more info.

func (*CreditTypeUpsertBulk) UpdateAmount

func (u *CreditTypeUpsertBulk) UpdateAmount() *CreditTypeUpsertBulk

UpdateAmount sets the "amount" field to the value that was provided on create.

func (*CreditTypeUpsertBulk) UpdateDescription

func (u *CreditTypeUpsertBulk) UpdateDescription() *CreditTypeUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*CreditTypeUpsertBulk) UpdateName

func (u *CreditTypeUpsertBulk) UpdateName() *CreditTypeUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*CreditTypeUpsertBulk) UpdateNewValues

func (u *CreditTypeUpsertBulk) UpdateNewValues() *CreditTypeUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.CreditType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(credittype.FieldID)
		}),
	).
	Exec(ctx)

func (*CreditTypeUpsertBulk) UpdateStripeProductID

func (u *CreditTypeUpsertBulk) UpdateStripeProductID() *CreditTypeUpsertBulk

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*CreditTypeUpsertBulk) UpdateType

func (u *CreditTypeUpsertBulk) UpdateType() *CreditTypeUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

func (*CreditTypeUpsertBulk) UpdateUpdatedAt

func (u *CreditTypeUpsertBulk) UpdateUpdatedAt() *CreditTypeUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type CreditTypeUpsertOne

type CreditTypeUpsertOne struct {
	// contains filtered or unexported fields
}

CreditTypeUpsertOne is the builder for "upsert"-ing

one CreditType node.

func (*CreditTypeUpsertOne) AddAmount

AddAmount adds v to the "amount" field.

func (*CreditTypeUpsertOne) ClearDescription

func (u *CreditTypeUpsertOne) ClearDescription() *CreditTypeUpsertOne

ClearDescription clears the value of the "description" field.

func (*CreditTypeUpsertOne) ClearStripeProductID

func (u *CreditTypeUpsertOne) ClearStripeProductID() *CreditTypeUpsertOne

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*CreditTypeUpsertOne) DoNothing

func (u *CreditTypeUpsertOne) DoNothing() *CreditTypeUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CreditTypeUpsertOne) Exec

Exec executes the query.

func (*CreditTypeUpsertOne) ExecX

func (u *CreditTypeUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CreditTypeUpsertOne) ID

func (u *CreditTypeUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CreditTypeUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*CreditTypeUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.CreditType.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CreditTypeUpsertOne) SetAmount

SetAmount sets the "amount" field.

func (*CreditTypeUpsertOne) SetDescription

func (u *CreditTypeUpsertOne) SetDescription(v string) *CreditTypeUpsertOne

SetDescription sets the "description" field.

func (*CreditTypeUpsertOne) SetName

SetName sets the "name" field.

func (*CreditTypeUpsertOne) SetStripeProductID

func (u *CreditTypeUpsertOne) SetStripeProductID(v string) *CreditTypeUpsertOne

SetStripeProductID sets the "stripe_product_id" field.

func (*CreditTypeUpsertOne) SetType

SetType sets the "type" field.

func (*CreditTypeUpsertOne) SetUpdatedAt

func (u *CreditTypeUpsertOne) SetUpdatedAt(v time.Time) *CreditTypeUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*CreditTypeUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the CreditTypeCreate.OnConflict documentation for more info.

func (*CreditTypeUpsertOne) UpdateAmount

func (u *CreditTypeUpsertOne) UpdateAmount() *CreditTypeUpsertOne

UpdateAmount sets the "amount" field to the value that was provided on create.

func (*CreditTypeUpsertOne) UpdateDescription

func (u *CreditTypeUpsertOne) UpdateDescription() *CreditTypeUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*CreditTypeUpsertOne) UpdateName

func (u *CreditTypeUpsertOne) UpdateName() *CreditTypeUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*CreditTypeUpsertOne) UpdateNewValues

func (u *CreditTypeUpsertOne) UpdateNewValues() *CreditTypeUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.CreditType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(credittype.FieldID)
		}),
	).
	Exec(ctx)

func (*CreditTypeUpsertOne) UpdateStripeProductID

func (u *CreditTypeUpsertOne) UpdateStripeProductID() *CreditTypeUpsertOne

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*CreditTypeUpsertOne) UpdateType

func (u *CreditTypeUpsertOne) UpdateType() *CreditTypeUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

func (*CreditTypeUpsertOne) UpdateUpdatedAt

func (u *CreditTypeUpsertOne) UpdateUpdatedAt() *CreditTypeUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type CreditTypes

type CreditTypes []*CreditType

CreditTypes is a parsable slice of CreditType.

type CreditUpdate

type CreditUpdate struct {
	// contains filtered or unexported fields
}

CreditUpdate is the builder for updating Credit entities.

func (*CreditUpdate) AddRemainingAmount

func (cu *CreditUpdate) AddRemainingAmount(i int32) *CreditUpdate

AddRemainingAmount adds i to the "remaining_amount" field.

func (*CreditUpdate) ClearCreditType

func (cu *CreditUpdate) ClearCreditType() *CreditUpdate

ClearCreditType clears the "credit_type" edge to the CreditType entity.

func (*CreditUpdate) ClearStripeLineItemID

func (cu *CreditUpdate) ClearStripeLineItemID() *CreditUpdate

ClearStripeLineItemID clears the value of the "stripe_line_item_id" field.

func (*CreditUpdate) ClearUsers

func (cu *CreditUpdate) ClearUsers() *CreditUpdate

ClearUsers clears the "users" edge to the User entity.

func (*CreditUpdate) Exec

func (cu *CreditUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*CreditUpdate) ExecContext

func (c *CreditUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditUpdate) ExecX

func (cu *CreditUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CreditUpdate) Modify

func (cu *CreditUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CreditUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*CreditUpdate) Mutation

func (cu *CreditUpdate) Mutation() *CreditMutation

Mutation returns the CreditMutation object of the builder.

func (*CreditUpdate) QueryContext

func (c *CreditUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditUpdate) Save

func (cu *CreditUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*CreditUpdate) SaveX

func (cu *CreditUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*CreditUpdate) SetCreditType

func (cu *CreditUpdate) SetCreditType(c *CreditType) *CreditUpdate

SetCreditType sets the "credit_type" edge to the CreditType entity.

func (*CreditUpdate) SetCreditTypeID

func (cu *CreditUpdate) SetCreditTypeID(u uuid.UUID) *CreditUpdate

SetCreditTypeID sets the "credit_type_id" field.

func (*CreditUpdate) SetExpiresAt

func (cu *CreditUpdate) SetExpiresAt(t time.Time) *CreditUpdate

SetExpiresAt sets the "expires_at" field.

func (*CreditUpdate) SetNillableReplenishedAt

func (cu *CreditUpdate) SetNillableReplenishedAt(t *time.Time) *CreditUpdate

SetNillableReplenishedAt sets the "replenished_at" field if the given value is not nil.

func (*CreditUpdate) SetNillableStripeLineItemID

func (cu *CreditUpdate) SetNillableStripeLineItemID(s *string) *CreditUpdate

SetNillableStripeLineItemID sets the "stripe_line_item_id" field if the given value is not nil.

func (*CreditUpdate) SetRemainingAmount

func (cu *CreditUpdate) SetRemainingAmount(i int32) *CreditUpdate

SetRemainingAmount sets the "remaining_amount" field.

func (*CreditUpdate) SetReplenishedAt

func (cu *CreditUpdate) SetReplenishedAt(t time.Time) *CreditUpdate

SetReplenishedAt sets the "replenished_at" field.

func (*CreditUpdate) SetStripeLineItemID

func (cu *CreditUpdate) SetStripeLineItemID(s string) *CreditUpdate

SetStripeLineItemID sets the "stripe_line_item_id" field.

func (*CreditUpdate) SetUpdatedAt

func (cu *CreditUpdate) SetUpdatedAt(t time.Time) *CreditUpdate

SetUpdatedAt sets the "updated_at" field.

func (*CreditUpdate) SetUserID

func (cu *CreditUpdate) SetUserID(u uuid.UUID) *CreditUpdate

SetUserID sets the "user_id" field.

func (*CreditUpdate) SetUsers

func (cu *CreditUpdate) SetUsers(u *User) *CreditUpdate

SetUsers sets the "users" edge to the User entity.

func (*CreditUpdate) SetUsersID

func (cu *CreditUpdate) SetUsersID(id uuid.UUID) *CreditUpdate

SetUsersID sets the "users" edge to the User entity by ID.

func (*CreditUpdate) Where

func (cu *CreditUpdate) Where(ps ...predicate.Credit) *CreditUpdate

Where appends a list predicates to the CreditUpdate builder.

type CreditUpdateOne

type CreditUpdateOne struct {
	// contains filtered or unexported fields
}

CreditUpdateOne is the builder for updating a single Credit entity.

func (*CreditUpdateOne) AddRemainingAmount

func (cuo *CreditUpdateOne) AddRemainingAmount(i int32) *CreditUpdateOne

AddRemainingAmount adds i to the "remaining_amount" field.

func (*CreditUpdateOne) ClearCreditType

func (cuo *CreditUpdateOne) ClearCreditType() *CreditUpdateOne

ClearCreditType clears the "credit_type" edge to the CreditType entity.

func (*CreditUpdateOne) ClearStripeLineItemID

func (cuo *CreditUpdateOne) ClearStripeLineItemID() *CreditUpdateOne

ClearStripeLineItemID clears the value of the "stripe_line_item_id" field.

func (*CreditUpdateOne) ClearUsers

func (cuo *CreditUpdateOne) ClearUsers() *CreditUpdateOne

ClearUsers clears the "users" edge to the User entity.

func (*CreditUpdateOne) Exec

func (cuo *CreditUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*CreditUpdateOne) ExecContext

func (c *CreditUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*CreditUpdateOne) ExecX

func (cuo *CreditUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CreditUpdateOne) Modify

func (cuo *CreditUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *CreditUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*CreditUpdateOne) Mutation

func (cuo *CreditUpdateOne) Mutation() *CreditMutation

Mutation returns the CreditMutation object of the builder.

func (*CreditUpdateOne) QueryContext

func (c *CreditUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*CreditUpdateOne) Save

func (cuo *CreditUpdateOne) Save(ctx context.Context) (*Credit, error)

Save executes the query and returns the updated Credit entity.

func (*CreditUpdateOne) SaveX

func (cuo *CreditUpdateOne) SaveX(ctx context.Context) *Credit

SaveX is like Save, but panics if an error occurs.

func (*CreditUpdateOne) Select

func (cuo *CreditUpdateOne) Select(field string, fields ...string) *CreditUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*CreditUpdateOne) SetCreditType

func (cuo *CreditUpdateOne) SetCreditType(c *CreditType) *CreditUpdateOne

SetCreditType sets the "credit_type" edge to the CreditType entity.

func (*CreditUpdateOne) SetCreditTypeID

func (cuo *CreditUpdateOne) SetCreditTypeID(u uuid.UUID) *CreditUpdateOne

SetCreditTypeID sets the "credit_type_id" field.

func (*CreditUpdateOne) SetExpiresAt

func (cuo *CreditUpdateOne) SetExpiresAt(t time.Time) *CreditUpdateOne

SetExpiresAt sets the "expires_at" field.

func (*CreditUpdateOne) SetNillableReplenishedAt

func (cuo *CreditUpdateOne) SetNillableReplenishedAt(t *time.Time) *CreditUpdateOne

SetNillableReplenishedAt sets the "replenished_at" field if the given value is not nil.

func (*CreditUpdateOne) SetNillableStripeLineItemID

func (cuo *CreditUpdateOne) SetNillableStripeLineItemID(s *string) *CreditUpdateOne

SetNillableStripeLineItemID sets the "stripe_line_item_id" field if the given value is not nil.

func (*CreditUpdateOne) SetRemainingAmount

func (cuo *CreditUpdateOne) SetRemainingAmount(i int32) *CreditUpdateOne

SetRemainingAmount sets the "remaining_amount" field.

func (*CreditUpdateOne) SetReplenishedAt

func (cuo *CreditUpdateOne) SetReplenishedAt(t time.Time) *CreditUpdateOne

SetReplenishedAt sets the "replenished_at" field.

func (*CreditUpdateOne) SetStripeLineItemID

func (cuo *CreditUpdateOne) SetStripeLineItemID(s string) *CreditUpdateOne

SetStripeLineItemID sets the "stripe_line_item_id" field.

func (*CreditUpdateOne) SetUpdatedAt

func (cuo *CreditUpdateOne) SetUpdatedAt(t time.Time) *CreditUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*CreditUpdateOne) SetUserID

func (cuo *CreditUpdateOne) SetUserID(u uuid.UUID) *CreditUpdateOne

SetUserID sets the "user_id" field.

func (*CreditUpdateOne) SetUsers

func (cuo *CreditUpdateOne) SetUsers(u *User) *CreditUpdateOne

SetUsers sets the "users" edge to the User entity.

func (*CreditUpdateOne) SetUsersID

func (cuo *CreditUpdateOne) SetUsersID(id uuid.UUID) *CreditUpdateOne

SetUsersID sets the "users" edge to the User entity by ID.

type CreditUpsert

type CreditUpsert struct {
	*sql.UpdateSet
}

CreditUpsert is the "OnConflict" setter.

func (*CreditUpsert) AddRemainingAmount

func (u *CreditUpsert) AddRemainingAmount(v int32) *CreditUpsert

AddRemainingAmount adds v to the "remaining_amount" field.

func (*CreditUpsert) ClearStripeLineItemID

func (u *CreditUpsert) ClearStripeLineItemID() *CreditUpsert

ClearStripeLineItemID clears the value of the "stripe_line_item_id" field.

func (*CreditUpsert) SetCreditTypeID

func (u *CreditUpsert) SetCreditTypeID(v uuid.UUID) *CreditUpsert

SetCreditTypeID sets the "credit_type_id" field.

func (*CreditUpsert) SetExpiresAt

func (u *CreditUpsert) SetExpiresAt(v time.Time) *CreditUpsert

SetExpiresAt sets the "expires_at" field.

func (*CreditUpsert) SetRemainingAmount

func (u *CreditUpsert) SetRemainingAmount(v int32) *CreditUpsert

SetRemainingAmount sets the "remaining_amount" field.

func (*CreditUpsert) SetReplenishedAt

func (u *CreditUpsert) SetReplenishedAt(v time.Time) *CreditUpsert

SetReplenishedAt sets the "replenished_at" field.

func (*CreditUpsert) SetStripeLineItemID

func (u *CreditUpsert) SetStripeLineItemID(v string) *CreditUpsert

SetStripeLineItemID sets the "stripe_line_item_id" field.

func (*CreditUpsert) SetUpdatedAt

func (u *CreditUpsert) SetUpdatedAt(v time.Time) *CreditUpsert

SetUpdatedAt sets the "updated_at" field.

func (*CreditUpsert) SetUserID

func (u *CreditUpsert) SetUserID(v uuid.UUID) *CreditUpsert

SetUserID sets the "user_id" field.

func (*CreditUpsert) UpdateCreditTypeID

func (u *CreditUpsert) UpdateCreditTypeID() *CreditUpsert

UpdateCreditTypeID sets the "credit_type_id" field to the value that was provided on create.

func (*CreditUpsert) UpdateExpiresAt

func (u *CreditUpsert) UpdateExpiresAt() *CreditUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*CreditUpsert) UpdateRemainingAmount

func (u *CreditUpsert) UpdateRemainingAmount() *CreditUpsert

UpdateRemainingAmount sets the "remaining_amount" field to the value that was provided on create.

func (*CreditUpsert) UpdateReplenishedAt

func (u *CreditUpsert) UpdateReplenishedAt() *CreditUpsert

UpdateReplenishedAt sets the "replenished_at" field to the value that was provided on create.

func (*CreditUpsert) UpdateStripeLineItemID

func (u *CreditUpsert) UpdateStripeLineItemID() *CreditUpsert

UpdateStripeLineItemID sets the "stripe_line_item_id" field to the value that was provided on create.

func (*CreditUpsert) UpdateUpdatedAt

func (u *CreditUpsert) UpdateUpdatedAt() *CreditUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*CreditUpsert) UpdateUserID

func (u *CreditUpsert) UpdateUserID() *CreditUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type CreditUpsertBulk

type CreditUpsertBulk struct {
	// contains filtered or unexported fields
}

CreditUpsertBulk is the builder for "upsert"-ing a bulk of Credit nodes.

func (*CreditUpsertBulk) AddRemainingAmount

func (u *CreditUpsertBulk) AddRemainingAmount(v int32) *CreditUpsertBulk

AddRemainingAmount adds v to the "remaining_amount" field.

func (*CreditUpsertBulk) ClearStripeLineItemID

func (u *CreditUpsertBulk) ClearStripeLineItemID() *CreditUpsertBulk

ClearStripeLineItemID clears the value of the "stripe_line_item_id" field.

func (*CreditUpsertBulk) DoNothing

func (u *CreditUpsertBulk) DoNothing() *CreditUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CreditUpsertBulk) Exec

func (u *CreditUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*CreditUpsertBulk) ExecX

func (u *CreditUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CreditUpsertBulk) Ignore

func (u *CreditUpsertBulk) Ignore() *CreditUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Credit.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*CreditUpsertBulk) SetCreditTypeID

func (u *CreditUpsertBulk) SetCreditTypeID(v uuid.UUID) *CreditUpsertBulk

SetCreditTypeID sets the "credit_type_id" field.

func (*CreditUpsertBulk) SetExpiresAt

func (u *CreditUpsertBulk) SetExpiresAt(v time.Time) *CreditUpsertBulk

SetExpiresAt sets the "expires_at" field.

func (*CreditUpsertBulk) SetRemainingAmount

func (u *CreditUpsertBulk) SetRemainingAmount(v int32) *CreditUpsertBulk

SetRemainingAmount sets the "remaining_amount" field.

func (*CreditUpsertBulk) SetReplenishedAt

func (u *CreditUpsertBulk) SetReplenishedAt(v time.Time) *CreditUpsertBulk

SetReplenishedAt sets the "replenished_at" field.

func (*CreditUpsertBulk) SetStripeLineItemID

func (u *CreditUpsertBulk) SetStripeLineItemID(v string) *CreditUpsertBulk

SetStripeLineItemID sets the "stripe_line_item_id" field.

func (*CreditUpsertBulk) SetUpdatedAt

func (u *CreditUpsertBulk) SetUpdatedAt(v time.Time) *CreditUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*CreditUpsertBulk) SetUserID

func (u *CreditUpsertBulk) SetUserID(v uuid.UUID) *CreditUpsertBulk

SetUserID sets the "user_id" field.

func (*CreditUpsertBulk) Update

func (u *CreditUpsertBulk) Update(set func(*CreditUpsert)) *CreditUpsertBulk

Update allows overriding fields `UPDATE` values. See the CreditCreateBulk.OnConflict documentation for more info.

func (*CreditUpsertBulk) UpdateCreditTypeID

func (u *CreditUpsertBulk) UpdateCreditTypeID() *CreditUpsertBulk

UpdateCreditTypeID sets the "credit_type_id" field to the value that was provided on create.

func (*CreditUpsertBulk) UpdateExpiresAt

func (u *CreditUpsertBulk) UpdateExpiresAt() *CreditUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*CreditUpsertBulk) UpdateNewValues

func (u *CreditUpsertBulk) UpdateNewValues() *CreditUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Credit.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(credit.FieldID)
		}),
	).
	Exec(ctx)

func (*CreditUpsertBulk) UpdateRemainingAmount

func (u *CreditUpsertBulk) UpdateRemainingAmount() *CreditUpsertBulk

UpdateRemainingAmount sets the "remaining_amount" field to the value that was provided on create.

func (*CreditUpsertBulk) UpdateReplenishedAt

func (u *CreditUpsertBulk) UpdateReplenishedAt() *CreditUpsertBulk

UpdateReplenishedAt sets the "replenished_at" field to the value that was provided on create.

func (*CreditUpsertBulk) UpdateStripeLineItemID

func (u *CreditUpsertBulk) UpdateStripeLineItemID() *CreditUpsertBulk

UpdateStripeLineItemID sets the "stripe_line_item_id" field to the value that was provided on create.

func (*CreditUpsertBulk) UpdateUpdatedAt

func (u *CreditUpsertBulk) UpdateUpdatedAt() *CreditUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*CreditUpsertBulk) UpdateUserID

func (u *CreditUpsertBulk) UpdateUserID() *CreditUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type CreditUpsertOne

type CreditUpsertOne struct {
	// contains filtered or unexported fields
}

CreditUpsertOne is the builder for "upsert"-ing

one Credit node.

func (*CreditUpsertOne) AddRemainingAmount

func (u *CreditUpsertOne) AddRemainingAmount(v int32) *CreditUpsertOne

AddRemainingAmount adds v to the "remaining_amount" field.

func (*CreditUpsertOne) ClearStripeLineItemID

func (u *CreditUpsertOne) ClearStripeLineItemID() *CreditUpsertOne

ClearStripeLineItemID clears the value of the "stripe_line_item_id" field.

func (*CreditUpsertOne) DoNothing

func (u *CreditUpsertOne) DoNothing() *CreditUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*CreditUpsertOne) Exec

func (u *CreditUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*CreditUpsertOne) ExecX

func (u *CreditUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*CreditUpsertOne) ID

func (u *CreditUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*CreditUpsertOne) IDX

func (u *CreditUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*CreditUpsertOne) Ignore

func (u *CreditUpsertOne) Ignore() *CreditUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Credit.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*CreditUpsertOne) SetCreditTypeID

func (u *CreditUpsertOne) SetCreditTypeID(v uuid.UUID) *CreditUpsertOne

SetCreditTypeID sets the "credit_type_id" field.

func (*CreditUpsertOne) SetExpiresAt

func (u *CreditUpsertOne) SetExpiresAt(v time.Time) *CreditUpsertOne

SetExpiresAt sets the "expires_at" field.

func (*CreditUpsertOne) SetRemainingAmount

func (u *CreditUpsertOne) SetRemainingAmount(v int32) *CreditUpsertOne

SetRemainingAmount sets the "remaining_amount" field.

func (*CreditUpsertOne) SetReplenishedAt

func (u *CreditUpsertOne) SetReplenishedAt(v time.Time) *CreditUpsertOne

SetReplenishedAt sets the "replenished_at" field.

func (*CreditUpsertOne) SetStripeLineItemID

func (u *CreditUpsertOne) SetStripeLineItemID(v string) *CreditUpsertOne

SetStripeLineItemID sets the "stripe_line_item_id" field.

func (*CreditUpsertOne) SetUpdatedAt

func (u *CreditUpsertOne) SetUpdatedAt(v time.Time) *CreditUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*CreditUpsertOne) SetUserID

func (u *CreditUpsertOne) SetUserID(v uuid.UUID) *CreditUpsertOne

SetUserID sets the "user_id" field.

func (*CreditUpsertOne) Update

func (u *CreditUpsertOne) Update(set func(*CreditUpsert)) *CreditUpsertOne

Update allows overriding fields `UPDATE` values. See the CreditCreate.OnConflict documentation for more info.

func (*CreditUpsertOne) UpdateCreditTypeID

func (u *CreditUpsertOne) UpdateCreditTypeID() *CreditUpsertOne

UpdateCreditTypeID sets the "credit_type_id" field to the value that was provided on create.

func (*CreditUpsertOne) UpdateExpiresAt

func (u *CreditUpsertOne) UpdateExpiresAt() *CreditUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*CreditUpsertOne) UpdateNewValues

func (u *CreditUpsertOne) UpdateNewValues() *CreditUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Credit.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(credit.FieldID)
		}),
	).
	Exec(ctx)

func (*CreditUpsertOne) UpdateRemainingAmount

func (u *CreditUpsertOne) UpdateRemainingAmount() *CreditUpsertOne

UpdateRemainingAmount sets the "remaining_amount" field to the value that was provided on create.

func (*CreditUpsertOne) UpdateReplenishedAt

func (u *CreditUpsertOne) UpdateReplenishedAt() *CreditUpsertOne

UpdateReplenishedAt sets the "replenished_at" field to the value that was provided on create.

func (*CreditUpsertOne) UpdateStripeLineItemID

func (u *CreditUpsertOne) UpdateStripeLineItemID() *CreditUpsertOne

UpdateStripeLineItemID sets the "stripe_line_item_id" field to the value that was provided on create.

func (*CreditUpsertOne) UpdateUpdatedAt

func (u *CreditUpsertOne) UpdateUpdatedAt() *CreditUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*CreditUpsertOne) UpdateUserID

func (u *CreditUpsertOne) UpdateUserID() *CreditUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type Credits

type Credits []*Credit

Credits is a parsable slice of Credit.

type DeviceInfo

type DeviceInfo struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type *string `json:"type,omitempty"`
	// Os holds the value of the "os" field.
	Os *string `json:"os,omitempty"`
	// Browser holds the value of the "browser" field.
	Browser *string `json:"browser,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DeviceInfoQuery when eager-loading is set.
	Edges DeviceInfoEdges `json:"edges"`
	// contains filtered or unexported fields
}

DeviceInfo is the model entity for the DeviceInfo schema.

func (*DeviceInfo) ExecContext

func (c *DeviceInfo) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceInfo) QueryContext

func (c *DeviceInfo) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceInfo) QueryGenerations

func (di *DeviceInfo) QueryGenerations() *GenerationQuery

QueryGenerations queries the "generations" edge of the DeviceInfo entity.

func (*DeviceInfo) QueryUpscales

func (di *DeviceInfo) QueryUpscales() *UpscaleQuery

QueryUpscales queries the "upscales" edge of the DeviceInfo entity.

func (*DeviceInfo) QueryVoiceovers

func (di *DeviceInfo) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers queries the "voiceovers" edge of the DeviceInfo entity.

func (*DeviceInfo) String

func (di *DeviceInfo) String() string

String implements the fmt.Stringer.

func (*DeviceInfo) Unwrap

func (di *DeviceInfo) Unwrap() *DeviceInfo

Unwrap unwraps the DeviceInfo 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 (*DeviceInfo) Update

func (di *DeviceInfo) Update() *DeviceInfoUpdateOne

Update returns a builder for updating this DeviceInfo. Note that you need to call DeviceInfo.Unwrap() before calling this method if this DeviceInfo was returned from a transaction, and the transaction was committed or rolled back.

type DeviceInfoClient

type DeviceInfoClient struct {
	// contains filtered or unexported fields
}

DeviceInfoClient is a client for the DeviceInfo schema.

func NewDeviceInfoClient

func NewDeviceInfoClient(c config) *DeviceInfoClient

NewDeviceInfoClient returns a client for the DeviceInfo from the given config.

func (*DeviceInfoClient) Create

func (c *DeviceInfoClient) Create() *DeviceInfoCreate

Create returns a builder for creating a DeviceInfo entity.

func (*DeviceInfoClient) CreateBulk

func (c *DeviceInfoClient) CreateBulk(builders ...*DeviceInfoCreate) *DeviceInfoCreateBulk

CreateBulk returns a builder for creating a bulk of DeviceInfo entities.

func (*DeviceInfoClient) Delete

func (c *DeviceInfoClient) Delete() *DeviceInfoDelete

Delete returns a delete builder for DeviceInfo.

func (*DeviceInfoClient) DeleteOne

func (c *DeviceInfoClient) DeleteOne(di *DeviceInfo) *DeviceInfoDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DeviceInfoClient) DeleteOneID

func (c *DeviceInfoClient) DeleteOneID(id uuid.UUID) *DeviceInfoDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DeviceInfoClient) ExecContext

func (c *DeviceInfoClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceInfoClient) Get

Get returns a DeviceInfo entity by its id.

func (*DeviceInfoClient) GetX

func (c *DeviceInfoClient) GetX(ctx context.Context, id uuid.UUID) *DeviceInfo

GetX is like Get, but panics if an error occurs.

func (*DeviceInfoClient) Hooks

func (c *DeviceInfoClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeviceInfoClient) Intercept

func (c *DeviceInfoClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `deviceinfo.Intercept(f(g(h())))`.

func (*DeviceInfoClient) Interceptors

func (c *DeviceInfoClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DeviceInfoClient) Query

func (c *DeviceInfoClient) Query() *DeviceInfoQuery

Query returns a query builder for DeviceInfo.

func (*DeviceInfoClient) QueryContext

func (c *DeviceInfoClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceInfoClient) QueryGenerations

func (c *DeviceInfoClient) QueryGenerations(di *DeviceInfo) *GenerationQuery

QueryGenerations queries the generations edge of a DeviceInfo.

func (*DeviceInfoClient) QueryUpscales

func (c *DeviceInfoClient) QueryUpscales(di *DeviceInfo) *UpscaleQuery

QueryUpscales queries the upscales edge of a DeviceInfo.

func (*DeviceInfoClient) QueryVoiceovers

func (c *DeviceInfoClient) QueryVoiceovers(di *DeviceInfo) *VoiceoverQuery

QueryVoiceovers queries the voiceovers edge of a DeviceInfo.

func (*DeviceInfoClient) Update

func (c *DeviceInfoClient) Update() *DeviceInfoUpdate

Update returns an update builder for DeviceInfo.

func (*DeviceInfoClient) UpdateOne

func (c *DeviceInfoClient) UpdateOne(di *DeviceInfo) *DeviceInfoUpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeviceInfoClient) UpdateOneID

func (c *DeviceInfoClient) UpdateOneID(id uuid.UUID) *DeviceInfoUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DeviceInfoClient) Use

func (c *DeviceInfoClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deviceinfo.Hooks(f(g(h())))`.

type DeviceInfoCreate

type DeviceInfoCreate struct {
	// contains filtered or unexported fields
}

DeviceInfoCreate is the builder for creating a DeviceInfo entity.

func (*DeviceInfoCreate) AddGenerationIDs

func (dic *DeviceInfoCreate) AddGenerationIDs(ids ...uuid.UUID) *DeviceInfoCreate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*DeviceInfoCreate) AddGenerations

func (dic *DeviceInfoCreate) AddGenerations(g ...*Generation) *DeviceInfoCreate

AddGenerations adds the "generations" edges to the Generation entity.

func (*DeviceInfoCreate) AddUpscaleIDs

func (dic *DeviceInfoCreate) AddUpscaleIDs(ids ...uuid.UUID) *DeviceInfoCreate

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*DeviceInfoCreate) AddUpscales

func (dic *DeviceInfoCreate) AddUpscales(u ...*Upscale) *DeviceInfoCreate

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*DeviceInfoCreate) AddVoiceoverIDs

func (dic *DeviceInfoCreate) AddVoiceoverIDs(ids ...uuid.UUID) *DeviceInfoCreate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*DeviceInfoCreate) AddVoiceovers

func (dic *DeviceInfoCreate) AddVoiceovers(v ...*Voiceover) *DeviceInfoCreate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*DeviceInfoCreate) Exec

func (dic *DeviceInfoCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceInfoCreate) ExecContext

func (c *DeviceInfoCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceInfoCreate) ExecX

func (dic *DeviceInfoCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceInfoCreate) Mutation

func (dic *DeviceInfoCreate) Mutation() *DeviceInfoMutation

Mutation returns the DeviceInfoMutation object of the builder.

func (*DeviceInfoCreate) OnConflict

func (dic *DeviceInfoCreate) OnConflict(opts ...sql.ConflictOption) *DeviceInfoUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceInfo.Create().
	SetType(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceInfoUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*DeviceInfoCreate) OnConflictColumns

func (dic *DeviceInfoCreate) OnConflictColumns(columns ...string) *DeviceInfoUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceInfo.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceInfoCreate) QueryContext

func (c *DeviceInfoCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceInfoCreate) Save

func (dic *DeviceInfoCreate) Save(ctx context.Context) (*DeviceInfo, error)

Save creates the DeviceInfo in the database.

func (*DeviceInfoCreate) SaveX

func (dic *DeviceInfoCreate) SaveX(ctx context.Context) *DeviceInfo

SaveX calls Save and panics if Save returns an error.

func (*DeviceInfoCreate) SetBrowser

func (dic *DeviceInfoCreate) SetBrowser(s string) *DeviceInfoCreate

SetBrowser sets the "browser" field.

func (*DeviceInfoCreate) SetCreatedAt

func (dic *DeviceInfoCreate) SetCreatedAt(t time.Time) *DeviceInfoCreate

SetCreatedAt sets the "created_at" field.

func (*DeviceInfoCreate) SetID

func (dic *DeviceInfoCreate) SetID(u uuid.UUID) *DeviceInfoCreate

SetID sets the "id" field.

func (*DeviceInfoCreate) SetNillableBrowser

func (dic *DeviceInfoCreate) SetNillableBrowser(s *string) *DeviceInfoCreate

SetNillableBrowser sets the "browser" field if the given value is not nil.

func (*DeviceInfoCreate) SetNillableCreatedAt

func (dic *DeviceInfoCreate) SetNillableCreatedAt(t *time.Time) *DeviceInfoCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeviceInfoCreate) SetNillableID

func (dic *DeviceInfoCreate) SetNillableID(u *uuid.UUID) *DeviceInfoCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*DeviceInfoCreate) SetNillableOs

func (dic *DeviceInfoCreate) SetNillableOs(s *string) *DeviceInfoCreate

SetNillableOs sets the "os" field if the given value is not nil.

func (*DeviceInfoCreate) SetNillableType

func (dic *DeviceInfoCreate) SetNillableType(s *string) *DeviceInfoCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*DeviceInfoCreate) SetNillableUpdatedAt

func (dic *DeviceInfoCreate) SetNillableUpdatedAt(t *time.Time) *DeviceInfoCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeviceInfoCreate) SetOs

func (dic *DeviceInfoCreate) SetOs(s string) *DeviceInfoCreate

SetOs sets the "os" field.

func (*DeviceInfoCreate) SetType

func (dic *DeviceInfoCreate) SetType(s string) *DeviceInfoCreate

SetType sets the "type" field.

func (*DeviceInfoCreate) SetUpdatedAt

func (dic *DeviceInfoCreate) SetUpdatedAt(t time.Time) *DeviceInfoCreate

SetUpdatedAt sets the "updated_at" field.

type DeviceInfoCreateBulk

type DeviceInfoCreateBulk struct {
	// contains filtered or unexported fields
}

DeviceInfoCreateBulk is the builder for creating many DeviceInfo entities in bulk.

func (*DeviceInfoCreateBulk) Exec

func (dicb *DeviceInfoCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceInfoCreateBulk) ExecContext

func (c *DeviceInfoCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceInfoCreateBulk) ExecX

func (dicb *DeviceInfoCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceInfoCreateBulk) OnConflict

func (dicb *DeviceInfoCreateBulk) OnConflict(opts ...sql.ConflictOption) *DeviceInfoUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DeviceInfo.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DeviceInfoUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*DeviceInfoCreateBulk) OnConflictColumns

func (dicb *DeviceInfoCreateBulk) OnConflictColumns(columns ...string) *DeviceInfoUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DeviceInfo.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DeviceInfoCreateBulk) QueryContext

func (c *DeviceInfoCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceInfoCreateBulk) Save

func (dicb *DeviceInfoCreateBulk) Save(ctx context.Context) ([]*DeviceInfo, error)

Save creates the DeviceInfo entities in the database.

func (*DeviceInfoCreateBulk) SaveX

func (dicb *DeviceInfoCreateBulk) SaveX(ctx context.Context) []*DeviceInfo

SaveX is like Save, but panics if an error occurs.

type DeviceInfoDelete

type DeviceInfoDelete struct {
	// contains filtered or unexported fields
}

DeviceInfoDelete is the builder for deleting a DeviceInfo entity.

func (*DeviceInfoDelete) Exec

func (did *DeviceInfoDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeviceInfoDelete) ExecContext

func (c *DeviceInfoDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceInfoDelete) ExecX

func (did *DeviceInfoDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeviceInfoDelete) QueryContext

func (c *DeviceInfoDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceInfoDelete) Where

Where appends a list predicates to the DeviceInfoDelete builder.

type DeviceInfoDeleteOne

type DeviceInfoDeleteOne struct {
	// contains filtered or unexported fields
}

DeviceInfoDeleteOne is the builder for deleting a single DeviceInfo entity.

func (*DeviceInfoDeleteOne) Exec

func (dido *DeviceInfoDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeviceInfoDeleteOne) ExecX

func (dido *DeviceInfoDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type DeviceInfoEdges

type DeviceInfoEdges struct {
	// Generations holds the value of the generations edge.
	Generations []*Generation `json:"generations,omitempty"`
	// Upscales holds the value of the upscales edge.
	Upscales []*Upscale `json:"upscales,omitempty"`
	// Voiceovers holds the value of the voiceovers edge.
	Voiceovers []*Voiceover `json:"voiceovers,omitempty"`
	// contains filtered or unexported fields
}

DeviceInfoEdges holds the relations/edges for other nodes in the graph.

func (DeviceInfoEdges) GenerationsOrErr

func (e DeviceInfoEdges) GenerationsOrErr() ([]*Generation, error)

GenerationsOrErr returns the Generations value or an error if the edge was not loaded in eager-loading.

func (DeviceInfoEdges) UpscalesOrErr

func (e DeviceInfoEdges) UpscalesOrErr() ([]*Upscale, error)

UpscalesOrErr returns the Upscales value or an error if the edge was not loaded in eager-loading.

func (DeviceInfoEdges) VoiceoversOrErr

func (e DeviceInfoEdges) VoiceoversOrErr() ([]*Voiceover, error)

VoiceoversOrErr returns the Voiceovers value or an error if the edge was not loaded in eager-loading.

type DeviceInfoGroupBy

type DeviceInfoGroupBy struct {
	// contains filtered or unexported fields
}

DeviceInfoGroupBy is the group-by builder for DeviceInfo entities.

func (*DeviceInfoGroupBy) Aggregate

func (digb *DeviceInfoGroupBy) Aggregate(fns ...AggregateFunc) *DeviceInfoGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DeviceInfoGroupBy) Bool

func (s *DeviceInfoGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceInfoGroupBy) BoolX

func (s *DeviceInfoGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceInfoGroupBy) Bools

func (s *DeviceInfoGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceInfoGroupBy) BoolsX

func (s *DeviceInfoGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeviceInfoGroupBy) Float64

func (s *DeviceInfoGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceInfoGroupBy) Float64X

func (s *DeviceInfoGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceInfoGroupBy) Float64s

func (s *DeviceInfoGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceInfoGroupBy) Float64sX

func (s *DeviceInfoGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceInfoGroupBy) Int

func (s *DeviceInfoGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceInfoGroupBy) IntX

func (s *DeviceInfoGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceInfoGroupBy) Ints

func (s *DeviceInfoGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceInfoGroupBy) IntsX

func (s *DeviceInfoGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceInfoGroupBy) Scan

func (digb *DeviceInfoGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceInfoGroupBy) ScanX

func (s *DeviceInfoGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceInfoGroupBy) String

func (s *DeviceInfoGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceInfoGroupBy) StringX

func (s *DeviceInfoGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceInfoGroupBy) Strings

func (s *DeviceInfoGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceInfoGroupBy) StringsX

func (s *DeviceInfoGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceInfoMutation

type DeviceInfoMutation struct {
	// contains filtered or unexported fields
}

DeviceInfoMutation represents an operation that mutates the DeviceInfo nodes in the graph.

func (*DeviceInfoMutation) AddField

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) AddGenerationIDs

func (m *DeviceInfoMutation) AddGenerationIDs(ids ...uuid.UUID)

AddGenerationIDs adds the "generations" edge to the Generation entity by ids.

func (*DeviceInfoMutation) AddUpscaleIDs

func (m *DeviceInfoMutation) AddUpscaleIDs(ids ...uuid.UUID)

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by ids.

func (*DeviceInfoMutation) AddVoiceoverIDs

func (m *DeviceInfoMutation) AddVoiceoverIDs(ids ...uuid.UUID)

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by ids.

func (*DeviceInfoMutation) AddedEdges

func (m *DeviceInfoMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeviceInfoMutation) AddedField

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) AddedFields

func (m *DeviceInfoMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeviceInfoMutation) AddedIDs

func (m *DeviceInfoMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeviceInfoMutation) Browser

func (m *DeviceInfoMutation) Browser() (r string, exists bool)

Browser returns the value of the "browser" field in the mutation.

func (*DeviceInfoMutation) BrowserCleared

func (m *DeviceInfoMutation) BrowserCleared() bool

BrowserCleared returns if the "browser" field was cleared in this mutation.

func (*DeviceInfoMutation) ClearBrowser

func (m *DeviceInfoMutation) ClearBrowser()

ClearBrowser clears the value of the "browser" field.

func (*DeviceInfoMutation) ClearEdge

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) ClearField

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) ClearGenerations

func (m *DeviceInfoMutation) ClearGenerations()

ClearGenerations clears the "generations" edge to the Generation entity.

func (*DeviceInfoMutation) ClearOs

func (m *DeviceInfoMutation) ClearOs()

ClearOs clears the value of the "os" field.

func (*DeviceInfoMutation) ClearType

func (m *DeviceInfoMutation) ClearType()

ClearType clears the value of the "type" field.

func (*DeviceInfoMutation) ClearUpscales

func (m *DeviceInfoMutation) ClearUpscales()

ClearUpscales clears the "upscales" edge to the Upscale entity.

func (*DeviceInfoMutation) ClearVoiceovers

func (m *DeviceInfoMutation) ClearVoiceovers()

ClearVoiceovers clears the "voiceovers" edge to the Voiceover entity.

func (*DeviceInfoMutation) ClearedEdges

func (m *DeviceInfoMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeviceInfoMutation) ClearedFields

func (m *DeviceInfoMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeviceInfoMutation) Client

func (m DeviceInfoMutation) 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 (*DeviceInfoMutation) CreatedAt

func (m *DeviceInfoMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeviceInfoMutation) EdgeCleared

func (m *DeviceInfoMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeviceInfoMutation) ExecContext

func (c *DeviceInfoMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceInfoMutation) Field

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) FieldCleared

func (m *DeviceInfoMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeviceInfoMutation) Fields

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) GenerationsCleared

func (m *DeviceInfoMutation) GenerationsCleared() bool

GenerationsCleared reports if the "generations" edge to the Generation entity was cleared.

func (*DeviceInfoMutation) GenerationsIDs

func (m *DeviceInfoMutation) GenerationsIDs() (ids []uuid.UUID)

GenerationsIDs returns the "generations" edge IDs in the mutation.

func (*DeviceInfoMutation) GetType

func (m *DeviceInfoMutation) GetType() (r string, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*DeviceInfoMutation) ID

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) IDs

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) OldBrowser

func (m *DeviceInfoMutation) OldBrowser(ctx context.Context) (v *string, err error)

OldBrowser returns the old "browser" field's value of the DeviceInfo entity. If the DeviceInfo 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 (*DeviceInfoMutation) OldCreatedAt

func (m *DeviceInfoMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DeviceInfo entity. If the DeviceInfo 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 (*DeviceInfoMutation) OldField

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) OldOs

func (m *DeviceInfoMutation) OldOs(ctx context.Context) (v *string, err error)

OldOs returns the old "os" field's value of the DeviceInfo entity. If the DeviceInfo 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 (*DeviceInfoMutation) OldType

func (m *DeviceInfoMutation) OldType(ctx context.Context) (v *string, err error)

OldType returns the old "type" field's value of the DeviceInfo entity. If the DeviceInfo 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 (*DeviceInfoMutation) OldUpdatedAt

func (m *DeviceInfoMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DeviceInfo entity. If the DeviceInfo 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 (*DeviceInfoMutation) Op

func (m *DeviceInfoMutation) Op() Op

Op returns the operation name.

func (*DeviceInfoMutation) Os

func (m *DeviceInfoMutation) Os() (r string, exists bool)

Os returns the value of the "os" field in the mutation.

func (*DeviceInfoMutation) OsCleared

func (m *DeviceInfoMutation) OsCleared() bool

OsCleared returns if the "os" field was cleared in this mutation.

func (*DeviceInfoMutation) QueryContext

func (c *DeviceInfoMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceInfoMutation) RemoveGenerationIDs

func (m *DeviceInfoMutation) RemoveGenerationIDs(ids ...uuid.UUID)

RemoveGenerationIDs removes the "generations" edge to the Generation entity by IDs.

func (*DeviceInfoMutation) RemoveUpscaleIDs

func (m *DeviceInfoMutation) RemoveUpscaleIDs(ids ...uuid.UUID)

RemoveUpscaleIDs removes the "upscales" edge to the Upscale entity by IDs.

func (*DeviceInfoMutation) RemoveVoiceoverIDs

func (m *DeviceInfoMutation) RemoveVoiceoverIDs(ids ...uuid.UUID)

RemoveVoiceoverIDs removes the "voiceovers" edge to the Voiceover entity by IDs.

func (*DeviceInfoMutation) RemovedEdges

func (m *DeviceInfoMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeviceInfoMutation) RemovedGenerationsIDs

func (m *DeviceInfoMutation) RemovedGenerationsIDs() (ids []uuid.UUID)

RemovedGenerations returns the removed IDs of the "generations" edge to the Generation entity.

func (*DeviceInfoMutation) RemovedIDs

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) RemovedUpscalesIDs

func (m *DeviceInfoMutation) RemovedUpscalesIDs() (ids []uuid.UUID)

RemovedUpscales returns the removed IDs of the "upscales" edge to the Upscale entity.

func (*DeviceInfoMutation) RemovedVoiceoversIDs

func (m *DeviceInfoMutation) RemovedVoiceoversIDs() (ids []uuid.UUID)

RemovedVoiceovers returns the removed IDs of the "voiceovers" edge to the Voiceover entity.

func (*DeviceInfoMutation) ResetBrowser

func (m *DeviceInfoMutation) ResetBrowser()

ResetBrowser resets all changes to the "browser" field.

func (*DeviceInfoMutation) ResetCreatedAt

func (m *DeviceInfoMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeviceInfoMutation) ResetEdge

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) ResetField

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) ResetGenerations

func (m *DeviceInfoMutation) ResetGenerations()

ResetGenerations resets all changes to the "generations" edge.

func (*DeviceInfoMutation) ResetOs

func (m *DeviceInfoMutation) ResetOs()

ResetOs resets all changes to the "os" field.

func (*DeviceInfoMutation) ResetType

func (m *DeviceInfoMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*DeviceInfoMutation) ResetUpdatedAt

func (m *DeviceInfoMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeviceInfoMutation) ResetUpscales

func (m *DeviceInfoMutation) ResetUpscales()

ResetUpscales resets all changes to the "upscales" edge.

func (*DeviceInfoMutation) ResetVoiceovers

func (m *DeviceInfoMutation) ResetVoiceovers()

ResetVoiceovers resets all changes to the "voiceovers" edge.

func (*DeviceInfoMutation) SetBrowser

func (m *DeviceInfoMutation) SetBrowser(s string)

SetBrowser sets the "browser" field.

func (*DeviceInfoMutation) SetCreatedAt

func (m *DeviceInfoMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeviceInfoMutation) SetField

func (m *DeviceInfoMutation) 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 (*DeviceInfoMutation) SetID

func (m *DeviceInfoMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of DeviceInfo entities.

func (*DeviceInfoMutation) SetOp

func (m *DeviceInfoMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DeviceInfoMutation) SetOs

func (m *DeviceInfoMutation) SetOs(s string)

SetOs sets the "os" field.

func (*DeviceInfoMutation) SetType

func (m *DeviceInfoMutation) SetType(s string)

SetType sets the "type" field.

func (*DeviceInfoMutation) SetUpdatedAt

func (m *DeviceInfoMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (DeviceInfoMutation) Tx

func (m DeviceInfoMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeviceInfoMutation) Type

func (m *DeviceInfoMutation) Type() string

Type returns the node type of this mutation (DeviceInfo).

func (*DeviceInfoMutation) TypeCleared

func (m *DeviceInfoMutation) TypeCleared() bool

TypeCleared returns if the "type" field was cleared in this mutation.

func (*DeviceInfoMutation) UpdatedAt

func (m *DeviceInfoMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeviceInfoMutation) UpscalesCleared

func (m *DeviceInfoMutation) UpscalesCleared() bool

UpscalesCleared reports if the "upscales" edge to the Upscale entity was cleared.

func (*DeviceInfoMutation) UpscalesIDs

func (m *DeviceInfoMutation) UpscalesIDs() (ids []uuid.UUID)

UpscalesIDs returns the "upscales" edge IDs in the mutation.

func (*DeviceInfoMutation) VoiceoversCleared

func (m *DeviceInfoMutation) VoiceoversCleared() bool

VoiceoversCleared reports if the "voiceovers" edge to the Voiceover entity was cleared.

func (*DeviceInfoMutation) VoiceoversIDs

func (m *DeviceInfoMutation) VoiceoversIDs() (ids []uuid.UUID)

VoiceoversIDs returns the "voiceovers" edge IDs in the mutation.

func (*DeviceInfoMutation) Where

func (m *DeviceInfoMutation) Where(ps ...predicate.DeviceInfo)

Where appends a list predicates to the DeviceInfoMutation builder.

func (*DeviceInfoMutation) WhereP

func (m *DeviceInfoMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DeviceInfoMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DeviceInfoQuery

type DeviceInfoQuery struct {
	// contains filtered or unexported fields
}

DeviceInfoQuery is the builder for querying DeviceInfo entities.

func (*DeviceInfoQuery) Aggregate

func (diq *DeviceInfoQuery) Aggregate(fns ...AggregateFunc) *DeviceInfoSelect

Aggregate returns a DeviceInfoSelect configured with the given aggregations.

func (*DeviceInfoQuery) All

func (diq *DeviceInfoQuery) All(ctx context.Context) ([]*DeviceInfo, error)

All executes the query and returns a list of DeviceInfos.

func (*DeviceInfoQuery) AllX

func (diq *DeviceInfoQuery) AllX(ctx context.Context) []*DeviceInfo

AllX is like All, but panics if an error occurs.

func (*DeviceInfoQuery) Clone

func (diq *DeviceInfoQuery) Clone() *DeviceInfoQuery

Clone returns a duplicate of the DeviceInfoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeviceInfoQuery) Count

func (diq *DeviceInfoQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeviceInfoQuery) CountX

func (diq *DeviceInfoQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeviceInfoQuery) ExecContext

func (c *DeviceInfoQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceInfoQuery) Exist

func (diq *DeviceInfoQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeviceInfoQuery) ExistX

func (diq *DeviceInfoQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeviceInfoQuery) First

func (diq *DeviceInfoQuery) First(ctx context.Context) (*DeviceInfo, error)

First returns the first DeviceInfo entity from the query. Returns a *NotFoundError when no DeviceInfo was found.

func (*DeviceInfoQuery) FirstID

func (diq *DeviceInfoQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first DeviceInfo ID from the query. Returns a *NotFoundError when no DeviceInfo ID was found.

func (*DeviceInfoQuery) FirstIDX

func (diq *DeviceInfoQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeviceInfoQuery) FirstX

func (diq *DeviceInfoQuery) FirstX(ctx context.Context) *DeviceInfo

FirstX is like First, but panics if an error occurs.

func (*DeviceInfoQuery) GroupBy

func (diq *DeviceInfoQuery) GroupBy(field string, fields ...string) *DeviceInfoGroupBy

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 {
	Type string `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DeviceInfo.Query().
	GroupBy(deviceinfo.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeviceInfoQuery) IDs

func (diq *DeviceInfoQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of DeviceInfo IDs.

func (*DeviceInfoQuery) IDsX

func (diq *DeviceInfoQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*DeviceInfoQuery) Limit

func (diq *DeviceInfoQuery) Limit(limit int) *DeviceInfoQuery

Limit the number of records to be returned by this query.

func (*DeviceInfoQuery) Modify

func (diq *DeviceInfoQuery) Modify(modifiers ...func(s *sql.Selector)) *DeviceInfoSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*DeviceInfoQuery) Offset

func (diq *DeviceInfoQuery) Offset(offset int) *DeviceInfoQuery

Offset to start from.

func (*DeviceInfoQuery) Only

func (diq *DeviceInfoQuery) Only(ctx context.Context) (*DeviceInfo, error)

Only returns a single DeviceInfo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeviceInfo entity is found. Returns a *NotFoundError when no DeviceInfo entities are found.

func (*DeviceInfoQuery) OnlyID

func (diq *DeviceInfoQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only DeviceInfo ID in the query. Returns a *NotSingularError when more than one DeviceInfo ID is found. Returns a *NotFoundError when no entities are found.

func (*DeviceInfoQuery) OnlyIDX

func (diq *DeviceInfoQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeviceInfoQuery) OnlyX

func (diq *DeviceInfoQuery) OnlyX(ctx context.Context) *DeviceInfo

OnlyX is like Only, but panics if an error occurs.

func (*DeviceInfoQuery) Order

func (diq *DeviceInfoQuery) Order(o ...OrderFunc) *DeviceInfoQuery

Order specifies how the records should be ordered.

func (*DeviceInfoQuery) QueryContext

func (c *DeviceInfoQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceInfoQuery) QueryGenerations

func (diq *DeviceInfoQuery) QueryGenerations() *GenerationQuery

QueryGenerations chains the current query on the "generations" edge.

func (*DeviceInfoQuery) QueryUpscales

func (diq *DeviceInfoQuery) QueryUpscales() *UpscaleQuery

QueryUpscales chains the current query on the "upscales" edge.

func (*DeviceInfoQuery) QueryVoiceovers

func (diq *DeviceInfoQuery) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers chains the current query on the "voiceovers" edge.

func (*DeviceInfoQuery) Select

func (diq *DeviceInfoQuery) Select(fields ...string) *DeviceInfoSelect

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 {
	Type string `json:"type,omitempty"`
}

client.DeviceInfo.Query().
	Select(deviceinfo.FieldType).
	Scan(ctx, &v)

func (*DeviceInfoQuery) Unique

func (diq *DeviceInfoQuery) Unique(unique bool) *DeviceInfoQuery

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 (*DeviceInfoQuery) Where

Where adds a new predicate for the DeviceInfoQuery builder.

func (*DeviceInfoQuery) WithGenerations

func (diq *DeviceInfoQuery) WithGenerations(opts ...func(*GenerationQuery)) *DeviceInfoQuery

WithGenerations tells the query-builder to eager-load the nodes that are connected to the "generations" edge. The optional arguments are used to configure the query builder of the edge.

func (*DeviceInfoQuery) WithUpscales

func (diq *DeviceInfoQuery) WithUpscales(opts ...func(*UpscaleQuery)) *DeviceInfoQuery

WithUpscales tells the query-builder to eager-load the nodes that are connected to the "upscales" edge. The optional arguments are used to configure the query builder of the edge.

func (*DeviceInfoQuery) WithVoiceovers

func (diq *DeviceInfoQuery) WithVoiceovers(opts ...func(*VoiceoverQuery)) *DeviceInfoQuery

WithVoiceovers tells the query-builder to eager-load the nodes that are connected to the "voiceovers" edge. The optional arguments are used to configure the query builder of the edge.

type DeviceInfoSelect

type DeviceInfoSelect struct {
	*DeviceInfoQuery
	// contains filtered or unexported fields
}

DeviceInfoSelect is the builder for selecting fields of DeviceInfo entities.

func (*DeviceInfoSelect) Aggregate

func (dis *DeviceInfoSelect) Aggregate(fns ...AggregateFunc) *DeviceInfoSelect

Aggregate adds the given aggregation functions to the selector query.

func (*DeviceInfoSelect) Bool

func (s *DeviceInfoSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeviceInfoSelect) BoolX

func (s *DeviceInfoSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeviceInfoSelect) Bools

func (s *DeviceInfoSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeviceInfoSelect) BoolsX

func (s *DeviceInfoSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (DeviceInfoSelect) ExecContext

func (c DeviceInfoSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceInfoSelect) Float64

func (s *DeviceInfoSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeviceInfoSelect) Float64X

func (s *DeviceInfoSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeviceInfoSelect) Float64s

func (s *DeviceInfoSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeviceInfoSelect) Float64sX

func (s *DeviceInfoSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeviceInfoSelect) Int

func (s *DeviceInfoSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeviceInfoSelect) IntX

func (s *DeviceInfoSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeviceInfoSelect) Ints

func (s *DeviceInfoSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeviceInfoSelect) IntsX

func (s *DeviceInfoSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeviceInfoSelect) Modify

func (dis *DeviceInfoSelect) Modify(modifiers ...func(s *sql.Selector)) *DeviceInfoSelect

Modify adds a query modifier for attaching custom logic to queries.

func (DeviceInfoSelect) QueryContext

func (c DeviceInfoSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceInfoSelect) Scan

func (dis *DeviceInfoSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DeviceInfoSelect) ScanX

func (s *DeviceInfoSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DeviceInfoSelect) String

func (s *DeviceInfoSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeviceInfoSelect) StringX

func (s *DeviceInfoSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeviceInfoSelect) Strings

func (s *DeviceInfoSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeviceInfoSelect) StringsX

func (s *DeviceInfoSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeviceInfoUpdate

type DeviceInfoUpdate struct {
	// contains filtered or unexported fields
}

DeviceInfoUpdate is the builder for updating DeviceInfo entities.

func (*DeviceInfoUpdate) AddGenerationIDs

func (diu *DeviceInfoUpdate) AddGenerationIDs(ids ...uuid.UUID) *DeviceInfoUpdate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*DeviceInfoUpdate) AddGenerations

func (diu *DeviceInfoUpdate) AddGenerations(g ...*Generation) *DeviceInfoUpdate

AddGenerations adds the "generations" edges to the Generation entity.

func (*DeviceInfoUpdate) AddUpscaleIDs

func (diu *DeviceInfoUpdate) AddUpscaleIDs(ids ...uuid.UUID) *DeviceInfoUpdate

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*DeviceInfoUpdate) AddUpscales

func (diu *DeviceInfoUpdate) AddUpscales(u ...*Upscale) *DeviceInfoUpdate

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*DeviceInfoUpdate) AddVoiceoverIDs

func (diu *DeviceInfoUpdate) AddVoiceoverIDs(ids ...uuid.UUID) *DeviceInfoUpdate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*DeviceInfoUpdate) AddVoiceovers

func (diu *DeviceInfoUpdate) AddVoiceovers(v ...*Voiceover) *DeviceInfoUpdate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*DeviceInfoUpdate) ClearBrowser

func (diu *DeviceInfoUpdate) ClearBrowser() *DeviceInfoUpdate

ClearBrowser clears the value of the "browser" field.

func (*DeviceInfoUpdate) ClearGenerations

func (diu *DeviceInfoUpdate) ClearGenerations() *DeviceInfoUpdate

ClearGenerations clears all "generations" edges to the Generation entity.

func (*DeviceInfoUpdate) ClearOs

func (diu *DeviceInfoUpdate) ClearOs() *DeviceInfoUpdate

ClearOs clears the value of the "os" field.

func (*DeviceInfoUpdate) ClearType

func (diu *DeviceInfoUpdate) ClearType() *DeviceInfoUpdate

ClearType clears the value of the "type" field.

func (*DeviceInfoUpdate) ClearUpscales

func (diu *DeviceInfoUpdate) ClearUpscales() *DeviceInfoUpdate

ClearUpscales clears all "upscales" edges to the Upscale entity.

func (*DeviceInfoUpdate) ClearVoiceovers

func (diu *DeviceInfoUpdate) ClearVoiceovers() *DeviceInfoUpdate

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*DeviceInfoUpdate) Exec

func (diu *DeviceInfoUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeviceInfoUpdate) ExecContext

func (c *DeviceInfoUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceInfoUpdate) ExecX

func (diu *DeviceInfoUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceInfoUpdate) Modify

func (diu *DeviceInfoUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceInfoUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceInfoUpdate) Mutation

func (diu *DeviceInfoUpdate) Mutation() *DeviceInfoMutation

Mutation returns the DeviceInfoMutation object of the builder.

func (*DeviceInfoUpdate) QueryContext

func (c *DeviceInfoUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceInfoUpdate) RemoveGenerationIDs

func (diu *DeviceInfoUpdate) RemoveGenerationIDs(ids ...uuid.UUID) *DeviceInfoUpdate

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*DeviceInfoUpdate) RemoveGenerations

func (diu *DeviceInfoUpdate) RemoveGenerations(g ...*Generation) *DeviceInfoUpdate

RemoveGenerations removes "generations" edges to Generation entities.

func (*DeviceInfoUpdate) RemoveUpscaleIDs

func (diu *DeviceInfoUpdate) RemoveUpscaleIDs(ids ...uuid.UUID) *DeviceInfoUpdate

RemoveUpscaleIDs removes the "upscales" edge to Upscale entities by IDs.

func (*DeviceInfoUpdate) RemoveUpscales

func (diu *DeviceInfoUpdate) RemoveUpscales(u ...*Upscale) *DeviceInfoUpdate

RemoveUpscales removes "upscales" edges to Upscale entities.

func (*DeviceInfoUpdate) RemoveVoiceoverIDs

func (diu *DeviceInfoUpdate) RemoveVoiceoverIDs(ids ...uuid.UUID) *DeviceInfoUpdate

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*DeviceInfoUpdate) RemoveVoiceovers

func (diu *DeviceInfoUpdate) RemoveVoiceovers(v ...*Voiceover) *DeviceInfoUpdate

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*DeviceInfoUpdate) Save

func (diu *DeviceInfoUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeviceInfoUpdate) SaveX

func (diu *DeviceInfoUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeviceInfoUpdate) SetBrowser

func (diu *DeviceInfoUpdate) SetBrowser(s string) *DeviceInfoUpdate

SetBrowser sets the "browser" field.

func (*DeviceInfoUpdate) SetNillableBrowser

func (diu *DeviceInfoUpdate) SetNillableBrowser(s *string) *DeviceInfoUpdate

SetNillableBrowser sets the "browser" field if the given value is not nil.

func (*DeviceInfoUpdate) SetNillableOs

func (diu *DeviceInfoUpdate) SetNillableOs(s *string) *DeviceInfoUpdate

SetNillableOs sets the "os" field if the given value is not nil.

func (*DeviceInfoUpdate) SetNillableType

func (diu *DeviceInfoUpdate) SetNillableType(s *string) *DeviceInfoUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*DeviceInfoUpdate) SetOs

func (diu *DeviceInfoUpdate) SetOs(s string) *DeviceInfoUpdate

SetOs sets the "os" field.

func (*DeviceInfoUpdate) SetType

func (diu *DeviceInfoUpdate) SetType(s string) *DeviceInfoUpdate

SetType sets the "type" field.

func (*DeviceInfoUpdate) SetUpdatedAt

func (diu *DeviceInfoUpdate) SetUpdatedAt(t time.Time) *DeviceInfoUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DeviceInfoUpdate) Where

Where appends a list predicates to the DeviceInfoUpdate builder.

type DeviceInfoUpdateOne

type DeviceInfoUpdateOne struct {
	// contains filtered or unexported fields
}

DeviceInfoUpdateOne is the builder for updating a single DeviceInfo entity.

func (*DeviceInfoUpdateOne) AddGenerationIDs

func (diuo *DeviceInfoUpdateOne) AddGenerationIDs(ids ...uuid.UUID) *DeviceInfoUpdateOne

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*DeviceInfoUpdateOne) AddGenerations

func (diuo *DeviceInfoUpdateOne) AddGenerations(g ...*Generation) *DeviceInfoUpdateOne

AddGenerations adds the "generations" edges to the Generation entity.

func (*DeviceInfoUpdateOne) AddUpscaleIDs

func (diuo *DeviceInfoUpdateOne) AddUpscaleIDs(ids ...uuid.UUID) *DeviceInfoUpdateOne

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*DeviceInfoUpdateOne) AddUpscales

func (diuo *DeviceInfoUpdateOne) AddUpscales(u ...*Upscale) *DeviceInfoUpdateOne

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*DeviceInfoUpdateOne) AddVoiceoverIDs

func (diuo *DeviceInfoUpdateOne) AddVoiceoverIDs(ids ...uuid.UUID) *DeviceInfoUpdateOne

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*DeviceInfoUpdateOne) AddVoiceovers

func (diuo *DeviceInfoUpdateOne) AddVoiceovers(v ...*Voiceover) *DeviceInfoUpdateOne

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*DeviceInfoUpdateOne) ClearBrowser

func (diuo *DeviceInfoUpdateOne) ClearBrowser() *DeviceInfoUpdateOne

ClearBrowser clears the value of the "browser" field.

func (*DeviceInfoUpdateOne) ClearGenerations

func (diuo *DeviceInfoUpdateOne) ClearGenerations() *DeviceInfoUpdateOne

ClearGenerations clears all "generations" edges to the Generation entity.

func (*DeviceInfoUpdateOne) ClearOs

func (diuo *DeviceInfoUpdateOne) ClearOs() *DeviceInfoUpdateOne

ClearOs clears the value of the "os" field.

func (*DeviceInfoUpdateOne) ClearType

func (diuo *DeviceInfoUpdateOne) ClearType() *DeviceInfoUpdateOne

ClearType clears the value of the "type" field.

func (*DeviceInfoUpdateOne) ClearUpscales

func (diuo *DeviceInfoUpdateOne) ClearUpscales() *DeviceInfoUpdateOne

ClearUpscales clears all "upscales" edges to the Upscale entity.

func (*DeviceInfoUpdateOne) ClearVoiceovers

func (diuo *DeviceInfoUpdateOne) ClearVoiceovers() *DeviceInfoUpdateOne

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*DeviceInfoUpdateOne) Exec

func (diuo *DeviceInfoUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeviceInfoUpdateOne) ExecContext

func (c *DeviceInfoUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DeviceInfoUpdateOne) ExecX

func (diuo *DeviceInfoUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceInfoUpdateOne) Modify

func (diuo *DeviceInfoUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeviceInfoUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DeviceInfoUpdateOne) Mutation

func (diuo *DeviceInfoUpdateOne) Mutation() *DeviceInfoMutation

Mutation returns the DeviceInfoMutation object of the builder.

func (*DeviceInfoUpdateOne) QueryContext

func (c *DeviceInfoUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DeviceInfoUpdateOne) RemoveGenerationIDs

func (diuo *DeviceInfoUpdateOne) RemoveGenerationIDs(ids ...uuid.UUID) *DeviceInfoUpdateOne

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*DeviceInfoUpdateOne) RemoveGenerations

func (diuo *DeviceInfoUpdateOne) RemoveGenerations(g ...*Generation) *DeviceInfoUpdateOne

RemoveGenerations removes "generations" edges to Generation entities.

func (*DeviceInfoUpdateOne) RemoveUpscaleIDs

func (diuo *DeviceInfoUpdateOne) RemoveUpscaleIDs(ids ...uuid.UUID) *DeviceInfoUpdateOne

RemoveUpscaleIDs removes the "upscales" edge to Upscale entities by IDs.

func (*DeviceInfoUpdateOne) RemoveUpscales

func (diuo *DeviceInfoUpdateOne) RemoveUpscales(u ...*Upscale) *DeviceInfoUpdateOne

RemoveUpscales removes "upscales" edges to Upscale entities.

func (*DeviceInfoUpdateOne) RemoveVoiceoverIDs

func (diuo *DeviceInfoUpdateOne) RemoveVoiceoverIDs(ids ...uuid.UUID) *DeviceInfoUpdateOne

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*DeviceInfoUpdateOne) RemoveVoiceovers

func (diuo *DeviceInfoUpdateOne) RemoveVoiceovers(v ...*Voiceover) *DeviceInfoUpdateOne

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*DeviceInfoUpdateOne) Save

func (diuo *DeviceInfoUpdateOne) Save(ctx context.Context) (*DeviceInfo, error)

Save executes the query and returns the updated DeviceInfo entity.

func (*DeviceInfoUpdateOne) SaveX

func (diuo *DeviceInfoUpdateOne) SaveX(ctx context.Context) *DeviceInfo

SaveX is like Save, but panics if an error occurs.

func (*DeviceInfoUpdateOne) Select

func (diuo *DeviceInfoUpdateOne) Select(field string, fields ...string) *DeviceInfoUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeviceInfoUpdateOne) SetBrowser

func (diuo *DeviceInfoUpdateOne) SetBrowser(s string) *DeviceInfoUpdateOne

SetBrowser sets the "browser" field.

func (*DeviceInfoUpdateOne) SetNillableBrowser

func (diuo *DeviceInfoUpdateOne) SetNillableBrowser(s *string) *DeviceInfoUpdateOne

SetNillableBrowser sets the "browser" field if the given value is not nil.

func (*DeviceInfoUpdateOne) SetNillableOs

func (diuo *DeviceInfoUpdateOne) SetNillableOs(s *string) *DeviceInfoUpdateOne

SetNillableOs sets the "os" field if the given value is not nil.

func (*DeviceInfoUpdateOne) SetNillableType

func (diuo *DeviceInfoUpdateOne) SetNillableType(s *string) *DeviceInfoUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*DeviceInfoUpdateOne) SetOs

SetOs sets the "os" field.

func (*DeviceInfoUpdateOne) SetType

SetType sets the "type" field.

func (*DeviceInfoUpdateOne) SetUpdatedAt

func (diuo *DeviceInfoUpdateOne) SetUpdatedAt(t time.Time) *DeviceInfoUpdateOne

SetUpdatedAt sets the "updated_at" field.

type DeviceInfoUpsert

type DeviceInfoUpsert struct {
	*sql.UpdateSet
}

DeviceInfoUpsert is the "OnConflict" setter.

func (*DeviceInfoUpsert) ClearBrowser

func (u *DeviceInfoUpsert) ClearBrowser() *DeviceInfoUpsert

ClearBrowser clears the value of the "browser" field.

func (*DeviceInfoUpsert) ClearOs

func (u *DeviceInfoUpsert) ClearOs() *DeviceInfoUpsert

ClearOs clears the value of the "os" field.

func (*DeviceInfoUpsert) ClearType

func (u *DeviceInfoUpsert) ClearType() *DeviceInfoUpsert

ClearType clears the value of the "type" field.

func (*DeviceInfoUpsert) SetBrowser

func (u *DeviceInfoUpsert) SetBrowser(v string) *DeviceInfoUpsert

SetBrowser sets the "browser" field.

func (*DeviceInfoUpsert) SetOs

SetOs sets the "os" field.

func (*DeviceInfoUpsert) SetType

func (u *DeviceInfoUpsert) SetType(v string) *DeviceInfoUpsert

SetType sets the "type" field.

func (*DeviceInfoUpsert) SetUpdatedAt

func (u *DeviceInfoUpsert) SetUpdatedAt(v time.Time) *DeviceInfoUpsert

SetUpdatedAt sets the "updated_at" field.

func (*DeviceInfoUpsert) UpdateBrowser

func (u *DeviceInfoUpsert) UpdateBrowser() *DeviceInfoUpsert

UpdateBrowser sets the "browser" field to the value that was provided on create.

func (*DeviceInfoUpsert) UpdateOs

func (u *DeviceInfoUpsert) UpdateOs() *DeviceInfoUpsert

UpdateOs sets the "os" field to the value that was provided on create.

func (*DeviceInfoUpsert) UpdateType

func (u *DeviceInfoUpsert) UpdateType() *DeviceInfoUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*DeviceInfoUpsert) UpdateUpdatedAt

func (u *DeviceInfoUpsert) UpdateUpdatedAt() *DeviceInfoUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceInfoUpsertBulk

type DeviceInfoUpsertBulk struct {
	// contains filtered or unexported fields
}

DeviceInfoUpsertBulk is the builder for "upsert"-ing a bulk of DeviceInfo nodes.

func (*DeviceInfoUpsertBulk) ClearBrowser

func (u *DeviceInfoUpsertBulk) ClearBrowser() *DeviceInfoUpsertBulk

ClearBrowser clears the value of the "browser" field.

func (*DeviceInfoUpsertBulk) ClearOs

ClearOs clears the value of the "os" field.

func (*DeviceInfoUpsertBulk) ClearType

ClearType clears the value of the "type" field.

func (*DeviceInfoUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceInfoUpsertBulk) Exec

Exec executes the query.

func (*DeviceInfoUpsertBulk) ExecX

func (u *DeviceInfoUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceInfoUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceInfo.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DeviceInfoUpsertBulk) SetBrowser

SetBrowser sets the "browser" field.

func (*DeviceInfoUpsertBulk) SetOs

SetOs sets the "os" field.

func (*DeviceInfoUpsertBulk) SetType

SetType sets the "type" field.

func (*DeviceInfoUpsertBulk) SetUpdatedAt

func (u *DeviceInfoUpsertBulk) SetUpdatedAt(v time.Time) *DeviceInfoUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*DeviceInfoUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DeviceInfoCreateBulk.OnConflict documentation for more info.

func (*DeviceInfoUpsertBulk) UpdateBrowser

func (u *DeviceInfoUpsertBulk) UpdateBrowser() *DeviceInfoUpsertBulk

UpdateBrowser sets the "browser" field to the value that was provided on create.

func (*DeviceInfoUpsertBulk) UpdateNewValues

func (u *DeviceInfoUpsertBulk) UpdateNewValues() *DeviceInfoUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DeviceInfo.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceinfo.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceInfoUpsertBulk) UpdateOs

UpdateOs sets the "os" field to the value that was provided on create.

func (*DeviceInfoUpsertBulk) UpdateType

func (u *DeviceInfoUpsertBulk) UpdateType() *DeviceInfoUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

func (*DeviceInfoUpsertBulk) UpdateUpdatedAt

func (u *DeviceInfoUpsertBulk) UpdateUpdatedAt() *DeviceInfoUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceInfoUpsertOne

type DeviceInfoUpsertOne struct {
	// contains filtered or unexported fields
}

DeviceInfoUpsertOne is the builder for "upsert"-ing

one DeviceInfo node.

func (*DeviceInfoUpsertOne) ClearBrowser

func (u *DeviceInfoUpsertOne) ClearBrowser() *DeviceInfoUpsertOne

ClearBrowser clears the value of the "browser" field.

func (*DeviceInfoUpsertOne) ClearOs

ClearOs clears the value of the "os" field.

func (*DeviceInfoUpsertOne) ClearType

func (u *DeviceInfoUpsertOne) ClearType() *DeviceInfoUpsertOne

ClearType clears the value of the "type" field.

func (*DeviceInfoUpsertOne) DoNothing

func (u *DeviceInfoUpsertOne) DoNothing() *DeviceInfoUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DeviceInfoUpsertOne) Exec

Exec executes the query.

func (*DeviceInfoUpsertOne) ExecX

func (u *DeviceInfoUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeviceInfoUpsertOne) ID

func (u *DeviceInfoUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DeviceInfoUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DeviceInfoUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DeviceInfo.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DeviceInfoUpsertOne) SetBrowser

SetBrowser sets the "browser" field.

func (*DeviceInfoUpsertOne) SetOs

SetOs sets the "os" field.

func (*DeviceInfoUpsertOne) SetType

SetType sets the "type" field.

func (*DeviceInfoUpsertOne) SetUpdatedAt

func (u *DeviceInfoUpsertOne) SetUpdatedAt(v time.Time) *DeviceInfoUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*DeviceInfoUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DeviceInfoCreate.OnConflict documentation for more info.

func (*DeviceInfoUpsertOne) UpdateBrowser

func (u *DeviceInfoUpsertOne) UpdateBrowser() *DeviceInfoUpsertOne

UpdateBrowser sets the "browser" field to the value that was provided on create.

func (*DeviceInfoUpsertOne) UpdateNewValues

func (u *DeviceInfoUpsertOne) UpdateNewValues() *DeviceInfoUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DeviceInfo.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(deviceinfo.FieldID)
		}),
	).
	Exec(ctx)

func (*DeviceInfoUpsertOne) UpdateOs

UpdateOs sets the "os" field to the value that was provided on create.

func (*DeviceInfoUpsertOne) UpdateType

func (u *DeviceInfoUpsertOne) UpdateType() *DeviceInfoUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

func (*DeviceInfoUpsertOne) UpdateUpdatedAt

func (u *DeviceInfoUpsertOne) UpdateUpdatedAt() *DeviceInfoUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DeviceInfos

type DeviceInfos []*DeviceInfo

DeviceInfos is a parsable slice of DeviceInfo.

type DisposableEmail

type DisposableEmail struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Domain holds the value of the "domain" field.
	Domain string `json:"domain,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

DisposableEmail is the model entity for the DisposableEmail schema.

func (*DisposableEmail) ExecContext

func (c *DisposableEmail) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DisposableEmail) QueryContext

func (c *DisposableEmail) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DisposableEmail) String

func (de *DisposableEmail) String() string

String implements the fmt.Stringer.

func (*DisposableEmail) Unwrap

func (de *DisposableEmail) Unwrap() *DisposableEmail

Unwrap unwraps the DisposableEmail 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 (*DisposableEmail) Update

Update returns a builder for updating this DisposableEmail. Note that you need to call DisposableEmail.Unwrap() before calling this method if this DisposableEmail was returned from a transaction, and the transaction was committed or rolled back.

type DisposableEmailClient

type DisposableEmailClient struct {
	// contains filtered or unexported fields
}

DisposableEmailClient is a client for the DisposableEmail schema.

func NewDisposableEmailClient

func NewDisposableEmailClient(c config) *DisposableEmailClient

NewDisposableEmailClient returns a client for the DisposableEmail from the given config.

func (*DisposableEmailClient) Create

Create returns a builder for creating a DisposableEmail entity.

func (*DisposableEmailClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DisposableEmail entities.

func (*DisposableEmailClient) Delete

Delete returns a delete builder for DisposableEmail.

func (*DisposableEmailClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DisposableEmailClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*DisposableEmailClient) ExecContext

func (c *DisposableEmailClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DisposableEmailClient) Get

Get returns a DisposableEmail entity by its id.

func (*DisposableEmailClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DisposableEmailClient) Hooks

func (c *DisposableEmailClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DisposableEmailClient) Intercept

func (c *DisposableEmailClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `disposableemail.Intercept(f(g(h())))`.

func (*DisposableEmailClient) Interceptors

func (c *DisposableEmailClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*DisposableEmailClient) Query

Query returns a query builder for DisposableEmail.

func (*DisposableEmailClient) QueryContext

func (c *DisposableEmailClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DisposableEmailClient) Update

Update returns an update builder for DisposableEmail.

func (*DisposableEmailClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DisposableEmailClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DisposableEmailClient) Use

func (c *DisposableEmailClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `disposableemail.Hooks(f(g(h())))`.

type DisposableEmailCreate

type DisposableEmailCreate struct {
	// contains filtered or unexported fields
}

DisposableEmailCreate is the builder for creating a DisposableEmail entity.

func (*DisposableEmailCreate) Exec

func (dec *DisposableEmailCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DisposableEmailCreate) ExecContext

func (c *DisposableEmailCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DisposableEmailCreate) ExecX

func (dec *DisposableEmailCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DisposableEmailCreate) Mutation

Mutation returns the DisposableEmailMutation object of the builder.

func (*DisposableEmailCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DisposableEmail.Create().
	SetDomain(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DisposableEmailUpsert) {
		SetDomain(v+v).
	}).
	Exec(ctx)

func (*DisposableEmailCreate) OnConflictColumns

func (dec *DisposableEmailCreate) OnConflictColumns(columns ...string) *DisposableEmailUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DisposableEmail.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DisposableEmailCreate) QueryContext

func (c *DisposableEmailCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DisposableEmailCreate) Save

Save creates the DisposableEmail in the database.

func (*DisposableEmailCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DisposableEmailCreate) SetCreatedAt

func (dec *DisposableEmailCreate) SetCreatedAt(t time.Time) *DisposableEmailCreate

SetCreatedAt sets the "created_at" field.

func (*DisposableEmailCreate) SetDomain

SetDomain sets the "domain" field.

func (*DisposableEmailCreate) SetID

SetID sets the "id" field.

func (*DisposableEmailCreate) SetNillableCreatedAt

func (dec *DisposableEmailCreate) SetNillableCreatedAt(t *time.Time) *DisposableEmailCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DisposableEmailCreate) SetNillableID

func (dec *DisposableEmailCreate) SetNillableID(u *uuid.UUID) *DisposableEmailCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*DisposableEmailCreate) SetNillableUpdatedAt

func (dec *DisposableEmailCreate) SetNillableUpdatedAt(t *time.Time) *DisposableEmailCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DisposableEmailCreate) SetUpdatedAt

func (dec *DisposableEmailCreate) SetUpdatedAt(t time.Time) *DisposableEmailCreate

SetUpdatedAt sets the "updated_at" field.

type DisposableEmailCreateBulk

type DisposableEmailCreateBulk struct {
	// contains filtered or unexported fields
}

DisposableEmailCreateBulk is the builder for creating many DisposableEmail entities in bulk.

func (*DisposableEmailCreateBulk) Exec

Exec executes the query.

func (*DisposableEmailCreateBulk) ExecContext

func (c *DisposableEmailCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DisposableEmailCreateBulk) ExecX

func (decb *DisposableEmailCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DisposableEmailCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.DisposableEmail.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.DisposableEmailUpsert) {
		SetDomain(v+v).
	}).
	Exec(ctx)

func (*DisposableEmailCreateBulk) OnConflictColumns

func (decb *DisposableEmailCreateBulk) OnConflictColumns(columns ...string) *DisposableEmailUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.DisposableEmail.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*DisposableEmailCreateBulk) QueryContext

func (c *DisposableEmailCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DisposableEmailCreateBulk) Save

Save creates the DisposableEmail entities in the database.

func (*DisposableEmailCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DisposableEmailDelete

type DisposableEmailDelete struct {
	// contains filtered or unexported fields
}

DisposableEmailDelete is the builder for deleting a DisposableEmail entity.

func (*DisposableEmailDelete) Exec

func (ded *DisposableEmailDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DisposableEmailDelete) ExecContext

func (c *DisposableEmailDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DisposableEmailDelete) ExecX

func (ded *DisposableEmailDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DisposableEmailDelete) QueryContext

func (c *DisposableEmailDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DisposableEmailDelete) Where

Where appends a list predicates to the DisposableEmailDelete builder.

type DisposableEmailDeleteOne

type DisposableEmailDeleteOne struct {
	// contains filtered or unexported fields
}

DisposableEmailDeleteOne is the builder for deleting a single DisposableEmail entity.

func (*DisposableEmailDeleteOne) Exec

Exec executes the deletion query.

func (*DisposableEmailDeleteOne) ExecX

func (dedo *DisposableEmailDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type DisposableEmailGroupBy

type DisposableEmailGroupBy struct {
	// contains filtered or unexported fields
}

DisposableEmailGroupBy is the group-by builder for DisposableEmail entities.

func (*DisposableEmailGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*DisposableEmailGroupBy) Bool

func (s *DisposableEmailGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DisposableEmailGroupBy) BoolX

func (s *DisposableEmailGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DisposableEmailGroupBy) Bools

func (s *DisposableEmailGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DisposableEmailGroupBy) BoolsX

func (s *DisposableEmailGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DisposableEmailGroupBy) Float64

func (s *DisposableEmailGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DisposableEmailGroupBy) Float64X

func (s *DisposableEmailGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DisposableEmailGroupBy) Float64s

func (s *DisposableEmailGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DisposableEmailGroupBy) Float64sX

func (s *DisposableEmailGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DisposableEmailGroupBy) Int

func (s *DisposableEmailGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DisposableEmailGroupBy) IntX

func (s *DisposableEmailGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DisposableEmailGroupBy) Ints

func (s *DisposableEmailGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DisposableEmailGroupBy) IntsX

func (s *DisposableEmailGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DisposableEmailGroupBy) Scan

func (degb *DisposableEmailGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DisposableEmailGroupBy) ScanX

func (s *DisposableEmailGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DisposableEmailGroupBy) String

func (s *DisposableEmailGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DisposableEmailGroupBy) StringX

func (s *DisposableEmailGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DisposableEmailGroupBy) Strings

func (s *DisposableEmailGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DisposableEmailGroupBy) StringsX

func (s *DisposableEmailGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DisposableEmailMutation

type DisposableEmailMutation struct {
	// contains filtered or unexported fields
}

DisposableEmailMutation represents an operation that mutates the DisposableEmail nodes in the graph.

func (*DisposableEmailMutation) AddField

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) AddedEdges

func (m *DisposableEmailMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DisposableEmailMutation) AddedField

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) AddedFields

func (m *DisposableEmailMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DisposableEmailMutation) AddedIDs

func (m *DisposableEmailMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DisposableEmailMutation) ClearEdge

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) ClearField

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) ClearedEdges

func (m *DisposableEmailMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DisposableEmailMutation) ClearedFields

func (m *DisposableEmailMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DisposableEmailMutation) Client

func (m DisposableEmailMutation) 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 (*DisposableEmailMutation) CreatedAt

func (m *DisposableEmailMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DisposableEmailMutation) Domain

func (m *DisposableEmailMutation) Domain() (r string, exists bool)

Domain returns the value of the "domain" field in the mutation.

func (*DisposableEmailMutation) EdgeCleared

func (m *DisposableEmailMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DisposableEmailMutation) ExecContext

func (c *DisposableEmailMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DisposableEmailMutation) Field

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) FieldCleared

func (m *DisposableEmailMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DisposableEmailMutation) Fields

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) ID

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) 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 (*DisposableEmailMutation) OldCreatedAt

func (m *DisposableEmailMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DisposableEmail entity. If the DisposableEmail 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 (*DisposableEmailMutation) OldDomain

func (m *DisposableEmailMutation) OldDomain(ctx context.Context) (v string, err error)

OldDomain returns the old "domain" field's value of the DisposableEmail entity. If the DisposableEmail 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 (*DisposableEmailMutation) OldField

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) OldUpdatedAt

func (m *DisposableEmailMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DisposableEmail entity. If the DisposableEmail 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 (*DisposableEmailMutation) Op

func (m *DisposableEmailMutation) Op() Op

Op returns the operation name.

func (*DisposableEmailMutation) QueryContext

func (c *DisposableEmailMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DisposableEmailMutation) RemovedEdges

func (m *DisposableEmailMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DisposableEmailMutation) RemovedIDs

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) ResetCreatedAt

func (m *DisposableEmailMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DisposableEmailMutation) ResetDomain

func (m *DisposableEmailMutation) ResetDomain()

ResetDomain resets all changes to the "domain" field.

func (*DisposableEmailMutation) ResetEdge

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) ResetField

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) ResetUpdatedAt

func (m *DisposableEmailMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DisposableEmailMutation) SetCreatedAt

func (m *DisposableEmailMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DisposableEmailMutation) SetDomain

func (m *DisposableEmailMutation) SetDomain(s string)

SetDomain sets the "domain" field.

func (*DisposableEmailMutation) SetField

func (m *DisposableEmailMutation) 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 (*DisposableEmailMutation) SetID

func (m *DisposableEmailMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of DisposableEmail entities.

func (*DisposableEmailMutation) SetOp

func (m *DisposableEmailMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DisposableEmailMutation) SetUpdatedAt

func (m *DisposableEmailMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (DisposableEmailMutation) Tx

func (m DisposableEmailMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DisposableEmailMutation) Type

func (m *DisposableEmailMutation) Type() string

Type returns the node type of this mutation (DisposableEmail).

func (*DisposableEmailMutation) UpdatedAt

func (m *DisposableEmailMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DisposableEmailMutation) Where

Where appends a list predicates to the DisposableEmailMutation builder.

func (*DisposableEmailMutation) WhereP

func (m *DisposableEmailMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the DisposableEmailMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type DisposableEmailQuery

type DisposableEmailQuery struct {
	// contains filtered or unexported fields
}

DisposableEmailQuery is the builder for querying DisposableEmail entities.

func (*DisposableEmailQuery) Aggregate

Aggregate returns a DisposableEmailSelect configured with the given aggregations.

func (*DisposableEmailQuery) All

All executes the query and returns a list of DisposableEmails.

func (*DisposableEmailQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DisposableEmailQuery) Clone

Clone returns a duplicate of the DisposableEmailQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DisposableEmailQuery) Count

func (deq *DisposableEmailQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DisposableEmailQuery) CountX

func (deq *DisposableEmailQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DisposableEmailQuery) ExecContext

func (c *DisposableEmailQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DisposableEmailQuery) Exist

func (deq *DisposableEmailQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DisposableEmailQuery) ExistX

func (deq *DisposableEmailQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DisposableEmailQuery) First

First returns the first DisposableEmail entity from the query. Returns a *NotFoundError when no DisposableEmail was found.

func (*DisposableEmailQuery) FirstID

func (deq *DisposableEmailQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first DisposableEmail ID from the query. Returns a *NotFoundError when no DisposableEmail ID was found.

func (*DisposableEmailQuery) FirstIDX

func (deq *DisposableEmailQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*DisposableEmailQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*DisposableEmailQuery) GroupBy

func (deq *DisposableEmailQuery) GroupBy(field string, fields ...string) *DisposableEmailGroupBy

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 {
	Domain string `json:"domain,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DisposableEmail.Query().
	GroupBy(disposableemail.FieldDomain).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DisposableEmailQuery) IDs

func (deq *DisposableEmailQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of DisposableEmail IDs.

func (*DisposableEmailQuery) IDsX

func (deq *DisposableEmailQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*DisposableEmailQuery) Limit

func (deq *DisposableEmailQuery) Limit(limit int) *DisposableEmailQuery

Limit the number of records to be returned by this query.

func (*DisposableEmailQuery) Modify

func (deq *DisposableEmailQuery) Modify(modifiers ...func(s *sql.Selector)) *DisposableEmailSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*DisposableEmailQuery) Offset

func (deq *DisposableEmailQuery) Offset(offset int) *DisposableEmailQuery

Offset to start from.

func (*DisposableEmailQuery) Only

Only returns a single DisposableEmail entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DisposableEmail entity is found. Returns a *NotFoundError when no DisposableEmail entities are found.

func (*DisposableEmailQuery) OnlyID

func (deq *DisposableEmailQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only DisposableEmail ID in the query. Returns a *NotSingularError when more than one DisposableEmail ID is found. Returns a *NotFoundError when no entities are found.

func (*DisposableEmailQuery) OnlyIDX

func (deq *DisposableEmailQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DisposableEmailQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DisposableEmailQuery) Order

Order specifies how the records should be ordered.

func (*DisposableEmailQuery) QueryContext

func (c *DisposableEmailQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DisposableEmailQuery) Select

func (deq *DisposableEmailQuery) Select(fields ...string) *DisposableEmailSelect

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 {
	Domain string `json:"domain,omitempty"`
}

client.DisposableEmail.Query().
	Select(disposableemail.FieldDomain).
	Scan(ctx, &v)

func (*DisposableEmailQuery) Unique

func (deq *DisposableEmailQuery) Unique(unique bool) *DisposableEmailQuery

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 (*DisposableEmailQuery) Where

Where adds a new predicate for the DisposableEmailQuery builder.

type DisposableEmailSelect

type DisposableEmailSelect struct {
	*DisposableEmailQuery
	// contains filtered or unexported fields
}

DisposableEmailSelect is the builder for selecting fields of DisposableEmail entities.

func (*DisposableEmailSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*DisposableEmailSelect) Bool

func (s *DisposableEmailSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DisposableEmailSelect) BoolX

func (s *DisposableEmailSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DisposableEmailSelect) Bools

func (s *DisposableEmailSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DisposableEmailSelect) BoolsX

func (s *DisposableEmailSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (DisposableEmailSelect) ExecContext

func (c DisposableEmailSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DisposableEmailSelect) Float64

func (s *DisposableEmailSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DisposableEmailSelect) Float64X

func (s *DisposableEmailSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DisposableEmailSelect) Float64s

func (s *DisposableEmailSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DisposableEmailSelect) Float64sX

func (s *DisposableEmailSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DisposableEmailSelect) Int

func (s *DisposableEmailSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DisposableEmailSelect) IntX

func (s *DisposableEmailSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DisposableEmailSelect) Ints

func (s *DisposableEmailSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DisposableEmailSelect) IntsX

func (s *DisposableEmailSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DisposableEmailSelect) Modify

func (des *DisposableEmailSelect) Modify(modifiers ...func(s *sql.Selector)) *DisposableEmailSelect

Modify adds a query modifier for attaching custom logic to queries.

func (DisposableEmailSelect) QueryContext

func (c DisposableEmailSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DisposableEmailSelect) Scan

func (des *DisposableEmailSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*DisposableEmailSelect) ScanX

func (s *DisposableEmailSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DisposableEmailSelect) String

func (s *DisposableEmailSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DisposableEmailSelect) StringX

func (s *DisposableEmailSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DisposableEmailSelect) Strings

func (s *DisposableEmailSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DisposableEmailSelect) StringsX

func (s *DisposableEmailSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DisposableEmailUpdate

type DisposableEmailUpdate struct {
	// contains filtered or unexported fields
}

DisposableEmailUpdate is the builder for updating DisposableEmail entities.

func (*DisposableEmailUpdate) Exec

func (deu *DisposableEmailUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DisposableEmailUpdate) ExecContext

func (c *DisposableEmailUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DisposableEmailUpdate) ExecX

func (deu *DisposableEmailUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DisposableEmailUpdate) Modify

func (deu *DisposableEmailUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DisposableEmailUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DisposableEmailUpdate) Mutation

Mutation returns the DisposableEmailMutation object of the builder.

func (*DisposableEmailUpdate) QueryContext

func (c *DisposableEmailUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DisposableEmailUpdate) Save

func (deu *DisposableEmailUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DisposableEmailUpdate) SaveX

func (deu *DisposableEmailUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DisposableEmailUpdate) SetDomain

SetDomain sets the "domain" field.

func (*DisposableEmailUpdate) SetUpdatedAt

func (deu *DisposableEmailUpdate) SetUpdatedAt(t time.Time) *DisposableEmailUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DisposableEmailUpdate) Where

Where appends a list predicates to the DisposableEmailUpdate builder.

type DisposableEmailUpdateOne

type DisposableEmailUpdateOne struct {
	// contains filtered or unexported fields
}

DisposableEmailUpdateOne is the builder for updating a single DisposableEmail entity.

func (*DisposableEmailUpdateOne) Exec

Exec executes the query on the entity.

func (*DisposableEmailUpdateOne) ExecContext

func (c *DisposableEmailUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DisposableEmailUpdateOne) ExecX

func (deuo *DisposableEmailUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DisposableEmailUpdateOne) Modify

func (deuo *DisposableEmailUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DisposableEmailUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*DisposableEmailUpdateOne) Mutation

Mutation returns the DisposableEmailMutation object of the builder.

func (*DisposableEmailUpdateOne) QueryContext

func (c *DisposableEmailUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DisposableEmailUpdateOne) Save

Save executes the query and returns the updated DisposableEmail entity.

func (*DisposableEmailUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DisposableEmailUpdateOne) Select

func (deuo *DisposableEmailUpdateOne) Select(field string, fields ...string) *DisposableEmailUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DisposableEmailUpdateOne) SetDomain

SetDomain sets the "domain" field.

func (*DisposableEmailUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type DisposableEmailUpsert

type DisposableEmailUpsert struct {
	*sql.UpdateSet
}

DisposableEmailUpsert is the "OnConflict" setter.

func (*DisposableEmailUpsert) SetDomain

SetDomain sets the "domain" field.

func (*DisposableEmailUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DisposableEmailUpsert) UpdateDomain

func (u *DisposableEmailUpsert) UpdateDomain() *DisposableEmailUpsert

UpdateDomain sets the "domain" field to the value that was provided on create.

func (*DisposableEmailUpsert) UpdateUpdatedAt

func (u *DisposableEmailUpsert) UpdateUpdatedAt() *DisposableEmailUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DisposableEmailUpsertBulk

type DisposableEmailUpsertBulk struct {
	// contains filtered or unexported fields
}

DisposableEmailUpsertBulk is the builder for "upsert"-ing a bulk of DisposableEmail nodes.

func (*DisposableEmailUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DisposableEmailUpsertBulk) Exec

Exec executes the query.

func (*DisposableEmailUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DisposableEmailUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DisposableEmail.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*DisposableEmailUpsertBulk) SetDomain

SetDomain sets the "domain" field.

func (*DisposableEmailUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DisposableEmailUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the DisposableEmailCreateBulk.OnConflict documentation for more info.

func (*DisposableEmailUpsertBulk) UpdateDomain

UpdateDomain sets the "domain" field to the value that was provided on create.

func (*DisposableEmailUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.DisposableEmail.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(disposableemail.FieldID)
		}),
	).
	Exec(ctx)

func (*DisposableEmailUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DisposableEmailUpsertOne

type DisposableEmailUpsertOne struct {
	// contains filtered or unexported fields
}

DisposableEmailUpsertOne is the builder for "upsert"-ing

one DisposableEmail node.

func (*DisposableEmailUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*DisposableEmailUpsertOne) Exec

Exec executes the query.

func (*DisposableEmailUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DisposableEmailUpsertOne) ID

func (u *DisposableEmailUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*DisposableEmailUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*DisposableEmailUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.DisposableEmail.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*DisposableEmailUpsertOne) SetDomain

SetDomain sets the "domain" field.

func (*DisposableEmailUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DisposableEmailUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the DisposableEmailCreate.OnConflict documentation for more info.

func (*DisposableEmailUpsertOne) UpdateDomain

UpdateDomain sets the "domain" field to the value that was provided on create.

func (*DisposableEmailUpsertOne) UpdateNewValues

func (u *DisposableEmailUpsertOne) UpdateNewValues() *DisposableEmailUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.DisposableEmail.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(disposableemail.FieldID)
		}),
	).
	Exec(ctx)

func (*DisposableEmailUpsertOne) UpdateUpdatedAt

func (u *DisposableEmailUpsertOne) UpdateUpdatedAt() *DisposableEmailUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type DisposableEmails

type DisposableEmails []*DisposableEmail

DisposableEmails is a parsable slice of DisposableEmail.

type Generation

type Generation struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Width holds the value of the "width" field.
	Width int32 `json:"width,omitempty"`
	// Height holds the value of the "height" field.
	Height int32 `json:"height,omitempty"`
	// InferenceSteps holds the value of the "inference_steps" field.
	InferenceSteps int32 `json:"inference_steps,omitempty"`
	// GuidanceScale holds the value of the "guidance_scale" field.
	GuidanceScale float32 `json:"guidance_scale,omitempty"`
	// NumOutputs holds the value of the "num_outputs" field.
	NumOutputs int32 `json:"num_outputs,omitempty"`
	// NsfwCount holds the value of the "nsfw_count" field.
	NsfwCount int32 `json:"nsfw_count,omitempty"`
	// Seed holds the value of the "seed" field.
	Seed int `json:"seed,omitempty"`
	// Status holds the value of the "status" field.
	Status generation.Status `json:"status,omitempty"`
	// FailureReason holds the value of the "failure_reason" field.
	FailureReason *string `json:"failure_reason,omitempty"`
	// CountryCode holds the value of the "country_code" field.
	CountryCode *string `json:"country_code,omitempty"`
	// InitImageURL holds the value of the "init_image_url" field.
	InitImageURL *string `json:"init_image_url,omitempty"`
	// MaskImageURL holds the value of the "mask_image_url" field.
	MaskImageURL *string `json:"mask_image_url,omitempty"`
	// PromptStrength holds the value of the "prompt_strength" field.
	PromptStrength *float32 `json:"prompt_strength,omitempty"`
	// WasAutoSubmitted holds the value of the "was_auto_submitted" field.
	WasAutoSubmitted bool `json:"was_auto_submitted,omitempty"`
	// StripeProductID holds the value of the "stripe_product_id" field.
	StripeProductID *string `json:"stripe_product_id,omitempty"`
	// SourceType holds the value of the "source_type" field.
	SourceType enttypes.SourceType `json:"source_type,omitempty"`
	// PromptID holds the value of the "prompt_id" field.
	PromptID *uuid.UUID `json:"prompt_id,omitempty"`
	// NegativePromptID holds the value of the "negative_prompt_id" field.
	NegativePromptID *uuid.UUID `json:"negative_prompt_id,omitempty"`
	// ModelID holds the value of the "model_id" field.
	ModelID uuid.UUID `json:"model_id,omitempty"`
	// SchedulerID holds the value of the "scheduler_id" field.
	SchedulerID uuid.UUID `json:"scheduler_id,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// DeviceInfoID holds the value of the "device_info_id" field.
	DeviceInfoID uuid.UUID `json:"device_info_id,omitempty"`
	// APITokenID holds the value of the "api_token_id" field.
	APITokenID *uuid.UUID `json:"api_token_id,omitempty"`
	// StartedAt holds the value of the "started_at" field.
	StartedAt *time.Time `json:"started_at,omitempty"`
	// CompletedAt holds the value of the "completed_at" field.
	CompletedAt *time.Time `json:"completed_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GenerationQuery when eager-loading is set.
	Edges GenerationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Generation is the model entity for the Generation schema.

func (*Generation) ExecContext

func (c *Generation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Generation) QueryAPITokens

func (ge *Generation) QueryAPITokens() *ApiTokenQuery

QueryAPITokens queries the "api_tokens" edge of the Generation entity.

func (*Generation) QueryContext

func (c *Generation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Generation) QueryDeviceInfo

func (ge *Generation) QueryDeviceInfo() *DeviceInfoQuery

QueryDeviceInfo queries the "device_info" edge of the Generation entity.

func (*Generation) QueryGenerationModel

func (ge *Generation) QueryGenerationModel() *GenerationModelQuery

QueryGenerationModel queries the "generation_model" edge of the Generation entity.

func (*Generation) QueryGenerationOutputs

func (ge *Generation) QueryGenerationOutputs() *GenerationOutputQuery

QueryGenerationOutputs queries the "generation_outputs" edge of the Generation entity.

func (*Generation) QueryNegativePrompt

func (ge *Generation) QueryNegativePrompt() *NegativePromptQuery

QueryNegativePrompt queries the "negative_prompt" edge of the Generation entity.

func (*Generation) QueryPrompt

func (ge *Generation) QueryPrompt() *PromptQuery

QueryPrompt queries the "prompt" edge of the Generation entity.

func (*Generation) QueryScheduler

func (ge *Generation) QueryScheduler() *SchedulerQuery

QueryScheduler queries the "scheduler" edge of the Generation entity.

func (*Generation) QueryUser

func (ge *Generation) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Generation entity.

func (*Generation) String

func (ge *Generation) String() string

String implements the fmt.Stringer.

func (*Generation) Unwrap

func (ge *Generation) Unwrap() *Generation

Unwrap unwraps the Generation 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 (*Generation) Update

func (ge *Generation) Update() *GenerationUpdateOne

Update returns a builder for updating this Generation. Note that you need to call Generation.Unwrap() before calling this method if this Generation was returned from a transaction, and the transaction was committed or rolled back.

type GenerationClient

type GenerationClient struct {
	// contains filtered or unexported fields
}

GenerationClient is a client for the Generation schema.

func NewGenerationClient

func NewGenerationClient(c config) *GenerationClient

NewGenerationClient returns a client for the Generation from the given config.

func (*GenerationClient) Create

func (c *GenerationClient) Create() *GenerationCreate

Create returns a builder for creating a Generation entity.

func (*GenerationClient) CreateBulk

func (c *GenerationClient) CreateBulk(builders ...*GenerationCreate) *GenerationCreateBulk

CreateBulk returns a builder for creating a bulk of Generation entities.

func (*GenerationClient) Delete

func (c *GenerationClient) Delete() *GenerationDelete

Delete returns a delete builder for Generation.

func (*GenerationClient) DeleteOne

func (c *GenerationClient) DeleteOne(ge *Generation) *GenerationDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GenerationClient) DeleteOneID

func (c *GenerationClient) DeleteOneID(id uuid.UUID) *GenerationDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*GenerationClient) ExecContext

func (c *GenerationClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationClient) Get

Get returns a Generation entity by its id.

func (*GenerationClient) GetX

func (c *GenerationClient) GetX(ctx context.Context, id uuid.UUID) *Generation

GetX is like Get, but panics if an error occurs.

func (*GenerationClient) Hooks

func (c *GenerationClient) Hooks() []Hook

Hooks returns the client hooks.

func (*GenerationClient) Intercept

func (c *GenerationClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `generation.Intercept(f(g(h())))`.

func (*GenerationClient) Interceptors

func (c *GenerationClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*GenerationClient) Query

func (c *GenerationClient) Query() *GenerationQuery

Query returns a query builder for Generation.

func (*GenerationClient) QueryAPITokens

func (c *GenerationClient) QueryAPITokens(ge *Generation) *ApiTokenQuery

QueryAPITokens queries the api_tokens edge of a Generation.

func (*GenerationClient) QueryContext

func (c *GenerationClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationClient) QueryDeviceInfo

func (c *GenerationClient) QueryDeviceInfo(ge *Generation) *DeviceInfoQuery

QueryDeviceInfo queries the device_info edge of a Generation.

func (*GenerationClient) QueryGenerationModel

func (c *GenerationClient) QueryGenerationModel(ge *Generation) *GenerationModelQuery

QueryGenerationModel queries the generation_model edge of a Generation.

func (*GenerationClient) QueryGenerationOutputs

func (c *GenerationClient) QueryGenerationOutputs(ge *Generation) *GenerationOutputQuery

QueryGenerationOutputs queries the generation_outputs edge of a Generation.

func (*GenerationClient) QueryNegativePrompt

func (c *GenerationClient) QueryNegativePrompt(ge *Generation) *NegativePromptQuery

QueryNegativePrompt queries the negative_prompt edge of a Generation.

func (*GenerationClient) QueryPrompt

func (c *GenerationClient) QueryPrompt(ge *Generation) *PromptQuery

QueryPrompt queries the prompt edge of a Generation.

func (*GenerationClient) QueryScheduler

func (c *GenerationClient) QueryScheduler(ge *Generation) *SchedulerQuery

QueryScheduler queries the scheduler edge of a Generation.

func (*GenerationClient) QueryUser

func (c *GenerationClient) QueryUser(ge *Generation) *UserQuery

QueryUser queries the user edge of a Generation.

func (*GenerationClient) Update

func (c *GenerationClient) Update() *GenerationUpdate

Update returns an update builder for Generation.

func (*GenerationClient) UpdateOne

func (c *GenerationClient) UpdateOne(ge *Generation) *GenerationUpdateOne

UpdateOne returns an update builder for the given entity.

func (*GenerationClient) UpdateOneID

func (c *GenerationClient) UpdateOneID(id uuid.UUID) *GenerationUpdateOne

UpdateOneID returns an update builder for the given id.

func (*GenerationClient) Use

func (c *GenerationClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `generation.Hooks(f(g(h())))`.

type GenerationCreate

type GenerationCreate struct {
	// contains filtered or unexported fields
}

GenerationCreate is the builder for creating a Generation entity.

func (*GenerationCreate) AddGenerationOutputIDs

func (gc *GenerationCreate) AddGenerationOutputIDs(ids ...uuid.UUID) *GenerationCreate

AddGenerationOutputIDs adds the "generation_outputs" edge to the GenerationOutput entity by IDs.

func (*GenerationCreate) AddGenerationOutputs

func (gc *GenerationCreate) AddGenerationOutputs(g ...*GenerationOutput) *GenerationCreate

AddGenerationOutputs adds the "generation_outputs" edges to the GenerationOutput entity.

func (*GenerationCreate) Exec

func (gc *GenerationCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GenerationCreate) ExecContext

func (c *GenerationCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationCreate) ExecX

func (gc *GenerationCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationCreate) Mutation

func (gc *GenerationCreate) Mutation() *GenerationMutation

Mutation returns the GenerationMutation object of the builder.

func (*GenerationCreate) OnConflict

func (gc *GenerationCreate) OnConflict(opts ...sql.ConflictOption) *GenerationUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Generation.Create().
	SetWidth(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.GenerationUpsert) {
		SetWidth(v+v).
	}).
	Exec(ctx)

func (*GenerationCreate) OnConflictColumns

func (gc *GenerationCreate) OnConflictColumns(columns ...string) *GenerationUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Generation.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GenerationCreate) QueryContext

func (c *GenerationCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationCreate) Save

func (gc *GenerationCreate) Save(ctx context.Context) (*Generation, error)

Save creates the Generation in the database.

func (*GenerationCreate) SaveX

func (gc *GenerationCreate) SaveX(ctx context.Context) *Generation

SaveX calls Save and panics if Save returns an error.

func (*GenerationCreate) SetAPITokenID

func (gc *GenerationCreate) SetAPITokenID(u uuid.UUID) *GenerationCreate

SetAPITokenID sets the "api_token_id" field.

func (*GenerationCreate) SetAPITokens

func (gc *GenerationCreate) SetAPITokens(a *ApiToken) *GenerationCreate

SetAPITokens sets the "api_tokens" edge to the ApiToken entity.

func (*GenerationCreate) SetAPITokensID

func (gc *GenerationCreate) SetAPITokensID(id uuid.UUID) *GenerationCreate

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID.

func (*GenerationCreate) SetCompletedAt

func (gc *GenerationCreate) SetCompletedAt(t time.Time) *GenerationCreate

SetCompletedAt sets the "completed_at" field.

func (*GenerationCreate) SetCountryCode

func (gc *GenerationCreate) SetCountryCode(s string) *GenerationCreate

SetCountryCode sets the "country_code" field.

func (*GenerationCreate) SetCreatedAt

func (gc *GenerationCreate) SetCreatedAt(t time.Time) *GenerationCreate

SetCreatedAt sets the "created_at" field.

func (*GenerationCreate) SetDeviceInfo

func (gc *GenerationCreate) SetDeviceInfo(d *DeviceInfo) *GenerationCreate

SetDeviceInfo sets the "device_info" edge to the DeviceInfo entity.

func (*GenerationCreate) SetDeviceInfoID

func (gc *GenerationCreate) SetDeviceInfoID(u uuid.UUID) *GenerationCreate

SetDeviceInfoID sets the "device_info_id" field.

func (*GenerationCreate) SetFailureReason

func (gc *GenerationCreate) SetFailureReason(s string) *GenerationCreate

SetFailureReason sets the "failure_reason" field.

func (*GenerationCreate) SetGenerationModel

func (gc *GenerationCreate) SetGenerationModel(g *GenerationModel) *GenerationCreate

SetGenerationModel sets the "generation_model" edge to the GenerationModel entity.

func (*GenerationCreate) SetGenerationModelID

func (gc *GenerationCreate) SetGenerationModelID(id uuid.UUID) *GenerationCreate

SetGenerationModelID sets the "generation_model" edge to the GenerationModel entity by ID.

func (*GenerationCreate) SetGuidanceScale

func (gc *GenerationCreate) SetGuidanceScale(f float32) *GenerationCreate

SetGuidanceScale sets the "guidance_scale" field.

func (*GenerationCreate) SetHeight

func (gc *GenerationCreate) SetHeight(i int32) *GenerationCreate

SetHeight sets the "height" field.

func (*GenerationCreate) SetID

SetID sets the "id" field.

func (*GenerationCreate) SetInferenceSteps

func (gc *GenerationCreate) SetInferenceSteps(i int32) *GenerationCreate

SetInferenceSteps sets the "inference_steps" field.

func (*GenerationCreate) SetInitImageURL

func (gc *GenerationCreate) SetInitImageURL(s string) *GenerationCreate

SetInitImageURL sets the "init_image_url" field.

func (*GenerationCreate) SetMaskImageURL

func (gc *GenerationCreate) SetMaskImageURL(s string) *GenerationCreate

SetMaskImageURL sets the "mask_image_url" field.

func (*GenerationCreate) SetModelID

func (gc *GenerationCreate) SetModelID(u uuid.UUID) *GenerationCreate

SetModelID sets the "model_id" field.

func (*GenerationCreate) SetNegativePrompt

func (gc *GenerationCreate) SetNegativePrompt(n *NegativePrompt) *GenerationCreate

SetNegativePrompt sets the "negative_prompt" edge to the NegativePrompt entity.

func (*GenerationCreate) SetNegativePromptID

func (gc *GenerationCreate) SetNegativePromptID(u uuid.UUID) *GenerationCreate

SetNegativePromptID sets the "negative_prompt_id" field.

func (*GenerationCreate) SetNillableAPITokenID

func (gc *GenerationCreate) SetNillableAPITokenID(u *uuid.UUID) *GenerationCreate

SetNillableAPITokenID sets the "api_token_id" field if the given value is not nil.

func (*GenerationCreate) SetNillableAPITokensID

func (gc *GenerationCreate) SetNillableAPITokensID(id *uuid.UUID) *GenerationCreate

SetNillableAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID if the given value is not nil.

func (*GenerationCreate) SetNillableCompletedAt

func (gc *GenerationCreate) SetNillableCompletedAt(t *time.Time) *GenerationCreate

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*GenerationCreate) SetNillableCountryCode

func (gc *GenerationCreate) SetNillableCountryCode(s *string) *GenerationCreate

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*GenerationCreate) SetNillableCreatedAt

func (gc *GenerationCreate) SetNillableCreatedAt(t *time.Time) *GenerationCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*GenerationCreate) SetNillableFailureReason

func (gc *GenerationCreate) SetNillableFailureReason(s *string) *GenerationCreate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*GenerationCreate) SetNillableID

func (gc *GenerationCreate) SetNillableID(u *uuid.UUID) *GenerationCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*GenerationCreate) SetNillableInitImageURL

func (gc *GenerationCreate) SetNillableInitImageURL(s *string) *GenerationCreate

SetNillableInitImageURL sets the "init_image_url" field if the given value is not nil.

func (*GenerationCreate) SetNillableMaskImageURL

func (gc *GenerationCreate) SetNillableMaskImageURL(s *string) *GenerationCreate

SetNillableMaskImageURL sets the "mask_image_url" field if the given value is not nil.

func (*GenerationCreate) SetNillableNegativePromptID

func (gc *GenerationCreate) SetNillableNegativePromptID(u *uuid.UUID) *GenerationCreate

SetNillableNegativePromptID sets the "negative_prompt_id" field if the given value is not nil.

func (*GenerationCreate) SetNillableNsfwCount

func (gc *GenerationCreate) SetNillableNsfwCount(i *int32) *GenerationCreate

SetNillableNsfwCount sets the "nsfw_count" field if the given value is not nil.

func (*GenerationCreate) SetNillablePromptID

func (gc *GenerationCreate) SetNillablePromptID(u *uuid.UUID) *GenerationCreate

SetNillablePromptID sets the "prompt_id" field if the given value is not nil.

func (*GenerationCreate) SetNillablePromptStrength

func (gc *GenerationCreate) SetNillablePromptStrength(f *float32) *GenerationCreate

SetNillablePromptStrength sets the "prompt_strength" field if the given value is not nil.

func (*GenerationCreate) SetNillableSourceType

func (gc *GenerationCreate) SetNillableSourceType(et *enttypes.SourceType) *GenerationCreate

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*GenerationCreate) SetNillableStartedAt

func (gc *GenerationCreate) SetNillableStartedAt(t *time.Time) *GenerationCreate

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*GenerationCreate) SetNillableStripeProductID

func (gc *GenerationCreate) SetNillableStripeProductID(s *string) *GenerationCreate

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*GenerationCreate) SetNillableUpdatedAt

func (gc *GenerationCreate) SetNillableUpdatedAt(t *time.Time) *GenerationCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*GenerationCreate) SetNillableWasAutoSubmitted

func (gc *GenerationCreate) SetNillableWasAutoSubmitted(b *bool) *GenerationCreate

SetNillableWasAutoSubmitted sets the "was_auto_submitted" field if the given value is not nil.

func (*GenerationCreate) SetNsfwCount

func (gc *GenerationCreate) SetNsfwCount(i int32) *GenerationCreate

SetNsfwCount sets the "nsfw_count" field.

func (*GenerationCreate) SetNumOutputs

func (gc *GenerationCreate) SetNumOutputs(i int32) *GenerationCreate

SetNumOutputs sets the "num_outputs" field.

func (*GenerationCreate) SetPrompt

func (gc *GenerationCreate) SetPrompt(p *Prompt) *GenerationCreate

SetPrompt sets the "prompt" edge to the Prompt entity.

func (*GenerationCreate) SetPromptID

func (gc *GenerationCreate) SetPromptID(u uuid.UUID) *GenerationCreate

SetPromptID sets the "prompt_id" field.

func (*GenerationCreate) SetPromptStrength

func (gc *GenerationCreate) SetPromptStrength(f float32) *GenerationCreate

SetPromptStrength sets the "prompt_strength" field.

func (*GenerationCreate) SetScheduler

func (gc *GenerationCreate) SetScheduler(s *Scheduler) *GenerationCreate

SetScheduler sets the "scheduler" edge to the Scheduler entity.

func (*GenerationCreate) SetSchedulerID

func (gc *GenerationCreate) SetSchedulerID(u uuid.UUID) *GenerationCreate

SetSchedulerID sets the "scheduler_id" field.

func (*GenerationCreate) SetSeed

func (gc *GenerationCreate) SetSeed(i int) *GenerationCreate

SetSeed sets the "seed" field.

func (*GenerationCreate) SetSourceType

func (gc *GenerationCreate) SetSourceType(et enttypes.SourceType) *GenerationCreate

SetSourceType sets the "source_type" field.

func (*GenerationCreate) SetStartedAt

func (gc *GenerationCreate) SetStartedAt(t time.Time) *GenerationCreate

SetStartedAt sets the "started_at" field.

func (*GenerationCreate) SetStatus

SetStatus sets the "status" field.

func (*GenerationCreate) SetStripeProductID

func (gc *GenerationCreate) SetStripeProductID(s string) *GenerationCreate

SetStripeProductID sets the "stripe_product_id" field.

func (*GenerationCreate) SetUpdatedAt

func (gc *GenerationCreate) SetUpdatedAt(t time.Time) *GenerationCreate

SetUpdatedAt sets the "updated_at" field.

func (*GenerationCreate) SetUser

func (gc *GenerationCreate) SetUser(u *User) *GenerationCreate

SetUser sets the "user" edge to the User entity.

func (*GenerationCreate) SetUserID

func (gc *GenerationCreate) SetUserID(u uuid.UUID) *GenerationCreate

SetUserID sets the "user_id" field.

func (*GenerationCreate) SetWasAutoSubmitted

func (gc *GenerationCreate) SetWasAutoSubmitted(b bool) *GenerationCreate

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*GenerationCreate) SetWidth

func (gc *GenerationCreate) SetWidth(i int32) *GenerationCreate

SetWidth sets the "width" field.

type GenerationCreateBulk

type GenerationCreateBulk struct {
	// contains filtered or unexported fields
}

GenerationCreateBulk is the builder for creating many Generation entities in bulk.

func (*GenerationCreateBulk) Exec

func (gcb *GenerationCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*GenerationCreateBulk) ExecContext

func (c *GenerationCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationCreateBulk) ExecX

func (gcb *GenerationCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationCreateBulk) OnConflict

func (gcb *GenerationCreateBulk) OnConflict(opts ...sql.ConflictOption) *GenerationUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Generation.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.GenerationUpsert) {
		SetWidth(v+v).
	}).
	Exec(ctx)

func (*GenerationCreateBulk) OnConflictColumns

func (gcb *GenerationCreateBulk) OnConflictColumns(columns ...string) *GenerationUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Generation.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GenerationCreateBulk) QueryContext

func (c *GenerationCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationCreateBulk) Save

func (gcb *GenerationCreateBulk) Save(ctx context.Context) ([]*Generation, error)

Save creates the Generation entities in the database.

func (*GenerationCreateBulk) SaveX

func (gcb *GenerationCreateBulk) SaveX(ctx context.Context) []*Generation

SaveX is like Save, but panics if an error occurs.

type GenerationDelete

type GenerationDelete struct {
	// contains filtered or unexported fields
}

GenerationDelete is the builder for deleting a Generation entity.

func (*GenerationDelete) Exec

func (gd *GenerationDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*GenerationDelete) ExecContext

func (c *GenerationDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationDelete) ExecX

func (gd *GenerationDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*GenerationDelete) QueryContext

func (c *GenerationDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationDelete) Where

Where appends a list predicates to the GenerationDelete builder.

type GenerationDeleteOne

type GenerationDeleteOne struct {
	// contains filtered or unexported fields
}

GenerationDeleteOne is the builder for deleting a single Generation entity.

func (*GenerationDeleteOne) Exec

func (gdo *GenerationDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*GenerationDeleteOne) ExecX

func (gdo *GenerationDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type GenerationEdges

type GenerationEdges struct {
	// DeviceInfo holds the value of the device_info edge.
	DeviceInfo *DeviceInfo `json:"device_info,omitempty"`
	// Scheduler holds the value of the scheduler edge.
	Scheduler *Scheduler `json:"scheduler,omitempty"`
	// Prompt holds the value of the prompt edge.
	Prompt *Prompt `json:"prompt,omitempty"`
	// NegativePrompt holds the value of the negative_prompt edge.
	NegativePrompt *NegativePrompt `json:"negative_prompt,omitempty"`
	// GenerationModel holds the value of the generation_model edge.
	GenerationModel *GenerationModel `json:"generation_model,omitempty"`
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// APITokens holds the value of the api_tokens edge.
	APITokens *ApiToken `json:"api_tokens,omitempty"`
	// GenerationOutputs holds the value of the generation_outputs edge.
	GenerationOutputs []*GenerationOutput `json:"generation_outputs,omitempty"`
	// contains filtered or unexported fields
}

GenerationEdges holds the relations/edges for other nodes in the graph.

func (GenerationEdges) APITokensOrErr

func (e GenerationEdges) APITokensOrErr() (*ApiToken, error)

APITokensOrErr returns the APITokens value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (GenerationEdges) DeviceInfoOrErr

func (e GenerationEdges) DeviceInfoOrErr() (*DeviceInfo, error)

DeviceInfoOrErr returns the DeviceInfo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (GenerationEdges) GenerationModelOrErr

func (e GenerationEdges) GenerationModelOrErr() (*GenerationModel, error)

GenerationModelOrErr returns the GenerationModel value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (GenerationEdges) GenerationOutputsOrErr

func (e GenerationEdges) GenerationOutputsOrErr() ([]*GenerationOutput, error)

GenerationOutputsOrErr returns the GenerationOutputs value or an error if the edge was not loaded in eager-loading.

func (GenerationEdges) NegativePromptOrErr

func (e GenerationEdges) NegativePromptOrErr() (*NegativePrompt, error)

NegativePromptOrErr returns the NegativePrompt value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (GenerationEdges) PromptOrErr

func (e GenerationEdges) PromptOrErr() (*Prompt, error)

PromptOrErr returns the Prompt value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (GenerationEdges) SchedulerOrErr

func (e GenerationEdges) SchedulerOrErr() (*Scheduler, error)

SchedulerOrErr returns the Scheduler value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (GenerationEdges) UserOrErr

func (e GenerationEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type GenerationGroupBy

type GenerationGroupBy struct {
	// contains filtered or unexported fields
}

GenerationGroupBy is the group-by builder for Generation entities.

func (*GenerationGroupBy) Aggregate

func (ggb *GenerationGroupBy) Aggregate(fns ...AggregateFunc) *GenerationGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*GenerationGroupBy) Bool

func (s *GenerationGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GenerationGroupBy) BoolX

func (s *GenerationGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GenerationGroupBy) Bools

func (s *GenerationGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GenerationGroupBy) BoolsX

func (s *GenerationGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GenerationGroupBy) Float64

func (s *GenerationGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GenerationGroupBy) Float64X

func (s *GenerationGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GenerationGroupBy) Float64s

func (s *GenerationGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GenerationGroupBy) Float64sX

func (s *GenerationGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GenerationGroupBy) Int

func (s *GenerationGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GenerationGroupBy) IntX

func (s *GenerationGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GenerationGroupBy) Ints

func (s *GenerationGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GenerationGroupBy) IntsX

func (s *GenerationGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GenerationGroupBy) Scan

func (ggb *GenerationGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*GenerationGroupBy) ScanX

func (s *GenerationGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GenerationGroupBy) String

func (s *GenerationGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GenerationGroupBy) StringX

func (s *GenerationGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GenerationGroupBy) Strings

func (s *GenerationGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GenerationGroupBy) StringsX

func (s *GenerationGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GenerationModel

type GenerationModel struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// NameInWorker holds the value of the "name_in_worker" field.
	NameInWorker string `json:"name_in_worker,omitempty"`
	// IsActive holds the value of the "is_active" field.
	IsActive bool `json:"is_active,omitempty"`
	// IsDefault holds the value of the "is_default" field.
	IsDefault bool `json:"is_default,omitempty"`
	// IsHidden holds the value of the "is_hidden" field.
	IsHidden bool `json:"is_hidden,omitempty"`
	// DisplayWeight holds the value of the "display_weight" field.
	DisplayWeight int32 `json:"display_weight,omitempty"`
	// DefaultSchedulerID holds the value of the "default_scheduler_id" field.
	DefaultSchedulerID *uuid.UUID `json:"default_scheduler_id,omitempty"`
	// DefaultWidth holds the value of the "default_width" field.
	DefaultWidth int32 `json:"default_width,omitempty"`
	// DefaultHeight holds the value of the "default_height" field.
	DefaultHeight int32 `json:"default_height,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GenerationModelQuery when eager-loading is set.
	Edges GenerationModelEdges `json:"edges"`
	// contains filtered or unexported fields
}

GenerationModel is the model entity for the GenerationModel schema.

func (*GenerationModel) ExecContext

func (c *GenerationModel) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationModel) QueryContext

func (c *GenerationModel) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationModel) QueryGenerations

func (gm *GenerationModel) QueryGenerations() *GenerationQuery

QueryGenerations queries the "generations" edge of the GenerationModel entity.

func (*GenerationModel) QuerySchedulers

func (gm *GenerationModel) QuerySchedulers() *SchedulerQuery

QuerySchedulers queries the "schedulers" edge of the GenerationModel entity.

func (*GenerationModel) String

func (gm *GenerationModel) String() string

String implements the fmt.Stringer.

func (*GenerationModel) Unwrap

func (gm *GenerationModel) Unwrap() *GenerationModel

Unwrap unwraps the GenerationModel 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 (*GenerationModel) Update

Update returns a builder for updating this GenerationModel. Note that you need to call GenerationModel.Unwrap() before calling this method if this GenerationModel was returned from a transaction, and the transaction was committed or rolled back.

type GenerationModelClient

type GenerationModelClient struct {
	// contains filtered or unexported fields
}

GenerationModelClient is a client for the GenerationModel schema.

func NewGenerationModelClient

func NewGenerationModelClient(c config) *GenerationModelClient

NewGenerationModelClient returns a client for the GenerationModel from the given config.

func (*GenerationModelClient) Create

Create returns a builder for creating a GenerationModel entity.

func (*GenerationModelClient) CreateBulk

CreateBulk returns a builder for creating a bulk of GenerationModel entities.

func (*GenerationModelClient) Delete

Delete returns a delete builder for GenerationModel.

func (*GenerationModelClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GenerationModelClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*GenerationModelClient) ExecContext

func (c *GenerationModelClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationModelClient) Get

Get returns a GenerationModel entity by its id.

func (*GenerationModelClient) GetX

GetX is like Get, but panics if an error occurs.

func (*GenerationModelClient) Hooks

func (c *GenerationModelClient) Hooks() []Hook

Hooks returns the client hooks.

func (*GenerationModelClient) Intercept

func (c *GenerationModelClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `generationmodel.Intercept(f(g(h())))`.

func (*GenerationModelClient) Interceptors

func (c *GenerationModelClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*GenerationModelClient) Query

Query returns a query builder for GenerationModel.

func (*GenerationModelClient) QueryContext

func (c *GenerationModelClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationModelClient) QueryGenerations

func (c *GenerationModelClient) QueryGenerations(gm *GenerationModel) *GenerationQuery

QueryGenerations queries the generations edge of a GenerationModel.

func (*GenerationModelClient) QuerySchedulers

func (c *GenerationModelClient) QuerySchedulers(gm *GenerationModel) *SchedulerQuery

QuerySchedulers queries the schedulers edge of a GenerationModel.

func (*GenerationModelClient) Update

Update returns an update builder for GenerationModel.

func (*GenerationModelClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*GenerationModelClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*GenerationModelClient) Use

func (c *GenerationModelClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `generationmodel.Hooks(f(g(h())))`.

type GenerationModelCreate

type GenerationModelCreate struct {
	// contains filtered or unexported fields
}

GenerationModelCreate is the builder for creating a GenerationModel entity.

func (*GenerationModelCreate) AddGenerationIDs

func (gmc *GenerationModelCreate) AddGenerationIDs(ids ...uuid.UUID) *GenerationModelCreate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*GenerationModelCreate) AddGenerations

func (gmc *GenerationModelCreate) AddGenerations(g ...*Generation) *GenerationModelCreate

AddGenerations adds the "generations" edges to the Generation entity.

func (*GenerationModelCreate) AddSchedulerIDs

func (gmc *GenerationModelCreate) AddSchedulerIDs(ids ...uuid.UUID) *GenerationModelCreate

AddSchedulerIDs adds the "schedulers" edge to the Scheduler entity by IDs.

func (*GenerationModelCreate) AddSchedulers

func (gmc *GenerationModelCreate) AddSchedulers(s ...*Scheduler) *GenerationModelCreate

AddSchedulers adds the "schedulers" edges to the Scheduler entity.

func (*GenerationModelCreate) Exec

func (gmc *GenerationModelCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*GenerationModelCreate) ExecContext

func (c *GenerationModelCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationModelCreate) ExecX

func (gmc *GenerationModelCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationModelCreate) Mutation

Mutation returns the GenerationModelMutation object of the builder.

func (*GenerationModelCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GenerationModel.Create().
	SetNameInWorker(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.GenerationModelUpsert) {
		SetNameInWorker(v+v).
	}).
	Exec(ctx)

func (*GenerationModelCreate) OnConflictColumns

func (gmc *GenerationModelCreate) OnConflictColumns(columns ...string) *GenerationModelUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GenerationModel.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GenerationModelCreate) QueryContext

func (c *GenerationModelCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationModelCreate) Save

Save creates the GenerationModel in the database.

func (*GenerationModelCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*GenerationModelCreate) SetCreatedAt

func (gmc *GenerationModelCreate) SetCreatedAt(t time.Time) *GenerationModelCreate

SetCreatedAt sets the "created_at" field.

func (*GenerationModelCreate) SetDefaultHeight

func (gmc *GenerationModelCreate) SetDefaultHeight(i int32) *GenerationModelCreate

SetDefaultHeight sets the "default_height" field.

func (*GenerationModelCreate) SetDefaultSchedulerID

func (gmc *GenerationModelCreate) SetDefaultSchedulerID(u uuid.UUID) *GenerationModelCreate

SetDefaultSchedulerID sets the "default_scheduler_id" field.

func (*GenerationModelCreate) SetDefaultWidth

func (gmc *GenerationModelCreate) SetDefaultWidth(i int32) *GenerationModelCreate

SetDefaultWidth sets the "default_width" field.

func (*GenerationModelCreate) SetDisplayWeight

func (gmc *GenerationModelCreate) SetDisplayWeight(i int32) *GenerationModelCreate

SetDisplayWeight sets the "display_weight" field.

func (*GenerationModelCreate) SetID

SetID sets the "id" field.

func (*GenerationModelCreate) SetIsActive

func (gmc *GenerationModelCreate) SetIsActive(b bool) *GenerationModelCreate

SetIsActive sets the "is_active" field.

func (*GenerationModelCreate) SetIsDefault

func (gmc *GenerationModelCreate) SetIsDefault(b bool) *GenerationModelCreate

SetIsDefault sets the "is_default" field.

func (*GenerationModelCreate) SetIsHidden

func (gmc *GenerationModelCreate) SetIsHidden(b bool) *GenerationModelCreate

SetIsHidden sets the "is_hidden" field.

func (*GenerationModelCreate) SetNameInWorker

func (gmc *GenerationModelCreate) SetNameInWorker(s string) *GenerationModelCreate

SetNameInWorker sets the "name_in_worker" field.

func (*GenerationModelCreate) SetNillableCreatedAt

func (gmc *GenerationModelCreate) SetNillableCreatedAt(t *time.Time) *GenerationModelCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*GenerationModelCreate) SetNillableDefaultHeight

func (gmc *GenerationModelCreate) SetNillableDefaultHeight(i *int32) *GenerationModelCreate

SetNillableDefaultHeight sets the "default_height" field if the given value is not nil.

func (*GenerationModelCreate) SetNillableDefaultSchedulerID

func (gmc *GenerationModelCreate) SetNillableDefaultSchedulerID(u *uuid.UUID) *GenerationModelCreate

SetNillableDefaultSchedulerID sets the "default_scheduler_id" field if the given value is not nil.

func (*GenerationModelCreate) SetNillableDefaultWidth

func (gmc *GenerationModelCreate) SetNillableDefaultWidth(i *int32) *GenerationModelCreate

SetNillableDefaultWidth sets the "default_width" field if the given value is not nil.

func (*GenerationModelCreate) SetNillableDisplayWeight

func (gmc *GenerationModelCreate) SetNillableDisplayWeight(i *int32) *GenerationModelCreate

SetNillableDisplayWeight sets the "display_weight" field if the given value is not nil.

func (*GenerationModelCreate) SetNillableID

func (gmc *GenerationModelCreate) SetNillableID(u *uuid.UUID) *GenerationModelCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*GenerationModelCreate) SetNillableIsActive

func (gmc *GenerationModelCreate) SetNillableIsActive(b *bool) *GenerationModelCreate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*GenerationModelCreate) SetNillableIsDefault

func (gmc *GenerationModelCreate) SetNillableIsDefault(b *bool) *GenerationModelCreate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*GenerationModelCreate) SetNillableIsHidden

func (gmc *GenerationModelCreate) SetNillableIsHidden(b *bool) *GenerationModelCreate

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*GenerationModelCreate) SetNillableUpdatedAt

func (gmc *GenerationModelCreate) SetNillableUpdatedAt(t *time.Time) *GenerationModelCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*GenerationModelCreate) SetUpdatedAt

func (gmc *GenerationModelCreate) SetUpdatedAt(t time.Time) *GenerationModelCreate

SetUpdatedAt sets the "updated_at" field.

type GenerationModelCreateBulk

type GenerationModelCreateBulk struct {
	// contains filtered or unexported fields
}

GenerationModelCreateBulk is the builder for creating many GenerationModel entities in bulk.

func (*GenerationModelCreateBulk) Exec

Exec executes the query.

func (*GenerationModelCreateBulk) ExecContext

func (c *GenerationModelCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationModelCreateBulk) ExecX

func (gmcb *GenerationModelCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationModelCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GenerationModel.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.GenerationModelUpsert) {
		SetNameInWorker(v+v).
	}).
	Exec(ctx)

func (*GenerationModelCreateBulk) OnConflictColumns

func (gmcb *GenerationModelCreateBulk) OnConflictColumns(columns ...string) *GenerationModelUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GenerationModel.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GenerationModelCreateBulk) QueryContext

func (c *GenerationModelCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationModelCreateBulk) Save

Save creates the GenerationModel entities in the database.

func (*GenerationModelCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type GenerationModelDelete

type GenerationModelDelete struct {
	// contains filtered or unexported fields
}

GenerationModelDelete is the builder for deleting a GenerationModel entity.

func (*GenerationModelDelete) Exec

func (gmd *GenerationModelDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*GenerationModelDelete) ExecContext

func (c *GenerationModelDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationModelDelete) ExecX

func (gmd *GenerationModelDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*GenerationModelDelete) QueryContext

func (c *GenerationModelDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationModelDelete) Where

Where appends a list predicates to the GenerationModelDelete builder.

type GenerationModelDeleteOne

type GenerationModelDeleteOne struct {
	// contains filtered or unexported fields
}

GenerationModelDeleteOne is the builder for deleting a single GenerationModel entity.

func (*GenerationModelDeleteOne) Exec

Exec executes the deletion query.

func (*GenerationModelDeleteOne) ExecX

func (gmdo *GenerationModelDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type GenerationModelEdges

type GenerationModelEdges struct {
	// Generations holds the value of the generations edge.
	Generations []*Generation `json:"generations,omitempty"`
	// Schedulers holds the value of the schedulers edge.
	Schedulers []*Scheduler `json:"schedulers,omitempty"`
	// contains filtered or unexported fields
}

GenerationModelEdges holds the relations/edges for other nodes in the graph.

func (GenerationModelEdges) GenerationsOrErr

func (e GenerationModelEdges) GenerationsOrErr() ([]*Generation, error)

GenerationsOrErr returns the Generations value or an error if the edge was not loaded in eager-loading.

func (GenerationModelEdges) SchedulersOrErr

func (e GenerationModelEdges) SchedulersOrErr() ([]*Scheduler, error)

SchedulersOrErr returns the Schedulers value or an error if the edge was not loaded in eager-loading.

type GenerationModelGroupBy

type GenerationModelGroupBy struct {
	// contains filtered or unexported fields
}

GenerationModelGroupBy is the group-by builder for GenerationModel entities.

func (*GenerationModelGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*GenerationModelGroupBy) Bool

func (s *GenerationModelGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GenerationModelGroupBy) BoolX

func (s *GenerationModelGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GenerationModelGroupBy) Bools

func (s *GenerationModelGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GenerationModelGroupBy) BoolsX

func (s *GenerationModelGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GenerationModelGroupBy) Float64

func (s *GenerationModelGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GenerationModelGroupBy) Float64X

func (s *GenerationModelGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GenerationModelGroupBy) Float64s

func (s *GenerationModelGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GenerationModelGroupBy) Float64sX

func (s *GenerationModelGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GenerationModelGroupBy) Int

func (s *GenerationModelGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GenerationModelGroupBy) IntX

func (s *GenerationModelGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GenerationModelGroupBy) Ints

func (s *GenerationModelGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GenerationModelGroupBy) IntsX

func (s *GenerationModelGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GenerationModelGroupBy) Scan

func (gmgb *GenerationModelGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*GenerationModelGroupBy) ScanX

func (s *GenerationModelGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GenerationModelGroupBy) String

func (s *GenerationModelGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GenerationModelGroupBy) StringX

func (s *GenerationModelGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GenerationModelGroupBy) Strings

func (s *GenerationModelGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GenerationModelGroupBy) StringsX

func (s *GenerationModelGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GenerationModelMutation

type GenerationModelMutation struct {
	// contains filtered or unexported fields
}

GenerationModelMutation represents an operation that mutates the GenerationModel nodes in the graph.

func (*GenerationModelMutation) AddDefaultHeight

func (m *GenerationModelMutation) AddDefaultHeight(i int32)

AddDefaultHeight adds i to the "default_height" field.

func (*GenerationModelMutation) AddDefaultWidth

func (m *GenerationModelMutation) AddDefaultWidth(i int32)

AddDefaultWidth adds i to the "default_width" field.

func (*GenerationModelMutation) AddDisplayWeight

func (m *GenerationModelMutation) AddDisplayWeight(i int32)

AddDisplayWeight adds i to the "display_weight" field.

func (*GenerationModelMutation) AddField

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) AddGenerationIDs

func (m *GenerationModelMutation) AddGenerationIDs(ids ...uuid.UUID)

AddGenerationIDs adds the "generations" edge to the Generation entity by ids.

func (*GenerationModelMutation) AddSchedulerIDs

func (m *GenerationModelMutation) AddSchedulerIDs(ids ...uuid.UUID)

AddSchedulerIDs adds the "schedulers" edge to the Scheduler entity by ids.

func (*GenerationModelMutation) AddedDefaultHeight

func (m *GenerationModelMutation) AddedDefaultHeight() (r int32, exists bool)

AddedDefaultHeight returns the value that was added to the "default_height" field in this mutation.

func (*GenerationModelMutation) AddedDefaultWidth

func (m *GenerationModelMutation) AddedDefaultWidth() (r int32, exists bool)

AddedDefaultWidth returns the value that was added to the "default_width" field in this mutation.

func (*GenerationModelMutation) AddedDisplayWeight

func (m *GenerationModelMutation) AddedDisplayWeight() (r int32, exists bool)

AddedDisplayWeight returns the value that was added to the "display_weight" field in this mutation.

func (*GenerationModelMutation) AddedEdges

func (m *GenerationModelMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*GenerationModelMutation) AddedField

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) AddedFields

func (m *GenerationModelMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*GenerationModelMutation) AddedIDs

func (m *GenerationModelMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*GenerationModelMutation) ClearDefaultSchedulerID

func (m *GenerationModelMutation) ClearDefaultSchedulerID()

ClearDefaultSchedulerID clears the value of the "default_scheduler_id" field.

func (*GenerationModelMutation) ClearEdge

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) ClearField

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) ClearGenerations

func (m *GenerationModelMutation) ClearGenerations()

ClearGenerations clears the "generations" edge to the Generation entity.

func (*GenerationModelMutation) ClearSchedulers

func (m *GenerationModelMutation) ClearSchedulers()

ClearSchedulers clears the "schedulers" edge to the Scheduler entity.

func (*GenerationModelMutation) ClearedEdges

func (m *GenerationModelMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*GenerationModelMutation) ClearedFields

func (m *GenerationModelMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (GenerationModelMutation) Client

func (m GenerationModelMutation) 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 (*GenerationModelMutation) CreatedAt

func (m *GenerationModelMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*GenerationModelMutation) DefaultHeight

func (m *GenerationModelMutation) DefaultHeight() (r int32, exists bool)

DefaultHeight returns the value of the "default_height" field in the mutation.

func (*GenerationModelMutation) DefaultSchedulerID

func (m *GenerationModelMutation) DefaultSchedulerID() (r uuid.UUID, exists bool)

DefaultSchedulerID returns the value of the "default_scheduler_id" field in the mutation.

func (*GenerationModelMutation) DefaultSchedulerIDCleared

func (m *GenerationModelMutation) DefaultSchedulerIDCleared() bool

DefaultSchedulerIDCleared returns if the "default_scheduler_id" field was cleared in this mutation.

func (*GenerationModelMutation) DefaultWidth

func (m *GenerationModelMutation) DefaultWidth() (r int32, exists bool)

DefaultWidth returns the value of the "default_width" field in the mutation.

func (*GenerationModelMutation) DisplayWeight

func (m *GenerationModelMutation) DisplayWeight() (r int32, exists bool)

DisplayWeight returns the value of the "display_weight" field in the mutation.

func (*GenerationModelMutation) EdgeCleared

func (m *GenerationModelMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*GenerationModelMutation) ExecContext

func (c *GenerationModelMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationModelMutation) Field

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) FieldCleared

func (m *GenerationModelMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*GenerationModelMutation) Fields

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) GenerationsCleared

func (m *GenerationModelMutation) GenerationsCleared() bool

GenerationsCleared reports if the "generations" edge to the Generation entity was cleared.

func (*GenerationModelMutation) GenerationsIDs

func (m *GenerationModelMutation) GenerationsIDs() (ids []uuid.UUID)

GenerationsIDs returns the "generations" edge IDs in the mutation.

func (*GenerationModelMutation) ID

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) 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 (*GenerationModelMutation) IsActive

func (m *GenerationModelMutation) IsActive() (r bool, exists bool)

IsActive returns the value of the "is_active" field in the mutation.

func (*GenerationModelMutation) IsDefault

func (m *GenerationModelMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "is_default" field in the mutation.

func (*GenerationModelMutation) IsHidden

func (m *GenerationModelMutation) IsHidden() (r bool, exists bool)

IsHidden returns the value of the "is_hidden" field in the mutation.

func (*GenerationModelMutation) NameInWorker

func (m *GenerationModelMutation) NameInWorker() (r string, exists bool)

NameInWorker returns the value of the "name_in_worker" field in the mutation.

func (*GenerationModelMutation) OldCreatedAt

func (m *GenerationModelMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the GenerationModel entity. If the GenerationModel 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 (*GenerationModelMutation) OldDefaultHeight

func (m *GenerationModelMutation) OldDefaultHeight(ctx context.Context) (v int32, err error)

OldDefaultHeight returns the old "default_height" field's value of the GenerationModel entity. If the GenerationModel 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 (*GenerationModelMutation) OldDefaultSchedulerID

func (m *GenerationModelMutation) OldDefaultSchedulerID(ctx context.Context) (v *uuid.UUID, err error)

OldDefaultSchedulerID returns the old "default_scheduler_id" field's value of the GenerationModel entity. If the GenerationModel 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 (*GenerationModelMutation) OldDefaultWidth

func (m *GenerationModelMutation) OldDefaultWidth(ctx context.Context) (v int32, err error)

OldDefaultWidth returns the old "default_width" field's value of the GenerationModel entity. If the GenerationModel 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 (*GenerationModelMutation) OldDisplayWeight

func (m *GenerationModelMutation) OldDisplayWeight(ctx context.Context) (v int32, err error)

OldDisplayWeight returns the old "display_weight" field's value of the GenerationModel entity. If the GenerationModel 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 (*GenerationModelMutation) OldField

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) OldIsActive

func (m *GenerationModelMutation) OldIsActive(ctx context.Context) (v bool, err error)

OldIsActive returns the old "is_active" field's value of the GenerationModel entity. If the GenerationModel 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 (*GenerationModelMutation) OldIsDefault

func (m *GenerationModelMutation) OldIsDefault(ctx context.Context) (v bool, err error)

OldIsDefault returns the old "is_default" field's value of the GenerationModel entity. If the GenerationModel 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 (*GenerationModelMutation) OldIsHidden

func (m *GenerationModelMutation) OldIsHidden(ctx context.Context) (v bool, err error)

OldIsHidden returns the old "is_hidden" field's value of the GenerationModel entity. If the GenerationModel 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 (*GenerationModelMutation) OldNameInWorker

func (m *GenerationModelMutation) OldNameInWorker(ctx context.Context) (v string, err error)

OldNameInWorker returns the old "name_in_worker" field's value of the GenerationModel entity. If the GenerationModel 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 (*GenerationModelMutation) OldUpdatedAt

func (m *GenerationModelMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the GenerationModel entity. If the GenerationModel 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 (*GenerationModelMutation) Op

func (m *GenerationModelMutation) Op() Op

Op returns the operation name.

func (*GenerationModelMutation) QueryContext

func (c *GenerationModelMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationModelMutation) RemoveGenerationIDs

func (m *GenerationModelMutation) RemoveGenerationIDs(ids ...uuid.UUID)

RemoveGenerationIDs removes the "generations" edge to the Generation entity by IDs.

func (*GenerationModelMutation) RemoveSchedulerIDs

func (m *GenerationModelMutation) RemoveSchedulerIDs(ids ...uuid.UUID)

RemoveSchedulerIDs removes the "schedulers" edge to the Scheduler entity by IDs.

func (*GenerationModelMutation) RemovedEdges

func (m *GenerationModelMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*GenerationModelMutation) RemovedGenerationsIDs

func (m *GenerationModelMutation) RemovedGenerationsIDs() (ids []uuid.UUID)

RemovedGenerations returns the removed IDs of the "generations" edge to the Generation entity.

func (*GenerationModelMutation) RemovedIDs

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) RemovedSchedulersIDs

func (m *GenerationModelMutation) RemovedSchedulersIDs() (ids []uuid.UUID)

RemovedSchedulers returns the removed IDs of the "schedulers" edge to the Scheduler entity.

func (*GenerationModelMutation) ResetCreatedAt

func (m *GenerationModelMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*GenerationModelMutation) ResetDefaultHeight

func (m *GenerationModelMutation) ResetDefaultHeight()

ResetDefaultHeight resets all changes to the "default_height" field.

func (*GenerationModelMutation) ResetDefaultSchedulerID

func (m *GenerationModelMutation) ResetDefaultSchedulerID()

ResetDefaultSchedulerID resets all changes to the "default_scheduler_id" field.

func (*GenerationModelMutation) ResetDefaultWidth

func (m *GenerationModelMutation) ResetDefaultWidth()

ResetDefaultWidth resets all changes to the "default_width" field.

func (*GenerationModelMutation) ResetDisplayWeight

func (m *GenerationModelMutation) ResetDisplayWeight()

ResetDisplayWeight resets all changes to the "display_weight" field.

func (*GenerationModelMutation) ResetEdge

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) ResetField

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) ResetGenerations

func (m *GenerationModelMutation) ResetGenerations()

ResetGenerations resets all changes to the "generations" edge.

func (*GenerationModelMutation) ResetIsActive

func (m *GenerationModelMutation) ResetIsActive()

ResetIsActive resets all changes to the "is_active" field.

func (*GenerationModelMutation) ResetIsDefault

func (m *GenerationModelMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "is_default" field.

func (*GenerationModelMutation) ResetIsHidden

func (m *GenerationModelMutation) ResetIsHidden()

ResetIsHidden resets all changes to the "is_hidden" field.

func (*GenerationModelMutation) ResetNameInWorker

func (m *GenerationModelMutation) ResetNameInWorker()

ResetNameInWorker resets all changes to the "name_in_worker" field.

func (*GenerationModelMutation) ResetSchedulers

func (m *GenerationModelMutation) ResetSchedulers()

ResetSchedulers resets all changes to the "schedulers" edge.

func (*GenerationModelMutation) ResetUpdatedAt

func (m *GenerationModelMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*GenerationModelMutation) SchedulersCleared

func (m *GenerationModelMutation) SchedulersCleared() bool

SchedulersCleared reports if the "schedulers" edge to the Scheduler entity was cleared.

func (*GenerationModelMutation) SchedulersIDs

func (m *GenerationModelMutation) SchedulersIDs() (ids []uuid.UUID)

SchedulersIDs returns the "schedulers" edge IDs in the mutation.

func (*GenerationModelMutation) SetCreatedAt

func (m *GenerationModelMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*GenerationModelMutation) SetDefaultHeight

func (m *GenerationModelMutation) SetDefaultHeight(i int32)

SetDefaultHeight sets the "default_height" field.

func (*GenerationModelMutation) SetDefaultSchedulerID

func (m *GenerationModelMutation) SetDefaultSchedulerID(u uuid.UUID)

SetDefaultSchedulerID sets the "default_scheduler_id" field.

func (*GenerationModelMutation) SetDefaultWidth

func (m *GenerationModelMutation) SetDefaultWidth(i int32)

SetDefaultWidth sets the "default_width" field.

func (*GenerationModelMutation) SetDisplayWeight

func (m *GenerationModelMutation) SetDisplayWeight(i int32)

SetDisplayWeight sets the "display_weight" field.

func (*GenerationModelMutation) SetField

func (m *GenerationModelMutation) 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 (*GenerationModelMutation) SetID

func (m *GenerationModelMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of GenerationModel entities.

func (*GenerationModelMutation) SetIsActive

func (m *GenerationModelMutation) SetIsActive(b bool)

SetIsActive sets the "is_active" field.

func (*GenerationModelMutation) SetIsDefault

func (m *GenerationModelMutation) SetIsDefault(b bool)

SetIsDefault sets the "is_default" field.

func (*GenerationModelMutation) SetIsHidden

func (m *GenerationModelMutation) SetIsHidden(b bool)

SetIsHidden sets the "is_hidden" field.

func (*GenerationModelMutation) SetNameInWorker

func (m *GenerationModelMutation) SetNameInWorker(s string)

SetNameInWorker sets the "name_in_worker" field.

func (*GenerationModelMutation) SetOp

func (m *GenerationModelMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GenerationModelMutation) SetUpdatedAt

func (m *GenerationModelMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (GenerationModelMutation) Tx

func (m GenerationModelMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*GenerationModelMutation) Type

func (m *GenerationModelMutation) Type() string

Type returns the node type of this mutation (GenerationModel).

func (*GenerationModelMutation) UpdatedAt

func (m *GenerationModelMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*GenerationModelMutation) Where

Where appends a list predicates to the GenerationModelMutation builder.

func (*GenerationModelMutation) WhereP

func (m *GenerationModelMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the GenerationModelMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type GenerationModelQuery

type GenerationModelQuery struct {
	// contains filtered or unexported fields
}

GenerationModelQuery is the builder for querying GenerationModel entities.

func (*GenerationModelQuery) Aggregate

Aggregate returns a GenerationModelSelect configured with the given aggregations.

func (*GenerationModelQuery) All

All executes the query and returns a list of GenerationModels.

func (*GenerationModelQuery) AllX

AllX is like All, but panics if an error occurs.

func (*GenerationModelQuery) Clone

Clone returns a duplicate of the GenerationModelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*GenerationModelQuery) Count

func (gmq *GenerationModelQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GenerationModelQuery) CountX

func (gmq *GenerationModelQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*GenerationModelQuery) ExecContext

func (c *GenerationModelQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationModelQuery) Exist

func (gmq *GenerationModelQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*GenerationModelQuery) ExistX

func (gmq *GenerationModelQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*GenerationModelQuery) First

First returns the first GenerationModel entity from the query. Returns a *NotFoundError when no GenerationModel was found.

func (*GenerationModelQuery) FirstID

func (gmq *GenerationModelQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first GenerationModel ID from the query. Returns a *NotFoundError when no GenerationModel ID was found.

func (*GenerationModelQuery) FirstIDX

func (gmq *GenerationModelQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*GenerationModelQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*GenerationModelQuery) GroupBy

func (gmq *GenerationModelQuery) GroupBy(field string, fields ...string) *GenerationModelGroupBy

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 {
	NameInWorker string `json:"name_in_worker,omitempty"`
	Count int `json:"count,omitempty"`
}

client.GenerationModel.Query().
	GroupBy(generationmodel.FieldNameInWorker).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GenerationModelQuery) IDs

func (gmq *GenerationModelQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of GenerationModel IDs.

func (*GenerationModelQuery) IDsX

func (gmq *GenerationModelQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*GenerationModelQuery) Limit

func (gmq *GenerationModelQuery) Limit(limit int) *GenerationModelQuery

Limit the number of records to be returned by this query.

func (*GenerationModelQuery) Modify

func (gmq *GenerationModelQuery) Modify(modifiers ...func(s *sql.Selector)) *GenerationModelSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*GenerationModelQuery) Offset

func (gmq *GenerationModelQuery) Offset(offset int) *GenerationModelQuery

Offset to start from.

func (*GenerationModelQuery) Only

Only returns a single GenerationModel entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GenerationModel entity is found. Returns a *NotFoundError when no GenerationModel entities are found.

func (*GenerationModelQuery) OnlyID

func (gmq *GenerationModelQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only GenerationModel ID in the query. Returns a *NotSingularError when more than one GenerationModel ID is found. Returns a *NotFoundError when no entities are found.

func (*GenerationModelQuery) OnlyIDX

func (gmq *GenerationModelQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*GenerationModelQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*GenerationModelQuery) Order

Order specifies how the records should be ordered.

func (*GenerationModelQuery) QueryContext

func (c *GenerationModelQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationModelQuery) QueryGenerations

func (gmq *GenerationModelQuery) QueryGenerations() *GenerationQuery

QueryGenerations chains the current query on the "generations" edge.

func (*GenerationModelQuery) QuerySchedulers

func (gmq *GenerationModelQuery) QuerySchedulers() *SchedulerQuery

QuerySchedulers chains the current query on the "schedulers" edge.

func (*GenerationModelQuery) Select

func (gmq *GenerationModelQuery) Select(fields ...string) *GenerationModelSelect

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 {
	NameInWorker string `json:"name_in_worker,omitempty"`
}

client.GenerationModel.Query().
	Select(generationmodel.FieldNameInWorker).
	Scan(ctx, &v)

func (*GenerationModelQuery) Unique

func (gmq *GenerationModelQuery) Unique(unique bool) *GenerationModelQuery

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 (*GenerationModelQuery) Where

Where adds a new predicate for the GenerationModelQuery builder.

func (*GenerationModelQuery) WithGenerations

func (gmq *GenerationModelQuery) WithGenerations(opts ...func(*GenerationQuery)) *GenerationModelQuery

WithGenerations tells the query-builder to eager-load the nodes that are connected to the "generations" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationModelQuery) WithSchedulers

func (gmq *GenerationModelQuery) WithSchedulers(opts ...func(*SchedulerQuery)) *GenerationModelQuery

WithSchedulers tells the query-builder to eager-load the nodes that are connected to the "schedulers" edge. The optional arguments are used to configure the query builder of the edge.

type GenerationModelSelect

type GenerationModelSelect struct {
	*GenerationModelQuery
	// contains filtered or unexported fields
}

GenerationModelSelect is the builder for selecting fields of GenerationModel entities.

func (*GenerationModelSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*GenerationModelSelect) Bool

func (s *GenerationModelSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GenerationModelSelect) BoolX

func (s *GenerationModelSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GenerationModelSelect) Bools

func (s *GenerationModelSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GenerationModelSelect) BoolsX

func (s *GenerationModelSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (GenerationModelSelect) ExecContext

func (c GenerationModelSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationModelSelect) Float64

func (s *GenerationModelSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GenerationModelSelect) Float64X

func (s *GenerationModelSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GenerationModelSelect) Float64s

func (s *GenerationModelSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GenerationModelSelect) Float64sX

func (s *GenerationModelSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GenerationModelSelect) Int

func (s *GenerationModelSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GenerationModelSelect) IntX

func (s *GenerationModelSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GenerationModelSelect) Ints

func (s *GenerationModelSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GenerationModelSelect) IntsX

func (s *GenerationModelSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GenerationModelSelect) Modify

func (gms *GenerationModelSelect) Modify(modifiers ...func(s *sql.Selector)) *GenerationModelSelect

Modify adds a query modifier for attaching custom logic to queries.

func (GenerationModelSelect) QueryContext

func (c GenerationModelSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationModelSelect) Scan

func (gms *GenerationModelSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*GenerationModelSelect) ScanX

func (s *GenerationModelSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GenerationModelSelect) String

func (s *GenerationModelSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GenerationModelSelect) StringX

func (s *GenerationModelSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GenerationModelSelect) Strings

func (s *GenerationModelSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GenerationModelSelect) StringsX

func (s *GenerationModelSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GenerationModelUpdate

type GenerationModelUpdate struct {
	// contains filtered or unexported fields
}

GenerationModelUpdate is the builder for updating GenerationModel entities.

func (*GenerationModelUpdate) AddDefaultHeight

func (gmu *GenerationModelUpdate) AddDefaultHeight(i int32) *GenerationModelUpdate

AddDefaultHeight adds i to the "default_height" field.

func (*GenerationModelUpdate) AddDefaultWidth

func (gmu *GenerationModelUpdate) AddDefaultWidth(i int32) *GenerationModelUpdate

AddDefaultWidth adds i to the "default_width" field.

func (*GenerationModelUpdate) AddDisplayWeight

func (gmu *GenerationModelUpdate) AddDisplayWeight(i int32) *GenerationModelUpdate

AddDisplayWeight adds i to the "display_weight" field.

func (*GenerationModelUpdate) AddGenerationIDs

func (gmu *GenerationModelUpdate) AddGenerationIDs(ids ...uuid.UUID) *GenerationModelUpdate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*GenerationModelUpdate) AddGenerations

func (gmu *GenerationModelUpdate) AddGenerations(g ...*Generation) *GenerationModelUpdate

AddGenerations adds the "generations" edges to the Generation entity.

func (*GenerationModelUpdate) AddSchedulerIDs

func (gmu *GenerationModelUpdate) AddSchedulerIDs(ids ...uuid.UUID) *GenerationModelUpdate

AddSchedulerIDs adds the "schedulers" edge to the Scheduler entity by IDs.

func (*GenerationModelUpdate) AddSchedulers

func (gmu *GenerationModelUpdate) AddSchedulers(s ...*Scheduler) *GenerationModelUpdate

AddSchedulers adds the "schedulers" edges to the Scheduler entity.

func (*GenerationModelUpdate) ClearDefaultSchedulerID

func (gmu *GenerationModelUpdate) ClearDefaultSchedulerID() *GenerationModelUpdate

ClearDefaultSchedulerID clears the value of the "default_scheduler_id" field.

func (*GenerationModelUpdate) ClearGenerations

func (gmu *GenerationModelUpdate) ClearGenerations() *GenerationModelUpdate

ClearGenerations clears all "generations" edges to the Generation entity.

func (*GenerationModelUpdate) ClearSchedulers

func (gmu *GenerationModelUpdate) ClearSchedulers() *GenerationModelUpdate

ClearSchedulers clears all "schedulers" edges to the Scheduler entity.

func (*GenerationModelUpdate) Exec

func (gmu *GenerationModelUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GenerationModelUpdate) ExecContext

func (c *GenerationModelUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationModelUpdate) ExecX

func (gmu *GenerationModelUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationModelUpdate) Modify

func (gmu *GenerationModelUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GenerationModelUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*GenerationModelUpdate) Mutation

Mutation returns the GenerationModelMutation object of the builder.

func (*GenerationModelUpdate) QueryContext

func (c *GenerationModelUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationModelUpdate) RemoveGenerationIDs

func (gmu *GenerationModelUpdate) RemoveGenerationIDs(ids ...uuid.UUID) *GenerationModelUpdate

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*GenerationModelUpdate) RemoveGenerations

func (gmu *GenerationModelUpdate) RemoveGenerations(g ...*Generation) *GenerationModelUpdate

RemoveGenerations removes "generations" edges to Generation entities.

func (*GenerationModelUpdate) RemoveSchedulerIDs

func (gmu *GenerationModelUpdate) RemoveSchedulerIDs(ids ...uuid.UUID) *GenerationModelUpdate

RemoveSchedulerIDs removes the "schedulers" edge to Scheduler entities by IDs.

func (*GenerationModelUpdate) RemoveSchedulers

func (gmu *GenerationModelUpdate) RemoveSchedulers(s ...*Scheduler) *GenerationModelUpdate

RemoveSchedulers removes "schedulers" edges to Scheduler entities.

func (*GenerationModelUpdate) Save

func (gmu *GenerationModelUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*GenerationModelUpdate) SaveX

func (gmu *GenerationModelUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GenerationModelUpdate) SetDefaultHeight

func (gmu *GenerationModelUpdate) SetDefaultHeight(i int32) *GenerationModelUpdate

SetDefaultHeight sets the "default_height" field.

func (*GenerationModelUpdate) SetDefaultSchedulerID

func (gmu *GenerationModelUpdate) SetDefaultSchedulerID(u uuid.UUID) *GenerationModelUpdate

SetDefaultSchedulerID sets the "default_scheduler_id" field.

func (*GenerationModelUpdate) SetDefaultWidth

func (gmu *GenerationModelUpdate) SetDefaultWidth(i int32) *GenerationModelUpdate

SetDefaultWidth sets the "default_width" field.

func (*GenerationModelUpdate) SetDisplayWeight

func (gmu *GenerationModelUpdate) SetDisplayWeight(i int32) *GenerationModelUpdate

SetDisplayWeight sets the "display_weight" field.

func (*GenerationModelUpdate) SetIsActive

func (gmu *GenerationModelUpdate) SetIsActive(b bool) *GenerationModelUpdate

SetIsActive sets the "is_active" field.

func (*GenerationModelUpdate) SetIsDefault

func (gmu *GenerationModelUpdate) SetIsDefault(b bool) *GenerationModelUpdate

SetIsDefault sets the "is_default" field.

func (*GenerationModelUpdate) SetIsHidden

func (gmu *GenerationModelUpdate) SetIsHidden(b bool) *GenerationModelUpdate

SetIsHidden sets the "is_hidden" field.

func (*GenerationModelUpdate) SetNameInWorker

func (gmu *GenerationModelUpdate) SetNameInWorker(s string) *GenerationModelUpdate

SetNameInWorker sets the "name_in_worker" field.

func (*GenerationModelUpdate) SetNillableDefaultHeight

func (gmu *GenerationModelUpdate) SetNillableDefaultHeight(i *int32) *GenerationModelUpdate

SetNillableDefaultHeight sets the "default_height" field if the given value is not nil.

func (*GenerationModelUpdate) SetNillableDefaultSchedulerID

func (gmu *GenerationModelUpdate) SetNillableDefaultSchedulerID(u *uuid.UUID) *GenerationModelUpdate

SetNillableDefaultSchedulerID sets the "default_scheduler_id" field if the given value is not nil.

func (*GenerationModelUpdate) SetNillableDefaultWidth

func (gmu *GenerationModelUpdate) SetNillableDefaultWidth(i *int32) *GenerationModelUpdate

SetNillableDefaultWidth sets the "default_width" field if the given value is not nil.

func (*GenerationModelUpdate) SetNillableDisplayWeight

func (gmu *GenerationModelUpdate) SetNillableDisplayWeight(i *int32) *GenerationModelUpdate

SetNillableDisplayWeight sets the "display_weight" field if the given value is not nil.

func (*GenerationModelUpdate) SetNillableIsActive

func (gmu *GenerationModelUpdate) SetNillableIsActive(b *bool) *GenerationModelUpdate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*GenerationModelUpdate) SetNillableIsDefault

func (gmu *GenerationModelUpdate) SetNillableIsDefault(b *bool) *GenerationModelUpdate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*GenerationModelUpdate) SetNillableIsHidden

func (gmu *GenerationModelUpdate) SetNillableIsHidden(b *bool) *GenerationModelUpdate

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*GenerationModelUpdate) SetUpdatedAt

func (gmu *GenerationModelUpdate) SetUpdatedAt(t time.Time) *GenerationModelUpdate

SetUpdatedAt sets the "updated_at" field.

func (*GenerationModelUpdate) Where

Where appends a list predicates to the GenerationModelUpdate builder.

type GenerationModelUpdateOne

type GenerationModelUpdateOne struct {
	// contains filtered or unexported fields
}

GenerationModelUpdateOne is the builder for updating a single GenerationModel entity.

func (*GenerationModelUpdateOne) AddDefaultHeight

func (gmuo *GenerationModelUpdateOne) AddDefaultHeight(i int32) *GenerationModelUpdateOne

AddDefaultHeight adds i to the "default_height" field.

func (*GenerationModelUpdateOne) AddDefaultWidth

func (gmuo *GenerationModelUpdateOne) AddDefaultWidth(i int32) *GenerationModelUpdateOne

AddDefaultWidth adds i to the "default_width" field.

func (*GenerationModelUpdateOne) AddDisplayWeight

func (gmuo *GenerationModelUpdateOne) AddDisplayWeight(i int32) *GenerationModelUpdateOne

AddDisplayWeight adds i to the "display_weight" field.

func (*GenerationModelUpdateOne) AddGenerationIDs

func (gmuo *GenerationModelUpdateOne) AddGenerationIDs(ids ...uuid.UUID) *GenerationModelUpdateOne

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*GenerationModelUpdateOne) AddGenerations

func (gmuo *GenerationModelUpdateOne) AddGenerations(g ...*Generation) *GenerationModelUpdateOne

AddGenerations adds the "generations" edges to the Generation entity.

func (*GenerationModelUpdateOne) AddSchedulerIDs

func (gmuo *GenerationModelUpdateOne) AddSchedulerIDs(ids ...uuid.UUID) *GenerationModelUpdateOne

AddSchedulerIDs adds the "schedulers" edge to the Scheduler entity by IDs.

func (*GenerationModelUpdateOne) AddSchedulers

func (gmuo *GenerationModelUpdateOne) AddSchedulers(s ...*Scheduler) *GenerationModelUpdateOne

AddSchedulers adds the "schedulers" edges to the Scheduler entity.

func (*GenerationModelUpdateOne) ClearDefaultSchedulerID

func (gmuo *GenerationModelUpdateOne) ClearDefaultSchedulerID() *GenerationModelUpdateOne

ClearDefaultSchedulerID clears the value of the "default_scheduler_id" field.

func (*GenerationModelUpdateOne) ClearGenerations

func (gmuo *GenerationModelUpdateOne) ClearGenerations() *GenerationModelUpdateOne

ClearGenerations clears all "generations" edges to the Generation entity.

func (*GenerationModelUpdateOne) ClearSchedulers

func (gmuo *GenerationModelUpdateOne) ClearSchedulers() *GenerationModelUpdateOne

ClearSchedulers clears all "schedulers" edges to the Scheduler entity.

func (*GenerationModelUpdateOne) Exec

Exec executes the query on the entity.

func (*GenerationModelUpdateOne) ExecContext

func (c *GenerationModelUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationModelUpdateOne) ExecX

func (gmuo *GenerationModelUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationModelUpdateOne) Modify

func (gmuo *GenerationModelUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GenerationModelUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*GenerationModelUpdateOne) Mutation

Mutation returns the GenerationModelMutation object of the builder.

func (*GenerationModelUpdateOne) QueryContext

func (c *GenerationModelUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationModelUpdateOne) RemoveGenerationIDs

func (gmuo *GenerationModelUpdateOne) RemoveGenerationIDs(ids ...uuid.UUID) *GenerationModelUpdateOne

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*GenerationModelUpdateOne) RemoveGenerations

func (gmuo *GenerationModelUpdateOne) RemoveGenerations(g ...*Generation) *GenerationModelUpdateOne

RemoveGenerations removes "generations" edges to Generation entities.

func (*GenerationModelUpdateOne) RemoveSchedulerIDs

func (gmuo *GenerationModelUpdateOne) RemoveSchedulerIDs(ids ...uuid.UUID) *GenerationModelUpdateOne

RemoveSchedulerIDs removes the "schedulers" edge to Scheduler entities by IDs.

func (*GenerationModelUpdateOne) RemoveSchedulers

func (gmuo *GenerationModelUpdateOne) RemoveSchedulers(s ...*Scheduler) *GenerationModelUpdateOne

RemoveSchedulers removes "schedulers" edges to Scheduler entities.

func (*GenerationModelUpdateOne) Save

Save executes the query and returns the updated GenerationModel entity.

func (*GenerationModelUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*GenerationModelUpdateOne) Select

func (gmuo *GenerationModelUpdateOne) Select(field string, fields ...string) *GenerationModelUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*GenerationModelUpdateOne) SetDefaultHeight

func (gmuo *GenerationModelUpdateOne) SetDefaultHeight(i int32) *GenerationModelUpdateOne

SetDefaultHeight sets the "default_height" field.

func (*GenerationModelUpdateOne) SetDefaultSchedulerID

func (gmuo *GenerationModelUpdateOne) SetDefaultSchedulerID(u uuid.UUID) *GenerationModelUpdateOne

SetDefaultSchedulerID sets the "default_scheduler_id" field.

func (*GenerationModelUpdateOne) SetDefaultWidth

func (gmuo *GenerationModelUpdateOne) SetDefaultWidth(i int32) *GenerationModelUpdateOne

SetDefaultWidth sets the "default_width" field.

func (*GenerationModelUpdateOne) SetDisplayWeight

func (gmuo *GenerationModelUpdateOne) SetDisplayWeight(i int32) *GenerationModelUpdateOne

SetDisplayWeight sets the "display_weight" field.

func (*GenerationModelUpdateOne) SetIsActive

SetIsActive sets the "is_active" field.

func (*GenerationModelUpdateOne) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*GenerationModelUpdateOne) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*GenerationModelUpdateOne) SetNameInWorker

func (gmuo *GenerationModelUpdateOne) SetNameInWorker(s string) *GenerationModelUpdateOne

SetNameInWorker sets the "name_in_worker" field.

func (*GenerationModelUpdateOne) SetNillableDefaultHeight

func (gmuo *GenerationModelUpdateOne) SetNillableDefaultHeight(i *int32) *GenerationModelUpdateOne

SetNillableDefaultHeight sets the "default_height" field if the given value is not nil.

func (*GenerationModelUpdateOne) SetNillableDefaultSchedulerID

func (gmuo *GenerationModelUpdateOne) SetNillableDefaultSchedulerID(u *uuid.UUID) *GenerationModelUpdateOne

SetNillableDefaultSchedulerID sets the "default_scheduler_id" field if the given value is not nil.

func (*GenerationModelUpdateOne) SetNillableDefaultWidth

func (gmuo *GenerationModelUpdateOne) SetNillableDefaultWidth(i *int32) *GenerationModelUpdateOne

SetNillableDefaultWidth sets the "default_width" field if the given value is not nil.

func (*GenerationModelUpdateOne) SetNillableDisplayWeight

func (gmuo *GenerationModelUpdateOne) SetNillableDisplayWeight(i *int32) *GenerationModelUpdateOne

SetNillableDisplayWeight sets the "display_weight" field if the given value is not nil.

func (*GenerationModelUpdateOne) SetNillableIsActive

func (gmuo *GenerationModelUpdateOne) SetNillableIsActive(b *bool) *GenerationModelUpdateOne

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*GenerationModelUpdateOne) SetNillableIsDefault

func (gmuo *GenerationModelUpdateOne) SetNillableIsDefault(b *bool) *GenerationModelUpdateOne

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*GenerationModelUpdateOne) SetNillableIsHidden

func (gmuo *GenerationModelUpdateOne) SetNillableIsHidden(b *bool) *GenerationModelUpdateOne

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*GenerationModelUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type GenerationModelUpsert

type GenerationModelUpsert struct {
	*sql.UpdateSet
}

GenerationModelUpsert is the "OnConflict" setter.

func (*GenerationModelUpsert) AddDefaultHeight

func (u *GenerationModelUpsert) AddDefaultHeight(v int32) *GenerationModelUpsert

AddDefaultHeight adds v to the "default_height" field.

func (*GenerationModelUpsert) AddDefaultWidth

func (u *GenerationModelUpsert) AddDefaultWidth(v int32) *GenerationModelUpsert

AddDefaultWidth adds v to the "default_width" field.

func (*GenerationModelUpsert) AddDisplayWeight

func (u *GenerationModelUpsert) AddDisplayWeight(v int32) *GenerationModelUpsert

AddDisplayWeight adds v to the "display_weight" field.

func (*GenerationModelUpsert) ClearDefaultSchedulerID

func (u *GenerationModelUpsert) ClearDefaultSchedulerID() *GenerationModelUpsert

ClearDefaultSchedulerID clears the value of the "default_scheduler_id" field.

func (*GenerationModelUpsert) SetDefaultHeight

func (u *GenerationModelUpsert) SetDefaultHeight(v int32) *GenerationModelUpsert

SetDefaultHeight sets the "default_height" field.

func (*GenerationModelUpsert) SetDefaultSchedulerID

func (u *GenerationModelUpsert) SetDefaultSchedulerID(v uuid.UUID) *GenerationModelUpsert

SetDefaultSchedulerID sets the "default_scheduler_id" field.

func (*GenerationModelUpsert) SetDefaultWidth

func (u *GenerationModelUpsert) SetDefaultWidth(v int32) *GenerationModelUpsert

SetDefaultWidth sets the "default_width" field.

func (*GenerationModelUpsert) SetDisplayWeight

func (u *GenerationModelUpsert) SetDisplayWeight(v int32) *GenerationModelUpsert

SetDisplayWeight sets the "display_weight" field.

func (*GenerationModelUpsert) SetIsActive

SetIsActive sets the "is_active" field.

func (*GenerationModelUpsert) SetIsDefault

func (u *GenerationModelUpsert) SetIsDefault(v bool) *GenerationModelUpsert

SetIsDefault sets the "is_default" field.

func (*GenerationModelUpsert) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*GenerationModelUpsert) SetNameInWorker

func (u *GenerationModelUpsert) SetNameInWorker(v string) *GenerationModelUpsert

SetNameInWorker sets the "name_in_worker" field.

func (*GenerationModelUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*GenerationModelUpsert) UpdateDefaultHeight

func (u *GenerationModelUpsert) UpdateDefaultHeight() *GenerationModelUpsert

UpdateDefaultHeight sets the "default_height" field to the value that was provided on create.

func (*GenerationModelUpsert) UpdateDefaultSchedulerID

func (u *GenerationModelUpsert) UpdateDefaultSchedulerID() *GenerationModelUpsert

UpdateDefaultSchedulerID sets the "default_scheduler_id" field to the value that was provided on create.

func (*GenerationModelUpsert) UpdateDefaultWidth

func (u *GenerationModelUpsert) UpdateDefaultWidth() *GenerationModelUpsert

UpdateDefaultWidth sets the "default_width" field to the value that was provided on create.

func (*GenerationModelUpsert) UpdateDisplayWeight

func (u *GenerationModelUpsert) UpdateDisplayWeight() *GenerationModelUpsert

UpdateDisplayWeight sets the "display_weight" field to the value that was provided on create.

func (*GenerationModelUpsert) UpdateIsActive

func (u *GenerationModelUpsert) UpdateIsActive() *GenerationModelUpsert

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*GenerationModelUpsert) UpdateIsDefault

func (u *GenerationModelUpsert) UpdateIsDefault() *GenerationModelUpsert

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*GenerationModelUpsert) UpdateIsHidden

func (u *GenerationModelUpsert) UpdateIsHidden() *GenerationModelUpsert

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*GenerationModelUpsert) UpdateNameInWorker

func (u *GenerationModelUpsert) UpdateNameInWorker() *GenerationModelUpsert

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*GenerationModelUpsert) UpdateUpdatedAt

func (u *GenerationModelUpsert) UpdateUpdatedAt() *GenerationModelUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type GenerationModelUpsertBulk

type GenerationModelUpsertBulk struct {
	// contains filtered or unexported fields
}

GenerationModelUpsertBulk is the builder for "upsert"-ing a bulk of GenerationModel nodes.

func (*GenerationModelUpsertBulk) AddDefaultHeight

AddDefaultHeight adds v to the "default_height" field.

func (*GenerationModelUpsertBulk) AddDefaultWidth

AddDefaultWidth adds v to the "default_width" field.

func (*GenerationModelUpsertBulk) AddDisplayWeight

AddDisplayWeight adds v to the "display_weight" field.

func (*GenerationModelUpsertBulk) ClearDefaultSchedulerID

func (u *GenerationModelUpsertBulk) ClearDefaultSchedulerID() *GenerationModelUpsertBulk

ClearDefaultSchedulerID clears the value of the "default_scheduler_id" field.

func (*GenerationModelUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GenerationModelUpsertBulk) Exec

Exec executes the query.

func (*GenerationModelUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GenerationModelUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GenerationModel.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GenerationModelUpsertBulk) SetDefaultHeight

SetDefaultHeight sets the "default_height" field.

func (*GenerationModelUpsertBulk) SetDefaultSchedulerID

func (u *GenerationModelUpsertBulk) SetDefaultSchedulerID(v uuid.UUID) *GenerationModelUpsertBulk

SetDefaultSchedulerID sets the "default_scheduler_id" field.

func (*GenerationModelUpsertBulk) SetDefaultWidth

SetDefaultWidth sets the "default_width" field.

func (*GenerationModelUpsertBulk) SetDisplayWeight

SetDisplayWeight sets the "display_weight" field.

func (*GenerationModelUpsertBulk) SetIsActive

SetIsActive sets the "is_active" field.

func (*GenerationModelUpsertBulk) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*GenerationModelUpsertBulk) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*GenerationModelUpsertBulk) SetNameInWorker

SetNameInWorker sets the "name_in_worker" field.

func (*GenerationModelUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*GenerationModelUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the GenerationModelCreateBulk.OnConflict documentation for more info.

func (*GenerationModelUpsertBulk) UpdateDefaultHeight

func (u *GenerationModelUpsertBulk) UpdateDefaultHeight() *GenerationModelUpsertBulk

UpdateDefaultHeight sets the "default_height" field to the value that was provided on create.

func (*GenerationModelUpsertBulk) UpdateDefaultSchedulerID

func (u *GenerationModelUpsertBulk) UpdateDefaultSchedulerID() *GenerationModelUpsertBulk

UpdateDefaultSchedulerID sets the "default_scheduler_id" field to the value that was provided on create.

func (*GenerationModelUpsertBulk) UpdateDefaultWidth

func (u *GenerationModelUpsertBulk) UpdateDefaultWidth() *GenerationModelUpsertBulk

UpdateDefaultWidth sets the "default_width" field to the value that was provided on create.

func (*GenerationModelUpsertBulk) UpdateDisplayWeight

func (u *GenerationModelUpsertBulk) UpdateDisplayWeight() *GenerationModelUpsertBulk

UpdateDisplayWeight sets the "display_weight" field to the value that was provided on create.

func (*GenerationModelUpsertBulk) UpdateIsActive

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*GenerationModelUpsertBulk) UpdateIsDefault

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*GenerationModelUpsertBulk) UpdateIsHidden

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*GenerationModelUpsertBulk) UpdateNameInWorker

func (u *GenerationModelUpsertBulk) UpdateNameInWorker() *GenerationModelUpsertBulk

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*GenerationModelUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GenerationModel.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(generationmodel.FieldID)
		}),
	).
	Exec(ctx)

func (*GenerationModelUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type GenerationModelUpsertOne

type GenerationModelUpsertOne struct {
	// contains filtered or unexported fields
}

GenerationModelUpsertOne is the builder for "upsert"-ing

one GenerationModel node.

func (*GenerationModelUpsertOne) AddDefaultHeight

AddDefaultHeight adds v to the "default_height" field.

func (*GenerationModelUpsertOne) AddDefaultWidth

AddDefaultWidth adds v to the "default_width" field.

func (*GenerationModelUpsertOne) AddDisplayWeight

AddDisplayWeight adds v to the "display_weight" field.

func (*GenerationModelUpsertOne) ClearDefaultSchedulerID

func (u *GenerationModelUpsertOne) ClearDefaultSchedulerID() *GenerationModelUpsertOne

ClearDefaultSchedulerID clears the value of the "default_scheduler_id" field.

func (*GenerationModelUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GenerationModelUpsertOne) Exec

Exec executes the query.

func (*GenerationModelUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GenerationModelUpsertOne) ID

func (u *GenerationModelUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GenerationModelUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*GenerationModelUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GenerationModel.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GenerationModelUpsertOne) SetDefaultHeight

SetDefaultHeight sets the "default_height" field.

func (*GenerationModelUpsertOne) SetDefaultSchedulerID

func (u *GenerationModelUpsertOne) SetDefaultSchedulerID(v uuid.UUID) *GenerationModelUpsertOne

SetDefaultSchedulerID sets the "default_scheduler_id" field.

func (*GenerationModelUpsertOne) SetDefaultWidth

SetDefaultWidth sets the "default_width" field.

func (*GenerationModelUpsertOne) SetDisplayWeight

SetDisplayWeight sets the "display_weight" field.

func (*GenerationModelUpsertOne) SetIsActive

SetIsActive sets the "is_active" field.

func (*GenerationModelUpsertOne) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*GenerationModelUpsertOne) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*GenerationModelUpsertOne) SetNameInWorker

SetNameInWorker sets the "name_in_worker" field.

func (*GenerationModelUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*GenerationModelUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the GenerationModelCreate.OnConflict documentation for more info.

func (*GenerationModelUpsertOne) UpdateDefaultHeight

func (u *GenerationModelUpsertOne) UpdateDefaultHeight() *GenerationModelUpsertOne

UpdateDefaultHeight sets the "default_height" field to the value that was provided on create.

func (*GenerationModelUpsertOne) UpdateDefaultSchedulerID

func (u *GenerationModelUpsertOne) UpdateDefaultSchedulerID() *GenerationModelUpsertOne

UpdateDefaultSchedulerID sets the "default_scheduler_id" field to the value that was provided on create.

func (*GenerationModelUpsertOne) UpdateDefaultWidth

func (u *GenerationModelUpsertOne) UpdateDefaultWidth() *GenerationModelUpsertOne

UpdateDefaultWidth sets the "default_width" field to the value that was provided on create.

func (*GenerationModelUpsertOne) UpdateDisplayWeight

func (u *GenerationModelUpsertOne) UpdateDisplayWeight() *GenerationModelUpsertOne

UpdateDisplayWeight sets the "display_weight" field to the value that was provided on create.

func (*GenerationModelUpsertOne) UpdateIsActive

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*GenerationModelUpsertOne) UpdateIsDefault

func (u *GenerationModelUpsertOne) UpdateIsDefault() *GenerationModelUpsertOne

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*GenerationModelUpsertOne) UpdateIsHidden

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*GenerationModelUpsertOne) UpdateNameInWorker

func (u *GenerationModelUpsertOne) UpdateNameInWorker() *GenerationModelUpsertOne

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*GenerationModelUpsertOne) UpdateNewValues

func (u *GenerationModelUpsertOne) UpdateNewValues() *GenerationModelUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.GenerationModel.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(generationmodel.FieldID)
		}),
	).
	Exec(ctx)

func (*GenerationModelUpsertOne) UpdateUpdatedAt

func (u *GenerationModelUpsertOne) UpdateUpdatedAt() *GenerationModelUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type GenerationModels

type GenerationModels []*GenerationModel

GenerationModels is a parsable slice of GenerationModel.

type GenerationMutation

type GenerationMutation struct {
	// contains filtered or unexported fields
}

GenerationMutation represents an operation that mutates the Generation nodes in the graph.

func (*GenerationMutation) APITokenID

func (m *GenerationMutation) APITokenID() (r uuid.UUID, exists bool)

APITokenID returns the value of the "api_token_id" field in the mutation.

func (*GenerationMutation) APITokenIDCleared

func (m *GenerationMutation) APITokenIDCleared() bool

APITokenIDCleared returns if the "api_token_id" field was cleared in this mutation.

func (*GenerationMutation) APITokensCleared

func (m *GenerationMutation) APITokensCleared() bool

APITokensCleared reports if the "api_tokens" edge to the ApiToken entity was cleared.

func (*GenerationMutation) APITokensID

func (m *GenerationMutation) APITokensID() (id uuid.UUID, exists bool)

APITokensID returns the "api_tokens" edge ID in the mutation.

func (*GenerationMutation) APITokensIDs

func (m *GenerationMutation) APITokensIDs() (ids []uuid.UUID)

APITokensIDs returns the "api_tokens" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use APITokensID instead. It exists only for internal usage by the builders.

func (*GenerationMutation) AddField

func (m *GenerationMutation) 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 (*GenerationMutation) AddGenerationOutputIDs

func (m *GenerationMutation) AddGenerationOutputIDs(ids ...uuid.UUID)

AddGenerationOutputIDs adds the "generation_outputs" edge to the GenerationOutput entity by ids.

func (*GenerationMutation) AddGuidanceScale

func (m *GenerationMutation) AddGuidanceScale(f float32)

AddGuidanceScale adds f to the "guidance_scale" field.

func (*GenerationMutation) AddHeight

func (m *GenerationMutation) AddHeight(i int32)

AddHeight adds i to the "height" field.

func (*GenerationMutation) AddInferenceSteps

func (m *GenerationMutation) AddInferenceSteps(i int32)

AddInferenceSteps adds i to the "inference_steps" field.

func (*GenerationMutation) AddNsfwCount

func (m *GenerationMutation) AddNsfwCount(i int32)

AddNsfwCount adds i to the "nsfw_count" field.

func (*GenerationMutation) AddNumOutputs

func (m *GenerationMutation) AddNumOutputs(i int32)

AddNumOutputs adds i to the "num_outputs" field.

func (*GenerationMutation) AddPromptStrength

func (m *GenerationMutation) AddPromptStrength(f float32)

AddPromptStrength adds f to the "prompt_strength" field.

func (*GenerationMutation) AddSeed

func (m *GenerationMutation) AddSeed(i int)

AddSeed adds i to the "seed" field.

func (*GenerationMutation) AddWidth

func (m *GenerationMutation) AddWidth(i int32)

AddWidth adds i to the "width" field.

func (*GenerationMutation) AddedEdges

func (m *GenerationMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*GenerationMutation) AddedField

func (m *GenerationMutation) 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 (*GenerationMutation) AddedFields

func (m *GenerationMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*GenerationMutation) AddedGuidanceScale

func (m *GenerationMutation) AddedGuidanceScale() (r float32, exists bool)

AddedGuidanceScale returns the value that was added to the "guidance_scale" field in this mutation.

func (*GenerationMutation) AddedHeight

func (m *GenerationMutation) AddedHeight() (r int32, exists bool)

AddedHeight returns the value that was added to the "height" field in this mutation.

func (*GenerationMutation) AddedIDs

func (m *GenerationMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*GenerationMutation) AddedInferenceSteps

func (m *GenerationMutation) AddedInferenceSteps() (r int32, exists bool)

AddedInferenceSteps returns the value that was added to the "inference_steps" field in this mutation.

func (*GenerationMutation) AddedNsfwCount

func (m *GenerationMutation) AddedNsfwCount() (r int32, exists bool)

AddedNsfwCount returns the value that was added to the "nsfw_count" field in this mutation.

func (*GenerationMutation) AddedNumOutputs

func (m *GenerationMutation) AddedNumOutputs() (r int32, exists bool)

AddedNumOutputs returns the value that was added to the "num_outputs" field in this mutation.

func (*GenerationMutation) AddedPromptStrength

func (m *GenerationMutation) AddedPromptStrength() (r float32, exists bool)

AddedPromptStrength returns the value that was added to the "prompt_strength" field in this mutation.

func (*GenerationMutation) AddedSeed

func (m *GenerationMutation) AddedSeed() (r int, exists bool)

AddedSeed returns the value that was added to the "seed" field in this mutation.

func (*GenerationMutation) AddedWidth

func (m *GenerationMutation) AddedWidth() (r int32, exists bool)

AddedWidth returns the value that was added to the "width" field in this mutation.

func (*GenerationMutation) ClearAPITokenID

func (m *GenerationMutation) ClearAPITokenID()

ClearAPITokenID clears the value of the "api_token_id" field.

func (*GenerationMutation) ClearAPITokens

func (m *GenerationMutation) ClearAPITokens()

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*GenerationMutation) ClearCompletedAt

func (m *GenerationMutation) ClearCompletedAt()

ClearCompletedAt clears the value of the "completed_at" field.

func (*GenerationMutation) ClearCountryCode

func (m *GenerationMutation) ClearCountryCode()

ClearCountryCode clears the value of the "country_code" field.

func (*GenerationMutation) ClearDeviceInfo

func (m *GenerationMutation) ClearDeviceInfo()

ClearDeviceInfo clears the "device_info" edge to the DeviceInfo entity.

func (*GenerationMutation) ClearEdge

func (m *GenerationMutation) 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 (*GenerationMutation) ClearFailureReason

func (m *GenerationMutation) ClearFailureReason()

ClearFailureReason clears the value of the "failure_reason" field.

func (*GenerationMutation) ClearField

func (m *GenerationMutation) 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 (*GenerationMutation) ClearGenerationModel

func (m *GenerationMutation) ClearGenerationModel()

ClearGenerationModel clears the "generation_model" edge to the GenerationModel entity.

func (*GenerationMutation) ClearGenerationOutputs

func (m *GenerationMutation) ClearGenerationOutputs()

ClearGenerationOutputs clears the "generation_outputs" edge to the GenerationOutput entity.

func (*GenerationMutation) ClearInitImageURL

func (m *GenerationMutation) ClearInitImageURL()

ClearInitImageURL clears the value of the "init_image_url" field.

func (*GenerationMutation) ClearMaskImageURL

func (m *GenerationMutation) ClearMaskImageURL()

ClearMaskImageURL clears the value of the "mask_image_url" field.

func (*GenerationMutation) ClearNegativePrompt

func (m *GenerationMutation) ClearNegativePrompt()

ClearNegativePrompt clears the "negative_prompt" edge to the NegativePrompt entity.

func (*GenerationMutation) ClearNegativePromptID

func (m *GenerationMutation) ClearNegativePromptID()

ClearNegativePromptID clears the value of the "negative_prompt_id" field.

func (*GenerationMutation) ClearPrompt

func (m *GenerationMutation) ClearPrompt()

ClearPrompt clears the "prompt" edge to the Prompt entity.

func (*GenerationMutation) ClearPromptID

func (m *GenerationMutation) ClearPromptID()

ClearPromptID clears the value of the "prompt_id" field.

func (*GenerationMutation) ClearPromptStrength

func (m *GenerationMutation) ClearPromptStrength()

ClearPromptStrength clears the value of the "prompt_strength" field.

func (*GenerationMutation) ClearScheduler

func (m *GenerationMutation) ClearScheduler()

ClearScheduler clears the "scheduler" edge to the Scheduler entity.

func (*GenerationMutation) ClearStartedAt

func (m *GenerationMutation) ClearStartedAt()

ClearStartedAt clears the value of the "started_at" field.

func (*GenerationMutation) ClearStripeProductID

func (m *GenerationMutation) ClearStripeProductID()

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*GenerationMutation) ClearUser

func (m *GenerationMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*GenerationMutation) ClearedEdges

func (m *GenerationMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*GenerationMutation) ClearedFields

func (m *GenerationMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (GenerationMutation) Client

func (m GenerationMutation) 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 (*GenerationMutation) CompletedAt

func (m *GenerationMutation) CompletedAt() (r time.Time, exists bool)

CompletedAt returns the value of the "completed_at" field in the mutation.

func (*GenerationMutation) CompletedAtCleared

func (m *GenerationMutation) CompletedAtCleared() bool

CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.

func (*GenerationMutation) CountryCode

func (m *GenerationMutation) CountryCode() (r string, exists bool)

CountryCode returns the value of the "country_code" field in the mutation.

func (*GenerationMutation) CountryCodeCleared

func (m *GenerationMutation) CountryCodeCleared() bool

CountryCodeCleared returns if the "country_code" field was cleared in this mutation.

func (*GenerationMutation) CreatedAt

func (m *GenerationMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*GenerationMutation) DeviceInfoCleared

func (m *GenerationMutation) DeviceInfoCleared() bool

DeviceInfoCleared reports if the "device_info" edge to the DeviceInfo entity was cleared.

func (*GenerationMutation) DeviceInfoID

func (m *GenerationMutation) DeviceInfoID() (r uuid.UUID, exists bool)

DeviceInfoID returns the value of the "device_info_id" field in the mutation.

func (*GenerationMutation) DeviceInfoIDs

func (m *GenerationMutation) DeviceInfoIDs() (ids []uuid.UUID)

DeviceInfoIDs returns the "device_info" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeviceInfoID instead. It exists only for internal usage by the builders.

func (*GenerationMutation) EdgeCleared

func (m *GenerationMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*GenerationMutation) ExecContext

func (c *GenerationMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationMutation) FailureReason

func (m *GenerationMutation) FailureReason() (r string, exists bool)

FailureReason returns the value of the "failure_reason" field in the mutation.

func (*GenerationMutation) FailureReasonCleared

func (m *GenerationMutation) FailureReasonCleared() bool

FailureReasonCleared returns if the "failure_reason" field was cleared in this mutation.

func (*GenerationMutation) Field

func (m *GenerationMutation) 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 (*GenerationMutation) FieldCleared

func (m *GenerationMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*GenerationMutation) Fields

func (m *GenerationMutation) 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 (*GenerationMutation) GenerationModelCleared

func (m *GenerationMutation) GenerationModelCleared() bool

GenerationModelCleared reports if the "generation_model" edge to the GenerationModel entity was cleared.

func (*GenerationMutation) GenerationModelID

func (m *GenerationMutation) GenerationModelID() (id uuid.UUID, exists bool)

GenerationModelID returns the "generation_model" edge ID in the mutation.

func (*GenerationMutation) GenerationModelIDs

func (m *GenerationMutation) GenerationModelIDs() (ids []uuid.UUID)

GenerationModelIDs returns the "generation_model" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GenerationModelID instead. It exists only for internal usage by the builders.

func (*GenerationMutation) GenerationOutputsCleared

func (m *GenerationMutation) GenerationOutputsCleared() bool

GenerationOutputsCleared reports if the "generation_outputs" edge to the GenerationOutput entity was cleared.

func (*GenerationMutation) GenerationOutputsIDs

func (m *GenerationMutation) GenerationOutputsIDs() (ids []uuid.UUID)

GenerationOutputsIDs returns the "generation_outputs" edge IDs in the mutation.

func (*GenerationMutation) GuidanceScale

func (m *GenerationMutation) GuidanceScale() (r float32, exists bool)

GuidanceScale returns the value of the "guidance_scale" field in the mutation.

func (*GenerationMutation) Height

func (m *GenerationMutation) Height() (r int32, exists bool)

Height returns the value of the "height" field in the mutation.

func (*GenerationMutation) ID

func (m *GenerationMutation) 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 (*GenerationMutation) IDs

func (m *GenerationMutation) 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 (*GenerationMutation) InferenceSteps

func (m *GenerationMutation) InferenceSteps() (r int32, exists bool)

InferenceSteps returns the value of the "inference_steps" field in the mutation.

func (*GenerationMutation) InitImageURL

func (m *GenerationMutation) InitImageURL() (r string, exists bool)

InitImageURL returns the value of the "init_image_url" field in the mutation.

func (*GenerationMutation) InitImageURLCleared

func (m *GenerationMutation) InitImageURLCleared() bool

InitImageURLCleared returns if the "init_image_url" field was cleared in this mutation.

func (*GenerationMutation) MaskImageURL

func (m *GenerationMutation) MaskImageURL() (r string, exists bool)

MaskImageURL returns the value of the "mask_image_url" field in the mutation.

func (*GenerationMutation) MaskImageURLCleared

func (m *GenerationMutation) MaskImageURLCleared() bool

MaskImageURLCleared returns if the "mask_image_url" field was cleared in this mutation.

func (*GenerationMutation) ModelID

func (m *GenerationMutation) ModelID() (r uuid.UUID, exists bool)

ModelID returns the value of the "model_id" field in the mutation.

func (*GenerationMutation) NegativePromptCleared

func (m *GenerationMutation) NegativePromptCleared() bool

NegativePromptCleared reports if the "negative_prompt" edge to the NegativePrompt entity was cleared.

func (*GenerationMutation) NegativePromptID

func (m *GenerationMutation) NegativePromptID() (r uuid.UUID, exists bool)

NegativePromptID returns the value of the "negative_prompt_id" field in the mutation.

func (*GenerationMutation) NegativePromptIDCleared

func (m *GenerationMutation) NegativePromptIDCleared() bool

NegativePromptIDCleared returns if the "negative_prompt_id" field was cleared in this mutation.

func (*GenerationMutation) NegativePromptIDs

func (m *GenerationMutation) NegativePromptIDs() (ids []uuid.UUID)

NegativePromptIDs returns the "negative_prompt" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NegativePromptID instead. It exists only for internal usage by the builders.

func (*GenerationMutation) NsfwCount

func (m *GenerationMutation) NsfwCount() (r int32, exists bool)

NsfwCount returns the value of the "nsfw_count" field in the mutation.

func (*GenerationMutation) NumOutputs

func (m *GenerationMutation) NumOutputs() (r int32, exists bool)

NumOutputs returns the value of the "num_outputs" field in the mutation.

func (*GenerationMutation) OldAPITokenID

func (m *GenerationMutation) OldAPITokenID(ctx context.Context) (v *uuid.UUID, err error)

OldAPITokenID returns the old "api_token_id" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldCompletedAt

func (m *GenerationMutation) OldCompletedAt(ctx context.Context) (v *time.Time, err error)

OldCompletedAt returns the old "completed_at" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldCountryCode

func (m *GenerationMutation) OldCountryCode(ctx context.Context) (v *string, err error)

OldCountryCode returns the old "country_code" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldCreatedAt

func (m *GenerationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldDeviceInfoID

func (m *GenerationMutation) OldDeviceInfoID(ctx context.Context) (v uuid.UUID, err error)

OldDeviceInfoID returns the old "device_info_id" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldFailureReason

func (m *GenerationMutation) OldFailureReason(ctx context.Context) (v *string, err error)

OldFailureReason returns the old "failure_reason" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldField

func (m *GenerationMutation) 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 (*GenerationMutation) OldGuidanceScale

func (m *GenerationMutation) OldGuidanceScale(ctx context.Context) (v float32, err error)

OldGuidanceScale returns the old "guidance_scale" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldHeight

func (m *GenerationMutation) OldHeight(ctx context.Context) (v int32, err error)

OldHeight returns the old "height" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldInferenceSteps

func (m *GenerationMutation) OldInferenceSteps(ctx context.Context) (v int32, err error)

OldInferenceSteps returns the old "inference_steps" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldInitImageURL

func (m *GenerationMutation) OldInitImageURL(ctx context.Context) (v *string, err error)

OldInitImageURL returns the old "init_image_url" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldMaskImageURL

func (m *GenerationMutation) OldMaskImageURL(ctx context.Context) (v *string, err error)

OldMaskImageURL returns the old "mask_image_url" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldModelID

func (m *GenerationMutation) OldModelID(ctx context.Context) (v uuid.UUID, err error)

OldModelID returns the old "model_id" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldNegativePromptID

func (m *GenerationMutation) OldNegativePromptID(ctx context.Context) (v *uuid.UUID, err error)

OldNegativePromptID returns the old "negative_prompt_id" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldNsfwCount

func (m *GenerationMutation) OldNsfwCount(ctx context.Context) (v int32, err error)

OldNsfwCount returns the old "nsfw_count" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldNumOutputs

func (m *GenerationMutation) OldNumOutputs(ctx context.Context) (v int32, err error)

OldNumOutputs returns the old "num_outputs" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldPromptID

func (m *GenerationMutation) OldPromptID(ctx context.Context) (v *uuid.UUID, err error)

OldPromptID returns the old "prompt_id" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldPromptStrength

func (m *GenerationMutation) OldPromptStrength(ctx context.Context) (v *float32, err error)

OldPromptStrength returns the old "prompt_strength" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldSchedulerID

func (m *GenerationMutation) OldSchedulerID(ctx context.Context) (v uuid.UUID, err error)

OldSchedulerID returns the old "scheduler_id" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldSeed

func (m *GenerationMutation) OldSeed(ctx context.Context) (v int, err error)

OldSeed returns the old "seed" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldSourceType

func (m *GenerationMutation) OldSourceType(ctx context.Context) (v enttypes.SourceType, err error)

OldSourceType returns the old "source_type" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldStartedAt

func (m *GenerationMutation) OldStartedAt(ctx context.Context) (v *time.Time, err error)

OldStartedAt returns the old "started_at" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldStatus

func (m *GenerationMutation) OldStatus(ctx context.Context) (v generation.Status, err error)

OldStatus returns the old "status" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldStripeProductID

func (m *GenerationMutation) OldStripeProductID(ctx context.Context) (v *string, err error)

OldStripeProductID returns the old "stripe_product_id" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldUpdatedAt

func (m *GenerationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldUserID

func (m *GenerationMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldWasAutoSubmitted

func (m *GenerationMutation) OldWasAutoSubmitted(ctx context.Context) (v bool, err error)

OldWasAutoSubmitted returns the old "was_auto_submitted" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) OldWidth

func (m *GenerationMutation) OldWidth(ctx context.Context) (v int32, err error)

OldWidth returns the old "width" field's value of the Generation entity. If the Generation 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 (*GenerationMutation) Op

func (m *GenerationMutation) Op() Op

Op returns the operation name.

func (*GenerationMutation) PromptCleared

func (m *GenerationMutation) PromptCleared() bool

PromptCleared reports if the "prompt" edge to the Prompt entity was cleared.

func (*GenerationMutation) PromptID

func (m *GenerationMutation) PromptID() (r uuid.UUID, exists bool)

PromptID returns the value of the "prompt_id" field in the mutation.

func (*GenerationMutation) PromptIDCleared

func (m *GenerationMutation) PromptIDCleared() bool

PromptIDCleared returns if the "prompt_id" field was cleared in this mutation.

func (*GenerationMutation) PromptIDs

func (m *GenerationMutation) PromptIDs() (ids []uuid.UUID)

PromptIDs returns the "prompt" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PromptID instead. It exists only for internal usage by the builders.

func (*GenerationMutation) PromptStrength

func (m *GenerationMutation) PromptStrength() (r float32, exists bool)

PromptStrength returns the value of the "prompt_strength" field in the mutation.

func (*GenerationMutation) PromptStrengthCleared

func (m *GenerationMutation) PromptStrengthCleared() bool

PromptStrengthCleared returns if the "prompt_strength" field was cleared in this mutation.

func (*GenerationMutation) QueryContext

func (c *GenerationMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationMutation) RemoveGenerationOutputIDs

func (m *GenerationMutation) RemoveGenerationOutputIDs(ids ...uuid.UUID)

RemoveGenerationOutputIDs removes the "generation_outputs" edge to the GenerationOutput entity by IDs.

func (*GenerationMutation) RemovedEdges

func (m *GenerationMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*GenerationMutation) RemovedGenerationOutputsIDs

func (m *GenerationMutation) RemovedGenerationOutputsIDs() (ids []uuid.UUID)

RemovedGenerationOutputs returns the removed IDs of the "generation_outputs" edge to the GenerationOutput entity.

func (*GenerationMutation) RemovedIDs

func (m *GenerationMutation) 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 (*GenerationMutation) ResetAPITokenID

func (m *GenerationMutation) ResetAPITokenID()

ResetAPITokenID resets all changes to the "api_token_id" field.

func (*GenerationMutation) ResetAPITokens

func (m *GenerationMutation) ResetAPITokens()

ResetAPITokens resets all changes to the "api_tokens" edge.

func (*GenerationMutation) ResetCompletedAt

func (m *GenerationMutation) ResetCompletedAt()

ResetCompletedAt resets all changes to the "completed_at" field.

func (*GenerationMutation) ResetCountryCode

func (m *GenerationMutation) ResetCountryCode()

ResetCountryCode resets all changes to the "country_code" field.

func (*GenerationMutation) ResetCreatedAt

func (m *GenerationMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*GenerationMutation) ResetDeviceInfo

func (m *GenerationMutation) ResetDeviceInfo()

ResetDeviceInfo resets all changes to the "device_info" edge.

func (*GenerationMutation) ResetDeviceInfoID

func (m *GenerationMutation) ResetDeviceInfoID()

ResetDeviceInfoID resets all changes to the "device_info_id" field.

func (*GenerationMutation) ResetEdge

func (m *GenerationMutation) 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 (*GenerationMutation) ResetFailureReason

func (m *GenerationMutation) ResetFailureReason()

ResetFailureReason resets all changes to the "failure_reason" field.

func (*GenerationMutation) ResetField

func (m *GenerationMutation) 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 (*GenerationMutation) ResetGenerationModel

func (m *GenerationMutation) ResetGenerationModel()

ResetGenerationModel resets all changes to the "generation_model" edge.

func (*GenerationMutation) ResetGenerationOutputs

func (m *GenerationMutation) ResetGenerationOutputs()

ResetGenerationOutputs resets all changes to the "generation_outputs" edge.

func (*GenerationMutation) ResetGuidanceScale

func (m *GenerationMutation) ResetGuidanceScale()

ResetGuidanceScale resets all changes to the "guidance_scale" field.

func (*GenerationMutation) ResetHeight

func (m *GenerationMutation) ResetHeight()

ResetHeight resets all changes to the "height" field.

func (*GenerationMutation) ResetInferenceSteps

func (m *GenerationMutation) ResetInferenceSteps()

ResetInferenceSteps resets all changes to the "inference_steps" field.

func (*GenerationMutation) ResetInitImageURL

func (m *GenerationMutation) ResetInitImageURL()

ResetInitImageURL resets all changes to the "init_image_url" field.

func (*GenerationMutation) ResetMaskImageURL

func (m *GenerationMutation) ResetMaskImageURL()

ResetMaskImageURL resets all changes to the "mask_image_url" field.

func (*GenerationMutation) ResetModelID

func (m *GenerationMutation) ResetModelID()

ResetModelID resets all changes to the "model_id" field.

func (*GenerationMutation) ResetNegativePrompt

func (m *GenerationMutation) ResetNegativePrompt()

ResetNegativePrompt resets all changes to the "negative_prompt" edge.

func (*GenerationMutation) ResetNegativePromptID

func (m *GenerationMutation) ResetNegativePromptID()

ResetNegativePromptID resets all changes to the "negative_prompt_id" field.

func (*GenerationMutation) ResetNsfwCount

func (m *GenerationMutation) ResetNsfwCount()

ResetNsfwCount resets all changes to the "nsfw_count" field.

func (*GenerationMutation) ResetNumOutputs

func (m *GenerationMutation) ResetNumOutputs()

ResetNumOutputs resets all changes to the "num_outputs" field.

func (*GenerationMutation) ResetPrompt

func (m *GenerationMutation) ResetPrompt()

ResetPrompt resets all changes to the "prompt" edge.

func (*GenerationMutation) ResetPromptID

func (m *GenerationMutation) ResetPromptID()

ResetPromptID resets all changes to the "prompt_id" field.

func (*GenerationMutation) ResetPromptStrength

func (m *GenerationMutation) ResetPromptStrength()

ResetPromptStrength resets all changes to the "prompt_strength" field.

func (*GenerationMutation) ResetScheduler

func (m *GenerationMutation) ResetScheduler()

ResetScheduler resets all changes to the "scheduler" edge.

func (*GenerationMutation) ResetSchedulerID

func (m *GenerationMutation) ResetSchedulerID()

ResetSchedulerID resets all changes to the "scheduler_id" field.

func (*GenerationMutation) ResetSeed

func (m *GenerationMutation) ResetSeed()

ResetSeed resets all changes to the "seed" field.

func (*GenerationMutation) ResetSourceType

func (m *GenerationMutation) ResetSourceType()

ResetSourceType resets all changes to the "source_type" field.

func (*GenerationMutation) ResetStartedAt

func (m *GenerationMutation) ResetStartedAt()

ResetStartedAt resets all changes to the "started_at" field.

func (*GenerationMutation) ResetStatus

func (m *GenerationMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*GenerationMutation) ResetStripeProductID

func (m *GenerationMutation) ResetStripeProductID()

ResetStripeProductID resets all changes to the "stripe_product_id" field.

func (*GenerationMutation) ResetUpdatedAt

func (m *GenerationMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*GenerationMutation) ResetUser

func (m *GenerationMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*GenerationMutation) ResetUserID

func (m *GenerationMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*GenerationMutation) ResetWasAutoSubmitted

func (m *GenerationMutation) ResetWasAutoSubmitted()

ResetWasAutoSubmitted resets all changes to the "was_auto_submitted" field.

func (*GenerationMutation) ResetWidth

func (m *GenerationMutation) ResetWidth()

ResetWidth resets all changes to the "width" field.

func (*GenerationMutation) SchedulerCleared

func (m *GenerationMutation) SchedulerCleared() bool

SchedulerCleared reports if the "scheduler" edge to the Scheduler entity was cleared.

func (*GenerationMutation) SchedulerID

func (m *GenerationMutation) SchedulerID() (r uuid.UUID, exists bool)

SchedulerID returns the value of the "scheduler_id" field in the mutation.

func (*GenerationMutation) SchedulerIDs

func (m *GenerationMutation) SchedulerIDs() (ids []uuid.UUID)

SchedulerIDs returns the "scheduler" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SchedulerID instead. It exists only for internal usage by the builders.

func (*GenerationMutation) Seed

func (m *GenerationMutation) Seed() (r int, exists bool)

Seed returns the value of the "seed" field in the mutation.

func (*GenerationMutation) SetAPITokenID

func (m *GenerationMutation) SetAPITokenID(u uuid.UUID)

SetAPITokenID sets the "api_token_id" field.

func (*GenerationMutation) SetAPITokensID

func (m *GenerationMutation) SetAPITokensID(id uuid.UUID)

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by id.

func (*GenerationMutation) SetCompletedAt

func (m *GenerationMutation) SetCompletedAt(t time.Time)

SetCompletedAt sets the "completed_at" field.

func (*GenerationMutation) SetCountryCode

func (m *GenerationMutation) SetCountryCode(s string)

SetCountryCode sets the "country_code" field.

func (*GenerationMutation) SetCreatedAt

func (m *GenerationMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*GenerationMutation) SetDeviceInfoID

func (m *GenerationMutation) SetDeviceInfoID(u uuid.UUID)

SetDeviceInfoID sets the "device_info_id" field.

func (*GenerationMutation) SetFailureReason

func (m *GenerationMutation) SetFailureReason(s string)

SetFailureReason sets the "failure_reason" field.

func (*GenerationMutation) SetField

func (m *GenerationMutation) 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 (*GenerationMutation) SetGenerationModelID

func (m *GenerationMutation) SetGenerationModelID(id uuid.UUID)

SetGenerationModelID sets the "generation_model" edge to the GenerationModel entity by id.

func (*GenerationMutation) SetGuidanceScale

func (m *GenerationMutation) SetGuidanceScale(f float32)

SetGuidanceScale sets the "guidance_scale" field.

func (*GenerationMutation) SetHeight

func (m *GenerationMutation) SetHeight(i int32)

SetHeight sets the "height" field.

func (*GenerationMutation) SetID

func (m *GenerationMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Generation entities.

func (*GenerationMutation) SetInferenceSteps

func (m *GenerationMutation) SetInferenceSteps(i int32)

SetInferenceSteps sets the "inference_steps" field.

func (*GenerationMutation) SetInitImageURL

func (m *GenerationMutation) SetInitImageURL(s string)

SetInitImageURL sets the "init_image_url" field.

func (*GenerationMutation) SetMaskImageURL

func (m *GenerationMutation) SetMaskImageURL(s string)

SetMaskImageURL sets the "mask_image_url" field.

func (*GenerationMutation) SetModelID

func (m *GenerationMutation) SetModelID(u uuid.UUID)

SetModelID sets the "model_id" field.

func (*GenerationMutation) SetNegativePromptID

func (m *GenerationMutation) SetNegativePromptID(u uuid.UUID)

SetNegativePromptID sets the "negative_prompt_id" field.

func (*GenerationMutation) SetNsfwCount

func (m *GenerationMutation) SetNsfwCount(i int32)

SetNsfwCount sets the "nsfw_count" field.

func (*GenerationMutation) SetNumOutputs

func (m *GenerationMutation) SetNumOutputs(i int32)

SetNumOutputs sets the "num_outputs" field.

func (*GenerationMutation) SetOp

func (m *GenerationMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GenerationMutation) SetPromptID

func (m *GenerationMutation) SetPromptID(u uuid.UUID)

SetPromptID sets the "prompt_id" field.

func (*GenerationMutation) SetPromptStrength

func (m *GenerationMutation) SetPromptStrength(f float32)

SetPromptStrength sets the "prompt_strength" field.

func (*GenerationMutation) SetSchedulerID

func (m *GenerationMutation) SetSchedulerID(u uuid.UUID)

SetSchedulerID sets the "scheduler_id" field.

func (*GenerationMutation) SetSeed

func (m *GenerationMutation) SetSeed(i int)

SetSeed sets the "seed" field.

func (*GenerationMutation) SetSourceType

func (m *GenerationMutation) SetSourceType(et enttypes.SourceType)

SetSourceType sets the "source_type" field.

func (*GenerationMutation) SetStartedAt

func (m *GenerationMutation) SetStartedAt(t time.Time)

SetStartedAt sets the "started_at" field.

func (*GenerationMutation) SetStatus

func (m *GenerationMutation) SetStatus(ge generation.Status)

SetStatus sets the "status" field.

func (*GenerationMutation) SetStripeProductID

func (m *GenerationMutation) SetStripeProductID(s string)

SetStripeProductID sets the "stripe_product_id" field.

func (*GenerationMutation) SetUpdatedAt

func (m *GenerationMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*GenerationMutation) SetUserID

func (m *GenerationMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (*GenerationMutation) SetWasAutoSubmitted

func (m *GenerationMutation) SetWasAutoSubmitted(b bool)

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*GenerationMutation) SetWidth

func (m *GenerationMutation) SetWidth(i int32)

SetWidth sets the "width" field.

func (*GenerationMutation) SourceType

func (m *GenerationMutation) SourceType() (r enttypes.SourceType, exists bool)

SourceType returns the value of the "source_type" field in the mutation.

func (*GenerationMutation) StartedAt

func (m *GenerationMutation) StartedAt() (r time.Time, exists bool)

StartedAt returns the value of the "started_at" field in the mutation.

func (*GenerationMutation) StartedAtCleared

func (m *GenerationMutation) StartedAtCleared() bool

StartedAtCleared returns if the "started_at" field was cleared in this mutation.

func (*GenerationMutation) Status

func (m *GenerationMutation) Status() (r generation.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*GenerationMutation) StripeProductID

func (m *GenerationMutation) StripeProductID() (r string, exists bool)

StripeProductID returns the value of the "stripe_product_id" field in the mutation.

func (*GenerationMutation) StripeProductIDCleared

func (m *GenerationMutation) StripeProductIDCleared() bool

StripeProductIDCleared returns if the "stripe_product_id" field was cleared in this mutation.

func (GenerationMutation) Tx

func (m GenerationMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*GenerationMutation) Type

func (m *GenerationMutation) Type() string

Type returns the node type of this mutation (Generation).

func (*GenerationMutation) UpdatedAt

func (m *GenerationMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*GenerationMutation) UserCleared

func (m *GenerationMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*GenerationMutation) UserID

func (m *GenerationMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*GenerationMutation) UserIDs

func (m *GenerationMutation) UserIDs() (ids []uuid.UUID)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*GenerationMutation) WasAutoSubmitted

func (m *GenerationMutation) WasAutoSubmitted() (r bool, exists bool)

WasAutoSubmitted returns the value of the "was_auto_submitted" field in the mutation.

func (*GenerationMutation) Where

func (m *GenerationMutation) Where(ps ...predicate.Generation)

Where appends a list predicates to the GenerationMutation builder.

func (*GenerationMutation) WhereP

func (m *GenerationMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the GenerationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*GenerationMutation) Width

func (m *GenerationMutation) Width() (r int32, exists bool)

Width returns the value of the "width" field in the mutation.

type GenerationOutput

type GenerationOutput struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ImagePath holds the value of the "image_path" field.
	ImagePath string `json:"image_path,omitempty"`
	// UpscaledImagePath holds the value of the "upscaled_image_path" field.
	UpscaledImagePath *string `json:"upscaled_image_path,omitempty"`
	// GalleryStatus holds the value of the "gallery_status" field.
	GalleryStatus generationoutput.GalleryStatus `json:"gallery_status,omitempty"`
	// IsFavorited holds the value of the "is_favorited" field.
	IsFavorited bool `json:"is_favorited,omitempty"`
	// HasEmbeddings holds the value of the "has_embeddings" field.
	HasEmbeddings bool `json:"has_embeddings,omitempty"`
	// HasEmbeddingsNew holds the value of the "has_embeddings_new" field.
	HasEmbeddingsNew bool `json:"has_embeddings_new,omitempty"`
	// IsPublic holds the value of the "is_public" field.
	IsPublic bool `json:"is_public,omitempty"`
	// AestheticRatingScore holds the value of the "aesthetic_rating_score" field.
	AestheticRatingScore float32 `json:"aesthetic_rating_score,omitempty"`
	// AestheticArtifactScore holds the value of the "aesthetic_artifact_score" field.
	AestheticArtifactScore float32 `json:"aesthetic_artifact_score,omitempty"`
	// LikeCount holds the value of the "like_count" field.
	LikeCount int `json:"like_count,omitempty"`
	// GenerationID holds the value of the "generation_id" field.
	GenerationID uuid.UUID `json:"generation_id,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GenerationOutputQuery when eager-loading is set.
	Edges GenerationOutputEdges `json:"edges"`
	// contains filtered or unexported fields
}

GenerationOutput is the model entity for the GenerationOutput schema.

func (*GenerationOutput) ExecContext

func (c *GenerationOutput) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutput) QueryContext

func (c *GenerationOutput) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutput) QueryGenerationOutputLikes

func (_go *GenerationOutput) QueryGenerationOutputLikes() *GenerationOutputLikeQuery

QueryGenerationOutputLikes queries the "generation_output_likes" edge of the GenerationOutput entity.

func (*GenerationOutput) QueryGenerations

func (_go *GenerationOutput) QueryGenerations() *GenerationQuery

QueryGenerations queries the "generations" edge of the GenerationOutput entity.

func (*GenerationOutput) QueryUpscaleOutputs

func (_go *GenerationOutput) QueryUpscaleOutputs() *UpscaleOutputQuery

QueryUpscaleOutputs queries the "upscale_outputs" edge of the GenerationOutput entity.

func (*GenerationOutput) String

func (_go *GenerationOutput) String() string

String implements the fmt.Stringer.

func (*GenerationOutput) Unwrap

func (_go *GenerationOutput) Unwrap() *GenerationOutput

Unwrap unwraps the GenerationOutput 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 (*GenerationOutput) Update

Update returns a builder for updating this GenerationOutput. Note that you need to call GenerationOutput.Unwrap() before calling this method if this GenerationOutput was returned from a transaction, and the transaction was committed or rolled back.

type GenerationOutputClient

type GenerationOutputClient struct {
	// contains filtered or unexported fields
}

GenerationOutputClient is a client for the GenerationOutput schema.

func NewGenerationOutputClient

func NewGenerationOutputClient(c config) *GenerationOutputClient

NewGenerationOutputClient returns a client for the GenerationOutput from the given config.

func (*GenerationOutputClient) Create

Create returns a builder for creating a GenerationOutput entity.

func (*GenerationOutputClient) CreateBulk

CreateBulk returns a builder for creating a bulk of GenerationOutput entities.

func (*GenerationOutputClient) Delete

Delete returns a delete builder for GenerationOutput.

func (*GenerationOutputClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GenerationOutputClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*GenerationOutputClient) ExecContext

func (c *GenerationOutputClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputClient) Get

Get returns a GenerationOutput entity by its id.

func (*GenerationOutputClient) GetX

GetX is like Get, but panics if an error occurs.

func (*GenerationOutputClient) Hooks

func (c *GenerationOutputClient) Hooks() []Hook

Hooks returns the client hooks.

func (*GenerationOutputClient) Intercept

func (c *GenerationOutputClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `generationoutput.Intercept(f(g(h())))`.

func (*GenerationOutputClient) Interceptors

func (c *GenerationOutputClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*GenerationOutputClient) Query

Query returns a query builder for GenerationOutput.

func (*GenerationOutputClient) QueryContext

func (c *GenerationOutputClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputClient) QueryGenerationOutputLikes

func (c *GenerationOutputClient) QueryGenerationOutputLikes(_go *GenerationOutput) *GenerationOutputLikeQuery

QueryGenerationOutputLikes queries the generation_output_likes edge of a GenerationOutput.

func (*GenerationOutputClient) QueryGenerations

func (c *GenerationOutputClient) QueryGenerations(_go *GenerationOutput) *GenerationQuery

QueryGenerations queries the generations edge of a GenerationOutput.

func (*GenerationOutputClient) QueryUpscaleOutputs

func (c *GenerationOutputClient) QueryUpscaleOutputs(_go *GenerationOutput) *UpscaleOutputQuery

QueryUpscaleOutputs queries the upscale_outputs edge of a GenerationOutput.

func (*GenerationOutputClient) Update

Update returns an update builder for GenerationOutput.

func (*GenerationOutputClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*GenerationOutputClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*GenerationOutputClient) Use

func (c *GenerationOutputClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `generationoutput.Hooks(f(g(h())))`.

type GenerationOutputCreate

type GenerationOutputCreate struct {
	// contains filtered or unexported fields
}

GenerationOutputCreate is the builder for creating a GenerationOutput entity.

func (*GenerationOutputCreate) AddGenerationOutputLikeIDs

func (goc *GenerationOutputCreate) AddGenerationOutputLikeIDs(ids ...uuid.UUID) *GenerationOutputCreate

AddGenerationOutputLikeIDs adds the "generation_output_likes" edge to the GenerationOutputLike entity by IDs.

func (*GenerationOutputCreate) AddGenerationOutputLikes

func (goc *GenerationOutputCreate) AddGenerationOutputLikes(g ...*GenerationOutputLike) *GenerationOutputCreate

AddGenerationOutputLikes adds the "generation_output_likes" edges to the GenerationOutputLike entity.

func (*GenerationOutputCreate) Exec

Exec executes the query.

func (*GenerationOutputCreate) ExecContext

func (c *GenerationOutputCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputCreate) ExecX

func (goc *GenerationOutputCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputCreate) Mutation

Mutation returns the GenerationOutputMutation object of the builder.

func (*GenerationOutputCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GenerationOutput.Create().
	SetImagePath(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.GenerationOutputUpsert) {
		SetImagePath(v+v).
	}).
	Exec(ctx)

func (*GenerationOutputCreate) OnConflictColumns

func (goc *GenerationOutputCreate) OnConflictColumns(columns ...string) *GenerationOutputUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GenerationOutput.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GenerationOutputCreate) QueryContext

func (c *GenerationOutputCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputCreate) Save

Save creates the GenerationOutput in the database.

func (*GenerationOutputCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*GenerationOutputCreate) SetAestheticArtifactScore

func (goc *GenerationOutputCreate) SetAestheticArtifactScore(f float32) *GenerationOutputCreate

SetAestheticArtifactScore sets the "aesthetic_artifact_score" field.

func (*GenerationOutputCreate) SetAestheticRatingScore

func (goc *GenerationOutputCreate) SetAestheticRatingScore(f float32) *GenerationOutputCreate

SetAestheticRatingScore sets the "aesthetic_rating_score" field.

func (*GenerationOutputCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*GenerationOutputCreate) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*GenerationOutputCreate) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*GenerationOutputCreate) SetGenerationID

func (goc *GenerationOutputCreate) SetGenerationID(u uuid.UUID) *GenerationOutputCreate

SetGenerationID sets the "generation_id" field.

func (*GenerationOutputCreate) SetGenerations

func (goc *GenerationOutputCreate) SetGenerations(g *Generation) *GenerationOutputCreate

SetGenerations sets the "generations" edge to the Generation entity.

func (*GenerationOutputCreate) SetGenerationsID

func (goc *GenerationOutputCreate) SetGenerationsID(id uuid.UUID) *GenerationOutputCreate

SetGenerationsID sets the "generations" edge to the Generation entity by ID.

func (*GenerationOutputCreate) SetHasEmbeddings

func (goc *GenerationOutputCreate) SetHasEmbeddings(b bool) *GenerationOutputCreate

SetHasEmbeddings sets the "has_embeddings" field.

func (*GenerationOutputCreate) SetHasEmbeddingsNew

func (goc *GenerationOutputCreate) SetHasEmbeddingsNew(b bool) *GenerationOutputCreate

SetHasEmbeddingsNew sets the "has_embeddings_new" field.

func (*GenerationOutputCreate) SetID

SetID sets the "id" field.

func (*GenerationOutputCreate) SetImagePath

SetImagePath sets the "image_path" field.

func (*GenerationOutputCreate) SetIsFavorited

func (goc *GenerationOutputCreate) SetIsFavorited(b bool) *GenerationOutputCreate

SetIsFavorited sets the "is_favorited" field.

func (*GenerationOutputCreate) SetIsPublic

func (goc *GenerationOutputCreate) SetIsPublic(b bool) *GenerationOutputCreate

SetIsPublic sets the "is_public" field.

func (*GenerationOutputCreate) SetLikeCount

func (goc *GenerationOutputCreate) SetLikeCount(i int) *GenerationOutputCreate

SetLikeCount sets the "like_count" field.

func (*GenerationOutputCreate) SetNillableAestheticArtifactScore

func (goc *GenerationOutputCreate) SetNillableAestheticArtifactScore(f *float32) *GenerationOutputCreate

SetNillableAestheticArtifactScore sets the "aesthetic_artifact_score" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableAestheticRatingScore

func (goc *GenerationOutputCreate) SetNillableAestheticRatingScore(f *float32) *GenerationOutputCreate

SetNillableAestheticRatingScore sets the "aesthetic_rating_score" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableCreatedAt

func (goc *GenerationOutputCreate) SetNillableCreatedAt(t *time.Time) *GenerationOutputCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableDeletedAt

func (goc *GenerationOutputCreate) SetNillableDeletedAt(t *time.Time) *GenerationOutputCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableGalleryStatus

SetNillableGalleryStatus sets the "gallery_status" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableHasEmbeddings

func (goc *GenerationOutputCreate) SetNillableHasEmbeddings(b *bool) *GenerationOutputCreate

SetNillableHasEmbeddings sets the "has_embeddings" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableHasEmbeddingsNew

func (goc *GenerationOutputCreate) SetNillableHasEmbeddingsNew(b *bool) *GenerationOutputCreate

SetNillableHasEmbeddingsNew sets the "has_embeddings_new" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableID

func (goc *GenerationOutputCreate) SetNillableID(u *uuid.UUID) *GenerationOutputCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableIsFavorited

func (goc *GenerationOutputCreate) SetNillableIsFavorited(b *bool) *GenerationOutputCreate

SetNillableIsFavorited sets the "is_favorited" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableIsPublic

func (goc *GenerationOutputCreate) SetNillableIsPublic(b *bool) *GenerationOutputCreate

SetNillableIsPublic sets the "is_public" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableLikeCount

func (goc *GenerationOutputCreate) SetNillableLikeCount(i *int) *GenerationOutputCreate

SetNillableLikeCount sets the "like_count" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableUpdatedAt

func (goc *GenerationOutputCreate) SetNillableUpdatedAt(t *time.Time) *GenerationOutputCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*GenerationOutputCreate) SetNillableUpscaleOutputsID

func (goc *GenerationOutputCreate) SetNillableUpscaleOutputsID(id *uuid.UUID) *GenerationOutputCreate

SetNillableUpscaleOutputsID sets the "upscale_outputs" edge to the UpscaleOutput entity by ID if the given value is not nil.

func (*GenerationOutputCreate) SetNillableUpscaledImagePath

func (goc *GenerationOutputCreate) SetNillableUpscaledImagePath(s *string) *GenerationOutputCreate

SetNillableUpscaledImagePath sets the "upscaled_image_path" field if the given value is not nil.

func (*GenerationOutputCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*GenerationOutputCreate) SetUpscaleOutputs

func (goc *GenerationOutputCreate) SetUpscaleOutputs(u *UpscaleOutput) *GenerationOutputCreate

SetUpscaleOutputs sets the "upscale_outputs" edge to the UpscaleOutput entity.

func (*GenerationOutputCreate) SetUpscaleOutputsID

func (goc *GenerationOutputCreate) SetUpscaleOutputsID(id uuid.UUID) *GenerationOutputCreate

SetUpscaleOutputsID sets the "upscale_outputs" edge to the UpscaleOutput entity by ID.

func (*GenerationOutputCreate) SetUpscaledImagePath

func (goc *GenerationOutputCreate) SetUpscaledImagePath(s string) *GenerationOutputCreate

SetUpscaledImagePath sets the "upscaled_image_path" field.

type GenerationOutputCreateBulk

type GenerationOutputCreateBulk struct {
	// contains filtered or unexported fields
}

GenerationOutputCreateBulk is the builder for creating many GenerationOutput entities in bulk.

func (*GenerationOutputCreateBulk) Exec

Exec executes the query.

func (*GenerationOutputCreateBulk) ExecContext

func (c *GenerationOutputCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputCreateBulk) ExecX

func (gocb *GenerationOutputCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GenerationOutput.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.GenerationOutputUpsert) {
		SetImagePath(v+v).
	}).
	Exec(ctx)

func (*GenerationOutputCreateBulk) OnConflictColumns

func (gocb *GenerationOutputCreateBulk) OnConflictColumns(columns ...string) *GenerationOutputUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GenerationOutput.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GenerationOutputCreateBulk) QueryContext

func (c *GenerationOutputCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputCreateBulk) Save

Save creates the GenerationOutput entities in the database.

func (*GenerationOutputCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type GenerationOutputDelete

type GenerationOutputDelete struct {
	// contains filtered or unexported fields
}

GenerationOutputDelete is the builder for deleting a GenerationOutput entity.

func (*GenerationOutputDelete) Exec

func (god *GenerationOutputDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*GenerationOutputDelete) ExecContext

func (c *GenerationOutputDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputDelete) ExecX

func (god *GenerationOutputDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputDelete) QueryContext

func (c *GenerationOutputDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputDelete) Where

Where appends a list predicates to the GenerationOutputDelete builder.

type GenerationOutputDeleteOne

type GenerationOutputDeleteOne struct {
	// contains filtered or unexported fields
}

GenerationOutputDeleteOne is the builder for deleting a single GenerationOutput entity.

func (*GenerationOutputDeleteOne) Exec

Exec executes the deletion query.

func (*GenerationOutputDeleteOne) ExecX

func (godo *GenerationOutputDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type GenerationOutputEdges

type GenerationOutputEdges struct {
	// Generations holds the value of the generations edge.
	Generations *Generation `json:"generations,omitempty"`
	// UpscaleOutputs holds the value of the upscale_outputs edge.
	UpscaleOutputs *UpscaleOutput `json:"upscale_outputs,omitempty"`
	// GenerationOutputLikes holds the value of the generation_output_likes edge.
	GenerationOutputLikes []*GenerationOutputLike `json:"generation_output_likes,omitempty"`
	// contains filtered or unexported fields
}

GenerationOutputEdges holds the relations/edges for other nodes in the graph.

func (GenerationOutputEdges) GenerationOutputLikesOrErr

func (e GenerationOutputEdges) GenerationOutputLikesOrErr() ([]*GenerationOutputLike, error)

GenerationOutputLikesOrErr returns the GenerationOutputLikes value or an error if the edge was not loaded in eager-loading.

func (GenerationOutputEdges) GenerationsOrErr

func (e GenerationOutputEdges) GenerationsOrErr() (*Generation, error)

GenerationsOrErr returns the Generations value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (GenerationOutputEdges) UpscaleOutputsOrErr

func (e GenerationOutputEdges) UpscaleOutputsOrErr() (*UpscaleOutput, error)

UpscaleOutputsOrErr returns the UpscaleOutputs value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type GenerationOutputGroupBy

type GenerationOutputGroupBy struct {
	// contains filtered or unexported fields
}

GenerationOutputGroupBy is the group-by builder for GenerationOutput entities.

func (*GenerationOutputGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*GenerationOutputGroupBy) Bool

func (s *GenerationOutputGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GenerationOutputGroupBy) BoolX

func (s *GenerationOutputGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GenerationOutputGroupBy) Bools

func (s *GenerationOutputGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GenerationOutputGroupBy) BoolsX

func (s *GenerationOutputGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GenerationOutputGroupBy) Float64

func (s *GenerationOutputGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GenerationOutputGroupBy) Float64X

func (s *GenerationOutputGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GenerationOutputGroupBy) Float64s

func (s *GenerationOutputGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GenerationOutputGroupBy) Float64sX

func (s *GenerationOutputGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GenerationOutputGroupBy) Int

func (s *GenerationOutputGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GenerationOutputGroupBy) IntX

func (s *GenerationOutputGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GenerationOutputGroupBy) Ints

func (s *GenerationOutputGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GenerationOutputGroupBy) IntsX

func (s *GenerationOutputGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GenerationOutputGroupBy) Scan

func (gogb *GenerationOutputGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*GenerationOutputGroupBy) ScanX

func (s *GenerationOutputGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GenerationOutputGroupBy) String

func (s *GenerationOutputGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GenerationOutputGroupBy) StringX

func (s *GenerationOutputGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GenerationOutputGroupBy) Strings

func (s *GenerationOutputGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GenerationOutputGroupBy) StringsX

func (s *GenerationOutputGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GenerationOutputLike

type GenerationOutputLike struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// OutputID holds the value of the "output_id" field.
	OutputID uuid.UUID `json:"output_id,omitempty"`
	// LikedByUserID holds the value of the "liked_by_user_id" field.
	LikedByUserID uuid.UUID `json:"liked_by_user_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the GenerationOutputLikeQuery when eager-loading is set.
	Edges GenerationOutputLikeEdges `json:"edges"`
	// contains filtered or unexported fields
}

GenerationOutputLike is the model entity for the GenerationOutputLike schema.

func (*GenerationOutputLike) ExecContext

func (c *GenerationOutputLike) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputLike) QueryContext

func (c *GenerationOutputLike) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputLike) QueryGenerationOutputs

func (gol *GenerationOutputLike) QueryGenerationOutputs() *GenerationOutputQuery

QueryGenerationOutputs queries the "generation_outputs" edge of the GenerationOutputLike entity.

func (*GenerationOutputLike) QueryUsers

func (gol *GenerationOutputLike) QueryUsers() *UserQuery

QueryUsers queries the "users" edge of the GenerationOutputLike entity.

func (*GenerationOutputLike) String

func (gol *GenerationOutputLike) String() string

String implements the fmt.Stringer.

func (*GenerationOutputLike) Unwrap

Unwrap unwraps the GenerationOutputLike 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 (*GenerationOutputLike) Update

Update returns a builder for updating this GenerationOutputLike. Note that you need to call GenerationOutputLike.Unwrap() before calling this method if this GenerationOutputLike was returned from a transaction, and the transaction was committed or rolled back.

type GenerationOutputLikeClient

type GenerationOutputLikeClient struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeClient is a client for the GenerationOutputLike schema.

func NewGenerationOutputLikeClient

func NewGenerationOutputLikeClient(c config) *GenerationOutputLikeClient

NewGenerationOutputLikeClient returns a client for the GenerationOutputLike from the given config.

func (*GenerationOutputLikeClient) Create

Create returns a builder for creating a GenerationOutputLike entity.

func (*GenerationOutputLikeClient) CreateBulk

CreateBulk returns a builder for creating a bulk of GenerationOutputLike entities.

func (*GenerationOutputLikeClient) Delete

Delete returns a delete builder for GenerationOutputLike.

func (*GenerationOutputLikeClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*GenerationOutputLikeClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*GenerationOutputLikeClient) ExecContext

func (c *GenerationOutputLikeClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputLikeClient) Get

Get returns a GenerationOutputLike entity by its id.

func (*GenerationOutputLikeClient) GetX

GetX is like Get, but panics if an error occurs.

func (*GenerationOutputLikeClient) Hooks

func (c *GenerationOutputLikeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*GenerationOutputLikeClient) Intercept

func (c *GenerationOutputLikeClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `generationoutputlike.Intercept(f(g(h())))`.

func (*GenerationOutputLikeClient) Interceptors

func (c *GenerationOutputLikeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*GenerationOutputLikeClient) Query

Query returns a query builder for GenerationOutputLike.

func (*GenerationOutputLikeClient) QueryContext

func (c *GenerationOutputLikeClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputLikeClient) QueryGenerationOutputs

QueryGenerationOutputs queries the generation_outputs edge of a GenerationOutputLike.

func (*GenerationOutputLikeClient) QueryUsers

QueryUsers queries the users edge of a GenerationOutputLike.

func (*GenerationOutputLikeClient) Update

Update returns an update builder for GenerationOutputLike.

func (*GenerationOutputLikeClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*GenerationOutputLikeClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*GenerationOutputLikeClient) Use

func (c *GenerationOutputLikeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `generationoutputlike.Hooks(f(g(h())))`.

type GenerationOutputLikeCreate

type GenerationOutputLikeCreate struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeCreate is the builder for creating a GenerationOutputLike entity.

func (*GenerationOutputLikeCreate) Exec

Exec executes the query.

func (*GenerationOutputLikeCreate) ExecContext

func (c *GenerationOutputLikeCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputLikeCreate) ExecX

func (golc *GenerationOutputLikeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputLikeCreate) Mutation

Mutation returns the GenerationOutputLikeMutation object of the builder.

func (*GenerationOutputLikeCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GenerationOutputLike.Create().
	SetOutputID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.GenerationOutputLikeUpsert) {
		SetOutputID(v+v).
	}).
	Exec(ctx)

func (*GenerationOutputLikeCreate) OnConflictColumns

func (golc *GenerationOutputLikeCreate) OnConflictColumns(columns ...string) *GenerationOutputLikeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GenerationOutputLike.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GenerationOutputLikeCreate) QueryContext

func (c *GenerationOutputLikeCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputLikeCreate) Save

Save creates the GenerationOutputLike in the database.

func (*GenerationOutputLikeCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*GenerationOutputLikeCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*GenerationOutputLikeCreate) SetGenerationOutputs

SetGenerationOutputs sets the "generation_outputs" edge to the GenerationOutput entity.

func (*GenerationOutputLikeCreate) SetGenerationOutputsID

func (golc *GenerationOutputLikeCreate) SetGenerationOutputsID(id uuid.UUID) *GenerationOutputLikeCreate

SetGenerationOutputsID sets the "generation_outputs" edge to the GenerationOutput entity by ID.

func (*GenerationOutputLikeCreate) SetID

SetID sets the "id" field.

func (*GenerationOutputLikeCreate) SetLikedByUserID

SetLikedByUserID sets the "liked_by_user_id" field.

func (*GenerationOutputLikeCreate) SetNillableCreatedAt

func (golc *GenerationOutputLikeCreate) SetNillableCreatedAt(t *time.Time) *GenerationOutputLikeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*GenerationOutputLikeCreate) SetNillableID

SetNillableID sets the "id" field if the given value is not nil.

func (*GenerationOutputLikeCreate) SetOutputID

SetOutputID sets the "output_id" field.

func (*GenerationOutputLikeCreate) SetUsers

SetUsers sets the "users" edge to the User entity.

func (*GenerationOutputLikeCreate) SetUsersID

SetUsersID sets the "users" edge to the User entity by ID.

type GenerationOutputLikeCreateBulk

type GenerationOutputLikeCreateBulk struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeCreateBulk is the builder for creating many GenerationOutputLike entities in bulk.

func (*GenerationOutputLikeCreateBulk) Exec

Exec executes the query.

func (*GenerationOutputLikeCreateBulk) ExecContext

func (c *GenerationOutputLikeCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputLikeCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputLikeCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.GenerationOutputLike.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.GenerationOutputLikeUpsert) {
		SetOutputID(v+v).
	}).
	Exec(ctx)

func (*GenerationOutputLikeCreateBulk) OnConflictColumns

func (golcb *GenerationOutputLikeCreateBulk) OnConflictColumns(columns ...string) *GenerationOutputLikeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.GenerationOutputLike.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*GenerationOutputLikeCreateBulk) QueryContext

func (c *GenerationOutputLikeCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputLikeCreateBulk) Save

Save creates the GenerationOutputLike entities in the database.

func (*GenerationOutputLikeCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type GenerationOutputLikeDelete

type GenerationOutputLikeDelete struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeDelete is the builder for deleting a GenerationOutputLike entity.

func (*GenerationOutputLikeDelete) Exec

func (gold *GenerationOutputLikeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*GenerationOutputLikeDelete) ExecContext

func (c *GenerationOutputLikeDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputLikeDelete) ExecX

func (gold *GenerationOutputLikeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputLikeDelete) QueryContext

func (c *GenerationOutputLikeDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputLikeDelete) Where

Where appends a list predicates to the GenerationOutputLikeDelete builder.

type GenerationOutputLikeDeleteOne

type GenerationOutputLikeDeleteOne struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeDeleteOne is the builder for deleting a single GenerationOutputLike entity.

func (*GenerationOutputLikeDeleteOne) Exec

Exec executes the deletion query.

func (*GenerationOutputLikeDeleteOne) ExecX

func (goldo *GenerationOutputLikeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type GenerationOutputLikeEdges

type GenerationOutputLikeEdges struct {
	// GenerationOutputs holds the value of the generation_outputs edge.
	GenerationOutputs *GenerationOutput `json:"generation_outputs,omitempty"`
	// Users holds the value of the users edge.
	Users *User `json:"users,omitempty"`
	// contains filtered or unexported fields
}

GenerationOutputLikeEdges holds the relations/edges for other nodes in the graph.

func (GenerationOutputLikeEdges) GenerationOutputsOrErr

func (e GenerationOutputLikeEdges) GenerationOutputsOrErr() (*GenerationOutput, error)

GenerationOutputsOrErr returns the GenerationOutputs value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (GenerationOutputLikeEdges) UsersOrErr

func (e GenerationOutputLikeEdges) UsersOrErr() (*User, error)

UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type GenerationOutputLikeGroupBy

type GenerationOutputLikeGroupBy struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeGroupBy is the group-by builder for GenerationOutputLike entities.

func (*GenerationOutputLikeGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*GenerationOutputLikeGroupBy) Bool

func (s *GenerationOutputLikeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeGroupBy) BoolX

func (s *GenerationOutputLikeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GenerationOutputLikeGroupBy) Bools

func (s *GenerationOutputLikeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeGroupBy) BoolsX

func (s *GenerationOutputLikeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*GenerationOutputLikeGroupBy) Float64

func (s *GenerationOutputLikeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeGroupBy) Float64X

func (s *GenerationOutputLikeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GenerationOutputLikeGroupBy) Float64s

func (s *GenerationOutputLikeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeGroupBy) Float64sX

func (s *GenerationOutputLikeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GenerationOutputLikeGroupBy) Int

func (s *GenerationOutputLikeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeGroupBy) IntX

func (s *GenerationOutputLikeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GenerationOutputLikeGroupBy) Ints

func (s *GenerationOutputLikeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeGroupBy) IntsX

func (s *GenerationOutputLikeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GenerationOutputLikeGroupBy) Scan

func (golgb *GenerationOutputLikeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*GenerationOutputLikeGroupBy) ScanX

func (s *GenerationOutputLikeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GenerationOutputLikeGroupBy) String

func (s *GenerationOutputLikeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeGroupBy) StringX

func (s *GenerationOutputLikeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GenerationOutputLikeGroupBy) Strings

func (s *GenerationOutputLikeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeGroupBy) StringsX

func (s *GenerationOutputLikeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GenerationOutputLikeMutation

type GenerationOutputLikeMutation struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeMutation represents an operation that mutates the GenerationOutputLike nodes in the graph.

func (*GenerationOutputLikeMutation) AddField

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) AddedEdges

func (m *GenerationOutputLikeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*GenerationOutputLikeMutation) AddedField

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) AddedFields

func (m *GenerationOutputLikeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*GenerationOutputLikeMutation) AddedIDs

func (m *GenerationOutputLikeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*GenerationOutputLikeMutation) ClearEdge

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) ClearField

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) ClearGenerationOutputs

func (m *GenerationOutputLikeMutation) ClearGenerationOutputs()

ClearGenerationOutputs clears the "generation_outputs" edge to the GenerationOutput entity.

func (*GenerationOutputLikeMutation) ClearUsers

func (m *GenerationOutputLikeMutation) ClearUsers()

ClearUsers clears the "users" edge to the User entity.

func (*GenerationOutputLikeMutation) ClearedEdges

func (m *GenerationOutputLikeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*GenerationOutputLikeMutation) ClearedFields

func (m *GenerationOutputLikeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) CreatedAt

func (m *GenerationOutputLikeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*GenerationOutputLikeMutation) EdgeCleared

func (m *GenerationOutputLikeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*GenerationOutputLikeMutation) ExecContext

func (c *GenerationOutputLikeMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputLikeMutation) Field

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) FieldCleared

func (m *GenerationOutputLikeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*GenerationOutputLikeMutation) Fields

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) GenerationOutputsCleared

func (m *GenerationOutputLikeMutation) GenerationOutputsCleared() bool

GenerationOutputsCleared reports if the "generation_outputs" edge to the GenerationOutput entity was cleared.

func (*GenerationOutputLikeMutation) GenerationOutputsID

func (m *GenerationOutputLikeMutation) GenerationOutputsID() (id uuid.UUID, exists bool)

GenerationOutputsID returns the "generation_outputs" edge ID in the mutation.

func (*GenerationOutputLikeMutation) GenerationOutputsIDs

func (m *GenerationOutputLikeMutation) GenerationOutputsIDs() (ids []uuid.UUID)

GenerationOutputsIDs returns the "generation_outputs" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GenerationOutputsID instead. It exists only for internal usage by the builders.

func (*GenerationOutputLikeMutation) ID

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) LikedByUserID

func (m *GenerationOutputLikeMutation) LikedByUserID() (r uuid.UUID, exists bool)

LikedByUserID returns the value of the "liked_by_user_id" field in the mutation.

func (*GenerationOutputLikeMutation) OldCreatedAt

func (m *GenerationOutputLikeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the GenerationOutputLike entity. If the GenerationOutputLike 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 (*GenerationOutputLikeMutation) OldField

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) OldLikedByUserID

func (m *GenerationOutputLikeMutation) OldLikedByUserID(ctx context.Context) (v uuid.UUID, err error)

OldLikedByUserID returns the old "liked_by_user_id" field's value of the GenerationOutputLike entity. If the GenerationOutputLike 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 (*GenerationOutputLikeMutation) OldOutputID

func (m *GenerationOutputLikeMutation) OldOutputID(ctx context.Context) (v uuid.UUID, err error)

OldOutputID returns the old "output_id" field's value of the GenerationOutputLike entity. If the GenerationOutputLike 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 (*GenerationOutputLikeMutation) Op

Op returns the operation name.

func (*GenerationOutputLikeMutation) OutputID

func (m *GenerationOutputLikeMutation) OutputID() (r uuid.UUID, exists bool)

OutputID returns the value of the "output_id" field in the mutation.

func (*GenerationOutputLikeMutation) QueryContext

func (c *GenerationOutputLikeMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputLikeMutation) RemovedEdges

func (m *GenerationOutputLikeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*GenerationOutputLikeMutation) RemovedIDs

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) ResetCreatedAt

func (m *GenerationOutputLikeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*GenerationOutputLikeMutation) ResetEdge

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) ResetField

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) ResetGenerationOutputs

func (m *GenerationOutputLikeMutation) ResetGenerationOutputs()

ResetGenerationOutputs resets all changes to the "generation_outputs" edge.

func (*GenerationOutputLikeMutation) ResetLikedByUserID

func (m *GenerationOutputLikeMutation) ResetLikedByUserID()

ResetLikedByUserID resets all changes to the "liked_by_user_id" field.

func (*GenerationOutputLikeMutation) ResetOutputID

func (m *GenerationOutputLikeMutation) ResetOutputID()

ResetOutputID resets all changes to the "output_id" field.

func (*GenerationOutputLikeMutation) ResetUsers

func (m *GenerationOutputLikeMutation) ResetUsers()

ResetUsers resets all changes to the "users" edge.

func (*GenerationOutputLikeMutation) SetCreatedAt

func (m *GenerationOutputLikeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*GenerationOutputLikeMutation) SetField

func (m *GenerationOutputLikeMutation) 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 (*GenerationOutputLikeMutation) SetGenerationOutputsID

func (m *GenerationOutputLikeMutation) SetGenerationOutputsID(id uuid.UUID)

SetGenerationOutputsID sets the "generation_outputs" edge to the GenerationOutput entity by id.

func (*GenerationOutputLikeMutation) SetID

func (m *GenerationOutputLikeMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of GenerationOutputLike entities.

func (*GenerationOutputLikeMutation) SetLikedByUserID

func (m *GenerationOutputLikeMutation) SetLikedByUserID(u uuid.UUID)

SetLikedByUserID sets the "liked_by_user_id" field.

func (*GenerationOutputLikeMutation) SetOp

func (m *GenerationOutputLikeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GenerationOutputLikeMutation) SetOutputID

func (m *GenerationOutputLikeMutation) SetOutputID(u uuid.UUID)

SetOutputID sets the "output_id" field.

func (*GenerationOutputLikeMutation) SetUsersID

func (m *GenerationOutputLikeMutation) SetUsersID(id uuid.UUID)

SetUsersID sets the "users" edge to the User entity by id.

func (GenerationOutputLikeMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*GenerationOutputLikeMutation) Type

Type returns the node type of this mutation (GenerationOutputLike).

func (*GenerationOutputLikeMutation) UsersCleared

func (m *GenerationOutputLikeMutation) UsersCleared() bool

UsersCleared reports if the "users" edge to the User entity was cleared.

func (*GenerationOutputLikeMutation) UsersID

func (m *GenerationOutputLikeMutation) UsersID() (id uuid.UUID, exists bool)

UsersID returns the "users" edge ID in the mutation.

func (*GenerationOutputLikeMutation) UsersIDs

func (m *GenerationOutputLikeMutation) UsersIDs() (ids []uuid.UUID)

UsersIDs returns the "users" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UsersID instead. It exists only for internal usage by the builders.

func (*GenerationOutputLikeMutation) Where

Where appends a list predicates to the GenerationOutputLikeMutation builder.

func (*GenerationOutputLikeMutation) WhereP

func (m *GenerationOutputLikeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the GenerationOutputLikeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type GenerationOutputLikeQuery

type GenerationOutputLikeQuery struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeQuery is the builder for querying GenerationOutputLike entities.

func (*GenerationOutputLikeQuery) Aggregate

Aggregate returns a GenerationOutputLikeSelect configured with the given aggregations.

func (*GenerationOutputLikeQuery) All

All executes the query and returns a list of GenerationOutputLikes.

func (*GenerationOutputLikeQuery) AllX

AllX is like All, but panics if an error occurs.

func (*GenerationOutputLikeQuery) Clone

Clone returns a duplicate of the GenerationOutputLikeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*GenerationOutputLikeQuery) Count

func (golq *GenerationOutputLikeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GenerationOutputLikeQuery) CountX

func (golq *GenerationOutputLikeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*GenerationOutputLikeQuery) ExecContext

func (c *GenerationOutputLikeQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputLikeQuery) Exist

func (golq *GenerationOutputLikeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*GenerationOutputLikeQuery) ExistX

func (golq *GenerationOutputLikeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*GenerationOutputLikeQuery) First

First returns the first GenerationOutputLike entity from the query. Returns a *NotFoundError when no GenerationOutputLike was found.

func (*GenerationOutputLikeQuery) FirstID

func (golq *GenerationOutputLikeQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first GenerationOutputLike ID from the query. Returns a *NotFoundError when no GenerationOutputLike ID was found.

func (*GenerationOutputLikeQuery) FirstIDX

func (golq *GenerationOutputLikeQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*GenerationOutputLikeQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*GenerationOutputLikeQuery) GroupBy

func (golq *GenerationOutputLikeQuery) GroupBy(field string, fields ...string) *GenerationOutputLikeGroupBy

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 {
	OutputID uuid.UUID `json:"output_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.GenerationOutputLike.Query().
	GroupBy(generationoutputlike.FieldOutputID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GenerationOutputLikeQuery) IDs

IDs executes the query and returns a list of GenerationOutputLike IDs.

func (*GenerationOutputLikeQuery) IDsX

IDsX is like IDs, but panics if an error occurs.

func (*GenerationOutputLikeQuery) Limit

Limit the number of records to be returned by this query.

func (*GenerationOutputLikeQuery) Modify

func (golq *GenerationOutputLikeQuery) Modify(modifiers ...func(s *sql.Selector)) *GenerationOutputLikeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*GenerationOutputLikeQuery) Offset

Offset to start from.

func (*GenerationOutputLikeQuery) Only

Only returns a single GenerationOutputLike entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GenerationOutputLike entity is found. Returns a *NotFoundError when no GenerationOutputLike entities are found.

func (*GenerationOutputLikeQuery) OnlyID

func (golq *GenerationOutputLikeQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only GenerationOutputLike ID in the query. Returns a *NotSingularError when more than one GenerationOutputLike ID is found. Returns a *NotFoundError when no entities are found.

func (*GenerationOutputLikeQuery) OnlyIDX

func (golq *GenerationOutputLikeQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*GenerationOutputLikeQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*GenerationOutputLikeQuery) Order

Order specifies how the records should be ordered.

func (*GenerationOutputLikeQuery) QueryContext

func (c *GenerationOutputLikeQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputLikeQuery) QueryGenerationOutputs

func (golq *GenerationOutputLikeQuery) QueryGenerationOutputs() *GenerationOutputQuery

QueryGenerationOutputs chains the current query on the "generation_outputs" edge.

func (*GenerationOutputLikeQuery) QueryUsers

func (golq *GenerationOutputLikeQuery) QueryUsers() *UserQuery

QueryUsers chains the current query on the "users" edge.

func (*GenerationOutputLikeQuery) 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 {
	OutputID uuid.UUID `json:"output_id,omitempty"`
}

client.GenerationOutputLike.Query().
	Select(generationoutputlike.FieldOutputID).
	Scan(ctx, &v)

func (*GenerationOutputLikeQuery) 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 (*GenerationOutputLikeQuery) Where

Where adds a new predicate for the GenerationOutputLikeQuery builder.

func (*GenerationOutputLikeQuery) WithGenerationOutputs

func (golq *GenerationOutputLikeQuery) WithGenerationOutputs(opts ...func(*GenerationOutputQuery)) *GenerationOutputLikeQuery

WithGenerationOutputs tells the query-builder to eager-load the nodes that are connected to the "generation_outputs" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationOutputLikeQuery) WithUsers

func (golq *GenerationOutputLikeQuery) WithUsers(opts ...func(*UserQuery)) *GenerationOutputLikeQuery

WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.

type GenerationOutputLikeSelect

type GenerationOutputLikeSelect struct {
	*GenerationOutputLikeQuery
	// contains filtered or unexported fields
}

GenerationOutputLikeSelect is the builder for selecting fields of GenerationOutputLike entities.

func (*GenerationOutputLikeSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*GenerationOutputLikeSelect) Bool

func (s *GenerationOutputLikeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeSelect) BoolX

func (s *GenerationOutputLikeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GenerationOutputLikeSelect) Bools

func (s *GenerationOutputLikeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeSelect) BoolsX

func (s *GenerationOutputLikeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (GenerationOutputLikeSelect) ExecContext

func (c GenerationOutputLikeSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputLikeSelect) Float64

func (s *GenerationOutputLikeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeSelect) Float64X

func (s *GenerationOutputLikeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GenerationOutputLikeSelect) Float64s

func (s *GenerationOutputLikeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeSelect) Float64sX

func (s *GenerationOutputLikeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GenerationOutputLikeSelect) Int

func (s *GenerationOutputLikeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeSelect) IntX

func (s *GenerationOutputLikeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GenerationOutputLikeSelect) Ints

func (s *GenerationOutputLikeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeSelect) IntsX

func (s *GenerationOutputLikeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GenerationOutputLikeSelect) Modify

func (gols *GenerationOutputLikeSelect) Modify(modifiers ...func(s *sql.Selector)) *GenerationOutputLikeSelect

Modify adds a query modifier for attaching custom logic to queries.

func (GenerationOutputLikeSelect) QueryContext

func (c GenerationOutputLikeSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputLikeSelect) Scan

func (gols *GenerationOutputLikeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*GenerationOutputLikeSelect) ScanX

func (s *GenerationOutputLikeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GenerationOutputLikeSelect) String

func (s *GenerationOutputLikeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeSelect) StringX

func (s *GenerationOutputLikeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GenerationOutputLikeSelect) Strings

func (s *GenerationOutputLikeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GenerationOutputLikeSelect) StringsX

func (s *GenerationOutputLikeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GenerationOutputLikeUpdate

type GenerationOutputLikeUpdate struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeUpdate is the builder for updating GenerationOutputLike entities.

func (*GenerationOutputLikeUpdate) ClearGenerationOutputs

func (golu *GenerationOutputLikeUpdate) ClearGenerationOutputs() *GenerationOutputLikeUpdate

ClearGenerationOutputs clears the "generation_outputs" edge to the GenerationOutput entity.

func (*GenerationOutputLikeUpdate) ClearUsers

ClearUsers clears the "users" edge to the User entity.

func (*GenerationOutputLikeUpdate) Exec

Exec executes the query.

func (*GenerationOutputLikeUpdate) ExecContext

func (c *GenerationOutputLikeUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputLikeUpdate) ExecX

func (golu *GenerationOutputLikeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputLikeUpdate) Modify

func (golu *GenerationOutputLikeUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GenerationOutputLikeUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*GenerationOutputLikeUpdate) Mutation

Mutation returns the GenerationOutputLikeMutation object of the builder.

func (*GenerationOutputLikeUpdate) QueryContext

func (c *GenerationOutputLikeUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputLikeUpdate) Save

func (golu *GenerationOutputLikeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*GenerationOutputLikeUpdate) SaveX

func (golu *GenerationOutputLikeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GenerationOutputLikeUpdate) SetGenerationOutputs

SetGenerationOutputs sets the "generation_outputs" edge to the GenerationOutput entity.

func (*GenerationOutputLikeUpdate) SetGenerationOutputsID

func (golu *GenerationOutputLikeUpdate) SetGenerationOutputsID(id uuid.UUID) *GenerationOutputLikeUpdate

SetGenerationOutputsID sets the "generation_outputs" edge to the GenerationOutput entity by ID.

func (*GenerationOutputLikeUpdate) SetLikedByUserID

SetLikedByUserID sets the "liked_by_user_id" field.

func (*GenerationOutputLikeUpdate) SetOutputID

SetOutputID sets the "output_id" field.

func (*GenerationOutputLikeUpdate) SetUsers

SetUsers sets the "users" edge to the User entity.

func (*GenerationOutputLikeUpdate) SetUsersID

SetUsersID sets the "users" edge to the User entity by ID.

func (*GenerationOutputLikeUpdate) Where

Where appends a list predicates to the GenerationOutputLikeUpdate builder.

type GenerationOutputLikeUpdateOne

type GenerationOutputLikeUpdateOne struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeUpdateOne is the builder for updating a single GenerationOutputLike entity.

func (*GenerationOutputLikeUpdateOne) ClearGenerationOutputs

func (goluo *GenerationOutputLikeUpdateOne) ClearGenerationOutputs() *GenerationOutputLikeUpdateOne

ClearGenerationOutputs clears the "generation_outputs" edge to the GenerationOutput entity.

func (*GenerationOutputLikeUpdateOne) ClearUsers

ClearUsers clears the "users" edge to the User entity.

func (*GenerationOutputLikeUpdateOne) Exec

Exec executes the query on the entity.

func (*GenerationOutputLikeUpdateOne) ExecContext

func (c *GenerationOutputLikeUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputLikeUpdateOne) ExecX

func (goluo *GenerationOutputLikeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputLikeUpdateOne) Modify

func (goluo *GenerationOutputLikeUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GenerationOutputLikeUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*GenerationOutputLikeUpdateOne) Mutation

Mutation returns the GenerationOutputLikeMutation object of the builder.

func (*GenerationOutputLikeUpdateOne) QueryContext

func (c *GenerationOutputLikeUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputLikeUpdateOne) Save

Save executes the query and returns the updated GenerationOutputLike entity.

func (*GenerationOutputLikeUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*GenerationOutputLikeUpdateOne) 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 (*GenerationOutputLikeUpdateOne) SetGenerationOutputs

SetGenerationOutputs sets the "generation_outputs" edge to the GenerationOutput entity.

func (*GenerationOutputLikeUpdateOne) SetGenerationOutputsID

func (goluo *GenerationOutputLikeUpdateOne) SetGenerationOutputsID(id uuid.UUID) *GenerationOutputLikeUpdateOne

SetGenerationOutputsID sets the "generation_outputs" edge to the GenerationOutput entity by ID.

func (*GenerationOutputLikeUpdateOne) SetLikedByUserID

SetLikedByUserID sets the "liked_by_user_id" field.

func (*GenerationOutputLikeUpdateOne) SetOutputID

SetOutputID sets the "output_id" field.

func (*GenerationOutputLikeUpdateOne) SetUsers

SetUsers sets the "users" edge to the User entity.

func (*GenerationOutputLikeUpdateOne) SetUsersID

SetUsersID sets the "users" edge to the User entity by ID.

type GenerationOutputLikeUpsert

type GenerationOutputLikeUpsert struct {
	*sql.UpdateSet
}

GenerationOutputLikeUpsert is the "OnConflict" setter.

func (*GenerationOutputLikeUpsert) SetLikedByUserID

SetLikedByUserID sets the "liked_by_user_id" field.

func (*GenerationOutputLikeUpsert) SetOutputID

SetOutputID sets the "output_id" field.

func (*GenerationOutputLikeUpsert) UpdateLikedByUserID

func (u *GenerationOutputLikeUpsert) UpdateLikedByUserID() *GenerationOutputLikeUpsert

UpdateLikedByUserID sets the "liked_by_user_id" field to the value that was provided on create.

func (*GenerationOutputLikeUpsert) UpdateOutputID

UpdateOutputID sets the "output_id" field to the value that was provided on create.

type GenerationOutputLikeUpsertBulk

type GenerationOutputLikeUpsertBulk struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeUpsertBulk is the builder for "upsert"-ing a bulk of GenerationOutputLike nodes.

func (*GenerationOutputLikeUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GenerationOutputLikeUpsertBulk) Exec

Exec executes the query.

func (*GenerationOutputLikeUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputLikeUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GenerationOutputLike.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GenerationOutputLikeUpsertBulk) SetLikedByUserID

SetLikedByUserID sets the "liked_by_user_id" field.

func (*GenerationOutputLikeUpsertBulk) SetOutputID

SetOutputID sets the "output_id" field.

func (*GenerationOutputLikeUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the GenerationOutputLikeCreateBulk.OnConflict documentation for more info.

func (*GenerationOutputLikeUpsertBulk) UpdateLikedByUserID

UpdateLikedByUserID sets the "liked_by_user_id" field to the value that was provided on create.

func (*GenerationOutputLikeUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GenerationOutputLike.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(generationoutputlike.FieldID)
		}),
	).
	Exec(ctx)

func (*GenerationOutputLikeUpsertBulk) UpdateOutputID

UpdateOutputID sets the "output_id" field to the value that was provided on create.

type GenerationOutputLikeUpsertOne

type GenerationOutputLikeUpsertOne struct {
	// contains filtered or unexported fields
}

GenerationOutputLikeUpsertOne is the builder for "upsert"-ing

one GenerationOutputLike node.

func (*GenerationOutputLikeUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GenerationOutputLikeUpsertOne) Exec

Exec executes the query.

func (*GenerationOutputLikeUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputLikeUpsertOne) ID

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GenerationOutputLikeUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*GenerationOutputLikeUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GenerationOutputLike.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GenerationOutputLikeUpsertOne) SetLikedByUserID

SetLikedByUserID sets the "liked_by_user_id" field.

func (*GenerationOutputLikeUpsertOne) SetOutputID

SetOutputID sets the "output_id" field.

func (*GenerationOutputLikeUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the GenerationOutputLikeCreate.OnConflict documentation for more info.

func (*GenerationOutputLikeUpsertOne) UpdateLikedByUserID

UpdateLikedByUserID sets the "liked_by_user_id" field to the value that was provided on create.

func (*GenerationOutputLikeUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.GenerationOutputLike.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(generationoutputlike.FieldID)
		}),
	).
	Exec(ctx)

func (*GenerationOutputLikeUpsertOne) UpdateOutputID

UpdateOutputID sets the "output_id" field to the value that was provided on create.

type GenerationOutputLikes

type GenerationOutputLikes []*GenerationOutputLike

GenerationOutputLikes is a parsable slice of GenerationOutputLike.

type GenerationOutputMutation

type GenerationOutputMutation struct {
	// contains filtered or unexported fields
}

GenerationOutputMutation represents an operation that mutates the GenerationOutput nodes in the graph.

func (*GenerationOutputMutation) AddAestheticArtifactScore

func (m *GenerationOutputMutation) AddAestheticArtifactScore(f float32)

AddAestheticArtifactScore adds f to the "aesthetic_artifact_score" field.

func (*GenerationOutputMutation) AddAestheticRatingScore

func (m *GenerationOutputMutation) AddAestheticRatingScore(f float32)

AddAestheticRatingScore adds f to the "aesthetic_rating_score" field.

func (*GenerationOutputMutation) AddField

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) AddGenerationOutputLikeIDs

func (m *GenerationOutputMutation) AddGenerationOutputLikeIDs(ids ...uuid.UUID)

AddGenerationOutputLikeIDs adds the "generation_output_likes" edge to the GenerationOutputLike entity by ids.

func (*GenerationOutputMutation) AddLikeCount

func (m *GenerationOutputMutation) AddLikeCount(i int)

AddLikeCount adds i to the "like_count" field.

func (*GenerationOutputMutation) AddedAestheticArtifactScore

func (m *GenerationOutputMutation) AddedAestheticArtifactScore() (r float32, exists bool)

AddedAestheticArtifactScore returns the value that was added to the "aesthetic_artifact_score" field in this mutation.

func (*GenerationOutputMutation) AddedAestheticRatingScore

func (m *GenerationOutputMutation) AddedAestheticRatingScore() (r float32, exists bool)

AddedAestheticRatingScore returns the value that was added to the "aesthetic_rating_score" field in this mutation.

func (*GenerationOutputMutation) AddedEdges

func (m *GenerationOutputMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*GenerationOutputMutation) AddedField

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) AddedFields

func (m *GenerationOutputMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*GenerationOutputMutation) AddedIDs

func (m *GenerationOutputMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*GenerationOutputMutation) AddedLikeCount

func (m *GenerationOutputMutation) AddedLikeCount() (r int, exists bool)

AddedLikeCount returns the value that was added to the "like_count" field in this mutation.

func (*GenerationOutputMutation) AestheticArtifactScore

func (m *GenerationOutputMutation) AestheticArtifactScore() (r float32, exists bool)

AestheticArtifactScore returns the value of the "aesthetic_artifact_score" field in the mutation.

func (*GenerationOutputMutation) AestheticRatingScore

func (m *GenerationOutputMutation) AestheticRatingScore() (r float32, exists bool)

AestheticRatingScore returns the value of the "aesthetic_rating_score" field in the mutation.

func (*GenerationOutputMutation) ClearDeletedAt

func (m *GenerationOutputMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*GenerationOutputMutation) ClearEdge

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) ClearField

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) ClearGenerationOutputLikes

func (m *GenerationOutputMutation) ClearGenerationOutputLikes()

ClearGenerationOutputLikes clears the "generation_output_likes" edge to the GenerationOutputLike entity.

func (*GenerationOutputMutation) ClearGenerations

func (m *GenerationOutputMutation) ClearGenerations()

ClearGenerations clears the "generations" edge to the Generation entity.

func (*GenerationOutputMutation) ClearUpscaleOutputs

func (m *GenerationOutputMutation) ClearUpscaleOutputs()

ClearUpscaleOutputs clears the "upscale_outputs" edge to the UpscaleOutput entity.

func (*GenerationOutputMutation) ClearUpscaledImagePath

func (m *GenerationOutputMutation) ClearUpscaledImagePath()

ClearUpscaledImagePath clears the value of the "upscaled_image_path" field.

func (*GenerationOutputMutation) ClearedEdges

func (m *GenerationOutputMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*GenerationOutputMutation) ClearedFields

func (m *GenerationOutputMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (GenerationOutputMutation) Client

func (m GenerationOutputMutation) 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 (*GenerationOutputMutation) CreatedAt

func (m *GenerationOutputMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*GenerationOutputMutation) DeletedAt

func (m *GenerationOutputMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*GenerationOutputMutation) DeletedAtCleared

func (m *GenerationOutputMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*GenerationOutputMutation) EdgeCleared

func (m *GenerationOutputMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*GenerationOutputMutation) ExecContext

func (c *GenerationOutputMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputMutation) Field

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) FieldCleared

func (m *GenerationOutputMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*GenerationOutputMutation) Fields

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) GalleryStatus

func (m *GenerationOutputMutation) GalleryStatus() (r generationoutput.GalleryStatus, exists bool)

GalleryStatus returns the value of the "gallery_status" field in the mutation.

func (*GenerationOutputMutation) GenerationID

func (m *GenerationOutputMutation) GenerationID() (r uuid.UUID, exists bool)

GenerationID returns the value of the "generation_id" field in the mutation.

func (*GenerationOutputMutation) GenerationOutputLikesCleared

func (m *GenerationOutputMutation) GenerationOutputLikesCleared() bool

GenerationOutputLikesCleared reports if the "generation_output_likes" edge to the GenerationOutputLike entity was cleared.

func (*GenerationOutputMutation) GenerationOutputLikesIDs

func (m *GenerationOutputMutation) GenerationOutputLikesIDs() (ids []uuid.UUID)

GenerationOutputLikesIDs returns the "generation_output_likes" edge IDs in the mutation.

func (*GenerationOutputMutation) GenerationsCleared

func (m *GenerationOutputMutation) GenerationsCleared() bool

GenerationsCleared reports if the "generations" edge to the Generation entity was cleared.

func (*GenerationOutputMutation) GenerationsID

func (m *GenerationOutputMutation) GenerationsID() (id uuid.UUID, exists bool)

GenerationsID returns the "generations" edge ID in the mutation.

func (*GenerationOutputMutation) GenerationsIDs

func (m *GenerationOutputMutation) GenerationsIDs() (ids []uuid.UUID)

GenerationsIDs returns the "generations" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GenerationsID instead. It exists only for internal usage by the builders.

func (*GenerationOutputMutation) HasEmbeddings

func (m *GenerationOutputMutation) HasEmbeddings() (r bool, exists bool)

HasEmbeddings returns the value of the "has_embeddings" field in the mutation.

func (*GenerationOutputMutation) HasEmbeddingsNew

func (m *GenerationOutputMutation) HasEmbeddingsNew() (r bool, exists bool)

HasEmbeddingsNew returns the value of the "has_embeddings_new" field in the mutation.

func (*GenerationOutputMutation) ID

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) 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 (*GenerationOutputMutation) ImagePath

func (m *GenerationOutputMutation) ImagePath() (r string, exists bool)

ImagePath returns the value of the "image_path" field in the mutation.

func (*GenerationOutputMutation) IsFavorited

func (m *GenerationOutputMutation) IsFavorited() (r bool, exists bool)

IsFavorited returns the value of the "is_favorited" field in the mutation.

func (*GenerationOutputMutation) IsPublic

func (m *GenerationOutputMutation) IsPublic() (r bool, exists bool)

IsPublic returns the value of the "is_public" field in the mutation.

func (*GenerationOutputMutation) LikeCount

func (m *GenerationOutputMutation) LikeCount() (r int, exists bool)

LikeCount returns the value of the "like_count" field in the mutation.

func (*GenerationOutputMutation) OldAestheticArtifactScore

func (m *GenerationOutputMutation) OldAestheticArtifactScore(ctx context.Context) (v float32, err error)

OldAestheticArtifactScore returns the old "aesthetic_artifact_score" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldAestheticRatingScore

func (m *GenerationOutputMutation) OldAestheticRatingScore(ctx context.Context) (v float32, err error)

OldAestheticRatingScore returns the old "aesthetic_rating_score" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldCreatedAt

func (m *GenerationOutputMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldDeletedAt

func (m *GenerationOutputMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldField

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) OldGalleryStatus

func (m *GenerationOutputMutation) OldGalleryStatus(ctx context.Context) (v generationoutput.GalleryStatus, err error)

OldGalleryStatus returns the old "gallery_status" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldGenerationID

func (m *GenerationOutputMutation) OldGenerationID(ctx context.Context) (v uuid.UUID, err error)

OldGenerationID returns the old "generation_id" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldHasEmbeddings

func (m *GenerationOutputMutation) OldHasEmbeddings(ctx context.Context) (v bool, err error)

OldHasEmbeddings returns the old "has_embeddings" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldHasEmbeddingsNew

func (m *GenerationOutputMutation) OldHasEmbeddingsNew(ctx context.Context) (v bool, err error)

OldHasEmbeddingsNew returns the old "has_embeddings_new" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldImagePath

func (m *GenerationOutputMutation) OldImagePath(ctx context.Context) (v string, err error)

OldImagePath returns the old "image_path" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldIsFavorited

func (m *GenerationOutputMutation) OldIsFavorited(ctx context.Context) (v bool, err error)

OldIsFavorited returns the old "is_favorited" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldIsPublic

func (m *GenerationOutputMutation) OldIsPublic(ctx context.Context) (v bool, err error)

OldIsPublic returns the old "is_public" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldLikeCount

func (m *GenerationOutputMutation) OldLikeCount(ctx context.Context) (v int, err error)

OldLikeCount returns the old "like_count" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldUpdatedAt

func (m *GenerationOutputMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) OldUpscaledImagePath

func (m *GenerationOutputMutation) OldUpscaledImagePath(ctx context.Context) (v *string, err error)

OldUpscaledImagePath returns the old "upscaled_image_path" field's value of the GenerationOutput entity. If the GenerationOutput 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 (*GenerationOutputMutation) Op

func (m *GenerationOutputMutation) Op() Op

Op returns the operation name.

func (*GenerationOutputMutation) QueryContext

func (c *GenerationOutputMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputMutation) RemoveGenerationOutputLikeIDs

func (m *GenerationOutputMutation) RemoveGenerationOutputLikeIDs(ids ...uuid.UUID)

RemoveGenerationOutputLikeIDs removes the "generation_output_likes" edge to the GenerationOutputLike entity by IDs.

func (*GenerationOutputMutation) RemovedEdges

func (m *GenerationOutputMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*GenerationOutputMutation) RemovedGenerationOutputLikesIDs

func (m *GenerationOutputMutation) RemovedGenerationOutputLikesIDs() (ids []uuid.UUID)

RemovedGenerationOutputLikes returns the removed IDs of the "generation_output_likes" edge to the GenerationOutputLike entity.

func (*GenerationOutputMutation) RemovedIDs

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) ResetAestheticArtifactScore

func (m *GenerationOutputMutation) ResetAestheticArtifactScore()

ResetAestheticArtifactScore resets all changes to the "aesthetic_artifact_score" field.

func (*GenerationOutputMutation) ResetAestheticRatingScore

func (m *GenerationOutputMutation) ResetAestheticRatingScore()

ResetAestheticRatingScore resets all changes to the "aesthetic_rating_score" field.

func (*GenerationOutputMutation) ResetCreatedAt

func (m *GenerationOutputMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*GenerationOutputMutation) ResetDeletedAt

func (m *GenerationOutputMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*GenerationOutputMutation) ResetEdge

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) ResetField

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) ResetGalleryStatus

func (m *GenerationOutputMutation) ResetGalleryStatus()

ResetGalleryStatus resets all changes to the "gallery_status" field.

func (*GenerationOutputMutation) ResetGenerationID

func (m *GenerationOutputMutation) ResetGenerationID()

ResetGenerationID resets all changes to the "generation_id" field.

func (*GenerationOutputMutation) ResetGenerationOutputLikes

func (m *GenerationOutputMutation) ResetGenerationOutputLikes()

ResetGenerationOutputLikes resets all changes to the "generation_output_likes" edge.

func (*GenerationOutputMutation) ResetGenerations

func (m *GenerationOutputMutation) ResetGenerations()

ResetGenerations resets all changes to the "generations" edge.

func (*GenerationOutputMutation) ResetHasEmbeddings

func (m *GenerationOutputMutation) ResetHasEmbeddings()

ResetHasEmbeddings resets all changes to the "has_embeddings" field.

func (*GenerationOutputMutation) ResetHasEmbeddingsNew

func (m *GenerationOutputMutation) ResetHasEmbeddingsNew()

ResetHasEmbeddingsNew resets all changes to the "has_embeddings_new" field.

func (*GenerationOutputMutation) ResetImagePath

func (m *GenerationOutputMutation) ResetImagePath()

ResetImagePath resets all changes to the "image_path" field.

func (*GenerationOutputMutation) ResetIsFavorited

func (m *GenerationOutputMutation) ResetIsFavorited()

ResetIsFavorited resets all changes to the "is_favorited" field.

func (*GenerationOutputMutation) ResetIsPublic

func (m *GenerationOutputMutation) ResetIsPublic()

ResetIsPublic resets all changes to the "is_public" field.

func (*GenerationOutputMutation) ResetLikeCount

func (m *GenerationOutputMutation) ResetLikeCount()

ResetLikeCount resets all changes to the "like_count" field.

func (*GenerationOutputMutation) ResetUpdatedAt

func (m *GenerationOutputMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*GenerationOutputMutation) ResetUpscaleOutputs

func (m *GenerationOutputMutation) ResetUpscaleOutputs()

ResetUpscaleOutputs resets all changes to the "upscale_outputs" edge.

func (*GenerationOutputMutation) ResetUpscaledImagePath

func (m *GenerationOutputMutation) ResetUpscaledImagePath()

ResetUpscaledImagePath resets all changes to the "upscaled_image_path" field.

func (*GenerationOutputMutation) SetAestheticArtifactScore

func (m *GenerationOutputMutation) SetAestheticArtifactScore(f float32)

SetAestheticArtifactScore sets the "aesthetic_artifact_score" field.

func (*GenerationOutputMutation) SetAestheticRatingScore

func (m *GenerationOutputMutation) SetAestheticRatingScore(f float32)

SetAestheticRatingScore sets the "aesthetic_rating_score" field.

func (*GenerationOutputMutation) SetCreatedAt

func (m *GenerationOutputMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*GenerationOutputMutation) SetDeletedAt

func (m *GenerationOutputMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*GenerationOutputMutation) SetField

func (m *GenerationOutputMutation) 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 (*GenerationOutputMutation) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*GenerationOutputMutation) SetGenerationID

func (m *GenerationOutputMutation) SetGenerationID(u uuid.UUID)

SetGenerationID sets the "generation_id" field.

func (*GenerationOutputMutation) SetGenerationsID

func (m *GenerationOutputMutation) SetGenerationsID(id uuid.UUID)

SetGenerationsID sets the "generations" edge to the Generation entity by id.

func (*GenerationOutputMutation) SetHasEmbeddings

func (m *GenerationOutputMutation) SetHasEmbeddings(b bool)

SetHasEmbeddings sets the "has_embeddings" field.

func (*GenerationOutputMutation) SetHasEmbeddingsNew

func (m *GenerationOutputMutation) SetHasEmbeddingsNew(b bool)

SetHasEmbeddingsNew sets the "has_embeddings_new" field.

func (*GenerationOutputMutation) SetID

func (m *GenerationOutputMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of GenerationOutput entities.

func (*GenerationOutputMutation) SetImagePath

func (m *GenerationOutputMutation) SetImagePath(s string)

SetImagePath sets the "image_path" field.

func (*GenerationOutputMutation) SetIsFavorited

func (m *GenerationOutputMutation) SetIsFavorited(b bool)

SetIsFavorited sets the "is_favorited" field.

func (*GenerationOutputMutation) SetIsPublic

func (m *GenerationOutputMutation) SetIsPublic(b bool)

SetIsPublic sets the "is_public" field.

func (*GenerationOutputMutation) SetLikeCount

func (m *GenerationOutputMutation) SetLikeCount(i int)

SetLikeCount sets the "like_count" field.

func (*GenerationOutputMutation) SetOp

func (m *GenerationOutputMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*GenerationOutputMutation) SetUpdatedAt

func (m *GenerationOutputMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*GenerationOutputMutation) SetUpscaleOutputsID

func (m *GenerationOutputMutation) SetUpscaleOutputsID(id uuid.UUID)

SetUpscaleOutputsID sets the "upscale_outputs" edge to the UpscaleOutput entity by id.

func (*GenerationOutputMutation) SetUpscaledImagePath

func (m *GenerationOutputMutation) SetUpscaledImagePath(s string)

SetUpscaledImagePath sets the "upscaled_image_path" field.

func (GenerationOutputMutation) Tx

func (m GenerationOutputMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*GenerationOutputMutation) Type

func (m *GenerationOutputMutation) Type() string

Type returns the node type of this mutation (GenerationOutput).

func (*GenerationOutputMutation) UpdatedAt

func (m *GenerationOutputMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*GenerationOutputMutation) UpscaleOutputsCleared

func (m *GenerationOutputMutation) UpscaleOutputsCleared() bool

UpscaleOutputsCleared reports if the "upscale_outputs" edge to the UpscaleOutput entity was cleared.

func (*GenerationOutputMutation) UpscaleOutputsID

func (m *GenerationOutputMutation) UpscaleOutputsID() (id uuid.UUID, exists bool)

UpscaleOutputsID returns the "upscale_outputs" edge ID in the mutation.

func (*GenerationOutputMutation) UpscaleOutputsIDs

func (m *GenerationOutputMutation) UpscaleOutputsIDs() (ids []uuid.UUID)

UpscaleOutputsIDs returns the "upscale_outputs" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UpscaleOutputsID instead. It exists only for internal usage by the builders.

func (*GenerationOutputMutation) UpscaledImagePath

func (m *GenerationOutputMutation) UpscaledImagePath() (r string, exists bool)

UpscaledImagePath returns the value of the "upscaled_image_path" field in the mutation.

func (*GenerationOutputMutation) UpscaledImagePathCleared

func (m *GenerationOutputMutation) UpscaledImagePathCleared() bool

UpscaledImagePathCleared returns if the "upscaled_image_path" field was cleared in this mutation.

func (*GenerationOutputMutation) Where

Where appends a list predicates to the GenerationOutputMutation builder.

func (*GenerationOutputMutation) WhereP

func (m *GenerationOutputMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the GenerationOutputMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type GenerationOutputQuery

type GenerationOutputQuery struct {
	// contains filtered or unexported fields
}

GenerationOutputQuery is the builder for querying GenerationOutput entities.

func (*GenerationOutputQuery) Aggregate

Aggregate returns a GenerationOutputSelect configured with the given aggregations.

func (*GenerationOutputQuery) All

All executes the query and returns a list of GenerationOutputs.

func (*GenerationOutputQuery) AllX

AllX is like All, but panics if an error occurs.

func (*GenerationOutputQuery) Clone

Clone returns a duplicate of the GenerationOutputQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*GenerationOutputQuery) Count

func (goq *GenerationOutputQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GenerationOutputQuery) CountX

func (goq *GenerationOutputQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*GenerationOutputQuery) ExecContext

func (c *GenerationOutputQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputQuery) Exist

func (goq *GenerationOutputQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*GenerationOutputQuery) ExistX

func (goq *GenerationOutputQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*GenerationOutputQuery) First

First returns the first GenerationOutput entity from the query. Returns a *NotFoundError when no GenerationOutput was found.

func (*GenerationOutputQuery) FirstID

func (goq *GenerationOutputQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first GenerationOutput ID from the query. Returns a *NotFoundError when no GenerationOutput ID was found.

func (*GenerationOutputQuery) FirstIDX

func (goq *GenerationOutputQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*GenerationOutputQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*GenerationOutputQuery) GroupBy

func (goq *GenerationOutputQuery) GroupBy(field string, fields ...string) *GenerationOutputGroupBy

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 {
	ImagePath string `json:"image_path,omitempty"`
	Count int `json:"count,omitempty"`
}

client.GenerationOutput.Query().
	GroupBy(generationoutput.FieldImagePath).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GenerationOutputQuery) IDs

func (goq *GenerationOutputQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of GenerationOutput IDs.

func (*GenerationOutputQuery) IDsX

func (goq *GenerationOutputQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*GenerationOutputQuery) Limit

func (goq *GenerationOutputQuery) Limit(limit int) *GenerationOutputQuery

Limit the number of records to be returned by this query.

func (*GenerationOutputQuery) Modify

func (goq *GenerationOutputQuery) Modify(modifiers ...func(s *sql.Selector)) *GenerationOutputSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*GenerationOutputQuery) Offset

func (goq *GenerationOutputQuery) Offset(offset int) *GenerationOutputQuery

Offset to start from.

func (*GenerationOutputQuery) Only

Only returns a single GenerationOutput entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GenerationOutput entity is found. Returns a *NotFoundError when no GenerationOutput entities are found.

func (*GenerationOutputQuery) OnlyID

func (goq *GenerationOutputQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only GenerationOutput ID in the query. Returns a *NotSingularError when more than one GenerationOutput ID is found. Returns a *NotFoundError when no entities are found.

func (*GenerationOutputQuery) OnlyIDX

func (goq *GenerationOutputQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*GenerationOutputQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*GenerationOutputQuery) Order

Order specifies how the records should be ordered.

func (*GenerationOutputQuery) QueryContext

func (c *GenerationOutputQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputQuery) QueryGenerationOutputLikes

func (goq *GenerationOutputQuery) QueryGenerationOutputLikes() *GenerationOutputLikeQuery

QueryGenerationOutputLikes chains the current query on the "generation_output_likes" edge.

func (*GenerationOutputQuery) QueryGenerations

func (goq *GenerationOutputQuery) QueryGenerations() *GenerationQuery

QueryGenerations chains the current query on the "generations" edge.

func (*GenerationOutputQuery) QueryUpscaleOutputs

func (goq *GenerationOutputQuery) QueryUpscaleOutputs() *UpscaleOutputQuery

QueryUpscaleOutputs chains the current query on the "upscale_outputs" edge.

func (*GenerationOutputQuery) Select

func (goq *GenerationOutputQuery) Select(fields ...string) *GenerationOutputSelect

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 {
	ImagePath string `json:"image_path,omitempty"`
}

client.GenerationOutput.Query().
	Select(generationoutput.FieldImagePath).
	Scan(ctx, &v)

func (*GenerationOutputQuery) Unique

func (goq *GenerationOutputQuery) Unique(unique bool) *GenerationOutputQuery

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 (*GenerationOutputQuery) Where

Where adds a new predicate for the GenerationOutputQuery builder.

func (*GenerationOutputQuery) WithGenerationOutputLikes

func (goq *GenerationOutputQuery) WithGenerationOutputLikes(opts ...func(*GenerationOutputLikeQuery)) *GenerationOutputQuery

WithGenerationOutputLikes tells the query-builder to eager-load the nodes that are connected to the "generation_output_likes" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationOutputQuery) WithGenerations

func (goq *GenerationOutputQuery) WithGenerations(opts ...func(*GenerationQuery)) *GenerationOutputQuery

WithGenerations tells the query-builder to eager-load the nodes that are connected to the "generations" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationOutputQuery) WithUpscaleOutputs

func (goq *GenerationOutputQuery) WithUpscaleOutputs(opts ...func(*UpscaleOutputQuery)) *GenerationOutputQuery

WithUpscaleOutputs tells the query-builder to eager-load the nodes that are connected to the "upscale_outputs" edge. The optional arguments are used to configure the query builder of the edge.

type GenerationOutputSelect

type GenerationOutputSelect struct {
	*GenerationOutputQuery
	// contains filtered or unexported fields
}

GenerationOutputSelect is the builder for selecting fields of GenerationOutput entities.

func (*GenerationOutputSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*GenerationOutputSelect) Bool

func (s *GenerationOutputSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GenerationOutputSelect) BoolX

func (s *GenerationOutputSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GenerationOutputSelect) Bools

func (s *GenerationOutputSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GenerationOutputSelect) BoolsX

func (s *GenerationOutputSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (GenerationOutputSelect) ExecContext

func (c GenerationOutputSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputSelect) Float64

func (s *GenerationOutputSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GenerationOutputSelect) Float64X

func (s *GenerationOutputSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GenerationOutputSelect) Float64s

func (s *GenerationOutputSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GenerationOutputSelect) Float64sX

func (s *GenerationOutputSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GenerationOutputSelect) Int

func (s *GenerationOutputSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GenerationOutputSelect) IntX

func (s *GenerationOutputSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GenerationOutputSelect) Ints

func (s *GenerationOutputSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GenerationOutputSelect) IntsX

func (s *GenerationOutputSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GenerationOutputSelect) Modify

func (gos *GenerationOutputSelect) Modify(modifiers ...func(s *sql.Selector)) *GenerationOutputSelect

Modify adds a query modifier for attaching custom logic to queries.

func (GenerationOutputSelect) QueryContext

func (c GenerationOutputSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputSelect) Scan

func (gos *GenerationOutputSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*GenerationOutputSelect) ScanX

func (s *GenerationOutputSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GenerationOutputSelect) String

func (s *GenerationOutputSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GenerationOutputSelect) StringX

func (s *GenerationOutputSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GenerationOutputSelect) Strings

func (s *GenerationOutputSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GenerationOutputSelect) StringsX

func (s *GenerationOutputSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GenerationOutputUpdate

type GenerationOutputUpdate struct {
	// contains filtered or unexported fields
}

GenerationOutputUpdate is the builder for updating GenerationOutput entities.

func (*GenerationOutputUpdate) AddAestheticArtifactScore

func (gou *GenerationOutputUpdate) AddAestheticArtifactScore(f float32) *GenerationOutputUpdate

AddAestheticArtifactScore adds f to the "aesthetic_artifact_score" field.

func (*GenerationOutputUpdate) AddAestheticRatingScore

func (gou *GenerationOutputUpdate) AddAestheticRatingScore(f float32) *GenerationOutputUpdate

AddAestheticRatingScore adds f to the "aesthetic_rating_score" field.

func (*GenerationOutputUpdate) AddGenerationOutputLikeIDs

func (gou *GenerationOutputUpdate) AddGenerationOutputLikeIDs(ids ...uuid.UUID) *GenerationOutputUpdate

AddGenerationOutputLikeIDs adds the "generation_output_likes" edge to the GenerationOutputLike entity by IDs.

func (*GenerationOutputUpdate) AddGenerationOutputLikes

func (gou *GenerationOutputUpdate) AddGenerationOutputLikes(g ...*GenerationOutputLike) *GenerationOutputUpdate

AddGenerationOutputLikes adds the "generation_output_likes" edges to the GenerationOutputLike entity.

func (*GenerationOutputUpdate) AddLikeCount

func (gou *GenerationOutputUpdate) AddLikeCount(i int) *GenerationOutputUpdate

AddLikeCount adds i to the "like_count" field.

func (*GenerationOutputUpdate) ClearDeletedAt

func (gou *GenerationOutputUpdate) ClearDeletedAt() *GenerationOutputUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*GenerationOutputUpdate) ClearGenerationOutputLikes

func (gou *GenerationOutputUpdate) ClearGenerationOutputLikes() *GenerationOutputUpdate

ClearGenerationOutputLikes clears all "generation_output_likes" edges to the GenerationOutputLike entity.

func (*GenerationOutputUpdate) ClearGenerations

func (gou *GenerationOutputUpdate) ClearGenerations() *GenerationOutputUpdate

ClearGenerations clears the "generations" edge to the Generation entity.

func (*GenerationOutputUpdate) ClearUpscaleOutputs

func (gou *GenerationOutputUpdate) ClearUpscaleOutputs() *GenerationOutputUpdate

ClearUpscaleOutputs clears the "upscale_outputs" edge to the UpscaleOutput entity.

func (*GenerationOutputUpdate) ClearUpscaledImagePath

func (gou *GenerationOutputUpdate) ClearUpscaledImagePath() *GenerationOutputUpdate

ClearUpscaledImagePath clears the value of the "upscaled_image_path" field.

func (*GenerationOutputUpdate) Exec

Exec executes the query.

func (*GenerationOutputUpdate) ExecContext

func (c *GenerationOutputUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputUpdate) ExecX

func (gou *GenerationOutputUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputUpdate) Modify

func (gou *GenerationOutputUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GenerationOutputUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*GenerationOutputUpdate) Mutation

Mutation returns the GenerationOutputMutation object of the builder.

func (*GenerationOutputUpdate) QueryContext

func (c *GenerationOutputUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputUpdate) RemoveGenerationOutputLikeIDs

func (gou *GenerationOutputUpdate) RemoveGenerationOutputLikeIDs(ids ...uuid.UUID) *GenerationOutputUpdate

RemoveGenerationOutputLikeIDs removes the "generation_output_likes" edge to GenerationOutputLike entities by IDs.

func (*GenerationOutputUpdate) RemoveGenerationOutputLikes

func (gou *GenerationOutputUpdate) RemoveGenerationOutputLikes(g ...*GenerationOutputLike) *GenerationOutputUpdate

RemoveGenerationOutputLikes removes "generation_output_likes" edges to GenerationOutputLike entities.

func (*GenerationOutputUpdate) Save

func (gou *GenerationOutputUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*GenerationOutputUpdate) SaveX

func (gou *GenerationOutputUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GenerationOutputUpdate) SetAestheticArtifactScore

func (gou *GenerationOutputUpdate) SetAestheticArtifactScore(f float32) *GenerationOutputUpdate

SetAestheticArtifactScore sets the "aesthetic_artifact_score" field.

func (*GenerationOutputUpdate) SetAestheticRatingScore

func (gou *GenerationOutputUpdate) SetAestheticRatingScore(f float32) *GenerationOutputUpdate

SetAestheticRatingScore sets the "aesthetic_rating_score" field.

func (*GenerationOutputUpdate) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*GenerationOutputUpdate) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*GenerationOutputUpdate) SetGenerationID

func (gou *GenerationOutputUpdate) SetGenerationID(u uuid.UUID) *GenerationOutputUpdate

SetGenerationID sets the "generation_id" field.

func (*GenerationOutputUpdate) SetGenerations

func (gou *GenerationOutputUpdate) SetGenerations(g *Generation) *GenerationOutputUpdate

SetGenerations sets the "generations" edge to the Generation entity.

func (*GenerationOutputUpdate) SetGenerationsID

func (gou *GenerationOutputUpdate) SetGenerationsID(id uuid.UUID) *GenerationOutputUpdate

SetGenerationsID sets the "generations" edge to the Generation entity by ID.

func (*GenerationOutputUpdate) SetHasEmbeddings

func (gou *GenerationOutputUpdate) SetHasEmbeddings(b bool) *GenerationOutputUpdate

SetHasEmbeddings sets the "has_embeddings" field.

func (*GenerationOutputUpdate) SetHasEmbeddingsNew

func (gou *GenerationOutputUpdate) SetHasEmbeddingsNew(b bool) *GenerationOutputUpdate

SetHasEmbeddingsNew sets the "has_embeddings_new" field.

func (*GenerationOutputUpdate) SetImagePath

SetImagePath sets the "image_path" field.

func (*GenerationOutputUpdate) SetIsFavorited

func (gou *GenerationOutputUpdate) SetIsFavorited(b bool) *GenerationOutputUpdate

SetIsFavorited sets the "is_favorited" field.

func (*GenerationOutputUpdate) SetIsPublic

func (gou *GenerationOutputUpdate) SetIsPublic(b bool) *GenerationOutputUpdate

SetIsPublic sets the "is_public" field.

func (*GenerationOutputUpdate) SetLikeCount

func (gou *GenerationOutputUpdate) SetLikeCount(i int) *GenerationOutputUpdate

SetLikeCount sets the "like_count" field.

func (*GenerationOutputUpdate) SetNillableAestheticArtifactScore

func (gou *GenerationOutputUpdate) SetNillableAestheticArtifactScore(f *float32) *GenerationOutputUpdate

SetNillableAestheticArtifactScore sets the "aesthetic_artifact_score" field if the given value is not nil.

func (*GenerationOutputUpdate) SetNillableAestheticRatingScore

func (gou *GenerationOutputUpdate) SetNillableAestheticRatingScore(f *float32) *GenerationOutputUpdate

SetNillableAestheticRatingScore sets the "aesthetic_rating_score" field if the given value is not nil.

func (*GenerationOutputUpdate) SetNillableDeletedAt

func (gou *GenerationOutputUpdate) SetNillableDeletedAt(t *time.Time) *GenerationOutputUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*GenerationOutputUpdate) SetNillableGalleryStatus

SetNillableGalleryStatus sets the "gallery_status" field if the given value is not nil.

func (*GenerationOutputUpdate) SetNillableHasEmbeddings

func (gou *GenerationOutputUpdate) SetNillableHasEmbeddings(b *bool) *GenerationOutputUpdate

SetNillableHasEmbeddings sets the "has_embeddings" field if the given value is not nil.

func (*GenerationOutputUpdate) SetNillableHasEmbeddingsNew

func (gou *GenerationOutputUpdate) SetNillableHasEmbeddingsNew(b *bool) *GenerationOutputUpdate

SetNillableHasEmbeddingsNew sets the "has_embeddings_new" field if the given value is not nil.

func (*GenerationOutputUpdate) SetNillableIsFavorited

func (gou *GenerationOutputUpdate) SetNillableIsFavorited(b *bool) *GenerationOutputUpdate

SetNillableIsFavorited sets the "is_favorited" field if the given value is not nil.

func (*GenerationOutputUpdate) SetNillableIsPublic

func (gou *GenerationOutputUpdate) SetNillableIsPublic(b *bool) *GenerationOutputUpdate

SetNillableIsPublic sets the "is_public" field if the given value is not nil.

func (*GenerationOutputUpdate) SetNillableLikeCount

func (gou *GenerationOutputUpdate) SetNillableLikeCount(i *int) *GenerationOutputUpdate

SetNillableLikeCount sets the "like_count" field if the given value is not nil.

func (*GenerationOutputUpdate) SetNillableUpscaleOutputsID

func (gou *GenerationOutputUpdate) SetNillableUpscaleOutputsID(id *uuid.UUID) *GenerationOutputUpdate

SetNillableUpscaleOutputsID sets the "upscale_outputs" edge to the UpscaleOutput entity by ID if the given value is not nil.

func (*GenerationOutputUpdate) SetNillableUpscaledImagePath

func (gou *GenerationOutputUpdate) SetNillableUpscaledImagePath(s *string) *GenerationOutputUpdate

SetNillableUpscaledImagePath sets the "upscaled_image_path" field if the given value is not nil.

func (*GenerationOutputUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*GenerationOutputUpdate) SetUpscaleOutputs

func (gou *GenerationOutputUpdate) SetUpscaleOutputs(u *UpscaleOutput) *GenerationOutputUpdate

SetUpscaleOutputs sets the "upscale_outputs" edge to the UpscaleOutput entity.

func (*GenerationOutputUpdate) SetUpscaleOutputsID

func (gou *GenerationOutputUpdate) SetUpscaleOutputsID(id uuid.UUID) *GenerationOutputUpdate

SetUpscaleOutputsID sets the "upscale_outputs" edge to the UpscaleOutput entity by ID.

func (*GenerationOutputUpdate) SetUpscaledImagePath

func (gou *GenerationOutputUpdate) SetUpscaledImagePath(s string) *GenerationOutputUpdate

SetUpscaledImagePath sets the "upscaled_image_path" field.

func (*GenerationOutputUpdate) Where

Where appends a list predicates to the GenerationOutputUpdate builder.

type GenerationOutputUpdateOne

type GenerationOutputUpdateOne struct {
	// contains filtered or unexported fields
}

GenerationOutputUpdateOne is the builder for updating a single GenerationOutput entity.

func (*GenerationOutputUpdateOne) AddAestheticArtifactScore

func (gouo *GenerationOutputUpdateOne) AddAestheticArtifactScore(f float32) *GenerationOutputUpdateOne

AddAestheticArtifactScore adds f to the "aesthetic_artifact_score" field.

func (*GenerationOutputUpdateOne) AddAestheticRatingScore

func (gouo *GenerationOutputUpdateOne) AddAestheticRatingScore(f float32) *GenerationOutputUpdateOne

AddAestheticRatingScore adds f to the "aesthetic_rating_score" field.

func (*GenerationOutputUpdateOne) AddGenerationOutputLikeIDs

func (gouo *GenerationOutputUpdateOne) AddGenerationOutputLikeIDs(ids ...uuid.UUID) *GenerationOutputUpdateOne

AddGenerationOutputLikeIDs adds the "generation_output_likes" edge to the GenerationOutputLike entity by IDs.

func (*GenerationOutputUpdateOne) AddGenerationOutputLikes

func (gouo *GenerationOutputUpdateOne) AddGenerationOutputLikes(g ...*GenerationOutputLike) *GenerationOutputUpdateOne

AddGenerationOutputLikes adds the "generation_output_likes" edges to the GenerationOutputLike entity.

func (*GenerationOutputUpdateOne) AddLikeCount

AddLikeCount adds i to the "like_count" field.

func (*GenerationOutputUpdateOne) ClearDeletedAt

func (gouo *GenerationOutputUpdateOne) ClearDeletedAt() *GenerationOutputUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*GenerationOutputUpdateOne) ClearGenerationOutputLikes

func (gouo *GenerationOutputUpdateOne) ClearGenerationOutputLikes() *GenerationOutputUpdateOne

ClearGenerationOutputLikes clears all "generation_output_likes" edges to the GenerationOutputLike entity.

func (*GenerationOutputUpdateOne) ClearGenerations

func (gouo *GenerationOutputUpdateOne) ClearGenerations() *GenerationOutputUpdateOne

ClearGenerations clears the "generations" edge to the Generation entity.

func (*GenerationOutputUpdateOne) ClearUpscaleOutputs

func (gouo *GenerationOutputUpdateOne) ClearUpscaleOutputs() *GenerationOutputUpdateOne

ClearUpscaleOutputs clears the "upscale_outputs" edge to the UpscaleOutput entity.

func (*GenerationOutputUpdateOne) ClearUpscaledImagePath

func (gouo *GenerationOutputUpdateOne) ClearUpscaledImagePath() *GenerationOutputUpdateOne

ClearUpscaledImagePath clears the value of the "upscaled_image_path" field.

func (*GenerationOutputUpdateOne) Exec

Exec executes the query on the entity.

func (*GenerationOutputUpdateOne) ExecContext

func (c *GenerationOutputUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationOutputUpdateOne) ExecX

func (gouo *GenerationOutputUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputUpdateOne) Modify

func (gouo *GenerationOutputUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GenerationOutputUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*GenerationOutputUpdateOne) Mutation

Mutation returns the GenerationOutputMutation object of the builder.

func (*GenerationOutputUpdateOne) QueryContext

func (c *GenerationOutputUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationOutputUpdateOne) RemoveGenerationOutputLikeIDs

func (gouo *GenerationOutputUpdateOne) RemoveGenerationOutputLikeIDs(ids ...uuid.UUID) *GenerationOutputUpdateOne

RemoveGenerationOutputLikeIDs removes the "generation_output_likes" edge to GenerationOutputLike entities by IDs.

func (*GenerationOutputUpdateOne) RemoveGenerationOutputLikes

func (gouo *GenerationOutputUpdateOne) RemoveGenerationOutputLikes(g ...*GenerationOutputLike) *GenerationOutputUpdateOne

RemoveGenerationOutputLikes removes "generation_output_likes" edges to GenerationOutputLike entities.

func (*GenerationOutputUpdateOne) Save

Save executes the query and returns the updated GenerationOutput entity.

func (*GenerationOutputUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*GenerationOutputUpdateOne) Select

func (gouo *GenerationOutputUpdateOne) Select(field string, fields ...string) *GenerationOutputUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*GenerationOutputUpdateOne) SetAestheticArtifactScore

func (gouo *GenerationOutputUpdateOne) SetAestheticArtifactScore(f float32) *GenerationOutputUpdateOne

SetAestheticArtifactScore sets the "aesthetic_artifact_score" field.

func (*GenerationOutputUpdateOne) SetAestheticRatingScore

func (gouo *GenerationOutputUpdateOne) SetAestheticRatingScore(f float32) *GenerationOutputUpdateOne

SetAestheticRatingScore sets the "aesthetic_rating_score" field.

func (*GenerationOutputUpdateOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*GenerationOutputUpdateOne) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*GenerationOutputUpdateOne) SetGenerationID

SetGenerationID sets the "generation_id" field.

func (*GenerationOutputUpdateOne) SetGenerations

SetGenerations sets the "generations" edge to the Generation entity.

func (*GenerationOutputUpdateOne) SetGenerationsID

func (gouo *GenerationOutputUpdateOne) SetGenerationsID(id uuid.UUID) *GenerationOutputUpdateOne

SetGenerationsID sets the "generations" edge to the Generation entity by ID.

func (*GenerationOutputUpdateOne) SetHasEmbeddings

func (gouo *GenerationOutputUpdateOne) SetHasEmbeddings(b bool) *GenerationOutputUpdateOne

SetHasEmbeddings sets the "has_embeddings" field.

func (*GenerationOutputUpdateOne) SetHasEmbeddingsNew

func (gouo *GenerationOutputUpdateOne) SetHasEmbeddingsNew(b bool) *GenerationOutputUpdateOne

SetHasEmbeddingsNew sets the "has_embeddings_new" field.

func (*GenerationOutputUpdateOne) SetImagePath

SetImagePath sets the "image_path" field.

func (*GenerationOutputUpdateOne) SetIsFavorited

func (gouo *GenerationOutputUpdateOne) SetIsFavorited(b bool) *GenerationOutputUpdateOne

SetIsFavorited sets the "is_favorited" field.

func (*GenerationOutputUpdateOne) SetIsPublic

SetIsPublic sets the "is_public" field.

func (*GenerationOutputUpdateOne) SetLikeCount

SetLikeCount sets the "like_count" field.

func (*GenerationOutputUpdateOne) SetNillableAestheticArtifactScore

func (gouo *GenerationOutputUpdateOne) SetNillableAestheticArtifactScore(f *float32) *GenerationOutputUpdateOne

SetNillableAestheticArtifactScore sets the "aesthetic_artifact_score" field if the given value is not nil.

func (*GenerationOutputUpdateOne) SetNillableAestheticRatingScore

func (gouo *GenerationOutputUpdateOne) SetNillableAestheticRatingScore(f *float32) *GenerationOutputUpdateOne

SetNillableAestheticRatingScore sets the "aesthetic_rating_score" field if the given value is not nil.

func (*GenerationOutputUpdateOne) SetNillableDeletedAt

func (gouo *GenerationOutputUpdateOne) SetNillableDeletedAt(t *time.Time) *GenerationOutputUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*GenerationOutputUpdateOne) SetNillableGalleryStatus

SetNillableGalleryStatus sets the "gallery_status" field if the given value is not nil.

func (*GenerationOutputUpdateOne) SetNillableHasEmbeddings

func (gouo *GenerationOutputUpdateOne) SetNillableHasEmbeddings(b *bool) *GenerationOutputUpdateOne

SetNillableHasEmbeddings sets the "has_embeddings" field if the given value is not nil.

func (*GenerationOutputUpdateOne) SetNillableHasEmbeddingsNew

func (gouo *GenerationOutputUpdateOne) SetNillableHasEmbeddingsNew(b *bool) *GenerationOutputUpdateOne

SetNillableHasEmbeddingsNew sets the "has_embeddings_new" field if the given value is not nil.

func (*GenerationOutputUpdateOne) SetNillableIsFavorited

func (gouo *GenerationOutputUpdateOne) SetNillableIsFavorited(b *bool) *GenerationOutputUpdateOne

SetNillableIsFavorited sets the "is_favorited" field if the given value is not nil.

func (*GenerationOutputUpdateOne) SetNillableIsPublic

func (gouo *GenerationOutputUpdateOne) SetNillableIsPublic(b *bool) *GenerationOutputUpdateOne

SetNillableIsPublic sets the "is_public" field if the given value is not nil.

func (*GenerationOutputUpdateOne) SetNillableLikeCount

func (gouo *GenerationOutputUpdateOne) SetNillableLikeCount(i *int) *GenerationOutputUpdateOne

SetNillableLikeCount sets the "like_count" field if the given value is not nil.

func (*GenerationOutputUpdateOne) SetNillableUpscaleOutputsID

func (gouo *GenerationOutputUpdateOne) SetNillableUpscaleOutputsID(id *uuid.UUID) *GenerationOutputUpdateOne

SetNillableUpscaleOutputsID sets the "upscale_outputs" edge to the UpscaleOutput entity by ID if the given value is not nil.

func (*GenerationOutputUpdateOne) SetNillableUpscaledImagePath

func (gouo *GenerationOutputUpdateOne) SetNillableUpscaledImagePath(s *string) *GenerationOutputUpdateOne

SetNillableUpscaledImagePath sets the "upscaled_image_path" field if the given value is not nil.

func (*GenerationOutputUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*GenerationOutputUpdateOne) SetUpscaleOutputs

SetUpscaleOutputs sets the "upscale_outputs" edge to the UpscaleOutput entity.

func (*GenerationOutputUpdateOne) SetUpscaleOutputsID

func (gouo *GenerationOutputUpdateOne) SetUpscaleOutputsID(id uuid.UUID) *GenerationOutputUpdateOne

SetUpscaleOutputsID sets the "upscale_outputs" edge to the UpscaleOutput entity by ID.

func (*GenerationOutputUpdateOne) SetUpscaledImagePath

func (gouo *GenerationOutputUpdateOne) SetUpscaledImagePath(s string) *GenerationOutputUpdateOne

SetUpscaledImagePath sets the "upscaled_image_path" field.

type GenerationOutputUpsert

type GenerationOutputUpsert struct {
	*sql.UpdateSet
}

GenerationOutputUpsert is the "OnConflict" setter.

func (*GenerationOutputUpsert) AddAestheticArtifactScore

func (u *GenerationOutputUpsert) AddAestheticArtifactScore(v float32) *GenerationOutputUpsert

AddAestheticArtifactScore adds v to the "aesthetic_artifact_score" field.

func (*GenerationOutputUpsert) AddAestheticRatingScore

func (u *GenerationOutputUpsert) AddAestheticRatingScore(v float32) *GenerationOutputUpsert

AddAestheticRatingScore adds v to the "aesthetic_rating_score" field.

func (*GenerationOutputUpsert) AddLikeCount

AddLikeCount adds v to the "like_count" field.

func (*GenerationOutputUpsert) ClearDeletedAt

func (u *GenerationOutputUpsert) ClearDeletedAt() *GenerationOutputUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*GenerationOutputUpsert) ClearUpscaledImagePath

func (u *GenerationOutputUpsert) ClearUpscaledImagePath() *GenerationOutputUpsert

ClearUpscaledImagePath clears the value of the "upscaled_image_path" field.

func (*GenerationOutputUpsert) SetAestheticArtifactScore

func (u *GenerationOutputUpsert) SetAestheticArtifactScore(v float32) *GenerationOutputUpsert

SetAestheticArtifactScore sets the "aesthetic_artifact_score" field.

func (*GenerationOutputUpsert) SetAestheticRatingScore

func (u *GenerationOutputUpsert) SetAestheticRatingScore(v float32) *GenerationOutputUpsert

SetAestheticRatingScore sets the "aesthetic_rating_score" field.

func (*GenerationOutputUpsert) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*GenerationOutputUpsert) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*GenerationOutputUpsert) SetGenerationID

func (u *GenerationOutputUpsert) SetGenerationID(v uuid.UUID) *GenerationOutputUpsert

SetGenerationID sets the "generation_id" field.

func (*GenerationOutputUpsert) SetHasEmbeddings

func (u *GenerationOutputUpsert) SetHasEmbeddings(v bool) *GenerationOutputUpsert

SetHasEmbeddings sets the "has_embeddings" field.

func (*GenerationOutputUpsert) SetHasEmbeddingsNew

func (u *GenerationOutputUpsert) SetHasEmbeddingsNew(v bool) *GenerationOutputUpsert

SetHasEmbeddingsNew sets the "has_embeddings_new" field.

func (*GenerationOutputUpsert) SetImagePath

SetImagePath sets the "image_path" field.

func (*GenerationOutputUpsert) SetIsFavorited

func (u *GenerationOutputUpsert) SetIsFavorited(v bool) *GenerationOutputUpsert

SetIsFavorited sets the "is_favorited" field.

func (*GenerationOutputUpsert) SetIsPublic

SetIsPublic sets the "is_public" field.

func (*GenerationOutputUpsert) SetLikeCount

SetLikeCount sets the "like_count" field.

func (*GenerationOutputUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*GenerationOutputUpsert) SetUpscaledImagePath

func (u *GenerationOutputUpsert) SetUpscaledImagePath(v string) *GenerationOutputUpsert

SetUpscaledImagePath sets the "upscaled_image_path" field.

func (*GenerationOutputUpsert) UpdateAestheticArtifactScore

func (u *GenerationOutputUpsert) UpdateAestheticArtifactScore() *GenerationOutputUpsert

UpdateAestheticArtifactScore sets the "aesthetic_artifact_score" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateAestheticRatingScore

func (u *GenerationOutputUpsert) UpdateAestheticRatingScore() *GenerationOutputUpsert

UpdateAestheticRatingScore sets the "aesthetic_rating_score" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateDeletedAt

func (u *GenerationOutputUpsert) UpdateDeletedAt() *GenerationOutputUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateGalleryStatus

func (u *GenerationOutputUpsert) UpdateGalleryStatus() *GenerationOutputUpsert

UpdateGalleryStatus sets the "gallery_status" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateGenerationID

func (u *GenerationOutputUpsert) UpdateGenerationID() *GenerationOutputUpsert

UpdateGenerationID sets the "generation_id" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateHasEmbeddings

func (u *GenerationOutputUpsert) UpdateHasEmbeddings() *GenerationOutputUpsert

UpdateHasEmbeddings sets the "has_embeddings" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateHasEmbeddingsNew

func (u *GenerationOutputUpsert) UpdateHasEmbeddingsNew() *GenerationOutputUpsert

UpdateHasEmbeddingsNew sets the "has_embeddings_new" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateImagePath

func (u *GenerationOutputUpsert) UpdateImagePath() *GenerationOutputUpsert

UpdateImagePath sets the "image_path" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateIsFavorited

func (u *GenerationOutputUpsert) UpdateIsFavorited() *GenerationOutputUpsert

UpdateIsFavorited sets the "is_favorited" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateIsPublic

func (u *GenerationOutputUpsert) UpdateIsPublic() *GenerationOutputUpsert

UpdateIsPublic sets the "is_public" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateLikeCount

func (u *GenerationOutputUpsert) UpdateLikeCount() *GenerationOutputUpsert

UpdateLikeCount sets the "like_count" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateUpdatedAt

func (u *GenerationOutputUpsert) UpdateUpdatedAt() *GenerationOutputUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*GenerationOutputUpsert) UpdateUpscaledImagePath

func (u *GenerationOutputUpsert) UpdateUpscaledImagePath() *GenerationOutputUpsert

UpdateUpscaledImagePath sets the "upscaled_image_path" field to the value that was provided on create.

type GenerationOutputUpsertBulk

type GenerationOutputUpsertBulk struct {
	// contains filtered or unexported fields
}

GenerationOutputUpsertBulk is the builder for "upsert"-ing a bulk of GenerationOutput nodes.

func (*GenerationOutputUpsertBulk) AddAestheticArtifactScore

func (u *GenerationOutputUpsertBulk) AddAestheticArtifactScore(v float32) *GenerationOutputUpsertBulk

AddAestheticArtifactScore adds v to the "aesthetic_artifact_score" field.

func (*GenerationOutputUpsertBulk) AddAestheticRatingScore

func (u *GenerationOutputUpsertBulk) AddAestheticRatingScore(v float32) *GenerationOutputUpsertBulk

AddAestheticRatingScore adds v to the "aesthetic_rating_score" field.

func (*GenerationOutputUpsertBulk) AddLikeCount

AddLikeCount adds v to the "like_count" field.

func (*GenerationOutputUpsertBulk) ClearDeletedAt

ClearDeletedAt clears the value of the "deleted_at" field.

func (*GenerationOutputUpsertBulk) ClearUpscaledImagePath

func (u *GenerationOutputUpsertBulk) ClearUpscaledImagePath() *GenerationOutputUpsertBulk

ClearUpscaledImagePath clears the value of the "upscaled_image_path" field.

func (*GenerationOutputUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GenerationOutputUpsertBulk) Exec

Exec executes the query.

func (*GenerationOutputUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GenerationOutput.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GenerationOutputUpsertBulk) SetAestheticArtifactScore

func (u *GenerationOutputUpsertBulk) SetAestheticArtifactScore(v float32) *GenerationOutputUpsertBulk

SetAestheticArtifactScore sets the "aesthetic_artifact_score" field.

func (*GenerationOutputUpsertBulk) SetAestheticRatingScore

func (u *GenerationOutputUpsertBulk) SetAestheticRatingScore(v float32) *GenerationOutputUpsertBulk

SetAestheticRatingScore sets the "aesthetic_rating_score" field.

func (*GenerationOutputUpsertBulk) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*GenerationOutputUpsertBulk) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*GenerationOutputUpsertBulk) SetGenerationID

SetGenerationID sets the "generation_id" field.

func (*GenerationOutputUpsertBulk) SetHasEmbeddings

SetHasEmbeddings sets the "has_embeddings" field.

func (*GenerationOutputUpsertBulk) SetHasEmbeddingsNew

func (u *GenerationOutputUpsertBulk) SetHasEmbeddingsNew(v bool) *GenerationOutputUpsertBulk

SetHasEmbeddingsNew sets the "has_embeddings_new" field.

func (*GenerationOutputUpsertBulk) SetImagePath

SetImagePath sets the "image_path" field.

func (*GenerationOutputUpsertBulk) SetIsFavorited

SetIsFavorited sets the "is_favorited" field.

func (*GenerationOutputUpsertBulk) SetIsPublic

SetIsPublic sets the "is_public" field.

func (*GenerationOutputUpsertBulk) SetLikeCount

SetLikeCount sets the "like_count" field.

func (*GenerationOutputUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*GenerationOutputUpsertBulk) SetUpscaledImagePath

func (u *GenerationOutputUpsertBulk) SetUpscaledImagePath(v string) *GenerationOutputUpsertBulk

SetUpscaledImagePath sets the "upscaled_image_path" field.

func (*GenerationOutputUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the GenerationOutputCreateBulk.OnConflict documentation for more info.

func (*GenerationOutputUpsertBulk) UpdateAestheticArtifactScore

func (u *GenerationOutputUpsertBulk) UpdateAestheticArtifactScore() *GenerationOutputUpsertBulk

UpdateAestheticArtifactScore sets the "aesthetic_artifact_score" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateAestheticRatingScore

func (u *GenerationOutputUpsertBulk) UpdateAestheticRatingScore() *GenerationOutputUpsertBulk

UpdateAestheticRatingScore sets the "aesthetic_rating_score" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateDeletedAt

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateGalleryStatus

func (u *GenerationOutputUpsertBulk) UpdateGalleryStatus() *GenerationOutputUpsertBulk

UpdateGalleryStatus sets the "gallery_status" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateGenerationID

func (u *GenerationOutputUpsertBulk) UpdateGenerationID() *GenerationOutputUpsertBulk

UpdateGenerationID sets the "generation_id" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateHasEmbeddings

func (u *GenerationOutputUpsertBulk) UpdateHasEmbeddings() *GenerationOutputUpsertBulk

UpdateHasEmbeddings sets the "has_embeddings" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateHasEmbeddingsNew

func (u *GenerationOutputUpsertBulk) UpdateHasEmbeddingsNew() *GenerationOutputUpsertBulk

UpdateHasEmbeddingsNew sets the "has_embeddings_new" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateImagePath

UpdateImagePath sets the "image_path" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateIsFavorited

UpdateIsFavorited sets the "is_favorited" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateIsPublic

UpdateIsPublic sets the "is_public" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateLikeCount

UpdateLikeCount sets the "like_count" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.GenerationOutput.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(generationoutput.FieldID)
		}),
	).
	Exec(ctx)

func (*GenerationOutputUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*GenerationOutputUpsertBulk) UpdateUpscaledImagePath

func (u *GenerationOutputUpsertBulk) UpdateUpscaledImagePath() *GenerationOutputUpsertBulk

UpdateUpscaledImagePath sets the "upscaled_image_path" field to the value that was provided on create.

type GenerationOutputUpsertOne

type GenerationOutputUpsertOne struct {
	// contains filtered or unexported fields
}

GenerationOutputUpsertOne is the builder for "upsert"-ing

one GenerationOutput node.

func (*GenerationOutputUpsertOne) AddAestheticArtifactScore

func (u *GenerationOutputUpsertOne) AddAestheticArtifactScore(v float32) *GenerationOutputUpsertOne

AddAestheticArtifactScore adds v to the "aesthetic_artifact_score" field.

func (*GenerationOutputUpsertOne) AddAestheticRatingScore

func (u *GenerationOutputUpsertOne) AddAestheticRatingScore(v float32) *GenerationOutputUpsertOne

AddAestheticRatingScore adds v to the "aesthetic_rating_score" field.

func (*GenerationOutputUpsertOne) AddLikeCount

AddLikeCount adds v to the "like_count" field.

func (*GenerationOutputUpsertOne) ClearDeletedAt

ClearDeletedAt clears the value of the "deleted_at" field.

func (*GenerationOutputUpsertOne) ClearUpscaledImagePath

func (u *GenerationOutputUpsertOne) ClearUpscaledImagePath() *GenerationOutputUpsertOne

ClearUpscaledImagePath clears the value of the "upscaled_image_path" field.

func (*GenerationOutputUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GenerationOutputUpsertOne) Exec

Exec executes the query.

func (*GenerationOutputUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*GenerationOutputUpsertOne) ID

func (u *GenerationOutputUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GenerationOutputUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*GenerationOutputUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.GenerationOutput.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GenerationOutputUpsertOne) SetAestheticArtifactScore

func (u *GenerationOutputUpsertOne) SetAestheticArtifactScore(v float32) *GenerationOutputUpsertOne

SetAestheticArtifactScore sets the "aesthetic_artifact_score" field.

func (*GenerationOutputUpsertOne) SetAestheticRatingScore

func (u *GenerationOutputUpsertOne) SetAestheticRatingScore(v float32) *GenerationOutputUpsertOne

SetAestheticRatingScore sets the "aesthetic_rating_score" field.

func (*GenerationOutputUpsertOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*GenerationOutputUpsertOne) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*GenerationOutputUpsertOne) SetGenerationID

SetGenerationID sets the "generation_id" field.

func (*GenerationOutputUpsertOne) SetHasEmbeddings

SetHasEmbeddings sets the "has_embeddings" field.

func (*GenerationOutputUpsertOne) SetHasEmbeddingsNew

func (u *GenerationOutputUpsertOne) SetHasEmbeddingsNew(v bool) *GenerationOutputUpsertOne

SetHasEmbeddingsNew sets the "has_embeddings_new" field.

func (*GenerationOutputUpsertOne) SetImagePath

SetImagePath sets the "image_path" field.

func (*GenerationOutputUpsertOne) SetIsFavorited

SetIsFavorited sets the "is_favorited" field.

func (*GenerationOutputUpsertOne) SetIsPublic

SetIsPublic sets the "is_public" field.

func (*GenerationOutputUpsertOne) SetLikeCount

SetLikeCount sets the "like_count" field.

func (*GenerationOutputUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*GenerationOutputUpsertOne) SetUpscaledImagePath

func (u *GenerationOutputUpsertOne) SetUpscaledImagePath(v string) *GenerationOutputUpsertOne

SetUpscaledImagePath sets the "upscaled_image_path" field.

func (*GenerationOutputUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the GenerationOutputCreate.OnConflict documentation for more info.

func (*GenerationOutputUpsertOne) UpdateAestheticArtifactScore

func (u *GenerationOutputUpsertOne) UpdateAestheticArtifactScore() *GenerationOutputUpsertOne

UpdateAestheticArtifactScore sets the "aesthetic_artifact_score" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateAestheticRatingScore

func (u *GenerationOutputUpsertOne) UpdateAestheticRatingScore() *GenerationOutputUpsertOne

UpdateAestheticRatingScore sets the "aesthetic_rating_score" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateDeletedAt

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateGalleryStatus

func (u *GenerationOutputUpsertOne) UpdateGalleryStatus() *GenerationOutputUpsertOne

UpdateGalleryStatus sets the "gallery_status" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateGenerationID

func (u *GenerationOutputUpsertOne) UpdateGenerationID() *GenerationOutputUpsertOne

UpdateGenerationID sets the "generation_id" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateHasEmbeddings

func (u *GenerationOutputUpsertOne) UpdateHasEmbeddings() *GenerationOutputUpsertOne

UpdateHasEmbeddings sets the "has_embeddings" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateHasEmbeddingsNew

func (u *GenerationOutputUpsertOne) UpdateHasEmbeddingsNew() *GenerationOutputUpsertOne

UpdateHasEmbeddingsNew sets the "has_embeddings_new" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateImagePath

UpdateImagePath sets the "image_path" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateIsFavorited

func (u *GenerationOutputUpsertOne) UpdateIsFavorited() *GenerationOutputUpsertOne

UpdateIsFavorited sets the "is_favorited" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateIsPublic

UpdateIsPublic sets the "is_public" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateLikeCount

UpdateLikeCount sets the "like_count" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.GenerationOutput.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(generationoutput.FieldID)
		}),
	).
	Exec(ctx)

func (*GenerationOutputUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*GenerationOutputUpsertOne) UpdateUpscaledImagePath

func (u *GenerationOutputUpsertOne) UpdateUpscaledImagePath() *GenerationOutputUpsertOne

UpdateUpscaledImagePath sets the "upscaled_image_path" field to the value that was provided on create.

type GenerationOutputs

type GenerationOutputs []*GenerationOutput

GenerationOutputs is a parsable slice of GenerationOutput.

type GenerationQuery

type GenerationQuery struct {
	// contains filtered or unexported fields
}

GenerationQuery is the builder for querying Generation entities.

func (*GenerationQuery) Aggregate

func (gq *GenerationQuery) Aggregate(fns ...AggregateFunc) *GenerationSelect

Aggregate returns a GenerationSelect configured with the given aggregations.

func (*GenerationQuery) All

func (gq *GenerationQuery) All(ctx context.Context) ([]*Generation, error)

All executes the query and returns a list of Generations.

func (*GenerationQuery) AllX

func (gq *GenerationQuery) AllX(ctx context.Context) []*Generation

AllX is like All, but panics if an error occurs.

func (*GenerationQuery) Clone

func (gq *GenerationQuery) Clone() *GenerationQuery

Clone returns a duplicate of the GenerationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*GenerationQuery) Count

func (gq *GenerationQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*GenerationQuery) CountX

func (gq *GenerationQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*GenerationQuery) ExecContext

func (c *GenerationQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationQuery) Exist

func (gq *GenerationQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*GenerationQuery) ExistX

func (gq *GenerationQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*GenerationQuery) First

func (gq *GenerationQuery) First(ctx context.Context) (*Generation, error)

First returns the first Generation entity from the query. Returns a *NotFoundError when no Generation was found.

func (*GenerationQuery) FirstID

func (gq *GenerationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Generation ID from the query. Returns a *NotFoundError when no Generation ID was found.

func (*GenerationQuery) FirstIDX

func (gq *GenerationQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*GenerationQuery) FirstX

func (gq *GenerationQuery) FirstX(ctx context.Context) *Generation

FirstX is like First, but panics if an error occurs.

func (*GenerationQuery) GroupBy

func (gq *GenerationQuery) GroupBy(field string, fields ...string) *GenerationGroupBy

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 {
	Width int32 `json:"width,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Generation.Query().
	GroupBy(generation.FieldWidth).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*GenerationQuery) IDs

func (gq *GenerationQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Generation IDs.

func (*GenerationQuery) IDsX

func (gq *GenerationQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*GenerationQuery) Limit

func (gq *GenerationQuery) Limit(limit int) *GenerationQuery

Limit the number of records to be returned by this query.

func (*GenerationQuery) Modify

func (gq *GenerationQuery) Modify(modifiers ...func(s *sql.Selector)) *GenerationSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*GenerationQuery) Offset

func (gq *GenerationQuery) Offset(offset int) *GenerationQuery

Offset to start from.

func (*GenerationQuery) Only

func (gq *GenerationQuery) Only(ctx context.Context) (*Generation, error)

Only returns a single Generation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Generation entity is found. Returns a *NotFoundError when no Generation entities are found.

func (*GenerationQuery) OnlyID

func (gq *GenerationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Generation ID in the query. Returns a *NotSingularError when more than one Generation ID is found. Returns a *NotFoundError when no entities are found.

func (*GenerationQuery) OnlyIDX

func (gq *GenerationQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*GenerationQuery) OnlyX

func (gq *GenerationQuery) OnlyX(ctx context.Context) *Generation

OnlyX is like Only, but panics if an error occurs.

func (*GenerationQuery) Order

func (gq *GenerationQuery) Order(o ...OrderFunc) *GenerationQuery

Order specifies how the records should be ordered.

func (*GenerationQuery) QueryAPITokens

func (gq *GenerationQuery) QueryAPITokens() *ApiTokenQuery

QueryAPITokens chains the current query on the "api_tokens" edge.

func (*GenerationQuery) QueryContext

func (c *GenerationQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationQuery) QueryDeviceInfo

func (gq *GenerationQuery) QueryDeviceInfo() *DeviceInfoQuery

QueryDeviceInfo chains the current query on the "device_info" edge.

func (*GenerationQuery) QueryGenerationModel

func (gq *GenerationQuery) QueryGenerationModel() *GenerationModelQuery

QueryGenerationModel chains the current query on the "generation_model" edge.

func (*GenerationQuery) QueryGenerationOutputs

func (gq *GenerationQuery) QueryGenerationOutputs() *GenerationOutputQuery

QueryGenerationOutputs chains the current query on the "generation_outputs" edge.

func (*GenerationQuery) QueryNegativePrompt

func (gq *GenerationQuery) QueryNegativePrompt() *NegativePromptQuery

QueryNegativePrompt chains the current query on the "negative_prompt" edge.

func (*GenerationQuery) QueryPrompt

func (gq *GenerationQuery) QueryPrompt() *PromptQuery

QueryPrompt chains the current query on the "prompt" edge.

func (*GenerationQuery) QueryScheduler

func (gq *GenerationQuery) QueryScheduler() *SchedulerQuery

QueryScheduler chains the current query on the "scheduler" edge.

func (*GenerationQuery) QueryUser

func (gq *GenerationQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*GenerationQuery) Select

func (gq *GenerationQuery) Select(fields ...string) *GenerationSelect

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 {
	Width int32 `json:"width,omitempty"`
}

client.Generation.Query().
	Select(generation.FieldWidth).
	Scan(ctx, &v)

func (*GenerationQuery) Unique

func (gq *GenerationQuery) Unique(unique bool) *GenerationQuery

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 (*GenerationQuery) Where

Where adds a new predicate for the GenerationQuery builder.

func (*GenerationQuery) WithAPITokens

func (gq *GenerationQuery) WithAPITokens(opts ...func(*ApiTokenQuery)) *GenerationQuery

WithAPITokens tells the query-builder to eager-load the nodes that are connected to the "api_tokens" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationQuery) WithDeviceInfo

func (gq *GenerationQuery) WithDeviceInfo(opts ...func(*DeviceInfoQuery)) *GenerationQuery

WithDeviceInfo tells the query-builder to eager-load the nodes that are connected to the "device_info" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationQuery) WithGenerationModel

func (gq *GenerationQuery) WithGenerationModel(opts ...func(*GenerationModelQuery)) *GenerationQuery

WithGenerationModel tells the query-builder to eager-load the nodes that are connected to the "generation_model" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationQuery) WithGenerationOutputs

func (gq *GenerationQuery) WithGenerationOutputs(opts ...func(*GenerationOutputQuery)) *GenerationQuery

WithGenerationOutputs tells the query-builder to eager-load the nodes that are connected to the "generation_outputs" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationQuery) WithNegativePrompt

func (gq *GenerationQuery) WithNegativePrompt(opts ...func(*NegativePromptQuery)) *GenerationQuery

WithNegativePrompt tells the query-builder to eager-load the nodes that are connected to the "negative_prompt" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationQuery) WithPrompt

func (gq *GenerationQuery) WithPrompt(opts ...func(*PromptQuery)) *GenerationQuery

WithPrompt tells the query-builder to eager-load the nodes that are connected to the "prompt" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationQuery) WithScheduler

func (gq *GenerationQuery) WithScheduler(opts ...func(*SchedulerQuery)) *GenerationQuery

WithScheduler tells the query-builder to eager-load the nodes that are connected to the "scheduler" edge. The optional arguments are used to configure the query builder of the edge.

func (*GenerationQuery) WithUser

func (gq *GenerationQuery) WithUser(opts ...func(*UserQuery)) *GenerationQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type GenerationSelect

type GenerationSelect struct {
	*GenerationQuery
	// contains filtered or unexported fields
}

GenerationSelect is the builder for selecting fields of Generation entities.

func (*GenerationSelect) Aggregate

func (gs *GenerationSelect) Aggregate(fns ...AggregateFunc) *GenerationSelect

Aggregate adds the given aggregation functions to the selector query.

func (*GenerationSelect) Bool

func (s *GenerationSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*GenerationSelect) BoolX

func (s *GenerationSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*GenerationSelect) Bools

func (s *GenerationSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*GenerationSelect) BoolsX

func (s *GenerationSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (GenerationSelect) ExecContext

func (c GenerationSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationSelect) Float64

func (s *GenerationSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*GenerationSelect) Float64X

func (s *GenerationSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*GenerationSelect) Float64s

func (s *GenerationSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*GenerationSelect) Float64sX

func (s *GenerationSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*GenerationSelect) Int

func (s *GenerationSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*GenerationSelect) IntX

func (s *GenerationSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*GenerationSelect) Ints

func (s *GenerationSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*GenerationSelect) IntsX

func (s *GenerationSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*GenerationSelect) Modify

func (gs *GenerationSelect) Modify(modifiers ...func(s *sql.Selector)) *GenerationSelect

Modify adds a query modifier for attaching custom logic to queries.

func (GenerationSelect) QueryContext

func (c GenerationSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationSelect) Scan

func (gs *GenerationSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*GenerationSelect) ScanX

func (s *GenerationSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*GenerationSelect) String

func (s *GenerationSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*GenerationSelect) StringX

func (s *GenerationSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*GenerationSelect) Strings

func (s *GenerationSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*GenerationSelect) StringsX

func (s *GenerationSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type GenerationUpdate

type GenerationUpdate struct {
	// contains filtered or unexported fields
}

GenerationUpdate is the builder for updating Generation entities.

func (*GenerationUpdate) AddGenerationOutputIDs

func (gu *GenerationUpdate) AddGenerationOutputIDs(ids ...uuid.UUID) *GenerationUpdate

AddGenerationOutputIDs adds the "generation_outputs" edge to the GenerationOutput entity by IDs.

func (*GenerationUpdate) AddGenerationOutputs

func (gu *GenerationUpdate) AddGenerationOutputs(g ...*GenerationOutput) *GenerationUpdate

AddGenerationOutputs adds the "generation_outputs" edges to the GenerationOutput entity.

func (*GenerationUpdate) AddGuidanceScale

func (gu *GenerationUpdate) AddGuidanceScale(f float32) *GenerationUpdate

AddGuidanceScale adds f to the "guidance_scale" field.

func (*GenerationUpdate) AddHeight

func (gu *GenerationUpdate) AddHeight(i int32) *GenerationUpdate

AddHeight adds i to the "height" field.

func (*GenerationUpdate) AddInferenceSteps

func (gu *GenerationUpdate) AddInferenceSteps(i int32) *GenerationUpdate

AddInferenceSteps adds i to the "inference_steps" field.

func (*GenerationUpdate) AddNsfwCount

func (gu *GenerationUpdate) AddNsfwCount(i int32) *GenerationUpdate

AddNsfwCount adds i to the "nsfw_count" field.

func (*GenerationUpdate) AddNumOutputs

func (gu *GenerationUpdate) AddNumOutputs(i int32) *GenerationUpdate

AddNumOutputs adds i to the "num_outputs" field.

func (*GenerationUpdate) AddPromptStrength

func (gu *GenerationUpdate) AddPromptStrength(f float32) *GenerationUpdate

AddPromptStrength adds f to the "prompt_strength" field.

func (*GenerationUpdate) AddSeed

func (gu *GenerationUpdate) AddSeed(i int) *GenerationUpdate

AddSeed adds i to the "seed" field.

func (*GenerationUpdate) AddWidth

func (gu *GenerationUpdate) AddWidth(i int32) *GenerationUpdate

AddWidth adds i to the "width" field.

func (*GenerationUpdate) ClearAPITokenID

func (gu *GenerationUpdate) ClearAPITokenID() *GenerationUpdate

ClearAPITokenID clears the value of the "api_token_id" field.

func (*GenerationUpdate) ClearAPITokens

func (gu *GenerationUpdate) ClearAPITokens() *GenerationUpdate

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*GenerationUpdate) ClearCompletedAt

func (gu *GenerationUpdate) ClearCompletedAt() *GenerationUpdate

ClearCompletedAt clears the value of the "completed_at" field.

func (*GenerationUpdate) ClearCountryCode

func (gu *GenerationUpdate) ClearCountryCode() *GenerationUpdate

ClearCountryCode clears the value of the "country_code" field.

func (*GenerationUpdate) ClearDeviceInfo

func (gu *GenerationUpdate) ClearDeviceInfo() *GenerationUpdate

ClearDeviceInfo clears the "device_info" edge to the DeviceInfo entity.

func (*GenerationUpdate) ClearFailureReason

func (gu *GenerationUpdate) ClearFailureReason() *GenerationUpdate

ClearFailureReason clears the value of the "failure_reason" field.

func (*GenerationUpdate) ClearGenerationModel

func (gu *GenerationUpdate) ClearGenerationModel() *GenerationUpdate

ClearGenerationModel clears the "generation_model" edge to the GenerationModel entity.

func (*GenerationUpdate) ClearGenerationOutputs

func (gu *GenerationUpdate) ClearGenerationOutputs() *GenerationUpdate

ClearGenerationOutputs clears all "generation_outputs" edges to the GenerationOutput entity.

func (*GenerationUpdate) ClearInitImageURL

func (gu *GenerationUpdate) ClearInitImageURL() *GenerationUpdate

ClearInitImageURL clears the value of the "init_image_url" field.

func (*GenerationUpdate) ClearMaskImageURL

func (gu *GenerationUpdate) ClearMaskImageURL() *GenerationUpdate

ClearMaskImageURL clears the value of the "mask_image_url" field.

func (*GenerationUpdate) ClearNegativePrompt

func (gu *GenerationUpdate) ClearNegativePrompt() *GenerationUpdate

ClearNegativePrompt clears the "negative_prompt" edge to the NegativePrompt entity.

func (*GenerationUpdate) ClearNegativePromptID

func (gu *GenerationUpdate) ClearNegativePromptID() *GenerationUpdate

ClearNegativePromptID clears the value of the "negative_prompt_id" field.

func (*GenerationUpdate) ClearPrompt

func (gu *GenerationUpdate) ClearPrompt() *GenerationUpdate

ClearPrompt clears the "prompt" edge to the Prompt entity.

func (*GenerationUpdate) ClearPromptID

func (gu *GenerationUpdate) ClearPromptID() *GenerationUpdate

ClearPromptID clears the value of the "prompt_id" field.

func (*GenerationUpdate) ClearPromptStrength

func (gu *GenerationUpdate) ClearPromptStrength() *GenerationUpdate

ClearPromptStrength clears the value of the "prompt_strength" field.

func (*GenerationUpdate) ClearScheduler

func (gu *GenerationUpdate) ClearScheduler() *GenerationUpdate

ClearScheduler clears the "scheduler" edge to the Scheduler entity.

func (*GenerationUpdate) ClearStartedAt

func (gu *GenerationUpdate) ClearStartedAt() *GenerationUpdate

ClearStartedAt clears the value of the "started_at" field.

func (*GenerationUpdate) ClearStripeProductID

func (gu *GenerationUpdate) ClearStripeProductID() *GenerationUpdate

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*GenerationUpdate) ClearUser

func (gu *GenerationUpdate) ClearUser() *GenerationUpdate

ClearUser clears the "user" edge to the User entity.

func (*GenerationUpdate) Exec

func (gu *GenerationUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*GenerationUpdate) ExecContext

func (c *GenerationUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationUpdate) ExecX

func (gu *GenerationUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationUpdate) Modify

func (gu *GenerationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GenerationUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*GenerationUpdate) Mutation

func (gu *GenerationUpdate) Mutation() *GenerationMutation

Mutation returns the GenerationMutation object of the builder.

func (*GenerationUpdate) QueryContext

func (c *GenerationUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationUpdate) RemoveGenerationOutputIDs

func (gu *GenerationUpdate) RemoveGenerationOutputIDs(ids ...uuid.UUID) *GenerationUpdate

RemoveGenerationOutputIDs removes the "generation_outputs" edge to GenerationOutput entities by IDs.

func (*GenerationUpdate) RemoveGenerationOutputs

func (gu *GenerationUpdate) RemoveGenerationOutputs(g ...*GenerationOutput) *GenerationUpdate

RemoveGenerationOutputs removes "generation_outputs" edges to GenerationOutput entities.

func (*GenerationUpdate) Save

func (gu *GenerationUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*GenerationUpdate) SaveX

func (gu *GenerationUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*GenerationUpdate) SetAPITokenID

func (gu *GenerationUpdate) SetAPITokenID(u uuid.UUID) *GenerationUpdate

SetAPITokenID sets the "api_token_id" field.

func (*GenerationUpdate) SetAPITokens

func (gu *GenerationUpdate) SetAPITokens(a *ApiToken) *GenerationUpdate

SetAPITokens sets the "api_tokens" edge to the ApiToken entity.

func (*GenerationUpdate) SetAPITokensID

func (gu *GenerationUpdate) SetAPITokensID(id uuid.UUID) *GenerationUpdate

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID.

func (*GenerationUpdate) SetCompletedAt

func (gu *GenerationUpdate) SetCompletedAt(t time.Time) *GenerationUpdate

SetCompletedAt sets the "completed_at" field.

func (*GenerationUpdate) SetCountryCode

func (gu *GenerationUpdate) SetCountryCode(s string) *GenerationUpdate

SetCountryCode sets the "country_code" field.

func (*GenerationUpdate) SetDeviceInfo

func (gu *GenerationUpdate) SetDeviceInfo(d *DeviceInfo) *GenerationUpdate

SetDeviceInfo sets the "device_info" edge to the DeviceInfo entity.

func (*GenerationUpdate) SetDeviceInfoID

func (gu *GenerationUpdate) SetDeviceInfoID(u uuid.UUID) *GenerationUpdate

SetDeviceInfoID sets the "device_info_id" field.

func (*GenerationUpdate) SetFailureReason

func (gu *GenerationUpdate) SetFailureReason(s string) *GenerationUpdate

SetFailureReason sets the "failure_reason" field.

func (*GenerationUpdate) SetGenerationModel

func (gu *GenerationUpdate) SetGenerationModel(g *GenerationModel) *GenerationUpdate

SetGenerationModel sets the "generation_model" edge to the GenerationModel entity.

func (*GenerationUpdate) SetGenerationModelID

func (gu *GenerationUpdate) SetGenerationModelID(id uuid.UUID) *GenerationUpdate

SetGenerationModelID sets the "generation_model" edge to the GenerationModel entity by ID.

func (*GenerationUpdate) SetGuidanceScale

func (gu *GenerationUpdate) SetGuidanceScale(f float32) *GenerationUpdate

SetGuidanceScale sets the "guidance_scale" field.

func (*GenerationUpdate) SetHeight

func (gu *GenerationUpdate) SetHeight(i int32) *GenerationUpdate

SetHeight sets the "height" field.

func (*GenerationUpdate) SetInferenceSteps

func (gu *GenerationUpdate) SetInferenceSteps(i int32) *GenerationUpdate

SetInferenceSteps sets the "inference_steps" field.

func (*GenerationUpdate) SetInitImageURL

func (gu *GenerationUpdate) SetInitImageURL(s string) *GenerationUpdate

SetInitImageURL sets the "init_image_url" field.

func (*GenerationUpdate) SetMaskImageURL

func (gu *GenerationUpdate) SetMaskImageURL(s string) *GenerationUpdate

SetMaskImageURL sets the "mask_image_url" field.

func (*GenerationUpdate) SetModelID

func (gu *GenerationUpdate) SetModelID(u uuid.UUID) *GenerationUpdate

SetModelID sets the "model_id" field.

func (*GenerationUpdate) SetNegativePrompt

func (gu *GenerationUpdate) SetNegativePrompt(n *NegativePrompt) *GenerationUpdate

SetNegativePrompt sets the "negative_prompt" edge to the NegativePrompt entity.

func (*GenerationUpdate) SetNegativePromptID

func (gu *GenerationUpdate) SetNegativePromptID(u uuid.UUID) *GenerationUpdate

SetNegativePromptID sets the "negative_prompt_id" field.

func (*GenerationUpdate) SetNillableAPITokenID

func (gu *GenerationUpdate) SetNillableAPITokenID(u *uuid.UUID) *GenerationUpdate

SetNillableAPITokenID sets the "api_token_id" field if the given value is not nil.

func (*GenerationUpdate) SetNillableAPITokensID

func (gu *GenerationUpdate) SetNillableAPITokensID(id *uuid.UUID) *GenerationUpdate

SetNillableAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID if the given value is not nil.

func (*GenerationUpdate) SetNillableCompletedAt

func (gu *GenerationUpdate) SetNillableCompletedAt(t *time.Time) *GenerationUpdate

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*GenerationUpdate) SetNillableCountryCode

func (gu *GenerationUpdate) SetNillableCountryCode(s *string) *GenerationUpdate

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*GenerationUpdate) SetNillableFailureReason

func (gu *GenerationUpdate) SetNillableFailureReason(s *string) *GenerationUpdate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*GenerationUpdate) SetNillableInitImageURL

func (gu *GenerationUpdate) SetNillableInitImageURL(s *string) *GenerationUpdate

SetNillableInitImageURL sets the "init_image_url" field if the given value is not nil.

func (*GenerationUpdate) SetNillableMaskImageURL

func (gu *GenerationUpdate) SetNillableMaskImageURL(s *string) *GenerationUpdate

SetNillableMaskImageURL sets the "mask_image_url" field if the given value is not nil.

func (*GenerationUpdate) SetNillableNegativePromptID

func (gu *GenerationUpdate) SetNillableNegativePromptID(u *uuid.UUID) *GenerationUpdate

SetNillableNegativePromptID sets the "negative_prompt_id" field if the given value is not nil.

func (*GenerationUpdate) SetNillableNsfwCount

func (gu *GenerationUpdate) SetNillableNsfwCount(i *int32) *GenerationUpdate

SetNillableNsfwCount sets the "nsfw_count" field if the given value is not nil.

func (*GenerationUpdate) SetNillablePromptID

func (gu *GenerationUpdate) SetNillablePromptID(u *uuid.UUID) *GenerationUpdate

SetNillablePromptID sets the "prompt_id" field if the given value is not nil.

func (*GenerationUpdate) SetNillablePromptStrength

func (gu *GenerationUpdate) SetNillablePromptStrength(f *float32) *GenerationUpdate

SetNillablePromptStrength sets the "prompt_strength" field if the given value is not nil.

func (*GenerationUpdate) SetNillableSourceType

func (gu *GenerationUpdate) SetNillableSourceType(et *enttypes.SourceType) *GenerationUpdate

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*GenerationUpdate) SetNillableStartedAt

func (gu *GenerationUpdate) SetNillableStartedAt(t *time.Time) *GenerationUpdate

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*GenerationUpdate) SetNillableStripeProductID

func (gu *GenerationUpdate) SetNillableStripeProductID(s *string) *GenerationUpdate

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*GenerationUpdate) SetNillableWasAutoSubmitted

func (gu *GenerationUpdate) SetNillableWasAutoSubmitted(b *bool) *GenerationUpdate

SetNillableWasAutoSubmitted sets the "was_auto_submitted" field if the given value is not nil.

func (*GenerationUpdate) SetNsfwCount

func (gu *GenerationUpdate) SetNsfwCount(i int32) *GenerationUpdate

SetNsfwCount sets the "nsfw_count" field.

func (*GenerationUpdate) SetNumOutputs

func (gu *GenerationUpdate) SetNumOutputs(i int32) *GenerationUpdate

SetNumOutputs sets the "num_outputs" field.

func (*GenerationUpdate) SetPrompt

func (gu *GenerationUpdate) SetPrompt(p *Prompt) *GenerationUpdate

SetPrompt sets the "prompt" edge to the Prompt entity.

func (*GenerationUpdate) SetPromptID

func (gu *GenerationUpdate) SetPromptID(u uuid.UUID) *GenerationUpdate

SetPromptID sets the "prompt_id" field.

func (*GenerationUpdate) SetPromptStrength

func (gu *GenerationUpdate) SetPromptStrength(f float32) *GenerationUpdate

SetPromptStrength sets the "prompt_strength" field.

func (*GenerationUpdate) SetScheduler

func (gu *GenerationUpdate) SetScheduler(s *Scheduler) *GenerationUpdate

SetScheduler sets the "scheduler" edge to the Scheduler entity.

func (*GenerationUpdate) SetSchedulerID

func (gu *GenerationUpdate) SetSchedulerID(u uuid.UUID) *GenerationUpdate

SetSchedulerID sets the "scheduler_id" field.

func (*GenerationUpdate) SetSeed

func (gu *GenerationUpdate) SetSeed(i int) *GenerationUpdate

SetSeed sets the "seed" field.

func (*GenerationUpdate) SetSourceType

func (gu *GenerationUpdate) SetSourceType(et enttypes.SourceType) *GenerationUpdate

SetSourceType sets the "source_type" field.

func (*GenerationUpdate) SetStartedAt

func (gu *GenerationUpdate) SetStartedAt(t time.Time) *GenerationUpdate

SetStartedAt sets the "started_at" field.

func (*GenerationUpdate) SetStatus

SetStatus sets the "status" field.

func (*GenerationUpdate) SetStripeProductID

func (gu *GenerationUpdate) SetStripeProductID(s string) *GenerationUpdate

SetStripeProductID sets the "stripe_product_id" field.

func (*GenerationUpdate) SetUpdatedAt

func (gu *GenerationUpdate) SetUpdatedAt(t time.Time) *GenerationUpdate

SetUpdatedAt sets the "updated_at" field.

func (*GenerationUpdate) SetUser

func (gu *GenerationUpdate) SetUser(u *User) *GenerationUpdate

SetUser sets the "user" edge to the User entity.

func (*GenerationUpdate) SetUserID

func (gu *GenerationUpdate) SetUserID(u uuid.UUID) *GenerationUpdate

SetUserID sets the "user_id" field.

func (*GenerationUpdate) SetWasAutoSubmitted

func (gu *GenerationUpdate) SetWasAutoSubmitted(b bool) *GenerationUpdate

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*GenerationUpdate) SetWidth

func (gu *GenerationUpdate) SetWidth(i int32) *GenerationUpdate

SetWidth sets the "width" field.

func (*GenerationUpdate) Where

Where appends a list predicates to the GenerationUpdate builder.

type GenerationUpdateOne

type GenerationUpdateOne struct {
	// contains filtered or unexported fields
}

GenerationUpdateOne is the builder for updating a single Generation entity.

func (*GenerationUpdateOne) AddGenerationOutputIDs

func (guo *GenerationUpdateOne) AddGenerationOutputIDs(ids ...uuid.UUID) *GenerationUpdateOne

AddGenerationOutputIDs adds the "generation_outputs" edge to the GenerationOutput entity by IDs.

func (*GenerationUpdateOne) AddGenerationOutputs

func (guo *GenerationUpdateOne) AddGenerationOutputs(g ...*GenerationOutput) *GenerationUpdateOne

AddGenerationOutputs adds the "generation_outputs" edges to the GenerationOutput entity.

func (*GenerationUpdateOne) AddGuidanceScale

func (guo *GenerationUpdateOne) AddGuidanceScale(f float32) *GenerationUpdateOne

AddGuidanceScale adds f to the "guidance_scale" field.

func (*GenerationUpdateOne) AddHeight

func (guo *GenerationUpdateOne) AddHeight(i int32) *GenerationUpdateOne

AddHeight adds i to the "height" field.

func (*GenerationUpdateOne) AddInferenceSteps

func (guo *GenerationUpdateOne) AddInferenceSteps(i int32) *GenerationUpdateOne

AddInferenceSteps adds i to the "inference_steps" field.

func (*GenerationUpdateOne) AddNsfwCount

func (guo *GenerationUpdateOne) AddNsfwCount(i int32) *GenerationUpdateOne

AddNsfwCount adds i to the "nsfw_count" field.

func (*GenerationUpdateOne) AddNumOutputs

func (guo *GenerationUpdateOne) AddNumOutputs(i int32) *GenerationUpdateOne

AddNumOutputs adds i to the "num_outputs" field.

func (*GenerationUpdateOne) AddPromptStrength

func (guo *GenerationUpdateOne) AddPromptStrength(f float32) *GenerationUpdateOne

AddPromptStrength adds f to the "prompt_strength" field.

func (*GenerationUpdateOne) AddSeed

func (guo *GenerationUpdateOne) AddSeed(i int) *GenerationUpdateOne

AddSeed adds i to the "seed" field.

func (*GenerationUpdateOne) AddWidth

func (guo *GenerationUpdateOne) AddWidth(i int32) *GenerationUpdateOne

AddWidth adds i to the "width" field.

func (*GenerationUpdateOne) ClearAPITokenID

func (guo *GenerationUpdateOne) ClearAPITokenID() *GenerationUpdateOne

ClearAPITokenID clears the value of the "api_token_id" field.

func (*GenerationUpdateOne) ClearAPITokens

func (guo *GenerationUpdateOne) ClearAPITokens() *GenerationUpdateOne

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*GenerationUpdateOne) ClearCompletedAt

func (guo *GenerationUpdateOne) ClearCompletedAt() *GenerationUpdateOne

ClearCompletedAt clears the value of the "completed_at" field.

func (*GenerationUpdateOne) ClearCountryCode

func (guo *GenerationUpdateOne) ClearCountryCode() *GenerationUpdateOne

ClearCountryCode clears the value of the "country_code" field.

func (*GenerationUpdateOne) ClearDeviceInfo

func (guo *GenerationUpdateOne) ClearDeviceInfo() *GenerationUpdateOne

ClearDeviceInfo clears the "device_info" edge to the DeviceInfo entity.

func (*GenerationUpdateOne) ClearFailureReason

func (guo *GenerationUpdateOne) ClearFailureReason() *GenerationUpdateOne

ClearFailureReason clears the value of the "failure_reason" field.

func (*GenerationUpdateOne) ClearGenerationModel

func (guo *GenerationUpdateOne) ClearGenerationModel() *GenerationUpdateOne

ClearGenerationModel clears the "generation_model" edge to the GenerationModel entity.

func (*GenerationUpdateOne) ClearGenerationOutputs

func (guo *GenerationUpdateOne) ClearGenerationOutputs() *GenerationUpdateOne

ClearGenerationOutputs clears all "generation_outputs" edges to the GenerationOutput entity.

func (*GenerationUpdateOne) ClearInitImageURL

func (guo *GenerationUpdateOne) ClearInitImageURL() *GenerationUpdateOne

ClearInitImageURL clears the value of the "init_image_url" field.

func (*GenerationUpdateOne) ClearMaskImageURL

func (guo *GenerationUpdateOne) ClearMaskImageURL() *GenerationUpdateOne

ClearMaskImageURL clears the value of the "mask_image_url" field.

func (*GenerationUpdateOne) ClearNegativePrompt

func (guo *GenerationUpdateOne) ClearNegativePrompt() *GenerationUpdateOne

ClearNegativePrompt clears the "negative_prompt" edge to the NegativePrompt entity.

func (*GenerationUpdateOne) ClearNegativePromptID

func (guo *GenerationUpdateOne) ClearNegativePromptID() *GenerationUpdateOne

ClearNegativePromptID clears the value of the "negative_prompt_id" field.

func (*GenerationUpdateOne) ClearPrompt

func (guo *GenerationUpdateOne) ClearPrompt() *GenerationUpdateOne

ClearPrompt clears the "prompt" edge to the Prompt entity.

func (*GenerationUpdateOne) ClearPromptID

func (guo *GenerationUpdateOne) ClearPromptID() *GenerationUpdateOne

ClearPromptID clears the value of the "prompt_id" field.

func (*GenerationUpdateOne) ClearPromptStrength

func (guo *GenerationUpdateOne) ClearPromptStrength() *GenerationUpdateOne

ClearPromptStrength clears the value of the "prompt_strength" field.

func (*GenerationUpdateOne) ClearScheduler

func (guo *GenerationUpdateOne) ClearScheduler() *GenerationUpdateOne

ClearScheduler clears the "scheduler" edge to the Scheduler entity.

func (*GenerationUpdateOne) ClearStartedAt

func (guo *GenerationUpdateOne) ClearStartedAt() *GenerationUpdateOne

ClearStartedAt clears the value of the "started_at" field.

func (*GenerationUpdateOne) ClearStripeProductID

func (guo *GenerationUpdateOne) ClearStripeProductID() *GenerationUpdateOne

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*GenerationUpdateOne) ClearUser

func (guo *GenerationUpdateOne) ClearUser() *GenerationUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*GenerationUpdateOne) Exec

func (guo *GenerationUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*GenerationUpdateOne) ExecContext

func (c *GenerationUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*GenerationUpdateOne) ExecX

func (guo *GenerationUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationUpdateOne) Modify

func (guo *GenerationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *GenerationUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*GenerationUpdateOne) Mutation

func (guo *GenerationUpdateOne) Mutation() *GenerationMutation

Mutation returns the GenerationMutation object of the builder.

func (*GenerationUpdateOne) QueryContext

func (c *GenerationUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*GenerationUpdateOne) RemoveGenerationOutputIDs

func (guo *GenerationUpdateOne) RemoveGenerationOutputIDs(ids ...uuid.UUID) *GenerationUpdateOne

RemoveGenerationOutputIDs removes the "generation_outputs" edge to GenerationOutput entities by IDs.

func (*GenerationUpdateOne) RemoveGenerationOutputs

func (guo *GenerationUpdateOne) RemoveGenerationOutputs(g ...*GenerationOutput) *GenerationUpdateOne

RemoveGenerationOutputs removes "generation_outputs" edges to GenerationOutput entities.

func (*GenerationUpdateOne) Save

func (guo *GenerationUpdateOne) Save(ctx context.Context) (*Generation, error)

Save executes the query and returns the updated Generation entity.

func (*GenerationUpdateOne) SaveX

func (guo *GenerationUpdateOne) SaveX(ctx context.Context) *Generation

SaveX is like Save, but panics if an error occurs.

func (*GenerationUpdateOne) Select

func (guo *GenerationUpdateOne) Select(field string, fields ...string) *GenerationUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*GenerationUpdateOne) SetAPITokenID

func (guo *GenerationUpdateOne) SetAPITokenID(u uuid.UUID) *GenerationUpdateOne

SetAPITokenID sets the "api_token_id" field.

func (*GenerationUpdateOne) SetAPITokens

func (guo *GenerationUpdateOne) SetAPITokens(a *ApiToken) *GenerationUpdateOne

SetAPITokens sets the "api_tokens" edge to the ApiToken entity.

func (*GenerationUpdateOne) SetAPITokensID

func (guo *GenerationUpdateOne) SetAPITokensID(id uuid.UUID) *GenerationUpdateOne

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID.

func (*GenerationUpdateOne) SetCompletedAt

func (guo *GenerationUpdateOne) SetCompletedAt(t time.Time) *GenerationUpdateOne

SetCompletedAt sets the "completed_at" field.

func (*GenerationUpdateOne) SetCountryCode

func (guo *GenerationUpdateOne) SetCountryCode(s string) *GenerationUpdateOne

SetCountryCode sets the "country_code" field.

func (*GenerationUpdateOne) SetDeviceInfo

func (guo *GenerationUpdateOne) SetDeviceInfo(d *DeviceInfo) *GenerationUpdateOne

SetDeviceInfo sets the "device_info" edge to the DeviceInfo entity.

func (*GenerationUpdateOne) SetDeviceInfoID

func (guo *GenerationUpdateOne) SetDeviceInfoID(u uuid.UUID) *GenerationUpdateOne

SetDeviceInfoID sets the "device_info_id" field.

func (*GenerationUpdateOne) SetFailureReason

func (guo *GenerationUpdateOne) SetFailureReason(s string) *GenerationUpdateOne

SetFailureReason sets the "failure_reason" field.

func (*GenerationUpdateOne) SetGenerationModel

func (guo *GenerationUpdateOne) SetGenerationModel(g *GenerationModel) *GenerationUpdateOne

SetGenerationModel sets the "generation_model" edge to the GenerationModel entity.

func (*GenerationUpdateOne) SetGenerationModelID

func (guo *GenerationUpdateOne) SetGenerationModelID(id uuid.UUID) *GenerationUpdateOne

SetGenerationModelID sets the "generation_model" edge to the GenerationModel entity by ID.

func (*GenerationUpdateOne) SetGuidanceScale

func (guo *GenerationUpdateOne) SetGuidanceScale(f float32) *GenerationUpdateOne

SetGuidanceScale sets the "guidance_scale" field.

func (*GenerationUpdateOne) SetHeight

func (guo *GenerationUpdateOne) SetHeight(i int32) *GenerationUpdateOne

SetHeight sets the "height" field.

func (*GenerationUpdateOne) SetInferenceSteps

func (guo *GenerationUpdateOne) SetInferenceSteps(i int32) *GenerationUpdateOne

SetInferenceSteps sets the "inference_steps" field.

func (*GenerationUpdateOne) SetInitImageURL

func (guo *GenerationUpdateOne) SetInitImageURL(s string) *GenerationUpdateOne

SetInitImageURL sets the "init_image_url" field.

func (*GenerationUpdateOne) SetMaskImageURL

func (guo *GenerationUpdateOne) SetMaskImageURL(s string) *GenerationUpdateOne

SetMaskImageURL sets the "mask_image_url" field.

func (*GenerationUpdateOne) SetModelID

func (guo *GenerationUpdateOne) SetModelID(u uuid.UUID) *GenerationUpdateOne

SetModelID sets the "model_id" field.

func (*GenerationUpdateOne) SetNegativePrompt

func (guo *GenerationUpdateOne) SetNegativePrompt(n *NegativePrompt) *GenerationUpdateOne

SetNegativePrompt sets the "negative_prompt" edge to the NegativePrompt entity.

func (*GenerationUpdateOne) SetNegativePromptID

func (guo *GenerationUpdateOne) SetNegativePromptID(u uuid.UUID) *GenerationUpdateOne

SetNegativePromptID sets the "negative_prompt_id" field.

func (*GenerationUpdateOne) SetNillableAPITokenID

func (guo *GenerationUpdateOne) SetNillableAPITokenID(u *uuid.UUID) *GenerationUpdateOne

SetNillableAPITokenID sets the "api_token_id" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableAPITokensID

func (guo *GenerationUpdateOne) SetNillableAPITokensID(id *uuid.UUID) *GenerationUpdateOne

SetNillableAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID if the given value is not nil.

func (*GenerationUpdateOne) SetNillableCompletedAt

func (guo *GenerationUpdateOne) SetNillableCompletedAt(t *time.Time) *GenerationUpdateOne

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableCountryCode

func (guo *GenerationUpdateOne) SetNillableCountryCode(s *string) *GenerationUpdateOne

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableFailureReason

func (guo *GenerationUpdateOne) SetNillableFailureReason(s *string) *GenerationUpdateOne

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableInitImageURL

func (guo *GenerationUpdateOne) SetNillableInitImageURL(s *string) *GenerationUpdateOne

SetNillableInitImageURL sets the "init_image_url" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableMaskImageURL

func (guo *GenerationUpdateOne) SetNillableMaskImageURL(s *string) *GenerationUpdateOne

SetNillableMaskImageURL sets the "mask_image_url" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableNegativePromptID

func (guo *GenerationUpdateOne) SetNillableNegativePromptID(u *uuid.UUID) *GenerationUpdateOne

SetNillableNegativePromptID sets the "negative_prompt_id" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableNsfwCount

func (guo *GenerationUpdateOne) SetNillableNsfwCount(i *int32) *GenerationUpdateOne

SetNillableNsfwCount sets the "nsfw_count" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillablePromptID

func (guo *GenerationUpdateOne) SetNillablePromptID(u *uuid.UUID) *GenerationUpdateOne

SetNillablePromptID sets the "prompt_id" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillablePromptStrength

func (guo *GenerationUpdateOne) SetNillablePromptStrength(f *float32) *GenerationUpdateOne

SetNillablePromptStrength sets the "prompt_strength" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableSourceType

func (guo *GenerationUpdateOne) SetNillableSourceType(et *enttypes.SourceType) *GenerationUpdateOne

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableStartedAt

func (guo *GenerationUpdateOne) SetNillableStartedAt(t *time.Time) *GenerationUpdateOne

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableStripeProductID

func (guo *GenerationUpdateOne) SetNillableStripeProductID(s *string) *GenerationUpdateOne

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*GenerationUpdateOne) SetNillableWasAutoSubmitted

func (guo *GenerationUpdateOne) SetNillableWasAutoSubmitted(b *bool) *GenerationUpdateOne

SetNillableWasAutoSubmitted sets the "was_auto_submitted" field if the given value is not nil.

func (*GenerationUpdateOne) SetNsfwCount

func (guo *GenerationUpdateOne) SetNsfwCount(i int32) *GenerationUpdateOne

SetNsfwCount sets the "nsfw_count" field.

func (*GenerationUpdateOne) SetNumOutputs

func (guo *GenerationUpdateOne) SetNumOutputs(i int32) *GenerationUpdateOne

SetNumOutputs sets the "num_outputs" field.

func (*GenerationUpdateOne) SetPrompt

func (guo *GenerationUpdateOne) SetPrompt(p *Prompt) *GenerationUpdateOne

SetPrompt sets the "prompt" edge to the Prompt entity.

func (*GenerationUpdateOne) SetPromptID

func (guo *GenerationUpdateOne) SetPromptID(u uuid.UUID) *GenerationUpdateOne

SetPromptID sets the "prompt_id" field.

func (*GenerationUpdateOne) SetPromptStrength

func (guo *GenerationUpdateOne) SetPromptStrength(f float32) *GenerationUpdateOne

SetPromptStrength sets the "prompt_strength" field.

func (*GenerationUpdateOne) SetScheduler

func (guo *GenerationUpdateOne) SetScheduler(s *Scheduler) *GenerationUpdateOne

SetScheduler sets the "scheduler" edge to the Scheduler entity.

func (*GenerationUpdateOne) SetSchedulerID

func (guo *GenerationUpdateOne) SetSchedulerID(u uuid.UUID) *GenerationUpdateOne

SetSchedulerID sets the "scheduler_id" field.

func (*GenerationUpdateOne) SetSeed

func (guo *GenerationUpdateOne) SetSeed(i int) *GenerationUpdateOne

SetSeed sets the "seed" field.

func (*GenerationUpdateOne) SetSourceType

SetSourceType sets the "source_type" field.

func (*GenerationUpdateOne) SetStartedAt

func (guo *GenerationUpdateOne) SetStartedAt(t time.Time) *GenerationUpdateOne

SetStartedAt sets the "started_at" field.

func (*GenerationUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*GenerationUpdateOne) SetStripeProductID

func (guo *GenerationUpdateOne) SetStripeProductID(s string) *GenerationUpdateOne

SetStripeProductID sets the "stripe_product_id" field.

func (*GenerationUpdateOne) SetUpdatedAt

func (guo *GenerationUpdateOne) SetUpdatedAt(t time.Time) *GenerationUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*GenerationUpdateOne) SetUser

func (guo *GenerationUpdateOne) SetUser(u *User) *GenerationUpdateOne

SetUser sets the "user" edge to the User entity.

func (*GenerationUpdateOne) SetUserID

func (guo *GenerationUpdateOne) SetUserID(u uuid.UUID) *GenerationUpdateOne

SetUserID sets the "user_id" field.

func (*GenerationUpdateOne) SetWasAutoSubmitted

func (guo *GenerationUpdateOne) SetWasAutoSubmitted(b bool) *GenerationUpdateOne

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*GenerationUpdateOne) SetWidth

func (guo *GenerationUpdateOne) SetWidth(i int32) *GenerationUpdateOne

SetWidth sets the "width" field.

type GenerationUpsert

type GenerationUpsert struct {
	*sql.UpdateSet
}

GenerationUpsert is the "OnConflict" setter.

func (*GenerationUpsert) AddGuidanceScale

func (u *GenerationUpsert) AddGuidanceScale(v float32) *GenerationUpsert

AddGuidanceScale adds v to the "guidance_scale" field.

func (*GenerationUpsert) AddHeight

func (u *GenerationUpsert) AddHeight(v int32) *GenerationUpsert

AddHeight adds v to the "height" field.

func (*GenerationUpsert) AddInferenceSteps

func (u *GenerationUpsert) AddInferenceSteps(v int32) *GenerationUpsert

AddInferenceSteps adds v to the "inference_steps" field.

func (*GenerationUpsert) AddNsfwCount

func (u *GenerationUpsert) AddNsfwCount(v int32) *GenerationUpsert

AddNsfwCount adds v to the "nsfw_count" field.

func (*GenerationUpsert) AddNumOutputs

func (u *GenerationUpsert) AddNumOutputs(v int32) *GenerationUpsert

AddNumOutputs adds v to the "num_outputs" field.

func (*GenerationUpsert) AddPromptStrength

func (u *GenerationUpsert) AddPromptStrength(v float32) *GenerationUpsert

AddPromptStrength adds v to the "prompt_strength" field.

func (*GenerationUpsert) AddSeed

func (u *GenerationUpsert) AddSeed(v int) *GenerationUpsert

AddSeed adds v to the "seed" field.

func (*GenerationUpsert) AddWidth

func (u *GenerationUpsert) AddWidth(v int32) *GenerationUpsert

AddWidth adds v to the "width" field.

func (*GenerationUpsert) ClearAPITokenID

func (u *GenerationUpsert) ClearAPITokenID() *GenerationUpsert

ClearAPITokenID clears the value of the "api_token_id" field.

func (*GenerationUpsert) ClearCompletedAt

func (u *GenerationUpsert) ClearCompletedAt() *GenerationUpsert

ClearCompletedAt clears the value of the "completed_at" field.

func (*GenerationUpsert) ClearCountryCode

func (u *GenerationUpsert) ClearCountryCode() *GenerationUpsert

ClearCountryCode clears the value of the "country_code" field.

func (*GenerationUpsert) ClearFailureReason

func (u *GenerationUpsert) ClearFailureReason() *GenerationUpsert

ClearFailureReason clears the value of the "failure_reason" field.

func (*GenerationUpsert) ClearInitImageURL

func (u *GenerationUpsert) ClearInitImageURL() *GenerationUpsert

ClearInitImageURL clears the value of the "init_image_url" field.

func (*GenerationUpsert) ClearMaskImageURL

func (u *GenerationUpsert) ClearMaskImageURL() *GenerationUpsert

ClearMaskImageURL clears the value of the "mask_image_url" field.

func (*GenerationUpsert) ClearNegativePromptID

func (u *GenerationUpsert) ClearNegativePromptID() *GenerationUpsert

ClearNegativePromptID clears the value of the "negative_prompt_id" field.

func (*GenerationUpsert) ClearPromptID

func (u *GenerationUpsert) ClearPromptID() *GenerationUpsert

ClearPromptID clears the value of the "prompt_id" field.

func (*GenerationUpsert) ClearPromptStrength

func (u *GenerationUpsert) ClearPromptStrength() *GenerationUpsert

ClearPromptStrength clears the value of the "prompt_strength" field.

func (*GenerationUpsert) ClearStartedAt

func (u *GenerationUpsert) ClearStartedAt() *GenerationUpsert

ClearStartedAt clears the value of the "started_at" field.

func (*GenerationUpsert) ClearStripeProductID

func (u *GenerationUpsert) ClearStripeProductID() *GenerationUpsert

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*GenerationUpsert) SetAPITokenID

func (u *GenerationUpsert) SetAPITokenID(v uuid.UUID) *GenerationUpsert

SetAPITokenID sets the "api_token_id" field.

func (*GenerationUpsert) SetCompletedAt

func (u *GenerationUpsert) SetCompletedAt(v time.Time) *GenerationUpsert

SetCompletedAt sets the "completed_at" field.

func (*GenerationUpsert) SetCountryCode

func (u *GenerationUpsert) SetCountryCode(v string) *GenerationUpsert

SetCountryCode sets the "country_code" field.

func (*GenerationUpsert) SetDeviceInfoID

func (u *GenerationUpsert) SetDeviceInfoID(v uuid.UUID) *GenerationUpsert

SetDeviceInfoID sets the "device_info_id" field.

func (*GenerationUpsert) SetFailureReason

func (u *GenerationUpsert) SetFailureReason(v string) *GenerationUpsert

SetFailureReason sets the "failure_reason" field.

func (*GenerationUpsert) SetGuidanceScale

func (u *GenerationUpsert) SetGuidanceScale(v float32) *GenerationUpsert

SetGuidanceScale sets the "guidance_scale" field.

func (*GenerationUpsert) SetHeight

func (u *GenerationUpsert) SetHeight(v int32) *GenerationUpsert

SetHeight sets the "height" field.

func (*GenerationUpsert) SetInferenceSteps

func (u *GenerationUpsert) SetInferenceSteps(v int32) *GenerationUpsert

SetInferenceSteps sets the "inference_steps" field.

func (*GenerationUpsert) SetInitImageURL

func (u *GenerationUpsert) SetInitImageURL(v string) *GenerationUpsert

SetInitImageURL sets the "init_image_url" field.

func (*GenerationUpsert) SetMaskImageURL

func (u *GenerationUpsert) SetMaskImageURL(v string) *GenerationUpsert

SetMaskImageURL sets the "mask_image_url" field.

func (*GenerationUpsert) SetModelID

func (u *GenerationUpsert) SetModelID(v uuid.UUID) *GenerationUpsert

SetModelID sets the "model_id" field.

func (*GenerationUpsert) SetNegativePromptID

func (u *GenerationUpsert) SetNegativePromptID(v uuid.UUID) *GenerationUpsert

SetNegativePromptID sets the "negative_prompt_id" field.

func (*GenerationUpsert) SetNsfwCount

func (u *GenerationUpsert) SetNsfwCount(v int32) *GenerationUpsert

SetNsfwCount sets the "nsfw_count" field.

func (*GenerationUpsert) SetNumOutputs

func (u *GenerationUpsert) SetNumOutputs(v int32) *GenerationUpsert

SetNumOutputs sets the "num_outputs" field.

func (*GenerationUpsert) SetPromptID

func (u *GenerationUpsert) SetPromptID(v uuid.UUID) *GenerationUpsert

SetPromptID sets the "prompt_id" field.

func (*GenerationUpsert) SetPromptStrength

func (u *GenerationUpsert) SetPromptStrength(v float32) *GenerationUpsert

SetPromptStrength sets the "prompt_strength" field.

func (*GenerationUpsert) SetSchedulerID

func (u *GenerationUpsert) SetSchedulerID(v uuid.UUID) *GenerationUpsert

SetSchedulerID sets the "scheduler_id" field.

func (*GenerationUpsert) SetSeed

func (u *GenerationUpsert) SetSeed(v int) *GenerationUpsert

SetSeed sets the "seed" field.

func (*GenerationUpsert) SetSourceType

SetSourceType sets the "source_type" field.

func (*GenerationUpsert) SetStartedAt

func (u *GenerationUpsert) SetStartedAt(v time.Time) *GenerationUpsert

SetStartedAt sets the "started_at" field.

func (*GenerationUpsert) SetStatus

SetStatus sets the "status" field.

func (*GenerationUpsert) SetStripeProductID

func (u *GenerationUpsert) SetStripeProductID(v string) *GenerationUpsert

SetStripeProductID sets the "stripe_product_id" field.

func (*GenerationUpsert) SetUpdatedAt

func (u *GenerationUpsert) SetUpdatedAt(v time.Time) *GenerationUpsert

SetUpdatedAt sets the "updated_at" field.

func (*GenerationUpsert) SetUserID

func (u *GenerationUpsert) SetUserID(v uuid.UUID) *GenerationUpsert

SetUserID sets the "user_id" field.

func (*GenerationUpsert) SetWasAutoSubmitted

func (u *GenerationUpsert) SetWasAutoSubmitted(v bool) *GenerationUpsert

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*GenerationUpsert) SetWidth

func (u *GenerationUpsert) SetWidth(v int32) *GenerationUpsert

SetWidth sets the "width" field.

func (*GenerationUpsert) UpdateAPITokenID

func (u *GenerationUpsert) UpdateAPITokenID() *GenerationUpsert

UpdateAPITokenID sets the "api_token_id" field to the value that was provided on create.

func (*GenerationUpsert) UpdateCompletedAt

func (u *GenerationUpsert) UpdateCompletedAt() *GenerationUpsert

UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.

func (*GenerationUpsert) UpdateCountryCode

func (u *GenerationUpsert) UpdateCountryCode() *GenerationUpsert

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*GenerationUpsert) UpdateDeviceInfoID

func (u *GenerationUpsert) UpdateDeviceInfoID() *GenerationUpsert

UpdateDeviceInfoID sets the "device_info_id" field to the value that was provided on create.

func (*GenerationUpsert) UpdateFailureReason

func (u *GenerationUpsert) UpdateFailureReason() *GenerationUpsert

UpdateFailureReason sets the "failure_reason" field to the value that was provided on create.

func (*GenerationUpsert) UpdateGuidanceScale

func (u *GenerationUpsert) UpdateGuidanceScale() *GenerationUpsert

UpdateGuidanceScale sets the "guidance_scale" field to the value that was provided on create.

func (*GenerationUpsert) UpdateHeight

func (u *GenerationUpsert) UpdateHeight() *GenerationUpsert

UpdateHeight sets the "height" field to the value that was provided on create.

func (*GenerationUpsert) UpdateInferenceSteps

func (u *GenerationUpsert) UpdateInferenceSteps() *GenerationUpsert

UpdateInferenceSteps sets the "inference_steps" field to the value that was provided on create.

func (*GenerationUpsert) UpdateInitImageURL

func (u *GenerationUpsert) UpdateInitImageURL() *GenerationUpsert

UpdateInitImageURL sets the "init_image_url" field to the value that was provided on create.

func (*GenerationUpsert) UpdateMaskImageURL

func (u *GenerationUpsert) UpdateMaskImageURL() *GenerationUpsert

UpdateMaskImageURL sets the "mask_image_url" field to the value that was provided on create.

func (*GenerationUpsert) UpdateModelID

func (u *GenerationUpsert) UpdateModelID() *GenerationUpsert

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*GenerationUpsert) UpdateNegativePromptID

func (u *GenerationUpsert) UpdateNegativePromptID() *GenerationUpsert

UpdateNegativePromptID sets the "negative_prompt_id" field to the value that was provided on create.

func (*GenerationUpsert) UpdateNsfwCount

func (u *GenerationUpsert) UpdateNsfwCount() *GenerationUpsert

UpdateNsfwCount sets the "nsfw_count" field to the value that was provided on create.

func (*GenerationUpsert) UpdateNumOutputs

func (u *GenerationUpsert) UpdateNumOutputs() *GenerationUpsert

UpdateNumOutputs sets the "num_outputs" field to the value that was provided on create.

func (*GenerationUpsert) UpdatePromptID

func (u *GenerationUpsert) UpdatePromptID() *GenerationUpsert

UpdatePromptID sets the "prompt_id" field to the value that was provided on create.

func (*GenerationUpsert) UpdatePromptStrength

func (u *GenerationUpsert) UpdatePromptStrength() *GenerationUpsert

UpdatePromptStrength sets the "prompt_strength" field to the value that was provided on create.

func (*GenerationUpsert) UpdateSchedulerID

func (u *GenerationUpsert) UpdateSchedulerID() *GenerationUpsert

UpdateSchedulerID sets the "scheduler_id" field to the value that was provided on create.

func (*GenerationUpsert) UpdateSeed

func (u *GenerationUpsert) UpdateSeed() *GenerationUpsert

UpdateSeed sets the "seed" field to the value that was provided on create.

func (*GenerationUpsert) UpdateSourceType

func (u *GenerationUpsert) UpdateSourceType() *GenerationUpsert

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*GenerationUpsert) UpdateStartedAt

func (u *GenerationUpsert) UpdateStartedAt() *GenerationUpsert

UpdateStartedAt sets the "started_at" field to the value that was provided on create.

func (*GenerationUpsert) UpdateStatus

func (u *GenerationUpsert) UpdateStatus() *GenerationUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*GenerationUpsert) UpdateStripeProductID

func (u *GenerationUpsert) UpdateStripeProductID() *GenerationUpsert

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*GenerationUpsert) UpdateUpdatedAt

func (u *GenerationUpsert) UpdateUpdatedAt() *GenerationUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*GenerationUpsert) UpdateUserID

func (u *GenerationUpsert) UpdateUserID() *GenerationUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*GenerationUpsert) UpdateWasAutoSubmitted

func (u *GenerationUpsert) UpdateWasAutoSubmitted() *GenerationUpsert

UpdateWasAutoSubmitted sets the "was_auto_submitted" field to the value that was provided on create.

func (*GenerationUpsert) UpdateWidth

func (u *GenerationUpsert) UpdateWidth() *GenerationUpsert

UpdateWidth sets the "width" field to the value that was provided on create.

type GenerationUpsertBulk

type GenerationUpsertBulk struct {
	// contains filtered or unexported fields
}

GenerationUpsertBulk is the builder for "upsert"-ing a bulk of Generation nodes.

func (*GenerationUpsertBulk) AddGuidanceScale

func (u *GenerationUpsertBulk) AddGuidanceScale(v float32) *GenerationUpsertBulk

AddGuidanceScale adds v to the "guidance_scale" field.

func (*GenerationUpsertBulk) AddHeight

AddHeight adds v to the "height" field.

func (*GenerationUpsertBulk) AddInferenceSteps

func (u *GenerationUpsertBulk) AddInferenceSteps(v int32) *GenerationUpsertBulk

AddInferenceSteps adds v to the "inference_steps" field.

func (*GenerationUpsertBulk) AddNsfwCount

func (u *GenerationUpsertBulk) AddNsfwCount(v int32) *GenerationUpsertBulk

AddNsfwCount adds v to the "nsfw_count" field.

func (*GenerationUpsertBulk) AddNumOutputs

func (u *GenerationUpsertBulk) AddNumOutputs(v int32) *GenerationUpsertBulk

AddNumOutputs adds v to the "num_outputs" field.

func (*GenerationUpsertBulk) AddPromptStrength

func (u *GenerationUpsertBulk) AddPromptStrength(v float32) *GenerationUpsertBulk

AddPromptStrength adds v to the "prompt_strength" field.

func (*GenerationUpsertBulk) AddSeed

AddSeed adds v to the "seed" field.

func (*GenerationUpsertBulk) AddWidth

AddWidth adds v to the "width" field.

func (*GenerationUpsertBulk) ClearAPITokenID

func (u *GenerationUpsertBulk) ClearAPITokenID() *GenerationUpsertBulk

ClearAPITokenID clears the value of the "api_token_id" field.

func (*GenerationUpsertBulk) ClearCompletedAt

func (u *GenerationUpsertBulk) ClearCompletedAt() *GenerationUpsertBulk

ClearCompletedAt clears the value of the "completed_at" field.

func (*GenerationUpsertBulk) ClearCountryCode

func (u *GenerationUpsertBulk) ClearCountryCode() *GenerationUpsertBulk

ClearCountryCode clears the value of the "country_code" field.

func (*GenerationUpsertBulk) ClearFailureReason

func (u *GenerationUpsertBulk) ClearFailureReason() *GenerationUpsertBulk

ClearFailureReason clears the value of the "failure_reason" field.

func (*GenerationUpsertBulk) ClearInitImageURL

func (u *GenerationUpsertBulk) ClearInitImageURL() *GenerationUpsertBulk

ClearInitImageURL clears the value of the "init_image_url" field.

func (*GenerationUpsertBulk) ClearMaskImageURL

func (u *GenerationUpsertBulk) ClearMaskImageURL() *GenerationUpsertBulk

ClearMaskImageURL clears the value of the "mask_image_url" field.

func (*GenerationUpsertBulk) ClearNegativePromptID

func (u *GenerationUpsertBulk) ClearNegativePromptID() *GenerationUpsertBulk

ClearNegativePromptID clears the value of the "negative_prompt_id" field.

func (*GenerationUpsertBulk) ClearPromptID

func (u *GenerationUpsertBulk) ClearPromptID() *GenerationUpsertBulk

ClearPromptID clears the value of the "prompt_id" field.

func (*GenerationUpsertBulk) ClearPromptStrength

func (u *GenerationUpsertBulk) ClearPromptStrength() *GenerationUpsertBulk

ClearPromptStrength clears the value of the "prompt_strength" field.

func (*GenerationUpsertBulk) ClearStartedAt

func (u *GenerationUpsertBulk) ClearStartedAt() *GenerationUpsertBulk

ClearStartedAt clears the value of the "started_at" field.

func (*GenerationUpsertBulk) ClearStripeProductID

func (u *GenerationUpsertBulk) ClearStripeProductID() *GenerationUpsertBulk

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*GenerationUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GenerationUpsertBulk) Exec

Exec executes the query.

func (*GenerationUpsertBulk) ExecX

func (u *GenerationUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Generation.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*GenerationUpsertBulk) SetAPITokenID

func (u *GenerationUpsertBulk) SetAPITokenID(v uuid.UUID) *GenerationUpsertBulk

SetAPITokenID sets the "api_token_id" field.

func (*GenerationUpsertBulk) SetCompletedAt

func (u *GenerationUpsertBulk) SetCompletedAt(v time.Time) *GenerationUpsertBulk

SetCompletedAt sets the "completed_at" field.

func (*GenerationUpsertBulk) SetCountryCode

func (u *GenerationUpsertBulk) SetCountryCode(v string) *GenerationUpsertBulk

SetCountryCode sets the "country_code" field.

func (*GenerationUpsertBulk) SetDeviceInfoID

func (u *GenerationUpsertBulk) SetDeviceInfoID(v uuid.UUID) *GenerationUpsertBulk

SetDeviceInfoID sets the "device_info_id" field.

func (*GenerationUpsertBulk) SetFailureReason

func (u *GenerationUpsertBulk) SetFailureReason(v string) *GenerationUpsertBulk

SetFailureReason sets the "failure_reason" field.

func (*GenerationUpsertBulk) SetGuidanceScale

func (u *GenerationUpsertBulk) SetGuidanceScale(v float32) *GenerationUpsertBulk

SetGuidanceScale sets the "guidance_scale" field.

func (*GenerationUpsertBulk) SetHeight

SetHeight sets the "height" field.

func (*GenerationUpsertBulk) SetInferenceSteps

func (u *GenerationUpsertBulk) SetInferenceSteps(v int32) *GenerationUpsertBulk

SetInferenceSteps sets the "inference_steps" field.

func (*GenerationUpsertBulk) SetInitImageURL

func (u *GenerationUpsertBulk) SetInitImageURL(v string) *GenerationUpsertBulk

SetInitImageURL sets the "init_image_url" field.

func (*GenerationUpsertBulk) SetMaskImageURL

func (u *GenerationUpsertBulk) SetMaskImageURL(v string) *GenerationUpsertBulk

SetMaskImageURL sets the "mask_image_url" field.

func (*GenerationUpsertBulk) SetModelID

SetModelID sets the "model_id" field.

func (*GenerationUpsertBulk) SetNegativePromptID

func (u *GenerationUpsertBulk) SetNegativePromptID(v uuid.UUID) *GenerationUpsertBulk

SetNegativePromptID sets the "negative_prompt_id" field.

func (*GenerationUpsertBulk) SetNsfwCount

func (u *GenerationUpsertBulk) SetNsfwCount(v int32) *GenerationUpsertBulk

SetNsfwCount sets the "nsfw_count" field.

func (*GenerationUpsertBulk) SetNumOutputs

func (u *GenerationUpsertBulk) SetNumOutputs(v int32) *GenerationUpsertBulk

SetNumOutputs sets the "num_outputs" field.

func (*GenerationUpsertBulk) SetPromptID

SetPromptID sets the "prompt_id" field.

func (*GenerationUpsertBulk) SetPromptStrength

func (u *GenerationUpsertBulk) SetPromptStrength(v float32) *GenerationUpsertBulk

SetPromptStrength sets the "prompt_strength" field.

func (*GenerationUpsertBulk) SetSchedulerID

func (u *GenerationUpsertBulk) SetSchedulerID(v uuid.UUID) *GenerationUpsertBulk

SetSchedulerID sets the "scheduler_id" field.

func (*GenerationUpsertBulk) SetSeed

SetSeed sets the "seed" field.

func (*GenerationUpsertBulk) SetSourceType

SetSourceType sets the "source_type" field.

func (*GenerationUpsertBulk) SetStartedAt

func (u *GenerationUpsertBulk) SetStartedAt(v time.Time) *GenerationUpsertBulk

SetStartedAt sets the "started_at" field.

func (*GenerationUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*GenerationUpsertBulk) SetStripeProductID

func (u *GenerationUpsertBulk) SetStripeProductID(v string) *GenerationUpsertBulk

SetStripeProductID sets the "stripe_product_id" field.

func (*GenerationUpsertBulk) SetUpdatedAt

func (u *GenerationUpsertBulk) SetUpdatedAt(v time.Time) *GenerationUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*GenerationUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*GenerationUpsertBulk) SetWasAutoSubmitted

func (u *GenerationUpsertBulk) SetWasAutoSubmitted(v bool) *GenerationUpsertBulk

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*GenerationUpsertBulk) SetWidth

SetWidth sets the "width" field.

func (*GenerationUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the GenerationCreateBulk.OnConflict documentation for more info.

func (*GenerationUpsertBulk) UpdateAPITokenID

func (u *GenerationUpsertBulk) UpdateAPITokenID() *GenerationUpsertBulk

UpdateAPITokenID sets the "api_token_id" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateCompletedAt

func (u *GenerationUpsertBulk) UpdateCompletedAt() *GenerationUpsertBulk

UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateCountryCode

func (u *GenerationUpsertBulk) UpdateCountryCode() *GenerationUpsertBulk

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateDeviceInfoID

func (u *GenerationUpsertBulk) UpdateDeviceInfoID() *GenerationUpsertBulk

UpdateDeviceInfoID sets the "device_info_id" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateFailureReason

func (u *GenerationUpsertBulk) UpdateFailureReason() *GenerationUpsertBulk

UpdateFailureReason sets the "failure_reason" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateGuidanceScale

func (u *GenerationUpsertBulk) UpdateGuidanceScale() *GenerationUpsertBulk

UpdateGuidanceScale sets the "guidance_scale" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateHeight

func (u *GenerationUpsertBulk) UpdateHeight() *GenerationUpsertBulk

UpdateHeight sets the "height" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateInferenceSteps

func (u *GenerationUpsertBulk) UpdateInferenceSteps() *GenerationUpsertBulk

UpdateInferenceSteps sets the "inference_steps" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateInitImageURL

func (u *GenerationUpsertBulk) UpdateInitImageURL() *GenerationUpsertBulk

UpdateInitImageURL sets the "init_image_url" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateMaskImageURL

func (u *GenerationUpsertBulk) UpdateMaskImageURL() *GenerationUpsertBulk

UpdateMaskImageURL sets the "mask_image_url" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateModelID

func (u *GenerationUpsertBulk) UpdateModelID() *GenerationUpsertBulk

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateNegativePromptID

func (u *GenerationUpsertBulk) UpdateNegativePromptID() *GenerationUpsertBulk

UpdateNegativePromptID sets the "negative_prompt_id" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateNewValues

func (u *GenerationUpsertBulk) UpdateNewValues() *GenerationUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Generation.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(generation.FieldID)
		}),
	).
	Exec(ctx)

func (*GenerationUpsertBulk) UpdateNsfwCount

func (u *GenerationUpsertBulk) UpdateNsfwCount() *GenerationUpsertBulk

UpdateNsfwCount sets the "nsfw_count" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateNumOutputs

func (u *GenerationUpsertBulk) UpdateNumOutputs() *GenerationUpsertBulk

UpdateNumOutputs sets the "num_outputs" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdatePromptID

func (u *GenerationUpsertBulk) UpdatePromptID() *GenerationUpsertBulk

UpdatePromptID sets the "prompt_id" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdatePromptStrength

func (u *GenerationUpsertBulk) UpdatePromptStrength() *GenerationUpsertBulk

UpdatePromptStrength sets the "prompt_strength" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateSchedulerID

func (u *GenerationUpsertBulk) UpdateSchedulerID() *GenerationUpsertBulk

UpdateSchedulerID sets the "scheduler_id" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateSeed

func (u *GenerationUpsertBulk) UpdateSeed() *GenerationUpsertBulk

UpdateSeed sets the "seed" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateSourceType

func (u *GenerationUpsertBulk) UpdateSourceType() *GenerationUpsertBulk

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateStartedAt

func (u *GenerationUpsertBulk) UpdateStartedAt() *GenerationUpsertBulk

UpdateStartedAt sets the "started_at" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateStatus

func (u *GenerationUpsertBulk) UpdateStatus() *GenerationUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateStripeProductID

func (u *GenerationUpsertBulk) UpdateStripeProductID() *GenerationUpsertBulk

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateUpdatedAt

func (u *GenerationUpsertBulk) UpdateUpdatedAt() *GenerationUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateUserID

func (u *GenerationUpsertBulk) UpdateUserID() *GenerationUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateWasAutoSubmitted

func (u *GenerationUpsertBulk) UpdateWasAutoSubmitted() *GenerationUpsertBulk

UpdateWasAutoSubmitted sets the "was_auto_submitted" field to the value that was provided on create.

func (*GenerationUpsertBulk) UpdateWidth

func (u *GenerationUpsertBulk) UpdateWidth() *GenerationUpsertBulk

UpdateWidth sets the "width" field to the value that was provided on create.

type GenerationUpsertOne

type GenerationUpsertOne struct {
	// contains filtered or unexported fields
}

GenerationUpsertOne is the builder for "upsert"-ing

one Generation node.

func (*GenerationUpsertOne) AddGuidanceScale

func (u *GenerationUpsertOne) AddGuidanceScale(v float32) *GenerationUpsertOne

AddGuidanceScale adds v to the "guidance_scale" field.

func (*GenerationUpsertOne) AddHeight

AddHeight adds v to the "height" field.

func (*GenerationUpsertOne) AddInferenceSteps

func (u *GenerationUpsertOne) AddInferenceSteps(v int32) *GenerationUpsertOne

AddInferenceSteps adds v to the "inference_steps" field.

func (*GenerationUpsertOne) AddNsfwCount

func (u *GenerationUpsertOne) AddNsfwCount(v int32) *GenerationUpsertOne

AddNsfwCount adds v to the "nsfw_count" field.

func (*GenerationUpsertOne) AddNumOutputs

func (u *GenerationUpsertOne) AddNumOutputs(v int32) *GenerationUpsertOne

AddNumOutputs adds v to the "num_outputs" field.

func (*GenerationUpsertOne) AddPromptStrength

func (u *GenerationUpsertOne) AddPromptStrength(v float32) *GenerationUpsertOne

AddPromptStrength adds v to the "prompt_strength" field.

func (*GenerationUpsertOne) AddSeed

AddSeed adds v to the "seed" field.

func (*GenerationUpsertOne) AddWidth

AddWidth adds v to the "width" field.

func (*GenerationUpsertOne) ClearAPITokenID

func (u *GenerationUpsertOne) ClearAPITokenID() *GenerationUpsertOne

ClearAPITokenID clears the value of the "api_token_id" field.

func (*GenerationUpsertOne) ClearCompletedAt

func (u *GenerationUpsertOne) ClearCompletedAt() *GenerationUpsertOne

ClearCompletedAt clears the value of the "completed_at" field.

func (*GenerationUpsertOne) ClearCountryCode

func (u *GenerationUpsertOne) ClearCountryCode() *GenerationUpsertOne

ClearCountryCode clears the value of the "country_code" field.

func (*GenerationUpsertOne) ClearFailureReason

func (u *GenerationUpsertOne) ClearFailureReason() *GenerationUpsertOne

ClearFailureReason clears the value of the "failure_reason" field.

func (*GenerationUpsertOne) ClearInitImageURL

func (u *GenerationUpsertOne) ClearInitImageURL() *GenerationUpsertOne

ClearInitImageURL clears the value of the "init_image_url" field.

func (*GenerationUpsertOne) ClearMaskImageURL

func (u *GenerationUpsertOne) ClearMaskImageURL() *GenerationUpsertOne

ClearMaskImageURL clears the value of the "mask_image_url" field.

func (*GenerationUpsertOne) ClearNegativePromptID

func (u *GenerationUpsertOne) ClearNegativePromptID() *GenerationUpsertOne

ClearNegativePromptID clears the value of the "negative_prompt_id" field.

func (*GenerationUpsertOne) ClearPromptID

func (u *GenerationUpsertOne) ClearPromptID() *GenerationUpsertOne

ClearPromptID clears the value of the "prompt_id" field.

func (*GenerationUpsertOne) ClearPromptStrength

func (u *GenerationUpsertOne) ClearPromptStrength() *GenerationUpsertOne

ClearPromptStrength clears the value of the "prompt_strength" field.

func (*GenerationUpsertOne) ClearStartedAt

func (u *GenerationUpsertOne) ClearStartedAt() *GenerationUpsertOne

ClearStartedAt clears the value of the "started_at" field.

func (*GenerationUpsertOne) ClearStripeProductID

func (u *GenerationUpsertOne) ClearStripeProductID() *GenerationUpsertOne

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*GenerationUpsertOne) DoNothing

func (u *GenerationUpsertOne) DoNothing() *GenerationUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*GenerationUpsertOne) Exec

Exec executes the query.

func (*GenerationUpsertOne) ExecX

func (u *GenerationUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*GenerationUpsertOne) ID

func (u *GenerationUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*GenerationUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*GenerationUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Generation.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*GenerationUpsertOne) SetAPITokenID

func (u *GenerationUpsertOne) SetAPITokenID(v uuid.UUID) *GenerationUpsertOne

SetAPITokenID sets the "api_token_id" field.

func (*GenerationUpsertOne) SetCompletedAt

func (u *GenerationUpsertOne) SetCompletedAt(v time.Time) *GenerationUpsertOne

SetCompletedAt sets the "completed_at" field.

func (*GenerationUpsertOne) SetCountryCode

func (u *GenerationUpsertOne) SetCountryCode(v string) *GenerationUpsertOne

SetCountryCode sets the "country_code" field.

func (*GenerationUpsertOne) SetDeviceInfoID

func (u *GenerationUpsertOne) SetDeviceInfoID(v uuid.UUID) *GenerationUpsertOne

SetDeviceInfoID sets the "device_info_id" field.

func (*GenerationUpsertOne) SetFailureReason

func (u *GenerationUpsertOne) SetFailureReason(v string) *GenerationUpsertOne

SetFailureReason sets the "failure_reason" field.

func (*GenerationUpsertOne) SetGuidanceScale

func (u *GenerationUpsertOne) SetGuidanceScale(v float32) *GenerationUpsertOne

SetGuidanceScale sets the "guidance_scale" field.

func (*GenerationUpsertOne) SetHeight

SetHeight sets the "height" field.

func (*GenerationUpsertOne) SetInferenceSteps

func (u *GenerationUpsertOne) SetInferenceSteps(v int32) *GenerationUpsertOne

SetInferenceSteps sets the "inference_steps" field.

func (*GenerationUpsertOne) SetInitImageURL

func (u *GenerationUpsertOne) SetInitImageURL(v string) *GenerationUpsertOne

SetInitImageURL sets the "init_image_url" field.

func (*GenerationUpsertOne) SetMaskImageURL

func (u *GenerationUpsertOne) SetMaskImageURL(v string) *GenerationUpsertOne

SetMaskImageURL sets the "mask_image_url" field.

func (*GenerationUpsertOne) SetModelID

SetModelID sets the "model_id" field.

func (*GenerationUpsertOne) SetNegativePromptID

func (u *GenerationUpsertOne) SetNegativePromptID(v uuid.UUID) *GenerationUpsertOne

SetNegativePromptID sets the "negative_prompt_id" field.

func (*GenerationUpsertOne) SetNsfwCount

func (u *GenerationUpsertOne) SetNsfwCount(v int32) *GenerationUpsertOne

SetNsfwCount sets the "nsfw_count" field.

func (*GenerationUpsertOne) SetNumOutputs

func (u *GenerationUpsertOne) SetNumOutputs(v int32) *GenerationUpsertOne

SetNumOutputs sets the "num_outputs" field.

func (*GenerationUpsertOne) SetPromptID

func (u *GenerationUpsertOne) SetPromptID(v uuid.UUID) *GenerationUpsertOne

SetPromptID sets the "prompt_id" field.

func (*GenerationUpsertOne) SetPromptStrength

func (u *GenerationUpsertOne) SetPromptStrength(v float32) *GenerationUpsertOne

SetPromptStrength sets the "prompt_strength" field.

func (*GenerationUpsertOne) SetSchedulerID

func (u *GenerationUpsertOne) SetSchedulerID(v uuid.UUID) *GenerationUpsertOne

SetSchedulerID sets the "scheduler_id" field.

func (*GenerationUpsertOne) SetSeed

SetSeed sets the "seed" field.

func (*GenerationUpsertOne) SetSourceType

SetSourceType sets the "source_type" field.

func (*GenerationUpsertOne) SetStartedAt

func (u *GenerationUpsertOne) SetStartedAt(v time.Time) *GenerationUpsertOne

SetStartedAt sets the "started_at" field.

func (*GenerationUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*GenerationUpsertOne) SetStripeProductID

func (u *GenerationUpsertOne) SetStripeProductID(v string) *GenerationUpsertOne

SetStripeProductID sets the "stripe_product_id" field.

func (*GenerationUpsertOne) SetUpdatedAt

func (u *GenerationUpsertOne) SetUpdatedAt(v time.Time) *GenerationUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*GenerationUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*GenerationUpsertOne) SetWasAutoSubmitted

func (u *GenerationUpsertOne) SetWasAutoSubmitted(v bool) *GenerationUpsertOne

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*GenerationUpsertOne) SetWidth

SetWidth sets the "width" field.

func (*GenerationUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the GenerationCreate.OnConflict documentation for more info.

func (*GenerationUpsertOne) UpdateAPITokenID

func (u *GenerationUpsertOne) UpdateAPITokenID() *GenerationUpsertOne

UpdateAPITokenID sets the "api_token_id" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateCompletedAt

func (u *GenerationUpsertOne) UpdateCompletedAt() *GenerationUpsertOne

UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateCountryCode

func (u *GenerationUpsertOne) UpdateCountryCode() *GenerationUpsertOne

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateDeviceInfoID

func (u *GenerationUpsertOne) UpdateDeviceInfoID() *GenerationUpsertOne

UpdateDeviceInfoID sets the "device_info_id" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateFailureReason

func (u *GenerationUpsertOne) UpdateFailureReason() *GenerationUpsertOne

UpdateFailureReason sets the "failure_reason" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateGuidanceScale

func (u *GenerationUpsertOne) UpdateGuidanceScale() *GenerationUpsertOne

UpdateGuidanceScale sets the "guidance_scale" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateHeight

func (u *GenerationUpsertOne) UpdateHeight() *GenerationUpsertOne

UpdateHeight sets the "height" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateInferenceSteps

func (u *GenerationUpsertOne) UpdateInferenceSteps() *GenerationUpsertOne

UpdateInferenceSteps sets the "inference_steps" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateInitImageURL

func (u *GenerationUpsertOne) UpdateInitImageURL() *GenerationUpsertOne

UpdateInitImageURL sets the "init_image_url" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateMaskImageURL

func (u *GenerationUpsertOne) UpdateMaskImageURL() *GenerationUpsertOne

UpdateMaskImageURL sets the "mask_image_url" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateModelID

func (u *GenerationUpsertOne) UpdateModelID() *GenerationUpsertOne

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateNegativePromptID

func (u *GenerationUpsertOne) UpdateNegativePromptID() *GenerationUpsertOne

UpdateNegativePromptID sets the "negative_prompt_id" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateNewValues

func (u *GenerationUpsertOne) UpdateNewValues() *GenerationUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Generation.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(generation.FieldID)
		}),
	).
	Exec(ctx)

func (*GenerationUpsertOne) UpdateNsfwCount

func (u *GenerationUpsertOne) UpdateNsfwCount() *GenerationUpsertOne

UpdateNsfwCount sets the "nsfw_count" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateNumOutputs

func (u *GenerationUpsertOne) UpdateNumOutputs() *GenerationUpsertOne

UpdateNumOutputs sets the "num_outputs" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdatePromptID

func (u *GenerationUpsertOne) UpdatePromptID() *GenerationUpsertOne

UpdatePromptID sets the "prompt_id" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdatePromptStrength

func (u *GenerationUpsertOne) UpdatePromptStrength() *GenerationUpsertOne

UpdatePromptStrength sets the "prompt_strength" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateSchedulerID

func (u *GenerationUpsertOne) UpdateSchedulerID() *GenerationUpsertOne

UpdateSchedulerID sets the "scheduler_id" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateSeed

func (u *GenerationUpsertOne) UpdateSeed() *GenerationUpsertOne

UpdateSeed sets the "seed" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateSourceType

func (u *GenerationUpsertOne) UpdateSourceType() *GenerationUpsertOne

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateStartedAt

func (u *GenerationUpsertOne) UpdateStartedAt() *GenerationUpsertOne

UpdateStartedAt sets the "started_at" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateStatus

func (u *GenerationUpsertOne) UpdateStatus() *GenerationUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateStripeProductID

func (u *GenerationUpsertOne) UpdateStripeProductID() *GenerationUpsertOne

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateUpdatedAt

func (u *GenerationUpsertOne) UpdateUpdatedAt() *GenerationUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateUserID

func (u *GenerationUpsertOne) UpdateUserID() *GenerationUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateWasAutoSubmitted

func (u *GenerationUpsertOne) UpdateWasAutoSubmitted() *GenerationUpsertOne

UpdateWasAutoSubmitted sets the "was_auto_submitted" field to the value that was provided on create.

func (*GenerationUpsertOne) UpdateWidth

func (u *GenerationUpsertOne) UpdateWidth() *GenerationUpsertOne

UpdateWidth sets the "width" field to the value that was provided on create.

type Generations

type Generations []*Generation

Generations is a parsable slice of Generation.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type IPBlackList

type IPBlackList struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// IP holds the value of the "ip" field.
	IP string `json:"ip,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

IPBlackList is the model entity for the IPBlackList schema.

func (*IPBlackList) ExecContext

func (c *IPBlackList) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*IPBlackList) QueryContext

func (c *IPBlackList) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*IPBlackList) String

func (ibl *IPBlackList) String() string

String implements the fmt.Stringer.

func (*IPBlackList) Unwrap

func (ibl *IPBlackList) Unwrap() *IPBlackList

Unwrap unwraps the IPBlackList 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 (*IPBlackList) Update

func (ibl *IPBlackList) Update() *IPBlackListUpdateOne

Update returns a builder for updating this IPBlackList. Note that you need to call IPBlackList.Unwrap() before calling this method if this IPBlackList was returned from a transaction, and the transaction was committed or rolled back.

type IPBlackListClient

type IPBlackListClient struct {
	// contains filtered or unexported fields
}

IPBlackListClient is a client for the IPBlackList schema.

func NewIPBlackListClient

func NewIPBlackListClient(c config) *IPBlackListClient

NewIPBlackListClient returns a client for the IPBlackList from the given config.

func (*IPBlackListClient) Create

func (c *IPBlackListClient) Create() *IPBlackListCreate

Create returns a builder for creating a IPBlackList entity.

func (*IPBlackListClient) CreateBulk

func (c *IPBlackListClient) CreateBulk(builders ...*IPBlackListCreate) *IPBlackListCreateBulk

CreateBulk returns a builder for creating a bulk of IPBlackList entities.

func (*IPBlackListClient) Delete

func (c *IPBlackListClient) Delete() *IPBlackListDelete

Delete returns a delete builder for IPBlackList.

func (*IPBlackListClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*IPBlackListClient) DeleteOneID

func (c *IPBlackListClient) DeleteOneID(id uuid.UUID) *IPBlackListDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*IPBlackListClient) ExecContext

func (c *IPBlackListClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*IPBlackListClient) Get

Get returns a IPBlackList entity by its id.

func (*IPBlackListClient) GetX

GetX is like Get, but panics if an error occurs.

func (*IPBlackListClient) Hooks

func (c *IPBlackListClient) Hooks() []Hook

Hooks returns the client hooks.

func (*IPBlackListClient) Intercept

func (c *IPBlackListClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `ipblacklist.Intercept(f(g(h())))`.

func (*IPBlackListClient) Interceptors

func (c *IPBlackListClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*IPBlackListClient) Query

func (c *IPBlackListClient) Query() *IPBlackListQuery

Query returns a query builder for IPBlackList.

func (*IPBlackListClient) QueryContext

func (c *IPBlackListClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*IPBlackListClient) Update

func (c *IPBlackListClient) Update() *IPBlackListUpdate

Update returns an update builder for IPBlackList.

func (*IPBlackListClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*IPBlackListClient) UpdateOneID

func (c *IPBlackListClient) UpdateOneID(id uuid.UUID) *IPBlackListUpdateOne

UpdateOneID returns an update builder for the given id.

func (*IPBlackListClient) Use

func (c *IPBlackListClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `ipblacklist.Hooks(f(g(h())))`.

type IPBlackListCreate

type IPBlackListCreate struct {
	// contains filtered or unexported fields
}

IPBlackListCreate is the builder for creating a IPBlackList entity.

func (*IPBlackListCreate) Exec

func (iblc *IPBlackListCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*IPBlackListCreate) ExecContext

func (c *IPBlackListCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*IPBlackListCreate) ExecX

func (iblc *IPBlackListCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IPBlackListCreate) Mutation

func (iblc *IPBlackListCreate) Mutation() *IPBlackListMutation

Mutation returns the IPBlackListMutation object of the builder.

func (*IPBlackListCreate) OnConflict

func (iblc *IPBlackListCreate) OnConflict(opts ...sql.ConflictOption) *IPBlackListUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.IPBlackList.Create().
	SetIP(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.IPBlackListUpsert) {
		SetIP(v+v).
	}).
	Exec(ctx)

func (*IPBlackListCreate) OnConflictColumns

func (iblc *IPBlackListCreate) OnConflictColumns(columns ...string) *IPBlackListUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.IPBlackList.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IPBlackListCreate) QueryContext

func (c *IPBlackListCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*IPBlackListCreate) Save

func (iblc *IPBlackListCreate) Save(ctx context.Context) (*IPBlackList, error)

Save creates the IPBlackList in the database.

func (*IPBlackListCreate) SaveX

func (iblc *IPBlackListCreate) SaveX(ctx context.Context) *IPBlackList

SaveX calls Save and panics if Save returns an error.

func (*IPBlackListCreate) SetCreatedAt

func (iblc *IPBlackListCreate) SetCreatedAt(t time.Time) *IPBlackListCreate

SetCreatedAt sets the "created_at" field.

func (*IPBlackListCreate) SetID

func (iblc *IPBlackListCreate) SetID(u uuid.UUID) *IPBlackListCreate

SetID sets the "id" field.

func (*IPBlackListCreate) SetIP

func (iblc *IPBlackListCreate) SetIP(s string) *IPBlackListCreate

SetIP sets the "ip" field.

func (*IPBlackListCreate) SetNillableCreatedAt

func (iblc *IPBlackListCreate) SetNillableCreatedAt(t *time.Time) *IPBlackListCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*IPBlackListCreate) SetNillableID

func (iblc *IPBlackListCreate) SetNillableID(u *uuid.UUID) *IPBlackListCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*IPBlackListCreate) SetNillableUpdatedAt

func (iblc *IPBlackListCreate) SetNillableUpdatedAt(t *time.Time) *IPBlackListCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*IPBlackListCreate) SetUpdatedAt

func (iblc *IPBlackListCreate) SetUpdatedAt(t time.Time) *IPBlackListCreate

SetUpdatedAt sets the "updated_at" field.

type IPBlackListCreateBulk

type IPBlackListCreateBulk struct {
	// contains filtered or unexported fields
}

IPBlackListCreateBulk is the builder for creating many IPBlackList entities in bulk.

func (*IPBlackListCreateBulk) Exec

func (iblcb *IPBlackListCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*IPBlackListCreateBulk) ExecContext

func (c *IPBlackListCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*IPBlackListCreateBulk) ExecX

func (iblcb *IPBlackListCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IPBlackListCreateBulk) OnConflict

func (iblcb *IPBlackListCreateBulk) OnConflict(opts ...sql.ConflictOption) *IPBlackListUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.IPBlackList.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.IPBlackListUpsert) {
		SetIP(v+v).
	}).
	Exec(ctx)

func (*IPBlackListCreateBulk) OnConflictColumns

func (iblcb *IPBlackListCreateBulk) OnConflictColumns(columns ...string) *IPBlackListUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.IPBlackList.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*IPBlackListCreateBulk) QueryContext

func (c *IPBlackListCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*IPBlackListCreateBulk) Save

func (iblcb *IPBlackListCreateBulk) Save(ctx context.Context) ([]*IPBlackList, error)

Save creates the IPBlackList entities in the database.

func (*IPBlackListCreateBulk) SaveX

func (iblcb *IPBlackListCreateBulk) SaveX(ctx context.Context) []*IPBlackList

SaveX is like Save, but panics if an error occurs.

type IPBlackListDelete

type IPBlackListDelete struct {
	// contains filtered or unexported fields
}

IPBlackListDelete is the builder for deleting a IPBlackList entity.

func (*IPBlackListDelete) Exec

func (ibld *IPBlackListDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*IPBlackListDelete) ExecContext

func (c *IPBlackListDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*IPBlackListDelete) ExecX

func (ibld *IPBlackListDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*IPBlackListDelete) QueryContext

func (c *IPBlackListDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*IPBlackListDelete) Where

Where appends a list predicates to the IPBlackListDelete builder.

type IPBlackListDeleteOne

type IPBlackListDeleteOne struct {
	// contains filtered or unexported fields
}

IPBlackListDeleteOne is the builder for deleting a single IPBlackList entity.

func (*IPBlackListDeleteOne) Exec

func (ibldo *IPBlackListDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*IPBlackListDeleteOne) ExecX

func (ibldo *IPBlackListDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type IPBlackListGroupBy

type IPBlackListGroupBy struct {
	// contains filtered or unexported fields
}

IPBlackListGroupBy is the group-by builder for IPBlackList entities.

func (*IPBlackListGroupBy) Aggregate

func (iblgb *IPBlackListGroupBy) Aggregate(fns ...AggregateFunc) *IPBlackListGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*IPBlackListGroupBy) Bool

func (s *IPBlackListGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IPBlackListGroupBy) BoolX

func (s *IPBlackListGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IPBlackListGroupBy) Bools

func (s *IPBlackListGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IPBlackListGroupBy) BoolsX

func (s *IPBlackListGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*IPBlackListGroupBy) Float64

func (s *IPBlackListGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IPBlackListGroupBy) Float64X

func (s *IPBlackListGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IPBlackListGroupBy) Float64s

func (s *IPBlackListGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IPBlackListGroupBy) Float64sX

func (s *IPBlackListGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IPBlackListGroupBy) Int

func (s *IPBlackListGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IPBlackListGroupBy) IntX

func (s *IPBlackListGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IPBlackListGroupBy) Ints

func (s *IPBlackListGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IPBlackListGroupBy) IntsX

func (s *IPBlackListGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IPBlackListGroupBy) Scan

func (iblgb *IPBlackListGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IPBlackListGroupBy) ScanX

func (s *IPBlackListGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IPBlackListGroupBy) String

func (s *IPBlackListGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IPBlackListGroupBy) StringX

func (s *IPBlackListGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IPBlackListGroupBy) Strings

func (s *IPBlackListGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IPBlackListGroupBy) StringsX

func (s *IPBlackListGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IPBlackListMutation

type IPBlackListMutation struct {
	// contains filtered or unexported fields
}

IPBlackListMutation represents an operation that mutates the IPBlackList nodes in the graph.

func (*IPBlackListMutation) AddField

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) AddedEdges

func (m *IPBlackListMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*IPBlackListMutation) AddedField

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) AddedFields

func (m *IPBlackListMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*IPBlackListMutation) AddedIDs

func (m *IPBlackListMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*IPBlackListMutation) ClearEdge

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) ClearField

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) ClearedEdges

func (m *IPBlackListMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*IPBlackListMutation) ClearedFields

func (m *IPBlackListMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (IPBlackListMutation) Client

func (m IPBlackListMutation) 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 (*IPBlackListMutation) CreatedAt

func (m *IPBlackListMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*IPBlackListMutation) EdgeCleared

func (m *IPBlackListMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*IPBlackListMutation) ExecContext

func (c *IPBlackListMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*IPBlackListMutation) Field

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) FieldCleared

func (m *IPBlackListMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*IPBlackListMutation) Fields

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) ID

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) IDs

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) IP

func (m *IPBlackListMutation) IP() (r string, exists bool)

IP returns the value of the "ip" field in the mutation.

func (*IPBlackListMutation) OldCreatedAt

func (m *IPBlackListMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the IPBlackList entity. If the IPBlackList 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 (*IPBlackListMutation) OldField

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) OldIP

func (m *IPBlackListMutation) OldIP(ctx context.Context) (v string, err error)

OldIP returns the old "ip" field's value of the IPBlackList entity. If the IPBlackList 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 (*IPBlackListMutation) OldUpdatedAt

func (m *IPBlackListMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the IPBlackList entity. If the IPBlackList 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 (*IPBlackListMutation) Op

func (m *IPBlackListMutation) Op() Op

Op returns the operation name.

func (*IPBlackListMutation) QueryContext

func (c *IPBlackListMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*IPBlackListMutation) RemovedEdges

func (m *IPBlackListMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*IPBlackListMutation) RemovedIDs

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) ResetCreatedAt

func (m *IPBlackListMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*IPBlackListMutation) ResetEdge

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) ResetField

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) ResetIP

func (m *IPBlackListMutation) ResetIP()

ResetIP resets all changes to the "ip" field.

func (*IPBlackListMutation) ResetUpdatedAt

func (m *IPBlackListMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*IPBlackListMutation) SetCreatedAt

func (m *IPBlackListMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*IPBlackListMutation) SetField

func (m *IPBlackListMutation) 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 (*IPBlackListMutation) SetID

func (m *IPBlackListMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of IPBlackList entities.

func (*IPBlackListMutation) SetIP

func (m *IPBlackListMutation) SetIP(s string)

SetIP sets the "ip" field.

func (*IPBlackListMutation) SetOp

func (m *IPBlackListMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*IPBlackListMutation) SetUpdatedAt

func (m *IPBlackListMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (IPBlackListMutation) Tx

func (m IPBlackListMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*IPBlackListMutation) Type

func (m *IPBlackListMutation) Type() string

Type returns the node type of this mutation (IPBlackList).

func (*IPBlackListMutation) UpdatedAt

func (m *IPBlackListMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*IPBlackListMutation) Where

func (m *IPBlackListMutation) Where(ps ...predicate.IPBlackList)

Where appends a list predicates to the IPBlackListMutation builder.

func (*IPBlackListMutation) WhereP

func (m *IPBlackListMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the IPBlackListMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type IPBlackListQuery

type IPBlackListQuery struct {
	// contains filtered or unexported fields
}

IPBlackListQuery is the builder for querying IPBlackList entities.

func (*IPBlackListQuery) Aggregate

func (iblq *IPBlackListQuery) Aggregate(fns ...AggregateFunc) *IPBlackListSelect

Aggregate returns a IPBlackListSelect configured with the given aggregations.

func (*IPBlackListQuery) All

func (iblq *IPBlackListQuery) All(ctx context.Context) ([]*IPBlackList, error)

All executes the query and returns a list of IPBlackLists.

func (*IPBlackListQuery) AllX

func (iblq *IPBlackListQuery) AllX(ctx context.Context) []*IPBlackList

AllX is like All, but panics if an error occurs.

func (*IPBlackListQuery) Clone

func (iblq *IPBlackListQuery) Clone() *IPBlackListQuery

Clone returns a duplicate of the IPBlackListQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*IPBlackListQuery) Count

func (iblq *IPBlackListQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*IPBlackListQuery) CountX

func (iblq *IPBlackListQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*IPBlackListQuery) ExecContext

func (c *IPBlackListQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*IPBlackListQuery) Exist

func (iblq *IPBlackListQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*IPBlackListQuery) ExistX

func (iblq *IPBlackListQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*IPBlackListQuery) First

func (iblq *IPBlackListQuery) First(ctx context.Context) (*IPBlackList, error)

First returns the first IPBlackList entity from the query. Returns a *NotFoundError when no IPBlackList was found.

func (*IPBlackListQuery) FirstID

func (iblq *IPBlackListQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first IPBlackList ID from the query. Returns a *NotFoundError when no IPBlackList ID was found.

func (*IPBlackListQuery) FirstIDX

func (iblq *IPBlackListQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*IPBlackListQuery) FirstX

func (iblq *IPBlackListQuery) FirstX(ctx context.Context) *IPBlackList

FirstX is like First, but panics if an error occurs.

func (*IPBlackListQuery) GroupBy

func (iblq *IPBlackListQuery) GroupBy(field string, fields ...string) *IPBlackListGroupBy

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 {
	IP string `json:"ip,omitempty"`
	Count int `json:"count,omitempty"`
}

client.IPBlackList.Query().
	GroupBy(ipblacklist.FieldIP).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*IPBlackListQuery) IDs

func (iblq *IPBlackListQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of IPBlackList IDs.

func (*IPBlackListQuery) IDsX

func (iblq *IPBlackListQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*IPBlackListQuery) Limit

func (iblq *IPBlackListQuery) Limit(limit int) *IPBlackListQuery

Limit the number of records to be returned by this query.

func (*IPBlackListQuery) Modify

func (iblq *IPBlackListQuery) Modify(modifiers ...func(s *sql.Selector)) *IPBlackListSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*IPBlackListQuery) Offset

func (iblq *IPBlackListQuery) Offset(offset int) *IPBlackListQuery

Offset to start from.

func (*IPBlackListQuery) Only

func (iblq *IPBlackListQuery) Only(ctx context.Context) (*IPBlackList, error)

Only returns a single IPBlackList entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one IPBlackList entity is found. Returns a *NotFoundError when no IPBlackList entities are found.

func (*IPBlackListQuery) OnlyID

func (iblq *IPBlackListQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only IPBlackList ID in the query. Returns a *NotSingularError when more than one IPBlackList ID is found. Returns a *NotFoundError when no entities are found.

func (*IPBlackListQuery) OnlyIDX

func (iblq *IPBlackListQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*IPBlackListQuery) OnlyX

func (iblq *IPBlackListQuery) OnlyX(ctx context.Context) *IPBlackList

OnlyX is like Only, but panics if an error occurs.

func (*IPBlackListQuery) Order

func (iblq *IPBlackListQuery) Order(o ...OrderFunc) *IPBlackListQuery

Order specifies how the records should be ordered.

func (*IPBlackListQuery) QueryContext

func (c *IPBlackListQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*IPBlackListQuery) Select

func (iblq *IPBlackListQuery) Select(fields ...string) *IPBlackListSelect

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 {
	IP string `json:"ip,omitempty"`
}

client.IPBlackList.Query().
	Select(ipblacklist.FieldIP).
	Scan(ctx, &v)

func (*IPBlackListQuery) Unique

func (iblq *IPBlackListQuery) Unique(unique bool) *IPBlackListQuery

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 (*IPBlackListQuery) Where

Where adds a new predicate for the IPBlackListQuery builder.

type IPBlackListSelect

type IPBlackListSelect struct {
	*IPBlackListQuery
	// contains filtered or unexported fields
}

IPBlackListSelect is the builder for selecting fields of IPBlackList entities.

func (*IPBlackListSelect) Aggregate

func (ibls *IPBlackListSelect) Aggregate(fns ...AggregateFunc) *IPBlackListSelect

Aggregate adds the given aggregation functions to the selector query.

func (*IPBlackListSelect) Bool

func (s *IPBlackListSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*IPBlackListSelect) BoolX

func (s *IPBlackListSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*IPBlackListSelect) Bools

func (s *IPBlackListSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*IPBlackListSelect) BoolsX

func (s *IPBlackListSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (IPBlackListSelect) ExecContext

func (c IPBlackListSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*IPBlackListSelect) Float64

func (s *IPBlackListSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*IPBlackListSelect) Float64X

func (s *IPBlackListSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*IPBlackListSelect) Float64s

func (s *IPBlackListSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*IPBlackListSelect) Float64sX

func (s *IPBlackListSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*IPBlackListSelect) Int

func (s *IPBlackListSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*IPBlackListSelect) IntX

func (s *IPBlackListSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*IPBlackListSelect) Ints

func (s *IPBlackListSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*IPBlackListSelect) IntsX

func (s *IPBlackListSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*IPBlackListSelect) Modify

func (ibls *IPBlackListSelect) Modify(modifiers ...func(s *sql.Selector)) *IPBlackListSelect

Modify adds a query modifier for attaching custom logic to queries.

func (IPBlackListSelect) QueryContext

func (c IPBlackListSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*IPBlackListSelect) Scan

func (ibls *IPBlackListSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*IPBlackListSelect) ScanX

func (s *IPBlackListSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*IPBlackListSelect) String

func (s *IPBlackListSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*IPBlackListSelect) StringX

func (s *IPBlackListSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*IPBlackListSelect) Strings

func (s *IPBlackListSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*IPBlackListSelect) StringsX

func (s *IPBlackListSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type IPBlackListUpdate

type IPBlackListUpdate struct {
	// contains filtered or unexported fields
}

IPBlackListUpdate is the builder for updating IPBlackList entities.

func (*IPBlackListUpdate) Exec

func (iblu *IPBlackListUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*IPBlackListUpdate) ExecContext

func (c *IPBlackListUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*IPBlackListUpdate) ExecX

func (iblu *IPBlackListUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IPBlackListUpdate) Modify

func (iblu *IPBlackListUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *IPBlackListUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*IPBlackListUpdate) Mutation

func (iblu *IPBlackListUpdate) Mutation() *IPBlackListMutation

Mutation returns the IPBlackListMutation object of the builder.

func (*IPBlackListUpdate) QueryContext

func (c *IPBlackListUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*IPBlackListUpdate) Save

func (iblu *IPBlackListUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*IPBlackListUpdate) SaveX

func (iblu *IPBlackListUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*IPBlackListUpdate) SetIP

func (iblu *IPBlackListUpdate) SetIP(s string) *IPBlackListUpdate

SetIP sets the "ip" field.

func (*IPBlackListUpdate) SetUpdatedAt

func (iblu *IPBlackListUpdate) SetUpdatedAt(t time.Time) *IPBlackListUpdate

SetUpdatedAt sets the "updated_at" field.

func (*IPBlackListUpdate) Where

Where appends a list predicates to the IPBlackListUpdate builder.

type IPBlackListUpdateOne

type IPBlackListUpdateOne struct {
	// contains filtered or unexported fields
}

IPBlackListUpdateOne is the builder for updating a single IPBlackList entity.

func (*IPBlackListUpdateOne) Exec

func (ibluo *IPBlackListUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*IPBlackListUpdateOne) ExecContext

func (c *IPBlackListUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*IPBlackListUpdateOne) ExecX

func (ibluo *IPBlackListUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IPBlackListUpdateOne) Modify

func (ibluo *IPBlackListUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *IPBlackListUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*IPBlackListUpdateOne) Mutation

func (ibluo *IPBlackListUpdateOne) Mutation() *IPBlackListMutation

Mutation returns the IPBlackListMutation object of the builder.

func (*IPBlackListUpdateOne) QueryContext

func (c *IPBlackListUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*IPBlackListUpdateOne) Save

func (ibluo *IPBlackListUpdateOne) Save(ctx context.Context) (*IPBlackList, error)

Save executes the query and returns the updated IPBlackList entity.

func (*IPBlackListUpdateOne) SaveX

func (ibluo *IPBlackListUpdateOne) SaveX(ctx context.Context) *IPBlackList

SaveX is like Save, but panics if an error occurs.

func (*IPBlackListUpdateOne) Select

func (ibluo *IPBlackListUpdateOne) Select(field string, fields ...string) *IPBlackListUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*IPBlackListUpdateOne) SetIP

SetIP sets the "ip" field.

func (*IPBlackListUpdateOne) SetUpdatedAt

func (ibluo *IPBlackListUpdateOne) SetUpdatedAt(t time.Time) *IPBlackListUpdateOne

SetUpdatedAt sets the "updated_at" field.

type IPBlackListUpsert

type IPBlackListUpsert struct {
	*sql.UpdateSet
}

IPBlackListUpsert is the "OnConflict" setter.

func (*IPBlackListUpsert) SetIP

SetIP sets the "ip" field.

func (*IPBlackListUpsert) SetUpdatedAt

func (u *IPBlackListUpsert) SetUpdatedAt(v time.Time) *IPBlackListUpsert

SetUpdatedAt sets the "updated_at" field.

func (*IPBlackListUpsert) UpdateIP

func (u *IPBlackListUpsert) UpdateIP() *IPBlackListUpsert

UpdateIP sets the "ip" field to the value that was provided on create.

func (*IPBlackListUpsert) UpdateUpdatedAt

func (u *IPBlackListUpsert) UpdateUpdatedAt() *IPBlackListUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type IPBlackListUpsertBulk

type IPBlackListUpsertBulk struct {
	// contains filtered or unexported fields
}

IPBlackListUpsertBulk is the builder for "upsert"-ing a bulk of IPBlackList nodes.

func (*IPBlackListUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IPBlackListUpsertBulk) Exec

Exec executes the query.

func (*IPBlackListUpsertBulk) ExecX

func (u *IPBlackListUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IPBlackListUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IPBlackList.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*IPBlackListUpsertBulk) SetIP

SetIP sets the "ip" field.

func (*IPBlackListUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*IPBlackListUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the IPBlackListCreateBulk.OnConflict documentation for more info.

func (*IPBlackListUpsertBulk) UpdateIP

UpdateIP sets the "ip" field to the value that was provided on create.

func (*IPBlackListUpsertBulk) UpdateNewValues

func (u *IPBlackListUpsertBulk) UpdateNewValues() *IPBlackListUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.IPBlackList.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(ipblacklist.FieldID)
		}),
	).
	Exec(ctx)

func (*IPBlackListUpsertBulk) UpdateUpdatedAt

func (u *IPBlackListUpsertBulk) UpdateUpdatedAt() *IPBlackListUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type IPBlackListUpsertOne

type IPBlackListUpsertOne struct {
	// contains filtered or unexported fields
}

IPBlackListUpsertOne is the builder for "upsert"-ing

one IPBlackList node.

func (*IPBlackListUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*IPBlackListUpsertOne) Exec

Exec executes the query.

func (*IPBlackListUpsertOne) ExecX

func (u *IPBlackListUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*IPBlackListUpsertOne) ID

func (u *IPBlackListUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*IPBlackListUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*IPBlackListUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.IPBlackList.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*IPBlackListUpsertOne) SetIP

SetIP sets the "ip" field.

func (*IPBlackListUpsertOne) SetUpdatedAt

func (u *IPBlackListUpsertOne) SetUpdatedAt(v time.Time) *IPBlackListUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*IPBlackListUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the IPBlackListCreate.OnConflict documentation for more info.

func (*IPBlackListUpsertOne) UpdateIP

UpdateIP sets the "ip" field to the value that was provided on create.

func (*IPBlackListUpsertOne) UpdateNewValues

func (u *IPBlackListUpsertOne) UpdateNewValues() *IPBlackListUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.IPBlackList.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(ipblacklist.FieldID)
		}),
	).
	Exec(ctx)

func (*IPBlackListUpsertOne) UpdateUpdatedAt

func (u *IPBlackListUpsertOne) UpdateUpdatedAt() *IPBlackListUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type IPBlackLists

type IPBlackLists []*IPBlackList

IPBlackLists is a parsable slice of IPBlackList.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MqLog

type MqLog struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// MessageID holds the value of the "message_id" field.
	MessageID string `json:"message_id,omitempty"`
	// Priority holds the value of the "priority" field.
	Priority int `json:"priority,omitempty"`
	// IsProcessing holds the value of the "is_processing" field.
	IsProcessing bool `json:"is_processing,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

MqLog is the model entity for the MqLog schema.

func (*MqLog) ExecContext

func (c *MqLog) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*MqLog) QueryContext

func (c *MqLog) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*MqLog) String

func (ml *MqLog) String() string

String implements the fmt.Stringer.

func (*MqLog) Unwrap

func (ml *MqLog) Unwrap() *MqLog

Unwrap unwraps the MqLog 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 (*MqLog) Update

func (ml *MqLog) Update() *MqLogUpdateOne

Update returns a builder for updating this MqLog. Note that you need to call MqLog.Unwrap() before calling this method if this MqLog was returned from a transaction, and the transaction was committed or rolled back.

type MqLogClient

type MqLogClient struct {
	// contains filtered or unexported fields
}

MqLogClient is a client for the MqLog schema.

func NewMqLogClient

func NewMqLogClient(c config) *MqLogClient

NewMqLogClient returns a client for the MqLog from the given config.

func (*MqLogClient) Create

func (c *MqLogClient) Create() *MqLogCreate

Create returns a builder for creating a MqLog entity.

func (*MqLogClient) CreateBulk

func (c *MqLogClient) CreateBulk(builders ...*MqLogCreate) *MqLogCreateBulk

CreateBulk returns a builder for creating a bulk of MqLog entities.

func (*MqLogClient) Delete

func (c *MqLogClient) Delete() *MqLogDelete

Delete returns a delete builder for MqLog.

func (*MqLogClient) DeleteOne

func (c *MqLogClient) DeleteOne(ml *MqLog) *MqLogDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MqLogClient) DeleteOneID

func (c *MqLogClient) DeleteOneID(id uuid.UUID) *MqLogDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MqLogClient) ExecContext

func (c *MqLogClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*MqLogClient) Get

func (c *MqLogClient) Get(ctx context.Context, id uuid.UUID) (*MqLog, error)

Get returns a MqLog entity by its id.

func (*MqLogClient) GetX

func (c *MqLogClient) GetX(ctx context.Context, id uuid.UUID) *MqLog

GetX is like Get, but panics if an error occurs.

func (*MqLogClient) Hooks

func (c *MqLogClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MqLogClient) Intercept

func (c *MqLogClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `mqlog.Intercept(f(g(h())))`.

func (*MqLogClient) Interceptors

func (c *MqLogClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MqLogClient) Query

func (c *MqLogClient) Query() *MqLogQuery

Query returns a query builder for MqLog.

func (*MqLogClient) QueryContext

func (c *MqLogClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*MqLogClient) Update

func (c *MqLogClient) Update() *MqLogUpdate

Update returns an update builder for MqLog.

func (*MqLogClient) UpdateOne

func (c *MqLogClient) UpdateOne(ml *MqLog) *MqLogUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MqLogClient) UpdateOneID

func (c *MqLogClient) UpdateOneID(id uuid.UUID) *MqLogUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MqLogClient) Use

func (c *MqLogClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `mqlog.Hooks(f(g(h())))`.

type MqLogCreate

type MqLogCreate struct {
	// contains filtered or unexported fields
}

MqLogCreate is the builder for creating a MqLog entity.

func (*MqLogCreate) Exec

func (mlc *MqLogCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MqLogCreate) ExecContext

func (c *MqLogCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*MqLogCreate) ExecX

func (mlc *MqLogCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MqLogCreate) Mutation

func (mlc *MqLogCreate) Mutation() *MqLogMutation

Mutation returns the MqLogMutation object of the builder.

func (*MqLogCreate) OnConflict

func (mlc *MqLogCreate) OnConflict(opts ...sql.ConflictOption) *MqLogUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MqLog.Create().
	SetMessageID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MqLogUpsert) {
		SetMessageID(v+v).
	}).
	Exec(ctx)

func (*MqLogCreate) OnConflictColumns

func (mlc *MqLogCreate) OnConflictColumns(columns ...string) *MqLogUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MqLog.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MqLogCreate) QueryContext

func (c *MqLogCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*MqLogCreate) Save

func (mlc *MqLogCreate) Save(ctx context.Context) (*MqLog, error)

Save creates the MqLog in the database.

func (*MqLogCreate) SaveX

func (mlc *MqLogCreate) SaveX(ctx context.Context) *MqLog

SaveX calls Save and panics if Save returns an error.

func (*MqLogCreate) SetCreatedAt

func (mlc *MqLogCreate) SetCreatedAt(t time.Time) *MqLogCreate

SetCreatedAt sets the "created_at" field.

func (*MqLogCreate) SetID

func (mlc *MqLogCreate) SetID(u uuid.UUID) *MqLogCreate

SetID sets the "id" field.

func (*MqLogCreate) SetIsProcessing

func (mlc *MqLogCreate) SetIsProcessing(b bool) *MqLogCreate

SetIsProcessing sets the "is_processing" field.

func (*MqLogCreate) SetMessageID

func (mlc *MqLogCreate) SetMessageID(s string) *MqLogCreate

SetMessageID sets the "message_id" field.

func (*MqLogCreate) SetNillableCreatedAt

func (mlc *MqLogCreate) SetNillableCreatedAt(t *time.Time) *MqLogCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*MqLogCreate) SetNillableID

func (mlc *MqLogCreate) SetNillableID(u *uuid.UUID) *MqLogCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*MqLogCreate) SetNillableIsProcessing

func (mlc *MqLogCreate) SetNillableIsProcessing(b *bool) *MqLogCreate

SetNillableIsProcessing sets the "is_processing" field if the given value is not nil.

func (*MqLogCreate) SetNillableUpdatedAt

func (mlc *MqLogCreate) SetNillableUpdatedAt(t *time.Time) *MqLogCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MqLogCreate) SetPriority

func (mlc *MqLogCreate) SetPriority(i int) *MqLogCreate

SetPriority sets the "priority" field.

func (*MqLogCreate) SetUpdatedAt

func (mlc *MqLogCreate) SetUpdatedAt(t time.Time) *MqLogCreate

SetUpdatedAt sets the "updated_at" field.

type MqLogCreateBulk

type MqLogCreateBulk struct {
	// contains filtered or unexported fields
}

MqLogCreateBulk is the builder for creating many MqLog entities in bulk.

func (*MqLogCreateBulk) Exec

func (mlcb *MqLogCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MqLogCreateBulk) ExecContext

func (c *MqLogCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*MqLogCreateBulk) ExecX

func (mlcb *MqLogCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MqLogCreateBulk) OnConflict

func (mlcb *MqLogCreateBulk) OnConflict(opts ...sql.ConflictOption) *MqLogUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MqLog.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MqLogUpsert) {
		SetMessageID(v+v).
	}).
	Exec(ctx)

func (*MqLogCreateBulk) OnConflictColumns

func (mlcb *MqLogCreateBulk) OnConflictColumns(columns ...string) *MqLogUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MqLog.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MqLogCreateBulk) QueryContext

func (c *MqLogCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*MqLogCreateBulk) Save

func (mlcb *MqLogCreateBulk) Save(ctx context.Context) ([]*MqLog, error)

Save creates the MqLog entities in the database.

func (*MqLogCreateBulk) SaveX

func (mlcb *MqLogCreateBulk) SaveX(ctx context.Context) []*MqLog

SaveX is like Save, but panics if an error occurs.

type MqLogDelete

type MqLogDelete struct {
	// contains filtered or unexported fields
}

MqLogDelete is the builder for deleting a MqLog entity.

func (*MqLogDelete) Exec

func (mld *MqLogDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MqLogDelete) ExecContext

func (c *MqLogDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*MqLogDelete) ExecX

func (mld *MqLogDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MqLogDelete) QueryContext

func (c *MqLogDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*MqLogDelete) Where

func (mld *MqLogDelete) Where(ps ...predicate.MqLog) *MqLogDelete

Where appends a list predicates to the MqLogDelete builder.

type MqLogDeleteOne

type MqLogDeleteOne struct {
	// contains filtered or unexported fields
}

MqLogDeleteOne is the builder for deleting a single MqLog entity.

func (*MqLogDeleteOne) Exec

func (mldo *MqLogDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MqLogDeleteOne) ExecX

func (mldo *MqLogDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type MqLogGroupBy

type MqLogGroupBy struct {
	// contains filtered or unexported fields
}

MqLogGroupBy is the group-by builder for MqLog entities.

func (*MqLogGroupBy) Aggregate

func (mlgb *MqLogGroupBy) Aggregate(fns ...AggregateFunc) *MqLogGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MqLogGroupBy) Bool

func (s *MqLogGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MqLogGroupBy) BoolX

func (s *MqLogGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MqLogGroupBy) Bools

func (s *MqLogGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MqLogGroupBy) BoolsX

func (s *MqLogGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MqLogGroupBy) Float64

func (s *MqLogGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MqLogGroupBy) Float64X

func (s *MqLogGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MqLogGroupBy) Float64s

func (s *MqLogGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MqLogGroupBy) Float64sX

func (s *MqLogGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MqLogGroupBy) Int

func (s *MqLogGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MqLogGroupBy) IntX

func (s *MqLogGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MqLogGroupBy) Ints

func (s *MqLogGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MqLogGroupBy) IntsX

func (s *MqLogGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MqLogGroupBy) Scan

func (mlgb *MqLogGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MqLogGroupBy) ScanX

func (s *MqLogGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MqLogGroupBy) String

func (s *MqLogGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MqLogGroupBy) StringX

func (s *MqLogGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MqLogGroupBy) Strings

func (s *MqLogGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MqLogGroupBy) StringsX

func (s *MqLogGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MqLogMutation

type MqLogMutation struct {
	// contains filtered or unexported fields
}

MqLogMutation represents an operation that mutates the MqLog nodes in the graph.

func (*MqLogMutation) AddField

func (m *MqLogMutation) 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 (*MqLogMutation) AddPriority

func (m *MqLogMutation) AddPriority(i int)

AddPriority adds i to the "priority" field.

func (*MqLogMutation) AddedEdges

func (m *MqLogMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MqLogMutation) AddedField

func (m *MqLogMutation) 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 (*MqLogMutation) AddedFields

func (m *MqLogMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MqLogMutation) AddedIDs

func (m *MqLogMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MqLogMutation) AddedPriority

func (m *MqLogMutation) AddedPriority() (r int, exists bool)

AddedPriority returns the value that was added to the "priority" field in this mutation.

func (*MqLogMutation) ClearEdge

func (m *MqLogMutation) 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 (*MqLogMutation) ClearField

func (m *MqLogMutation) 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 (*MqLogMutation) ClearedEdges

func (m *MqLogMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MqLogMutation) ClearedFields

func (m *MqLogMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MqLogMutation) Client

func (m MqLogMutation) 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 (*MqLogMutation) CreatedAt

func (m *MqLogMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*MqLogMutation) EdgeCleared

func (m *MqLogMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MqLogMutation) ExecContext

func (c *MqLogMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*MqLogMutation) Field

func (m *MqLogMutation) 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 (*MqLogMutation) FieldCleared

func (m *MqLogMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MqLogMutation) Fields

func (m *MqLogMutation) 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 (*MqLogMutation) ID

func (m *MqLogMutation) 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 (*MqLogMutation) IDs

func (m *MqLogMutation) 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 (*MqLogMutation) IsProcessing

func (m *MqLogMutation) IsProcessing() (r bool, exists bool)

IsProcessing returns the value of the "is_processing" field in the mutation.

func (*MqLogMutation) MessageID

func (m *MqLogMutation) MessageID() (r string, exists bool)

MessageID returns the value of the "message_id" field in the mutation.

func (*MqLogMutation) OldCreatedAt

func (m *MqLogMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the MqLog entity. If the MqLog 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 (*MqLogMutation) OldField

func (m *MqLogMutation) 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 (*MqLogMutation) OldIsProcessing

func (m *MqLogMutation) OldIsProcessing(ctx context.Context) (v bool, err error)

OldIsProcessing returns the old "is_processing" field's value of the MqLog entity. If the MqLog 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 (*MqLogMutation) OldMessageID

func (m *MqLogMutation) OldMessageID(ctx context.Context) (v string, err error)

OldMessageID returns the old "message_id" field's value of the MqLog entity. If the MqLog 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 (*MqLogMutation) OldPriority

func (m *MqLogMutation) OldPriority(ctx context.Context) (v int, err error)

OldPriority returns the old "priority" field's value of the MqLog entity. If the MqLog 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 (*MqLogMutation) OldUpdatedAt

func (m *MqLogMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the MqLog entity. If the MqLog 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 (*MqLogMutation) Op

func (m *MqLogMutation) Op() Op

Op returns the operation name.

func (*MqLogMutation) Priority

func (m *MqLogMutation) Priority() (r int, exists bool)

Priority returns the value of the "priority" field in the mutation.

func (*MqLogMutation) QueryContext

func (c *MqLogMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*MqLogMutation) RemovedEdges

func (m *MqLogMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MqLogMutation) RemovedIDs

func (m *MqLogMutation) 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 (*MqLogMutation) ResetCreatedAt

func (m *MqLogMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MqLogMutation) ResetEdge

func (m *MqLogMutation) 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 (*MqLogMutation) ResetField

func (m *MqLogMutation) 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 (*MqLogMutation) ResetIsProcessing

func (m *MqLogMutation) ResetIsProcessing()

ResetIsProcessing resets all changes to the "is_processing" field.

func (*MqLogMutation) ResetMessageID

func (m *MqLogMutation) ResetMessageID()

ResetMessageID resets all changes to the "message_id" field.

func (*MqLogMutation) ResetPriority

func (m *MqLogMutation) ResetPriority()

ResetPriority resets all changes to the "priority" field.

func (*MqLogMutation) ResetUpdatedAt

func (m *MqLogMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MqLogMutation) SetCreatedAt

func (m *MqLogMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*MqLogMutation) SetField

func (m *MqLogMutation) 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 (*MqLogMutation) SetID

func (m *MqLogMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of MqLog entities.

func (*MqLogMutation) SetIsProcessing

func (m *MqLogMutation) SetIsProcessing(b bool)

SetIsProcessing sets the "is_processing" field.

func (*MqLogMutation) SetMessageID

func (m *MqLogMutation) SetMessageID(s string)

SetMessageID sets the "message_id" field.

func (*MqLogMutation) SetOp

func (m *MqLogMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MqLogMutation) SetPriority

func (m *MqLogMutation) SetPriority(i int)

SetPriority sets the "priority" field.

func (*MqLogMutation) SetUpdatedAt

func (m *MqLogMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (MqLogMutation) Tx

func (m MqLogMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MqLogMutation) Type

func (m *MqLogMutation) Type() string

Type returns the node type of this mutation (MqLog).

func (*MqLogMutation) UpdatedAt

func (m *MqLogMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*MqLogMutation) Where

func (m *MqLogMutation) Where(ps ...predicate.MqLog)

Where appends a list predicates to the MqLogMutation builder.

func (*MqLogMutation) WhereP

func (m *MqLogMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MqLogMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MqLogQuery

type MqLogQuery struct {
	// contains filtered or unexported fields
}

MqLogQuery is the builder for querying MqLog entities.

func (*MqLogQuery) Aggregate

func (mlq *MqLogQuery) Aggregate(fns ...AggregateFunc) *MqLogSelect

Aggregate returns a MqLogSelect configured with the given aggregations.

func (*MqLogQuery) All

func (mlq *MqLogQuery) All(ctx context.Context) ([]*MqLog, error)

All executes the query and returns a list of MqLogs.

func (*MqLogQuery) AllX

func (mlq *MqLogQuery) AllX(ctx context.Context) []*MqLog

AllX is like All, but panics if an error occurs.

func (*MqLogQuery) Clone

func (mlq *MqLogQuery) Clone() *MqLogQuery

Clone returns a duplicate of the MqLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MqLogQuery) Count

func (mlq *MqLogQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MqLogQuery) CountX

func (mlq *MqLogQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MqLogQuery) ExecContext

func (c *MqLogQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*MqLogQuery) Exist

func (mlq *MqLogQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MqLogQuery) ExistX

func (mlq *MqLogQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MqLogQuery) First

func (mlq *MqLogQuery) First(ctx context.Context) (*MqLog, error)

First returns the first MqLog entity from the query. Returns a *NotFoundError when no MqLog was found.

func (*MqLogQuery) FirstID

func (mlq *MqLogQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first MqLog ID from the query. Returns a *NotFoundError when no MqLog ID was found.

func (*MqLogQuery) FirstIDX

func (mlq *MqLogQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*MqLogQuery) FirstX

func (mlq *MqLogQuery) FirstX(ctx context.Context) *MqLog

FirstX is like First, but panics if an error occurs.

func (*MqLogQuery) GroupBy

func (mlq *MqLogQuery) GroupBy(field string, fields ...string) *MqLogGroupBy

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 {
	MessageID string `json:"message_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MqLog.Query().
	GroupBy(mqlog.FieldMessageID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MqLogQuery) IDs

func (mlq *MqLogQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of MqLog IDs.

func (*MqLogQuery) IDsX

func (mlq *MqLogQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*MqLogQuery) Limit

func (mlq *MqLogQuery) Limit(limit int) *MqLogQuery

Limit the number of records to be returned by this query.

func (*MqLogQuery) Modify

func (mlq *MqLogQuery) Modify(modifiers ...func(s *sql.Selector)) *MqLogSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*MqLogQuery) Offset

func (mlq *MqLogQuery) Offset(offset int) *MqLogQuery

Offset to start from.

func (*MqLogQuery) Only

func (mlq *MqLogQuery) Only(ctx context.Context) (*MqLog, error)

Only returns a single MqLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MqLog entity is found. Returns a *NotFoundError when no MqLog entities are found.

func (*MqLogQuery) OnlyID

func (mlq *MqLogQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only MqLog ID in the query. Returns a *NotSingularError when more than one MqLog ID is found. Returns a *NotFoundError when no entities are found.

func (*MqLogQuery) OnlyIDX

func (mlq *MqLogQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MqLogQuery) OnlyX

func (mlq *MqLogQuery) OnlyX(ctx context.Context) *MqLog

OnlyX is like Only, but panics if an error occurs.

func (*MqLogQuery) Order

func (mlq *MqLogQuery) Order(o ...OrderFunc) *MqLogQuery

Order specifies how the records should be ordered.

func (*MqLogQuery) QueryContext

func (c *MqLogQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*MqLogQuery) Select

func (mlq *MqLogQuery) Select(fields ...string) *MqLogSelect

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 {
	MessageID string `json:"message_id,omitempty"`
}

client.MqLog.Query().
	Select(mqlog.FieldMessageID).
	Scan(ctx, &v)

func (*MqLogQuery) Unique

func (mlq *MqLogQuery) Unique(unique bool) *MqLogQuery

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 (*MqLogQuery) Where

func (mlq *MqLogQuery) Where(ps ...predicate.MqLog) *MqLogQuery

Where adds a new predicate for the MqLogQuery builder.

type MqLogSelect

type MqLogSelect struct {
	*MqLogQuery
	// contains filtered or unexported fields
}

MqLogSelect is the builder for selecting fields of MqLog entities.

func (*MqLogSelect) Aggregate

func (mls *MqLogSelect) Aggregate(fns ...AggregateFunc) *MqLogSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MqLogSelect) Bool

func (s *MqLogSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MqLogSelect) BoolX

func (s *MqLogSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MqLogSelect) Bools

func (s *MqLogSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MqLogSelect) BoolsX

func (s *MqLogSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (MqLogSelect) ExecContext

func (c MqLogSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*MqLogSelect) Float64

func (s *MqLogSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MqLogSelect) Float64X

func (s *MqLogSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MqLogSelect) Float64s

func (s *MqLogSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MqLogSelect) Float64sX

func (s *MqLogSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MqLogSelect) Int

func (s *MqLogSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MqLogSelect) IntX

func (s *MqLogSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MqLogSelect) Ints

func (s *MqLogSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MqLogSelect) IntsX

func (s *MqLogSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MqLogSelect) Modify

func (mls *MqLogSelect) Modify(modifiers ...func(s *sql.Selector)) *MqLogSelect

Modify adds a query modifier for attaching custom logic to queries.

func (MqLogSelect) QueryContext

func (c MqLogSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*MqLogSelect) Scan

func (mls *MqLogSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MqLogSelect) ScanX

func (s *MqLogSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MqLogSelect) String

func (s *MqLogSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MqLogSelect) StringX

func (s *MqLogSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MqLogSelect) Strings

func (s *MqLogSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MqLogSelect) StringsX

func (s *MqLogSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MqLogUpdate

type MqLogUpdate struct {
	// contains filtered or unexported fields
}

MqLogUpdate is the builder for updating MqLog entities.

func (*MqLogUpdate) AddPriority

func (mlu *MqLogUpdate) AddPriority(i int) *MqLogUpdate

AddPriority adds i to the "priority" field.

func (*MqLogUpdate) Exec

func (mlu *MqLogUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MqLogUpdate) ExecContext

func (c *MqLogUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*MqLogUpdate) ExecX

func (mlu *MqLogUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MqLogUpdate) Modify

func (mlu *MqLogUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MqLogUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MqLogUpdate) Mutation

func (mlu *MqLogUpdate) Mutation() *MqLogMutation

Mutation returns the MqLogMutation object of the builder.

func (*MqLogUpdate) QueryContext

func (c *MqLogUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*MqLogUpdate) Save

func (mlu *MqLogUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MqLogUpdate) SaveX

func (mlu *MqLogUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MqLogUpdate) SetIsProcessing

func (mlu *MqLogUpdate) SetIsProcessing(b bool) *MqLogUpdate

SetIsProcessing sets the "is_processing" field.

func (*MqLogUpdate) SetMessageID

func (mlu *MqLogUpdate) SetMessageID(s string) *MqLogUpdate

SetMessageID sets the "message_id" field.

func (*MqLogUpdate) SetNillableIsProcessing

func (mlu *MqLogUpdate) SetNillableIsProcessing(b *bool) *MqLogUpdate

SetNillableIsProcessing sets the "is_processing" field if the given value is not nil.

func (*MqLogUpdate) SetPriority

func (mlu *MqLogUpdate) SetPriority(i int) *MqLogUpdate

SetPriority sets the "priority" field.

func (*MqLogUpdate) SetUpdatedAt

func (mlu *MqLogUpdate) SetUpdatedAt(t time.Time) *MqLogUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MqLogUpdate) Where

func (mlu *MqLogUpdate) Where(ps ...predicate.MqLog) *MqLogUpdate

Where appends a list predicates to the MqLogUpdate builder.

type MqLogUpdateOne

type MqLogUpdateOne struct {
	// contains filtered or unexported fields
}

MqLogUpdateOne is the builder for updating a single MqLog entity.

func (*MqLogUpdateOne) AddPriority

func (mluo *MqLogUpdateOne) AddPriority(i int) *MqLogUpdateOne

AddPriority adds i to the "priority" field.

func (*MqLogUpdateOne) Exec

func (mluo *MqLogUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MqLogUpdateOne) ExecContext

func (c *MqLogUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*MqLogUpdateOne) ExecX

func (mluo *MqLogUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MqLogUpdateOne) Modify

func (mluo *MqLogUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MqLogUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*MqLogUpdateOne) Mutation

func (mluo *MqLogUpdateOne) Mutation() *MqLogMutation

Mutation returns the MqLogMutation object of the builder.

func (*MqLogUpdateOne) QueryContext

func (c *MqLogUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*MqLogUpdateOne) Save

func (mluo *MqLogUpdateOne) Save(ctx context.Context) (*MqLog, error)

Save executes the query and returns the updated MqLog entity.

func (*MqLogUpdateOne) SaveX

func (mluo *MqLogUpdateOne) SaveX(ctx context.Context) *MqLog

SaveX is like Save, but panics if an error occurs.

func (*MqLogUpdateOne) Select

func (mluo *MqLogUpdateOne) Select(field string, fields ...string) *MqLogUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MqLogUpdateOne) SetIsProcessing

func (mluo *MqLogUpdateOne) SetIsProcessing(b bool) *MqLogUpdateOne

SetIsProcessing sets the "is_processing" field.

func (*MqLogUpdateOne) SetMessageID

func (mluo *MqLogUpdateOne) SetMessageID(s string) *MqLogUpdateOne

SetMessageID sets the "message_id" field.

func (*MqLogUpdateOne) SetNillableIsProcessing

func (mluo *MqLogUpdateOne) SetNillableIsProcessing(b *bool) *MqLogUpdateOne

SetNillableIsProcessing sets the "is_processing" field if the given value is not nil.

func (*MqLogUpdateOne) SetPriority

func (mluo *MqLogUpdateOne) SetPriority(i int) *MqLogUpdateOne

SetPriority sets the "priority" field.

func (*MqLogUpdateOne) SetUpdatedAt

func (mluo *MqLogUpdateOne) SetUpdatedAt(t time.Time) *MqLogUpdateOne

SetUpdatedAt sets the "updated_at" field.

type MqLogUpsert

type MqLogUpsert struct {
	*sql.UpdateSet
}

MqLogUpsert is the "OnConflict" setter.

func (*MqLogUpsert) AddPriority

func (u *MqLogUpsert) AddPriority(v int) *MqLogUpsert

AddPriority adds v to the "priority" field.

func (*MqLogUpsert) SetIsProcessing

func (u *MqLogUpsert) SetIsProcessing(v bool) *MqLogUpsert

SetIsProcessing sets the "is_processing" field.

func (*MqLogUpsert) SetMessageID

func (u *MqLogUpsert) SetMessageID(v string) *MqLogUpsert

SetMessageID sets the "message_id" field.

func (*MqLogUpsert) SetPriority

func (u *MqLogUpsert) SetPriority(v int) *MqLogUpsert

SetPriority sets the "priority" field.

func (*MqLogUpsert) SetUpdatedAt

func (u *MqLogUpsert) SetUpdatedAt(v time.Time) *MqLogUpsert

SetUpdatedAt sets the "updated_at" field.

func (*MqLogUpsert) UpdateIsProcessing

func (u *MqLogUpsert) UpdateIsProcessing() *MqLogUpsert

UpdateIsProcessing sets the "is_processing" field to the value that was provided on create.

func (*MqLogUpsert) UpdateMessageID

func (u *MqLogUpsert) UpdateMessageID() *MqLogUpsert

UpdateMessageID sets the "message_id" field to the value that was provided on create.

func (*MqLogUpsert) UpdatePriority

func (u *MqLogUpsert) UpdatePriority() *MqLogUpsert

UpdatePriority sets the "priority" field to the value that was provided on create.

func (*MqLogUpsert) UpdateUpdatedAt

func (u *MqLogUpsert) UpdateUpdatedAt() *MqLogUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type MqLogUpsertBulk

type MqLogUpsertBulk struct {
	// contains filtered or unexported fields
}

MqLogUpsertBulk is the builder for "upsert"-ing a bulk of MqLog nodes.

func (*MqLogUpsertBulk) AddPriority

func (u *MqLogUpsertBulk) AddPriority(v int) *MqLogUpsertBulk

AddPriority adds v to the "priority" field.

func (*MqLogUpsertBulk) DoNothing

func (u *MqLogUpsertBulk) DoNothing() *MqLogUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MqLogUpsertBulk) Exec

func (u *MqLogUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MqLogUpsertBulk) ExecX

func (u *MqLogUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MqLogUpsertBulk) Ignore

func (u *MqLogUpsertBulk) Ignore() *MqLogUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MqLog.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MqLogUpsertBulk) SetIsProcessing

func (u *MqLogUpsertBulk) SetIsProcessing(v bool) *MqLogUpsertBulk

SetIsProcessing sets the "is_processing" field.

func (*MqLogUpsertBulk) SetMessageID

func (u *MqLogUpsertBulk) SetMessageID(v string) *MqLogUpsertBulk

SetMessageID sets the "message_id" field.

func (*MqLogUpsertBulk) SetPriority

func (u *MqLogUpsertBulk) SetPriority(v int) *MqLogUpsertBulk

SetPriority sets the "priority" field.

func (*MqLogUpsertBulk) SetUpdatedAt

func (u *MqLogUpsertBulk) SetUpdatedAt(v time.Time) *MqLogUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*MqLogUpsertBulk) Update

func (u *MqLogUpsertBulk) Update(set func(*MqLogUpsert)) *MqLogUpsertBulk

Update allows overriding fields `UPDATE` values. See the MqLogCreateBulk.OnConflict documentation for more info.

func (*MqLogUpsertBulk) UpdateIsProcessing

func (u *MqLogUpsertBulk) UpdateIsProcessing() *MqLogUpsertBulk

UpdateIsProcessing sets the "is_processing" field to the value that was provided on create.

func (*MqLogUpsertBulk) UpdateMessageID

func (u *MqLogUpsertBulk) UpdateMessageID() *MqLogUpsertBulk

UpdateMessageID sets the "message_id" field to the value that was provided on create.

func (*MqLogUpsertBulk) UpdateNewValues

func (u *MqLogUpsertBulk) UpdateNewValues() *MqLogUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.MqLog.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(mqlog.FieldID)
		}),
	).
	Exec(ctx)

func (*MqLogUpsertBulk) UpdatePriority

func (u *MqLogUpsertBulk) UpdatePriority() *MqLogUpsertBulk

UpdatePriority sets the "priority" field to the value that was provided on create.

func (*MqLogUpsertBulk) UpdateUpdatedAt

func (u *MqLogUpsertBulk) UpdateUpdatedAt() *MqLogUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type MqLogUpsertOne

type MqLogUpsertOne struct {
	// contains filtered or unexported fields
}

MqLogUpsertOne is the builder for "upsert"-ing

one MqLog node.

func (*MqLogUpsertOne) AddPriority

func (u *MqLogUpsertOne) AddPriority(v int) *MqLogUpsertOne

AddPriority adds v to the "priority" field.

func (*MqLogUpsertOne) DoNothing

func (u *MqLogUpsertOne) DoNothing() *MqLogUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MqLogUpsertOne) Exec

func (u *MqLogUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*MqLogUpsertOne) ExecX

func (u *MqLogUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MqLogUpsertOne) ID

func (u *MqLogUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MqLogUpsertOne) IDX

func (u *MqLogUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*MqLogUpsertOne) Ignore

func (u *MqLogUpsertOne) Ignore() *MqLogUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MqLog.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MqLogUpsertOne) SetIsProcessing

func (u *MqLogUpsertOne) SetIsProcessing(v bool) *MqLogUpsertOne

SetIsProcessing sets the "is_processing" field.

func (*MqLogUpsertOne) SetMessageID

func (u *MqLogUpsertOne) SetMessageID(v string) *MqLogUpsertOne

SetMessageID sets the "message_id" field.

func (*MqLogUpsertOne) SetPriority

func (u *MqLogUpsertOne) SetPriority(v int) *MqLogUpsertOne

SetPriority sets the "priority" field.

func (*MqLogUpsertOne) SetUpdatedAt

func (u *MqLogUpsertOne) SetUpdatedAt(v time.Time) *MqLogUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*MqLogUpsertOne) Update

func (u *MqLogUpsertOne) Update(set func(*MqLogUpsert)) *MqLogUpsertOne

Update allows overriding fields `UPDATE` values. See the MqLogCreate.OnConflict documentation for more info.

func (*MqLogUpsertOne) UpdateIsProcessing

func (u *MqLogUpsertOne) UpdateIsProcessing() *MqLogUpsertOne

UpdateIsProcessing sets the "is_processing" field to the value that was provided on create.

func (*MqLogUpsertOne) UpdateMessageID

func (u *MqLogUpsertOne) UpdateMessageID() *MqLogUpsertOne

UpdateMessageID sets the "message_id" field to the value that was provided on create.

func (*MqLogUpsertOne) UpdateNewValues

func (u *MqLogUpsertOne) UpdateNewValues() *MqLogUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.MqLog.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(mqlog.FieldID)
		}),
	).
	Exec(ctx)

func (*MqLogUpsertOne) UpdatePriority

func (u *MqLogUpsertOne) UpdatePriority() *MqLogUpsertOne

UpdatePriority sets the "priority" field to the value that was provided on create.

func (*MqLogUpsertOne) UpdateUpdatedAt

func (u *MqLogUpsertOne) UpdateUpdatedAt() *MqLogUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type MqLogs

type MqLogs []*MqLog

MqLogs is a parsable slice of MqLog.

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 NegativePrompt

type NegativePrompt struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Text holds the value of the "text" field.
	Text string `json:"text,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NegativePromptQuery when eager-loading is set.
	Edges NegativePromptEdges `json:"edges"`
	// contains filtered or unexported fields
}

NegativePrompt is the model entity for the NegativePrompt schema.

func (*NegativePrompt) ExecContext

func (c *NegativePrompt) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NegativePrompt) QueryContext

func (c *NegativePrompt) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NegativePrompt) QueryGenerations

func (np *NegativePrompt) QueryGenerations() *GenerationQuery

QueryGenerations queries the "generations" edge of the NegativePrompt entity.

func (*NegativePrompt) String

func (np *NegativePrompt) String() string

String implements the fmt.Stringer.

func (*NegativePrompt) Unwrap

func (np *NegativePrompt) Unwrap() *NegativePrompt

Unwrap unwraps the NegativePrompt 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 (*NegativePrompt) Update

Update returns a builder for updating this NegativePrompt. Note that you need to call NegativePrompt.Unwrap() before calling this method if this NegativePrompt was returned from a transaction, and the transaction was committed or rolled back.

type NegativePromptClient

type NegativePromptClient struct {
	// contains filtered or unexported fields
}

NegativePromptClient is a client for the NegativePrompt schema.

func NewNegativePromptClient

func NewNegativePromptClient(c config) *NegativePromptClient

NewNegativePromptClient returns a client for the NegativePrompt from the given config.

func (*NegativePromptClient) Create

Create returns a builder for creating a NegativePrompt entity.

func (*NegativePromptClient) CreateBulk

CreateBulk returns a builder for creating a bulk of NegativePrompt entities.

func (*NegativePromptClient) Delete

Delete returns a delete builder for NegativePrompt.

func (*NegativePromptClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NegativePromptClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*NegativePromptClient) ExecContext

func (c *NegativePromptClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NegativePromptClient) Get

Get returns a NegativePrompt entity by its id.

func (*NegativePromptClient) GetX

GetX is like Get, but panics if an error occurs.

func (*NegativePromptClient) Hooks

func (c *NegativePromptClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NegativePromptClient) Intercept

func (c *NegativePromptClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `negativeprompt.Intercept(f(g(h())))`.

func (*NegativePromptClient) Interceptors

func (c *NegativePromptClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*NegativePromptClient) Query

Query returns a query builder for NegativePrompt.

func (*NegativePromptClient) QueryContext

func (c *NegativePromptClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NegativePromptClient) QueryGenerations

func (c *NegativePromptClient) QueryGenerations(np *NegativePrompt) *GenerationQuery

QueryGenerations queries the generations edge of a NegativePrompt.

func (*NegativePromptClient) Update

Update returns an update builder for NegativePrompt.

func (*NegativePromptClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*NegativePromptClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*NegativePromptClient) Use

func (c *NegativePromptClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `negativeprompt.Hooks(f(g(h())))`.

type NegativePromptCreate

type NegativePromptCreate struct {
	// contains filtered or unexported fields
}

NegativePromptCreate is the builder for creating a NegativePrompt entity.

func (*NegativePromptCreate) AddGenerationIDs

func (npc *NegativePromptCreate) AddGenerationIDs(ids ...uuid.UUID) *NegativePromptCreate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*NegativePromptCreate) AddGenerations

func (npc *NegativePromptCreate) AddGenerations(g ...*Generation) *NegativePromptCreate

AddGenerations adds the "generations" edges to the Generation entity.

func (*NegativePromptCreate) Exec

func (npc *NegativePromptCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NegativePromptCreate) ExecContext

func (c *NegativePromptCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NegativePromptCreate) ExecX

func (npc *NegativePromptCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NegativePromptCreate) Mutation

Mutation returns the NegativePromptMutation object of the builder.

func (*NegativePromptCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.NegativePrompt.Create().
	SetText(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.NegativePromptUpsert) {
		SetText(v+v).
	}).
	Exec(ctx)

func (*NegativePromptCreate) OnConflictColumns

func (npc *NegativePromptCreate) OnConflictColumns(columns ...string) *NegativePromptUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.NegativePrompt.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NegativePromptCreate) QueryContext

func (c *NegativePromptCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NegativePromptCreate) Save

Save creates the NegativePrompt in the database.

func (*NegativePromptCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*NegativePromptCreate) SetCreatedAt

func (npc *NegativePromptCreate) SetCreatedAt(t time.Time) *NegativePromptCreate

SetCreatedAt sets the "created_at" field.

func (*NegativePromptCreate) SetID

SetID sets the "id" field.

func (*NegativePromptCreate) SetNillableCreatedAt

func (npc *NegativePromptCreate) SetNillableCreatedAt(t *time.Time) *NegativePromptCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*NegativePromptCreate) SetNillableID

func (npc *NegativePromptCreate) SetNillableID(u *uuid.UUID) *NegativePromptCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*NegativePromptCreate) SetNillableUpdatedAt

func (npc *NegativePromptCreate) SetNillableUpdatedAt(t *time.Time) *NegativePromptCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NegativePromptCreate) SetText

SetText sets the "text" field.

func (*NegativePromptCreate) SetUpdatedAt

func (npc *NegativePromptCreate) SetUpdatedAt(t time.Time) *NegativePromptCreate

SetUpdatedAt sets the "updated_at" field.

type NegativePromptCreateBulk

type NegativePromptCreateBulk struct {
	// contains filtered or unexported fields
}

NegativePromptCreateBulk is the builder for creating many NegativePrompt entities in bulk.

func (*NegativePromptCreateBulk) Exec

Exec executes the query.

func (*NegativePromptCreateBulk) ExecContext

func (c *NegativePromptCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NegativePromptCreateBulk) ExecX

func (npcb *NegativePromptCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NegativePromptCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.NegativePrompt.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.NegativePromptUpsert) {
		SetText(v+v).
	}).
	Exec(ctx)

func (*NegativePromptCreateBulk) OnConflictColumns

func (npcb *NegativePromptCreateBulk) OnConflictColumns(columns ...string) *NegativePromptUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.NegativePrompt.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NegativePromptCreateBulk) QueryContext

func (c *NegativePromptCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NegativePromptCreateBulk) Save

Save creates the NegativePrompt entities in the database.

func (*NegativePromptCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type NegativePromptDelete

type NegativePromptDelete struct {
	// contains filtered or unexported fields
}

NegativePromptDelete is the builder for deleting a NegativePrompt entity.

func (*NegativePromptDelete) Exec

func (npd *NegativePromptDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NegativePromptDelete) ExecContext

func (c *NegativePromptDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NegativePromptDelete) ExecX

func (npd *NegativePromptDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NegativePromptDelete) QueryContext

func (c *NegativePromptDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NegativePromptDelete) Where

Where appends a list predicates to the NegativePromptDelete builder.

type NegativePromptDeleteOne

type NegativePromptDeleteOne struct {
	// contains filtered or unexported fields
}

NegativePromptDeleteOne is the builder for deleting a single NegativePrompt entity.

func (*NegativePromptDeleteOne) Exec

func (npdo *NegativePromptDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*NegativePromptDeleteOne) ExecX

func (npdo *NegativePromptDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type NegativePromptEdges

type NegativePromptEdges struct {
	// Generations holds the value of the generations edge.
	Generations []*Generation `json:"generations,omitempty"`
	// contains filtered or unexported fields
}

NegativePromptEdges holds the relations/edges for other nodes in the graph.

func (NegativePromptEdges) GenerationsOrErr

func (e NegativePromptEdges) GenerationsOrErr() ([]*Generation, error)

GenerationsOrErr returns the Generations value or an error if the edge was not loaded in eager-loading.

type NegativePromptGroupBy

type NegativePromptGroupBy struct {
	// contains filtered or unexported fields
}

NegativePromptGroupBy is the group-by builder for NegativePrompt entities.

func (*NegativePromptGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*NegativePromptGroupBy) Bool

func (s *NegativePromptGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NegativePromptGroupBy) BoolX

func (s *NegativePromptGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NegativePromptGroupBy) Bools

func (s *NegativePromptGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NegativePromptGroupBy) BoolsX

func (s *NegativePromptGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NegativePromptGroupBy) Float64

func (s *NegativePromptGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NegativePromptGroupBy) Float64X

func (s *NegativePromptGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NegativePromptGroupBy) Float64s

func (s *NegativePromptGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NegativePromptGroupBy) Float64sX

func (s *NegativePromptGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NegativePromptGroupBy) Int

func (s *NegativePromptGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NegativePromptGroupBy) IntX

func (s *NegativePromptGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NegativePromptGroupBy) Ints

func (s *NegativePromptGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NegativePromptGroupBy) IntsX

func (s *NegativePromptGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NegativePromptGroupBy) Scan

func (npgb *NegativePromptGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NegativePromptGroupBy) ScanX

func (s *NegativePromptGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NegativePromptGroupBy) String

func (s *NegativePromptGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NegativePromptGroupBy) StringX

func (s *NegativePromptGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NegativePromptGroupBy) Strings

func (s *NegativePromptGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NegativePromptGroupBy) StringsX

func (s *NegativePromptGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NegativePromptMutation

type NegativePromptMutation struct {
	// contains filtered or unexported fields
}

NegativePromptMutation represents an operation that mutates the NegativePrompt nodes in the graph.

func (*NegativePromptMutation) AddField

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) AddGenerationIDs

func (m *NegativePromptMutation) AddGenerationIDs(ids ...uuid.UUID)

AddGenerationIDs adds the "generations" edge to the Generation entity by ids.

func (*NegativePromptMutation) AddedEdges

func (m *NegativePromptMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NegativePromptMutation) AddedField

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) AddedFields

func (m *NegativePromptMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NegativePromptMutation) AddedIDs

func (m *NegativePromptMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NegativePromptMutation) ClearEdge

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) ClearField

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) ClearGenerations

func (m *NegativePromptMutation) ClearGenerations()

ClearGenerations clears the "generations" edge to the Generation entity.

func (*NegativePromptMutation) ClearedEdges

func (m *NegativePromptMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NegativePromptMutation) ClearedFields

func (m *NegativePromptMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NegativePromptMutation) Client

func (m NegativePromptMutation) 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 (*NegativePromptMutation) CreatedAt

func (m *NegativePromptMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*NegativePromptMutation) EdgeCleared

func (m *NegativePromptMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NegativePromptMutation) ExecContext

func (c *NegativePromptMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NegativePromptMutation) Field

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) FieldCleared

func (m *NegativePromptMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NegativePromptMutation) Fields

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) GenerationsCleared

func (m *NegativePromptMutation) GenerationsCleared() bool

GenerationsCleared reports if the "generations" edge to the Generation entity was cleared.

func (*NegativePromptMutation) GenerationsIDs

func (m *NegativePromptMutation) GenerationsIDs() (ids []uuid.UUID)

GenerationsIDs returns the "generations" edge IDs in the mutation.

func (*NegativePromptMutation) ID

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) 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 (*NegativePromptMutation) OldCreatedAt

func (m *NegativePromptMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the NegativePrompt entity. If the NegativePrompt 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 (*NegativePromptMutation) OldField

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) OldText

func (m *NegativePromptMutation) OldText(ctx context.Context) (v string, err error)

OldText returns the old "text" field's value of the NegativePrompt entity. If the NegativePrompt 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 (*NegativePromptMutation) OldUpdatedAt

func (m *NegativePromptMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the NegativePrompt entity. If the NegativePrompt 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 (*NegativePromptMutation) Op

func (m *NegativePromptMutation) Op() Op

Op returns the operation name.

func (*NegativePromptMutation) QueryContext

func (c *NegativePromptMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NegativePromptMutation) RemoveGenerationIDs

func (m *NegativePromptMutation) RemoveGenerationIDs(ids ...uuid.UUID)

RemoveGenerationIDs removes the "generations" edge to the Generation entity by IDs.

func (*NegativePromptMutation) RemovedEdges

func (m *NegativePromptMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NegativePromptMutation) RemovedGenerationsIDs

func (m *NegativePromptMutation) RemovedGenerationsIDs() (ids []uuid.UUID)

RemovedGenerations returns the removed IDs of the "generations" edge to the Generation entity.

func (*NegativePromptMutation) RemovedIDs

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) ResetCreatedAt

func (m *NegativePromptMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*NegativePromptMutation) ResetEdge

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) ResetField

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) ResetGenerations

func (m *NegativePromptMutation) ResetGenerations()

ResetGenerations resets all changes to the "generations" edge.

func (*NegativePromptMutation) ResetText

func (m *NegativePromptMutation) ResetText()

ResetText resets all changes to the "text" field.

func (*NegativePromptMutation) ResetUpdatedAt

func (m *NegativePromptMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*NegativePromptMutation) SetCreatedAt

func (m *NegativePromptMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*NegativePromptMutation) SetField

func (m *NegativePromptMutation) 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 (*NegativePromptMutation) SetID

func (m *NegativePromptMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of NegativePrompt entities.

func (*NegativePromptMutation) SetOp

func (m *NegativePromptMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*NegativePromptMutation) SetText

func (m *NegativePromptMutation) SetText(s string)

SetText sets the "text" field.

func (*NegativePromptMutation) SetUpdatedAt

func (m *NegativePromptMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*NegativePromptMutation) Text

func (m *NegativePromptMutation) Text() (r string, exists bool)

Text returns the value of the "text" field in the mutation.

func (NegativePromptMutation) Tx

func (m NegativePromptMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NegativePromptMutation) Type

func (m *NegativePromptMutation) Type() string

Type returns the node type of this mutation (NegativePrompt).

func (*NegativePromptMutation) UpdatedAt

func (m *NegativePromptMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*NegativePromptMutation) Where

Where appends a list predicates to the NegativePromptMutation builder.

func (*NegativePromptMutation) WhereP

func (m *NegativePromptMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NegativePromptMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NegativePromptQuery

type NegativePromptQuery struct {
	// contains filtered or unexported fields
}

NegativePromptQuery is the builder for querying NegativePrompt entities.

func (*NegativePromptQuery) Aggregate

func (npq *NegativePromptQuery) Aggregate(fns ...AggregateFunc) *NegativePromptSelect

Aggregate returns a NegativePromptSelect configured with the given aggregations.

func (*NegativePromptQuery) All

All executes the query and returns a list of NegativePrompts.

func (*NegativePromptQuery) AllX

AllX is like All, but panics if an error occurs.

func (*NegativePromptQuery) Clone

Clone returns a duplicate of the NegativePromptQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NegativePromptQuery) Count

func (npq *NegativePromptQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NegativePromptQuery) CountX

func (npq *NegativePromptQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NegativePromptQuery) ExecContext

func (c *NegativePromptQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NegativePromptQuery) Exist

func (npq *NegativePromptQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NegativePromptQuery) ExistX

func (npq *NegativePromptQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NegativePromptQuery) First

First returns the first NegativePrompt entity from the query. Returns a *NotFoundError when no NegativePrompt was found.

func (*NegativePromptQuery) FirstID

func (npq *NegativePromptQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first NegativePrompt ID from the query. Returns a *NotFoundError when no NegativePrompt ID was found.

func (*NegativePromptQuery) FirstIDX

func (npq *NegativePromptQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*NegativePromptQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*NegativePromptQuery) GroupBy

func (npq *NegativePromptQuery) GroupBy(field string, fields ...string) *NegativePromptGroupBy

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 {
	Text string `json:"text,omitempty"`
	Count int `json:"count,omitempty"`
}

client.NegativePrompt.Query().
	GroupBy(negativeprompt.FieldText).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NegativePromptQuery) IDs

func (npq *NegativePromptQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of NegativePrompt IDs.

func (*NegativePromptQuery) IDsX

func (npq *NegativePromptQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*NegativePromptQuery) Limit

func (npq *NegativePromptQuery) Limit(limit int) *NegativePromptQuery

Limit the number of records to be returned by this query.

func (*NegativePromptQuery) Modify

func (npq *NegativePromptQuery) Modify(modifiers ...func(s *sql.Selector)) *NegativePromptSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*NegativePromptQuery) Offset

func (npq *NegativePromptQuery) Offset(offset int) *NegativePromptQuery

Offset to start from.

func (*NegativePromptQuery) Only

Only returns a single NegativePrompt entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NegativePrompt entity is found. Returns a *NotFoundError when no NegativePrompt entities are found.

func (*NegativePromptQuery) OnlyID

func (npq *NegativePromptQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only NegativePrompt ID in the query. Returns a *NotSingularError when more than one NegativePrompt ID is found. Returns a *NotFoundError when no entities are found.

func (*NegativePromptQuery) OnlyIDX

func (npq *NegativePromptQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NegativePromptQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*NegativePromptQuery) Order

Order specifies how the records should be ordered.

func (*NegativePromptQuery) QueryContext

func (c *NegativePromptQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NegativePromptQuery) QueryGenerations

func (npq *NegativePromptQuery) QueryGenerations() *GenerationQuery

QueryGenerations chains the current query on the "generations" edge.

func (*NegativePromptQuery) Select

func (npq *NegativePromptQuery) Select(fields ...string) *NegativePromptSelect

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 {
	Text string `json:"text,omitempty"`
}

client.NegativePrompt.Query().
	Select(negativeprompt.FieldText).
	Scan(ctx, &v)

func (*NegativePromptQuery) Unique

func (npq *NegativePromptQuery) Unique(unique bool) *NegativePromptQuery

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 (*NegativePromptQuery) Where

Where adds a new predicate for the NegativePromptQuery builder.

func (*NegativePromptQuery) WithGenerations

func (npq *NegativePromptQuery) WithGenerations(opts ...func(*GenerationQuery)) *NegativePromptQuery

WithGenerations tells the query-builder to eager-load the nodes that are connected to the "generations" edge. The optional arguments are used to configure the query builder of the edge.

type NegativePromptSelect

type NegativePromptSelect struct {
	*NegativePromptQuery
	// contains filtered or unexported fields
}

NegativePromptSelect is the builder for selecting fields of NegativePrompt entities.

func (*NegativePromptSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*NegativePromptSelect) Bool

func (s *NegativePromptSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NegativePromptSelect) BoolX

func (s *NegativePromptSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NegativePromptSelect) Bools

func (s *NegativePromptSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NegativePromptSelect) BoolsX

func (s *NegativePromptSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (NegativePromptSelect) ExecContext

func (c NegativePromptSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NegativePromptSelect) Float64

func (s *NegativePromptSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NegativePromptSelect) Float64X

func (s *NegativePromptSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NegativePromptSelect) Float64s

func (s *NegativePromptSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NegativePromptSelect) Float64sX

func (s *NegativePromptSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NegativePromptSelect) Int

func (s *NegativePromptSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NegativePromptSelect) IntX

func (s *NegativePromptSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NegativePromptSelect) Ints

func (s *NegativePromptSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NegativePromptSelect) IntsX

func (s *NegativePromptSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NegativePromptSelect) Modify

func (nps *NegativePromptSelect) Modify(modifiers ...func(s *sql.Selector)) *NegativePromptSelect

Modify adds a query modifier for attaching custom logic to queries.

func (NegativePromptSelect) QueryContext

func (c NegativePromptSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NegativePromptSelect) Scan

func (nps *NegativePromptSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NegativePromptSelect) ScanX

func (s *NegativePromptSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NegativePromptSelect) String

func (s *NegativePromptSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NegativePromptSelect) StringX

func (s *NegativePromptSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NegativePromptSelect) Strings

func (s *NegativePromptSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NegativePromptSelect) StringsX

func (s *NegativePromptSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NegativePromptUpdate

type NegativePromptUpdate struct {
	// contains filtered or unexported fields
}

NegativePromptUpdate is the builder for updating NegativePrompt entities.

func (*NegativePromptUpdate) AddGenerationIDs

func (npu *NegativePromptUpdate) AddGenerationIDs(ids ...uuid.UUID) *NegativePromptUpdate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*NegativePromptUpdate) AddGenerations

func (npu *NegativePromptUpdate) AddGenerations(g ...*Generation) *NegativePromptUpdate

AddGenerations adds the "generations" edges to the Generation entity.

func (*NegativePromptUpdate) ClearGenerations

func (npu *NegativePromptUpdate) ClearGenerations() *NegativePromptUpdate

ClearGenerations clears all "generations" edges to the Generation entity.

func (*NegativePromptUpdate) Exec

func (npu *NegativePromptUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NegativePromptUpdate) ExecContext

func (c *NegativePromptUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NegativePromptUpdate) ExecX

func (npu *NegativePromptUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NegativePromptUpdate) Modify

func (npu *NegativePromptUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *NegativePromptUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*NegativePromptUpdate) Mutation

Mutation returns the NegativePromptMutation object of the builder.

func (*NegativePromptUpdate) QueryContext

func (c *NegativePromptUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NegativePromptUpdate) RemoveGenerationIDs

func (npu *NegativePromptUpdate) RemoveGenerationIDs(ids ...uuid.UUID) *NegativePromptUpdate

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*NegativePromptUpdate) RemoveGenerations

func (npu *NegativePromptUpdate) RemoveGenerations(g ...*Generation) *NegativePromptUpdate

RemoveGenerations removes "generations" edges to Generation entities.

func (*NegativePromptUpdate) Save

func (npu *NegativePromptUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NegativePromptUpdate) SaveX

func (npu *NegativePromptUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NegativePromptUpdate) SetText

SetText sets the "text" field.

func (*NegativePromptUpdate) SetUpdatedAt

func (npu *NegativePromptUpdate) SetUpdatedAt(t time.Time) *NegativePromptUpdate

SetUpdatedAt sets the "updated_at" field.

func (*NegativePromptUpdate) Where

Where appends a list predicates to the NegativePromptUpdate builder.

type NegativePromptUpdateOne

type NegativePromptUpdateOne struct {
	// contains filtered or unexported fields
}

NegativePromptUpdateOne is the builder for updating a single NegativePrompt entity.

func (*NegativePromptUpdateOne) AddGenerationIDs

func (npuo *NegativePromptUpdateOne) AddGenerationIDs(ids ...uuid.UUID) *NegativePromptUpdateOne

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*NegativePromptUpdateOne) AddGenerations

func (npuo *NegativePromptUpdateOne) AddGenerations(g ...*Generation) *NegativePromptUpdateOne

AddGenerations adds the "generations" edges to the Generation entity.

func (*NegativePromptUpdateOne) ClearGenerations

func (npuo *NegativePromptUpdateOne) ClearGenerations() *NegativePromptUpdateOne

ClearGenerations clears all "generations" edges to the Generation entity.

func (*NegativePromptUpdateOne) Exec

func (npuo *NegativePromptUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*NegativePromptUpdateOne) ExecContext

func (c *NegativePromptUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NegativePromptUpdateOne) ExecX

func (npuo *NegativePromptUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NegativePromptUpdateOne) Modify

func (npuo *NegativePromptUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *NegativePromptUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*NegativePromptUpdateOne) Mutation

Mutation returns the NegativePromptMutation object of the builder.

func (*NegativePromptUpdateOne) QueryContext

func (c *NegativePromptUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NegativePromptUpdateOne) RemoveGenerationIDs

func (npuo *NegativePromptUpdateOne) RemoveGenerationIDs(ids ...uuid.UUID) *NegativePromptUpdateOne

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*NegativePromptUpdateOne) RemoveGenerations

func (npuo *NegativePromptUpdateOne) RemoveGenerations(g ...*Generation) *NegativePromptUpdateOne

RemoveGenerations removes "generations" edges to Generation entities.

func (*NegativePromptUpdateOne) Save

Save executes the query and returns the updated NegativePrompt entity.

func (*NegativePromptUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*NegativePromptUpdateOne) Select

func (npuo *NegativePromptUpdateOne) Select(field string, fields ...string) *NegativePromptUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NegativePromptUpdateOne) SetText

SetText sets the "text" field.

func (*NegativePromptUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type NegativePromptUpsert

type NegativePromptUpsert struct {
	*sql.UpdateSet
}

NegativePromptUpsert is the "OnConflict" setter.

func (*NegativePromptUpsert) SetText

SetText sets the "text" field.

func (*NegativePromptUpsert) SetUpdatedAt

func (u *NegativePromptUpsert) SetUpdatedAt(v time.Time) *NegativePromptUpsert

SetUpdatedAt sets the "updated_at" field.

func (*NegativePromptUpsert) UpdateText

func (u *NegativePromptUpsert) UpdateText() *NegativePromptUpsert

UpdateText sets the "text" field to the value that was provided on create.

func (*NegativePromptUpsert) UpdateUpdatedAt

func (u *NegativePromptUpsert) UpdateUpdatedAt() *NegativePromptUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NegativePromptUpsertBulk

type NegativePromptUpsertBulk struct {
	// contains filtered or unexported fields
}

NegativePromptUpsertBulk is the builder for "upsert"-ing a bulk of NegativePrompt nodes.

func (*NegativePromptUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NegativePromptUpsertBulk) Exec

Exec executes the query.

func (*NegativePromptUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*NegativePromptUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NegativePrompt.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*NegativePromptUpsertBulk) SetText

SetText sets the "text" field.

func (*NegativePromptUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*NegativePromptUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the NegativePromptCreateBulk.OnConflict documentation for more info.

func (*NegativePromptUpsertBulk) UpdateNewValues

func (u *NegativePromptUpsertBulk) UpdateNewValues() *NegativePromptUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NegativePrompt.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(negativeprompt.FieldID)
		}),
	).
	Exec(ctx)

func (*NegativePromptUpsertBulk) UpdateText

UpdateText sets the "text" field to the value that was provided on create.

func (*NegativePromptUpsertBulk) UpdateUpdatedAt

func (u *NegativePromptUpsertBulk) UpdateUpdatedAt() *NegativePromptUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NegativePromptUpsertOne

type NegativePromptUpsertOne struct {
	// contains filtered or unexported fields
}

NegativePromptUpsertOne is the builder for "upsert"-ing

one NegativePrompt node.

func (*NegativePromptUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NegativePromptUpsertOne) Exec

Exec executes the query.

func (*NegativePromptUpsertOne) ExecX

func (u *NegativePromptUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NegativePromptUpsertOne) ID

func (u *NegativePromptUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*NegativePromptUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*NegativePromptUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NegativePrompt.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*NegativePromptUpsertOne) SetText

SetText sets the "text" field.

func (*NegativePromptUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*NegativePromptUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the NegativePromptCreate.OnConflict documentation for more info.

func (*NegativePromptUpsertOne) UpdateNewValues

func (u *NegativePromptUpsertOne) UpdateNewValues() *NegativePromptUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.NegativePrompt.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(negativeprompt.FieldID)
		}),
	).
	Exec(ctx)

func (*NegativePromptUpsertOne) UpdateText

UpdateText sets the "text" field to the value that was provided on create.

func (*NegativePromptUpsertOne) UpdateUpdatedAt

func (u *NegativePromptUpsertOne) UpdateUpdatedAt() *NegativePromptUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NegativePrompts

type NegativePrompts []*NegativePrompt

NegativePrompts is a parsable slice of NegativePrompt.

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 Prompt

type Prompt struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Text holds the value of the "text" field.
	Text string `json:"text,omitempty"`
	// Type holds the value of the "type" field.
	Type prompt.Type `json:"type,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PromptQuery when eager-loading is set.
	Edges PromptEdges `json:"edges"`
	// contains filtered or unexported fields
}

Prompt is the model entity for the Prompt schema.

func (*Prompt) ExecContext

func (c *Prompt) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Prompt) QueryContext

func (c *Prompt) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Prompt) QueryGenerations

func (pr *Prompt) QueryGenerations() *GenerationQuery

QueryGenerations queries the "generations" edge of the Prompt entity.

func (*Prompt) QueryVoiceovers

func (pr *Prompt) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers queries the "voiceovers" edge of the Prompt entity.

func (*Prompt) String

func (pr *Prompt) String() string

String implements the fmt.Stringer.

func (*Prompt) Unwrap

func (pr *Prompt) Unwrap() *Prompt

Unwrap unwraps the Prompt 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 (*Prompt) Update

func (pr *Prompt) Update() *PromptUpdateOne

Update returns a builder for updating this Prompt. Note that you need to call Prompt.Unwrap() before calling this method if this Prompt was returned from a transaction, and the transaction was committed or rolled back.

type PromptClient

type PromptClient struct {
	// contains filtered or unexported fields
}

PromptClient is a client for the Prompt schema.

func NewPromptClient

func NewPromptClient(c config) *PromptClient

NewPromptClient returns a client for the Prompt from the given config.

func (*PromptClient) Create

func (c *PromptClient) Create() *PromptCreate

Create returns a builder for creating a Prompt entity.

func (*PromptClient) CreateBulk

func (c *PromptClient) CreateBulk(builders ...*PromptCreate) *PromptCreateBulk

CreateBulk returns a builder for creating a bulk of Prompt entities.

func (*PromptClient) Delete

func (c *PromptClient) Delete() *PromptDelete

Delete returns a delete builder for Prompt.

func (*PromptClient) DeleteOne

func (c *PromptClient) DeleteOne(pr *Prompt) *PromptDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PromptClient) DeleteOneID

func (c *PromptClient) DeleteOneID(id uuid.UUID) *PromptDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PromptClient) ExecContext

func (c *PromptClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PromptClient) Get

func (c *PromptClient) Get(ctx context.Context, id uuid.UUID) (*Prompt, error)

Get returns a Prompt entity by its id.

func (*PromptClient) GetX

func (c *PromptClient) GetX(ctx context.Context, id uuid.UUID) *Prompt

GetX is like Get, but panics if an error occurs.

func (*PromptClient) Hooks

func (c *PromptClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PromptClient) Intercept

func (c *PromptClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `prompt.Intercept(f(g(h())))`.

func (*PromptClient) Interceptors

func (c *PromptClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PromptClient) Query

func (c *PromptClient) Query() *PromptQuery

Query returns a query builder for Prompt.

func (*PromptClient) QueryContext

func (c *PromptClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PromptClient) QueryGenerations

func (c *PromptClient) QueryGenerations(pr *Prompt) *GenerationQuery

QueryGenerations queries the generations edge of a Prompt.

func (*PromptClient) QueryVoiceovers

func (c *PromptClient) QueryVoiceovers(pr *Prompt) *VoiceoverQuery

QueryVoiceovers queries the voiceovers edge of a Prompt.

func (*PromptClient) Update

func (c *PromptClient) Update() *PromptUpdate

Update returns an update builder for Prompt.

func (*PromptClient) UpdateOne

func (c *PromptClient) UpdateOne(pr *Prompt) *PromptUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PromptClient) UpdateOneID

func (c *PromptClient) UpdateOneID(id uuid.UUID) *PromptUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PromptClient) Use

func (c *PromptClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `prompt.Hooks(f(g(h())))`.

type PromptCreate

type PromptCreate struct {
	// contains filtered or unexported fields
}

PromptCreate is the builder for creating a Prompt entity.

func (*PromptCreate) AddGenerationIDs

func (pc *PromptCreate) AddGenerationIDs(ids ...uuid.UUID) *PromptCreate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*PromptCreate) AddGenerations

func (pc *PromptCreate) AddGenerations(g ...*Generation) *PromptCreate

AddGenerations adds the "generations" edges to the Generation entity.

func (*PromptCreate) AddVoiceoverIDs

func (pc *PromptCreate) AddVoiceoverIDs(ids ...uuid.UUID) *PromptCreate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*PromptCreate) AddVoiceovers

func (pc *PromptCreate) AddVoiceovers(v ...*Voiceover) *PromptCreate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*PromptCreate) Exec

func (pc *PromptCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PromptCreate) ExecContext

func (c *PromptCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PromptCreate) ExecX

func (pc *PromptCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PromptCreate) Mutation

func (pc *PromptCreate) Mutation() *PromptMutation

Mutation returns the PromptMutation object of the builder.

func (*PromptCreate) OnConflict

func (pc *PromptCreate) OnConflict(opts ...sql.ConflictOption) *PromptUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Prompt.Create().
	SetText(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PromptUpsert) {
		SetText(v+v).
	}).
	Exec(ctx)

func (*PromptCreate) OnConflictColumns

func (pc *PromptCreate) OnConflictColumns(columns ...string) *PromptUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Prompt.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PromptCreate) QueryContext

func (c *PromptCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PromptCreate) Save

func (pc *PromptCreate) Save(ctx context.Context) (*Prompt, error)

Save creates the Prompt in the database.

func (*PromptCreate) SaveX

func (pc *PromptCreate) SaveX(ctx context.Context) *Prompt

SaveX calls Save and panics if Save returns an error.

func (*PromptCreate) SetCreatedAt

func (pc *PromptCreate) SetCreatedAt(t time.Time) *PromptCreate

SetCreatedAt sets the "created_at" field.

func (*PromptCreate) SetID

func (pc *PromptCreate) SetID(u uuid.UUID) *PromptCreate

SetID sets the "id" field.

func (*PromptCreate) SetNillableCreatedAt

func (pc *PromptCreate) SetNillableCreatedAt(t *time.Time) *PromptCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PromptCreate) SetNillableID

func (pc *PromptCreate) SetNillableID(u *uuid.UUID) *PromptCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PromptCreate) SetNillableUpdatedAt

func (pc *PromptCreate) SetNillableUpdatedAt(t *time.Time) *PromptCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PromptCreate) SetText

func (pc *PromptCreate) SetText(s string) *PromptCreate

SetText sets the "text" field.

func (*PromptCreate) SetType

func (pc *PromptCreate) SetType(pr prompt.Type) *PromptCreate

SetType sets the "type" field.

func (*PromptCreate) SetUpdatedAt

func (pc *PromptCreate) SetUpdatedAt(t time.Time) *PromptCreate

SetUpdatedAt sets the "updated_at" field.

type PromptCreateBulk

type PromptCreateBulk struct {
	// contains filtered or unexported fields
}

PromptCreateBulk is the builder for creating many Prompt entities in bulk.

func (*PromptCreateBulk) Exec

func (pcb *PromptCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PromptCreateBulk) ExecContext

func (c *PromptCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PromptCreateBulk) ExecX

func (pcb *PromptCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PromptCreateBulk) OnConflict

func (pcb *PromptCreateBulk) OnConflict(opts ...sql.ConflictOption) *PromptUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Prompt.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PromptUpsert) {
		SetText(v+v).
	}).
	Exec(ctx)

func (*PromptCreateBulk) OnConflictColumns

func (pcb *PromptCreateBulk) OnConflictColumns(columns ...string) *PromptUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Prompt.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PromptCreateBulk) QueryContext

func (c *PromptCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PromptCreateBulk) Save

func (pcb *PromptCreateBulk) Save(ctx context.Context) ([]*Prompt, error)

Save creates the Prompt entities in the database.

func (*PromptCreateBulk) SaveX

func (pcb *PromptCreateBulk) SaveX(ctx context.Context) []*Prompt

SaveX is like Save, but panics if an error occurs.

type PromptDelete

type PromptDelete struct {
	// contains filtered or unexported fields
}

PromptDelete is the builder for deleting a Prompt entity.

func (*PromptDelete) Exec

func (pd *PromptDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PromptDelete) ExecContext

func (c *PromptDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PromptDelete) ExecX

func (pd *PromptDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PromptDelete) QueryContext

func (c *PromptDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PromptDelete) Where

func (pd *PromptDelete) Where(ps ...predicate.Prompt) *PromptDelete

Where appends a list predicates to the PromptDelete builder.

type PromptDeleteOne

type PromptDeleteOne struct {
	// contains filtered or unexported fields
}

PromptDeleteOne is the builder for deleting a single Prompt entity.

func (*PromptDeleteOne) Exec

func (pdo *PromptDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PromptDeleteOne) ExecX

func (pdo *PromptDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type PromptEdges

type PromptEdges struct {
	// Generations holds the value of the generations edge.
	Generations []*Generation `json:"generations,omitempty"`
	// Voiceovers holds the value of the voiceovers edge.
	Voiceovers []*Voiceover `json:"voiceovers,omitempty"`
	// contains filtered or unexported fields
}

PromptEdges holds the relations/edges for other nodes in the graph.

func (PromptEdges) GenerationsOrErr

func (e PromptEdges) GenerationsOrErr() ([]*Generation, error)

GenerationsOrErr returns the Generations value or an error if the edge was not loaded in eager-loading.

func (PromptEdges) VoiceoversOrErr

func (e PromptEdges) VoiceoversOrErr() ([]*Voiceover, error)

VoiceoversOrErr returns the Voiceovers value or an error if the edge was not loaded in eager-loading.

type PromptGroupBy

type PromptGroupBy struct {
	// contains filtered or unexported fields
}

PromptGroupBy is the group-by builder for Prompt entities.

func (*PromptGroupBy) Aggregate

func (pgb *PromptGroupBy) Aggregate(fns ...AggregateFunc) *PromptGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PromptGroupBy) Bool

func (s *PromptGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PromptGroupBy) BoolX

func (s *PromptGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PromptGroupBy) Bools

func (s *PromptGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PromptGroupBy) BoolsX

func (s *PromptGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PromptGroupBy) Float64

func (s *PromptGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PromptGroupBy) Float64X

func (s *PromptGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PromptGroupBy) Float64s

func (s *PromptGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PromptGroupBy) Float64sX

func (s *PromptGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PromptGroupBy) Int

func (s *PromptGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PromptGroupBy) IntX

func (s *PromptGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PromptGroupBy) Ints

func (s *PromptGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PromptGroupBy) IntsX

func (s *PromptGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PromptGroupBy) Scan

func (pgb *PromptGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PromptGroupBy) ScanX

func (s *PromptGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PromptGroupBy) String

func (s *PromptGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PromptGroupBy) StringX

func (s *PromptGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PromptGroupBy) Strings

func (s *PromptGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PromptGroupBy) StringsX

func (s *PromptGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PromptMutation

type PromptMutation struct {
	// contains filtered or unexported fields
}

PromptMutation represents an operation that mutates the Prompt nodes in the graph.

func (*PromptMutation) AddField

func (m *PromptMutation) 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 (*PromptMutation) AddGenerationIDs

func (m *PromptMutation) AddGenerationIDs(ids ...uuid.UUID)

AddGenerationIDs adds the "generations" edge to the Generation entity by ids.

func (*PromptMutation) AddVoiceoverIDs

func (m *PromptMutation) AddVoiceoverIDs(ids ...uuid.UUID)

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by ids.

func (*PromptMutation) AddedEdges

func (m *PromptMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PromptMutation) AddedField

func (m *PromptMutation) 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 (*PromptMutation) AddedFields

func (m *PromptMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PromptMutation) AddedIDs

func (m *PromptMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PromptMutation) ClearEdge

func (m *PromptMutation) 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 (*PromptMutation) ClearField

func (m *PromptMutation) 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 (*PromptMutation) ClearGenerations

func (m *PromptMutation) ClearGenerations()

ClearGenerations clears the "generations" edge to the Generation entity.

func (*PromptMutation) ClearVoiceovers

func (m *PromptMutation) ClearVoiceovers()

ClearVoiceovers clears the "voiceovers" edge to the Voiceover entity.

func (*PromptMutation) ClearedEdges

func (m *PromptMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PromptMutation) ClearedFields

func (m *PromptMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PromptMutation) Client

func (m PromptMutation) 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 (*PromptMutation) CreatedAt

func (m *PromptMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PromptMutation) EdgeCleared

func (m *PromptMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PromptMutation) ExecContext

func (c *PromptMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PromptMutation) Field

func (m *PromptMutation) 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 (*PromptMutation) FieldCleared

func (m *PromptMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PromptMutation) Fields

func (m *PromptMutation) 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 (*PromptMutation) GenerationsCleared

func (m *PromptMutation) GenerationsCleared() bool

GenerationsCleared reports if the "generations" edge to the Generation entity was cleared.

func (*PromptMutation) GenerationsIDs

func (m *PromptMutation) GenerationsIDs() (ids []uuid.UUID)

GenerationsIDs returns the "generations" edge IDs in the mutation.

func (*PromptMutation) GetType

func (m *PromptMutation) GetType() (r prompt.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*PromptMutation) ID

func (m *PromptMutation) 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 (*PromptMutation) IDs

func (m *PromptMutation) 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 (*PromptMutation) OldCreatedAt

func (m *PromptMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Prompt entity. If the Prompt 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 (*PromptMutation) OldField

func (m *PromptMutation) 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 (*PromptMutation) OldText

func (m *PromptMutation) OldText(ctx context.Context) (v string, err error)

OldText returns the old "text" field's value of the Prompt entity. If the Prompt 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 (*PromptMutation) OldType

func (m *PromptMutation) OldType(ctx context.Context) (v prompt.Type, err error)

OldType returns the old "type" field's value of the Prompt entity. If the Prompt 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 (*PromptMutation) OldUpdatedAt

func (m *PromptMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Prompt entity. If the Prompt 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 (*PromptMutation) Op

func (m *PromptMutation) Op() Op

Op returns the operation name.

func (*PromptMutation) QueryContext

func (c *PromptMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PromptMutation) RemoveGenerationIDs

func (m *PromptMutation) RemoveGenerationIDs(ids ...uuid.UUID)

RemoveGenerationIDs removes the "generations" edge to the Generation entity by IDs.

func (*PromptMutation) RemoveVoiceoverIDs

func (m *PromptMutation) RemoveVoiceoverIDs(ids ...uuid.UUID)

RemoveVoiceoverIDs removes the "voiceovers" edge to the Voiceover entity by IDs.

func (*PromptMutation) RemovedEdges

func (m *PromptMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PromptMutation) RemovedGenerationsIDs

func (m *PromptMutation) RemovedGenerationsIDs() (ids []uuid.UUID)

RemovedGenerations returns the removed IDs of the "generations" edge to the Generation entity.

func (*PromptMutation) RemovedIDs

func (m *PromptMutation) 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 (*PromptMutation) RemovedVoiceoversIDs

func (m *PromptMutation) RemovedVoiceoversIDs() (ids []uuid.UUID)

RemovedVoiceovers returns the removed IDs of the "voiceovers" edge to the Voiceover entity.

func (*PromptMutation) ResetCreatedAt

func (m *PromptMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PromptMutation) ResetEdge

func (m *PromptMutation) 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 (*PromptMutation) ResetField

func (m *PromptMutation) 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 (*PromptMutation) ResetGenerations

func (m *PromptMutation) ResetGenerations()

ResetGenerations resets all changes to the "generations" edge.

func (*PromptMutation) ResetText

func (m *PromptMutation) ResetText()

ResetText resets all changes to the "text" field.

func (*PromptMutation) ResetType

func (m *PromptMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*PromptMutation) ResetUpdatedAt

func (m *PromptMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PromptMutation) ResetVoiceovers

func (m *PromptMutation) ResetVoiceovers()

ResetVoiceovers resets all changes to the "voiceovers" edge.

func (*PromptMutation) SetCreatedAt

func (m *PromptMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PromptMutation) SetField

func (m *PromptMutation) 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 (*PromptMutation) SetID

func (m *PromptMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Prompt entities.

func (*PromptMutation) SetOp

func (m *PromptMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PromptMutation) SetText

func (m *PromptMutation) SetText(s string)

SetText sets the "text" field.

func (*PromptMutation) SetType

func (m *PromptMutation) SetType(pr prompt.Type)

SetType sets the "type" field.

func (*PromptMutation) SetUpdatedAt

func (m *PromptMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*PromptMutation) Text

func (m *PromptMutation) Text() (r string, exists bool)

Text returns the value of the "text" field in the mutation.

func (PromptMutation) Tx

func (m PromptMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PromptMutation) Type

func (m *PromptMutation) Type() string

Type returns the node type of this mutation (Prompt).

func (*PromptMutation) UpdatedAt

func (m *PromptMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PromptMutation) VoiceoversCleared

func (m *PromptMutation) VoiceoversCleared() bool

VoiceoversCleared reports if the "voiceovers" edge to the Voiceover entity was cleared.

func (*PromptMutation) VoiceoversIDs

func (m *PromptMutation) VoiceoversIDs() (ids []uuid.UUID)

VoiceoversIDs returns the "voiceovers" edge IDs in the mutation.

func (*PromptMutation) Where

func (m *PromptMutation) Where(ps ...predicate.Prompt)

Where appends a list predicates to the PromptMutation builder.

func (*PromptMutation) WhereP

func (m *PromptMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PromptMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PromptQuery

type PromptQuery struct {
	// contains filtered or unexported fields
}

PromptQuery is the builder for querying Prompt entities.

func (*PromptQuery) Aggregate

func (pq *PromptQuery) Aggregate(fns ...AggregateFunc) *PromptSelect

Aggregate returns a PromptSelect configured with the given aggregations.

func (*PromptQuery) All

func (pq *PromptQuery) All(ctx context.Context) ([]*Prompt, error)

All executes the query and returns a list of Prompts.

func (*PromptQuery) AllX

func (pq *PromptQuery) AllX(ctx context.Context) []*Prompt

AllX is like All, but panics if an error occurs.

func (*PromptQuery) Clone

func (pq *PromptQuery) Clone() *PromptQuery

Clone returns a duplicate of the PromptQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PromptQuery) Count

func (pq *PromptQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PromptQuery) CountX

func (pq *PromptQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PromptQuery) ExecContext

func (c *PromptQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PromptQuery) Exist

func (pq *PromptQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PromptQuery) ExistX

func (pq *PromptQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PromptQuery) First

func (pq *PromptQuery) First(ctx context.Context) (*Prompt, error)

First returns the first Prompt entity from the query. Returns a *NotFoundError when no Prompt was found.

func (*PromptQuery) FirstID

func (pq *PromptQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Prompt ID from the query. Returns a *NotFoundError when no Prompt ID was found.

func (*PromptQuery) FirstIDX

func (pq *PromptQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PromptQuery) FirstX

func (pq *PromptQuery) FirstX(ctx context.Context) *Prompt

FirstX is like First, but panics if an error occurs.

func (*PromptQuery) GroupBy

func (pq *PromptQuery) GroupBy(field string, fields ...string) *PromptGroupBy

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 {
	Text string `json:"text,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Prompt.Query().
	GroupBy(prompt.FieldText).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PromptQuery) IDs

func (pq *PromptQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Prompt IDs.

func (*PromptQuery) IDsX

func (pq *PromptQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PromptQuery) Limit

func (pq *PromptQuery) Limit(limit int) *PromptQuery

Limit the number of records to be returned by this query.

func (*PromptQuery) Modify

func (pq *PromptQuery) Modify(modifiers ...func(s *sql.Selector)) *PromptSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*PromptQuery) Offset

func (pq *PromptQuery) Offset(offset int) *PromptQuery

Offset to start from.

func (*PromptQuery) Only

func (pq *PromptQuery) Only(ctx context.Context) (*Prompt, error)

Only returns a single Prompt entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Prompt entity is found. Returns a *NotFoundError when no Prompt entities are found.

func (*PromptQuery) OnlyID

func (pq *PromptQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Prompt ID in the query. Returns a *NotSingularError when more than one Prompt ID is found. Returns a *NotFoundError when no entities are found.

func (*PromptQuery) OnlyIDX

func (pq *PromptQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PromptQuery) OnlyX

func (pq *PromptQuery) OnlyX(ctx context.Context) *Prompt

OnlyX is like Only, but panics if an error occurs.

func (*PromptQuery) Order

func (pq *PromptQuery) Order(o ...OrderFunc) *PromptQuery

Order specifies how the records should be ordered.

func (*PromptQuery) QueryContext

func (c *PromptQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PromptQuery) QueryGenerations

func (pq *PromptQuery) QueryGenerations() *GenerationQuery

QueryGenerations chains the current query on the "generations" edge.

func (*PromptQuery) QueryVoiceovers

func (pq *PromptQuery) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers chains the current query on the "voiceovers" edge.

func (*PromptQuery) Select

func (pq *PromptQuery) Select(fields ...string) *PromptSelect

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 {
	Text string `json:"text,omitempty"`
}

client.Prompt.Query().
	Select(prompt.FieldText).
	Scan(ctx, &v)

func (*PromptQuery) Unique

func (pq *PromptQuery) Unique(unique bool) *PromptQuery

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 (*PromptQuery) Where

func (pq *PromptQuery) Where(ps ...predicate.Prompt) *PromptQuery

Where adds a new predicate for the PromptQuery builder.

func (*PromptQuery) WithGenerations

func (pq *PromptQuery) WithGenerations(opts ...func(*GenerationQuery)) *PromptQuery

WithGenerations tells the query-builder to eager-load the nodes that are connected to the "generations" edge. The optional arguments are used to configure the query builder of the edge.

func (*PromptQuery) WithVoiceovers

func (pq *PromptQuery) WithVoiceovers(opts ...func(*VoiceoverQuery)) *PromptQuery

WithVoiceovers tells the query-builder to eager-load the nodes that are connected to the "voiceovers" edge. The optional arguments are used to configure the query builder of the edge.

type PromptSelect

type PromptSelect struct {
	*PromptQuery
	// contains filtered or unexported fields
}

PromptSelect is the builder for selecting fields of Prompt entities.

func (*PromptSelect) Aggregate

func (ps *PromptSelect) Aggregate(fns ...AggregateFunc) *PromptSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PromptSelect) Bool

func (s *PromptSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PromptSelect) BoolX

func (s *PromptSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PromptSelect) Bools

func (s *PromptSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PromptSelect) BoolsX

func (s *PromptSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (PromptSelect) ExecContext

func (c PromptSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PromptSelect) Float64

func (s *PromptSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PromptSelect) Float64X

func (s *PromptSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PromptSelect) Float64s

func (s *PromptSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PromptSelect) Float64sX

func (s *PromptSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PromptSelect) Int

func (s *PromptSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PromptSelect) IntX

func (s *PromptSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PromptSelect) Ints

func (s *PromptSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PromptSelect) IntsX

func (s *PromptSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PromptSelect) Modify

func (ps *PromptSelect) Modify(modifiers ...func(s *sql.Selector)) *PromptSelect

Modify adds a query modifier for attaching custom logic to queries.

func (PromptSelect) QueryContext

func (c PromptSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PromptSelect) Scan

func (ps *PromptSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PromptSelect) ScanX

func (s *PromptSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PromptSelect) String

func (s *PromptSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PromptSelect) StringX

func (s *PromptSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PromptSelect) Strings

func (s *PromptSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PromptSelect) StringsX

func (s *PromptSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PromptUpdate

type PromptUpdate struct {
	// contains filtered or unexported fields
}

PromptUpdate is the builder for updating Prompt entities.

func (*PromptUpdate) AddGenerationIDs

func (pu *PromptUpdate) AddGenerationIDs(ids ...uuid.UUID) *PromptUpdate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*PromptUpdate) AddGenerations

func (pu *PromptUpdate) AddGenerations(g ...*Generation) *PromptUpdate

AddGenerations adds the "generations" edges to the Generation entity.

func (*PromptUpdate) AddVoiceoverIDs

func (pu *PromptUpdate) AddVoiceoverIDs(ids ...uuid.UUID) *PromptUpdate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*PromptUpdate) AddVoiceovers

func (pu *PromptUpdate) AddVoiceovers(v ...*Voiceover) *PromptUpdate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*PromptUpdate) ClearGenerations

func (pu *PromptUpdate) ClearGenerations() *PromptUpdate

ClearGenerations clears all "generations" edges to the Generation entity.

func (*PromptUpdate) ClearVoiceovers

func (pu *PromptUpdate) ClearVoiceovers() *PromptUpdate

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*PromptUpdate) Exec

func (pu *PromptUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PromptUpdate) ExecContext

func (c *PromptUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PromptUpdate) ExecX

func (pu *PromptUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PromptUpdate) Modify

func (pu *PromptUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PromptUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*PromptUpdate) Mutation

func (pu *PromptUpdate) Mutation() *PromptMutation

Mutation returns the PromptMutation object of the builder.

func (*PromptUpdate) QueryContext

func (c *PromptUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PromptUpdate) RemoveGenerationIDs

func (pu *PromptUpdate) RemoveGenerationIDs(ids ...uuid.UUID) *PromptUpdate

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*PromptUpdate) RemoveGenerations

func (pu *PromptUpdate) RemoveGenerations(g ...*Generation) *PromptUpdate

RemoveGenerations removes "generations" edges to Generation entities.

func (*PromptUpdate) RemoveVoiceoverIDs

func (pu *PromptUpdate) RemoveVoiceoverIDs(ids ...uuid.UUID) *PromptUpdate

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*PromptUpdate) RemoveVoiceovers

func (pu *PromptUpdate) RemoveVoiceovers(v ...*Voiceover) *PromptUpdate

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*PromptUpdate) Save

func (pu *PromptUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PromptUpdate) SaveX

func (pu *PromptUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PromptUpdate) SetText

func (pu *PromptUpdate) SetText(s string) *PromptUpdate

SetText sets the "text" field.

func (*PromptUpdate) SetType

func (pu *PromptUpdate) SetType(pr prompt.Type) *PromptUpdate

SetType sets the "type" field.

func (*PromptUpdate) SetUpdatedAt

func (pu *PromptUpdate) SetUpdatedAt(t time.Time) *PromptUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PromptUpdate) Where

func (pu *PromptUpdate) Where(ps ...predicate.Prompt) *PromptUpdate

Where appends a list predicates to the PromptUpdate builder.

type PromptUpdateOne

type PromptUpdateOne struct {
	// contains filtered or unexported fields
}

PromptUpdateOne is the builder for updating a single Prompt entity.

func (*PromptUpdateOne) AddGenerationIDs

func (puo *PromptUpdateOne) AddGenerationIDs(ids ...uuid.UUID) *PromptUpdateOne

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*PromptUpdateOne) AddGenerations

func (puo *PromptUpdateOne) AddGenerations(g ...*Generation) *PromptUpdateOne

AddGenerations adds the "generations" edges to the Generation entity.

func (*PromptUpdateOne) AddVoiceoverIDs

func (puo *PromptUpdateOne) AddVoiceoverIDs(ids ...uuid.UUID) *PromptUpdateOne

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*PromptUpdateOne) AddVoiceovers

func (puo *PromptUpdateOne) AddVoiceovers(v ...*Voiceover) *PromptUpdateOne

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*PromptUpdateOne) ClearGenerations

func (puo *PromptUpdateOne) ClearGenerations() *PromptUpdateOne

ClearGenerations clears all "generations" edges to the Generation entity.

func (*PromptUpdateOne) ClearVoiceovers

func (puo *PromptUpdateOne) ClearVoiceovers() *PromptUpdateOne

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*PromptUpdateOne) Exec

func (puo *PromptUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PromptUpdateOne) ExecContext

func (c *PromptUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*PromptUpdateOne) ExecX

func (puo *PromptUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PromptUpdateOne) Modify

func (puo *PromptUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PromptUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*PromptUpdateOne) Mutation

func (puo *PromptUpdateOne) Mutation() *PromptMutation

Mutation returns the PromptMutation object of the builder.

func (*PromptUpdateOne) QueryContext

func (c *PromptUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*PromptUpdateOne) RemoveGenerationIDs

func (puo *PromptUpdateOne) RemoveGenerationIDs(ids ...uuid.UUID) *PromptUpdateOne

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*PromptUpdateOne) RemoveGenerations

func (puo *PromptUpdateOne) RemoveGenerations(g ...*Generation) *PromptUpdateOne

RemoveGenerations removes "generations" edges to Generation entities.

func (*PromptUpdateOne) RemoveVoiceoverIDs

func (puo *PromptUpdateOne) RemoveVoiceoverIDs(ids ...uuid.UUID) *PromptUpdateOne

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*PromptUpdateOne) RemoveVoiceovers

func (puo *PromptUpdateOne) RemoveVoiceovers(v ...*Voiceover) *PromptUpdateOne

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*PromptUpdateOne) Save

func (puo *PromptUpdateOne) Save(ctx context.Context) (*Prompt, error)

Save executes the query and returns the updated Prompt entity.

func (*PromptUpdateOne) SaveX

func (puo *PromptUpdateOne) SaveX(ctx context.Context) *Prompt

SaveX is like Save, but panics if an error occurs.

func (*PromptUpdateOne) Select

func (puo *PromptUpdateOne) Select(field string, fields ...string) *PromptUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PromptUpdateOne) SetText

func (puo *PromptUpdateOne) SetText(s string) *PromptUpdateOne

SetText sets the "text" field.

func (*PromptUpdateOne) SetType

func (puo *PromptUpdateOne) SetType(pr prompt.Type) *PromptUpdateOne

SetType sets the "type" field.

func (*PromptUpdateOne) SetUpdatedAt

func (puo *PromptUpdateOne) SetUpdatedAt(t time.Time) *PromptUpdateOne

SetUpdatedAt sets the "updated_at" field.

type PromptUpsert

type PromptUpsert struct {
	*sql.UpdateSet
}

PromptUpsert is the "OnConflict" setter.

func (*PromptUpsert) SetText

func (u *PromptUpsert) SetText(v string) *PromptUpsert

SetText sets the "text" field.

func (*PromptUpsert) SetType

func (u *PromptUpsert) SetType(v prompt.Type) *PromptUpsert

SetType sets the "type" field.

func (*PromptUpsert) SetUpdatedAt

func (u *PromptUpsert) SetUpdatedAt(v time.Time) *PromptUpsert

SetUpdatedAt sets the "updated_at" field.

func (*PromptUpsert) UpdateText

func (u *PromptUpsert) UpdateText() *PromptUpsert

UpdateText sets the "text" field to the value that was provided on create.

func (*PromptUpsert) UpdateType

func (u *PromptUpsert) UpdateType() *PromptUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*PromptUpsert) UpdateUpdatedAt

func (u *PromptUpsert) UpdateUpdatedAt() *PromptUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PromptUpsertBulk

type PromptUpsertBulk struct {
	// contains filtered or unexported fields
}

PromptUpsertBulk is the builder for "upsert"-ing a bulk of Prompt nodes.

func (*PromptUpsertBulk) DoNothing

func (u *PromptUpsertBulk) DoNothing() *PromptUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PromptUpsertBulk) Exec

func (u *PromptUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PromptUpsertBulk) ExecX

func (u *PromptUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PromptUpsertBulk) Ignore

func (u *PromptUpsertBulk) Ignore() *PromptUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Prompt.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PromptUpsertBulk) SetText

func (u *PromptUpsertBulk) SetText(v string) *PromptUpsertBulk

SetText sets the "text" field.

func (*PromptUpsertBulk) SetType

SetType sets the "type" field.

func (*PromptUpsertBulk) SetUpdatedAt

func (u *PromptUpsertBulk) SetUpdatedAt(v time.Time) *PromptUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*PromptUpsertBulk) Update

func (u *PromptUpsertBulk) Update(set func(*PromptUpsert)) *PromptUpsertBulk

Update allows overriding fields `UPDATE` values. See the PromptCreateBulk.OnConflict documentation for more info.

func (*PromptUpsertBulk) UpdateNewValues

func (u *PromptUpsertBulk) UpdateNewValues() *PromptUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Prompt.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(prompt.FieldID)
		}),
	).
	Exec(ctx)

func (*PromptUpsertBulk) UpdateText

func (u *PromptUpsertBulk) UpdateText() *PromptUpsertBulk

UpdateText sets the "text" field to the value that was provided on create.

func (*PromptUpsertBulk) UpdateType

func (u *PromptUpsertBulk) UpdateType() *PromptUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

func (*PromptUpsertBulk) UpdateUpdatedAt

func (u *PromptUpsertBulk) UpdateUpdatedAt() *PromptUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PromptUpsertOne

type PromptUpsertOne struct {
	// contains filtered or unexported fields
}

PromptUpsertOne is the builder for "upsert"-ing

one Prompt node.

func (*PromptUpsertOne) DoNothing

func (u *PromptUpsertOne) DoNothing() *PromptUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PromptUpsertOne) Exec

func (u *PromptUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*PromptUpsertOne) ExecX

func (u *PromptUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PromptUpsertOne) ID

func (u *PromptUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PromptUpsertOne) IDX

func (u *PromptUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*PromptUpsertOne) Ignore

func (u *PromptUpsertOne) Ignore() *PromptUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Prompt.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PromptUpsertOne) SetText

func (u *PromptUpsertOne) SetText(v string) *PromptUpsertOne

SetText sets the "text" field.

func (*PromptUpsertOne) SetType

func (u *PromptUpsertOne) SetType(v prompt.Type) *PromptUpsertOne

SetType sets the "type" field.

func (*PromptUpsertOne) SetUpdatedAt

func (u *PromptUpsertOne) SetUpdatedAt(v time.Time) *PromptUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*PromptUpsertOne) Update

func (u *PromptUpsertOne) Update(set func(*PromptUpsert)) *PromptUpsertOne

Update allows overriding fields `UPDATE` values. See the PromptCreate.OnConflict documentation for more info.

func (*PromptUpsertOne) UpdateNewValues

func (u *PromptUpsertOne) UpdateNewValues() *PromptUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Prompt.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(prompt.FieldID)
		}),
	).
	Exec(ctx)

func (*PromptUpsertOne) UpdateText

func (u *PromptUpsertOne) UpdateText() *PromptUpsertOne

UpdateText sets the "text" field to the value that was provided on create.

func (*PromptUpsertOne) UpdateType

func (u *PromptUpsertOne) UpdateType() *PromptUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

func (*PromptUpsertOne) UpdateUpdatedAt

func (u *PromptUpsertOne) UpdateUpdatedAt() *PromptUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Prompts

type Prompts []*Prompt

Prompts is a parsable slice of Prompt.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type Role

type Role struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RoleQuery when eager-loading is set.
	Edges RoleEdges `json:"edges"`
	// contains filtered or unexported fields
}

Role is the model entity for the Role schema.

func (*Role) ExecContext

func (c *Role) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Role) QueryContext

func (c *Role) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Role) QueryUsers

func (r *Role) QueryUsers() *UserQuery

QueryUsers queries the "users" edge of the Role entity.

func (*Role) String

func (r *Role) String() string

String implements the fmt.Stringer.

func (*Role) Unwrap

func (r *Role) Unwrap() *Role

Unwrap unwraps the Role 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 (*Role) Update

func (r *Role) Update() *RoleUpdateOne

Update returns a builder for updating this Role. Note that you need to call Role.Unwrap() before calling this method if this Role was returned from a transaction, and the transaction was committed or rolled back.

type RoleClient

type RoleClient struct {
	// contains filtered or unexported fields
}

RoleClient is a client for the Role schema.

func NewRoleClient

func NewRoleClient(c config) *RoleClient

NewRoleClient returns a client for the Role from the given config.

func (*RoleClient) Create

func (c *RoleClient) Create() *RoleCreate

Create returns a builder for creating a Role entity.

func (*RoleClient) CreateBulk

func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk

CreateBulk returns a builder for creating a bulk of Role entities.

func (*RoleClient) Delete

func (c *RoleClient) Delete() *RoleDelete

Delete returns a delete builder for Role.

func (*RoleClient) DeleteOne

func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RoleClient) DeleteOneID

func (c *RoleClient) DeleteOneID(id uuid.UUID) *RoleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RoleClient) ExecContext

func (c *RoleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleClient) Get

func (c *RoleClient) Get(ctx context.Context, id uuid.UUID) (*Role, error)

Get returns a Role entity by its id.

func (*RoleClient) GetX

func (c *RoleClient) GetX(ctx context.Context, id uuid.UUID) *Role

GetX is like Get, but panics if an error occurs.

func (*RoleClient) Hooks

func (c *RoleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RoleClient) Intercept

func (c *RoleClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `role.Intercept(f(g(h())))`.

func (*RoleClient) Interceptors

func (c *RoleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RoleClient) Query

func (c *RoleClient) Query() *RoleQuery

Query returns a query builder for Role.

func (*RoleClient) QueryContext

func (c *RoleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleClient) QueryUsers

func (c *RoleClient) QueryUsers(r *Role) *UserQuery

QueryUsers queries the users edge of a Role.

func (*RoleClient) Update

func (c *RoleClient) Update() *RoleUpdate

Update returns an update builder for Role.

func (*RoleClient) UpdateOne

func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RoleClient) UpdateOneID

func (c *RoleClient) UpdateOneID(id uuid.UUID) *RoleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RoleClient) Use

func (c *RoleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `role.Hooks(f(g(h())))`.

type RoleCreate

type RoleCreate struct {
	// contains filtered or unexported fields
}

RoleCreate is the builder for creating a Role entity.

func (*RoleCreate) AddUserIDs

func (rc *RoleCreate) AddUserIDs(ids ...uuid.UUID) *RoleCreate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*RoleCreate) AddUsers

func (rc *RoleCreate) AddUsers(u ...*User) *RoleCreate

AddUsers adds the "users" edges to the User entity.

func (*RoleCreate) Exec

func (rc *RoleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RoleCreate) ExecContext

func (c *RoleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleCreate) ExecX

func (rc *RoleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleCreate) Mutation

func (rc *RoleCreate) Mutation() *RoleMutation

Mutation returns the RoleMutation object of the builder.

func (*RoleCreate) OnConflict

func (rc *RoleCreate) OnConflict(opts ...sql.ConflictOption) *RoleUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Role.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RoleUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*RoleCreate) OnConflictColumns

func (rc *RoleCreate) OnConflictColumns(columns ...string) *RoleUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Role.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RoleCreate) QueryContext

func (c *RoleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleCreate) Save

func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)

Save creates the Role in the database.

func (*RoleCreate) SaveX

func (rc *RoleCreate) SaveX(ctx context.Context) *Role

SaveX calls Save and panics if Save returns an error.

func (*RoleCreate) SetCreatedAt

func (rc *RoleCreate) SetCreatedAt(t time.Time) *RoleCreate

SetCreatedAt sets the "created_at" field.

func (*RoleCreate) SetID

func (rc *RoleCreate) SetID(u uuid.UUID) *RoleCreate

SetID sets the "id" field.

func (*RoleCreate) SetName

func (rc *RoleCreate) SetName(s string) *RoleCreate

SetName sets the "name" field.

func (*RoleCreate) SetNillableCreatedAt

func (rc *RoleCreate) SetNillableCreatedAt(t *time.Time) *RoleCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RoleCreate) SetNillableID

func (rc *RoleCreate) SetNillableID(u *uuid.UUID) *RoleCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*RoleCreate) SetNillableUpdatedAt

func (rc *RoleCreate) SetNillableUpdatedAt(t *time.Time) *RoleCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RoleCreate) SetUpdatedAt

func (rc *RoleCreate) SetUpdatedAt(t time.Time) *RoleCreate

SetUpdatedAt sets the "updated_at" field.

type RoleCreateBulk

type RoleCreateBulk struct {
	// contains filtered or unexported fields
}

RoleCreateBulk is the builder for creating many Role entities in bulk.

func (*RoleCreateBulk) Exec

func (rcb *RoleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RoleCreateBulk) ExecContext

func (c *RoleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleCreateBulk) ExecX

func (rcb *RoleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleCreateBulk) OnConflict

func (rcb *RoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *RoleUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Role.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RoleUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*RoleCreateBulk) OnConflictColumns

func (rcb *RoleCreateBulk) OnConflictColumns(columns ...string) *RoleUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Role.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*RoleCreateBulk) QueryContext

func (c *RoleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleCreateBulk) Save

func (rcb *RoleCreateBulk) Save(ctx context.Context) ([]*Role, error)

Save creates the Role entities in the database.

func (*RoleCreateBulk) SaveX

func (rcb *RoleCreateBulk) SaveX(ctx context.Context) []*Role

SaveX is like Save, but panics if an error occurs.

type RoleDelete

type RoleDelete struct {
	// contains filtered or unexported fields
}

RoleDelete is the builder for deleting a Role entity.

func (*RoleDelete) Exec

func (rd *RoleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RoleDelete) ExecContext

func (c *RoleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleDelete) ExecX

func (rd *RoleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RoleDelete) QueryContext

func (c *RoleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleDelete) Where

func (rd *RoleDelete) Where(ps ...predicate.Role) *RoleDelete

Where appends a list predicates to the RoleDelete builder.

type RoleDeleteOne

type RoleDeleteOne struct {
	// contains filtered or unexported fields
}

RoleDeleteOne is the builder for deleting a single Role entity.

func (*RoleDeleteOne) Exec

func (rdo *RoleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RoleDeleteOne) ExecX

func (rdo *RoleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type RoleEdges

type RoleEdges struct {
	// Users holds the value of the users edge.
	Users []*User `json:"users,omitempty"`
	// contains filtered or unexported fields
}

RoleEdges holds the relations/edges for other nodes in the graph.

func (RoleEdges) UsersOrErr

func (e RoleEdges) UsersOrErr() ([]*User, error)

UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.

type RoleGroupBy

type RoleGroupBy struct {
	// contains filtered or unexported fields
}

RoleGroupBy is the group-by builder for Role entities.

func (*RoleGroupBy) Aggregate

func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RoleGroupBy) Bool

func (s *RoleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) BoolX

func (s *RoleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RoleGroupBy) Bools

func (s *RoleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) BoolsX

func (s *RoleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RoleGroupBy) Float64

func (s *RoleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) Float64X

func (s *RoleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RoleGroupBy) Float64s

func (s *RoleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) Float64sX

func (s *RoleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RoleGroupBy) Int

func (s *RoleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) IntX

func (s *RoleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RoleGroupBy) Ints

func (s *RoleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) IntsX

func (s *RoleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RoleGroupBy) Scan

func (rgb *RoleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RoleGroupBy) ScanX

func (s *RoleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RoleGroupBy) String

func (s *RoleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) StringX

func (s *RoleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RoleGroupBy) Strings

func (s *RoleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RoleGroupBy) StringsX

func (s *RoleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RoleMutation

type RoleMutation struct {
	// contains filtered or unexported fields
}

RoleMutation represents an operation that mutates the Role nodes in the graph.

func (*RoleMutation) AddField

func (m *RoleMutation) 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 (*RoleMutation) AddUserIDs

func (m *RoleMutation) AddUserIDs(ids ...uuid.UUID)

AddUserIDs adds the "users" edge to the User entity by ids.

func (*RoleMutation) AddedEdges

func (m *RoleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RoleMutation) AddedField

func (m *RoleMutation) 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 (*RoleMutation) AddedFields

func (m *RoleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RoleMutation) AddedIDs

func (m *RoleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RoleMutation) ClearEdge

func (m *RoleMutation) 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 (*RoleMutation) ClearField

func (m *RoleMutation) 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 (*RoleMutation) ClearUsers

func (m *RoleMutation) ClearUsers()

ClearUsers clears the "users" edge to the User entity.

func (*RoleMutation) ClearedEdges

func (m *RoleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RoleMutation) ClearedFields

func (m *RoleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RoleMutation) Client

func (m RoleMutation) 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 (*RoleMutation) CreatedAt

func (m *RoleMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*RoleMutation) EdgeCleared

func (m *RoleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RoleMutation) ExecContext

func (c *RoleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleMutation) Field

func (m *RoleMutation) 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 (*RoleMutation) FieldCleared

func (m *RoleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RoleMutation) Fields

func (m *RoleMutation) 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 (*RoleMutation) ID

func (m *RoleMutation) 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 (*RoleMutation) IDs

func (m *RoleMutation) 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 (*RoleMutation) Name

func (m *RoleMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RoleMutation) OldCreatedAt

func (m *RoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Role entity. If the Role 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 (*RoleMutation) OldField

func (m *RoleMutation) 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 (*RoleMutation) OldName

func (m *RoleMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Role entity. If the Role 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 (*RoleMutation) OldUpdatedAt

func (m *RoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Role entity. If the Role 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 (*RoleMutation) Op

func (m *RoleMutation) Op() Op

Op returns the operation name.

func (*RoleMutation) QueryContext

func (c *RoleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleMutation) RemoveUserIDs

func (m *RoleMutation) RemoveUserIDs(ids ...uuid.UUID)

RemoveUserIDs removes the "users" edge to the User entity by IDs.

func (*RoleMutation) RemovedEdges

func (m *RoleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RoleMutation) RemovedIDs

func (m *RoleMutation) 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 (*RoleMutation) RemovedUsersIDs

func (m *RoleMutation) RemovedUsersIDs() (ids []uuid.UUID)

RemovedUsers returns the removed IDs of the "users" edge to the User entity.

func (*RoleMutation) ResetCreatedAt

func (m *RoleMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RoleMutation) ResetEdge

func (m *RoleMutation) 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 (*RoleMutation) ResetField

func (m *RoleMutation) 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 (*RoleMutation) ResetName

func (m *RoleMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RoleMutation) ResetUpdatedAt

func (m *RoleMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*RoleMutation) ResetUsers

func (m *RoleMutation) ResetUsers()

ResetUsers resets all changes to the "users" edge.

func (*RoleMutation) SetCreatedAt

func (m *RoleMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RoleMutation) SetField

func (m *RoleMutation) 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 (*RoleMutation) SetID

func (m *RoleMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Role entities.

func (*RoleMutation) SetName

func (m *RoleMutation) SetName(s string)

SetName sets the "name" field.

func (*RoleMutation) SetOp

func (m *RoleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RoleMutation) SetUpdatedAt

func (m *RoleMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (RoleMutation) Tx

func (m RoleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RoleMutation) Type

func (m *RoleMutation) Type() string

Type returns the node type of this mutation (Role).

func (*RoleMutation) UpdatedAt

func (m *RoleMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*RoleMutation) UsersCleared

func (m *RoleMutation) UsersCleared() bool

UsersCleared reports if the "users" edge to the User entity was cleared.

func (*RoleMutation) UsersIDs

func (m *RoleMutation) UsersIDs() (ids []uuid.UUID)

UsersIDs returns the "users" edge IDs in the mutation.

func (*RoleMutation) Where

func (m *RoleMutation) Where(ps ...predicate.Role)

Where appends a list predicates to the RoleMutation builder.

func (*RoleMutation) WhereP

func (m *RoleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RoleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RoleQuery

type RoleQuery struct {
	// contains filtered or unexported fields
}

RoleQuery is the builder for querying Role entities.

func (*RoleQuery) Aggregate

func (rq *RoleQuery) Aggregate(fns ...AggregateFunc) *RoleSelect

Aggregate returns a RoleSelect configured with the given aggregations.

func (*RoleQuery) All

func (rq *RoleQuery) All(ctx context.Context) ([]*Role, error)

All executes the query and returns a list of Roles.

func (*RoleQuery) AllX

func (rq *RoleQuery) AllX(ctx context.Context) []*Role

AllX is like All, but panics if an error occurs.

func (*RoleQuery) Clone

func (rq *RoleQuery) Clone() *RoleQuery

Clone returns a duplicate of the RoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RoleQuery) Count

func (rq *RoleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RoleQuery) CountX

func (rq *RoleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RoleQuery) ExecContext

func (c *RoleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleQuery) Exist

func (rq *RoleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RoleQuery) ExistX

func (rq *RoleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RoleQuery) First

func (rq *RoleQuery) First(ctx context.Context) (*Role, error)

First returns the first Role entity from the query. Returns a *NotFoundError when no Role was found.

func (*RoleQuery) FirstID

func (rq *RoleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Role ID from the query. Returns a *NotFoundError when no Role ID was found.

func (*RoleQuery) FirstIDX

func (rq *RoleQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*RoleQuery) FirstX

func (rq *RoleQuery) FirstX(ctx context.Context) *Role

FirstX is like First, but panics if an error occurs.

func (*RoleQuery) GroupBy

func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Role.Query().
	GroupBy(role.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RoleQuery) IDs

func (rq *RoleQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Role IDs.

func (*RoleQuery) IDsX

func (rq *RoleQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*RoleQuery) Limit

func (rq *RoleQuery) Limit(limit int) *RoleQuery

Limit the number of records to be returned by this query.

func (*RoleQuery) Modify

func (rq *RoleQuery) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*RoleQuery) Offset

func (rq *RoleQuery) Offset(offset int) *RoleQuery

Offset to start from.

func (*RoleQuery) Only

func (rq *RoleQuery) Only(ctx context.Context) (*Role, error)

Only returns a single Role entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Role entity is found. Returns a *NotFoundError when no Role entities are found.

func (*RoleQuery) OnlyID

func (rq *RoleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Role ID in the query. Returns a *NotSingularError when more than one Role ID is found. Returns a *NotFoundError when no entities are found.

func (*RoleQuery) OnlyIDX

func (rq *RoleQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RoleQuery) OnlyX

func (rq *RoleQuery) OnlyX(ctx context.Context) *Role

OnlyX is like Only, but panics if an error occurs.

func (*RoleQuery) Order

func (rq *RoleQuery) Order(o ...OrderFunc) *RoleQuery

Order specifies how the records should be ordered.

func (*RoleQuery) QueryContext

func (c *RoleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleQuery) QueryUsers

func (rq *RoleQuery) QueryUsers() *UserQuery

QueryUsers chains the current query on the "users" edge.

func (*RoleQuery) Select

func (rq *RoleQuery) Select(fields ...string) *RoleSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Name string `json:"name,omitempty"`
}

client.Role.Query().
	Select(role.FieldName).
	Scan(ctx, &v)

func (*RoleQuery) Unique

func (rq *RoleQuery) Unique(unique bool) *RoleQuery

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 (*RoleQuery) Where

func (rq *RoleQuery) Where(ps ...predicate.Role) *RoleQuery

Where adds a new predicate for the RoleQuery builder.

func (*RoleQuery) WithUsers

func (rq *RoleQuery) WithUsers(opts ...func(*UserQuery)) *RoleQuery

WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.

type RoleSelect

type RoleSelect struct {
	*RoleQuery
	// contains filtered or unexported fields
}

RoleSelect is the builder for selecting fields of Role entities.

func (*RoleSelect) Aggregate

func (rs *RoleSelect) Aggregate(fns ...AggregateFunc) *RoleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RoleSelect) Bool

func (s *RoleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RoleSelect) BoolX

func (s *RoleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RoleSelect) Bools

func (s *RoleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RoleSelect) BoolsX

func (s *RoleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (RoleSelect) ExecContext

func (c RoleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleSelect) Float64

func (s *RoleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RoleSelect) Float64X

func (s *RoleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RoleSelect) Float64s

func (s *RoleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RoleSelect) Float64sX

func (s *RoleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RoleSelect) Int

func (s *RoleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RoleSelect) IntX

func (s *RoleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RoleSelect) Ints

func (s *RoleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RoleSelect) IntsX

func (s *RoleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RoleSelect) Modify

func (rs *RoleSelect) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect

Modify adds a query modifier for attaching custom logic to queries.

func (RoleSelect) QueryContext

func (c RoleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleSelect) Scan

func (rs *RoleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RoleSelect) ScanX

func (s *RoleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RoleSelect) String

func (s *RoleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RoleSelect) StringX

func (s *RoleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RoleSelect) Strings

func (s *RoleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RoleSelect) StringsX

func (s *RoleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RoleUpdate

type RoleUpdate struct {
	// contains filtered or unexported fields
}

RoleUpdate is the builder for updating Role entities.

func (*RoleUpdate) AddUserIDs

func (ru *RoleUpdate) AddUserIDs(ids ...uuid.UUID) *RoleUpdate

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*RoleUpdate) AddUsers

func (ru *RoleUpdate) AddUsers(u ...*User) *RoleUpdate

AddUsers adds the "users" edges to the User entity.

func (*RoleUpdate) ClearUsers

func (ru *RoleUpdate) ClearUsers() *RoleUpdate

ClearUsers clears all "users" edges to the User entity.

func (*RoleUpdate) Exec

func (ru *RoleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RoleUpdate) ExecContext

func (c *RoleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleUpdate) ExecX

func (ru *RoleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleUpdate) Modify

func (ru *RoleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*RoleUpdate) Mutation

func (ru *RoleUpdate) Mutation() *RoleMutation

Mutation returns the RoleMutation object of the builder.

func (*RoleUpdate) QueryContext

func (c *RoleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleUpdate) RemoveUserIDs

func (ru *RoleUpdate) RemoveUserIDs(ids ...uuid.UUID) *RoleUpdate

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*RoleUpdate) RemoveUsers

func (ru *RoleUpdate) RemoveUsers(u ...*User) *RoleUpdate

RemoveUsers removes "users" edges to User entities.

func (*RoleUpdate) Save

func (ru *RoleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RoleUpdate) SaveX

func (ru *RoleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RoleUpdate) SetName

func (ru *RoleUpdate) SetName(s string) *RoleUpdate

SetName sets the "name" field.

func (*RoleUpdate) SetUpdatedAt

func (ru *RoleUpdate) SetUpdatedAt(t time.Time) *RoleUpdate

SetUpdatedAt sets the "updated_at" field.

func (*RoleUpdate) Where

func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate

Where appends a list predicates to the RoleUpdate builder.

type RoleUpdateOne

type RoleUpdateOne struct {
	// contains filtered or unexported fields
}

RoleUpdateOne is the builder for updating a single Role entity.

func (*RoleUpdateOne) AddUserIDs

func (ruo *RoleUpdateOne) AddUserIDs(ids ...uuid.UUID) *RoleUpdateOne

AddUserIDs adds the "users" edge to the User entity by IDs.

func (*RoleUpdateOne) AddUsers

func (ruo *RoleUpdateOne) AddUsers(u ...*User) *RoleUpdateOne

AddUsers adds the "users" edges to the User entity.

func (*RoleUpdateOne) ClearUsers

func (ruo *RoleUpdateOne) ClearUsers() *RoleUpdateOne

ClearUsers clears all "users" edges to the User entity.

func (*RoleUpdateOne) Exec

func (ruo *RoleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RoleUpdateOne) ExecContext

func (c *RoleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RoleUpdateOne) ExecX

func (ruo *RoleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleUpdateOne) Modify

func (ruo *RoleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*RoleUpdateOne) Mutation

func (ruo *RoleUpdateOne) Mutation() *RoleMutation

Mutation returns the RoleMutation object of the builder.

func (*RoleUpdateOne) QueryContext

func (c *RoleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RoleUpdateOne) RemoveUserIDs

func (ruo *RoleUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *RoleUpdateOne

RemoveUserIDs removes the "users" edge to User entities by IDs.

func (*RoleUpdateOne) RemoveUsers

func (ruo *RoleUpdateOne) RemoveUsers(u ...*User) *RoleUpdateOne

RemoveUsers removes "users" edges to User entities.

func (*RoleUpdateOne) Save

func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)

Save executes the query and returns the updated Role entity.

func (*RoleUpdateOne) SaveX

func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role

SaveX is like Save, but panics if an error occurs.

func (*RoleUpdateOne) Select

func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RoleUpdateOne) SetName

func (ruo *RoleUpdateOne) SetName(s string) *RoleUpdateOne

SetName sets the "name" field.

func (*RoleUpdateOne) SetUpdatedAt

func (ruo *RoleUpdateOne) SetUpdatedAt(t time.Time) *RoleUpdateOne

SetUpdatedAt sets the "updated_at" field.

type RoleUpsert

type RoleUpsert struct {
	*sql.UpdateSet
}

RoleUpsert is the "OnConflict" setter.

func (*RoleUpsert) SetName

func (u *RoleUpsert) SetName(v string) *RoleUpsert

SetName sets the "name" field.

func (*RoleUpsert) SetUpdatedAt

func (u *RoleUpsert) SetUpdatedAt(v time.Time) *RoleUpsert

SetUpdatedAt sets the "updated_at" field.

func (*RoleUpsert) UpdateName

func (u *RoleUpsert) UpdateName() *RoleUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*RoleUpsert) UpdateUpdatedAt

func (u *RoleUpsert) UpdateUpdatedAt() *RoleUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type RoleUpsertBulk

type RoleUpsertBulk struct {
	// contains filtered or unexported fields
}

RoleUpsertBulk is the builder for "upsert"-ing a bulk of Role nodes.

func (*RoleUpsertBulk) DoNothing

func (u *RoleUpsertBulk) DoNothing() *RoleUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RoleUpsertBulk) Exec

func (u *RoleUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RoleUpsertBulk) ExecX

func (u *RoleUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleUpsertBulk) Ignore

func (u *RoleUpsertBulk) Ignore() *RoleUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Role.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*RoleUpsertBulk) SetName

func (u *RoleUpsertBulk) SetName(v string) *RoleUpsertBulk

SetName sets the "name" field.

func (*RoleUpsertBulk) SetUpdatedAt

func (u *RoleUpsertBulk) SetUpdatedAt(v time.Time) *RoleUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*RoleUpsertBulk) Update

func (u *RoleUpsertBulk) Update(set func(*RoleUpsert)) *RoleUpsertBulk

Update allows overriding fields `UPDATE` values. See the RoleCreateBulk.OnConflict documentation for more info.

func (*RoleUpsertBulk) UpdateName

func (u *RoleUpsertBulk) UpdateName() *RoleUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*RoleUpsertBulk) UpdateNewValues

func (u *RoleUpsertBulk) UpdateNewValues() *RoleUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Role.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(role.FieldID)
		}),
	).
	Exec(ctx)

func (*RoleUpsertBulk) UpdateUpdatedAt

func (u *RoleUpsertBulk) UpdateUpdatedAt() *RoleUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type RoleUpsertOne

type RoleUpsertOne struct {
	// contains filtered or unexported fields
}

RoleUpsertOne is the builder for "upsert"-ing

one Role node.

func (*RoleUpsertOne) DoNothing

func (u *RoleUpsertOne) DoNothing() *RoleUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RoleUpsertOne) Exec

func (u *RoleUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*RoleUpsertOne) ExecX

func (u *RoleUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RoleUpsertOne) ID

func (u *RoleUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*RoleUpsertOne) IDX

func (u *RoleUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*RoleUpsertOne) Ignore

func (u *RoleUpsertOne) Ignore() *RoleUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Role.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RoleUpsertOne) SetName

func (u *RoleUpsertOne) SetName(v string) *RoleUpsertOne

SetName sets the "name" field.

func (*RoleUpsertOne) SetUpdatedAt

func (u *RoleUpsertOne) SetUpdatedAt(v time.Time) *RoleUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*RoleUpsertOne) Update

func (u *RoleUpsertOne) Update(set func(*RoleUpsert)) *RoleUpsertOne

Update allows overriding fields `UPDATE` values. See the RoleCreate.OnConflict documentation for more info.

func (*RoleUpsertOne) UpdateName

func (u *RoleUpsertOne) UpdateName() *RoleUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*RoleUpsertOne) UpdateNewValues

func (u *RoleUpsertOne) UpdateNewValues() *RoleUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Role.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(role.FieldID)
		}),
	).
	Exec(ctx)

func (*RoleUpsertOne) UpdateUpdatedAt

func (u *RoleUpsertOne) UpdateUpdatedAt() *RoleUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Roles

type Roles []*Role

Roles is a parsable slice of Role.

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 Scheduler

type Scheduler struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// NameInWorker holds the value of the "name_in_worker" field.
	NameInWorker string `json:"name_in_worker,omitempty"`
	// IsActive holds the value of the "is_active" field.
	IsActive bool `json:"is_active,omitempty"`
	// IsDefault holds the value of the "is_default" field.
	IsDefault bool `json:"is_default,omitempty"`
	// IsHidden holds the value of the "is_hidden" field.
	IsHidden bool `json:"is_hidden,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SchedulerQuery when eager-loading is set.
	Edges SchedulerEdges `json:"edges"`
	// contains filtered or unexported fields
}

Scheduler is the model entity for the Scheduler schema.

func (*Scheduler) ExecContext

func (c *Scheduler) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Scheduler) QueryContext

func (c *Scheduler) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Scheduler) QueryGenerationModels

func (s *Scheduler) QueryGenerationModels() *GenerationModelQuery

QueryGenerationModels queries the "generation_models" edge of the Scheduler entity.

func (*Scheduler) QueryGenerations

func (s *Scheduler) QueryGenerations() *GenerationQuery

QueryGenerations queries the "generations" edge of the Scheduler entity.

func (*Scheduler) String

func (s *Scheduler) String() string

String implements the fmt.Stringer.

func (*Scheduler) Unwrap

func (s *Scheduler) Unwrap() *Scheduler

Unwrap unwraps the Scheduler 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 (*Scheduler) Update

func (s *Scheduler) Update() *SchedulerUpdateOne

Update returns a builder for updating this Scheduler. Note that you need to call Scheduler.Unwrap() before calling this method if this Scheduler was returned from a transaction, and the transaction was committed or rolled back.

type SchedulerClient

type SchedulerClient struct {
	// contains filtered or unexported fields
}

SchedulerClient is a client for the Scheduler schema.

func NewSchedulerClient

func NewSchedulerClient(c config) *SchedulerClient

NewSchedulerClient returns a client for the Scheduler from the given config.

func (*SchedulerClient) Create

func (c *SchedulerClient) Create() *SchedulerCreate

Create returns a builder for creating a Scheduler entity.

func (*SchedulerClient) CreateBulk

func (c *SchedulerClient) CreateBulk(builders ...*SchedulerCreate) *SchedulerCreateBulk

CreateBulk returns a builder for creating a bulk of Scheduler entities.

func (*SchedulerClient) Delete

func (c *SchedulerClient) Delete() *SchedulerDelete

Delete returns a delete builder for Scheduler.

func (*SchedulerClient) DeleteOne

func (c *SchedulerClient) DeleteOne(s *Scheduler) *SchedulerDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SchedulerClient) DeleteOneID

func (c *SchedulerClient) DeleteOneID(id uuid.UUID) *SchedulerDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SchedulerClient) ExecContext

func (c *SchedulerClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SchedulerClient) Get

func (c *SchedulerClient) Get(ctx context.Context, id uuid.UUID) (*Scheduler, error)

Get returns a Scheduler entity by its id.

func (*SchedulerClient) GetX

func (c *SchedulerClient) GetX(ctx context.Context, id uuid.UUID) *Scheduler

GetX is like Get, but panics if an error occurs.

func (*SchedulerClient) Hooks

func (c *SchedulerClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SchedulerClient) Intercept

func (c *SchedulerClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `scheduler.Intercept(f(g(h())))`.

func (*SchedulerClient) Interceptors

func (c *SchedulerClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SchedulerClient) Query

func (c *SchedulerClient) Query() *SchedulerQuery

Query returns a query builder for Scheduler.

func (*SchedulerClient) QueryContext

func (c *SchedulerClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SchedulerClient) QueryGenerationModels

func (c *SchedulerClient) QueryGenerationModels(s *Scheduler) *GenerationModelQuery

QueryGenerationModels queries the generation_models edge of a Scheduler.

func (*SchedulerClient) QueryGenerations

func (c *SchedulerClient) QueryGenerations(s *Scheduler) *GenerationQuery

QueryGenerations queries the generations edge of a Scheduler.

func (*SchedulerClient) Update

func (c *SchedulerClient) Update() *SchedulerUpdate

Update returns an update builder for Scheduler.

func (*SchedulerClient) UpdateOne

func (c *SchedulerClient) UpdateOne(s *Scheduler) *SchedulerUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SchedulerClient) UpdateOneID

func (c *SchedulerClient) UpdateOneID(id uuid.UUID) *SchedulerUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SchedulerClient) Use

func (c *SchedulerClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `scheduler.Hooks(f(g(h())))`.

type SchedulerCreate

type SchedulerCreate struct {
	// contains filtered or unexported fields
}

SchedulerCreate is the builder for creating a Scheduler entity.

func (*SchedulerCreate) AddGenerationIDs

func (sc *SchedulerCreate) AddGenerationIDs(ids ...uuid.UUID) *SchedulerCreate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*SchedulerCreate) AddGenerationModelIDs

func (sc *SchedulerCreate) AddGenerationModelIDs(ids ...uuid.UUID) *SchedulerCreate

AddGenerationModelIDs adds the "generation_models" edge to the GenerationModel entity by IDs.

func (*SchedulerCreate) AddGenerationModels

func (sc *SchedulerCreate) AddGenerationModels(g ...*GenerationModel) *SchedulerCreate

AddGenerationModels adds the "generation_models" edges to the GenerationModel entity.

func (*SchedulerCreate) AddGenerations

func (sc *SchedulerCreate) AddGenerations(g ...*Generation) *SchedulerCreate

AddGenerations adds the "generations" edges to the Generation entity.

func (*SchedulerCreate) Exec

func (sc *SchedulerCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SchedulerCreate) ExecContext

func (c *SchedulerCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SchedulerCreate) ExecX

func (sc *SchedulerCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchedulerCreate) Mutation

func (sc *SchedulerCreate) Mutation() *SchedulerMutation

Mutation returns the SchedulerMutation object of the builder.

func (*SchedulerCreate) OnConflict

func (sc *SchedulerCreate) OnConflict(opts ...sql.ConflictOption) *SchedulerUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Scheduler.Create().
	SetNameInWorker(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SchedulerUpsert) {
		SetNameInWorker(v+v).
	}).
	Exec(ctx)

func (*SchedulerCreate) OnConflictColumns

func (sc *SchedulerCreate) OnConflictColumns(columns ...string) *SchedulerUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Scheduler.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SchedulerCreate) QueryContext

func (c *SchedulerCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SchedulerCreate) Save

func (sc *SchedulerCreate) Save(ctx context.Context) (*Scheduler, error)

Save creates the Scheduler in the database.

func (*SchedulerCreate) SaveX

func (sc *SchedulerCreate) SaveX(ctx context.Context) *Scheduler

SaveX calls Save and panics if Save returns an error.

func (*SchedulerCreate) SetCreatedAt

func (sc *SchedulerCreate) SetCreatedAt(t time.Time) *SchedulerCreate

SetCreatedAt sets the "created_at" field.

func (*SchedulerCreate) SetID

func (sc *SchedulerCreate) SetID(u uuid.UUID) *SchedulerCreate

SetID sets the "id" field.

func (*SchedulerCreate) SetIsActive

func (sc *SchedulerCreate) SetIsActive(b bool) *SchedulerCreate

SetIsActive sets the "is_active" field.

func (*SchedulerCreate) SetIsDefault

func (sc *SchedulerCreate) SetIsDefault(b bool) *SchedulerCreate

SetIsDefault sets the "is_default" field.

func (*SchedulerCreate) SetIsHidden

func (sc *SchedulerCreate) SetIsHidden(b bool) *SchedulerCreate

SetIsHidden sets the "is_hidden" field.

func (*SchedulerCreate) SetNameInWorker

func (sc *SchedulerCreate) SetNameInWorker(s string) *SchedulerCreate

SetNameInWorker sets the "name_in_worker" field.

func (*SchedulerCreate) SetNillableCreatedAt

func (sc *SchedulerCreate) SetNillableCreatedAt(t *time.Time) *SchedulerCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SchedulerCreate) SetNillableID

func (sc *SchedulerCreate) SetNillableID(u *uuid.UUID) *SchedulerCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SchedulerCreate) SetNillableIsActive

func (sc *SchedulerCreate) SetNillableIsActive(b *bool) *SchedulerCreate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*SchedulerCreate) SetNillableIsDefault

func (sc *SchedulerCreate) SetNillableIsDefault(b *bool) *SchedulerCreate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*SchedulerCreate) SetNillableIsHidden

func (sc *SchedulerCreate) SetNillableIsHidden(b *bool) *SchedulerCreate

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*SchedulerCreate) SetNillableUpdatedAt

func (sc *SchedulerCreate) SetNillableUpdatedAt(t *time.Time) *SchedulerCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SchedulerCreate) SetUpdatedAt

func (sc *SchedulerCreate) SetUpdatedAt(t time.Time) *SchedulerCreate

SetUpdatedAt sets the "updated_at" field.

type SchedulerCreateBulk

type SchedulerCreateBulk struct {
	// contains filtered or unexported fields
}

SchedulerCreateBulk is the builder for creating many Scheduler entities in bulk.

func (*SchedulerCreateBulk) Exec

func (scb *SchedulerCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SchedulerCreateBulk) ExecContext

func (c *SchedulerCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SchedulerCreateBulk) ExecX

func (scb *SchedulerCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchedulerCreateBulk) OnConflict

func (scb *SchedulerCreateBulk) OnConflict(opts ...sql.ConflictOption) *SchedulerUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Scheduler.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SchedulerUpsert) {
		SetNameInWorker(v+v).
	}).
	Exec(ctx)

func (*SchedulerCreateBulk) OnConflictColumns

func (scb *SchedulerCreateBulk) OnConflictColumns(columns ...string) *SchedulerUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Scheduler.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SchedulerCreateBulk) QueryContext

func (c *SchedulerCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SchedulerCreateBulk) Save

func (scb *SchedulerCreateBulk) Save(ctx context.Context) ([]*Scheduler, error)

Save creates the Scheduler entities in the database.

func (*SchedulerCreateBulk) SaveX

func (scb *SchedulerCreateBulk) SaveX(ctx context.Context) []*Scheduler

SaveX is like Save, but panics if an error occurs.

type SchedulerDelete

type SchedulerDelete struct {
	// contains filtered or unexported fields
}

SchedulerDelete is the builder for deleting a Scheduler entity.

func (*SchedulerDelete) Exec

func (sd *SchedulerDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SchedulerDelete) ExecContext

func (c *SchedulerDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SchedulerDelete) ExecX

func (sd *SchedulerDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SchedulerDelete) QueryContext

func (c *SchedulerDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SchedulerDelete) Where

Where appends a list predicates to the SchedulerDelete builder.

type SchedulerDeleteOne

type SchedulerDeleteOne struct {
	// contains filtered or unexported fields
}

SchedulerDeleteOne is the builder for deleting a single Scheduler entity.

func (*SchedulerDeleteOne) Exec

func (sdo *SchedulerDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SchedulerDeleteOne) ExecX

func (sdo *SchedulerDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SchedulerEdges

type SchedulerEdges struct {
	// Generations holds the value of the generations edge.
	Generations []*Generation `json:"generations,omitempty"`
	// GenerationModels holds the value of the generation_models edge.
	GenerationModels []*GenerationModel `json:"generation_models,omitempty"`
	// contains filtered or unexported fields
}

SchedulerEdges holds the relations/edges for other nodes in the graph.

func (SchedulerEdges) GenerationModelsOrErr

func (e SchedulerEdges) GenerationModelsOrErr() ([]*GenerationModel, error)

GenerationModelsOrErr returns the GenerationModels value or an error if the edge was not loaded in eager-loading.

func (SchedulerEdges) GenerationsOrErr

func (e SchedulerEdges) GenerationsOrErr() ([]*Generation, error)

GenerationsOrErr returns the Generations value or an error if the edge was not loaded in eager-loading.

type SchedulerGroupBy

type SchedulerGroupBy struct {
	// contains filtered or unexported fields
}

SchedulerGroupBy is the group-by builder for Scheduler entities.

func (*SchedulerGroupBy) Aggregate

func (sgb *SchedulerGroupBy) Aggregate(fns ...AggregateFunc) *SchedulerGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SchedulerGroupBy) Bool

func (s *SchedulerGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SchedulerGroupBy) BoolX

func (s *SchedulerGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SchedulerGroupBy) Bools

func (s *SchedulerGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SchedulerGroupBy) BoolsX

func (s *SchedulerGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SchedulerGroupBy) Float64

func (s *SchedulerGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SchedulerGroupBy) Float64X

func (s *SchedulerGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SchedulerGroupBy) Float64s

func (s *SchedulerGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SchedulerGroupBy) Float64sX

func (s *SchedulerGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SchedulerGroupBy) Int

func (s *SchedulerGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SchedulerGroupBy) IntX

func (s *SchedulerGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SchedulerGroupBy) Ints

func (s *SchedulerGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SchedulerGroupBy) IntsX

func (s *SchedulerGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SchedulerGroupBy) Scan

func (sgb *SchedulerGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SchedulerGroupBy) ScanX

func (s *SchedulerGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SchedulerGroupBy) String

func (s *SchedulerGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SchedulerGroupBy) StringX

func (s *SchedulerGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SchedulerGroupBy) Strings

func (s *SchedulerGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SchedulerGroupBy) StringsX

func (s *SchedulerGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SchedulerMutation

type SchedulerMutation struct {
	// contains filtered or unexported fields
}

SchedulerMutation represents an operation that mutates the Scheduler nodes in the graph.

func (*SchedulerMutation) AddField

func (m *SchedulerMutation) 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 (*SchedulerMutation) AddGenerationIDs

func (m *SchedulerMutation) AddGenerationIDs(ids ...uuid.UUID)

AddGenerationIDs adds the "generations" edge to the Generation entity by ids.

func (*SchedulerMutation) AddGenerationModelIDs

func (m *SchedulerMutation) AddGenerationModelIDs(ids ...uuid.UUID)

AddGenerationModelIDs adds the "generation_models" edge to the GenerationModel entity by ids.

func (*SchedulerMutation) AddedEdges

func (m *SchedulerMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SchedulerMutation) AddedField

func (m *SchedulerMutation) 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 (*SchedulerMutation) AddedFields

func (m *SchedulerMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SchedulerMutation) AddedIDs

func (m *SchedulerMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SchedulerMutation) ClearEdge

func (m *SchedulerMutation) 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 (*SchedulerMutation) ClearField

func (m *SchedulerMutation) 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 (*SchedulerMutation) ClearGenerationModels

func (m *SchedulerMutation) ClearGenerationModels()

ClearGenerationModels clears the "generation_models" edge to the GenerationModel entity.

func (*SchedulerMutation) ClearGenerations

func (m *SchedulerMutation) ClearGenerations()

ClearGenerations clears the "generations" edge to the Generation entity.

func (*SchedulerMutation) ClearedEdges

func (m *SchedulerMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SchedulerMutation) ClearedFields

func (m *SchedulerMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SchedulerMutation) Client

func (m SchedulerMutation) 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 (*SchedulerMutation) CreatedAt

func (m *SchedulerMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SchedulerMutation) EdgeCleared

func (m *SchedulerMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SchedulerMutation) ExecContext

func (c *SchedulerMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SchedulerMutation) Field

func (m *SchedulerMutation) 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 (*SchedulerMutation) FieldCleared

func (m *SchedulerMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SchedulerMutation) Fields

func (m *SchedulerMutation) 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 (*SchedulerMutation) GenerationModelsCleared

func (m *SchedulerMutation) GenerationModelsCleared() bool

GenerationModelsCleared reports if the "generation_models" edge to the GenerationModel entity was cleared.

func (*SchedulerMutation) GenerationModelsIDs

func (m *SchedulerMutation) GenerationModelsIDs() (ids []uuid.UUID)

GenerationModelsIDs returns the "generation_models" edge IDs in the mutation.

func (*SchedulerMutation) GenerationsCleared

func (m *SchedulerMutation) GenerationsCleared() bool

GenerationsCleared reports if the "generations" edge to the Generation entity was cleared.

func (*SchedulerMutation) GenerationsIDs

func (m *SchedulerMutation) GenerationsIDs() (ids []uuid.UUID)

GenerationsIDs returns the "generations" edge IDs in the mutation.

func (*SchedulerMutation) ID

func (m *SchedulerMutation) 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 (*SchedulerMutation) IDs

func (m *SchedulerMutation) 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 (*SchedulerMutation) IsActive

func (m *SchedulerMutation) IsActive() (r bool, exists bool)

IsActive returns the value of the "is_active" field in the mutation.

func (*SchedulerMutation) IsDefault

func (m *SchedulerMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "is_default" field in the mutation.

func (*SchedulerMutation) IsHidden

func (m *SchedulerMutation) IsHidden() (r bool, exists bool)

IsHidden returns the value of the "is_hidden" field in the mutation.

func (*SchedulerMutation) NameInWorker

func (m *SchedulerMutation) NameInWorker() (r string, exists bool)

NameInWorker returns the value of the "name_in_worker" field in the mutation.

func (*SchedulerMutation) OldCreatedAt

func (m *SchedulerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Scheduler entity. If the Scheduler 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 (*SchedulerMutation) OldField

func (m *SchedulerMutation) 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 (*SchedulerMutation) OldIsActive

func (m *SchedulerMutation) OldIsActive(ctx context.Context) (v bool, err error)

OldIsActive returns the old "is_active" field's value of the Scheduler entity. If the Scheduler 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 (*SchedulerMutation) OldIsDefault

func (m *SchedulerMutation) OldIsDefault(ctx context.Context) (v bool, err error)

OldIsDefault returns the old "is_default" field's value of the Scheduler entity. If the Scheduler 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 (*SchedulerMutation) OldIsHidden

func (m *SchedulerMutation) OldIsHidden(ctx context.Context) (v bool, err error)

OldIsHidden returns the old "is_hidden" field's value of the Scheduler entity. If the Scheduler 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 (*SchedulerMutation) OldNameInWorker

func (m *SchedulerMutation) OldNameInWorker(ctx context.Context) (v string, err error)

OldNameInWorker returns the old "name_in_worker" field's value of the Scheduler entity. If the Scheduler 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 (*SchedulerMutation) OldUpdatedAt

func (m *SchedulerMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Scheduler entity. If the Scheduler 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 (*SchedulerMutation) Op

func (m *SchedulerMutation) Op() Op

Op returns the operation name.

func (*SchedulerMutation) QueryContext

func (c *SchedulerMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SchedulerMutation) RemoveGenerationIDs

func (m *SchedulerMutation) RemoveGenerationIDs(ids ...uuid.UUID)

RemoveGenerationIDs removes the "generations" edge to the Generation entity by IDs.

func (*SchedulerMutation) RemoveGenerationModelIDs

func (m *SchedulerMutation) RemoveGenerationModelIDs(ids ...uuid.UUID)

RemoveGenerationModelIDs removes the "generation_models" edge to the GenerationModel entity by IDs.

func (*SchedulerMutation) RemovedEdges

func (m *SchedulerMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SchedulerMutation) RemovedGenerationModelsIDs

func (m *SchedulerMutation) RemovedGenerationModelsIDs() (ids []uuid.UUID)

RemovedGenerationModels returns the removed IDs of the "generation_models" edge to the GenerationModel entity.

func (*SchedulerMutation) RemovedGenerationsIDs

func (m *SchedulerMutation) RemovedGenerationsIDs() (ids []uuid.UUID)

RemovedGenerations returns the removed IDs of the "generations" edge to the Generation entity.

func (*SchedulerMutation) RemovedIDs

func (m *SchedulerMutation) 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 (*SchedulerMutation) ResetCreatedAt

func (m *SchedulerMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SchedulerMutation) ResetEdge

func (m *SchedulerMutation) 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 (*SchedulerMutation) ResetField

func (m *SchedulerMutation) 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 (*SchedulerMutation) ResetGenerationModels

func (m *SchedulerMutation) ResetGenerationModels()

ResetGenerationModels resets all changes to the "generation_models" edge.

func (*SchedulerMutation) ResetGenerations

func (m *SchedulerMutation) ResetGenerations()

ResetGenerations resets all changes to the "generations" edge.

func (*SchedulerMutation) ResetIsActive

func (m *SchedulerMutation) ResetIsActive()

ResetIsActive resets all changes to the "is_active" field.

func (*SchedulerMutation) ResetIsDefault

func (m *SchedulerMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "is_default" field.

func (*SchedulerMutation) ResetIsHidden

func (m *SchedulerMutation) ResetIsHidden()

ResetIsHidden resets all changes to the "is_hidden" field.

func (*SchedulerMutation) ResetNameInWorker

func (m *SchedulerMutation) ResetNameInWorker()

ResetNameInWorker resets all changes to the "name_in_worker" field.

func (*SchedulerMutation) ResetUpdatedAt

func (m *SchedulerMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SchedulerMutation) SetCreatedAt

func (m *SchedulerMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SchedulerMutation) SetField

func (m *SchedulerMutation) 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 (*SchedulerMutation) SetID

func (m *SchedulerMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Scheduler entities.

func (*SchedulerMutation) SetIsActive

func (m *SchedulerMutation) SetIsActive(b bool)

SetIsActive sets the "is_active" field.

func (*SchedulerMutation) SetIsDefault

func (m *SchedulerMutation) SetIsDefault(b bool)

SetIsDefault sets the "is_default" field.

func (*SchedulerMutation) SetIsHidden

func (m *SchedulerMutation) SetIsHidden(b bool)

SetIsHidden sets the "is_hidden" field.

func (*SchedulerMutation) SetNameInWorker

func (m *SchedulerMutation) SetNameInWorker(s string)

SetNameInWorker sets the "name_in_worker" field.

func (*SchedulerMutation) SetOp

func (m *SchedulerMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SchedulerMutation) SetUpdatedAt

func (m *SchedulerMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (SchedulerMutation) Tx

func (m SchedulerMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SchedulerMutation) Type

func (m *SchedulerMutation) Type() string

Type returns the node type of this mutation (Scheduler).

func (*SchedulerMutation) UpdatedAt

func (m *SchedulerMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*SchedulerMutation) Where

func (m *SchedulerMutation) Where(ps ...predicate.Scheduler)

Where appends a list predicates to the SchedulerMutation builder.

func (*SchedulerMutation) WhereP

func (m *SchedulerMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SchedulerMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SchedulerQuery

type SchedulerQuery struct {
	// contains filtered or unexported fields
}

SchedulerQuery is the builder for querying Scheduler entities.

func (*SchedulerQuery) Aggregate

func (sq *SchedulerQuery) Aggregate(fns ...AggregateFunc) *SchedulerSelect

Aggregate returns a SchedulerSelect configured with the given aggregations.

func (*SchedulerQuery) All

func (sq *SchedulerQuery) All(ctx context.Context) ([]*Scheduler, error)

All executes the query and returns a list of Schedulers.

func (*SchedulerQuery) AllX

func (sq *SchedulerQuery) AllX(ctx context.Context) []*Scheduler

AllX is like All, but panics if an error occurs.

func (*SchedulerQuery) Clone

func (sq *SchedulerQuery) Clone() *SchedulerQuery

Clone returns a duplicate of the SchedulerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SchedulerQuery) Count

func (sq *SchedulerQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SchedulerQuery) CountX

func (sq *SchedulerQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SchedulerQuery) ExecContext

func (c *SchedulerQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SchedulerQuery) Exist

func (sq *SchedulerQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SchedulerQuery) ExistX

func (sq *SchedulerQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SchedulerQuery) First

func (sq *SchedulerQuery) First(ctx context.Context) (*Scheduler, error)

First returns the first Scheduler entity from the query. Returns a *NotFoundError when no Scheduler was found.

func (*SchedulerQuery) FirstID

func (sq *SchedulerQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Scheduler ID from the query. Returns a *NotFoundError when no Scheduler ID was found.

func (*SchedulerQuery) FirstIDX

func (sq *SchedulerQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*SchedulerQuery) FirstX

func (sq *SchedulerQuery) FirstX(ctx context.Context) *Scheduler

FirstX is like First, but panics if an error occurs.

func (*SchedulerQuery) GroupBy

func (sq *SchedulerQuery) GroupBy(field string, fields ...string) *SchedulerGroupBy

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 {
	NameInWorker string `json:"name_in_worker,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Scheduler.Query().
	GroupBy(scheduler.FieldNameInWorker).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SchedulerQuery) IDs

func (sq *SchedulerQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Scheduler IDs.

func (*SchedulerQuery) IDsX

func (sq *SchedulerQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*SchedulerQuery) Limit

func (sq *SchedulerQuery) Limit(limit int) *SchedulerQuery

Limit the number of records to be returned by this query.

func (*SchedulerQuery) Modify

func (sq *SchedulerQuery) Modify(modifiers ...func(s *sql.Selector)) *SchedulerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*SchedulerQuery) Offset

func (sq *SchedulerQuery) Offset(offset int) *SchedulerQuery

Offset to start from.

func (*SchedulerQuery) Only

func (sq *SchedulerQuery) Only(ctx context.Context) (*Scheduler, error)

Only returns a single Scheduler entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Scheduler entity is found. Returns a *NotFoundError when no Scheduler entities are found.

func (*SchedulerQuery) OnlyID

func (sq *SchedulerQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Scheduler ID in the query. Returns a *NotSingularError when more than one Scheduler ID is found. Returns a *NotFoundError when no entities are found.

func (*SchedulerQuery) OnlyIDX

func (sq *SchedulerQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SchedulerQuery) OnlyX

func (sq *SchedulerQuery) OnlyX(ctx context.Context) *Scheduler

OnlyX is like Only, but panics if an error occurs.

func (*SchedulerQuery) Order

func (sq *SchedulerQuery) Order(o ...OrderFunc) *SchedulerQuery

Order specifies how the records should be ordered.

func (*SchedulerQuery) QueryContext

func (c *SchedulerQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SchedulerQuery) QueryGenerationModels

func (sq *SchedulerQuery) QueryGenerationModels() *GenerationModelQuery

QueryGenerationModels chains the current query on the "generation_models" edge.

func (*SchedulerQuery) QueryGenerations

func (sq *SchedulerQuery) QueryGenerations() *GenerationQuery

QueryGenerations chains the current query on the "generations" edge.

func (*SchedulerQuery) Select

func (sq *SchedulerQuery) Select(fields ...string) *SchedulerSelect

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 {
	NameInWorker string `json:"name_in_worker,omitempty"`
}

client.Scheduler.Query().
	Select(scheduler.FieldNameInWorker).
	Scan(ctx, &v)

func (*SchedulerQuery) Unique

func (sq *SchedulerQuery) Unique(unique bool) *SchedulerQuery

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 (*SchedulerQuery) Where

Where adds a new predicate for the SchedulerQuery builder.

func (*SchedulerQuery) WithGenerationModels

func (sq *SchedulerQuery) WithGenerationModels(opts ...func(*GenerationModelQuery)) *SchedulerQuery

WithGenerationModels tells the query-builder to eager-load the nodes that are connected to the "generation_models" edge. The optional arguments are used to configure the query builder of the edge.

func (*SchedulerQuery) WithGenerations

func (sq *SchedulerQuery) WithGenerations(opts ...func(*GenerationQuery)) *SchedulerQuery

WithGenerations tells the query-builder to eager-load the nodes that are connected to the "generations" edge. The optional arguments are used to configure the query builder of the edge.

type SchedulerSelect

type SchedulerSelect struct {
	*SchedulerQuery
	// contains filtered or unexported fields
}

SchedulerSelect is the builder for selecting fields of Scheduler entities.

func (*SchedulerSelect) Aggregate

func (ss *SchedulerSelect) Aggregate(fns ...AggregateFunc) *SchedulerSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SchedulerSelect) Bool

func (s *SchedulerSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SchedulerSelect) BoolX

func (s *SchedulerSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SchedulerSelect) Bools

func (s *SchedulerSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SchedulerSelect) BoolsX

func (s *SchedulerSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (SchedulerSelect) ExecContext

func (c SchedulerSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SchedulerSelect) Float64

func (s *SchedulerSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SchedulerSelect) Float64X

func (s *SchedulerSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SchedulerSelect) Float64s

func (s *SchedulerSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SchedulerSelect) Float64sX

func (s *SchedulerSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SchedulerSelect) Int

func (s *SchedulerSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SchedulerSelect) IntX

func (s *SchedulerSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SchedulerSelect) Ints

func (s *SchedulerSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SchedulerSelect) IntsX

func (s *SchedulerSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SchedulerSelect) Modify

func (ss *SchedulerSelect) Modify(modifiers ...func(s *sql.Selector)) *SchedulerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (SchedulerSelect) QueryContext

func (c SchedulerSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SchedulerSelect) Scan

func (ss *SchedulerSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SchedulerSelect) ScanX

func (s *SchedulerSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SchedulerSelect) String

func (s *SchedulerSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SchedulerSelect) StringX

func (s *SchedulerSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SchedulerSelect) Strings

func (s *SchedulerSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SchedulerSelect) StringsX

func (s *SchedulerSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SchedulerUpdate

type SchedulerUpdate struct {
	// contains filtered or unexported fields
}

SchedulerUpdate is the builder for updating Scheduler entities.

func (*SchedulerUpdate) AddGenerationIDs

func (su *SchedulerUpdate) AddGenerationIDs(ids ...uuid.UUID) *SchedulerUpdate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*SchedulerUpdate) AddGenerationModelIDs

func (su *SchedulerUpdate) AddGenerationModelIDs(ids ...uuid.UUID) *SchedulerUpdate

AddGenerationModelIDs adds the "generation_models" edge to the GenerationModel entity by IDs.

func (*SchedulerUpdate) AddGenerationModels

func (su *SchedulerUpdate) AddGenerationModels(g ...*GenerationModel) *SchedulerUpdate

AddGenerationModels adds the "generation_models" edges to the GenerationModel entity.

func (*SchedulerUpdate) AddGenerations

func (su *SchedulerUpdate) AddGenerations(g ...*Generation) *SchedulerUpdate

AddGenerations adds the "generations" edges to the Generation entity.

func (*SchedulerUpdate) ClearGenerationModels

func (su *SchedulerUpdate) ClearGenerationModels() *SchedulerUpdate

ClearGenerationModels clears all "generation_models" edges to the GenerationModel entity.

func (*SchedulerUpdate) ClearGenerations

func (su *SchedulerUpdate) ClearGenerations() *SchedulerUpdate

ClearGenerations clears all "generations" edges to the Generation entity.

func (*SchedulerUpdate) Exec

func (su *SchedulerUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SchedulerUpdate) ExecContext

func (c *SchedulerUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SchedulerUpdate) ExecX

func (su *SchedulerUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchedulerUpdate) Modify

func (su *SchedulerUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SchedulerUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*SchedulerUpdate) Mutation

func (su *SchedulerUpdate) Mutation() *SchedulerMutation

Mutation returns the SchedulerMutation object of the builder.

func (*SchedulerUpdate) QueryContext

func (c *SchedulerUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SchedulerUpdate) RemoveGenerationIDs

func (su *SchedulerUpdate) RemoveGenerationIDs(ids ...uuid.UUID) *SchedulerUpdate

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*SchedulerUpdate) RemoveGenerationModelIDs

func (su *SchedulerUpdate) RemoveGenerationModelIDs(ids ...uuid.UUID) *SchedulerUpdate

RemoveGenerationModelIDs removes the "generation_models" edge to GenerationModel entities by IDs.

func (*SchedulerUpdate) RemoveGenerationModels

func (su *SchedulerUpdate) RemoveGenerationModels(g ...*GenerationModel) *SchedulerUpdate

RemoveGenerationModels removes "generation_models" edges to GenerationModel entities.

func (*SchedulerUpdate) RemoveGenerations

func (su *SchedulerUpdate) RemoveGenerations(g ...*Generation) *SchedulerUpdate

RemoveGenerations removes "generations" edges to Generation entities.

func (*SchedulerUpdate) Save

func (su *SchedulerUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SchedulerUpdate) SaveX

func (su *SchedulerUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SchedulerUpdate) SetIsActive

func (su *SchedulerUpdate) SetIsActive(b bool) *SchedulerUpdate

SetIsActive sets the "is_active" field.

func (*SchedulerUpdate) SetIsDefault

func (su *SchedulerUpdate) SetIsDefault(b bool) *SchedulerUpdate

SetIsDefault sets the "is_default" field.

func (*SchedulerUpdate) SetIsHidden

func (su *SchedulerUpdate) SetIsHidden(b bool) *SchedulerUpdate

SetIsHidden sets the "is_hidden" field.

func (*SchedulerUpdate) SetNameInWorker

func (su *SchedulerUpdate) SetNameInWorker(s string) *SchedulerUpdate

SetNameInWorker sets the "name_in_worker" field.

func (*SchedulerUpdate) SetNillableIsActive

func (su *SchedulerUpdate) SetNillableIsActive(b *bool) *SchedulerUpdate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*SchedulerUpdate) SetNillableIsDefault

func (su *SchedulerUpdate) SetNillableIsDefault(b *bool) *SchedulerUpdate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*SchedulerUpdate) SetNillableIsHidden

func (su *SchedulerUpdate) SetNillableIsHidden(b *bool) *SchedulerUpdate

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*SchedulerUpdate) SetUpdatedAt

func (su *SchedulerUpdate) SetUpdatedAt(t time.Time) *SchedulerUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SchedulerUpdate) Where

Where appends a list predicates to the SchedulerUpdate builder.

type SchedulerUpdateOne

type SchedulerUpdateOne struct {
	// contains filtered or unexported fields
}

SchedulerUpdateOne is the builder for updating a single Scheduler entity.

func (*SchedulerUpdateOne) AddGenerationIDs

func (suo *SchedulerUpdateOne) AddGenerationIDs(ids ...uuid.UUID) *SchedulerUpdateOne

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*SchedulerUpdateOne) AddGenerationModelIDs

func (suo *SchedulerUpdateOne) AddGenerationModelIDs(ids ...uuid.UUID) *SchedulerUpdateOne

AddGenerationModelIDs adds the "generation_models" edge to the GenerationModel entity by IDs.

func (*SchedulerUpdateOne) AddGenerationModels

func (suo *SchedulerUpdateOne) AddGenerationModels(g ...*GenerationModel) *SchedulerUpdateOne

AddGenerationModels adds the "generation_models" edges to the GenerationModel entity.

func (*SchedulerUpdateOne) AddGenerations

func (suo *SchedulerUpdateOne) AddGenerations(g ...*Generation) *SchedulerUpdateOne

AddGenerations adds the "generations" edges to the Generation entity.

func (*SchedulerUpdateOne) ClearGenerationModels

func (suo *SchedulerUpdateOne) ClearGenerationModels() *SchedulerUpdateOne

ClearGenerationModels clears all "generation_models" edges to the GenerationModel entity.

func (*SchedulerUpdateOne) ClearGenerations

func (suo *SchedulerUpdateOne) ClearGenerations() *SchedulerUpdateOne

ClearGenerations clears all "generations" edges to the Generation entity.

func (*SchedulerUpdateOne) Exec

func (suo *SchedulerUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SchedulerUpdateOne) ExecContext

func (c *SchedulerUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*SchedulerUpdateOne) ExecX

func (suo *SchedulerUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchedulerUpdateOne) Modify

func (suo *SchedulerUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *SchedulerUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*SchedulerUpdateOne) Mutation

func (suo *SchedulerUpdateOne) Mutation() *SchedulerMutation

Mutation returns the SchedulerMutation object of the builder.

func (*SchedulerUpdateOne) QueryContext

func (c *SchedulerUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*SchedulerUpdateOne) RemoveGenerationIDs

func (suo *SchedulerUpdateOne) RemoveGenerationIDs(ids ...uuid.UUID) *SchedulerUpdateOne

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*SchedulerUpdateOne) RemoveGenerationModelIDs

func (suo *SchedulerUpdateOne) RemoveGenerationModelIDs(ids ...uuid.UUID) *SchedulerUpdateOne

RemoveGenerationModelIDs removes the "generation_models" edge to GenerationModel entities by IDs.

func (*SchedulerUpdateOne) RemoveGenerationModels

func (suo *SchedulerUpdateOne) RemoveGenerationModels(g ...*GenerationModel) *SchedulerUpdateOne

RemoveGenerationModels removes "generation_models" edges to GenerationModel entities.

func (*SchedulerUpdateOne) RemoveGenerations

func (suo *SchedulerUpdateOne) RemoveGenerations(g ...*Generation) *SchedulerUpdateOne

RemoveGenerations removes "generations" edges to Generation entities.

func (*SchedulerUpdateOne) Save

func (suo *SchedulerUpdateOne) Save(ctx context.Context) (*Scheduler, error)

Save executes the query and returns the updated Scheduler entity.

func (*SchedulerUpdateOne) SaveX

func (suo *SchedulerUpdateOne) SaveX(ctx context.Context) *Scheduler

SaveX is like Save, but panics if an error occurs.

func (*SchedulerUpdateOne) Select

func (suo *SchedulerUpdateOne) Select(field string, fields ...string) *SchedulerUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SchedulerUpdateOne) SetIsActive

func (suo *SchedulerUpdateOne) SetIsActive(b bool) *SchedulerUpdateOne

SetIsActive sets the "is_active" field.

func (*SchedulerUpdateOne) SetIsDefault

func (suo *SchedulerUpdateOne) SetIsDefault(b bool) *SchedulerUpdateOne

SetIsDefault sets the "is_default" field.

func (*SchedulerUpdateOne) SetIsHidden

func (suo *SchedulerUpdateOne) SetIsHidden(b bool) *SchedulerUpdateOne

SetIsHidden sets the "is_hidden" field.

func (*SchedulerUpdateOne) SetNameInWorker

func (suo *SchedulerUpdateOne) SetNameInWorker(s string) *SchedulerUpdateOne

SetNameInWorker sets the "name_in_worker" field.

func (*SchedulerUpdateOne) SetNillableIsActive

func (suo *SchedulerUpdateOne) SetNillableIsActive(b *bool) *SchedulerUpdateOne

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*SchedulerUpdateOne) SetNillableIsDefault

func (suo *SchedulerUpdateOne) SetNillableIsDefault(b *bool) *SchedulerUpdateOne

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*SchedulerUpdateOne) SetNillableIsHidden

func (suo *SchedulerUpdateOne) SetNillableIsHidden(b *bool) *SchedulerUpdateOne

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*SchedulerUpdateOne) SetUpdatedAt

func (suo *SchedulerUpdateOne) SetUpdatedAt(t time.Time) *SchedulerUpdateOne

SetUpdatedAt sets the "updated_at" field.

type SchedulerUpsert

type SchedulerUpsert struct {
	*sql.UpdateSet
}

SchedulerUpsert is the "OnConflict" setter.

func (*SchedulerUpsert) SetIsActive

func (u *SchedulerUpsert) SetIsActive(v bool) *SchedulerUpsert

SetIsActive sets the "is_active" field.

func (*SchedulerUpsert) SetIsDefault

func (u *SchedulerUpsert) SetIsDefault(v bool) *SchedulerUpsert

SetIsDefault sets the "is_default" field.

func (*SchedulerUpsert) SetIsHidden

func (u *SchedulerUpsert) SetIsHidden(v bool) *SchedulerUpsert

SetIsHidden sets the "is_hidden" field.

func (*SchedulerUpsert) SetNameInWorker

func (u *SchedulerUpsert) SetNameInWorker(v string) *SchedulerUpsert

SetNameInWorker sets the "name_in_worker" field.

func (*SchedulerUpsert) SetUpdatedAt

func (u *SchedulerUpsert) SetUpdatedAt(v time.Time) *SchedulerUpsert

SetUpdatedAt sets the "updated_at" field.

func (*SchedulerUpsert) UpdateIsActive

func (u *SchedulerUpsert) UpdateIsActive() *SchedulerUpsert

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*SchedulerUpsert) UpdateIsDefault

func (u *SchedulerUpsert) UpdateIsDefault() *SchedulerUpsert

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*SchedulerUpsert) UpdateIsHidden

func (u *SchedulerUpsert) UpdateIsHidden() *SchedulerUpsert

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*SchedulerUpsert) UpdateNameInWorker

func (u *SchedulerUpsert) UpdateNameInWorker() *SchedulerUpsert

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*SchedulerUpsert) UpdateUpdatedAt

func (u *SchedulerUpsert) UpdateUpdatedAt() *SchedulerUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type SchedulerUpsertBulk

type SchedulerUpsertBulk struct {
	// contains filtered or unexported fields
}

SchedulerUpsertBulk is the builder for "upsert"-ing a bulk of Scheduler nodes.

func (*SchedulerUpsertBulk) DoNothing

func (u *SchedulerUpsertBulk) DoNothing() *SchedulerUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SchedulerUpsertBulk) Exec

Exec executes the query.

func (*SchedulerUpsertBulk) ExecX

func (u *SchedulerUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchedulerUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Scheduler.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SchedulerUpsertBulk) SetIsActive

func (u *SchedulerUpsertBulk) SetIsActive(v bool) *SchedulerUpsertBulk

SetIsActive sets the "is_active" field.

func (*SchedulerUpsertBulk) SetIsDefault

func (u *SchedulerUpsertBulk) SetIsDefault(v bool) *SchedulerUpsertBulk

SetIsDefault sets the "is_default" field.

func (*SchedulerUpsertBulk) SetIsHidden

func (u *SchedulerUpsertBulk) SetIsHidden(v bool) *SchedulerUpsertBulk

SetIsHidden sets the "is_hidden" field.

func (*SchedulerUpsertBulk) SetNameInWorker

func (u *SchedulerUpsertBulk) SetNameInWorker(v string) *SchedulerUpsertBulk

SetNameInWorker sets the "name_in_worker" field.

func (*SchedulerUpsertBulk) SetUpdatedAt

func (u *SchedulerUpsertBulk) SetUpdatedAt(v time.Time) *SchedulerUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*SchedulerUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the SchedulerCreateBulk.OnConflict documentation for more info.

func (*SchedulerUpsertBulk) UpdateIsActive

func (u *SchedulerUpsertBulk) UpdateIsActive() *SchedulerUpsertBulk

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*SchedulerUpsertBulk) UpdateIsDefault

func (u *SchedulerUpsertBulk) UpdateIsDefault() *SchedulerUpsertBulk

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*SchedulerUpsertBulk) UpdateIsHidden

func (u *SchedulerUpsertBulk) UpdateIsHidden() *SchedulerUpsertBulk

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*SchedulerUpsertBulk) UpdateNameInWorker

func (u *SchedulerUpsertBulk) UpdateNameInWorker() *SchedulerUpsertBulk

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*SchedulerUpsertBulk) UpdateNewValues

func (u *SchedulerUpsertBulk) UpdateNewValues() *SchedulerUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Scheduler.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(scheduler.FieldID)
		}),
	).
	Exec(ctx)

func (*SchedulerUpsertBulk) UpdateUpdatedAt

func (u *SchedulerUpsertBulk) UpdateUpdatedAt() *SchedulerUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type SchedulerUpsertOne

type SchedulerUpsertOne struct {
	// contains filtered or unexported fields
}

SchedulerUpsertOne is the builder for "upsert"-ing

one Scheduler node.

func (*SchedulerUpsertOne) DoNothing

func (u *SchedulerUpsertOne) DoNothing() *SchedulerUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SchedulerUpsertOne) Exec

func (u *SchedulerUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SchedulerUpsertOne) ExecX

func (u *SchedulerUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SchedulerUpsertOne) ID

func (u *SchedulerUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SchedulerUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*SchedulerUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Scheduler.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SchedulerUpsertOne) SetIsActive

func (u *SchedulerUpsertOne) SetIsActive(v bool) *SchedulerUpsertOne

SetIsActive sets the "is_active" field.

func (*SchedulerUpsertOne) SetIsDefault

func (u *SchedulerUpsertOne) SetIsDefault(v bool) *SchedulerUpsertOne

SetIsDefault sets the "is_default" field.

func (*SchedulerUpsertOne) SetIsHidden

func (u *SchedulerUpsertOne) SetIsHidden(v bool) *SchedulerUpsertOne

SetIsHidden sets the "is_hidden" field.

func (*SchedulerUpsertOne) SetNameInWorker

func (u *SchedulerUpsertOne) SetNameInWorker(v string) *SchedulerUpsertOne

SetNameInWorker sets the "name_in_worker" field.

func (*SchedulerUpsertOne) SetUpdatedAt

func (u *SchedulerUpsertOne) SetUpdatedAt(v time.Time) *SchedulerUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*SchedulerUpsertOne) Update

func (u *SchedulerUpsertOne) Update(set func(*SchedulerUpsert)) *SchedulerUpsertOne

Update allows overriding fields `UPDATE` values. See the SchedulerCreate.OnConflict documentation for more info.

func (*SchedulerUpsertOne) UpdateIsActive

func (u *SchedulerUpsertOne) UpdateIsActive() *SchedulerUpsertOne

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*SchedulerUpsertOne) UpdateIsDefault

func (u *SchedulerUpsertOne) UpdateIsDefault() *SchedulerUpsertOne

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*SchedulerUpsertOne) UpdateIsHidden

func (u *SchedulerUpsertOne) UpdateIsHidden() *SchedulerUpsertOne

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*SchedulerUpsertOne) UpdateNameInWorker

func (u *SchedulerUpsertOne) UpdateNameInWorker() *SchedulerUpsertOne

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*SchedulerUpsertOne) UpdateNewValues

func (u *SchedulerUpsertOne) UpdateNewValues() *SchedulerUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Scheduler.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(scheduler.FieldID)
		}),
	).
	Exec(ctx)

func (*SchedulerUpsertOne) UpdateUpdatedAt

func (u *SchedulerUpsertOne) UpdateUpdatedAt() *SchedulerUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Schedulers

type Schedulers []*Scheduler

Schedulers is a parsable slice of Scheduler.

type ThumbmarkIdBlackList

type ThumbmarkIdBlackList struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ThumbmarkID holds the value of the "thumbmark_id" field.
	ThumbmarkID string `json:"thumbmark_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

ThumbmarkIdBlackList is the model entity for the ThumbmarkIdBlackList schema.

func (*ThumbmarkIdBlackList) ExecContext

func (c *ThumbmarkIdBlackList) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ThumbmarkIdBlackList) QueryContext

func (c *ThumbmarkIdBlackList) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ThumbmarkIdBlackList) String

func (tibl *ThumbmarkIdBlackList) String() string

String implements the fmt.Stringer.

func (*ThumbmarkIdBlackList) Unwrap

Unwrap unwraps the ThumbmarkIdBlackList 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 (*ThumbmarkIdBlackList) Update

Update returns a builder for updating this ThumbmarkIdBlackList. Note that you need to call ThumbmarkIdBlackList.Unwrap() before calling this method if this ThumbmarkIdBlackList was returned from a transaction, and the transaction was committed or rolled back.

type ThumbmarkIdBlackListClient

type ThumbmarkIdBlackListClient struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListClient is a client for the ThumbmarkIdBlackList schema.

func NewThumbmarkIdBlackListClient

func NewThumbmarkIdBlackListClient(c config) *ThumbmarkIdBlackListClient

NewThumbmarkIdBlackListClient returns a client for the ThumbmarkIdBlackList from the given config.

func (*ThumbmarkIdBlackListClient) Create

Create returns a builder for creating a ThumbmarkIdBlackList entity.

func (*ThumbmarkIdBlackListClient) CreateBulk

CreateBulk returns a builder for creating a bulk of ThumbmarkIdBlackList entities.

func (*ThumbmarkIdBlackListClient) Delete

Delete returns a delete builder for ThumbmarkIdBlackList.

func (*ThumbmarkIdBlackListClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ThumbmarkIdBlackListClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ThumbmarkIdBlackListClient) ExecContext

func (c *ThumbmarkIdBlackListClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ThumbmarkIdBlackListClient) Get

Get returns a ThumbmarkIdBlackList entity by its id.

func (*ThumbmarkIdBlackListClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ThumbmarkIdBlackListClient) Hooks

func (c *ThumbmarkIdBlackListClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ThumbmarkIdBlackListClient) Intercept

func (c *ThumbmarkIdBlackListClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `thumbmarkidblacklist.Intercept(f(g(h())))`.

func (*ThumbmarkIdBlackListClient) Interceptors

func (c *ThumbmarkIdBlackListClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ThumbmarkIdBlackListClient) Query

Query returns a query builder for ThumbmarkIdBlackList.

func (*ThumbmarkIdBlackListClient) QueryContext

func (c *ThumbmarkIdBlackListClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ThumbmarkIdBlackListClient) Update

Update returns an update builder for ThumbmarkIdBlackList.

func (*ThumbmarkIdBlackListClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ThumbmarkIdBlackListClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ThumbmarkIdBlackListClient) Use

func (c *ThumbmarkIdBlackListClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `thumbmarkidblacklist.Hooks(f(g(h())))`.

type ThumbmarkIdBlackListCreate

type ThumbmarkIdBlackListCreate struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListCreate is the builder for creating a ThumbmarkIdBlackList entity.

func (*ThumbmarkIdBlackListCreate) Exec

Exec executes the query.

func (*ThumbmarkIdBlackListCreate) ExecContext

func (c *ThumbmarkIdBlackListCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ThumbmarkIdBlackListCreate) ExecX

func (tiblc *ThumbmarkIdBlackListCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ThumbmarkIdBlackListCreate) Mutation

Mutation returns the ThumbmarkIdBlackListMutation object of the builder.

func (*ThumbmarkIdBlackListCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ThumbmarkIdBlackList.Create().
	SetThumbmarkID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ThumbmarkIdBlackListUpsert) {
		SetThumbmarkID(v+v).
	}).
	Exec(ctx)

func (*ThumbmarkIdBlackListCreate) OnConflictColumns

func (tiblc *ThumbmarkIdBlackListCreate) OnConflictColumns(columns ...string) *ThumbmarkIdBlackListUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ThumbmarkIdBlackList.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ThumbmarkIdBlackListCreate) QueryContext

func (c *ThumbmarkIdBlackListCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ThumbmarkIdBlackListCreate) Save

Save creates the ThumbmarkIdBlackList in the database.

func (*ThumbmarkIdBlackListCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ThumbmarkIdBlackListCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*ThumbmarkIdBlackListCreate) SetID

SetID sets the "id" field.

func (*ThumbmarkIdBlackListCreate) SetNillableCreatedAt

func (tiblc *ThumbmarkIdBlackListCreate) SetNillableCreatedAt(t *time.Time) *ThumbmarkIdBlackListCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ThumbmarkIdBlackListCreate) SetNillableID

SetNillableID sets the "id" field if the given value is not nil.

func (*ThumbmarkIdBlackListCreate) SetNillableUpdatedAt

func (tiblc *ThumbmarkIdBlackListCreate) SetNillableUpdatedAt(t *time.Time) *ThumbmarkIdBlackListCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ThumbmarkIdBlackListCreate) SetThumbmarkID

SetThumbmarkID sets the "thumbmark_id" field.

func (*ThumbmarkIdBlackListCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type ThumbmarkIdBlackListCreateBulk

type ThumbmarkIdBlackListCreateBulk struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListCreateBulk is the builder for creating many ThumbmarkIdBlackList entities in bulk.

func (*ThumbmarkIdBlackListCreateBulk) Exec

Exec executes the query.

func (*ThumbmarkIdBlackListCreateBulk) ExecContext

func (c *ThumbmarkIdBlackListCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ThumbmarkIdBlackListCreateBulk) ExecX

func (tiblcb *ThumbmarkIdBlackListCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ThumbmarkIdBlackListCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.ThumbmarkIdBlackList.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ThumbmarkIdBlackListUpsert) {
		SetThumbmarkID(v+v).
	}).
	Exec(ctx)

func (*ThumbmarkIdBlackListCreateBulk) OnConflictColumns

func (tiblcb *ThumbmarkIdBlackListCreateBulk) OnConflictColumns(columns ...string) *ThumbmarkIdBlackListUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.ThumbmarkIdBlackList.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*ThumbmarkIdBlackListCreateBulk) QueryContext

func (c *ThumbmarkIdBlackListCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ThumbmarkIdBlackListCreateBulk) Save

Save creates the ThumbmarkIdBlackList entities in the database.

func (*ThumbmarkIdBlackListCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type ThumbmarkIdBlackListDelete

type ThumbmarkIdBlackListDelete struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListDelete is the builder for deleting a ThumbmarkIdBlackList entity.

func (*ThumbmarkIdBlackListDelete) Exec

func (tibld *ThumbmarkIdBlackListDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ThumbmarkIdBlackListDelete) ExecContext

func (c *ThumbmarkIdBlackListDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ThumbmarkIdBlackListDelete) ExecX

func (tibld *ThumbmarkIdBlackListDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ThumbmarkIdBlackListDelete) QueryContext

func (c *ThumbmarkIdBlackListDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ThumbmarkIdBlackListDelete) Where

Where appends a list predicates to the ThumbmarkIdBlackListDelete builder.

type ThumbmarkIdBlackListDeleteOne

type ThumbmarkIdBlackListDeleteOne struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListDeleteOne is the builder for deleting a single ThumbmarkIdBlackList entity.

func (*ThumbmarkIdBlackListDeleteOne) Exec

Exec executes the deletion query.

func (*ThumbmarkIdBlackListDeleteOne) ExecX

func (tibldo *ThumbmarkIdBlackListDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ThumbmarkIdBlackListGroupBy

type ThumbmarkIdBlackListGroupBy struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListGroupBy is the group-by builder for ThumbmarkIdBlackList entities.

func (*ThumbmarkIdBlackListGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*ThumbmarkIdBlackListGroupBy) Bool

func (s *ThumbmarkIdBlackListGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListGroupBy) BoolX

func (s *ThumbmarkIdBlackListGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ThumbmarkIdBlackListGroupBy) Bools

func (s *ThumbmarkIdBlackListGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListGroupBy) BoolsX

func (s *ThumbmarkIdBlackListGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ThumbmarkIdBlackListGroupBy) Float64

func (s *ThumbmarkIdBlackListGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListGroupBy) Float64X

func (s *ThumbmarkIdBlackListGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ThumbmarkIdBlackListGroupBy) Float64s

func (s *ThumbmarkIdBlackListGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListGroupBy) Float64sX

func (s *ThumbmarkIdBlackListGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ThumbmarkIdBlackListGroupBy) Int

func (s *ThumbmarkIdBlackListGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListGroupBy) IntX

func (s *ThumbmarkIdBlackListGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ThumbmarkIdBlackListGroupBy) Ints

func (s *ThumbmarkIdBlackListGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListGroupBy) IntsX

func (s *ThumbmarkIdBlackListGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ThumbmarkIdBlackListGroupBy) Scan

func (tiblgb *ThumbmarkIdBlackListGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ThumbmarkIdBlackListGroupBy) ScanX

func (s *ThumbmarkIdBlackListGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ThumbmarkIdBlackListGroupBy) String

func (s *ThumbmarkIdBlackListGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListGroupBy) StringX

func (s *ThumbmarkIdBlackListGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ThumbmarkIdBlackListGroupBy) Strings

func (s *ThumbmarkIdBlackListGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListGroupBy) StringsX

func (s *ThumbmarkIdBlackListGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ThumbmarkIdBlackListMutation

type ThumbmarkIdBlackListMutation struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListMutation represents an operation that mutates the ThumbmarkIdBlackList nodes in the graph.

func (*ThumbmarkIdBlackListMutation) AddField

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) AddedEdges

func (m *ThumbmarkIdBlackListMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ThumbmarkIdBlackListMutation) AddedField

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) AddedFields

func (m *ThumbmarkIdBlackListMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ThumbmarkIdBlackListMutation) AddedIDs

func (m *ThumbmarkIdBlackListMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ThumbmarkIdBlackListMutation) ClearEdge

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) ClearField

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) ClearedEdges

func (m *ThumbmarkIdBlackListMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ThumbmarkIdBlackListMutation) ClearedFields

func (m *ThumbmarkIdBlackListMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) CreatedAt

func (m *ThumbmarkIdBlackListMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ThumbmarkIdBlackListMutation) EdgeCleared

func (m *ThumbmarkIdBlackListMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ThumbmarkIdBlackListMutation) ExecContext

func (c *ThumbmarkIdBlackListMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ThumbmarkIdBlackListMutation) Field

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) FieldCleared

func (m *ThumbmarkIdBlackListMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ThumbmarkIdBlackListMutation) Fields

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) ID

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) OldCreatedAt

func (m *ThumbmarkIdBlackListMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the ThumbmarkIdBlackList entity. If the ThumbmarkIdBlackList 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 (*ThumbmarkIdBlackListMutation) OldField

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) OldThumbmarkID

func (m *ThumbmarkIdBlackListMutation) OldThumbmarkID(ctx context.Context) (v string, err error)

OldThumbmarkID returns the old "thumbmark_id" field's value of the ThumbmarkIdBlackList entity. If the ThumbmarkIdBlackList 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 (*ThumbmarkIdBlackListMutation) OldUpdatedAt

func (m *ThumbmarkIdBlackListMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ThumbmarkIdBlackList entity. If the ThumbmarkIdBlackList 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 (*ThumbmarkIdBlackListMutation) Op

Op returns the operation name.

func (*ThumbmarkIdBlackListMutation) QueryContext

func (c *ThumbmarkIdBlackListMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ThumbmarkIdBlackListMutation) RemovedEdges

func (m *ThumbmarkIdBlackListMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ThumbmarkIdBlackListMutation) RemovedIDs

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) ResetCreatedAt

func (m *ThumbmarkIdBlackListMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ThumbmarkIdBlackListMutation) ResetEdge

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) ResetField

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) ResetThumbmarkID

func (m *ThumbmarkIdBlackListMutation) ResetThumbmarkID()

ResetThumbmarkID resets all changes to the "thumbmark_id" field.

func (*ThumbmarkIdBlackListMutation) ResetUpdatedAt

func (m *ThumbmarkIdBlackListMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ThumbmarkIdBlackListMutation) SetCreatedAt

func (m *ThumbmarkIdBlackListMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ThumbmarkIdBlackListMutation) SetField

func (m *ThumbmarkIdBlackListMutation) 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 (*ThumbmarkIdBlackListMutation) SetID

func (m *ThumbmarkIdBlackListMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ThumbmarkIdBlackList entities.

func (*ThumbmarkIdBlackListMutation) SetOp

func (m *ThumbmarkIdBlackListMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ThumbmarkIdBlackListMutation) SetThumbmarkID

func (m *ThumbmarkIdBlackListMutation) SetThumbmarkID(s string)

SetThumbmarkID sets the "thumbmark_id" field.

func (*ThumbmarkIdBlackListMutation) SetUpdatedAt

func (m *ThumbmarkIdBlackListMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ThumbmarkIdBlackListMutation) ThumbmarkID

func (m *ThumbmarkIdBlackListMutation) ThumbmarkID() (r string, exists bool)

ThumbmarkID returns the value of the "thumbmark_id" field in the mutation.

func (ThumbmarkIdBlackListMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ThumbmarkIdBlackListMutation) Type

Type returns the node type of this mutation (ThumbmarkIdBlackList).

func (*ThumbmarkIdBlackListMutation) UpdatedAt

func (m *ThumbmarkIdBlackListMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ThumbmarkIdBlackListMutation) Where

Where appends a list predicates to the ThumbmarkIdBlackListMutation builder.

func (*ThumbmarkIdBlackListMutation) WhereP

func (m *ThumbmarkIdBlackListMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ThumbmarkIdBlackListMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ThumbmarkIdBlackListQuery

type ThumbmarkIdBlackListQuery struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListQuery is the builder for querying ThumbmarkIdBlackList entities.

func (*ThumbmarkIdBlackListQuery) Aggregate

Aggregate returns a ThumbmarkIdBlackListSelect configured with the given aggregations.

func (*ThumbmarkIdBlackListQuery) All

All executes the query and returns a list of ThumbmarkIdBlackLists.

func (*ThumbmarkIdBlackListQuery) AllX

AllX is like All, but panics if an error occurs.

func (*ThumbmarkIdBlackListQuery) Clone

Clone returns a duplicate of the ThumbmarkIdBlackListQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ThumbmarkIdBlackListQuery) Count

func (tiblq *ThumbmarkIdBlackListQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ThumbmarkIdBlackListQuery) CountX

func (tiblq *ThumbmarkIdBlackListQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ThumbmarkIdBlackListQuery) ExecContext

func (c *ThumbmarkIdBlackListQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ThumbmarkIdBlackListQuery) Exist

func (tiblq *ThumbmarkIdBlackListQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ThumbmarkIdBlackListQuery) ExistX

func (tiblq *ThumbmarkIdBlackListQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ThumbmarkIdBlackListQuery) First

First returns the first ThumbmarkIdBlackList entity from the query. Returns a *NotFoundError when no ThumbmarkIdBlackList was found.

func (*ThumbmarkIdBlackListQuery) FirstID

func (tiblq *ThumbmarkIdBlackListQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first ThumbmarkIdBlackList ID from the query. Returns a *NotFoundError when no ThumbmarkIdBlackList ID was found.

func (*ThumbmarkIdBlackListQuery) FirstIDX

func (tiblq *ThumbmarkIdBlackListQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*ThumbmarkIdBlackListQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*ThumbmarkIdBlackListQuery) GroupBy

func (tiblq *ThumbmarkIdBlackListQuery) GroupBy(field string, fields ...string) *ThumbmarkIdBlackListGroupBy

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 {
	ThumbmarkID string `json:"thumbmark_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ThumbmarkIdBlackList.Query().
	GroupBy(thumbmarkidblacklist.FieldThumbmarkID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ThumbmarkIdBlackListQuery) IDs

func (tiblq *ThumbmarkIdBlackListQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of ThumbmarkIdBlackList IDs.

func (*ThumbmarkIdBlackListQuery) IDsX

func (tiblq *ThumbmarkIdBlackListQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*ThumbmarkIdBlackListQuery) Limit

Limit the number of records to be returned by this query.

func (*ThumbmarkIdBlackListQuery) Modify

func (tiblq *ThumbmarkIdBlackListQuery) Modify(modifiers ...func(s *sql.Selector)) *ThumbmarkIdBlackListSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*ThumbmarkIdBlackListQuery) Offset

Offset to start from.

func (*ThumbmarkIdBlackListQuery) Only

Only returns a single ThumbmarkIdBlackList entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ThumbmarkIdBlackList entity is found. Returns a *NotFoundError when no ThumbmarkIdBlackList entities are found.

func (*ThumbmarkIdBlackListQuery) OnlyID

func (tiblq *ThumbmarkIdBlackListQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only ThumbmarkIdBlackList ID in the query. Returns a *NotSingularError when more than one ThumbmarkIdBlackList ID is found. Returns a *NotFoundError when no entities are found.

func (*ThumbmarkIdBlackListQuery) OnlyIDX

func (tiblq *ThumbmarkIdBlackListQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ThumbmarkIdBlackListQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ThumbmarkIdBlackListQuery) Order

Order specifies how the records should be ordered.

func (*ThumbmarkIdBlackListQuery) QueryContext

func (c *ThumbmarkIdBlackListQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ThumbmarkIdBlackListQuery) 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 {
	ThumbmarkID string `json:"thumbmark_id,omitempty"`
}

client.ThumbmarkIdBlackList.Query().
	Select(thumbmarkidblacklist.FieldThumbmarkID).
	Scan(ctx, &v)

func (*ThumbmarkIdBlackListQuery) 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 (*ThumbmarkIdBlackListQuery) Where

Where adds a new predicate for the ThumbmarkIdBlackListQuery builder.

type ThumbmarkIdBlackListSelect

type ThumbmarkIdBlackListSelect struct {
	*ThumbmarkIdBlackListQuery
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListSelect is the builder for selecting fields of ThumbmarkIdBlackList entities.

func (*ThumbmarkIdBlackListSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ThumbmarkIdBlackListSelect) Bool

func (s *ThumbmarkIdBlackListSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListSelect) BoolX

func (s *ThumbmarkIdBlackListSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ThumbmarkIdBlackListSelect) Bools

func (s *ThumbmarkIdBlackListSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListSelect) BoolsX

func (s *ThumbmarkIdBlackListSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ThumbmarkIdBlackListSelect) ExecContext

func (c ThumbmarkIdBlackListSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ThumbmarkIdBlackListSelect) Float64

func (s *ThumbmarkIdBlackListSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListSelect) Float64X

func (s *ThumbmarkIdBlackListSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ThumbmarkIdBlackListSelect) Float64s

func (s *ThumbmarkIdBlackListSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListSelect) Float64sX

func (s *ThumbmarkIdBlackListSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ThumbmarkIdBlackListSelect) Int

func (s *ThumbmarkIdBlackListSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListSelect) IntX

func (s *ThumbmarkIdBlackListSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ThumbmarkIdBlackListSelect) Ints

func (s *ThumbmarkIdBlackListSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListSelect) IntsX

func (s *ThumbmarkIdBlackListSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ThumbmarkIdBlackListSelect) Modify

func (tibls *ThumbmarkIdBlackListSelect) Modify(modifiers ...func(s *sql.Selector)) *ThumbmarkIdBlackListSelect

Modify adds a query modifier for attaching custom logic to queries.

func (ThumbmarkIdBlackListSelect) QueryContext

func (c ThumbmarkIdBlackListSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ThumbmarkIdBlackListSelect) Scan

func (tibls *ThumbmarkIdBlackListSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ThumbmarkIdBlackListSelect) ScanX

func (s *ThumbmarkIdBlackListSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ThumbmarkIdBlackListSelect) String

func (s *ThumbmarkIdBlackListSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListSelect) StringX

func (s *ThumbmarkIdBlackListSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ThumbmarkIdBlackListSelect) Strings

func (s *ThumbmarkIdBlackListSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ThumbmarkIdBlackListSelect) StringsX

func (s *ThumbmarkIdBlackListSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ThumbmarkIdBlackListUpdate

type ThumbmarkIdBlackListUpdate struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListUpdate is the builder for updating ThumbmarkIdBlackList entities.

func (*ThumbmarkIdBlackListUpdate) Exec

Exec executes the query.

func (*ThumbmarkIdBlackListUpdate) ExecContext

func (c *ThumbmarkIdBlackListUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ThumbmarkIdBlackListUpdate) ExecX

func (tiblu *ThumbmarkIdBlackListUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ThumbmarkIdBlackListUpdate) Modify

func (tiblu *ThumbmarkIdBlackListUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ThumbmarkIdBlackListUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ThumbmarkIdBlackListUpdate) Mutation

Mutation returns the ThumbmarkIdBlackListMutation object of the builder.

func (*ThumbmarkIdBlackListUpdate) QueryContext

func (c *ThumbmarkIdBlackListUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ThumbmarkIdBlackListUpdate) Save

func (tiblu *ThumbmarkIdBlackListUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ThumbmarkIdBlackListUpdate) SaveX

func (tiblu *ThumbmarkIdBlackListUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ThumbmarkIdBlackListUpdate) SetThumbmarkID

SetThumbmarkID sets the "thumbmark_id" field.

func (*ThumbmarkIdBlackListUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*ThumbmarkIdBlackListUpdate) Where

Where appends a list predicates to the ThumbmarkIdBlackListUpdate builder.

type ThumbmarkIdBlackListUpdateOne

type ThumbmarkIdBlackListUpdateOne struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListUpdateOne is the builder for updating a single ThumbmarkIdBlackList entity.

func (*ThumbmarkIdBlackListUpdateOne) Exec

Exec executes the query on the entity.

func (*ThumbmarkIdBlackListUpdateOne) ExecContext

func (c *ThumbmarkIdBlackListUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ThumbmarkIdBlackListUpdateOne) ExecX

func (tibluo *ThumbmarkIdBlackListUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ThumbmarkIdBlackListUpdateOne) Modify

func (tibluo *ThumbmarkIdBlackListUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *ThumbmarkIdBlackListUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*ThumbmarkIdBlackListUpdateOne) Mutation

Mutation returns the ThumbmarkIdBlackListMutation object of the builder.

func (*ThumbmarkIdBlackListUpdateOne) QueryContext

func (c *ThumbmarkIdBlackListUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ThumbmarkIdBlackListUpdateOne) Save

Save executes the query and returns the updated ThumbmarkIdBlackList entity.

func (*ThumbmarkIdBlackListUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ThumbmarkIdBlackListUpdateOne) 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 (*ThumbmarkIdBlackListUpdateOne) SetThumbmarkID

SetThumbmarkID sets the "thumbmark_id" field.

func (*ThumbmarkIdBlackListUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type ThumbmarkIdBlackListUpsert

type ThumbmarkIdBlackListUpsert struct {
	*sql.UpdateSet
}

ThumbmarkIdBlackListUpsert is the "OnConflict" setter.

func (*ThumbmarkIdBlackListUpsert) SetThumbmarkID

SetThumbmarkID sets the "thumbmark_id" field.

func (*ThumbmarkIdBlackListUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*ThumbmarkIdBlackListUpsert) UpdateThumbmarkID

UpdateThumbmarkID sets the "thumbmark_id" field to the value that was provided on create.

func (*ThumbmarkIdBlackListUpsert) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ThumbmarkIdBlackListUpsertBulk

type ThumbmarkIdBlackListUpsertBulk struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListUpsertBulk is the builder for "upsert"-ing a bulk of ThumbmarkIdBlackList nodes.

func (*ThumbmarkIdBlackListUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ThumbmarkIdBlackListUpsertBulk) Exec

Exec executes the query.

func (*ThumbmarkIdBlackListUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ThumbmarkIdBlackListUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ThumbmarkIdBlackList.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*ThumbmarkIdBlackListUpsertBulk) SetThumbmarkID

SetThumbmarkID sets the "thumbmark_id" field.

func (*ThumbmarkIdBlackListUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*ThumbmarkIdBlackListUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the ThumbmarkIdBlackListCreateBulk.OnConflict documentation for more info.

func (*ThumbmarkIdBlackListUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.ThumbmarkIdBlackList.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(thumbmarkidblacklist.FieldID)
		}),
	).
	Exec(ctx)

func (*ThumbmarkIdBlackListUpsertBulk) UpdateThumbmarkID

UpdateThumbmarkID sets the "thumbmark_id" field to the value that was provided on create.

func (*ThumbmarkIdBlackListUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ThumbmarkIdBlackListUpsertOne

type ThumbmarkIdBlackListUpsertOne struct {
	// contains filtered or unexported fields
}

ThumbmarkIdBlackListUpsertOne is the builder for "upsert"-ing

one ThumbmarkIdBlackList node.

func (*ThumbmarkIdBlackListUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ThumbmarkIdBlackListUpsertOne) Exec

Exec executes the query.

func (*ThumbmarkIdBlackListUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*ThumbmarkIdBlackListUpsertOne) ID

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ThumbmarkIdBlackListUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*ThumbmarkIdBlackListUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.ThumbmarkIdBlackList.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ThumbmarkIdBlackListUpsertOne) SetThumbmarkID

SetThumbmarkID sets the "thumbmark_id" field.

func (*ThumbmarkIdBlackListUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*ThumbmarkIdBlackListUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the ThumbmarkIdBlackListCreate.OnConflict documentation for more info.

func (*ThumbmarkIdBlackListUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.ThumbmarkIdBlackList.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(thumbmarkidblacklist.FieldID)
		}),
	).
	Exec(ctx)

func (*ThumbmarkIdBlackListUpsertOne) UpdateThumbmarkID

UpdateThumbmarkID sets the "thumbmark_id" field to the value that was provided on create.

func (*ThumbmarkIdBlackListUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type ThumbmarkIdBlackLists

type ThumbmarkIdBlackLists []*ThumbmarkIdBlackList

ThumbmarkIdBlackLists is a parsable slice of ThumbmarkIdBlackList.

type TipLog

type TipLog struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Amount holds the value of the "amount" field.
	Amount int32 `json:"amount,omitempty"`
	// TippedToDiscordID holds the value of the "tipped_to_discord_id" field.
	TippedToDiscordID string `json:"tipped_to_discord_id,omitempty"`
	// TippedBy holds the value of the "tipped_by" field.
	TippedBy uuid.UUID `json:"tipped_by,omitempty"`
	// TippedTo holds the value of the "tipped_to" field.
	TippedTo *uuid.UUID `json:"tipped_to,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TipLogQuery when eager-loading is set.
	Edges TipLogEdges `json:"edges"`
	// contains filtered or unexported fields
}

TipLog is the model entity for the TipLog schema.

func (*TipLog) ExecContext

func (c *TipLog) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TipLog) QueryContext

func (c *TipLog) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TipLog) QueryTipsGiven

func (tl *TipLog) QueryTipsGiven() *UserQuery

QueryTipsGiven queries the "tips_given" edge of the TipLog entity.

func (*TipLog) QueryTipsReceived

func (tl *TipLog) QueryTipsReceived() *UserQuery

QueryTipsReceived queries the "tips_received" edge of the TipLog entity.

func (*TipLog) String

func (tl *TipLog) String() string

String implements the fmt.Stringer.

func (*TipLog) Unwrap

func (tl *TipLog) Unwrap() *TipLog

Unwrap unwraps the TipLog 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 (*TipLog) Update

func (tl *TipLog) Update() *TipLogUpdateOne

Update returns a builder for updating this TipLog. Note that you need to call TipLog.Unwrap() before calling this method if this TipLog was returned from a transaction, and the transaction was committed or rolled back.

type TipLogClient

type TipLogClient struct {
	// contains filtered or unexported fields
}

TipLogClient is a client for the TipLog schema.

func NewTipLogClient

func NewTipLogClient(c config) *TipLogClient

NewTipLogClient returns a client for the TipLog from the given config.

func (*TipLogClient) Create

func (c *TipLogClient) Create() *TipLogCreate

Create returns a builder for creating a TipLog entity.

func (*TipLogClient) CreateBulk

func (c *TipLogClient) CreateBulk(builders ...*TipLogCreate) *TipLogCreateBulk

CreateBulk returns a builder for creating a bulk of TipLog entities.

func (*TipLogClient) Delete

func (c *TipLogClient) Delete() *TipLogDelete

Delete returns a delete builder for TipLog.

func (*TipLogClient) DeleteOne

func (c *TipLogClient) DeleteOne(tl *TipLog) *TipLogDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TipLogClient) DeleteOneID

func (c *TipLogClient) DeleteOneID(id uuid.UUID) *TipLogDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TipLogClient) ExecContext

func (c *TipLogClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TipLogClient) Get

func (c *TipLogClient) Get(ctx context.Context, id uuid.UUID) (*TipLog, error)

Get returns a TipLog entity by its id.

func (*TipLogClient) GetX

func (c *TipLogClient) GetX(ctx context.Context, id uuid.UUID) *TipLog

GetX is like Get, but panics if an error occurs.

func (*TipLogClient) Hooks

func (c *TipLogClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TipLogClient) Intercept

func (c *TipLogClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tiplog.Intercept(f(g(h())))`.

func (*TipLogClient) Interceptors

func (c *TipLogClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TipLogClient) Query

func (c *TipLogClient) Query() *TipLogQuery

Query returns a query builder for TipLog.

func (*TipLogClient) QueryContext

func (c *TipLogClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TipLogClient) QueryTipsGiven

func (c *TipLogClient) QueryTipsGiven(tl *TipLog) *UserQuery

QueryTipsGiven queries the tips_given edge of a TipLog.

func (*TipLogClient) QueryTipsReceived

func (c *TipLogClient) QueryTipsReceived(tl *TipLog) *UserQuery

QueryTipsReceived queries the tips_received edge of a TipLog.

func (*TipLogClient) Update

func (c *TipLogClient) Update() *TipLogUpdate

Update returns an update builder for TipLog.

func (*TipLogClient) UpdateOne

func (c *TipLogClient) UpdateOne(tl *TipLog) *TipLogUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TipLogClient) UpdateOneID

func (c *TipLogClient) UpdateOneID(id uuid.UUID) *TipLogUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TipLogClient) Use

func (c *TipLogClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tiplog.Hooks(f(g(h())))`.

type TipLogCreate

type TipLogCreate struct {
	// contains filtered or unexported fields
}

TipLogCreate is the builder for creating a TipLog entity.

func (*TipLogCreate) Exec

func (tlc *TipLogCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TipLogCreate) ExecContext

func (c *TipLogCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TipLogCreate) ExecX

func (tlc *TipLogCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TipLogCreate) Mutation

func (tlc *TipLogCreate) Mutation() *TipLogMutation

Mutation returns the TipLogMutation object of the builder.

func (*TipLogCreate) OnConflict

func (tlc *TipLogCreate) OnConflict(opts ...sql.ConflictOption) *TipLogUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TipLog.Create().
	SetAmount(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TipLogUpsert) {
		SetAmount(v+v).
	}).
	Exec(ctx)

func (*TipLogCreate) OnConflictColumns

func (tlc *TipLogCreate) OnConflictColumns(columns ...string) *TipLogUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TipLog.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TipLogCreate) QueryContext

func (c *TipLogCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TipLogCreate) Save

func (tlc *TipLogCreate) Save(ctx context.Context) (*TipLog, error)

Save creates the TipLog in the database.

func (*TipLogCreate) SaveX

func (tlc *TipLogCreate) SaveX(ctx context.Context) *TipLog

SaveX calls Save and panics if Save returns an error.

func (*TipLogCreate) SetAmount

func (tlc *TipLogCreate) SetAmount(i int32) *TipLogCreate

SetAmount sets the "amount" field.

func (*TipLogCreate) SetCreatedAt

func (tlc *TipLogCreate) SetCreatedAt(t time.Time) *TipLogCreate

SetCreatedAt sets the "created_at" field.

func (*TipLogCreate) SetID

func (tlc *TipLogCreate) SetID(u uuid.UUID) *TipLogCreate

SetID sets the "id" field.

func (*TipLogCreate) SetNillableCreatedAt

func (tlc *TipLogCreate) SetNillableCreatedAt(t *time.Time) *TipLogCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*TipLogCreate) SetNillableID

func (tlc *TipLogCreate) SetNillableID(u *uuid.UUID) *TipLogCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*TipLogCreate) SetNillableTippedTo

func (tlc *TipLogCreate) SetNillableTippedTo(u *uuid.UUID) *TipLogCreate

SetNillableTippedTo sets the "tipped_to" field if the given value is not nil.

func (*TipLogCreate) SetNillableTipsReceivedID

func (tlc *TipLogCreate) SetNillableTipsReceivedID(id *uuid.UUID) *TipLogCreate

SetNillableTipsReceivedID sets the "tips_received" edge to the User entity by ID if the given value is not nil.

func (*TipLogCreate) SetNillableUpdatedAt

func (tlc *TipLogCreate) SetNillableUpdatedAt(t *time.Time) *TipLogCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*TipLogCreate) SetTippedBy

func (tlc *TipLogCreate) SetTippedBy(u uuid.UUID) *TipLogCreate

SetTippedBy sets the "tipped_by" field.

func (*TipLogCreate) SetTippedTo

func (tlc *TipLogCreate) SetTippedTo(u uuid.UUID) *TipLogCreate

SetTippedTo sets the "tipped_to" field.

func (*TipLogCreate) SetTippedToDiscordID

func (tlc *TipLogCreate) SetTippedToDiscordID(s string) *TipLogCreate

SetTippedToDiscordID sets the "tipped_to_discord_id" field.

func (*TipLogCreate) SetTipsGiven

func (tlc *TipLogCreate) SetTipsGiven(u *User) *TipLogCreate

SetTipsGiven sets the "tips_given" edge to the User entity.

func (*TipLogCreate) SetTipsGivenID

func (tlc *TipLogCreate) SetTipsGivenID(id uuid.UUID) *TipLogCreate

SetTipsGivenID sets the "tips_given" edge to the User entity by ID.

func (*TipLogCreate) SetTipsReceived

func (tlc *TipLogCreate) SetTipsReceived(u *User) *TipLogCreate

SetTipsReceived sets the "tips_received" edge to the User entity.

func (*TipLogCreate) SetTipsReceivedID

func (tlc *TipLogCreate) SetTipsReceivedID(id uuid.UUID) *TipLogCreate

SetTipsReceivedID sets the "tips_received" edge to the User entity by ID.

func (*TipLogCreate) SetUpdatedAt

func (tlc *TipLogCreate) SetUpdatedAt(t time.Time) *TipLogCreate

SetUpdatedAt sets the "updated_at" field.

type TipLogCreateBulk

type TipLogCreateBulk struct {
	// contains filtered or unexported fields
}

TipLogCreateBulk is the builder for creating many TipLog entities in bulk.

func (*TipLogCreateBulk) Exec

func (tlcb *TipLogCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TipLogCreateBulk) ExecContext

func (c *TipLogCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TipLogCreateBulk) ExecX

func (tlcb *TipLogCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TipLogCreateBulk) OnConflict

func (tlcb *TipLogCreateBulk) OnConflict(opts ...sql.ConflictOption) *TipLogUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TipLog.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TipLogUpsert) {
		SetAmount(v+v).
	}).
	Exec(ctx)

func (*TipLogCreateBulk) OnConflictColumns

func (tlcb *TipLogCreateBulk) OnConflictColumns(columns ...string) *TipLogUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TipLog.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TipLogCreateBulk) QueryContext

func (c *TipLogCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TipLogCreateBulk) Save

func (tlcb *TipLogCreateBulk) Save(ctx context.Context) ([]*TipLog, error)

Save creates the TipLog entities in the database.

func (*TipLogCreateBulk) SaveX

func (tlcb *TipLogCreateBulk) SaveX(ctx context.Context) []*TipLog

SaveX is like Save, but panics if an error occurs.

type TipLogDelete

type TipLogDelete struct {
	// contains filtered or unexported fields
}

TipLogDelete is the builder for deleting a TipLog entity.

func (*TipLogDelete) Exec

func (tld *TipLogDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TipLogDelete) ExecContext

func (c *TipLogDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TipLogDelete) ExecX

func (tld *TipLogDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TipLogDelete) QueryContext

func (c *TipLogDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TipLogDelete) Where

func (tld *TipLogDelete) Where(ps ...predicate.TipLog) *TipLogDelete

Where appends a list predicates to the TipLogDelete builder.

type TipLogDeleteOne

type TipLogDeleteOne struct {
	// contains filtered or unexported fields
}

TipLogDeleteOne is the builder for deleting a single TipLog entity.

func (*TipLogDeleteOne) Exec

func (tldo *TipLogDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TipLogDeleteOne) ExecX

func (tldo *TipLogDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type TipLogEdges

type TipLogEdges struct {
	// TipsReceived holds the value of the tips_received edge.
	TipsReceived *User `json:"tips_received,omitempty"`
	// TipsGiven holds the value of the tips_given edge.
	TipsGiven *User `json:"tips_given,omitempty"`
	// contains filtered or unexported fields
}

TipLogEdges holds the relations/edges for other nodes in the graph.

func (TipLogEdges) TipsGivenOrErr

func (e TipLogEdges) TipsGivenOrErr() (*User, error)

TipsGivenOrErr returns the TipsGiven value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TipLogEdges) TipsReceivedOrErr

func (e TipLogEdges) TipsReceivedOrErr() (*User, error)

TipsReceivedOrErr returns the TipsReceived value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type TipLogGroupBy

type TipLogGroupBy struct {
	// contains filtered or unexported fields
}

TipLogGroupBy is the group-by builder for TipLog entities.

func (*TipLogGroupBy) Aggregate

func (tlgb *TipLogGroupBy) Aggregate(fns ...AggregateFunc) *TipLogGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TipLogGroupBy) Bool

func (s *TipLogGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TipLogGroupBy) BoolX

func (s *TipLogGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TipLogGroupBy) Bools

func (s *TipLogGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TipLogGroupBy) BoolsX

func (s *TipLogGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TipLogGroupBy) Float64

func (s *TipLogGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TipLogGroupBy) Float64X

func (s *TipLogGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TipLogGroupBy) Float64s

func (s *TipLogGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TipLogGroupBy) Float64sX

func (s *TipLogGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TipLogGroupBy) Int

func (s *TipLogGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TipLogGroupBy) IntX

func (s *TipLogGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TipLogGroupBy) Ints

func (s *TipLogGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TipLogGroupBy) IntsX

func (s *TipLogGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TipLogGroupBy) Scan

func (tlgb *TipLogGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TipLogGroupBy) ScanX

func (s *TipLogGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TipLogGroupBy) String

func (s *TipLogGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TipLogGroupBy) StringX

func (s *TipLogGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TipLogGroupBy) Strings

func (s *TipLogGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TipLogGroupBy) StringsX

func (s *TipLogGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TipLogMutation

type TipLogMutation struct {
	// contains filtered or unexported fields
}

TipLogMutation represents an operation that mutates the TipLog nodes in the graph.

func (*TipLogMutation) AddAmount

func (m *TipLogMutation) AddAmount(i int32)

AddAmount adds i to the "amount" field.

func (*TipLogMutation) AddField

func (m *TipLogMutation) 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 (*TipLogMutation) AddedAmount

func (m *TipLogMutation) AddedAmount() (r int32, exists bool)

AddedAmount returns the value that was added to the "amount" field in this mutation.

func (*TipLogMutation) AddedEdges

func (m *TipLogMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TipLogMutation) AddedField

func (m *TipLogMutation) 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 (*TipLogMutation) AddedFields

func (m *TipLogMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TipLogMutation) AddedIDs

func (m *TipLogMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TipLogMutation) Amount

func (m *TipLogMutation) Amount() (r int32, exists bool)

Amount returns the value of the "amount" field in the mutation.

func (*TipLogMutation) ClearEdge

func (m *TipLogMutation) 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 (*TipLogMutation) ClearField

func (m *TipLogMutation) 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 (*TipLogMutation) ClearTippedTo

func (m *TipLogMutation) ClearTippedTo()

ClearTippedTo clears the value of the "tipped_to" field.

func (*TipLogMutation) ClearTipsGiven

func (m *TipLogMutation) ClearTipsGiven()

ClearTipsGiven clears the "tips_given" edge to the User entity.

func (*TipLogMutation) ClearTipsReceived

func (m *TipLogMutation) ClearTipsReceived()

ClearTipsReceived clears the "tips_received" edge to the User entity.

func (*TipLogMutation) ClearedEdges

func (m *TipLogMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TipLogMutation) ClearedFields

func (m *TipLogMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TipLogMutation) Client

func (m TipLogMutation) 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 (*TipLogMutation) CreatedAt

func (m *TipLogMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*TipLogMutation) EdgeCleared

func (m *TipLogMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TipLogMutation) ExecContext

func (c *TipLogMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TipLogMutation) Field

func (m *TipLogMutation) 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 (*TipLogMutation) FieldCleared

func (m *TipLogMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TipLogMutation) Fields

func (m *TipLogMutation) 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 (*TipLogMutation) ID

func (m *TipLogMutation) 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 (*TipLogMutation) IDs

func (m *TipLogMutation) 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 (*TipLogMutation) OldAmount

func (m *TipLogMutation) OldAmount(ctx context.Context) (v int32, err error)

OldAmount returns the old "amount" field's value of the TipLog entity. If the TipLog 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 (*TipLogMutation) OldCreatedAt

func (m *TipLogMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the TipLog entity. If the TipLog 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 (*TipLogMutation) OldField

func (m *TipLogMutation) 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 (*TipLogMutation) OldTippedBy

func (m *TipLogMutation) OldTippedBy(ctx context.Context) (v uuid.UUID, err error)

OldTippedBy returns the old "tipped_by" field's value of the TipLog entity. If the TipLog 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 (*TipLogMutation) OldTippedTo

func (m *TipLogMutation) OldTippedTo(ctx context.Context) (v *uuid.UUID, err error)

OldTippedTo returns the old "tipped_to" field's value of the TipLog entity. If the TipLog 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 (*TipLogMutation) OldTippedToDiscordID

func (m *TipLogMutation) OldTippedToDiscordID(ctx context.Context) (v string, err error)

OldTippedToDiscordID returns the old "tipped_to_discord_id" field's value of the TipLog entity. If the TipLog 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 (*TipLogMutation) OldUpdatedAt

func (m *TipLogMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the TipLog entity. If the TipLog 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 (*TipLogMutation) Op

func (m *TipLogMutation) Op() Op

Op returns the operation name.

func (*TipLogMutation) QueryContext

func (c *TipLogMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TipLogMutation) RemovedEdges

func (m *TipLogMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TipLogMutation) RemovedIDs

func (m *TipLogMutation) 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 (*TipLogMutation) ResetAmount

func (m *TipLogMutation) ResetAmount()

ResetAmount resets all changes to the "amount" field.

func (*TipLogMutation) ResetCreatedAt

func (m *TipLogMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*TipLogMutation) ResetEdge

func (m *TipLogMutation) 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 (*TipLogMutation) ResetField

func (m *TipLogMutation) 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 (*TipLogMutation) ResetTippedBy

func (m *TipLogMutation) ResetTippedBy()

ResetTippedBy resets all changes to the "tipped_by" field.

func (*TipLogMutation) ResetTippedTo

func (m *TipLogMutation) ResetTippedTo()

ResetTippedTo resets all changes to the "tipped_to" field.

func (*TipLogMutation) ResetTippedToDiscordID

func (m *TipLogMutation) ResetTippedToDiscordID()

ResetTippedToDiscordID resets all changes to the "tipped_to_discord_id" field.

func (*TipLogMutation) ResetTipsGiven

func (m *TipLogMutation) ResetTipsGiven()

ResetTipsGiven resets all changes to the "tips_given" edge.

func (*TipLogMutation) ResetTipsReceived

func (m *TipLogMutation) ResetTipsReceived()

ResetTipsReceived resets all changes to the "tips_received" edge.

func (*TipLogMutation) ResetUpdatedAt

func (m *TipLogMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*TipLogMutation) SetAmount

func (m *TipLogMutation) SetAmount(i int32)

SetAmount sets the "amount" field.

func (*TipLogMutation) SetCreatedAt

func (m *TipLogMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*TipLogMutation) SetField

func (m *TipLogMutation) 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 (*TipLogMutation) SetID

func (m *TipLogMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of TipLog entities.

func (*TipLogMutation) SetOp

func (m *TipLogMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TipLogMutation) SetTippedBy

func (m *TipLogMutation) SetTippedBy(u uuid.UUID)

SetTippedBy sets the "tipped_by" field.

func (*TipLogMutation) SetTippedTo

func (m *TipLogMutation) SetTippedTo(u uuid.UUID)

SetTippedTo sets the "tipped_to" field.

func (*TipLogMutation) SetTippedToDiscordID

func (m *TipLogMutation) SetTippedToDiscordID(s string)

SetTippedToDiscordID sets the "tipped_to_discord_id" field.

func (*TipLogMutation) SetTipsGivenID

func (m *TipLogMutation) SetTipsGivenID(id uuid.UUID)

SetTipsGivenID sets the "tips_given" edge to the User entity by id.

func (*TipLogMutation) SetTipsReceivedID

func (m *TipLogMutation) SetTipsReceivedID(id uuid.UUID)

SetTipsReceivedID sets the "tips_received" edge to the User entity by id.

func (*TipLogMutation) SetUpdatedAt

func (m *TipLogMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*TipLogMutation) TippedBy

func (m *TipLogMutation) TippedBy() (r uuid.UUID, exists bool)

TippedBy returns the value of the "tipped_by" field in the mutation.

func (*TipLogMutation) TippedTo

func (m *TipLogMutation) TippedTo() (r uuid.UUID, exists bool)

TippedTo returns the value of the "tipped_to" field in the mutation.

func (*TipLogMutation) TippedToCleared

func (m *TipLogMutation) TippedToCleared() bool

TippedToCleared returns if the "tipped_to" field was cleared in this mutation.

func (*TipLogMutation) TippedToDiscordID

func (m *TipLogMutation) TippedToDiscordID() (r string, exists bool)

TippedToDiscordID returns the value of the "tipped_to_discord_id" field in the mutation.

func (*TipLogMutation) TipsGivenCleared

func (m *TipLogMutation) TipsGivenCleared() bool

TipsGivenCleared reports if the "tips_given" edge to the User entity was cleared.

func (*TipLogMutation) TipsGivenID

func (m *TipLogMutation) TipsGivenID() (id uuid.UUID, exists bool)

TipsGivenID returns the "tips_given" edge ID in the mutation.

func (*TipLogMutation) TipsGivenIDs

func (m *TipLogMutation) TipsGivenIDs() (ids []uuid.UUID)

TipsGivenIDs returns the "tips_given" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TipsGivenID instead. It exists only for internal usage by the builders.

func (*TipLogMutation) TipsReceivedCleared

func (m *TipLogMutation) TipsReceivedCleared() bool

TipsReceivedCleared reports if the "tips_received" edge to the User entity was cleared.

func (*TipLogMutation) TipsReceivedID

func (m *TipLogMutation) TipsReceivedID() (id uuid.UUID, exists bool)

TipsReceivedID returns the "tips_received" edge ID in the mutation.

func (*TipLogMutation) TipsReceivedIDs

func (m *TipLogMutation) TipsReceivedIDs() (ids []uuid.UUID)

TipsReceivedIDs returns the "tips_received" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TipsReceivedID instead. It exists only for internal usage by the builders.

func (TipLogMutation) Tx

func (m TipLogMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TipLogMutation) Type

func (m *TipLogMutation) Type() string

Type returns the node type of this mutation (TipLog).

func (*TipLogMutation) UpdatedAt

func (m *TipLogMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*TipLogMutation) Where

func (m *TipLogMutation) Where(ps ...predicate.TipLog)

Where appends a list predicates to the TipLogMutation builder.

func (*TipLogMutation) WhereP

func (m *TipLogMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TipLogMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TipLogQuery

type TipLogQuery struct {
	// contains filtered or unexported fields
}

TipLogQuery is the builder for querying TipLog entities.

func (*TipLogQuery) Aggregate

func (tlq *TipLogQuery) Aggregate(fns ...AggregateFunc) *TipLogSelect

Aggregate returns a TipLogSelect configured with the given aggregations.

func (*TipLogQuery) All

func (tlq *TipLogQuery) All(ctx context.Context) ([]*TipLog, error)

All executes the query and returns a list of TipLogs.

func (*TipLogQuery) AllX

func (tlq *TipLogQuery) AllX(ctx context.Context) []*TipLog

AllX is like All, but panics if an error occurs.

func (*TipLogQuery) Clone

func (tlq *TipLogQuery) Clone() *TipLogQuery

Clone returns a duplicate of the TipLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TipLogQuery) Count

func (tlq *TipLogQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TipLogQuery) CountX

func (tlq *TipLogQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TipLogQuery) ExecContext

func (c *TipLogQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TipLogQuery) Exist

func (tlq *TipLogQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TipLogQuery) ExistX

func (tlq *TipLogQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TipLogQuery) First

func (tlq *TipLogQuery) First(ctx context.Context) (*TipLog, error)

First returns the first TipLog entity from the query. Returns a *NotFoundError when no TipLog was found.

func (*TipLogQuery) FirstID

func (tlq *TipLogQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first TipLog ID from the query. Returns a *NotFoundError when no TipLog ID was found.

func (*TipLogQuery) FirstIDX

func (tlq *TipLogQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*TipLogQuery) FirstX

func (tlq *TipLogQuery) FirstX(ctx context.Context) *TipLog

FirstX is like First, but panics if an error occurs.

func (*TipLogQuery) GroupBy

func (tlq *TipLogQuery) GroupBy(field string, fields ...string) *TipLogGroupBy

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 {
	Amount int32 `json:"amount,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TipLog.Query().
	GroupBy(tiplog.FieldAmount).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TipLogQuery) IDs

func (tlq *TipLogQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of TipLog IDs.

func (*TipLogQuery) IDsX

func (tlq *TipLogQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*TipLogQuery) Limit

func (tlq *TipLogQuery) Limit(limit int) *TipLogQuery

Limit the number of records to be returned by this query.

func (*TipLogQuery) Modify

func (tlq *TipLogQuery) Modify(modifiers ...func(s *sql.Selector)) *TipLogSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*TipLogQuery) Offset

func (tlq *TipLogQuery) Offset(offset int) *TipLogQuery

Offset to start from.

func (*TipLogQuery) Only

func (tlq *TipLogQuery) Only(ctx context.Context) (*TipLog, error)

Only returns a single TipLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TipLog entity is found. Returns a *NotFoundError when no TipLog entities are found.

func (*TipLogQuery) OnlyID

func (tlq *TipLogQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only TipLog ID in the query. Returns a *NotSingularError when more than one TipLog ID is found. Returns a *NotFoundError when no entities are found.

func (*TipLogQuery) OnlyIDX

func (tlq *TipLogQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TipLogQuery) OnlyX

func (tlq *TipLogQuery) OnlyX(ctx context.Context) *TipLog

OnlyX is like Only, but panics if an error occurs.

func (*TipLogQuery) Order

func (tlq *TipLogQuery) Order(o ...OrderFunc) *TipLogQuery

Order specifies how the records should be ordered.

func (*TipLogQuery) QueryContext

func (c *TipLogQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TipLogQuery) QueryTipsGiven

func (tlq *TipLogQuery) QueryTipsGiven() *UserQuery

QueryTipsGiven chains the current query on the "tips_given" edge.

func (*TipLogQuery) QueryTipsReceived

func (tlq *TipLogQuery) QueryTipsReceived() *UserQuery

QueryTipsReceived chains the current query on the "tips_received" edge.

func (*TipLogQuery) Select

func (tlq *TipLogQuery) Select(fields ...string) *TipLogSelect

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 {
	Amount int32 `json:"amount,omitempty"`
}

client.TipLog.Query().
	Select(tiplog.FieldAmount).
	Scan(ctx, &v)

func (*TipLogQuery) Unique

func (tlq *TipLogQuery) Unique(unique bool) *TipLogQuery

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 (*TipLogQuery) Where

func (tlq *TipLogQuery) Where(ps ...predicate.TipLog) *TipLogQuery

Where adds a new predicate for the TipLogQuery builder.

func (*TipLogQuery) WithTipsGiven

func (tlq *TipLogQuery) WithTipsGiven(opts ...func(*UserQuery)) *TipLogQuery

WithTipsGiven tells the query-builder to eager-load the nodes that are connected to the "tips_given" edge. The optional arguments are used to configure the query builder of the edge.

func (*TipLogQuery) WithTipsReceived

func (tlq *TipLogQuery) WithTipsReceived(opts ...func(*UserQuery)) *TipLogQuery

WithTipsReceived tells the query-builder to eager-load the nodes that are connected to the "tips_received" edge. The optional arguments are used to configure the query builder of the edge.

type TipLogSelect

type TipLogSelect struct {
	*TipLogQuery
	// contains filtered or unexported fields
}

TipLogSelect is the builder for selecting fields of TipLog entities.

func (*TipLogSelect) Aggregate

func (tls *TipLogSelect) Aggregate(fns ...AggregateFunc) *TipLogSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TipLogSelect) Bool

func (s *TipLogSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TipLogSelect) BoolX

func (s *TipLogSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TipLogSelect) Bools

func (s *TipLogSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TipLogSelect) BoolsX

func (s *TipLogSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (TipLogSelect) ExecContext

func (c TipLogSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TipLogSelect) Float64

func (s *TipLogSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TipLogSelect) Float64X

func (s *TipLogSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TipLogSelect) Float64s

func (s *TipLogSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TipLogSelect) Float64sX

func (s *TipLogSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TipLogSelect) Int

func (s *TipLogSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TipLogSelect) IntX

func (s *TipLogSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TipLogSelect) Ints

func (s *TipLogSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TipLogSelect) IntsX

func (s *TipLogSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TipLogSelect) Modify

func (tls *TipLogSelect) Modify(modifiers ...func(s *sql.Selector)) *TipLogSelect

Modify adds a query modifier for attaching custom logic to queries.

func (TipLogSelect) QueryContext

func (c TipLogSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TipLogSelect) Scan

func (tls *TipLogSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TipLogSelect) ScanX

func (s *TipLogSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TipLogSelect) String

func (s *TipLogSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TipLogSelect) StringX

func (s *TipLogSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TipLogSelect) Strings

func (s *TipLogSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TipLogSelect) StringsX

func (s *TipLogSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TipLogUpdate

type TipLogUpdate struct {
	// contains filtered or unexported fields
}

TipLogUpdate is the builder for updating TipLog entities.

func (*TipLogUpdate) AddAmount

func (tlu *TipLogUpdate) AddAmount(i int32) *TipLogUpdate

AddAmount adds i to the "amount" field.

func (*TipLogUpdate) ClearTippedTo

func (tlu *TipLogUpdate) ClearTippedTo() *TipLogUpdate

ClearTippedTo clears the value of the "tipped_to" field.

func (*TipLogUpdate) ClearTipsGiven

func (tlu *TipLogUpdate) ClearTipsGiven() *TipLogUpdate

ClearTipsGiven clears the "tips_given" edge to the User entity.

func (*TipLogUpdate) ClearTipsReceived

func (tlu *TipLogUpdate) ClearTipsReceived() *TipLogUpdate

ClearTipsReceived clears the "tips_received" edge to the User entity.

func (*TipLogUpdate) Exec

func (tlu *TipLogUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TipLogUpdate) ExecContext

func (c *TipLogUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TipLogUpdate) ExecX

func (tlu *TipLogUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TipLogUpdate) Modify

func (tlu *TipLogUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TipLogUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TipLogUpdate) Mutation

func (tlu *TipLogUpdate) Mutation() *TipLogMutation

Mutation returns the TipLogMutation object of the builder.

func (*TipLogUpdate) QueryContext

func (c *TipLogUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TipLogUpdate) Save

func (tlu *TipLogUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TipLogUpdate) SaveX

func (tlu *TipLogUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TipLogUpdate) SetAmount

func (tlu *TipLogUpdate) SetAmount(i int32) *TipLogUpdate

SetAmount sets the "amount" field.

func (*TipLogUpdate) SetNillableTippedTo

func (tlu *TipLogUpdate) SetNillableTippedTo(u *uuid.UUID) *TipLogUpdate

SetNillableTippedTo sets the "tipped_to" field if the given value is not nil.

func (*TipLogUpdate) SetNillableTipsReceivedID

func (tlu *TipLogUpdate) SetNillableTipsReceivedID(id *uuid.UUID) *TipLogUpdate

SetNillableTipsReceivedID sets the "tips_received" edge to the User entity by ID if the given value is not nil.

func (*TipLogUpdate) SetTippedBy

func (tlu *TipLogUpdate) SetTippedBy(u uuid.UUID) *TipLogUpdate

SetTippedBy sets the "tipped_by" field.

func (*TipLogUpdate) SetTippedTo

func (tlu *TipLogUpdate) SetTippedTo(u uuid.UUID) *TipLogUpdate

SetTippedTo sets the "tipped_to" field.

func (*TipLogUpdate) SetTippedToDiscordID

func (tlu *TipLogUpdate) SetTippedToDiscordID(s string) *TipLogUpdate

SetTippedToDiscordID sets the "tipped_to_discord_id" field.

func (*TipLogUpdate) SetTipsGiven

func (tlu *TipLogUpdate) SetTipsGiven(u *User) *TipLogUpdate

SetTipsGiven sets the "tips_given" edge to the User entity.

func (*TipLogUpdate) SetTipsGivenID

func (tlu *TipLogUpdate) SetTipsGivenID(id uuid.UUID) *TipLogUpdate

SetTipsGivenID sets the "tips_given" edge to the User entity by ID.

func (*TipLogUpdate) SetTipsReceived

func (tlu *TipLogUpdate) SetTipsReceived(u *User) *TipLogUpdate

SetTipsReceived sets the "tips_received" edge to the User entity.

func (*TipLogUpdate) SetTipsReceivedID

func (tlu *TipLogUpdate) SetTipsReceivedID(id uuid.UUID) *TipLogUpdate

SetTipsReceivedID sets the "tips_received" edge to the User entity by ID.

func (*TipLogUpdate) SetUpdatedAt

func (tlu *TipLogUpdate) SetUpdatedAt(t time.Time) *TipLogUpdate

SetUpdatedAt sets the "updated_at" field.

func (*TipLogUpdate) Where

func (tlu *TipLogUpdate) Where(ps ...predicate.TipLog) *TipLogUpdate

Where appends a list predicates to the TipLogUpdate builder.

type TipLogUpdateOne

type TipLogUpdateOne struct {
	// contains filtered or unexported fields
}

TipLogUpdateOne is the builder for updating a single TipLog entity.

func (*TipLogUpdateOne) AddAmount

func (tluo *TipLogUpdateOne) AddAmount(i int32) *TipLogUpdateOne

AddAmount adds i to the "amount" field.

func (*TipLogUpdateOne) ClearTippedTo

func (tluo *TipLogUpdateOne) ClearTippedTo() *TipLogUpdateOne

ClearTippedTo clears the value of the "tipped_to" field.

func (*TipLogUpdateOne) ClearTipsGiven

func (tluo *TipLogUpdateOne) ClearTipsGiven() *TipLogUpdateOne

ClearTipsGiven clears the "tips_given" edge to the User entity.

func (*TipLogUpdateOne) ClearTipsReceived

func (tluo *TipLogUpdateOne) ClearTipsReceived() *TipLogUpdateOne

ClearTipsReceived clears the "tips_received" edge to the User entity.

func (*TipLogUpdateOne) Exec

func (tluo *TipLogUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TipLogUpdateOne) ExecContext

func (c *TipLogUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*TipLogUpdateOne) ExecX

func (tluo *TipLogUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TipLogUpdateOne) Modify

func (tluo *TipLogUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TipLogUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*TipLogUpdateOne) Mutation

func (tluo *TipLogUpdateOne) Mutation() *TipLogMutation

Mutation returns the TipLogMutation object of the builder.

func (*TipLogUpdateOne) QueryContext

func (c *TipLogUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*TipLogUpdateOne) Save

func (tluo *TipLogUpdateOne) Save(ctx context.Context) (*TipLog, error)

Save executes the query and returns the updated TipLog entity.

func (*TipLogUpdateOne) SaveX

func (tluo *TipLogUpdateOne) SaveX(ctx context.Context) *TipLog

SaveX is like Save, but panics if an error occurs.

func (*TipLogUpdateOne) Select

func (tluo *TipLogUpdateOne) Select(field string, fields ...string) *TipLogUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TipLogUpdateOne) SetAmount

func (tluo *TipLogUpdateOne) SetAmount(i int32) *TipLogUpdateOne

SetAmount sets the "amount" field.

func (*TipLogUpdateOne) SetNillableTippedTo

func (tluo *TipLogUpdateOne) SetNillableTippedTo(u *uuid.UUID) *TipLogUpdateOne

SetNillableTippedTo sets the "tipped_to" field if the given value is not nil.

func (*TipLogUpdateOne) SetNillableTipsReceivedID

func (tluo *TipLogUpdateOne) SetNillableTipsReceivedID(id *uuid.UUID) *TipLogUpdateOne

SetNillableTipsReceivedID sets the "tips_received" edge to the User entity by ID if the given value is not nil.

func (*TipLogUpdateOne) SetTippedBy

func (tluo *TipLogUpdateOne) SetTippedBy(u uuid.UUID) *TipLogUpdateOne

SetTippedBy sets the "tipped_by" field.

func (*TipLogUpdateOne) SetTippedTo

func (tluo *TipLogUpdateOne) SetTippedTo(u uuid.UUID) *TipLogUpdateOne

SetTippedTo sets the "tipped_to" field.

func (*TipLogUpdateOne) SetTippedToDiscordID

func (tluo *TipLogUpdateOne) SetTippedToDiscordID(s string) *TipLogUpdateOne

SetTippedToDiscordID sets the "tipped_to_discord_id" field.

func (*TipLogUpdateOne) SetTipsGiven

func (tluo *TipLogUpdateOne) SetTipsGiven(u *User) *TipLogUpdateOne

SetTipsGiven sets the "tips_given" edge to the User entity.

func (*TipLogUpdateOne) SetTipsGivenID

func (tluo *TipLogUpdateOne) SetTipsGivenID(id uuid.UUID) *TipLogUpdateOne

SetTipsGivenID sets the "tips_given" edge to the User entity by ID.

func (*TipLogUpdateOne) SetTipsReceived

func (tluo *TipLogUpdateOne) SetTipsReceived(u *User) *TipLogUpdateOne

SetTipsReceived sets the "tips_received" edge to the User entity.

func (*TipLogUpdateOne) SetTipsReceivedID

func (tluo *TipLogUpdateOne) SetTipsReceivedID(id uuid.UUID) *TipLogUpdateOne

SetTipsReceivedID sets the "tips_received" edge to the User entity by ID.

func (*TipLogUpdateOne) SetUpdatedAt

func (tluo *TipLogUpdateOne) SetUpdatedAt(t time.Time) *TipLogUpdateOne

SetUpdatedAt sets the "updated_at" field.

type TipLogUpsert

type TipLogUpsert struct {
	*sql.UpdateSet
}

TipLogUpsert is the "OnConflict" setter.

func (*TipLogUpsert) AddAmount

func (u *TipLogUpsert) AddAmount(v int32) *TipLogUpsert

AddAmount adds v to the "amount" field.

func (*TipLogUpsert) ClearTippedTo

func (u *TipLogUpsert) ClearTippedTo() *TipLogUpsert

ClearTippedTo clears the value of the "tipped_to" field.

func (*TipLogUpsert) SetAmount

func (u *TipLogUpsert) SetAmount(v int32) *TipLogUpsert

SetAmount sets the "amount" field.

func (*TipLogUpsert) SetTippedBy

func (u *TipLogUpsert) SetTippedBy(v uuid.UUID) *TipLogUpsert

SetTippedBy sets the "tipped_by" field.

func (*TipLogUpsert) SetTippedTo

func (u *TipLogUpsert) SetTippedTo(v uuid.UUID) *TipLogUpsert

SetTippedTo sets the "tipped_to" field.

func (*TipLogUpsert) SetTippedToDiscordID

func (u *TipLogUpsert) SetTippedToDiscordID(v string) *TipLogUpsert

SetTippedToDiscordID sets the "tipped_to_discord_id" field.

func (*TipLogUpsert) SetUpdatedAt

func (u *TipLogUpsert) SetUpdatedAt(v time.Time) *TipLogUpsert

SetUpdatedAt sets the "updated_at" field.

func (*TipLogUpsert) UpdateAmount

func (u *TipLogUpsert) UpdateAmount() *TipLogUpsert

UpdateAmount sets the "amount" field to the value that was provided on create.

func (*TipLogUpsert) UpdateTippedBy

func (u *TipLogUpsert) UpdateTippedBy() *TipLogUpsert

UpdateTippedBy sets the "tipped_by" field to the value that was provided on create.

func (*TipLogUpsert) UpdateTippedTo

func (u *TipLogUpsert) UpdateTippedTo() *TipLogUpsert

UpdateTippedTo sets the "tipped_to" field to the value that was provided on create.

func (*TipLogUpsert) UpdateTippedToDiscordID

func (u *TipLogUpsert) UpdateTippedToDiscordID() *TipLogUpsert

UpdateTippedToDiscordID sets the "tipped_to_discord_id" field to the value that was provided on create.

func (*TipLogUpsert) UpdateUpdatedAt

func (u *TipLogUpsert) UpdateUpdatedAt() *TipLogUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type TipLogUpsertBulk

type TipLogUpsertBulk struct {
	// contains filtered or unexported fields
}

TipLogUpsertBulk is the builder for "upsert"-ing a bulk of TipLog nodes.

func (*TipLogUpsertBulk) AddAmount

func (u *TipLogUpsertBulk) AddAmount(v int32) *TipLogUpsertBulk

AddAmount adds v to the "amount" field.

func (*TipLogUpsertBulk) ClearTippedTo

func (u *TipLogUpsertBulk) ClearTippedTo() *TipLogUpsertBulk

ClearTippedTo clears the value of the "tipped_to" field.

func (*TipLogUpsertBulk) DoNothing

func (u *TipLogUpsertBulk) DoNothing() *TipLogUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TipLogUpsertBulk) Exec

func (u *TipLogUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TipLogUpsertBulk) ExecX

func (u *TipLogUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TipLogUpsertBulk) Ignore

func (u *TipLogUpsertBulk) Ignore() *TipLogUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TipLog.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TipLogUpsertBulk) SetAmount

func (u *TipLogUpsertBulk) SetAmount(v int32) *TipLogUpsertBulk

SetAmount sets the "amount" field.

func (*TipLogUpsertBulk) SetTippedBy

func (u *TipLogUpsertBulk) SetTippedBy(v uuid.UUID) *TipLogUpsertBulk

SetTippedBy sets the "tipped_by" field.

func (*TipLogUpsertBulk) SetTippedTo

func (u *TipLogUpsertBulk) SetTippedTo(v uuid.UUID) *TipLogUpsertBulk

SetTippedTo sets the "tipped_to" field.

func (*TipLogUpsertBulk) SetTippedToDiscordID

func (u *TipLogUpsertBulk) SetTippedToDiscordID(v string) *TipLogUpsertBulk

SetTippedToDiscordID sets the "tipped_to_discord_id" field.

func (*TipLogUpsertBulk) SetUpdatedAt

func (u *TipLogUpsertBulk) SetUpdatedAt(v time.Time) *TipLogUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*TipLogUpsertBulk) Update

func (u *TipLogUpsertBulk) Update(set func(*TipLogUpsert)) *TipLogUpsertBulk

Update allows overriding fields `UPDATE` values. See the TipLogCreateBulk.OnConflict documentation for more info.

func (*TipLogUpsertBulk) UpdateAmount

func (u *TipLogUpsertBulk) UpdateAmount() *TipLogUpsertBulk

UpdateAmount sets the "amount" field to the value that was provided on create.

func (*TipLogUpsertBulk) UpdateNewValues

func (u *TipLogUpsertBulk) UpdateNewValues() *TipLogUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.TipLog.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(tiplog.FieldID)
		}),
	).
	Exec(ctx)

func (*TipLogUpsertBulk) UpdateTippedBy

func (u *TipLogUpsertBulk) UpdateTippedBy() *TipLogUpsertBulk

UpdateTippedBy sets the "tipped_by" field to the value that was provided on create.

func (*TipLogUpsertBulk) UpdateTippedTo

func (u *TipLogUpsertBulk) UpdateTippedTo() *TipLogUpsertBulk

UpdateTippedTo sets the "tipped_to" field to the value that was provided on create.

func (*TipLogUpsertBulk) UpdateTippedToDiscordID

func (u *TipLogUpsertBulk) UpdateTippedToDiscordID() *TipLogUpsertBulk

UpdateTippedToDiscordID sets the "tipped_to_discord_id" field to the value that was provided on create.

func (*TipLogUpsertBulk) UpdateUpdatedAt

func (u *TipLogUpsertBulk) UpdateUpdatedAt() *TipLogUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type TipLogUpsertOne

type TipLogUpsertOne struct {
	// contains filtered or unexported fields
}

TipLogUpsertOne is the builder for "upsert"-ing

one TipLog node.

func (*TipLogUpsertOne) AddAmount

func (u *TipLogUpsertOne) AddAmount(v int32) *TipLogUpsertOne

AddAmount adds v to the "amount" field.

func (*TipLogUpsertOne) ClearTippedTo

func (u *TipLogUpsertOne) ClearTippedTo() *TipLogUpsertOne

ClearTippedTo clears the value of the "tipped_to" field.

func (*TipLogUpsertOne) DoNothing

func (u *TipLogUpsertOne) DoNothing() *TipLogUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TipLogUpsertOne) Exec

func (u *TipLogUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*TipLogUpsertOne) ExecX

func (u *TipLogUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TipLogUpsertOne) ID

func (u *TipLogUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TipLogUpsertOne) IDX

func (u *TipLogUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*TipLogUpsertOne) Ignore

func (u *TipLogUpsertOne) Ignore() *TipLogUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TipLog.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TipLogUpsertOne) SetAmount

func (u *TipLogUpsertOne) SetAmount(v int32) *TipLogUpsertOne

SetAmount sets the "amount" field.

func (*TipLogUpsertOne) SetTippedBy

func (u *TipLogUpsertOne) SetTippedBy(v uuid.UUID) *TipLogUpsertOne

SetTippedBy sets the "tipped_by" field.

func (*TipLogUpsertOne) SetTippedTo

func (u *TipLogUpsertOne) SetTippedTo(v uuid.UUID) *TipLogUpsertOne

SetTippedTo sets the "tipped_to" field.

func (*TipLogUpsertOne) SetTippedToDiscordID

func (u *TipLogUpsertOne) SetTippedToDiscordID(v string) *TipLogUpsertOne

SetTippedToDiscordID sets the "tipped_to_discord_id" field.

func (*TipLogUpsertOne) SetUpdatedAt

func (u *TipLogUpsertOne) SetUpdatedAt(v time.Time) *TipLogUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*TipLogUpsertOne) Update

func (u *TipLogUpsertOne) Update(set func(*TipLogUpsert)) *TipLogUpsertOne

Update allows overriding fields `UPDATE` values. See the TipLogCreate.OnConflict documentation for more info.

func (*TipLogUpsertOne) UpdateAmount

func (u *TipLogUpsertOne) UpdateAmount() *TipLogUpsertOne

UpdateAmount sets the "amount" field to the value that was provided on create.

func (*TipLogUpsertOne) UpdateNewValues

func (u *TipLogUpsertOne) UpdateNewValues() *TipLogUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.TipLog.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(tiplog.FieldID)
		}),
	).
	Exec(ctx)

func (*TipLogUpsertOne) UpdateTippedBy

func (u *TipLogUpsertOne) UpdateTippedBy() *TipLogUpsertOne

UpdateTippedBy sets the "tipped_by" field to the value that was provided on create.

func (*TipLogUpsertOne) UpdateTippedTo

func (u *TipLogUpsertOne) UpdateTippedTo() *TipLogUpsertOne

UpdateTippedTo sets the "tipped_to" field to the value that was provided on create.

func (*TipLogUpsertOne) UpdateTippedToDiscordID

func (u *TipLogUpsertOne) UpdateTippedToDiscordID() *TipLogUpsertOne

UpdateTippedToDiscordID sets the "tipped_to_discord_id" field to the value that was provided on create.

func (*TipLogUpsertOne) UpdateUpdatedAt

func (u *TipLogUpsertOne) UpdateUpdatedAt() *TipLogUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type TipLogs

type TipLogs []*TipLog

TipLogs is a parsable slice of TipLog.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// ApiToken is the client for interacting with the ApiToken builders.
	ApiToken *ApiTokenClient
	// AuthClient is the client for interacting with the AuthClient builders.
	AuthClient *AuthClientClient
	// BannedWords is the client for interacting with the BannedWords builders.
	BannedWords *BannedWordsClient
	// Credit is the client for interacting with the Credit builders.
	Credit *CreditClient
	// CreditType is the client for interacting with the CreditType builders.
	CreditType *CreditTypeClient
	// DeviceInfo is the client for interacting with the DeviceInfo builders.
	DeviceInfo *DeviceInfoClient
	// DisposableEmail is the client for interacting with the DisposableEmail builders.
	DisposableEmail *DisposableEmailClient
	// Generation is the client for interacting with the Generation builders.
	Generation *GenerationClient
	// GenerationModel is the client for interacting with the GenerationModel builders.
	GenerationModel *GenerationModelClient
	// GenerationOutput is the client for interacting with the GenerationOutput builders.
	GenerationOutput *GenerationOutputClient
	// GenerationOutputLike is the client for interacting with the GenerationOutputLike builders.
	GenerationOutputLike *GenerationOutputLikeClient
	// IPBlackList is the client for interacting with the IPBlackList builders.
	IPBlackList *IPBlackListClient
	// MqLog is the client for interacting with the MqLog builders.
	MqLog *MqLogClient
	// NegativePrompt is the client for interacting with the NegativePrompt builders.
	NegativePrompt *NegativePromptClient
	// Prompt is the client for interacting with the Prompt builders.
	Prompt *PromptClient
	// Role is the client for interacting with the Role builders.
	Role *RoleClient
	// Scheduler is the client for interacting with the Scheduler builders.
	Scheduler *SchedulerClient
	// ThumbmarkIdBlackList is the client for interacting with the ThumbmarkIdBlackList builders.
	ThumbmarkIdBlackList *ThumbmarkIdBlackListClient
	// TipLog is the client for interacting with the TipLog builders.
	TipLog *TipLogClient
	// Upscale is the client for interacting with the Upscale builders.
	Upscale *UpscaleClient
	// UpscaleModel is the client for interacting with the UpscaleModel builders.
	UpscaleModel *UpscaleModelClient
	// UpscaleOutput is the client for interacting with the UpscaleOutput builders.
	UpscaleOutput *UpscaleOutputClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// UsernameBlacklist is the client for interacting with the UsernameBlacklist builders.
	UsernameBlacklist *UsernameBlacklistClient
	// Voiceover is the client for interacting with the Voiceover builders.
	Voiceover *VoiceoverClient
	// VoiceoverModel is the client for interacting with the VoiceoverModel builders.
	VoiceoverModel *VoiceoverModelClient
	// VoiceoverOutput is the client for interacting with the VoiceoverOutput builders.
	VoiceoverOutput *VoiceoverOutputClient
	// VoiceoverSpeaker is the client for interacting with the VoiceoverSpeaker builders.
	VoiceoverSpeaker *VoiceoverSpeakerClient
	// 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) ExecContext

func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type Upscale

type Upscale struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Width holds the value of the "width" field.
	Width int32 `json:"width,omitempty"`
	// Height holds the value of the "height" field.
	Height int32 `json:"height,omitempty"`
	// Scale holds the value of the "scale" field.
	Scale int32 `json:"scale,omitempty"`
	// CountryCode holds the value of the "country_code" field.
	CountryCode *string `json:"country_code,omitempty"`
	// Status holds the value of the "status" field.
	Status upscale.Status `json:"status,omitempty"`
	// FailureReason holds the value of the "failure_reason" field.
	FailureReason *string `json:"failure_reason,omitempty"`
	// StripeProductID holds the value of the "stripe_product_id" field.
	StripeProductID *string `json:"stripe_product_id,omitempty"`
	// SystemGenerated holds the value of the "system_generated" field.
	SystemGenerated bool `json:"system_generated,omitempty"`
	// SourceType holds the value of the "source_type" field.
	SourceType enttypes.SourceType `json:"source_type,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// DeviceInfoID holds the value of the "device_info_id" field.
	DeviceInfoID uuid.UUID `json:"device_info_id,omitempty"`
	// ModelID holds the value of the "model_id" field.
	ModelID uuid.UUID `json:"model_id,omitempty"`
	// APITokenID holds the value of the "api_token_id" field.
	APITokenID *uuid.UUID `json:"api_token_id,omitempty"`
	// StartedAt holds the value of the "started_at" field.
	StartedAt *time.Time `json:"started_at,omitempty"`
	// CompletedAt holds the value of the "completed_at" field.
	CompletedAt *time.Time `json:"completed_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UpscaleQuery when eager-loading is set.
	Edges UpscaleEdges `json:"edges"`
	// contains filtered or unexported fields
}

Upscale is the model entity for the Upscale schema.

func (*Upscale) ExecContext

func (c *Upscale) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Upscale) QueryAPITokens

func (u *Upscale) QueryAPITokens() *ApiTokenQuery

QueryAPITokens queries the "api_tokens" edge of the Upscale entity.

func (*Upscale) QueryContext

func (c *Upscale) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Upscale) QueryDeviceInfo

func (u *Upscale) QueryDeviceInfo() *DeviceInfoQuery

QueryDeviceInfo queries the "device_info" edge of the Upscale entity.

func (*Upscale) QueryUpscaleModels

func (u *Upscale) QueryUpscaleModels() *UpscaleModelQuery

QueryUpscaleModels queries the "upscale_models" edge of the Upscale entity.

func (*Upscale) QueryUpscaleOutputs

func (u *Upscale) QueryUpscaleOutputs() *UpscaleOutputQuery

QueryUpscaleOutputs queries the "upscale_outputs" edge of the Upscale entity.

func (*Upscale) QueryUser

func (u *Upscale) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Upscale entity.

func (*Upscale) String

func (u *Upscale) String() string

String implements the fmt.Stringer.

func (*Upscale) Unwrap

func (u *Upscale) Unwrap() *Upscale

Unwrap unwraps the Upscale 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 (*Upscale) Update

func (u *Upscale) Update() *UpscaleUpdateOne

Update returns a builder for updating this Upscale. Note that you need to call Upscale.Unwrap() before calling this method if this Upscale was returned from a transaction, and the transaction was committed or rolled back.

type UpscaleClient

type UpscaleClient struct {
	// contains filtered or unexported fields
}

UpscaleClient is a client for the Upscale schema.

func NewUpscaleClient

func NewUpscaleClient(c config) *UpscaleClient

NewUpscaleClient returns a client for the Upscale from the given config.

func (*UpscaleClient) Create

func (c *UpscaleClient) Create() *UpscaleCreate

Create returns a builder for creating a Upscale entity.

func (*UpscaleClient) CreateBulk

func (c *UpscaleClient) CreateBulk(builders ...*UpscaleCreate) *UpscaleCreateBulk

CreateBulk returns a builder for creating a bulk of Upscale entities.

func (*UpscaleClient) Delete

func (c *UpscaleClient) Delete() *UpscaleDelete

Delete returns a delete builder for Upscale.

func (*UpscaleClient) DeleteOne

func (c *UpscaleClient) DeleteOne(u *Upscale) *UpscaleDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UpscaleClient) DeleteOneID

func (c *UpscaleClient) DeleteOneID(id uuid.UUID) *UpscaleDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UpscaleClient) ExecContext

func (c *UpscaleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleClient) Get

func (c *UpscaleClient) Get(ctx context.Context, id uuid.UUID) (*Upscale, error)

Get returns a Upscale entity by its id.

func (*UpscaleClient) GetX

func (c *UpscaleClient) GetX(ctx context.Context, id uuid.UUID) *Upscale

GetX is like Get, but panics if an error occurs.

func (*UpscaleClient) Hooks

func (c *UpscaleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UpscaleClient) Intercept

func (c *UpscaleClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `upscale.Intercept(f(g(h())))`.

func (*UpscaleClient) Interceptors

func (c *UpscaleClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UpscaleClient) Query

func (c *UpscaleClient) Query() *UpscaleQuery

Query returns a query builder for Upscale.

func (*UpscaleClient) QueryAPITokens

func (c *UpscaleClient) QueryAPITokens(u *Upscale) *ApiTokenQuery

QueryAPITokens queries the api_tokens edge of a Upscale.

func (*UpscaleClient) QueryContext

func (c *UpscaleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleClient) QueryDeviceInfo

func (c *UpscaleClient) QueryDeviceInfo(u *Upscale) *DeviceInfoQuery

QueryDeviceInfo queries the device_info edge of a Upscale.

func (*UpscaleClient) QueryUpscaleModels

func (c *UpscaleClient) QueryUpscaleModels(u *Upscale) *UpscaleModelQuery

QueryUpscaleModels queries the upscale_models edge of a Upscale.

func (*UpscaleClient) QueryUpscaleOutputs

func (c *UpscaleClient) QueryUpscaleOutputs(u *Upscale) *UpscaleOutputQuery

QueryUpscaleOutputs queries the upscale_outputs edge of a Upscale.

func (*UpscaleClient) QueryUser

func (c *UpscaleClient) QueryUser(u *Upscale) *UserQuery

QueryUser queries the user edge of a Upscale.

func (*UpscaleClient) Update

func (c *UpscaleClient) Update() *UpscaleUpdate

Update returns an update builder for Upscale.

func (*UpscaleClient) UpdateOne

func (c *UpscaleClient) UpdateOne(u *Upscale) *UpscaleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UpscaleClient) UpdateOneID

func (c *UpscaleClient) UpdateOneID(id uuid.UUID) *UpscaleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UpscaleClient) Use

func (c *UpscaleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `upscale.Hooks(f(g(h())))`.

type UpscaleCreate

type UpscaleCreate struct {
	// contains filtered or unexported fields
}

UpscaleCreate is the builder for creating a Upscale entity.

func (*UpscaleCreate) AddUpscaleOutputIDs

func (uc *UpscaleCreate) AddUpscaleOutputIDs(ids ...uuid.UUID) *UpscaleCreate

AddUpscaleOutputIDs adds the "upscale_outputs" edge to the UpscaleOutput entity by IDs.

func (*UpscaleCreate) AddUpscaleOutputs

func (uc *UpscaleCreate) AddUpscaleOutputs(u ...*UpscaleOutput) *UpscaleCreate

AddUpscaleOutputs adds the "upscale_outputs" edges to the UpscaleOutput entity.

func (*UpscaleCreate) Exec

func (uc *UpscaleCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleCreate) ExecContext

func (c *UpscaleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleCreate) ExecX

func (uc *UpscaleCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleCreate) Mutation

func (uc *UpscaleCreate) Mutation() *UpscaleMutation

Mutation returns the UpscaleMutation object of the builder.

func (*UpscaleCreate) OnConflict

func (uc *UpscaleCreate) OnConflict(opts ...sql.ConflictOption) *UpscaleUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Upscale.Create().
	SetWidth(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UpscaleUpsert) {
		SetWidth(v+v).
	}).
	Exec(ctx)

func (*UpscaleCreate) OnConflictColumns

func (uc *UpscaleCreate) OnConflictColumns(columns ...string) *UpscaleUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Upscale.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UpscaleCreate) QueryContext

func (c *UpscaleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleCreate) Save

func (uc *UpscaleCreate) Save(ctx context.Context) (*Upscale, error)

Save creates the Upscale in the database.

func (*UpscaleCreate) SaveX

func (uc *UpscaleCreate) SaveX(ctx context.Context) *Upscale

SaveX calls Save and panics if Save returns an error.

func (*UpscaleCreate) SetAPITokenID

func (uc *UpscaleCreate) SetAPITokenID(u uuid.UUID) *UpscaleCreate

SetAPITokenID sets the "api_token_id" field.

func (*UpscaleCreate) SetAPITokens

func (uc *UpscaleCreate) SetAPITokens(a *ApiToken) *UpscaleCreate

SetAPITokens sets the "api_tokens" edge to the ApiToken entity.

func (*UpscaleCreate) SetAPITokensID

func (uc *UpscaleCreate) SetAPITokensID(id uuid.UUID) *UpscaleCreate

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID.

func (*UpscaleCreate) SetCompletedAt

func (uc *UpscaleCreate) SetCompletedAt(t time.Time) *UpscaleCreate

SetCompletedAt sets the "completed_at" field.

func (*UpscaleCreate) SetCountryCode

func (uc *UpscaleCreate) SetCountryCode(s string) *UpscaleCreate

SetCountryCode sets the "country_code" field.

func (*UpscaleCreate) SetCreatedAt

func (uc *UpscaleCreate) SetCreatedAt(t time.Time) *UpscaleCreate

SetCreatedAt sets the "created_at" field.

func (*UpscaleCreate) SetDeviceInfo

func (uc *UpscaleCreate) SetDeviceInfo(d *DeviceInfo) *UpscaleCreate

SetDeviceInfo sets the "device_info" edge to the DeviceInfo entity.

func (*UpscaleCreate) SetDeviceInfoID

func (uc *UpscaleCreate) SetDeviceInfoID(u uuid.UUID) *UpscaleCreate

SetDeviceInfoID sets the "device_info_id" field.

func (*UpscaleCreate) SetFailureReason

func (uc *UpscaleCreate) SetFailureReason(s string) *UpscaleCreate

SetFailureReason sets the "failure_reason" field.

func (*UpscaleCreate) SetHeight

func (uc *UpscaleCreate) SetHeight(i int32) *UpscaleCreate

SetHeight sets the "height" field.

func (*UpscaleCreate) SetID

func (uc *UpscaleCreate) SetID(u uuid.UUID) *UpscaleCreate

SetID sets the "id" field.

func (*UpscaleCreate) SetModelID

func (uc *UpscaleCreate) SetModelID(u uuid.UUID) *UpscaleCreate

SetModelID sets the "model_id" field.

func (*UpscaleCreate) SetNillableAPITokenID

func (uc *UpscaleCreate) SetNillableAPITokenID(u *uuid.UUID) *UpscaleCreate

SetNillableAPITokenID sets the "api_token_id" field if the given value is not nil.

func (*UpscaleCreate) SetNillableAPITokensID

func (uc *UpscaleCreate) SetNillableAPITokensID(id *uuid.UUID) *UpscaleCreate

SetNillableAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID if the given value is not nil.

func (*UpscaleCreate) SetNillableCompletedAt

func (uc *UpscaleCreate) SetNillableCompletedAt(t *time.Time) *UpscaleCreate

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*UpscaleCreate) SetNillableCountryCode

func (uc *UpscaleCreate) SetNillableCountryCode(s *string) *UpscaleCreate

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*UpscaleCreate) SetNillableCreatedAt

func (uc *UpscaleCreate) SetNillableCreatedAt(t *time.Time) *UpscaleCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UpscaleCreate) SetNillableFailureReason

func (uc *UpscaleCreate) SetNillableFailureReason(s *string) *UpscaleCreate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*UpscaleCreate) SetNillableID

func (uc *UpscaleCreate) SetNillableID(u *uuid.UUID) *UpscaleCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*UpscaleCreate) SetNillableSourceType

func (uc *UpscaleCreate) SetNillableSourceType(et *enttypes.SourceType) *UpscaleCreate

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*UpscaleCreate) SetNillableStartedAt

func (uc *UpscaleCreate) SetNillableStartedAt(t *time.Time) *UpscaleCreate

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*UpscaleCreate) SetNillableStripeProductID

func (uc *UpscaleCreate) SetNillableStripeProductID(s *string) *UpscaleCreate

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*UpscaleCreate) SetNillableSystemGenerated

func (uc *UpscaleCreate) SetNillableSystemGenerated(b *bool) *UpscaleCreate

SetNillableSystemGenerated sets the "system_generated" field if the given value is not nil.

func (*UpscaleCreate) SetNillableUpdatedAt

func (uc *UpscaleCreate) SetNillableUpdatedAt(t *time.Time) *UpscaleCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UpscaleCreate) SetScale

func (uc *UpscaleCreate) SetScale(i int32) *UpscaleCreate

SetScale sets the "scale" field.

func (*UpscaleCreate) SetSourceType

func (uc *UpscaleCreate) SetSourceType(et enttypes.SourceType) *UpscaleCreate

SetSourceType sets the "source_type" field.

func (*UpscaleCreate) SetStartedAt

func (uc *UpscaleCreate) SetStartedAt(t time.Time) *UpscaleCreate

SetStartedAt sets the "started_at" field.

func (*UpscaleCreate) SetStatus

func (uc *UpscaleCreate) SetStatus(u upscale.Status) *UpscaleCreate

SetStatus sets the "status" field.

func (*UpscaleCreate) SetStripeProductID

func (uc *UpscaleCreate) SetStripeProductID(s string) *UpscaleCreate

SetStripeProductID sets the "stripe_product_id" field.

func (*UpscaleCreate) SetSystemGenerated

func (uc *UpscaleCreate) SetSystemGenerated(b bool) *UpscaleCreate

SetSystemGenerated sets the "system_generated" field.

func (*UpscaleCreate) SetUpdatedAt

func (uc *UpscaleCreate) SetUpdatedAt(t time.Time) *UpscaleCreate

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleCreate) SetUpscaleModels

func (uc *UpscaleCreate) SetUpscaleModels(u *UpscaleModel) *UpscaleCreate

SetUpscaleModels sets the "upscale_models" edge to the UpscaleModel entity.

func (*UpscaleCreate) SetUpscaleModelsID

func (uc *UpscaleCreate) SetUpscaleModelsID(id uuid.UUID) *UpscaleCreate

SetUpscaleModelsID sets the "upscale_models" edge to the UpscaleModel entity by ID.

func (*UpscaleCreate) SetUser

func (uc *UpscaleCreate) SetUser(u *User) *UpscaleCreate

SetUser sets the "user" edge to the User entity.

func (*UpscaleCreate) SetUserID

func (uc *UpscaleCreate) SetUserID(u uuid.UUID) *UpscaleCreate

SetUserID sets the "user_id" field.

func (*UpscaleCreate) SetWidth

func (uc *UpscaleCreate) SetWidth(i int32) *UpscaleCreate

SetWidth sets the "width" field.

type UpscaleCreateBulk

type UpscaleCreateBulk struct {
	// contains filtered or unexported fields
}

UpscaleCreateBulk is the builder for creating many Upscale entities in bulk.

func (*UpscaleCreateBulk) Exec

func (ucb *UpscaleCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleCreateBulk) ExecContext

func (c *UpscaleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleCreateBulk) ExecX

func (ucb *UpscaleCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleCreateBulk) OnConflict

func (ucb *UpscaleCreateBulk) OnConflict(opts ...sql.ConflictOption) *UpscaleUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Upscale.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UpscaleUpsert) {
		SetWidth(v+v).
	}).
	Exec(ctx)

func (*UpscaleCreateBulk) OnConflictColumns

func (ucb *UpscaleCreateBulk) OnConflictColumns(columns ...string) *UpscaleUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Upscale.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UpscaleCreateBulk) QueryContext

func (c *UpscaleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleCreateBulk) Save

func (ucb *UpscaleCreateBulk) Save(ctx context.Context) ([]*Upscale, error)

Save creates the Upscale entities in the database.

func (*UpscaleCreateBulk) SaveX

func (ucb *UpscaleCreateBulk) SaveX(ctx context.Context) []*Upscale

SaveX is like Save, but panics if an error occurs.

type UpscaleDelete

type UpscaleDelete struct {
	// contains filtered or unexported fields
}

UpscaleDelete is the builder for deleting a Upscale entity.

func (*UpscaleDelete) Exec

func (ud *UpscaleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UpscaleDelete) ExecContext

func (c *UpscaleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleDelete) ExecX

func (ud *UpscaleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleDelete) QueryContext

func (c *UpscaleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleDelete) Where

func (ud *UpscaleDelete) Where(ps ...predicate.Upscale) *UpscaleDelete

Where appends a list predicates to the UpscaleDelete builder.

type UpscaleDeleteOne

type UpscaleDeleteOne struct {
	// contains filtered or unexported fields
}

UpscaleDeleteOne is the builder for deleting a single Upscale entity.

func (*UpscaleDeleteOne) Exec

func (udo *UpscaleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UpscaleDeleteOne) ExecX

func (udo *UpscaleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type UpscaleEdges

type UpscaleEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// DeviceInfo holds the value of the device_info edge.
	DeviceInfo *DeviceInfo `json:"device_info,omitempty"`
	// UpscaleModels holds the value of the upscale_models edge.
	UpscaleModels *UpscaleModel `json:"upscale_models,omitempty"`
	// APITokens holds the value of the api_tokens edge.
	APITokens *ApiToken `json:"api_tokens,omitempty"`
	// UpscaleOutputs holds the value of the upscale_outputs edge.
	UpscaleOutputs []*UpscaleOutput `json:"upscale_outputs,omitempty"`
	// contains filtered or unexported fields
}

UpscaleEdges holds the relations/edges for other nodes in the graph.

func (UpscaleEdges) APITokensOrErr

func (e UpscaleEdges) APITokensOrErr() (*ApiToken, error)

APITokensOrErr returns the APITokens value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UpscaleEdges) DeviceInfoOrErr

func (e UpscaleEdges) DeviceInfoOrErr() (*DeviceInfo, error)

DeviceInfoOrErr returns the DeviceInfo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UpscaleEdges) UpscaleModelsOrErr

func (e UpscaleEdges) UpscaleModelsOrErr() (*UpscaleModel, error)

UpscaleModelsOrErr returns the UpscaleModels value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UpscaleEdges) UpscaleOutputsOrErr

func (e UpscaleEdges) UpscaleOutputsOrErr() ([]*UpscaleOutput, error)

UpscaleOutputsOrErr returns the UpscaleOutputs value or an error if the edge was not loaded in eager-loading.

func (UpscaleEdges) UserOrErr

func (e UpscaleEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UpscaleGroupBy

type UpscaleGroupBy struct {
	// contains filtered or unexported fields
}

UpscaleGroupBy is the group-by builder for Upscale entities.

func (*UpscaleGroupBy) Aggregate

func (ugb *UpscaleGroupBy) Aggregate(fns ...AggregateFunc) *UpscaleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UpscaleGroupBy) Bool

func (s *UpscaleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UpscaleGroupBy) BoolX

func (s *UpscaleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UpscaleGroupBy) Bools

func (s *UpscaleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UpscaleGroupBy) BoolsX

func (s *UpscaleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UpscaleGroupBy) Float64

func (s *UpscaleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UpscaleGroupBy) Float64X

func (s *UpscaleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UpscaleGroupBy) Float64s

func (s *UpscaleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UpscaleGroupBy) Float64sX

func (s *UpscaleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UpscaleGroupBy) Int

func (s *UpscaleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UpscaleGroupBy) IntX

func (s *UpscaleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UpscaleGroupBy) Ints

func (s *UpscaleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UpscaleGroupBy) IntsX

func (s *UpscaleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UpscaleGroupBy) Scan

func (ugb *UpscaleGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UpscaleGroupBy) ScanX

func (s *UpscaleGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UpscaleGroupBy) String

func (s *UpscaleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UpscaleGroupBy) StringX

func (s *UpscaleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UpscaleGroupBy) Strings

func (s *UpscaleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UpscaleGroupBy) StringsX

func (s *UpscaleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UpscaleModel

type UpscaleModel struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// NameInWorker holds the value of the "name_in_worker" field.
	NameInWorker string `json:"name_in_worker,omitempty"`
	// IsActive holds the value of the "is_active" field.
	IsActive bool `json:"is_active,omitempty"`
	// IsDefault holds the value of the "is_default" field.
	IsDefault bool `json:"is_default,omitempty"`
	// IsHidden holds the value of the "is_hidden" field.
	IsHidden bool `json:"is_hidden,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UpscaleModelQuery when eager-loading is set.
	Edges UpscaleModelEdges `json:"edges"`
	// contains filtered or unexported fields
}

UpscaleModel is the model entity for the UpscaleModel schema.

func (*UpscaleModel) ExecContext

func (c *UpscaleModel) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleModel) QueryContext

func (c *UpscaleModel) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleModel) QueryUpscales

func (um *UpscaleModel) QueryUpscales() *UpscaleQuery

QueryUpscales queries the "upscales" edge of the UpscaleModel entity.

func (*UpscaleModel) String

func (um *UpscaleModel) String() string

String implements the fmt.Stringer.

func (*UpscaleModel) Unwrap

func (um *UpscaleModel) Unwrap() *UpscaleModel

Unwrap unwraps the UpscaleModel 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 (*UpscaleModel) Update

func (um *UpscaleModel) Update() *UpscaleModelUpdateOne

Update returns a builder for updating this UpscaleModel. Note that you need to call UpscaleModel.Unwrap() before calling this method if this UpscaleModel was returned from a transaction, and the transaction was committed or rolled back.

type UpscaleModelClient

type UpscaleModelClient struct {
	// contains filtered or unexported fields
}

UpscaleModelClient is a client for the UpscaleModel schema.

func NewUpscaleModelClient

func NewUpscaleModelClient(c config) *UpscaleModelClient

NewUpscaleModelClient returns a client for the UpscaleModel from the given config.

func (*UpscaleModelClient) Create

Create returns a builder for creating a UpscaleModel entity.

func (*UpscaleModelClient) CreateBulk

func (c *UpscaleModelClient) CreateBulk(builders ...*UpscaleModelCreate) *UpscaleModelCreateBulk

CreateBulk returns a builder for creating a bulk of UpscaleModel entities.

func (*UpscaleModelClient) Delete

Delete returns a delete builder for UpscaleModel.

func (*UpscaleModelClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UpscaleModelClient) DeleteOneID

func (c *UpscaleModelClient) DeleteOneID(id uuid.UUID) *UpscaleModelDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UpscaleModelClient) ExecContext

func (c *UpscaleModelClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleModelClient) Get

Get returns a UpscaleModel entity by its id.

func (*UpscaleModelClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UpscaleModelClient) Hooks

func (c *UpscaleModelClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UpscaleModelClient) Intercept

func (c *UpscaleModelClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `upscalemodel.Intercept(f(g(h())))`.

func (*UpscaleModelClient) Interceptors

func (c *UpscaleModelClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UpscaleModelClient) Query

Query returns a query builder for UpscaleModel.

func (*UpscaleModelClient) QueryContext

func (c *UpscaleModelClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleModelClient) QueryUpscales

func (c *UpscaleModelClient) QueryUpscales(um *UpscaleModel) *UpscaleQuery

QueryUpscales queries the upscales edge of a UpscaleModel.

func (*UpscaleModelClient) Update

Update returns an update builder for UpscaleModel.

func (*UpscaleModelClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UpscaleModelClient) UpdateOneID

func (c *UpscaleModelClient) UpdateOneID(id uuid.UUID) *UpscaleModelUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UpscaleModelClient) Use

func (c *UpscaleModelClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `upscalemodel.Hooks(f(g(h())))`.

type UpscaleModelCreate

type UpscaleModelCreate struct {
	// contains filtered or unexported fields
}

UpscaleModelCreate is the builder for creating a UpscaleModel entity.

func (*UpscaleModelCreate) AddUpscaleIDs

func (umc *UpscaleModelCreate) AddUpscaleIDs(ids ...uuid.UUID) *UpscaleModelCreate

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*UpscaleModelCreate) AddUpscales

func (umc *UpscaleModelCreate) AddUpscales(u ...*Upscale) *UpscaleModelCreate

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*UpscaleModelCreate) Exec

func (umc *UpscaleModelCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleModelCreate) ExecContext

func (c *UpscaleModelCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleModelCreate) ExecX

func (umc *UpscaleModelCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleModelCreate) Mutation

func (umc *UpscaleModelCreate) Mutation() *UpscaleModelMutation

Mutation returns the UpscaleModelMutation object of the builder.

func (*UpscaleModelCreate) OnConflict

func (umc *UpscaleModelCreate) OnConflict(opts ...sql.ConflictOption) *UpscaleModelUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UpscaleModel.Create().
	SetNameInWorker(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UpscaleModelUpsert) {
		SetNameInWorker(v+v).
	}).
	Exec(ctx)

func (*UpscaleModelCreate) OnConflictColumns

func (umc *UpscaleModelCreate) OnConflictColumns(columns ...string) *UpscaleModelUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UpscaleModel.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UpscaleModelCreate) QueryContext

func (c *UpscaleModelCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleModelCreate) Save

Save creates the UpscaleModel in the database.

func (*UpscaleModelCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UpscaleModelCreate) SetCreatedAt

func (umc *UpscaleModelCreate) SetCreatedAt(t time.Time) *UpscaleModelCreate

SetCreatedAt sets the "created_at" field.

func (*UpscaleModelCreate) SetID

SetID sets the "id" field.

func (*UpscaleModelCreate) SetIsActive

func (umc *UpscaleModelCreate) SetIsActive(b bool) *UpscaleModelCreate

SetIsActive sets the "is_active" field.

func (*UpscaleModelCreate) SetIsDefault

func (umc *UpscaleModelCreate) SetIsDefault(b bool) *UpscaleModelCreate

SetIsDefault sets the "is_default" field.

func (*UpscaleModelCreate) SetIsHidden

func (umc *UpscaleModelCreate) SetIsHidden(b bool) *UpscaleModelCreate

SetIsHidden sets the "is_hidden" field.

func (*UpscaleModelCreate) SetNameInWorker

func (umc *UpscaleModelCreate) SetNameInWorker(s string) *UpscaleModelCreate

SetNameInWorker sets the "name_in_worker" field.

func (*UpscaleModelCreate) SetNillableCreatedAt

func (umc *UpscaleModelCreate) SetNillableCreatedAt(t *time.Time) *UpscaleModelCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UpscaleModelCreate) SetNillableID

func (umc *UpscaleModelCreate) SetNillableID(u *uuid.UUID) *UpscaleModelCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*UpscaleModelCreate) SetNillableIsActive

func (umc *UpscaleModelCreate) SetNillableIsActive(b *bool) *UpscaleModelCreate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*UpscaleModelCreate) SetNillableIsDefault

func (umc *UpscaleModelCreate) SetNillableIsDefault(b *bool) *UpscaleModelCreate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*UpscaleModelCreate) SetNillableIsHidden

func (umc *UpscaleModelCreate) SetNillableIsHidden(b *bool) *UpscaleModelCreate

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*UpscaleModelCreate) SetNillableUpdatedAt

func (umc *UpscaleModelCreate) SetNillableUpdatedAt(t *time.Time) *UpscaleModelCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UpscaleModelCreate) SetUpdatedAt

func (umc *UpscaleModelCreate) SetUpdatedAt(t time.Time) *UpscaleModelCreate

SetUpdatedAt sets the "updated_at" field.

type UpscaleModelCreateBulk

type UpscaleModelCreateBulk struct {
	// contains filtered or unexported fields
}

UpscaleModelCreateBulk is the builder for creating many UpscaleModel entities in bulk.

func (*UpscaleModelCreateBulk) Exec

func (umcb *UpscaleModelCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleModelCreateBulk) ExecContext

func (c *UpscaleModelCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleModelCreateBulk) ExecX

func (umcb *UpscaleModelCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleModelCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UpscaleModel.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UpscaleModelUpsert) {
		SetNameInWorker(v+v).
	}).
	Exec(ctx)

func (*UpscaleModelCreateBulk) OnConflictColumns

func (umcb *UpscaleModelCreateBulk) OnConflictColumns(columns ...string) *UpscaleModelUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UpscaleModel.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UpscaleModelCreateBulk) QueryContext

func (c *UpscaleModelCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleModelCreateBulk) Save

Save creates the UpscaleModel entities in the database.

func (*UpscaleModelCreateBulk) SaveX

func (umcb *UpscaleModelCreateBulk) SaveX(ctx context.Context) []*UpscaleModel

SaveX is like Save, but panics if an error occurs.

type UpscaleModelDelete

type UpscaleModelDelete struct {
	// contains filtered or unexported fields
}

UpscaleModelDelete is the builder for deleting a UpscaleModel entity.

func (*UpscaleModelDelete) Exec

func (umd *UpscaleModelDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UpscaleModelDelete) ExecContext

func (c *UpscaleModelDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleModelDelete) ExecX

func (umd *UpscaleModelDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleModelDelete) QueryContext

func (c *UpscaleModelDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleModelDelete) Where

Where appends a list predicates to the UpscaleModelDelete builder.

type UpscaleModelDeleteOne

type UpscaleModelDeleteOne struct {
	// contains filtered or unexported fields
}

UpscaleModelDeleteOne is the builder for deleting a single UpscaleModel entity.

func (*UpscaleModelDeleteOne) Exec

func (umdo *UpscaleModelDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UpscaleModelDeleteOne) ExecX

func (umdo *UpscaleModelDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type UpscaleModelEdges

type UpscaleModelEdges struct {
	// Upscales holds the value of the upscales edge.
	Upscales []*Upscale `json:"upscales,omitempty"`
	// contains filtered or unexported fields
}

UpscaleModelEdges holds the relations/edges for other nodes in the graph.

func (UpscaleModelEdges) UpscalesOrErr

func (e UpscaleModelEdges) UpscalesOrErr() ([]*Upscale, error)

UpscalesOrErr returns the Upscales value or an error if the edge was not loaded in eager-loading.

type UpscaleModelGroupBy

type UpscaleModelGroupBy struct {
	// contains filtered or unexported fields
}

UpscaleModelGroupBy is the group-by builder for UpscaleModel entities.

func (*UpscaleModelGroupBy) Aggregate

func (umgb *UpscaleModelGroupBy) Aggregate(fns ...AggregateFunc) *UpscaleModelGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UpscaleModelGroupBy) Bool

func (s *UpscaleModelGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UpscaleModelGroupBy) BoolX

func (s *UpscaleModelGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UpscaleModelGroupBy) Bools

func (s *UpscaleModelGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UpscaleModelGroupBy) BoolsX

func (s *UpscaleModelGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UpscaleModelGroupBy) Float64

func (s *UpscaleModelGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UpscaleModelGroupBy) Float64X

func (s *UpscaleModelGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UpscaleModelGroupBy) Float64s

func (s *UpscaleModelGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UpscaleModelGroupBy) Float64sX

func (s *UpscaleModelGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UpscaleModelGroupBy) Int

func (s *UpscaleModelGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UpscaleModelGroupBy) IntX

func (s *UpscaleModelGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UpscaleModelGroupBy) Ints

func (s *UpscaleModelGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UpscaleModelGroupBy) IntsX

func (s *UpscaleModelGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UpscaleModelGroupBy) Scan

func (umgb *UpscaleModelGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UpscaleModelGroupBy) ScanX

func (s *UpscaleModelGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UpscaleModelGroupBy) String

func (s *UpscaleModelGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UpscaleModelGroupBy) StringX

func (s *UpscaleModelGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UpscaleModelGroupBy) Strings

func (s *UpscaleModelGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UpscaleModelGroupBy) StringsX

func (s *UpscaleModelGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UpscaleModelMutation

type UpscaleModelMutation struct {
	// contains filtered or unexported fields
}

UpscaleModelMutation represents an operation that mutates the UpscaleModel nodes in the graph.

func (*UpscaleModelMutation) AddField

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) AddUpscaleIDs

func (m *UpscaleModelMutation) AddUpscaleIDs(ids ...uuid.UUID)

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by ids.

func (*UpscaleModelMutation) AddedEdges

func (m *UpscaleModelMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UpscaleModelMutation) AddedField

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) AddedFields

func (m *UpscaleModelMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UpscaleModelMutation) AddedIDs

func (m *UpscaleModelMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UpscaleModelMutation) ClearEdge

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) ClearField

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) ClearUpscales

func (m *UpscaleModelMutation) ClearUpscales()

ClearUpscales clears the "upscales" edge to the Upscale entity.

func (*UpscaleModelMutation) ClearedEdges

func (m *UpscaleModelMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UpscaleModelMutation) ClearedFields

func (m *UpscaleModelMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UpscaleModelMutation) Client

func (m UpscaleModelMutation) 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 (*UpscaleModelMutation) CreatedAt

func (m *UpscaleModelMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UpscaleModelMutation) EdgeCleared

func (m *UpscaleModelMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UpscaleModelMutation) ExecContext

func (c *UpscaleModelMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleModelMutation) Field

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) FieldCleared

func (m *UpscaleModelMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UpscaleModelMutation) Fields

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) ID

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) 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 (*UpscaleModelMutation) IsActive

func (m *UpscaleModelMutation) IsActive() (r bool, exists bool)

IsActive returns the value of the "is_active" field in the mutation.

func (*UpscaleModelMutation) IsDefault

func (m *UpscaleModelMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "is_default" field in the mutation.

func (*UpscaleModelMutation) IsHidden

func (m *UpscaleModelMutation) IsHidden() (r bool, exists bool)

IsHidden returns the value of the "is_hidden" field in the mutation.

func (*UpscaleModelMutation) NameInWorker

func (m *UpscaleModelMutation) NameInWorker() (r string, exists bool)

NameInWorker returns the value of the "name_in_worker" field in the mutation.

func (*UpscaleModelMutation) OldCreatedAt

func (m *UpscaleModelMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the UpscaleModel entity. If the UpscaleModel 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 (*UpscaleModelMutation) OldField

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) OldIsActive

func (m *UpscaleModelMutation) OldIsActive(ctx context.Context) (v bool, err error)

OldIsActive returns the old "is_active" field's value of the UpscaleModel entity. If the UpscaleModel 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 (*UpscaleModelMutation) OldIsDefault

func (m *UpscaleModelMutation) OldIsDefault(ctx context.Context) (v bool, err error)

OldIsDefault returns the old "is_default" field's value of the UpscaleModel entity. If the UpscaleModel 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 (*UpscaleModelMutation) OldIsHidden

func (m *UpscaleModelMutation) OldIsHidden(ctx context.Context) (v bool, err error)

OldIsHidden returns the old "is_hidden" field's value of the UpscaleModel entity. If the UpscaleModel 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 (*UpscaleModelMutation) OldNameInWorker

func (m *UpscaleModelMutation) OldNameInWorker(ctx context.Context) (v string, err error)

OldNameInWorker returns the old "name_in_worker" field's value of the UpscaleModel entity. If the UpscaleModel 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 (*UpscaleModelMutation) OldUpdatedAt

func (m *UpscaleModelMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the UpscaleModel entity. If the UpscaleModel 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 (*UpscaleModelMutation) Op

func (m *UpscaleModelMutation) Op() Op

Op returns the operation name.

func (*UpscaleModelMutation) QueryContext

func (c *UpscaleModelMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleModelMutation) RemoveUpscaleIDs

func (m *UpscaleModelMutation) RemoveUpscaleIDs(ids ...uuid.UUID)

RemoveUpscaleIDs removes the "upscales" edge to the Upscale entity by IDs.

func (*UpscaleModelMutation) RemovedEdges

func (m *UpscaleModelMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UpscaleModelMutation) RemovedIDs

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) RemovedUpscalesIDs

func (m *UpscaleModelMutation) RemovedUpscalesIDs() (ids []uuid.UUID)

RemovedUpscales returns the removed IDs of the "upscales" edge to the Upscale entity.

func (*UpscaleModelMutation) ResetCreatedAt

func (m *UpscaleModelMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UpscaleModelMutation) ResetEdge

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) ResetField

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) ResetIsActive

func (m *UpscaleModelMutation) ResetIsActive()

ResetIsActive resets all changes to the "is_active" field.

func (*UpscaleModelMutation) ResetIsDefault

func (m *UpscaleModelMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "is_default" field.

func (*UpscaleModelMutation) ResetIsHidden

func (m *UpscaleModelMutation) ResetIsHidden()

ResetIsHidden resets all changes to the "is_hidden" field.

func (*UpscaleModelMutation) ResetNameInWorker

func (m *UpscaleModelMutation) ResetNameInWorker()

ResetNameInWorker resets all changes to the "name_in_worker" field.

func (*UpscaleModelMutation) ResetUpdatedAt

func (m *UpscaleModelMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UpscaleModelMutation) ResetUpscales

func (m *UpscaleModelMutation) ResetUpscales()

ResetUpscales resets all changes to the "upscales" edge.

func (*UpscaleModelMutation) SetCreatedAt

func (m *UpscaleModelMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UpscaleModelMutation) SetField

func (m *UpscaleModelMutation) 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 (*UpscaleModelMutation) SetID

func (m *UpscaleModelMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of UpscaleModel entities.

func (*UpscaleModelMutation) SetIsActive

func (m *UpscaleModelMutation) SetIsActive(b bool)

SetIsActive sets the "is_active" field.

func (*UpscaleModelMutation) SetIsDefault

func (m *UpscaleModelMutation) SetIsDefault(b bool)

SetIsDefault sets the "is_default" field.

func (*UpscaleModelMutation) SetIsHidden

func (m *UpscaleModelMutation) SetIsHidden(b bool)

SetIsHidden sets the "is_hidden" field.

func (*UpscaleModelMutation) SetNameInWorker

func (m *UpscaleModelMutation) SetNameInWorker(s string)

SetNameInWorker sets the "name_in_worker" field.

func (*UpscaleModelMutation) SetOp

func (m *UpscaleModelMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UpscaleModelMutation) SetUpdatedAt

func (m *UpscaleModelMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (UpscaleModelMutation) Tx

func (m UpscaleModelMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UpscaleModelMutation) Type

func (m *UpscaleModelMutation) Type() string

Type returns the node type of this mutation (UpscaleModel).

func (*UpscaleModelMutation) UpdatedAt

func (m *UpscaleModelMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UpscaleModelMutation) UpscalesCleared

func (m *UpscaleModelMutation) UpscalesCleared() bool

UpscalesCleared reports if the "upscales" edge to the Upscale entity was cleared.

func (*UpscaleModelMutation) UpscalesIDs

func (m *UpscaleModelMutation) UpscalesIDs() (ids []uuid.UUID)

UpscalesIDs returns the "upscales" edge IDs in the mutation.

func (*UpscaleModelMutation) Where

Where appends a list predicates to the UpscaleModelMutation builder.

func (*UpscaleModelMutation) WhereP

func (m *UpscaleModelMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UpscaleModelMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UpscaleModelQuery

type UpscaleModelQuery struct {
	// contains filtered or unexported fields
}

UpscaleModelQuery is the builder for querying UpscaleModel entities.

func (*UpscaleModelQuery) Aggregate

func (umq *UpscaleModelQuery) Aggregate(fns ...AggregateFunc) *UpscaleModelSelect

Aggregate returns a UpscaleModelSelect configured with the given aggregations.

func (*UpscaleModelQuery) All

func (umq *UpscaleModelQuery) All(ctx context.Context) ([]*UpscaleModel, error)

All executes the query and returns a list of UpscaleModels.

func (*UpscaleModelQuery) AllX

func (umq *UpscaleModelQuery) AllX(ctx context.Context) []*UpscaleModel

AllX is like All, but panics if an error occurs.

func (*UpscaleModelQuery) Clone

func (umq *UpscaleModelQuery) Clone() *UpscaleModelQuery

Clone returns a duplicate of the UpscaleModelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UpscaleModelQuery) Count

func (umq *UpscaleModelQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UpscaleModelQuery) CountX

func (umq *UpscaleModelQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UpscaleModelQuery) ExecContext

func (c *UpscaleModelQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleModelQuery) Exist

func (umq *UpscaleModelQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UpscaleModelQuery) ExistX

func (umq *UpscaleModelQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UpscaleModelQuery) First

func (umq *UpscaleModelQuery) First(ctx context.Context) (*UpscaleModel, error)

First returns the first UpscaleModel entity from the query. Returns a *NotFoundError when no UpscaleModel was found.

func (*UpscaleModelQuery) FirstID

func (umq *UpscaleModelQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first UpscaleModel ID from the query. Returns a *NotFoundError when no UpscaleModel ID was found.

func (*UpscaleModelQuery) FirstIDX

func (umq *UpscaleModelQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UpscaleModelQuery) FirstX

func (umq *UpscaleModelQuery) FirstX(ctx context.Context) *UpscaleModel

FirstX is like First, but panics if an error occurs.

func (*UpscaleModelQuery) GroupBy

func (umq *UpscaleModelQuery) GroupBy(field string, fields ...string) *UpscaleModelGroupBy

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 {
	NameInWorker string `json:"name_in_worker,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UpscaleModel.Query().
	GroupBy(upscalemodel.FieldNameInWorker).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UpscaleModelQuery) IDs

func (umq *UpscaleModelQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of UpscaleModel IDs.

func (*UpscaleModelQuery) IDsX

func (umq *UpscaleModelQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UpscaleModelQuery) Limit

func (umq *UpscaleModelQuery) Limit(limit int) *UpscaleModelQuery

Limit the number of records to be returned by this query.

func (*UpscaleModelQuery) Modify

func (umq *UpscaleModelQuery) Modify(modifiers ...func(s *sql.Selector)) *UpscaleModelSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UpscaleModelQuery) Offset

func (umq *UpscaleModelQuery) Offset(offset int) *UpscaleModelQuery

Offset to start from.

func (*UpscaleModelQuery) Only

func (umq *UpscaleModelQuery) Only(ctx context.Context) (*UpscaleModel, error)

Only returns a single UpscaleModel entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UpscaleModel entity is found. Returns a *NotFoundError when no UpscaleModel entities are found.

func (*UpscaleModelQuery) OnlyID

func (umq *UpscaleModelQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only UpscaleModel ID in the query. Returns a *NotSingularError when more than one UpscaleModel ID is found. Returns a *NotFoundError when no entities are found.

func (*UpscaleModelQuery) OnlyIDX

func (umq *UpscaleModelQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UpscaleModelQuery) OnlyX

func (umq *UpscaleModelQuery) OnlyX(ctx context.Context) *UpscaleModel

OnlyX is like Only, but panics if an error occurs.

func (*UpscaleModelQuery) Order

func (umq *UpscaleModelQuery) Order(o ...OrderFunc) *UpscaleModelQuery

Order specifies how the records should be ordered.

func (*UpscaleModelQuery) QueryContext

func (c *UpscaleModelQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleModelQuery) QueryUpscales

func (umq *UpscaleModelQuery) QueryUpscales() *UpscaleQuery

QueryUpscales chains the current query on the "upscales" edge.

func (*UpscaleModelQuery) Select

func (umq *UpscaleModelQuery) Select(fields ...string) *UpscaleModelSelect

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 {
	NameInWorker string `json:"name_in_worker,omitempty"`
}

client.UpscaleModel.Query().
	Select(upscalemodel.FieldNameInWorker).
	Scan(ctx, &v)

func (*UpscaleModelQuery) Unique

func (umq *UpscaleModelQuery) Unique(unique bool) *UpscaleModelQuery

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 (*UpscaleModelQuery) Where

Where adds a new predicate for the UpscaleModelQuery builder.

func (*UpscaleModelQuery) WithUpscales

func (umq *UpscaleModelQuery) WithUpscales(opts ...func(*UpscaleQuery)) *UpscaleModelQuery

WithUpscales tells the query-builder to eager-load the nodes that are connected to the "upscales" edge. The optional arguments are used to configure the query builder of the edge.

type UpscaleModelSelect

type UpscaleModelSelect struct {
	*UpscaleModelQuery
	// contains filtered or unexported fields
}

UpscaleModelSelect is the builder for selecting fields of UpscaleModel entities.

func (*UpscaleModelSelect) Aggregate

func (ums *UpscaleModelSelect) Aggregate(fns ...AggregateFunc) *UpscaleModelSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UpscaleModelSelect) Bool

func (s *UpscaleModelSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UpscaleModelSelect) BoolX

func (s *UpscaleModelSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UpscaleModelSelect) Bools

func (s *UpscaleModelSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UpscaleModelSelect) BoolsX

func (s *UpscaleModelSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (UpscaleModelSelect) ExecContext

func (c UpscaleModelSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleModelSelect) Float64

func (s *UpscaleModelSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UpscaleModelSelect) Float64X

func (s *UpscaleModelSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UpscaleModelSelect) Float64s

func (s *UpscaleModelSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UpscaleModelSelect) Float64sX

func (s *UpscaleModelSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UpscaleModelSelect) Int

func (s *UpscaleModelSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UpscaleModelSelect) IntX

func (s *UpscaleModelSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UpscaleModelSelect) Ints

func (s *UpscaleModelSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UpscaleModelSelect) IntsX

func (s *UpscaleModelSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UpscaleModelSelect) Modify

func (ums *UpscaleModelSelect) Modify(modifiers ...func(s *sql.Selector)) *UpscaleModelSelect

Modify adds a query modifier for attaching custom logic to queries.

func (UpscaleModelSelect) QueryContext

func (c UpscaleModelSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleModelSelect) Scan

func (ums *UpscaleModelSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UpscaleModelSelect) ScanX

func (s *UpscaleModelSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UpscaleModelSelect) String

func (s *UpscaleModelSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UpscaleModelSelect) StringX

func (s *UpscaleModelSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UpscaleModelSelect) Strings

func (s *UpscaleModelSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UpscaleModelSelect) StringsX

func (s *UpscaleModelSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UpscaleModelUpdate

type UpscaleModelUpdate struct {
	// contains filtered or unexported fields
}

UpscaleModelUpdate is the builder for updating UpscaleModel entities.

func (*UpscaleModelUpdate) AddUpscaleIDs

func (umu *UpscaleModelUpdate) AddUpscaleIDs(ids ...uuid.UUID) *UpscaleModelUpdate

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*UpscaleModelUpdate) AddUpscales

func (umu *UpscaleModelUpdate) AddUpscales(u ...*Upscale) *UpscaleModelUpdate

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*UpscaleModelUpdate) ClearUpscales

func (umu *UpscaleModelUpdate) ClearUpscales() *UpscaleModelUpdate

ClearUpscales clears all "upscales" edges to the Upscale entity.

func (*UpscaleModelUpdate) Exec

func (umu *UpscaleModelUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleModelUpdate) ExecContext

func (c *UpscaleModelUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleModelUpdate) ExecX

func (umu *UpscaleModelUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleModelUpdate) Modify

func (umu *UpscaleModelUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UpscaleModelUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UpscaleModelUpdate) Mutation

func (umu *UpscaleModelUpdate) Mutation() *UpscaleModelMutation

Mutation returns the UpscaleModelMutation object of the builder.

func (*UpscaleModelUpdate) QueryContext

func (c *UpscaleModelUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleModelUpdate) RemoveUpscaleIDs

func (umu *UpscaleModelUpdate) RemoveUpscaleIDs(ids ...uuid.UUID) *UpscaleModelUpdate

RemoveUpscaleIDs removes the "upscales" edge to Upscale entities by IDs.

func (*UpscaleModelUpdate) RemoveUpscales

func (umu *UpscaleModelUpdate) RemoveUpscales(u ...*Upscale) *UpscaleModelUpdate

RemoveUpscales removes "upscales" edges to Upscale entities.

func (*UpscaleModelUpdate) Save

func (umu *UpscaleModelUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UpscaleModelUpdate) SaveX

func (umu *UpscaleModelUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UpscaleModelUpdate) SetIsActive

func (umu *UpscaleModelUpdate) SetIsActive(b bool) *UpscaleModelUpdate

SetIsActive sets the "is_active" field.

func (*UpscaleModelUpdate) SetIsDefault

func (umu *UpscaleModelUpdate) SetIsDefault(b bool) *UpscaleModelUpdate

SetIsDefault sets the "is_default" field.

func (*UpscaleModelUpdate) SetIsHidden

func (umu *UpscaleModelUpdate) SetIsHidden(b bool) *UpscaleModelUpdate

SetIsHidden sets the "is_hidden" field.

func (*UpscaleModelUpdate) SetNameInWorker

func (umu *UpscaleModelUpdate) SetNameInWorker(s string) *UpscaleModelUpdate

SetNameInWorker sets the "name_in_worker" field.

func (*UpscaleModelUpdate) SetNillableIsActive

func (umu *UpscaleModelUpdate) SetNillableIsActive(b *bool) *UpscaleModelUpdate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*UpscaleModelUpdate) SetNillableIsDefault

func (umu *UpscaleModelUpdate) SetNillableIsDefault(b *bool) *UpscaleModelUpdate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*UpscaleModelUpdate) SetNillableIsHidden

func (umu *UpscaleModelUpdate) SetNillableIsHidden(b *bool) *UpscaleModelUpdate

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*UpscaleModelUpdate) SetUpdatedAt

func (umu *UpscaleModelUpdate) SetUpdatedAt(t time.Time) *UpscaleModelUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleModelUpdate) Where

Where appends a list predicates to the UpscaleModelUpdate builder.

type UpscaleModelUpdateOne

type UpscaleModelUpdateOne struct {
	// contains filtered or unexported fields
}

UpscaleModelUpdateOne is the builder for updating a single UpscaleModel entity.

func (*UpscaleModelUpdateOne) AddUpscaleIDs

func (umuo *UpscaleModelUpdateOne) AddUpscaleIDs(ids ...uuid.UUID) *UpscaleModelUpdateOne

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*UpscaleModelUpdateOne) AddUpscales

func (umuo *UpscaleModelUpdateOne) AddUpscales(u ...*Upscale) *UpscaleModelUpdateOne

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*UpscaleModelUpdateOne) ClearUpscales

func (umuo *UpscaleModelUpdateOne) ClearUpscales() *UpscaleModelUpdateOne

ClearUpscales clears all "upscales" edges to the Upscale entity.

func (*UpscaleModelUpdateOne) Exec

func (umuo *UpscaleModelUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UpscaleModelUpdateOne) ExecContext

func (c *UpscaleModelUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleModelUpdateOne) ExecX

func (umuo *UpscaleModelUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleModelUpdateOne) Modify

func (umuo *UpscaleModelUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UpscaleModelUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UpscaleModelUpdateOne) Mutation

func (umuo *UpscaleModelUpdateOne) Mutation() *UpscaleModelMutation

Mutation returns the UpscaleModelMutation object of the builder.

func (*UpscaleModelUpdateOne) QueryContext

func (c *UpscaleModelUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleModelUpdateOne) RemoveUpscaleIDs

func (umuo *UpscaleModelUpdateOne) RemoveUpscaleIDs(ids ...uuid.UUID) *UpscaleModelUpdateOne

RemoveUpscaleIDs removes the "upscales" edge to Upscale entities by IDs.

func (*UpscaleModelUpdateOne) RemoveUpscales

func (umuo *UpscaleModelUpdateOne) RemoveUpscales(u ...*Upscale) *UpscaleModelUpdateOne

RemoveUpscales removes "upscales" edges to Upscale entities.

func (*UpscaleModelUpdateOne) Save

Save executes the query and returns the updated UpscaleModel entity.

func (*UpscaleModelUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UpscaleModelUpdateOne) Select

func (umuo *UpscaleModelUpdateOne) Select(field string, fields ...string) *UpscaleModelUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UpscaleModelUpdateOne) SetIsActive

func (umuo *UpscaleModelUpdateOne) SetIsActive(b bool) *UpscaleModelUpdateOne

SetIsActive sets the "is_active" field.

func (*UpscaleModelUpdateOne) SetIsDefault

func (umuo *UpscaleModelUpdateOne) SetIsDefault(b bool) *UpscaleModelUpdateOne

SetIsDefault sets the "is_default" field.

func (*UpscaleModelUpdateOne) SetIsHidden

func (umuo *UpscaleModelUpdateOne) SetIsHidden(b bool) *UpscaleModelUpdateOne

SetIsHidden sets the "is_hidden" field.

func (*UpscaleModelUpdateOne) SetNameInWorker

func (umuo *UpscaleModelUpdateOne) SetNameInWorker(s string) *UpscaleModelUpdateOne

SetNameInWorker sets the "name_in_worker" field.

func (*UpscaleModelUpdateOne) SetNillableIsActive

func (umuo *UpscaleModelUpdateOne) SetNillableIsActive(b *bool) *UpscaleModelUpdateOne

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*UpscaleModelUpdateOne) SetNillableIsDefault

func (umuo *UpscaleModelUpdateOne) SetNillableIsDefault(b *bool) *UpscaleModelUpdateOne

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*UpscaleModelUpdateOne) SetNillableIsHidden

func (umuo *UpscaleModelUpdateOne) SetNillableIsHidden(b *bool) *UpscaleModelUpdateOne

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*UpscaleModelUpdateOne) SetUpdatedAt

func (umuo *UpscaleModelUpdateOne) SetUpdatedAt(t time.Time) *UpscaleModelUpdateOne

SetUpdatedAt sets the "updated_at" field.

type UpscaleModelUpsert

type UpscaleModelUpsert struct {
	*sql.UpdateSet
}

UpscaleModelUpsert is the "OnConflict" setter.

func (*UpscaleModelUpsert) SetIsActive

func (u *UpscaleModelUpsert) SetIsActive(v bool) *UpscaleModelUpsert

SetIsActive sets the "is_active" field.

func (*UpscaleModelUpsert) SetIsDefault

func (u *UpscaleModelUpsert) SetIsDefault(v bool) *UpscaleModelUpsert

SetIsDefault sets the "is_default" field.

func (*UpscaleModelUpsert) SetIsHidden

func (u *UpscaleModelUpsert) SetIsHidden(v bool) *UpscaleModelUpsert

SetIsHidden sets the "is_hidden" field.

func (*UpscaleModelUpsert) SetNameInWorker

func (u *UpscaleModelUpsert) SetNameInWorker(v string) *UpscaleModelUpsert

SetNameInWorker sets the "name_in_worker" field.

func (*UpscaleModelUpsert) SetUpdatedAt

func (u *UpscaleModelUpsert) SetUpdatedAt(v time.Time) *UpscaleModelUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleModelUpsert) UpdateIsActive

func (u *UpscaleModelUpsert) UpdateIsActive() *UpscaleModelUpsert

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*UpscaleModelUpsert) UpdateIsDefault

func (u *UpscaleModelUpsert) UpdateIsDefault() *UpscaleModelUpsert

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*UpscaleModelUpsert) UpdateIsHidden

func (u *UpscaleModelUpsert) UpdateIsHidden() *UpscaleModelUpsert

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*UpscaleModelUpsert) UpdateNameInWorker

func (u *UpscaleModelUpsert) UpdateNameInWorker() *UpscaleModelUpsert

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*UpscaleModelUpsert) UpdateUpdatedAt

func (u *UpscaleModelUpsert) UpdateUpdatedAt() *UpscaleModelUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type UpscaleModelUpsertBulk

type UpscaleModelUpsertBulk struct {
	// contains filtered or unexported fields
}

UpscaleModelUpsertBulk is the builder for "upsert"-ing a bulk of UpscaleModel nodes.

func (*UpscaleModelUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UpscaleModelUpsertBulk) Exec

Exec executes the query.

func (*UpscaleModelUpsertBulk) ExecX

func (u *UpscaleModelUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleModelUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UpscaleModel.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UpscaleModelUpsertBulk) SetIsActive

SetIsActive sets the "is_active" field.

func (*UpscaleModelUpsertBulk) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*UpscaleModelUpsertBulk) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*UpscaleModelUpsertBulk) SetNameInWorker

func (u *UpscaleModelUpsertBulk) SetNameInWorker(v string) *UpscaleModelUpsertBulk

SetNameInWorker sets the "name_in_worker" field.

func (*UpscaleModelUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleModelUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UpscaleModelCreateBulk.OnConflict documentation for more info.

func (*UpscaleModelUpsertBulk) UpdateIsActive

func (u *UpscaleModelUpsertBulk) UpdateIsActive() *UpscaleModelUpsertBulk

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*UpscaleModelUpsertBulk) UpdateIsDefault

func (u *UpscaleModelUpsertBulk) UpdateIsDefault() *UpscaleModelUpsertBulk

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*UpscaleModelUpsertBulk) UpdateIsHidden

func (u *UpscaleModelUpsertBulk) UpdateIsHidden() *UpscaleModelUpsertBulk

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*UpscaleModelUpsertBulk) UpdateNameInWorker

func (u *UpscaleModelUpsertBulk) UpdateNameInWorker() *UpscaleModelUpsertBulk

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*UpscaleModelUpsertBulk) UpdateNewValues

func (u *UpscaleModelUpsertBulk) UpdateNewValues() *UpscaleModelUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UpscaleModel.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(upscalemodel.FieldID)
		}),
	).
	Exec(ctx)

func (*UpscaleModelUpsertBulk) UpdateUpdatedAt

func (u *UpscaleModelUpsertBulk) UpdateUpdatedAt() *UpscaleModelUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type UpscaleModelUpsertOne

type UpscaleModelUpsertOne struct {
	// contains filtered or unexported fields
}

UpscaleModelUpsertOne is the builder for "upsert"-ing

one UpscaleModel node.

func (*UpscaleModelUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UpscaleModelUpsertOne) Exec

Exec executes the query.

func (*UpscaleModelUpsertOne) ExecX

func (u *UpscaleModelUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleModelUpsertOne) ID

func (u *UpscaleModelUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UpscaleModelUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UpscaleModelUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UpscaleModel.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UpscaleModelUpsertOne) SetIsActive

SetIsActive sets the "is_active" field.

func (*UpscaleModelUpsertOne) SetIsDefault

func (u *UpscaleModelUpsertOne) SetIsDefault(v bool) *UpscaleModelUpsertOne

SetIsDefault sets the "is_default" field.

func (*UpscaleModelUpsertOne) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*UpscaleModelUpsertOne) SetNameInWorker

func (u *UpscaleModelUpsertOne) SetNameInWorker(v string) *UpscaleModelUpsertOne

SetNameInWorker sets the "name_in_worker" field.

func (*UpscaleModelUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleModelUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UpscaleModelCreate.OnConflict documentation for more info.

func (*UpscaleModelUpsertOne) UpdateIsActive

func (u *UpscaleModelUpsertOne) UpdateIsActive() *UpscaleModelUpsertOne

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*UpscaleModelUpsertOne) UpdateIsDefault

func (u *UpscaleModelUpsertOne) UpdateIsDefault() *UpscaleModelUpsertOne

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*UpscaleModelUpsertOne) UpdateIsHidden

func (u *UpscaleModelUpsertOne) UpdateIsHidden() *UpscaleModelUpsertOne

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*UpscaleModelUpsertOne) UpdateNameInWorker

func (u *UpscaleModelUpsertOne) UpdateNameInWorker() *UpscaleModelUpsertOne

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*UpscaleModelUpsertOne) UpdateNewValues

func (u *UpscaleModelUpsertOne) UpdateNewValues() *UpscaleModelUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.UpscaleModel.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(upscalemodel.FieldID)
		}),
	).
	Exec(ctx)

func (*UpscaleModelUpsertOne) UpdateUpdatedAt

func (u *UpscaleModelUpsertOne) UpdateUpdatedAt() *UpscaleModelUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type UpscaleModels

type UpscaleModels []*UpscaleModel

UpscaleModels is a parsable slice of UpscaleModel.

type UpscaleMutation

type UpscaleMutation struct {
	// contains filtered or unexported fields
}

UpscaleMutation represents an operation that mutates the Upscale nodes in the graph.

func (*UpscaleMutation) APITokenID

func (m *UpscaleMutation) APITokenID() (r uuid.UUID, exists bool)

APITokenID returns the value of the "api_token_id" field in the mutation.

func (*UpscaleMutation) APITokenIDCleared

func (m *UpscaleMutation) APITokenIDCleared() bool

APITokenIDCleared returns if the "api_token_id" field was cleared in this mutation.

func (*UpscaleMutation) APITokensCleared

func (m *UpscaleMutation) APITokensCleared() bool

APITokensCleared reports if the "api_tokens" edge to the ApiToken entity was cleared.

func (*UpscaleMutation) APITokensID

func (m *UpscaleMutation) APITokensID() (id uuid.UUID, exists bool)

APITokensID returns the "api_tokens" edge ID in the mutation.

func (*UpscaleMutation) APITokensIDs

func (m *UpscaleMutation) APITokensIDs() (ids []uuid.UUID)

APITokensIDs returns the "api_tokens" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use APITokensID instead. It exists only for internal usage by the builders.

func (*UpscaleMutation) AddField

func (m *UpscaleMutation) 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 (*UpscaleMutation) AddHeight

func (m *UpscaleMutation) AddHeight(i int32)

AddHeight adds i to the "height" field.

func (*UpscaleMutation) AddScale

func (m *UpscaleMutation) AddScale(i int32)

AddScale adds i to the "scale" field.

func (*UpscaleMutation) AddUpscaleOutputIDs

func (m *UpscaleMutation) AddUpscaleOutputIDs(ids ...uuid.UUID)

AddUpscaleOutputIDs adds the "upscale_outputs" edge to the UpscaleOutput entity by ids.

func (*UpscaleMutation) AddWidth

func (m *UpscaleMutation) AddWidth(i int32)

AddWidth adds i to the "width" field.

func (*UpscaleMutation) AddedEdges

func (m *UpscaleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UpscaleMutation) AddedField

func (m *UpscaleMutation) 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 (*UpscaleMutation) AddedFields

func (m *UpscaleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UpscaleMutation) AddedHeight

func (m *UpscaleMutation) AddedHeight() (r int32, exists bool)

AddedHeight returns the value that was added to the "height" field in this mutation.

func (*UpscaleMutation) AddedIDs

func (m *UpscaleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UpscaleMutation) AddedScale

func (m *UpscaleMutation) AddedScale() (r int32, exists bool)

AddedScale returns the value that was added to the "scale" field in this mutation.

func (*UpscaleMutation) AddedWidth

func (m *UpscaleMutation) AddedWidth() (r int32, exists bool)

AddedWidth returns the value that was added to the "width" field in this mutation.

func (*UpscaleMutation) ClearAPITokenID

func (m *UpscaleMutation) ClearAPITokenID()

ClearAPITokenID clears the value of the "api_token_id" field.

func (*UpscaleMutation) ClearAPITokens

func (m *UpscaleMutation) ClearAPITokens()

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*UpscaleMutation) ClearCompletedAt

func (m *UpscaleMutation) ClearCompletedAt()

ClearCompletedAt clears the value of the "completed_at" field.

func (*UpscaleMutation) ClearCountryCode

func (m *UpscaleMutation) ClearCountryCode()

ClearCountryCode clears the value of the "country_code" field.

func (*UpscaleMutation) ClearDeviceInfo

func (m *UpscaleMutation) ClearDeviceInfo()

ClearDeviceInfo clears the "device_info" edge to the DeviceInfo entity.

func (*UpscaleMutation) ClearEdge

func (m *UpscaleMutation) 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 (*UpscaleMutation) ClearFailureReason

func (m *UpscaleMutation) ClearFailureReason()

ClearFailureReason clears the value of the "failure_reason" field.

func (*UpscaleMutation) ClearField

func (m *UpscaleMutation) 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 (*UpscaleMutation) ClearStartedAt

func (m *UpscaleMutation) ClearStartedAt()

ClearStartedAt clears the value of the "started_at" field.

func (*UpscaleMutation) ClearStripeProductID

func (m *UpscaleMutation) ClearStripeProductID()

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*UpscaleMutation) ClearUpscaleModels

func (m *UpscaleMutation) ClearUpscaleModels()

ClearUpscaleModels clears the "upscale_models" edge to the UpscaleModel entity.

func (*UpscaleMutation) ClearUpscaleOutputs

func (m *UpscaleMutation) ClearUpscaleOutputs()

ClearUpscaleOutputs clears the "upscale_outputs" edge to the UpscaleOutput entity.

func (*UpscaleMutation) ClearUser

func (m *UpscaleMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*UpscaleMutation) ClearedEdges

func (m *UpscaleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UpscaleMutation) ClearedFields

func (m *UpscaleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UpscaleMutation) Client

func (m UpscaleMutation) 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 (*UpscaleMutation) CompletedAt

func (m *UpscaleMutation) CompletedAt() (r time.Time, exists bool)

CompletedAt returns the value of the "completed_at" field in the mutation.

func (*UpscaleMutation) CompletedAtCleared

func (m *UpscaleMutation) CompletedAtCleared() bool

CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.

func (*UpscaleMutation) CountryCode

func (m *UpscaleMutation) CountryCode() (r string, exists bool)

CountryCode returns the value of the "country_code" field in the mutation.

func (*UpscaleMutation) CountryCodeCleared

func (m *UpscaleMutation) CountryCodeCleared() bool

CountryCodeCleared returns if the "country_code" field was cleared in this mutation.

func (*UpscaleMutation) CreatedAt

func (m *UpscaleMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UpscaleMutation) DeviceInfoCleared

func (m *UpscaleMutation) DeviceInfoCleared() bool

DeviceInfoCleared reports if the "device_info" edge to the DeviceInfo entity was cleared.

func (*UpscaleMutation) DeviceInfoID

func (m *UpscaleMutation) DeviceInfoID() (r uuid.UUID, exists bool)

DeviceInfoID returns the value of the "device_info_id" field in the mutation.

func (*UpscaleMutation) DeviceInfoIDs

func (m *UpscaleMutation) DeviceInfoIDs() (ids []uuid.UUID)

DeviceInfoIDs returns the "device_info" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeviceInfoID instead. It exists only for internal usage by the builders.

func (*UpscaleMutation) EdgeCleared

func (m *UpscaleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UpscaleMutation) ExecContext

func (c *UpscaleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleMutation) FailureReason

func (m *UpscaleMutation) FailureReason() (r string, exists bool)

FailureReason returns the value of the "failure_reason" field in the mutation.

func (*UpscaleMutation) FailureReasonCleared

func (m *UpscaleMutation) FailureReasonCleared() bool

FailureReasonCleared returns if the "failure_reason" field was cleared in this mutation.

func (*UpscaleMutation) Field

func (m *UpscaleMutation) 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 (*UpscaleMutation) FieldCleared

func (m *UpscaleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UpscaleMutation) Fields

func (m *UpscaleMutation) 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 (*UpscaleMutation) Height

func (m *UpscaleMutation) Height() (r int32, exists bool)

Height returns the value of the "height" field in the mutation.

func (*UpscaleMutation) ID

func (m *UpscaleMutation) 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 (*UpscaleMutation) IDs

func (m *UpscaleMutation) 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 (*UpscaleMutation) ModelID

func (m *UpscaleMutation) ModelID() (r uuid.UUID, exists bool)

ModelID returns the value of the "model_id" field in the mutation.

func (*UpscaleMutation) OldAPITokenID

func (m *UpscaleMutation) OldAPITokenID(ctx context.Context) (v *uuid.UUID, err error)

OldAPITokenID returns the old "api_token_id" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldCompletedAt

func (m *UpscaleMutation) OldCompletedAt(ctx context.Context) (v *time.Time, err error)

OldCompletedAt returns the old "completed_at" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldCountryCode

func (m *UpscaleMutation) OldCountryCode(ctx context.Context) (v *string, err error)

OldCountryCode returns the old "country_code" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldCreatedAt

func (m *UpscaleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldDeviceInfoID

func (m *UpscaleMutation) OldDeviceInfoID(ctx context.Context) (v uuid.UUID, err error)

OldDeviceInfoID returns the old "device_info_id" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldFailureReason

func (m *UpscaleMutation) OldFailureReason(ctx context.Context) (v *string, err error)

OldFailureReason returns the old "failure_reason" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldField

func (m *UpscaleMutation) 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 (*UpscaleMutation) OldHeight

func (m *UpscaleMutation) OldHeight(ctx context.Context) (v int32, err error)

OldHeight returns the old "height" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldModelID

func (m *UpscaleMutation) OldModelID(ctx context.Context) (v uuid.UUID, err error)

OldModelID returns the old "model_id" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldScale

func (m *UpscaleMutation) OldScale(ctx context.Context) (v int32, err error)

OldScale returns the old "scale" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldSourceType

func (m *UpscaleMutation) OldSourceType(ctx context.Context) (v enttypes.SourceType, err error)

OldSourceType returns the old "source_type" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldStartedAt

func (m *UpscaleMutation) OldStartedAt(ctx context.Context) (v *time.Time, err error)

OldStartedAt returns the old "started_at" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldStatus

func (m *UpscaleMutation) OldStatus(ctx context.Context) (v upscale.Status, err error)

OldStatus returns the old "status" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldStripeProductID

func (m *UpscaleMutation) OldStripeProductID(ctx context.Context) (v *string, err error)

OldStripeProductID returns the old "stripe_product_id" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldSystemGenerated

func (m *UpscaleMutation) OldSystemGenerated(ctx context.Context) (v bool, err error)

OldSystemGenerated returns the old "system_generated" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldUpdatedAt

func (m *UpscaleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldUserID

func (m *UpscaleMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) OldWidth

func (m *UpscaleMutation) OldWidth(ctx context.Context) (v int32, err error)

OldWidth returns the old "width" field's value of the Upscale entity. If the Upscale 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 (*UpscaleMutation) Op

func (m *UpscaleMutation) Op() Op

Op returns the operation name.

func (*UpscaleMutation) QueryContext

func (c *UpscaleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleMutation) RemoveUpscaleOutputIDs

func (m *UpscaleMutation) RemoveUpscaleOutputIDs(ids ...uuid.UUID)

RemoveUpscaleOutputIDs removes the "upscale_outputs" edge to the UpscaleOutput entity by IDs.

func (*UpscaleMutation) RemovedEdges

func (m *UpscaleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UpscaleMutation) RemovedIDs

func (m *UpscaleMutation) 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 (*UpscaleMutation) RemovedUpscaleOutputsIDs

func (m *UpscaleMutation) RemovedUpscaleOutputsIDs() (ids []uuid.UUID)

RemovedUpscaleOutputs returns the removed IDs of the "upscale_outputs" edge to the UpscaleOutput entity.

func (*UpscaleMutation) ResetAPITokenID

func (m *UpscaleMutation) ResetAPITokenID()

ResetAPITokenID resets all changes to the "api_token_id" field.

func (*UpscaleMutation) ResetAPITokens

func (m *UpscaleMutation) ResetAPITokens()

ResetAPITokens resets all changes to the "api_tokens" edge.

func (*UpscaleMutation) ResetCompletedAt

func (m *UpscaleMutation) ResetCompletedAt()

ResetCompletedAt resets all changes to the "completed_at" field.

func (*UpscaleMutation) ResetCountryCode

func (m *UpscaleMutation) ResetCountryCode()

ResetCountryCode resets all changes to the "country_code" field.

func (*UpscaleMutation) ResetCreatedAt

func (m *UpscaleMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UpscaleMutation) ResetDeviceInfo

func (m *UpscaleMutation) ResetDeviceInfo()

ResetDeviceInfo resets all changes to the "device_info" edge.

func (*UpscaleMutation) ResetDeviceInfoID

func (m *UpscaleMutation) ResetDeviceInfoID()

ResetDeviceInfoID resets all changes to the "device_info_id" field.

func (*UpscaleMutation) ResetEdge

func (m *UpscaleMutation) 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 (*UpscaleMutation) ResetFailureReason

func (m *UpscaleMutation) ResetFailureReason()

ResetFailureReason resets all changes to the "failure_reason" field.

func (*UpscaleMutation) ResetField

func (m *UpscaleMutation) 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 (*UpscaleMutation) ResetHeight

func (m *UpscaleMutation) ResetHeight()

ResetHeight resets all changes to the "height" field.

func (*UpscaleMutation) ResetModelID

func (m *UpscaleMutation) ResetModelID()

ResetModelID resets all changes to the "model_id" field.

func (*UpscaleMutation) ResetScale

func (m *UpscaleMutation) ResetScale()

ResetScale resets all changes to the "scale" field.

func (*UpscaleMutation) ResetSourceType

func (m *UpscaleMutation) ResetSourceType()

ResetSourceType resets all changes to the "source_type" field.

func (*UpscaleMutation) ResetStartedAt

func (m *UpscaleMutation) ResetStartedAt()

ResetStartedAt resets all changes to the "started_at" field.

func (*UpscaleMutation) ResetStatus

func (m *UpscaleMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*UpscaleMutation) ResetStripeProductID

func (m *UpscaleMutation) ResetStripeProductID()

ResetStripeProductID resets all changes to the "stripe_product_id" field.

func (*UpscaleMutation) ResetSystemGenerated

func (m *UpscaleMutation) ResetSystemGenerated()

ResetSystemGenerated resets all changes to the "system_generated" field.

func (*UpscaleMutation) ResetUpdatedAt

func (m *UpscaleMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UpscaleMutation) ResetUpscaleModels

func (m *UpscaleMutation) ResetUpscaleModels()

ResetUpscaleModels resets all changes to the "upscale_models" edge.

func (*UpscaleMutation) ResetUpscaleOutputs

func (m *UpscaleMutation) ResetUpscaleOutputs()

ResetUpscaleOutputs resets all changes to the "upscale_outputs" edge.

func (*UpscaleMutation) ResetUser

func (m *UpscaleMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*UpscaleMutation) ResetUserID

func (m *UpscaleMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*UpscaleMutation) ResetWidth

func (m *UpscaleMutation) ResetWidth()

ResetWidth resets all changes to the "width" field.

func (*UpscaleMutation) Scale

func (m *UpscaleMutation) Scale() (r int32, exists bool)

Scale returns the value of the "scale" field in the mutation.

func (*UpscaleMutation) SetAPITokenID

func (m *UpscaleMutation) SetAPITokenID(u uuid.UUID)

SetAPITokenID sets the "api_token_id" field.

func (*UpscaleMutation) SetAPITokensID

func (m *UpscaleMutation) SetAPITokensID(id uuid.UUID)

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by id.

func (*UpscaleMutation) SetCompletedAt

func (m *UpscaleMutation) SetCompletedAt(t time.Time)

SetCompletedAt sets the "completed_at" field.

func (*UpscaleMutation) SetCountryCode

func (m *UpscaleMutation) SetCountryCode(s string)

SetCountryCode sets the "country_code" field.

func (*UpscaleMutation) SetCreatedAt

func (m *UpscaleMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UpscaleMutation) SetDeviceInfoID

func (m *UpscaleMutation) SetDeviceInfoID(u uuid.UUID)

SetDeviceInfoID sets the "device_info_id" field.

func (*UpscaleMutation) SetFailureReason

func (m *UpscaleMutation) SetFailureReason(s string)

SetFailureReason sets the "failure_reason" field.

func (*UpscaleMutation) SetField

func (m *UpscaleMutation) 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 (*UpscaleMutation) SetHeight

func (m *UpscaleMutation) SetHeight(i int32)

SetHeight sets the "height" field.

func (*UpscaleMutation) SetID

func (m *UpscaleMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Upscale entities.

func (*UpscaleMutation) SetModelID

func (m *UpscaleMutation) SetModelID(u uuid.UUID)

SetModelID sets the "model_id" field.

func (*UpscaleMutation) SetOp

func (m *UpscaleMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UpscaleMutation) SetScale

func (m *UpscaleMutation) SetScale(i int32)

SetScale sets the "scale" field.

func (*UpscaleMutation) SetSourceType

func (m *UpscaleMutation) SetSourceType(et enttypes.SourceType)

SetSourceType sets the "source_type" field.

func (*UpscaleMutation) SetStartedAt

func (m *UpscaleMutation) SetStartedAt(t time.Time)

SetStartedAt sets the "started_at" field.

func (*UpscaleMutation) SetStatus

func (m *UpscaleMutation) SetStatus(u upscale.Status)

SetStatus sets the "status" field.

func (*UpscaleMutation) SetStripeProductID

func (m *UpscaleMutation) SetStripeProductID(s string)

SetStripeProductID sets the "stripe_product_id" field.

func (*UpscaleMutation) SetSystemGenerated

func (m *UpscaleMutation) SetSystemGenerated(b bool)

SetSystemGenerated sets the "system_generated" field.

func (*UpscaleMutation) SetUpdatedAt

func (m *UpscaleMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleMutation) SetUpscaleModelsID

func (m *UpscaleMutation) SetUpscaleModelsID(id uuid.UUID)

SetUpscaleModelsID sets the "upscale_models" edge to the UpscaleModel entity by id.

func (*UpscaleMutation) SetUserID

func (m *UpscaleMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (*UpscaleMutation) SetWidth

func (m *UpscaleMutation) SetWidth(i int32)

SetWidth sets the "width" field.

func (*UpscaleMutation) SourceType

func (m *UpscaleMutation) SourceType() (r enttypes.SourceType, exists bool)

SourceType returns the value of the "source_type" field in the mutation.

func (*UpscaleMutation) StartedAt

func (m *UpscaleMutation) StartedAt() (r time.Time, exists bool)

StartedAt returns the value of the "started_at" field in the mutation.

func (*UpscaleMutation) StartedAtCleared

func (m *UpscaleMutation) StartedAtCleared() bool

StartedAtCleared returns if the "started_at" field was cleared in this mutation.

func (*UpscaleMutation) Status

func (m *UpscaleMutation) Status() (r upscale.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*UpscaleMutation) StripeProductID

func (m *UpscaleMutation) StripeProductID() (r string, exists bool)

StripeProductID returns the value of the "stripe_product_id" field in the mutation.

func (*UpscaleMutation) StripeProductIDCleared

func (m *UpscaleMutation) StripeProductIDCleared() bool

StripeProductIDCleared returns if the "stripe_product_id" field was cleared in this mutation.

func (*UpscaleMutation) SystemGenerated

func (m *UpscaleMutation) SystemGenerated() (r bool, exists bool)

SystemGenerated returns the value of the "system_generated" field in the mutation.

func (UpscaleMutation) Tx

func (m UpscaleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UpscaleMutation) Type

func (m *UpscaleMutation) Type() string

Type returns the node type of this mutation (Upscale).

func (*UpscaleMutation) UpdatedAt

func (m *UpscaleMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UpscaleMutation) UpscaleModelsCleared

func (m *UpscaleMutation) UpscaleModelsCleared() bool

UpscaleModelsCleared reports if the "upscale_models" edge to the UpscaleModel entity was cleared.

func (*UpscaleMutation) UpscaleModelsID

func (m *UpscaleMutation) UpscaleModelsID() (id uuid.UUID, exists bool)

UpscaleModelsID returns the "upscale_models" edge ID in the mutation.

func (*UpscaleMutation) UpscaleModelsIDs

func (m *UpscaleMutation) UpscaleModelsIDs() (ids []uuid.UUID)

UpscaleModelsIDs returns the "upscale_models" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UpscaleModelsID instead. It exists only for internal usage by the builders.

func (*UpscaleMutation) UpscaleOutputsCleared

func (m *UpscaleMutation) UpscaleOutputsCleared() bool

UpscaleOutputsCleared reports if the "upscale_outputs" edge to the UpscaleOutput entity was cleared.

func (*UpscaleMutation) UpscaleOutputsIDs

func (m *UpscaleMutation) UpscaleOutputsIDs() (ids []uuid.UUID)

UpscaleOutputsIDs returns the "upscale_outputs" edge IDs in the mutation.

func (*UpscaleMutation) UserCleared

func (m *UpscaleMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*UpscaleMutation) UserID

func (m *UpscaleMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*UpscaleMutation) UserIDs

func (m *UpscaleMutation) UserIDs() (ids []uuid.UUID)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*UpscaleMutation) Where

func (m *UpscaleMutation) Where(ps ...predicate.Upscale)

Where appends a list predicates to the UpscaleMutation builder.

func (*UpscaleMutation) WhereP

func (m *UpscaleMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UpscaleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*UpscaleMutation) Width

func (m *UpscaleMutation) Width() (r int32, exists bool)

Width returns the value of the "width" field in the mutation.

type UpscaleOutput

type UpscaleOutput struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ImagePath holds the value of the "image_path" field.
	ImagePath string `json:"image_path,omitempty"`
	// InputImageURL holds the value of the "input_image_url" field.
	InputImageURL *string `json:"input_image_url,omitempty"`
	// UpscaleID holds the value of the "upscale_id" field.
	UpscaleID uuid.UUID `json:"upscale_id,omitempty"`
	// GenerationOutputID holds the value of the "generation_output_id" field.
	GenerationOutputID *uuid.UUID `json:"generation_output_id,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UpscaleOutputQuery when eager-loading is set.
	Edges UpscaleOutputEdges `json:"edges"`
	// contains filtered or unexported fields
}

UpscaleOutput is the model entity for the UpscaleOutput schema.

func (*UpscaleOutput) ExecContext

func (c *UpscaleOutput) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleOutput) QueryContext

func (c *UpscaleOutput) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleOutput) QueryGenerationOutput

func (uo *UpscaleOutput) QueryGenerationOutput() *GenerationOutputQuery

QueryGenerationOutput queries the "generation_output" edge of the UpscaleOutput entity.

func (*UpscaleOutput) QueryUpscales

func (uo *UpscaleOutput) QueryUpscales() *UpscaleQuery

QueryUpscales queries the "upscales" edge of the UpscaleOutput entity.

func (*UpscaleOutput) String

func (uo *UpscaleOutput) String() string

String implements the fmt.Stringer.

func (*UpscaleOutput) Unwrap

func (uo *UpscaleOutput) Unwrap() *UpscaleOutput

Unwrap unwraps the UpscaleOutput 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 (*UpscaleOutput) Update

func (uo *UpscaleOutput) Update() *UpscaleOutputUpdateOne

Update returns a builder for updating this UpscaleOutput. Note that you need to call UpscaleOutput.Unwrap() before calling this method if this UpscaleOutput was returned from a transaction, and the transaction was committed or rolled back.

type UpscaleOutputClient

type UpscaleOutputClient struct {
	// contains filtered or unexported fields
}

UpscaleOutputClient is a client for the UpscaleOutput schema.

func NewUpscaleOutputClient

func NewUpscaleOutputClient(c config) *UpscaleOutputClient

NewUpscaleOutputClient returns a client for the UpscaleOutput from the given config.

func (*UpscaleOutputClient) Create

Create returns a builder for creating a UpscaleOutput entity.

func (*UpscaleOutputClient) CreateBulk

CreateBulk returns a builder for creating a bulk of UpscaleOutput entities.

func (*UpscaleOutputClient) Delete

Delete returns a delete builder for UpscaleOutput.

func (*UpscaleOutputClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UpscaleOutputClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UpscaleOutputClient) ExecContext

func (c *UpscaleOutputClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleOutputClient) Get

Get returns a UpscaleOutput entity by its id.

func (*UpscaleOutputClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UpscaleOutputClient) Hooks

func (c *UpscaleOutputClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UpscaleOutputClient) Intercept

func (c *UpscaleOutputClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `upscaleoutput.Intercept(f(g(h())))`.

func (*UpscaleOutputClient) Interceptors

func (c *UpscaleOutputClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UpscaleOutputClient) Query

Query returns a query builder for UpscaleOutput.

func (*UpscaleOutputClient) QueryContext

func (c *UpscaleOutputClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleOutputClient) QueryGenerationOutput

func (c *UpscaleOutputClient) QueryGenerationOutput(uo *UpscaleOutput) *GenerationOutputQuery

QueryGenerationOutput queries the generation_output edge of a UpscaleOutput.

func (*UpscaleOutputClient) QueryUpscales

func (c *UpscaleOutputClient) QueryUpscales(uo *UpscaleOutput) *UpscaleQuery

QueryUpscales queries the upscales edge of a UpscaleOutput.

func (*UpscaleOutputClient) Update

Update returns an update builder for UpscaleOutput.

func (*UpscaleOutputClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UpscaleOutputClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*UpscaleOutputClient) Use

func (c *UpscaleOutputClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `upscaleoutput.Hooks(f(g(h())))`.

type UpscaleOutputCreate

type UpscaleOutputCreate struct {
	// contains filtered or unexported fields
}

UpscaleOutputCreate is the builder for creating a UpscaleOutput entity.

func (*UpscaleOutputCreate) Exec

func (uoc *UpscaleOutputCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleOutputCreate) ExecContext

func (c *UpscaleOutputCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleOutputCreate) ExecX

func (uoc *UpscaleOutputCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleOutputCreate) Mutation

func (uoc *UpscaleOutputCreate) Mutation() *UpscaleOutputMutation

Mutation returns the UpscaleOutputMutation object of the builder.

func (*UpscaleOutputCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UpscaleOutput.Create().
	SetImagePath(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UpscaleOutputUpsert) {
		SetImagePath(v+v).
	}).
	Exec(ctx)

func (*UpscaleOutputCreate) OnConflictColumns

func (uoc *UpscaleOutputCreate) OnConflictColumns(columns ...string) *UpscaleOutputUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UpscaleOutput.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UpscaleOutputCreate) QueryContext

func (c *UpscaleOutputCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleOutputCreate) Save

Save creates the UpscaleOutput in the database.

func (*UpscaleOutputCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UpscaleOutputCreate) SetCreatedAt

func (uoc *UpscaleOutputCreate) SetCreatedAt(t time.Time) *UpscaleOutputCreate

SetCreatedAt sets the "created_at" field.

func (*UpscaleOutputCreate) SetDeletedAt

func (uoc *UpscaleOutputCreate) SetDeletedAt(t time.Time) *UpscaleOutputCreate

SetDeletedAt sets the "deleted_at" field.

func (*UpscaleOutputCreate) SetGenerationOutput

func (uoc *UpscaleOutputCreate) SetGenerationOutput(g *GenerationOutput) *UpscaleOutputCreate

SetGenerationOutput sets the "generation_output" edge to the GenerationOutput entity.

func (*UpscaleOutputCreate) SetGenerationOutputID

func (uoc *UpscaleOutputCreate) SetGenerationOutputID(u uuid.UUID) *UpscaleOutputCreate

SetGenerationOutputID sets the "generation_output_id" field.

func (*UpscaleOutputCreate) SetID

SetID sets the "id" field.

func (*UpscaleOutputCreate) SetImagePath

func (uoc *UpscaleOutputCreate) SetImagePath(s string) *UpscaleOutputCreate

SetImagePath sets the "image_path" field.

func (*UpscaleOutputCreate) SetInputImageURL

func (uoc *UpscaleOutputCreate) SetInputImageURL(s string) *UpscaleOutputCreate

SetInputImageURL sets the "input_image_url" field.

func (*UpscaleOutputCreate) SetNillableCreatedAt

func (uoc *UpscaleOutputCreate) SetNillableCreatedAt(t *time.Time) *UpscaleOutputCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UpscaleOutputCreate) SetNillableDeletedAt

func (uoc *UpscaleOutputCreate) SetNillableDeletedAt(t *time.Time) *UpscaleOutputCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*UpscaleOutputCreate) SetNillableGenerationOutputID

func (uoc *UpscaleOutputCreate) SetNillableGenerationOutputID(u *uuid.UUID) *UpscaleOutputCreate

SetNillableGenerationOutputID sets the "generation_output_id" field if the given value is not nil.

func (*UpscaleOutputCreate) SetNillableID

func (uoc *UpscaleOutputCreate) SetNillableID(u *uuid.UUID) *UpscaleOutputCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*UpscaleOutputCreate) SetNillableInputImageURL

func (uoc *UpscaleOutputCreate) SetNillableInputImageURL(s *string) *UpscaleOutputCreate

SetNillableInputImageURL sets the "input_image_url" field if the given value is not nil.

func (*UpscaleOutputCreate) SetNillableUpdatedAt

func (uoc *UpscaleOutputCreate) SetNillableUpdatedAt(t *time.Time) *UpscaleOutputCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UpscaleOutputCreate) SetUpdatedAt

func (uoc *UpscaleOutputCreate) SetUpdatedAt(t time.Time) *UpscaleOutputCreate

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleOutputCreate) SetUpscaleID

func (uoc *UpscaleOutputCreate) SetUpscaleID(u uuid.UUID) *UpscaleOutputCreate

SetUpscaleID sets the "upscale_id" field.

func (*UpscaleOutputCreate) SetUpscales

func (uoc *UpscaleOutputCreate) SetUpscales(u *Upscale) *UpscaleOutputCreate

SetUpscales sets the "upscales" edge to the Upscale entity.

func (*UpscaleOutputCreate) SetUpscalesID

func (uoc *UpscaleOutputCreate) SetUpscalesID(id uuid.UUID) *UpscaleOutputCreate

SetUpscalesID sets the "upscales" edge to the Upscale entity by ID.

type UpscaleOutputCreateBulk

type UpscaleOutputCreateBulk struct {
	// contains filtered or unexported fields
}

UpscaleOutputCreateBulk is the builder for creating many UpscaleOutput entities in bulk.

func (*UpscaleOutputCreateBulk) Exec

func (uocb *UpscaleOutputCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleOutputCreateBulk) ExecContext

func (c *UpscaleOutputCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleOutputCreateBulk) ExecX

func (uocb *UpscaleOutputCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleOutputCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UpscaleOutput.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UpscaleOutputUpsert) {
		SetImagePath(v+v).
	}).
	Exec(ctx)

func (*UpscaleOutputCreateBulk) OnConflictColumns

func (uocb *UpscaleOutputCreateBulk) OnConflictColumns(columns ...string) *UpscaleOutputUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UpscaleOutput.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UpscaleOutputCreateBulk) QueryContext

func (c *UpscaleOutputCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleOutputCreateBulk) Save

Save creates the UpscaleOutput entities in the database.

func (*UpscaleOutputCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type UpscaleOutputDelete

type UpscaleOutputDelete struct {
	// contains filtered or unexported fields
}

UpscaleOutputDelete is the builder for deleting a UpscaleOutput entity.

func (*UpscaleOutputDelete) Exec

func (uod *UpscaleOutputDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UpscaleOutputDelete) ExecContext

func (c *UpscaleOutputDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleOutputDelete) ExecX

func (uod *UpscaleOutputDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleOutputDelete) QueryContext

func (c *UpscaleOutputDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleOutputDelete) Where

Where appends a list predicates to the UpscaleOutputDelete builder.

type UpscaleOutputDeleteOne

type UpscaleOutputDeleteOne struct {
	// contains filtered or unexported fields
}

UpscaleOutputDeleteOne is the builder for deleting a single UpscaleOutput entity.

func (*UpscaleOutputDeleteOne) Exec

func (uodo *UpscaleOutputDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UpscaleOutputDeleteOne) ExecX

func (uodo *UpscaleOutputDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type UpscaleOutputEdges

type UpscaleOutputEdges struct {
	// Upscales holds the value of the upscales edge.
	Upscales *Upscale `json:"upscales,omitempty"`
	// GenerationOutput holds the value of the generation_output edge.
	GenerationOutput *GenerationOutput `json:"generation_output,omitempty"`
	// contains filtered or unexported fields
}

UpscaleOutputEdges holds the relations/edges for other nodes in the graph.

func (UpscaleOutputEdges) GenerationOutputOrErr

func (e UpscaleOutputEdges) GenerationOutputOrErr() (*GenerationOutput, error)

GenerationOutputOrErr returns the GenerationOutput value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UpscaleOutputEdges) UpscalesOrErr

func (e UpscaleOutputEdges) UpscalesOrErr() (*Upscale, error)

UpscalesOrErr returns the Upscales value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type UpscaleOutputGroupBy

type UpscaleOutputGroupBy struct {
	// contains filtered or unexported fields
}

UpscaleOutputGroupBy is the group-by builder for UpscaleOutput entities.

func (*UpscaleOutputGroupBy) Aggregate

func (uogb *UpscaleOutputGroupBy) Aggregate(fns ...AggregateFunc) *UpscaleOutputGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UpscaleOutputGroupBy) Bool

func (s *UpscaleOutputGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputGroupBy) BoolX

func (s *UpscaleOutputGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UpscaleOutputGroupBy) Bools

func (s *UpscaleOutputGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputGroupBy) BoolsX

func (s *UpscaleOutputGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UpscaleOutputGroupBy) Float64

func (s *UpscaleOutputGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputGroupBy) Float64X

func (s *UpscaleOutputGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UpscaleOutputGroupBy) Float64s

func (s *UpscaleOutputGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputGroupBy) Float64sX

func (s *UpscaleOutputGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UpscaleOutputGroupBy) Int

func (s *UpscaleOutputGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputGroupBy) IntX

func (s *UpscaleOutputGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UpscaleOutputGroupBy) Ints

func (s *UpscaleOutputGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputGroupBy) IntsX

func (s *UpscaleOutputGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UpscaleOutputGroupBy) Scan

func (uogb *UpscaleOutputGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UpscaleOutputGroupBy) ScanX

func (s *UpscaleOutputGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UpscaleOutputGroupBy) String

func (s *UpscaleOutputGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputGroupBy) StringX

func (s *UpscaleOutputGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UpscaleOutputGroupBy) Strings

func (s *UpscaleOutputGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputGroupBy) StringsX

func (s *UpscaleOutputGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UpscaleOutputMutation

type UpscaleOutputMutation struct {
	// contains filtered or unexported fields
}

UpscaleOutputMutation represents an operation that mutates the UpscaleOutput nodes in the graph.

func (*UpscaleOutputMutation) AddField

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) AddedEdges

func (m *UpscaleOutputMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UpscaleOutputMutation) AddedField

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) AddedFields

func (m *UpscaleOutputMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UpscaleOutputMutation) AddedIDs

func (m *UpscaleOutputMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UpscaleOutputMutation) ClearDeletedAt

func (m *UpscaleOutputMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UpscaleOutputMutation) ClearEdge

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) ClearField

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) ClearGenerationOutput

func (m *UpscaleOutputMutation) ClearGenerationOutput()

ClearGenerationOutput clears the "generation_output" edge to the GenerationOutput entity.

func (*UpscaleOutputMutation) ClearGenerationOutputID

func (m *UpscaleOutputMutation) ClearGenerationOutputID()

ClearGenerationOutputID clears the value of the "generation_output_id" field.

func (*UpscaleOutputMutation) ClearInputImageURL

func (m *UpscaleOutputMutation) ClearInputImageURL()

ClearInputImageURL clears the value of the "input_image_url" field.

func (*UpscaleOutputMutation) ClearUpscales

func (m *UpscaleOutputMutation) ClearUpscales()

ClearUpscales clears the "upscales" edge to the Upscale entity.

func (*UpscaleOutputMutation) ClearedEdges

func (m *UpscaleOutputMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UpscaleOutputMutation) ClearedFields

func (m *UpscaleOutputMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UpscaleOutputMutation) Client

func (m UpscaleOutputMutation) 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 (*UpscaleOutputMutation) CreatedAt

func (m *UpscaleOutputMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UpscaleOutputMutation) DeletedAt

func (m *UpscaleOutputMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*UpscaleOutputMutation) DeletedAtCleared

func (m *UpscaleOutputMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*UpscaleOutputMutation) EdgeCleared

func (m *UpscaleOutputMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UpscaleOutputMutation) ExecContext

func (c *UpscaleOutputMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleOutputMutation) Field

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) FieldCleared

func (m *UpscaleOutputMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UpscaleOutputMutation) Fields

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) GenerationOutputCleared

func (m *UpscaleOutputMutation) GenerationOutputCleared() bool

GenerationOutputCleared reports if the "generation_output" edge to the GenerationOutput entity was cleared.

func (*UpscaleOutputMutation) GenerationOutputID

func (m *UpscaleOutputMutation) GenerationOutputID() (r uuid.UUID, exists bool)

GenerationOutputID returns the value of the "generation_output_id" field in the mutation.

func (*UpscaleOutputMutation) GenerationOutputIDCleared

func (m *UpscaleOutputMutation) GenerationOutputIDCleared() bool

GenerationOutputIDCleared returns if the "generation_output_id" field was cleared in this mutation.

func (*UpscaleOutputMutation) GenerationOutputIDs

func (m *UpscaleOutputMutation) GenerationOutputIDs() (ids []uuid.UUID)

GenerationOutputIDs returns the "generation_output" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GenerationOutputID instead. It exists only for internal usage by the builders.

func (*UpscaleOutputMutation) ID

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) 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 (*UpscaleOutputMutation) ImagePath

func (m *UpscaleOutputMutation) ImagePath() (r string, exists bool)

ImagePath returns the value of the "image_path" field in the mutation.

func (*UpscaleOutputMutation) InputImageURL

func (m *UpscaleOutputMutation) InputImageURL() (r string, exists bool)

InputImageURL returns the value of the "input_image_url" field in the mutation.

func (*UpscaleOutputMutation) InputImageURLCleared

func (m *UpscaleOutputMutation) InputImageURLCleared() bool

InputImageURLCleared returns if the "input_image_url" field was cleared in this mutation.

func (*UpscaleOutputMutation) OldCreatedAt

func (m *UpscaleOutputMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the UpscaleOutput entity. If the UpscaleOutput 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 (*UpscaleOutputMutation) OldDeletedAt

func (m *UpscaleOutputMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the UpscaleOutput entity. If the UpscaleOutput 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 (*UpscaleOutputMutation) OldField

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) OldGenerationOutputID

func (m *UpscaleOutputMutation) OldGenerationOutputID(ctx context.Context) (v *uuid.UUID, err error)

OldGenerationOutputID returns the old "generation_output_id" field's value of the UpscaleOutput entity. If the UpscaleOutput 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 (*UpscaleOutputMutation) OldImagePath

func (m *UpscaleOutputMutation) OldImagePath(ctx context.Context) (v string, err error)

OldImagePath returns the old "image_path" field's value of the UpscaleOutput entity. If the UpscaleOutput 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 (*UpscaleOutputMutation) OldInputImageURL

func (m *UpscaleOutputMutation) OldInputImageURL(ctx context.Context) (v *string, err error)

OldInputImageURL returns the old "input_image_url" field's value of the UpscaleOutput entity. If the UpscaleOutput 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 (*UpscaleOutputMutation) OldUpdatedAt

func (m *UpscaleOutputMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the UpscaleOutput entity. If the UpscaleOutput 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 (*UpscaleOutputMutation) OldUpscaleID

func (m *UpscaleOutputMutation) OldUpscaleID(ctx context.Context) (v uuid.UUID, err error)

OldUpscaleID returns the old "upscale_id" field's value of the UpscaleOutput entity. If the UpscaleOutput 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 (*UpscaleOutputMutation) Op

func (m *UpscaleOutputMutation) Op() Op

Op returns the operation name.

func (*UpscaleOutputMutation) QueryContext

func (c *UpscaleOutputMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleOutputMutation) RemovedEdges

func (m *UpscaleOutputMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UpscaleOutputMutation) RemovedIDs

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) ResetCreatedAt

func (m *UpscaleOutputMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UpscaleOutputMutation) ResetDeletedAt

func (m *UpscaleOutputMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*UpscaleOutputMutation) ResetEdge

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) ResetField

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) ResetGenerationOutput

func (m *UpscaleOutputMutation) ResetGenerationOutput()

ResetGenerationOutput resets all changes to the "generation_output" edge.

func (*UpscaleOutputMutation) ResetGenerationOutputID

func (m *UpscaleOutputMutation) ResetGenerationOutputID()

ResetGenerationOutputID resets all changes to the "generation_output_id" field.

func (*UpscaleOutputMutation) ResetImagePath

func (m *UpscaleOutputMutation) ResetImagePath()

ResetImagePath resets all changes to the "image_path" field.

func (*UpscaleOutputMutation) ResetInputImageURL

func (m *UpscaleOutputMutation) ResetInputImageURL()

ResetInputImageURL resets all changes to the "input_image_url" field.

func (*UpscaleOutputMutation) ResetUpdatedAt

func (m *UpscaleOutputMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UpscaleOutputMutation) ResetUpscaleID

func (m *UpscaleOutputMutation) ResetUpscaleID()

ResetUpscaleID resets all changes to the "upscale_id" field.

func (*UpscaleOutputMutation) ResetUpscales

func (m *UpscaleOutputMutation) ResetUpscales()

ResetUpscales resets all changes to the "upscales" edge.

func (*UpscaleOutputMutation) SetCreatedAt

func (m *UpscaleOutputMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UpscaleOutputMutation) SetDeletedAt

func (m *UpscaleOutputMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*UpscaleOutputMutation) SetField

func (m *UpscaleOutputMutation) 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 (*UpscaleOutputMutation) SetGenerationOutputID

func (m *UpscaleOutputMutation) SetGenerationOutputID(u uuid.UUID)

SetGenerationOutputID sets the "generation_output_id" field.

func (*UpscaleOutputMutation) SetID

func (m *UpscaleOutputMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of UpscaleOutput entities.

func (*UpscaleOutputMutation) SetImagePath

func (m *UpscaleOutputMutation) SetImagePath(s string)

SetImagePath sets the "image_path" field.

func (*UpscaleOutputMutation) SetInputImageURL

func (m *UpscaleOutputMutation) SetInputImageURL(s string)

SetInputImageURL sets the "input_image_url" field.

func (*UpscaleOutputMutation) SetOp

func (m *UpscaleOutputMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UpscaleOutputMutation) SetUpdatedAt

func (m *UpscaleOutputMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleOutputMutation) SetUpscaleID

func (m *UpscaleOutputMutation) SetUpscaleID(u uuid.UUID)

SetUpscaleID sets the "upscale_id" field.

func (*UpscaleOutputMutation) SetUpscalesID

func (m *UpscaleOutputMutation) SetUpscalesID(id uuid.UUID)

SetUpscalesID sets the "upscales" edge to the Upscale entity by id.

func (UpscaleOutputMutation) Tx

func (m UpscaleOutputMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UpscaleOutputMutation) Type

func (m *UpscaleOutputMutation) Type() string

Type returns the node type of this mutation (UpscaleOutput).

func (*UpscaleOutputMutation) UpdatedAt

func (m *UpscaleOutputMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UpscaleOutputMutation) UpscaleID

func (m *UpscaleOutputMutation) UpscaleID() (r uuid.UUID, exists bool)

UpscaleID returns the value of the "upscale_id" field in the mutation.

func (*UpscaleOutputMutation) UpscalesCleared

func (m *UpscaleOutputMutation) UpscalesCleared() bool

UpscalesCleared reports if the "upscales" edge to the Upscale entity was cleared.

func (*UpscaleOutputMutation) UpscalesID

func (m *UpscaleOutputMutation) UpscalesID() (id uuid.UUID, exists bool)

UpscalesID returns the "upscales" edge ID in the mutation.

func (*UpscaleOutputMutation) UpscalesIDs

func (m *UpscaleOutputMutation) UpscalesIDs() (ids []uuid.UUID)

UpscalesIDs returns the "upscales" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UpscalesID instead. It exists only for internal usage by the builders.

func (*UpscaleOutputMutation) Where

Where appends a list predicates to the UpscaleOutputMutation builder.

func (*UpscaleOutputMutation) WhereP

func (m *UpscaleOutputMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UpscaleOutputMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UpscaleOutputQuery

type UpscaleOutputQuery struct {
	// contains filtered or unexported fields
}

UpscaleOutputQuery is the builder for querying UpscaleOutput entities.

func (*UpscaleOutputQuery) Aggregate

func (uoq *UpscaleOutputQuery) Aggregate(fns ...AggregateFunc) *UpscaleOutputSelect

Aggregate returns a UpscaleOutputSelect configured with the given aggregations.

func (*UpscaleOutputQuery) All

All executes the query and returns a list of UpscaleOutputs.

func (*UpscaleOutputQuery) AllX

func (uoq *UpscaleOutputQuery) AllX(ctx context.Context) []*UpscaleOutput

AllX is like All, but panics if an error occurs.

func (*UpscaleOutputQuery) Clone

func (uoq *UpscaleOutputQuery) Clone() *UpscaleOutputQuery

Clone returns a duplicate of the UpscaleOutputQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UpscaleOutputQuery) Count

func (uoq *UpscaleOutputQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UpscaleOutputQuery) CountX

func (uoq *UpscaleOutputQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UpscaleOutputQuery) ExecContext

func (c *UpscaleOutputQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleOutputQuery) Exist

func (uoq *UpscaleOutputQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UpscaleOutputQuery) ExistX

func (uoq *UpscaleOutputQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UpscaleOutputQuery) First

First returns the first UpscaleOutput entity from the query. Returns a *NotFoundError when no UpscaleOutput was found.

func (*UpscaleOutputQuery) FirstID

func (uoq *UpscaleOutputQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first UpscaleOutput ID from the query. Returns a *NotFoundError when no UpscaleOutput ID was found.

func (*UpscaleOutputQuery) FirstIDX

func (uoq *UpscaleOutputQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UpscaleOutputQuery) FirstX

func (uoq *UpscaleOutputQuery) FirstX(ctx context.Context) *UpscaleOutput

FirstX is like First, but panics if an error occurs.

func (*UpscaleOutputQuery) GroupBy

func (uoq *UpscaleOutputQuery) GroupBy(field string, fields ...string) *UpscaleOutputGroupBy

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 {
	ImagePath string `json:"image_path,omitempty"`
	Count int `json:"count,omitempty"`
}

client.UpscaleOutput.Query().
	GroupBy(upscaleoutput.FieldImagePath).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UpscaleOutputQuery) IDs

func (uoq *UpscaleOutputQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of UpscaleOutput IDs.

func (*UpscaleOutputQuery) IDsX

func (uoq *UpscaleOutputQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UpscaleOutputQuery) Limit

func (uoq *UpscaleOutputQuery) Limit(limit int) *UpscaleOutputQuery

Limit the number of records to be returned by this query.

func (*UpscaleOutputQuery) Modify

func (uoq *UpscaleOutputQuery) Modify(modifiers ...func(s *sql.Selector)) *UpscaleOutputSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UpscaleOutputQuery) Offset

func (uoq *UpscaleOutputQuery) Offset(offset int) *UpscaleOutputQuery

Offset to start from.

func (*UpscaleOutputQuery) Only

Only returns a single UpscaleOutput entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UpscaleOutput entity is found. Returns a *NotFoundError when no UpscaleOutput entities are found.

func (*UpscaleOutputQuery) OnlyID

func (uoq *UpscaleOutputQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only UpscaleOutput ID in the query. Returns a *NotSingularError when more than one UpscaleOutput ID is found. Returns a *NotFoundError when no entities are found.

func (*UpscaleOutputQuery) OnlyIDX

func (uoq *UpscaleOutputQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UpscaleOutputQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*UpscaleOutputQuery) Order

Order specifies how the records should be ordered.

func (*UpscaleOutputQuery) QueryContext

func (c *UpscaleOutputQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleOutputQuery) QueryGenerationOutput

func (uoq *UpscaleOutputQuery) QueryGenerationOutput() *GenerationOutputQuery

QueryGenerationOutput chains the current query on the "generation_output" edge.

func (*UpscaleOutputQuery) QueryUpscales

func (uoq *UpscaleOutputQuery) QueryUpscales() *UpscaleQuery

QueryUpscales chains the current query on the "upscales" edge.

func (*UpscaleOutputQuery) Select

func (uoq *UpscaleOutputQuery) Select(fields ...string) *UpscaleOutputSelect

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 {
	ImagePath string `json:"image_path,omitempty"`
}

client.UpscaleOutput.Query().
	Select(upscaleoutput.FieldImagePath).
	Scan(ctx, &v)

func (*UpscaleOutputQuery) Unique

func (uoq *UpscaleOutputQuery) Unique(unique bool) *UpscaleOutputQuery

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 (*UpscaleOutputQuery) Where

Where adds a new predicate for the UpscaleOutputQuery builder.

func (*UpscaleOutputQuery) WithGenerationOutput

func (uoq *UpscaleOutputQuery) WithGenerationOutput(opts ...func(*GenerationOutputQuery)) *UpscaleOutputQuery

WithGenerationOutput tells the query-builder to eager-load the nodes that are connected to the "generation_output" edge. The optional arguments are used to configure the query builder of the edge.

func (*UpscaleOutputQuery) WithUpscales

func (uoq *UpscaleOutputQuery) WithUpscales(opts ...func(*UpscaleQuery)) *UpscaleOutputQuery

WithUpscales tells the query-builder to eager-load the nodes that are connected to the "upscales" edge. The optional arguments are used to configure the query builder of the edge.

type UpscaleOutputSelect

type UpscaleOutputSelect struct {
	*UpscaleOutputQuery
	// contains filtered or unexported fields
}

UpscaleOutputSelect is the builder for selecting fields of UpscaleOutput entities.

func (*UpscaleOutputSelect) Aggregate

func (uos *UpscaleOutputSelect) Aggregate(fns ...AggregateFunc) *UpscaleOutputSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UpscaleOutputSelect) Bool

func (s *UpscaleOutputSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputSelect) BoolX

func (s *UpscaleOutputSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UpscaleOutputSelect) Bools

func (s *UpscaleOutputSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputSelect) BoolsX

func (s *UpscaleOutputSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (UpscaleOutputSelect) ExecContext

func (c UpscaleOutputSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleOutputSelect) Float64

func (s *UpscaleOutputSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputSelect) Float64X

func (s *UpscaleOutputSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UpscaleOutputSelect) Float64s

func (s *UpscaleOutputSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputSelect) Float64sX

func (s *UpscaleOutputSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UpscaleOutputSelect) Int

func (s *UpscaleOutputSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputSelect) IntX

func (s *UpscaleOutputSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UpscaleOutputSelect) Ints

func (s *UpscaleOutputSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputSelect) IntsX

func (s *UpscaleOutputSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UpscaleOutputSelect) Modify

func (uos *UpscaleOutputSelect) Modify(modifiers ...func(s *sql.Selector)) *UpscaleOutputSelect

Modify adds a query modifier for attaching custom logic to queries.

func (UpscaleOutputSelect) QueryContext

func (c UpscaleOutputSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleOutputSelect) Scan

func (uos *UpscaleOutputSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UpscaleOutputSelect) ScanX

func (s *UpscaleOutputSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UpscaleOutputSelect) String

func (s *UpscaleOutputSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputSelect) StringX

func (s *UpscaleOutputSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UpscaleOutputSelect) Strings

func (s *UpscaleOutputSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UpscaleOutputSelect) StringsX

func (s *UpscaleOutputSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UpscaleOutputUpdate

type UpscaleOutputUpdate struct {
	// contains filtered or unexported fields
}

UpscaleOutputUpdate is the builder for updating UpscaleOutput entities.

func (*UpscaleOutputUpdate) ClearDeletedAt

func (uou *UpscaleOutputUpdate) ClearDeletedAt() *UpscaleOutputUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UpscaleOutputUpdate) ClearGenerationOutput

func (uou *UpscaleOutputUpdate) ClearGenerationOutput() *UpscaleOutputUpdate

ClearGenerationOutput clears the "generation_output" edge to the GenerationOutput entity.

func (*UpscaleOutputUpdate) ClearGenerationOutputID

func (uou *UpscaleOutputUpdate) ClearGenerationOutputID() *UpscaleOutputUpdate

ClearGenerationOutputID clears the value of the "generation_output_id" field.

func (*UpscaleOutputUpdate) ClearInputImageURL

func (uou *UpscaleOutputUpdate) ClearInputImageURL() *UpscaleOutputUpdate

ClearInputImageURL clears the value of the "input_image_url" field.

func (*UpscaleOutputUpdate) ClearUpscales

func (uou *UpscaleOutputUpdate) ClearUpscales() *UpscaleOutputUpdate

ClearUpscales clears the "upscales" edge to the Upscale entity.

func (*UpscaleOutputUpdate) Exec

func (uou *UpscaleOutputUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleOutputUpdate) ExecContext

func (c *UpscaleOutputUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleOutputUpdate) ExecX

func (uou *UpscaleOutputUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleOutputUpdate) Modify

func (uou *UpscaleOutputUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UpscaleOutputUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UpscaleOutputUpdate) Mutation

func (uou *UpscaleOutputUpdate) Mutation() *UpscaleOutputMutation

Mutation returns the UpscaleOutputMutation object of the builder.

func (*UpscaleOutputUpdate) QueryContext

func (c *UpscaleOutputUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleOutputUpdate) Save

func (uou *UpscaleOutputUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UpscaleOutputUpdate) SaveX

func (uou *UpscaleOutputUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UpscaleOutputUpdate) SetDeletedAt

func (uou *UpscaleOutputUpdate) SetDeletedAt(t time.Time) *UpscaleOutputUpdate

SetDeletedAt sets the "deleted_at" field.

func (*UpscaleOutputUpdate) SetGenerationOutput

func (uou *UpscaleOutputUpdate) SetGenerationOutput(g *GenerationOutput) *UpscaleOutputUpdate

SetGenerationOutput sets the "generation_output" edge to the GenerationOutput entity.

func (*UpscaleOutputUpdate) SetGenerationOutputID

func (uou *UpscaleOutputUpdate) SetGenerationOutputID(u uuid.UUID) *UpscaleOutputUpdate

SetGenerationOutputID sets the "generation_output_id" field.

func (*UpscaleOutputUpdate) SetImagePath

func (uou *UpscaleOutputUpdate) SetImagePath(s string) *UpscaleOutputUpdate

SetImagePath sets the "image_path" field.

func (*UpscaleOutputUpdate) SetInputImageURL

func (uou *UpscaleOutputUpdate) SetInputImageURL(s string) *UpscaleOutputUpdate

SetInputImageURL sets the "input_image_url" field.

func (*UpscaleOutputUpdate) SetNillableDeletedAt

func (uou *UpscaleOutputUpdate) SetNillableDeletedAt(t *time.Time) *UpscaleOutputUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*UpscaleOutputUpdate) SetNillableGenerationOutputID

func (uou *UpscaleOutputUpdate) SetNillableGenerationOutputID(u *uuid.UUID) *UpscaleOutputUpdate

SetNillableGenerationOutputID sets the "generation_output_id" field if the given value is not nil.

func (*UpscaleOutputUpdate) SetNillableInputImageURL

func (uou *UpscaleOutputUpdate) SetNillableInputImageURL(s *string) *UpscaleOutputUpdate

SetNillableInputImageURL sets the "input_image_url" field if the given value is not nil.

func (*UpscaleOutputUpdate) SetUpdatedAt

func (uou *UpscaleOutputUpdate) SetUpdatedAt(t time.Time) *UpscaleOutputUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleOutputUpdate) SetUpscaleID

func (uou *UpscaleOutputUpdate) SetUpscaleID(u uuid.UUID) *UpscaleOutputUpdate

SetUpscaleID sets the "upscale_id" field.

func (*UpscaleOutputUpdate) SetUpscales

func (uou *UpscaleOutputUpdate) SetUpscales(u *Upscale) *UpscaleOutputUpdate

SetUpscales sets the "upscales" edge to the Upscale entity.

func (*UpscaleOutputUpdate) SetUpscalesID

func (uou *UpscaleOutputUpdate) SetUpscalesID(id uuid.UUID) *UpscaleOutputUpdate

SetUpscalesID sets the "upscales" edge to the Upscale entity by ID.

func (*UpscaleOutputUpdate) Where

Where appends a list predicates to the UpscaleOutputUpdate builder.

type UpscaleOutputUpdateOne

type UpscaleOutputUpdateOne struct {
	// contains filtered or unexported fields
}

UpscaleOutputUpdateOne is the builder for updating a single UpscaleOutput entity.

func (*UpscaleOutputUpdateOne) ClearDeletedAt

func (uouo *UpscaleOutputUpdateOne) ClearDeletedAt() *UpscaleOutputUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UpscaleOutputUpdateOne) ClearGenerationOutput

func (uouo *UpscaleOutputUpdateOne) ClearGenerationOutput() *UpscaleOutputUpdateOne

ClearGenerationOutput clears the "generation_output" edge to the GenerationOutput entity.

func (*UpscaleOutputUpdateOne) ClearGenerationOutputID

func (uouo *UpscaleOutputUpdateOne) ClearGenerationOutputID() *UpscaleOutputUpdateOne

ClearGenerationOutputID clears the value of the "generation_output_id" field.

func (*UpscaleOutputUpdateOne) ClearInputImageURL

func (uouo *UpscaleOutputUpdateOne) ClearInputImageURL() *UpscaleOutputUpdateOne

ClearInputImageURL clears the value of the "input_image_url" field.

func (*UpscaleOutputUpdateOne) ClearUpscales

func (uouo *UpscaleOutputUpdateOne) ClearUpscales() *UpscaleOutputUpdateOne

ClearUpscales clears the "upscales" edge to the Upscale entity.

func (*UpscaleOutputUpdateOne) Exec

func (uouo *UpscaleOutputUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UpscaleOutputUpdateOne) ExecContext

func (c *UpscaleOutputUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleOutputUpdateOne) ExecX

func (uouo *UpscaleOutputUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleOutputUpdateOne) Modify

func (uouo *UpscaleOutputUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UpscaleOutputUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UpscaleOutputUpdateOne) Mutation

Mutation returns the UpscaleOutputMutation object of the builder.

func (*UpscaleOutputUpdateOne) QueryContext

func (c *UpscaleOutputUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleOutputUpdateOne) Save

Save executes the query and returns the updated UpscaleOutput entity.

func (*UpscaleOutputUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UpscaleOutputUpdateOne) Select

func (uouo *UpscaleOutputUpdateOne) Select(field string, fields ...string) *UpscaleOutputUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UpscaleOutputUpdateOne) SetDeletedAt

func (uouo *UpscaleOutputUpdateOne) SetDeletedAt(t time.Time) *UpscaleOutputUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*UpscaleOutputUpdateOne) SetGenerationOutput

func (uouo *UpscaleOutputUpdateOne) SetGenerationOutput(g *GenerationOutput) *UpscaleOutputUpdateOne

SetGenerationOutput sets the "generation_output" edge to the GenerationOutput entity.

func (*UpscaleOutputUpdateOne) SetGenerationOutputID

func (uouo *UpscaleOutputUpdateOne) SetGenerationOutputID(u uuid.UUID) *UpscaleOutputUpdateOne

SetGenerationOutputID sets the "generation_output_id" field.

func (*UpscaleOutputUpdateOne) SetImagePath

func (uouo *UpscaleOutputUpdateOne) SetImagePath(s string) *UpscaleOutputUpdateOne

SetImagePath sets the "image_path" field.

func (*UpscaleOutputUpdateOne) SetInputImageURL

func (uouo *UpscaleOutputUpdateOne) SetInputImageURL(s string) *UpscaleOutputUpdateOne

SetInputImageURL sets the "input_image_url" field.

func (*UpscaleOutputUpdateOne) SetNillableDeletedAt

func (uouo *UpscaleOutputUpdateOne) SetNillableDeletedAt(t *time.Time) *UpscaleOutputUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*UpscaleOutputUpdateOne) SetNillableGenerationOutputID

func (uouo *UpscaleOutputUpdateOne) SetNillableGenerationOutputID(u *uuid.UUID) *UpscaleOutputUpdateOne

SetNillableGenerationOutputID sets the "generation_output_id" field if the given value is not nil.

func (*UpscaleOutputUpdateOne) SetNillableInputImageURL

func (uouo *UpscaleOutputUpdateOne) SetNillableInputImageURL(s *string) *UpscaleOutputUpdateOne

SetNillableInputImageURL sets the "input_image_url" field if the given value is not nil.

func (*UpscaleOutputUpdateOne) SetUpdatedAt

func (uouo *UpscaleOutputUpdateOne) SetUpdatedAt(t time.Time) *UpscaleOutputUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleOutputUpdateOne) SetUpscaleID

func (uouo *UpscaleOutputUpdateOne) SetUpscaleID(u uuid.UUID) *UpscaleOutputUpdateOne

SetUpscaleID sets the "upscale_id" field.

func (*UpscaleOutputUpdateOne) SetUpscales

func (uouo *UpscaleOutputUpdateOne) SetUpscales(u *Upscale) *UpscaleOutputUpdateOne

SetUpscales sets the "upscales" edge to the Upscale entity.

func (*UpscaleOutputUpdateOne) SetUpscalesID

func (uouo *UpscaleOutputUpdateOne) SetUpscalesID(id uuid.UUID) *UpscaleOutputUpdateOne

SetUpscalesID sets the "upscales" edge to the Upscale entity by ID.

type UpscaleOutputUpsert

type UpscaleOutputUpsert struct {
	*sql.UpdateSet
}

UpscaleOutputUpsert is the "OnConflict" setter.

func (*UpscaleOutputUpsert) ClearDeletedAt

func (u *UpscaleOutputUpsert) ClearDeletedAt() *UpscaleOutputUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UpscaleOutputUpsert) ClearGenerationOutputID

func (u *UpscaleOutputUpsert) ClearGenerationOutputID() *UpscaleOutputUpsert

ClearGenerationOutputID clears the value of the "generation_output_id" field.

func (*UpscaleOutputUpsert) ClearInputImageURL

func (u *UpscaleOutputUpsert) ClearInputImageURL() *UpscaleOutputUpsert

ClearInputImageURL clears the value of the "input_image_url" field.

func (*UpscaleOutputUpsert) SetDeletedAt

func (u *UpscaleOutputUpsert) SetDeletedAt(v time.Time) *UpscaleOutputUpsert

SetDeletedAt sets the "deleted_at" field.

func (*UpscaleOutputUpsert) SetGenerationOutputID

func (u *UpscaleOutputUpsert) SetGenerationOutputID(v uuid.UUID) *UpscaleOutputUpsert

SetGenerationOutputID sets the "generation_output_id" field.

func (*UpscaleOutputUpsert) SetImagePath

func (u *UpscaleOutputUpsert) SetImagePath(v string) *UpscaleOutputUpsert

SetImagePath sets the "image_path" field.

func (*UpscaleOutputUpsert) SetInputImageURL

func (u *UpscaleOutputUpsert) SetInputImageURL(v string) *UpscaleOutputUpsert

SetInputImageURL sets the "input_image_url" field.

func (*UpscaleOutputUpsert) SetUpdatedAt

func (u *UpscaleOutputUpsert) SetUpdatedAt(v time.Time) *UpscaleOutputUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleOutputUpsert) SetUpscaleID

func (u *UpscaleOutputUpsert) SetUpscaleID(v uuid.UUID) *UpscaleOutputUpsert

SetUpscaleID sets the "upscale_id" field.

func (*UpscaleOutputUpsert) UpdateDeletedAt

func (u *UpscaleOutputUpsert) UpdateDeletedAt() *UpscaleOutputUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*UpscaleOutputUpsert) UpdateGenerationOutputID

func (u *UpscaleOutputUpsert) UpdateGenerationOutputID() *UpscaleOutputUpsert

UpdateGenerationOutputID sets the "generation_output_id" field to the value that was provided on create.

func (*UpscaleOutputUpsert) UpdateImagePath

func (u *UpscaleOutputUpsert) UpdateImagePath() *UpscaleOutputUpsert

UpdateImagePath sets the "image_path" field to the value that was provided on create.

func (*UpscaleOutputUpsert) UpdateInputImageURL

func (u *UpscaleOutputUpsert) UpdateInputImageURL() *UpscaleOutputUpsert

UpdateInputImageURL sets the "input_image_url" field to the value that was provided on create.

func (*UpscaleOutputUpsert) UpdateUpdatedAt

func (u *UpscaleOutputUpsert) UpdateUpdatedAt() *UpscaleOutputUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UpscaleOutputUpsert) UpdateUpscaleID

func (u *UpscaleOutputUpsert) UpdateUpscaleID() *UpscaleOutputUpsert

UpdateUpscaleID sets the "upscale_id" field to the value that was provided on create.

type UpscaleOutputUpsertBulk

type UpscaleOutputUpsertBulk struct {
	// contains filtered or unexported fields
}

UpscaleOutputUpsertBulk is the builder for "upsert"-ing a bulk of UpscaleOutput nodes.

func (*UpscaleOutputUpsertBulk) ClearDeletedAt

func (u *UpscaleOutputUpsertBulk) ClearDeletedAt() *UpscaleOutputUpsertBulk

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UpscaleOutputUpsertBulk) ClearGenerationOutputID

func (u *UpscaleOutputUpsertBulk) ClearGenerationOutputID() *UpscaleOutputUpsertBulk

ClearGenerationOutputID clears the value of the "generation_output_id" field.

func (*UpscaleOutputUpsertBulk) ClearInputImageURL

func (u *UpscaleOutputUpsertBulk) ClearInputImageURL() *UpscaleOutputUpsertBulk

ClearInputImageURL clears the value of the "input_image_url" field.

func (*UpscaleOutputUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UpscaleOutputUpsertBulk) Exec

Exec executes the query.

func (*UpscaleOutputUpsertBulk) ExecX

func (u *UpscaleOutputUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleOutputUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UpscaleOutput.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UpscaleOutputUpsertBulk) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*UpscaleOutputUpsertBulk) SetGenerationOutputID

func (u *UpscaleOutputUpsertBulk) SetGenerationOutputID(v uuid.UUID) *UpscaleOutputUpsertBulk

SetGenerationOutputID sets the "generation_output_id" field.

func (*UpscaleOutputUpsertBulk) SetImagePath

SetImagePath sets the "image_path" field.

func (*UpscaleOutputUpsertBulk) SetInputImageURL

func (u *UpscaleOutputUpsertBulk) SetInputImageURL(v string) *UpscaleOutputUpsertBulk

SetInputImageURL sets the "input_image_url" field.

func (*UpscaleOutputUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleOutputUpsertBulk) SetUpscaleID

SetUpscaleID sets the "upscale_id" field.

func (*UpscaleOutputUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UpscaleOutputCreateBulk.OnConflict documentation for more info.

func (*UpscaleOutputUpsertBulk) UpdateDeletedAt

func (u *UpscaleOutputUpsertBulk) UpdateDeletedAt() *UpscaleOutputUpsertBulk

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*UpscaleOutputUpsertBulk) UpdateGenerationOutputID

func (u *UpscaleOutputUpsertBulk) UpdateGenerationOutputID() *UpscaleOutputUpsertBulk

UpdateGenerationOutputID sets the "generation_output_id" field to the value that was provided on create.

func (*UpscaleOutputUpsertBulk) UpdateImagePath

func (u *UpscaleOutputUpsertBulk) UpdateImagePath() *UpscaleOutputUpsertBulk

UpdateImagePath sets the "image_path" field to the value that was provided on create.

func (*UpscaleOutputUpsertBulk) UpdateInputImageURL

func (u *UpscaleOutputUpsertBulk) UpdateInputImageURL() *UpscaleOutputUpsertBulk

UpdateInputImageURL sets the "input_image_url" field to the value that was provided on create.

func (*UpscaleOutputUpsertBulk) UpdateNewValues

func (u *UpscaleOutputUpsertBulk) UpdateNewValues() *UpscaleOutputUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UpscaleOutput.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(upscaleoutput.FieldID)
		}),
	).
	Exec(ctx)

func (*UpscaleOutputUpsertBulk) UpdateUpdatedAt

func (u *UpscaleOutputUpsertBulk) UpdateUpdatedAt() *UpscaleOutputUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UpscaleOutputUpsertBulk) UpdateUpscaleID

func (u *UpscaleOutputUpsertBulk) UpdateUpscaleID() *UpscaleOutputUpsertBulk

UpdateUpscaleID sets the "upscale_id" field to the value that was provided on create.

type UpscaleOutputUpsertOne

type UpscaleOutputUpsertOne struct {
	// contains filtered or unexported fields
}

UpscaleOutputUpsertOne is the builder for "upsert"-ing

one UpscaleOutput node.

func (*UpscaleOutputUpsertOne) ClearDeletedAt

func (u *UpscaleOutputUpsertOne) ClearDeletedAt() *UpscaleOutputUpsertOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*UpscaleOutputUpsertOne) ClearGenerationOutputID

func (u *UpscaleOutputUpsertOne) ClearGenerationOutputID() *UpscaleOutputUpsertOne

ClearGenerationOutputID clears the value of the "generation_output_id" field.

func (*UpscaleOutputUpsertOne) ClearInputImageURL

func (u *UpscaleOutputUpsertOne) ClearInputImageURL() *UpscaleOutputUpsertOne

ClearInputImageURL clears the value of the "input_image_url" field.

func (*UpscaleOutputUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UpscaleOutputUpsertOne) Exec

Exec executes the query.

func (*UpscaleOutputUpsertOne) ExecX

func (u *UpscaleOutputUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleOutputUpsertOne) ID

func (u *UpscaleOutputUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UpscaleOutputUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UpscaleOutputUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UpscaleOutput.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UpscaleOutputUpsertOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*UpscaleOutputUpsertOne) SetGenerationOutputID

func (u *UpscaleOutputUpsertOne) SetGenerationOutputID(v uuid.UUID) *UpscaleOutputUpsertOne

SetGenerationOutputID sets the "generation_output_id" field.

func (*UpscaleOutputUpsertOne) SetImagePath

SetImagePath sets the "image_path" field.

func (*UpscaleOutputUpsertOne) SetInputImageURL

func (u *UpscaleOutputUpsertOne) SetInputImageURL(v string) *UpscaleOutputUpsertOne

SetInputImageURL sets the "input_image_url" field.

func (*UpscaleOutputUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleOutputUpsertOne) SetUpscaleID

SetUpscaleID sets the "upscale_id" field.

func (*UpscaleOutputUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UpscaleOutputCreate.OnConflict documentation for more info.

func (*UpscaleOutputUpsertOne) UpdateDeletedAt

func (u *UpscaleOutputUpsertOne) UpdateDeletedAt() *UpscaleOutputUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*UpscaleOutputUpsertOne) UpdateGenerationOutputID

func (u *UpscaleOutputUpsertOne) UpdateGenerationOutputID() *UpscaleOutputUpsertOne

UpdateGenerationOutputID sets the "generation_output_id" field to the value that was provided on create.

func (*UpscaleOutputUpsertOne) UpdateImagePath

func (u *UpscaleOutputUpsertOne) UpdateImagePath() *UpscaleOutputUpsertOne

UpdateImagePath sets the "image_path" field to the value that was provided on create.

func (*UpscaleOutputUpsertOne) UpdateInputImageURL

func (u *UpscaleOutputUpsertOne) UpdateInputImageURL() *UpscaleOutputUpsertOne

UpdateInputImageURL sets the "input_image_url" field to the value that was provided on create.

func (*UpscaleOutputUpsertOne) UpdateNewValues

func (u *UpscaleOutputUpsertOne) UpdateNewValues() *UpscaleOutputUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.UpscaleOutput.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(upscaleoutput.FieldID)
		}),
	).
	Exec(ctx)

func (*UpscaleOutputUpsertOne) UpdateUpdatedAt

func (u *UpscaleOutputUpsertOne) UpdateUpdatedAt() *UpscaleOutputUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UpscaleOutputUpsertOne) UpdateUpscaleID

func (u *UpscaleOutputUpsertOne) UpdateUpscaleID() *UpscaleOutputUpsertOne

UpdateUpscaleID sets the "upscale_id" field to the value that was provided on create.

type UpscaleOutputs

type UpscaleOutputs []*UpscaleOutput

UpscaleOutputs is a parsable slice of UpscaleOutput.

type UpscaleQuery

type UpscaleQuery struct {
	// contains filtered or unexported fields
}

UpscaleQuery is the builder for querying Upscale entities.

func (*UpscaleQuery) Aggregate

func (uq *UpscaleQuery) Aggregate(fns ...AggregateFunc) *UpscaleSelect

Aggregate returns a UpscaleSelect configured with the given aggregations.

func (*UpscaleQuery) All

func (uq *UpscaleQuery) All(ctx context.Context) ([]*Upscale, error)

All executes the query and returns a list of Upscales.

func (*UpscaleQuery) AllX

func (uq *UpscaleQuery) AllX(ctx context.Context) []*Upscale

AllX is like All, but panics if an error occurs.

func (*UpscaleQuery) Clone

func (uq *UpscaleQuery) Clone() *UpscaleQuery

Clone returns a duplicate of the UpscaleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UpscaleQuery) Count

func (uq *UpscaleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UpscaleQuery) CountX

func (uq *UpscaleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UpscaleQuery) ExecContext

func (c *UpscaleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleQuery) Exist

func (uq *UpscaleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UpscaleQuery) ExistX

func (uq *UpscaleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UpscaleQuery) First

func (uq *UpscaleQuery) First(ctx context.Context) (*Upscale, error)

First returns the first Upscale entity from the query. Returns a *NotFoundError when no Upscale was found.

func (*UpscaleQuery) FirstID

func (uq *UpscaleQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Upscale ID from the query. Returns a *NotFoundError when no Upscale ID was found.

func (*UpscaleQuery) FirstIDX

func (uq *UpscaleQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UpscaleQuery) FirstX

func (uq *UpscaleQuery) FirstX(ctx context.Context) *Upscale

FirstX is like First, but panics if an error occurs.

func (*UpscaleQuery) GroupBy

func (uq *UpscaleQuery) GroupBy(field string, fields ...string) *UpscaleGroupBy

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 {
	Width int32 `json:"width,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Upscale.Query().
	GroupBy(upscale.FieldWidth).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UpscaleQuery) IDs

func (uq *UpscaleQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Upscale IDs.

func (*UpscaleQuery) IDsX

func (uq *UpscaleQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UpscaleQuery) Limit

func (uq *UpscaleQuery) Limit(limit int) *UpscaleQuery

Limit the number of records to be returned by this query.

func (*UpscaleQuery) Modify

func (uq *UpscaleQuery) Modify(modifiers ...func(s *sql.Selector)) *UpscaleSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UpscaleQuery) Offset

func (uq *UpscaleQuery) Offset(offset int) *UpscaleQuery

Offset to start from.

func (*UpscaleQuery) Only

func (uq *UpscaleQuery) Only(ctx context.Context) (*Upscale, error)

Only returns a single Upscale entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Upscale entity is found. Returns a *NotFoundError when no Upscale entities are found.

func (*UpscaleQuery) OnlyID

func (uq *UpscaleQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Upscale ID in the query. Returns a *NotSingularError when more than one Upscale ID is found. Returns a *NotFoundError when no entities are found.

func (*UpscaleQuery) OnlyIDX

func (uq *UpscaleQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UpscaleQuery) OnlyX

func (uq *UpscaleQuery) OnlyX(ctx context.Context) *Upscale

OnlyX is like Only, but panics if an error occurs.

func (*UpscaleQuery) Order

func (uq *UpscaleQuery) Order(o ...OrderFunc) *UpscaleQuery

Order specifies how the records should be ordered.

func (*UpscaleQuery) QueryAPITokens

func (uq *UpscaleQuery) QueryAPITokens() *ApiTokenQuery

QueryAPITokens chains the current query on the "api_tokens" edge.

func (*UpscaleQuery) QueryContext

func (c *UpscaleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleQuery) QueryDeviceInfo

func (uq *UpscaleQuery) QueryDeviceInfo() *DeviceInfoQuery

QueryDeviceInfo chains the current query on the "device_info" edge.

func (*UpscaleQuery) QueryUpscaleModels

func (uq *UpscaleQuery) QueryUpscaleModels() *UpscaleModelQuery

QueryUpscaleModels chains the current query on the "upscale_models" edge.

func (*UpscaleQuery) QueryUpscaleOutputs

func (uq *UpscaleQuery) QueryUpscaleOutputs() *UpscaleOutputQuery

QueryUpscaleOutputs chains the current query on the "upscale_outputs" edge.

func (*UpscaleQuery) QueryUser

func (uq *UpscaleQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*UpscaleQuery) Select

func (uq *UpscaleQuery) Select(fields ...string) *UpscaleSelect

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 {
	Width int32 `json:"width,omitempty"`
}

client.Upscale.Query().
	Select(upscale.FieldWidth).
	Scan(ctx, &v)

func (*UpscaleQuery) Unique

func (uq *UpscaleQuery) Unique(unique bool) *UpscaleQuery

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 (*UpscaleQuery) Where

func (uq *UpscaleQuery) Where(ps ...predicate.Upscale) *UpscaleQuery

Where adds a new predicate for the UpscaleQuery builder.

func (*UpscaleQuery) WithAPITokens

func (uq *UpscaleQuery) WithAPITokens(opts ...func(*ApiTokenQuery)) *UpscaleQuery

WithAPITokens tells the query-builder to eager-load the nodes that are connected to the "api_tokens" edge. The optional arguments are used to configure the query builder of the edge.

func (*UpscaleQuery) WithDeviceInfo

func (uq *UpscaleQuery) WithDeviceInfo(opts ...func(*DeviceInfoQuery)) *UpscaleQuery

WithDeviceInfo tells the query-builder to eager-load the nodes that are connected to the "device_info" edge. The optional arguments are used to configure the query builder of the edge.

func (*UpscaleQuery) WithUpscaleModels

func (uq *UpscaleQuery) WithUpscaleModels(opts ...func(*UpscaleModelQuery)) *UpscaleQuery

WithUpscaleModels tells the query-builder to eager-load the nodes that are connected to the "upscale_models" edge. The optional arguments are used to configure the query builder of the edge.

func (*UpscaleQuery) WithUpscaleOutputs

func (uq *UpscaleQuery) WithUpscaleOutputs(opts ...func(*UpscaleOutputQuery)) *UpscaleQuery

WithUpscaleOutputs tells the query-builder to eager-load the nodes that are connected to the "upscale_outputs" edge. The optional arguments are used to configure the query builder of the edge.

func (*UpscaleQuery) WithUser

func (uq *UpscaleQuery) WithUser(opts ...func(*UserQuery)) *UpscaleQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type UpscaleSelect

type UpscaleSelect struct {
	*UpscaleQuery
	// contains filtered or unexported fields
}

UpscaleSelect is the builder for selecting fields of Upscale entities.

func (*UpscaleSelect) Aggregate

func (us *UpscaleSelect) Aggregate(fns ...AggregateFunc) *UpscaleSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UpscaleSelect) Bool

func (s *UpscaleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UpscaleSelect) BoolX

func (s *UpscaleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UpscaleSelect) Bools

func (s *UpscaleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UpscaleSelect) BoolsX

func (s *UpscaleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (UpscaleSelect) ExecContext

func (c UpscaleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleSelect) Float64

func (s *UpscaleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UpscaleSelect) Float64X

func (s *UpscaleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UpscaleSelect) Float64s

func (s *UpscaleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UpscaleSelect) Float64sX

func (s *UpscaleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UpscaleSelect) Int

func (s *UpscaleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UpscaleSelect) IntX

func (s *UpscaleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UpscaleSelect) Ints

func (s *UpscaleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UpscaleSelect) IntsX

func (s *UpscaleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UpscaleSelect) Modify

func (us *UpscaleSelect) Modify(modifiers ...func(s *sql.Selector)) *UpscaleSelect

Modify adds a query modifier for attaching custom logic to queries.

func (UpscaleSelect) QueryContext

func (c UpscaleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleSelect) Scan

func (us *UpscaleSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UpscaleSelect) ScanX

func (s *UpscaleSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UpscaleSelect) String

func (s *UpscaleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UpscaleSelect) StringX

func (s *UpscaleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UpscaleSelect) Strings

func (s *UpscaleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UpscaleSelect) StringsX

func (s *UpscaleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UpscaleUpdate

type UpscaleUpdate struct {
	// contains filtered or unexported fields
}

UpscaleUpdate is the builder for updating Upscale entities.

func (*UpscaleUpdate) AddHeight

func (uu *UpscaleUpdate) AddHeight(i int32) *UpscaleUpdate

AddHeight adds i to the "height" field.

func (*UpscaleUpdate) AddScale

func (uu *UpscaleUpdate) AddScale(i int32) *UpscaleUpdate

AddScale adds i to the "scale" field.

func (*UpscaleUpdate) AddUpscaleOutputIDs

func (uu *UpscaleUpdate) AddUpscaleOutputIDs(ids ...uuid.UUID) *UpscaleUpdate

AddUpscaleOutputIDs adds the "upscale_outputs" edge to the UpscaleOutput entity by IDs.

func (*UpscaleUpdate) AddUpscaleOutputs

func (uu *UpscaleUpdate) AddUpscaleOutputs(u ...*UpscaleOutput) *UpscaleUpdate

AddUpscaleOutputs adds the "upscale_outputs" edges to the UpscaleOutput entity.

func (*UpscaleUpdate) AddWidth

func (uu *UpscaleUpdate) AddWidth(i int32) *UpscaleUpdate

AddWidth adds i to the "width" field.

func (*UpscaleUpdate) ClearAPITokenID

func (uu *UpscaleUpdate) ClearAPITokenID() *UpscaleUpdate

ClearAPITokenID clears the value of the "api_token_id" field.

func (*UpscaleUpdate) ClearAPITokens

func (uu *UpscaleUpdate) ClearAPITokens() *UpscaleUpdate

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*UpscaleUpdate) ClearCompletedAt

func (uu *UpscaleUpdate) ClearCompletedAt() *UpscaleUpdate

ClearCompletedAt clears the value of the "completed_at" field.

func (*UpscaleUpdate) ClearCountryCode

func (uu *UpscaleUpdate) ClearCountryCode() *UpscaleUpdate

ClearCountryCode clears the value of the "country_code" field.

func (*UpscaleUpdate) ClearDeviceInfo

func (uu *UpscaleUpdate) ClearDeviceInfo() *UpscaleUpdate

ClearDeviceInfo clears the "device_info" edge to the DeviceInfo entity.

func (*UpscaleUpdate) ClearFailureReason

func (uu *UpscaleUpdate) ClearFailureReason() *UpscaleUpdate

ClearFailureReason clears the value of the "failure_reason" field.

func (*UpscaleUpdate) ClearStartedAt

func (uu *UpscaleUpdate) ClearStartedAt() *UpscaleUpdate

ClearStartedAt clears the value of the "started_at" field.

func (*UpscaleUpdate) ClearStripeProductID

func (uu *UpscaleUpdate) ClearStripeProductID() *UpscaleUpdate

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*UpscaleUpdate) ClearUpscaleModels

func (uu *UpscaleUpdate) ClearUpscaleModels() *UpscaleUpdate

ClearUpscaleModels clears the "upscale_models" edge to the UpscaleModel entity.

func (*UpscaleUpdate) ClearUpscaleOutputs

func (uu *UpscaleUpdate) ClearUpscaleOutputs() *UpscaleUpdate

ClearUpscaleOutputs clears all "upscale_outputs" edges to the UpscaleOutput entity.

func (*UpscaleUpdate) ClearUser

func (uu *UpscaleUpdate) ClearUser() *UpscaleUpdate

ClearUser clears the "user" edge to the User entity.

func (*UpscaleUpdate) Exec

func (uu *UpscaleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleUpdate) ExecContext

func (c *UpscaleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleUpdate) ExecX

func (uu *UpscaleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleUpdate) Modify

func (uu *UpscaleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UpscaleUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UpscaleUpdate) Mutation

func (uu *UpscaleUpdate) Mutation() *UpscaleMutation

Mutation returns the UpscaleMutation object of the builder.

func (*UpscaleUpdate) QueryContext

func (c *UpscaleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleUpdate) RemoveUpscaleOutputIDs

func (uu *UpscaleUpdate) RemoveUpscaleOutputIDs(ids ...uuid.UUID) *UpscaleUpdate

RemoveUpscaleOutputIDs removes the "upscale_outputs" edge to UpscaleOutput entities by IDs.

func (*UpscaleUpdate) RemoveUpscaleOutputs

func (uu *UpscaleUpdate) RemoveUpscaleOutputs(u ...*UpscaleOutput) *UpscaleUpdate

RemoveUpscaleOutputs removes "upscale_outputs" edges to UpscaleOutput entities.

func (*UpscaleUpdate) Save

func (uu *UpscaleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UpscaleUpdate) SaveX

func (uu *UpscaleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UpscaleUpdate) SetAPITokenID

func (uu *UpscaleUpdate) SetAPITokenID(u uuid.UUID) *UpscaleUpdate

SetAPITokenID sets the "api_token_id" field.

func (*UpscaleUpdate) SetAPITokens

func (uu *UpscaleUpdate) SetAPITokens(a *ApiToken) *UpscaleUpdate

SetAPITokens sets the "api_tokens" edge to the ApiToken entity.

func (*UpscaleUpdate) SetAPITokensID

func (uu *UpscaleUpdate) SetAPITokensID(id uuid.UUID) *UpscaleUpdate

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID.

func (*UpscaleUpdate) SetCompletedAt

func (uu *UpscaleUpdate) SetCompletedAt(t time.Time) *UpscaleUpdate

SetCompletedAt sets the "completed_at" field.

func (*UpscaleUpdate) SetCountryCode

func (uu *UpscaleUpdate) SetCountryCode(s string) *UpscaleUpdate

SetCountryCode sets the "country_code" field.

func (*UpscaleUpdate) SetDeviceInfo

func (uu *UpscaleUpdate) SetDeviceInfo(d *DeviceInfo) *UpscaleUpdate

SetDeviceInfo sets the "device_info" edge to the DeviceInfo entity.

func (*UpscaleUpdate) SetDeviceInfoID

func (uu *UpscaleUpdate) SetDeviceInfoID(u uuid.UUID) *UpscaleUpdate

SetDeviceInfoID sets the "device_info_id" field.

func (*UpscaleUpdate) SetFailureReason

func (uu *UpscaleUpdate) SetFailureReason(s string) *UpscaleUpdate

SetFailureReason sets the "failure_reason" field.

func (*UpscaleUpdate) SetHeight

func (uu *UpscaleUpdate) SetHeight(i int32) *UpscaleUpdate

SetHeight sets the "height" field.

func (*UpscaleUpdate) SetModelID

func (uu *UpscaleUpdate) SetModelID(u uuid.UUID) *UpscaleUpdate

SetModelID sets the "model_id" field.

func (*UpscaleUpdate) SetNillableAPITokenID

func (uu *UpscaleUpdate) SetNillableAPITokenID(u *uuid.UUID) *UpscaleUpdate

SetNillableAPITokenID sets the "api_token_id" field if the given value is not nil.

func (*UpscaleUpdate) SetNillableAPITokensID

func (uu *UpscaleUpdate) SetNillableAPITokensID(id *uuid.UUID) *UpscaleUpdate

SetNillableAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID if the given value is not nil.

func (*UpscaleUpdate) SetNillableCompletedAt

func (uu *UpscaleUpdate) SetNillableCompletedAt(t *time.Time) *UpscaleUpdate

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*UpscaleUpdate) SetNillableCountryCode

func (uu *UpscaleUpdate) SetNillableCountryCode(s *string) *UpscaleUpdate

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*UpscaleUpdate) SetNillableFailureReason

func (uu *UpscaleUpdate) SetNillableFailureReason(s *string) *UpscaleUpdate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*UpscaleUpdate) SetNillableSourceType

func (uu *UpscaleUpdate) SetNillableSourceType(et *enttypes.SourceType) *UpscaleUpdate

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*UpscaleUpdate) SetNillableStartedAt

func (uu *UpscaleUpdate) SetNillableStartedAt(t *time.Time) *UpscaleUpdate

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*UpscaleUpdate) SetNillableStripeProductID

func (uu *UpscaleUpdate) SetNillableStripeProductID(s *string) *UpscaleUpdate

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*UpscaleUpdate) SetNillableSystemGenerated

func (uu *UpscaleUpdate) SetNillableSystemGenerated(b *bool) *UpscaleUpdate

SetNillableSystemGenerated sets the "system_generated" field if the given value is not nil.

func (*UpscaleUpdate) SetScale

func (uu *UpscaleUpdate) SetScale(i int32) *UpscaleUpdate

SetScale sets the "scale" field.

func (*UpscaleUpdate) SetSourceType

func (uu *UpscaleUpdate) SetSourceType(et enttypes.SourceType) *UpscaleUpdate

SetSourceType sets the "source_type" field.

func (*UpscaleUpdate) SetStartedAt

func (uu *UpscaleUpdate) SetStartedAt(t time.Time) *UpscaleUpdate

SetStartedAt sets the "started_at" field.

func (*UpscaleUpdate) SetStatus

func (uu *UpscaleUpdate) SetStatus(u upscale.Status) *UpscaleUpdate

SetStatus sets the "status" field.

func (*UpscaleUpdate) SetStripeProductID

func (uu *UpscaleUpdate) SetStripeProductID(s string) *UpscaleUpdate

SetStripeProductID sets the "stripe_product_id" field.

func (*UpscaleUpdate) SetSystemGenerated

func (uu *UpscaleUpdate) SetSystemGenerated(b bool) *UpscaleUpdate

SetSystemGenerated sets the "system_generated" field.

func (*UpscaleUpdate) SetUpdatedAt

func (uu *UpscaleUpdate) SetUpdatedAt(t time.Time) *UpscaleUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleUpdate) SetUpscaleModels

func (uu *UpscaleUpdate) SetUpscaleModels(u *UpscaleModel) *UpscaleUpdate

SetUpscaleModels sets the "upscale_models" edge to the UpscaleModel entity.

func (*UpscaleUpdate) SetUpscaleModelsID

func (uu *UpscaleUpdate) SetUpscaleModelsID(id uuid.UUID) *UpscaleUpdate

SetUpscaleModelsID sets the "upscale_models" edge to the UpscaleModel entity by ID.

func (*UpscaleUpdate) SetUser

func (uu *UpscaleUpdate) SetUser(u *User) *UpscaleUpdate

SetUser sets the "user" edge to the User entity.

func (*UpscaleUpdate) SetUserID

func (uu *UpscaleUpdate) SetUserID(u uuid.UUID) *UpscaleUpdate

SetUserID sets the "user_id" field.

func (*UpscaleUpdate) SetWidth

func (uu *UpscaleUpdate) SetWidth(i int32) *UpscaleUpdate

SetWidth sets the "width" field.

func (*UpscaleUpdate) Where

func (uu *UpscaleUpdate) Where(ps ...predicate.Upscale) *UpscaleUpdate

Where appends a list predicates to the UpscaleUpdate builder.

type UpscaleUpdateOne

type UpscaleUpdateOne struct {
	// contains filtered or unexported fields
}

UpscaleUpdateOne is the builder for updating a single Upscale entity.

func (*UpscaleUpdateOne) AddHeight

func (uuo *UpscaleUpdateOne) AddHeight(i int32) *UpscaleUpdateOne

AddHeight adds i to the "height" field.

func (*UpscaleUpdateOne) AddScale

func (uuo *UpscaleUpdateOne) AddScale(i int32) *UpscaleUpdateOne

AddScale adds i to the "scale" field.

func (*UpscaleUpdateOne) AddUpscaleOutputIDs

func (uuo *UpscaleUpdateOne) AddUpscaleOutputIDs(ids ...uuid.UUID) *UpscaleUpdateOne

AddUpscaleOutputIDs adds the "upscale_outputs" edge to the UpscaleOutput entity by IDs.

func (*UpscaleUpdateOne) AddUpscaleOutputs

func (uuo *UpscaleUpdateOne) AddUpscaleOutputs(u ...*UpscaleOutput) *UpscaleUpdateOne

AddUpscaleOutputs adds the "upscale_outputs" edges to the UpscaleOutput entity.

func (*UpscaleUpdateOne) AddWidth

func (uuo *UpscaleUpdateOne) AddWidth(i int32) *UpscaleUpdateOne

AddWidth adds i to the "width" field.

func (*UpscaleUpdateOne) ClearAPITokenID

func (uuo *UpscaleUpdateOne) ClearAPITokenID() *UpscaleUpdateOne

ClearAPITokenID clears the value of the "api_token_id" field.

func (*UpscaleUpdateOne) ClearAPITokens

func (uuo *UpscaleUpdateOne) ClearAPITokens() *UpscaleUpdateOne

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*UpscaleUpdateOne) ClearCompletedAt

func (uuo *UpscaleUpdateOne) ClearCompletedAt() *UpscaleUpdateOne

ClearCompletedAt clears the value of the "completed_at" field.

func (*UpscaleUpdateOne) ClearCountryCode

func (uuo *UpscaleUpdateOne) ClearCountryCode() *UpscaleUpdateOne

ClearCountryCode clears the value of the "country_code" field.

func (*UpscaleUpdateOne) ClearDeviceInfo

func (uuo *UpscaleUpdateOne) ClearDeviceInfo() *UpscaleUpdateOne

ClearDeviceInfo clears the "device_info" edge to the DeviceInfo entity.

func (*UpscaleUpdateOne) ClearFailureReason

func (uuo *UpscaleUpdateOne) ClearFailureReason() *UpscaleUpdateOne

ClearFailureReason clears the value of the "failure_reason" field.

func (*UpscaleUpdateOne) ClearStartedAt

func (uuo *UpscaleUpdateOne) ClearStartedAt() *UpscaleUpdateOne

ClearStartedAt clears the value of the "started_at" field.

func (*UpscaleUpdateOne) ClearStripeProductID

func (uuo *UpscaleUpdateOne) ClearStripeProductID() *UpscaleUpdateOne

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*UpscaleUpdateOne) ClearUpscaleModels

func (uuo *UpscaleUpdateOne) ClearUpscaleModels() *UpscaleUpdateOne

ClearUpscaleModels clears the "upscale_models" edge to the UpscaleModel entity.

func (*UpscaleUpdateOne) ClearUpscaleOutputs

func (uuo *UpscaleUpdateOne) ClearUpscaleOutputs() *UpscaleUpdateOne

ClearUpscaleOutputs clears all "upscale_outputs" edges to the UpscaleOutput entity.

func (*UpscaleUpdateOne) ClearUser

func (uuo *UpscaleUpdateOne) ClearUser() *UpscaleUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*UpscaleUpdateOne) Exec

func (uuo *UpscaleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UpscaleUpdateOne) ExecContext

func (c *UpscaleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UpscaleUpdateOne) ExecX

func (uuo *UpscaleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleUpdateOne) Modify

func (uuo *UpscaleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UpscaleUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UpscaleUpdateOne) Mutation

func (uuo *UpscaleUpdateOne) Mutation() *UpscaleMutation

Mutation returns the UpscaleMutation object of the builder.

func (*UpscaleUpdateOne) QueryContext

func (c *UpscaleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UpscaleUpdateOne) RemoveUpscaleOutputIDs

func (uuo *UpscaleUpdateOne) RemoveUpscaleOutputIDs(ids ...uuid.UUID) *UpscaleUpdateOne

RemoveUpscaleOutputIDs removes the "upscale_outputs" edge to UpscaleOutput entities by IDs.

func (*UpscaleUpdateOne) RemoveUpscaleOutputs

func (uuo *UpscaleUpdateOne) RemoveUpscaleOutputs(u ...*UpscaleOutput) *UpscaleUpdateOne

RemoveUpscaleOutputs removes "upscale_outputs" edges to UpscaleOutput entities.

func (*UpscaleUpdateOne) Save

func (uuo *UpscaleUpdateOne) Save(ctx context.Context) (*Upscale, error)

Save executes the query and returns the updated Upscale entity.

func (*UpscaleUpdateOne) SaveX

func (uuo *UpscaleUpdateOne) SaveX(ctx context.Context) *Upscale

SaveX is like Save, but panics if an error occurs.

func (*UpscaleUpdateOne) Select

func (uuo *UpscaleUpdateOne) Select(field string, fields ...string) *UpscaleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UpscaleUpdateOne) SetAPITokenID

func (uuo *UpscaleUpdateOne) SetAPITokenID(u uuid.UUID) *UpscaleUpdateOne

SetAPITokenID sets the "api_token_id" field.

func (*UpscaleUpdateOne) SetAPITokens

func (uuo *UpscaleUpdateOne) SetAPITokens(a *ApiToken) *UpscaleUpdateOne

SetAPITokens sets the "api_tokens" edge to the ApiToken entity.

func (*UpscaleUpdateOne) SetAPITokensID

func (uuo *UpscaleUpdateOne) SetAPITokensID(id uuid.UUID) *UpscaleUpdateOne

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID.

func (*UpscaleUpdateOne) SetCompletedAt

func (uuo *UpscaleUpdateOne) SetCompletedAt(t time.Time) *UpscaleUpdateOne

SetCompletedAt sets the "completed_at" field.

func (*UpscaleUpdateOne) SetCountryCode

func (uuo *UpscaleUpdateOne) SetCountryCode(s string) *UpscaleUpdateOne

SetCountryCode sets the "country_code" field.

func (*UpscaleUpdateOne) SetDeviceInfo

func (uuo *UpscaleUpdateOne) SetDeviceInfo(d *DeviceInfo) *UpscaleUpdateOne

SetDeviceInfo sets the "device_info" edge to the DeviceInfo entity.

func (*UpscaleUpdateOne) SetDeviceInfoID

func (uuo *UpscaleUpdateOne) SetDeviceInfoID(u uuid.UUID) *UpscaleUpdateOne

SetDeviceInfoID sets the "device_info_id" field.

func (*UpscaleUpdateOne) SetFailureReason

func (uuo *UpscaleUpdateOne) SetFailureReason(s string) *UpscaleUpdateOne

SetFailureReason sets the "failure_reason" field.

func (*UpscaleUpdateOne) SetHeight

func (uuo *UpscaleUpdateOne) SetHeight(i int32) *UpscaleUpdateOne

SetHeight sets the "height" field.

func (*UpscaleUpdateOne) SetModelID

func (uuo *UpscaleUpdateOne) SetModelID(u uuid.UUID) *UpscaleUpdateOne

SetModelID sets the "model_id" field.

func (*UpscaleUpdateOne) SetNillableAPITokenID

func (uuo *UpscaleUpdateOne) SetNillableAPITokenID(u *uuid.UUID) *UpscaleUpdateOne

SetNillableAPITokenID sets the "api_token_id" field if the given value is not nil.

func (*UpscaleUpdateOne) SetNillableAPITokensID

func (uuo *UpscaleUpdateOne) SetNillableAPITokensID(id *uuid.UUID) *UpscaleUpdateOne

SetNillableAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID if the given value is not nil.

func (*UpscaleUpdateOne) SetNillableCompletedAt

func (uuo *UpscaleUpdateOne) SetNillableCompletedAt(t *time.Time) *UpscaleUpdateOne

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*UpscaleUpdateOne) SetNillableCountryCode

func (uuo *UpscaleUpdateOne) SetNillableCountryCode(s *string) *UpscaleUpdateOne

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*UpscaleUpdateOne) SetNillableFailureReason

func (uuo *UpscaleUpdateOne) SetNillableFailureReason(s *string) *UpscaleUpdateOne

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*UpscaleUpdateOne) SetNillableSourceType

func (uuo *UpscaleUpdateOne) SetNillableSourceType(et *enttypes.SourceType) *UpscaleUpdateOne

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*UpscaleUpdateOne) SetNillableStartedAt

func (uuo *UpscaleUpdateOne) SetNillableStartedAt(t *time.Time) *UpscaleUpdateOne

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*UpscaleUpdateOne) SetNillableStripeProductID

func (uuo *UpscaleUpdateOne) SetNillableStripeProductID(s *string) *UpscaleUpdateOne

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*UpscaleUpdateOne) SetNillableSystemGenerated

func (uuo *UpscaleUpdateOne) SetNillableSystemGenerated(b *bool) *UpscaleUpdateOne

SetNillableSystemGenerated sets the "system_generated" field if the given value is not nil.

func (*UpscaleUpdateOne) SetScale

func (uuo *UpscaleUpdateOne) SetScale(i int32) *UpscaleUpdateOne

SetScale sets the "scale" field.

func (*UpscaleUpdateOne) SetSourceType

func (uuo *UpscaleUpdateOne) SetSourceType(et enttypes.SourceType) *UpscaleUpdateOne

SetSourceType sets the "source_type" field.

func (*UpscaleUpdateOne) SetStartedAt

func (uuo *UpscaleUpdateOne) SetStartedAt(t time.Time) *UpscaleUpdateOne

SetStartedAt sets the "started_at" field.

func (*UpscaleUpdateOne) SetStatus

func (uuo *UpscaleUpdateOne) SetStatus(u upscale.Status) *UpscaleUpdateOne

SetStatus sets the "status" field.

func (*UpscaleUpdateOne) SetStripeProductID

func (uuo *UpscaleUpdateOne) SetStripeProductID(s string) *UpscaleUpdateOne

SetStripeProductID sets the "stripe_product_id" field.

func (*UpscaleUpdateOne) SetSystemGenerated

func (uuo *UpscaleUpdateOne) SetSystemGenerated(b bool) *UpscaleUpdateOne

SetSystemGenerated sets the "system_generated" field.

func (*UpscaleUpdateOne) SetUpdatedAt

func (uuo *UpscaleUpdateOne) SetUpdatedAt(t time.Time) *UpscaleUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleUpdateOne) SetUpscaleModels

func (uuo *UpscaleUpdateOne) SetUpscaleModels(u *UpscaleModel) *UpscaleUpdateOne

SetUpscaleModels sets the "upscale_models" edge to the UpscaleModel entity.

func (*UpscaleUpdateOne) SetUpscaleModelsID

func (uuo *UpscaleUpdateOne) SetUpscaleModelsID(id uuid.UUID) *UpscaleUpdateOne

SetUpscaleModelsID sets the "upscale_models" edge to the UpscaleModel entity by ID.

func (*UpscaleUpdateOne) SetUser

func (uuo *UpscaleUpdateOne) SetUser(u *User) *UpscaleUpdateOne

SetUser sets the "user" edge to the User entity.

func (*UpscaleUpdateOne) SetUserID

func (uuo *UpscaleUpdateOne) SetUserID(u uuid.UUID) *UpscaleUpdateOne

SetUserID sets the "user_id" field.

func (*UpscaleUpdateOne) SetWidth

func (uuo *UpscaleUpdateOne) SetWidth(i int32) *UpscaleUpdateOne

SetWidth sets the "width" field.

type UpscaleUpsert

type UpscaleUpsert struct {
	*sql.UpdateSet
}

UpscaleUpsert is the "OnConflict" setter.

func (*UpscaleUpsert) AddHeight

func (u *UpscaleUpsert) AddHeight(v int32) *UpscaleUpsert

AddHeight adds v to the "height" field.

func (*UpscaleUpsert) AddScale

func (u *UpscaleUpsert) AddScale(v int32) *UpscaleUpsert

AddScale adds v to the "scale" field.

func (*UpscaleUpsert) AddWidth

func (u *UpscaleUpsert) AddWidth(v int32) *UpscaleUpsert

AddWidth adds v to the "width" field.

func (*UpscaleUpsert) ClearAPITokenID

func (u *UpscaleUpsert) ClearAPITokenID() *UpscaleUpsert

ClearAPITokenID clears the value of the "api_token_id" field.

func (*UpscaleUpsert) ClearCompletedAt

func (u *UpscaleUpsert) ClearCompletedAt() *UpscaleUpsert

ClearCompletedAt clears the value of the "completed_at" field.

func (*UpscaleUpsert) ClearCountryCode

func (u *UpscaleUpsert) ClearCountryCode() *UpscaleUpsert

ClearCountryCode clears the value of the "country_code" field.

func (*UpscaleUpsert) ClearFailureReason

func (u *UpscaleUpsert) ClearFailureReason() *UpscaleUpsert

ClearFailureReason clears the value of the "failure_reason" field.

func (*UpscaleUpsert) ClearStartedAt

func (u *UpscaleUpsert) ClearStartedAt() *UpscaleUpsert

ClearStartedAt clears the value of the "started_at" field.

func (*UpscaleUpsert) ClearStripeProductID

func (u *UpscaleUpsert) ClearStripeProductID() *UpscaleUpsert

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*UpscaleUpsert) SetAPITokenID

func (u *UpscaleUpsert) SetAPITokenID(v uuid.UUID) *UpscaleUpsert

SetAPITokenID sets the "api_token_id" field.

func (*UpscaleUpsert) SetCompletedAt

func (u *UpscaleUpsert) SetCompletedAt(v time.Time) *UpscaleUpsert

SetCompletedAt sets the "completed_at" field.

func (*UpscaleUpsert) SetCountryCode

func (u *UpscaleUpsert) SetCountryCode(v string) *UpscaleUpsert

SetCountryCode sets the "country_code" field.

func (*UpscaleUpsert) SetDeviceInfoID

func (u *UpscaleUpsert) SetDeviceInfoID(v uuid.UUID) *UpscaleUpsert

SetDeviceInfoID sets the "device_info_id" field.

func (*UpscaleUpsert) SetFailureReason

func (u *UpscaleUpsert) SetFailureReason(v string) *UpscaleUpsert

SetFailureReason sets the "failure_reason" field.

func (*UpscaleUpsert) SetHeight

func (u *UpscaleUpsert) SetHeight(v int32) *UpscaleUpsert

SetHeight sets the "height" field.

func (*UpscaleUpsert) SetModelID

func (u *UpscaleUpsert) SetModelID(v uuid.UUID) *UpscaleUpsert

SetModelID sets the "model_id" field.

func (*UpscaleUpsert) SetScale

func (u *UpscaleUpsert) SetScale(v int32) *UpscaleUpsert

SetScale sets the "scale" field.

func (*UpscaleUpsert) SetSourceType

func (u *UpscaleUpsert) SetSourceType(v enttypes.SourceType) *UpscaleUpsert

SetSourceType sets the "source_type" field.

func (*UpscaleUpsert) SetStartedAt

func (u *UpscaleUpsert) SetStartedAt(v time.Time) *UpscaleUpsert

SetStartedAt sets the "started_at" field.

func (*UpscaleUpsert) SetStatus

func (u *UpscaleUpsert) SetStatus(v upscale.Status) *UpscaleUpsert

SetStatus sets the "status" field.

func (*UpscaleUpsert) SetStripeProductID

func (u *UpscaleUpsert) SetStripeProductID(v string) *UpscaleUpsert

SetStripeProductID sets the "stripe_product_id" field.

func (*UpscaleUpsert) SetSystemGenerated

func (u *UpscaleUpsert) SetSystemGenerated(v bool) *UpscaleUpsert

SetSystemGenerated sets the "system_generated" field.

func (*UpscaleUpsert) SetUpdatedAt

func (u *UpscaleUpsert) SetUpdatedAt(v time.Time) *UpscaleUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleUpsert) SetUserID

func (u *UpscaleUpsert) SetUserID(v uuid.UUID) *UpscaleUpsert

SetUserID sets the "user_id" field.

func (*UpscaleUpsert) SetWidth

func (u *UpscaleUpsert) SetWidth(v int32) *UpscaleUpsert

SetWidth sets the "width" field.

func (*UpscaleUpsert) UpdateAPITokenID

func (u *UpscaleUpsert) UpdateAPITokenID() *UpscaleUpsert

UpdateAPITokenID sets the "api_token_id" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateCompletedAt

func (u *UpscaleUpsert) UpdateCompletedAt() *UpscaleUpsert

UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateCountryCode

func (u *UpscaleUpsert) UpdateCountryCode() *UpscaleUpsert

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateDeviceInfoID

func (u *UpscaleUpsert) UpdateDeviceInfoID() *UpscaleUpsert

UpdateDeviceInfoID sets the "device_info_id" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateFailureReason

func (u *UpscaleUpsert) UpdateFailureReason() *UpscaleUpsert

UpdateFailureReason sets the "failure_reason" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateHeight

func (u *UpscaleUpsert) UpdateHeight() *UpscaleUpsert

UpdateHeight sets the "height" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateModelID

func (u *UpscaleUpsert) UpdateModelID() *UpscaleUpsert

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateScale

func (u *UpscaleUpsert) UpdateScale() *UpscaleUpsert

UpdateScale sets the "scale" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateSourceType

func (u *UpscaleUpsert) UpdateSourceType() *UpscaleUpsert

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateStartedAt

func (u *UpscaleUpsert) UpdateStartedAt() *UpscaleUpsert

UpdateStartedAt sets the "started_at" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateStatus

func (u *UpscaleUpsert) UpdateStatus() *UpscaleUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateStripeProductID

func (u *UpscaleUpsert) UpdateStripeProductID() *UpscaleUpsert

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateSystemGenerated

func (u *UpscaleUpsert) UpdateSystemGenerated() *UpscaleUpsert

UpdateSystemGenerated sets the "system_generated" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateUpdatedAt

func (u *UpscaleUpsert) UpdateUpdatedAt() *UpscaleUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateUserID

func (u *UpscaleUpsert) UpdateUserID() *UpscaleUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*UpscaleUpsert) UpdateWidth

func (u *UpscaleUpsert) UpdateWidth() *UpscaleUpsert

UpdateWidth sets the "width" field to the value that was provided on create.

type UpscaleUpsertBulk

type UpscaleUpsertBulk struct {
	// contains filtered or unexported fields
}

UpscaleUpsertBulk is the builder for "upsert"-ing a bulk of Upscale nodes.

func (*UpscaleUpsertBulk) AddHeight

func (u *UpscaleUpsertBulk) AddHeight(v int32) *UpscaleUpsertBulk

AddHeight adds v to the "height" field.

func (*UpscaleUpsertBulk) AddScale

func (u *UpscaleUpsertBulk) AddScale(v int32) *UpscaleUpsertBulk

AddScale adds v to the "scale" field.

func (*UpscaleUpsertBulk) AddWidth

func (u *UpscaleUpsertBulk) AddWidth(v int32) *UpscaleUpsertBulk

AddWidth adds v to the "width" field.

func (*UpscaleUpsertBulk) ClearAPITokenID

func (u *UpscaleUpsertBulk) ClearAPITokenID() *UpscaleUpsertBulk

ClearAPITokenID clears the value of the "api_token_id" field.

func (*UpscaleUpsertBulk) ClearCompletedAt

func (u *UpscaleUpsertBulk) ClearCompletedAt() *UpscaleUpsertBulk

ClearCompletedAt clears the value of the "completed_at" field.

func (*UpscaleUpsertBulk) ClearCountryCode

func (u *UpscaleUpsertBulk) ClearCountryCode() *UpscaleUpsertBulk

ClearCountryCode clears the value of the "country_code" field.

func (*UpscaleUpsertBulk) ClearFailureReason

func (u *UpscaleUpsertBulk) ClearFailureReason() *UpscaleUpsertBulk

ClearFailureReason clears the value of the "failure_reason" field.

func (*UpscaleUpsertBulk) ClearStartedAt

func (u *UpscaleUpsertBulk) ClearStartedAt() *UpscaleUpsertBulk

ClearStartedAt clears the value of the "started_at" field.

func (*UpscaleUpsertBulk) ClearStripeProductID

func (u *UpscaleUpsertBulk) ClearStripeProductID() *UpscaleUpsertBulk

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*UpscaleUpsertBulk) DoNothing

func (u *UpscaleUpsertBulk) DoNothing() *UpscaleUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UpscaleUpsertBulk) Exec

func (u *UpscaleUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleUpsertBulk) ExecX

func (u *UpscaleUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleUpsertBulk) Ignore

func (u *UpscaleUpsertBulk) Ignore() *UpscaleUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Upscale.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UpscaleUpsertBulk) SetAPITokenID

func (u *UpscaleUpsertBulk) SetAPITokenID(v uuid.UUID) *UpscaleUpsertBulk

SetAPITokenID sets the "api_token_id" field.

func (*UpscaleUpsertBulk) SetCompletedAt

func (u *UpscaleUpsertBulk) SetCompletedAt(v time.Time) *UpscaleUpsertBulk

SetCompletedAt sets the "completed_at" field.

func (*UpscaleUpsertBulk) SetCountryCode

func (u *UpscaleUpsertBulk) SetCountryCode(v string) *UpscaleUpsertBulk

SetCountryCode sets the "country_code" field.

func (*UpscaleUpsertBulk) SetDeviceInfoID

func (u *UpscaleUpsertBulk) SetDeviceInfoID(v uuid.UUID) *UpscaleUpsertBulk

SetDeviceInfoID sets the "device_info_id" field.

func (*UpscaleUpsertBulk) SetFailureReason

func (u *UpscaleUpsertBulk) SetFailureReason(v string) *UpscaleUpsertBulk

SetFailureReason sets the "failure_reason" field.

func (*UpscaleUpsertBulk) SetHeight

func (u *UpscaleUpsertBulk) SetHeight(v int32) *UpscaleUpsertBulk

SetHeight sets the "height" field.

func (*UpscaleUpsertBulk) SetModelID

func (u *UpscaleUpsertBulk) SetModelID(v uuid.UUID) *UpscaleUpsertBulk

SetModelID sets the "model_id" field.

func (*UpscaleUpsertBulk) SetScale

func (u *UpscaleUpsertBulk) SetScale(v int32) *UpscaleUpsertBulk

SetScale sets the "scale" field.

func (*UpscaleUpsertBulk) SetSourceType

SetSourceType sets the "source_type" field.

func (*UpscaleUpsertBulk) SetStartedAt

func (u *UpscaleUpsertBulk) SetStartedAt(v time.Time) *UpscaleUpsertBulk

SetStartedAt sets the "started_at" field.

func (*UpscaleUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*UpscaleUpsertBulk) SetStripeProductID

func (u *UpscaleUpsertBulk) SetStripeProductID(v string) *UpscaleUpsertBulk

SetStripeProductID sets the "stripe_product_id" field.

func (*UpscaleUpsertBulk) SetSystemGenerated

func (u *UpscaleUpsertBulk) SetSystemGenerated(v bool) *UpscaleUpsertBulk

SetSystemGenerated sets the "system_generated" field.

func (*UpscaleUpsertBulk) SetUpdatedAt

func (u *UpscaleUpsertBulk) SetUpdatedAt(v time.Time) *UpscaleUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleUpsertBulk) SetUserID

func (u *UpscaleUpsertBulk) SetUserID(v uuid.UUID) *UpscaleUpsertBulk

SetUserID sets the "user_id" field.

func (*UpscaleUpsertBulk) SetWidth

func (u *UpscaleUpsertBulk) SetWidth(v int32) *UpscaleUpsertBulk

SetWidth sets the "width" field.

func (*UpscaleUpsertBulk) Update

func (u *UpscaleUpsertBulk) Update(set func(*UpscaleUpsert)) *UpscaleUpsertBulk

Update allows overriding fields `UPDATE` values. See the UpscaleCreateBulk.OnConflict documentation for more info.

func (*UpscaleUpsertBulk) UpdateAPITokenID

func (u *UpscaleUpsertBulk) UpdateAPITokenID() *UpscaleUpsertBulk

UpdateAPITokenID sets the "api_token_id" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateCompletedAt

func (u *UpscaleUpsertBulk) UpdateCompletedAt() *UpscaleUpsertBulk

UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateCountryCode

func (u *UpscaleUpsertBulk) UpdateCountryCode() *UpscaleUpsertBulk

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateDeviceInfoID

func (u *UpscaleUpsertBulk) UpdateDeviceInfoID() *UpscaleUpsertBulk

UpdateDeviceInfoID sets the "device_info_id" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateFailureReason

func (u *UpscaleUpsertBulk) UpdateFailureReason() *UpscaleUpsertBulk

UpdateFailureReason sets the "failure_reason" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateHeight

func (u *UpscaleUpsertBulk) UpdateHeight() *UpscaleUpsertBulk

UpdateHeight sets the "height" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateModelID

func (u *UpscaleUpsertBulk) UpdateModelID() *UpscaleUpsertBulk

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateNewValues

func (u *UpscaleUpsertBulk) UpdateNewValues() *UpscaleUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Upscale.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(upscale.FieldID)
		}),
	).
	Exec(ctx)

func (*UpscaleUpsertBulk) UpdateScale

func (u *UpscaleUpsertBulk) UpdateScale() *UpscaleUpsertBulk

UpdateScale sets the "scale" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateSourceType

func (u *UpscaleUpsertBulk) UpdateSourceType() *UpscaleUpsertBulk

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateStartedAt

func (u *UpscaleUpsertBulk) UpdateStartedAt() *UpscaleUpsertBulk

UpdateStartedAt sets the "started_at" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateStatus

func (u *UpscaleUpsertBulk) UpdateStatus() *UpscaleUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateStripeProductID

func (u *UpscaleUpsertBulk) UpdateStripeProductID() *UpscaleUpsertBulk

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateSystemGenerated

func (u *UpscaleUpsertBulk) UpdateSystemGenerated() *UpscaleUpsertBulk

UpdateSystemGenerated sets the "system_generated" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateUpdatedAt

func (u *UpscaleUpsertBulk) UpdateUpdatedAt() *UpscaleUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateUserID

func (u *UpscaleUpsertBulk) UpdateUserID() *UpscaleUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*UpscaleUpsertBulk) UpdateWidth

func (u *UpscaleUpsertBulk) UpdateWidth() *UpscaleUpsertBulk

UpdateWidth sets the "width" field to the value that was provided on create.

type UpscaleUpsertOne

type UpscaleUpsertOne struct {
	// contains filtered or unexported fields
}

UpscaleUpsertOne is the builder for "upsert"-ing

one Upscale node.

func (*UpscaleUpsertOne) AddHeight

func (u *UpscaleUpsertOne) AddHeight(v int32) *UpscaleUpsertOne

AddHeight adds v to the "height" field.

func (*UpscaleUpsertOne) AddScale

func (u *UpscaleUpsertOne) AddScale(v int32) *UpscaleUpsertOne

AddScale adds v to the "scale" field.

func (*UpscaleUpsertOne) AddWidth

func (u *UpscaleUpsertOne) AddWidth(v int32) *UpscaleUpsertOne

AddWidth adds v to the "width" field.

func (*UpscaleUpsertOne) ClearAPITokenID

func (u *UpscaleUpsertOne) ClearAPITokenID() *UpscaleUpsertOne

ClearAPITokenID clears the value of the "api_token_id" field.

func (*UpscaleUpsertOne) ClearCompletedAt

func (u *UpscaleUpsertOne) ClearCompletedAt() *UpscaleUpsertOne

ClearCompletedAt clears the value of the "completed_at" field.

func (*UpscaleUpsertOne) ClearCountryCode

func (u *UpscaleUpsertOne) ClearCountryCode() *UpscaleUpsertOne

ClearCountryCode clears the value of the "country_code" field.

func (*UpscaleUpsertOne) ClearFailureReason

func (u *UpscaleUpsertOne) ClearFailureReason() *UpscaleUpsertOne

ClearFailureReason clears the value of the "failure_reason" field.

func (*UpscaleUpsertOne) ClearStartedAt

func (u *UpscaleUpsertOne) ClearStartedAt() *UpscaleUpsertOne

ClearStartedAt clears the value of the "started_at" field.

func (*UpscaleUpsertOne) ClearStripeProductID

func (u *UpscaleUpsertOne) ClearStripeProductID() *UpscaleUpsertOne

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*UpscaleUpsertOne) DoNothing

func (u *UpscaleUpsertOne) DoNothing() *UpscaleUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UpscaleUpsertOne) Exec

func (u *UpscaleUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UpscaleUpsertOne) ExecX

func (u *UpscaleUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UpscaleUpsertOne) ID

func (u *UpscaleUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UpscaleUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UpscaleUpsertOne) Ignore

func (u *UpscaleUpsertOne) Ignore() *UpscaleUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Upscale.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UpscaleUpsertOne) SetAPITokenID

func (u *UpscaleUpsertOne) SetAPITokenID(v uuid.UUID) *UpscaleUpsertOne

SetAPITokenID sets the "api_token_id" field.

func (*UpscaleUpsertOne) SetCompletedAt

func (u *UpscaleUpsertOne) SetCompletedAt(v time.Time) *UpscaleUpsertOne

SetCompletedAt sets the "completed_at" field.

func (*UpscaleUpsertOne) SetCountryCode

func (u *UpscaleUpsertOne) SetCountryCode(v string) *UpscaleUpsertOne

SetCountryCode sets the "country_code" field.

func (*UpscaleUpsertOne) SetDeviceInfoID

func (u *UpscaleUpsertOne) SetDeviceInfoID(v uuid.UUID) *UpscaleUpsertOne

SetDeviceInfoID sets the "device_info_id" field.

func (*UpscaleUpsertOne) SetFailureReason

func (u *UpscaleUpsertOne) SetFailureReason(v string) *UpscaleUpsertOne

SetFailureReason sets the "failure_reason" field.

func (*UpscaleUpsertOne) SetHeight

func (u *UpscaleUpsertOne) SetHeight(v int32) *UpscaleUpsertOne

SetHeight sets the "height" field.

func (*UpscaleUpsertOne) SetModelID

func (u *UpscaleUpsertOne) SetModelID(v uuid.UUID) *UpscaleUpsertOne

SetModelID sets the "model_id" field.

func (*UpscaleUpsertOne) SetScale

func (u *UpscaleUpsertOne) SetScale(v int32) *UpscaleUpsertOne

SetScale sets the "scale" field.

func (*UpscaleUpsertOne) SetSourceType

SetSourceType sets the "source_type" field.

func (*UpscaleUpsertOne) SetStartedAt

func (u *UpscaleUpsertOne) SetStartedAt(v time.Time) *UpscaleUpsertOne

SetStartedAt sets the "started_at" field.

func (*UpscaleUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*UpscaleUpsertOne) SetStripeProductID

func (u *UpscaleUpsertOne) SetStripeProductID(v string) *UpscaleUpsertOne

SetStripeProductID sets the "stripe_product_id" field.

func (*UpscaleUpsertOne) SetSystemGenerated

func (u *UpscaleUpsertOne) SetSystemGenerated(v bool) *UpscaleUpsertOne

SetSystemGenerated sets the "system_generated" field.

func (*UpscaleUpsertOne) SetUpdatedAt

func (u *UpscaleUpsertOne) SetUpdatedAt(v time.Time) *UpscaleUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*UpscaleUpsertOne) SetUserID

func (u *UpscaleUpsertOne) SetUserID(v uuid.UUID) *UpscaleUpsertOne

SetUserID sets the "user_id" field.

func (*UpscaleUpsertOne) SetWidth

func (u *UpscaleUpsertOne) SetWidth(v int32) *UpscaleUpsertOne

SetWidth sets the "width" field.

func (*UpscaleUpsertOne) Update

func (u *UpscaleUpsertOne) Update(set func(*UpscaleUpsert)) *UpscaleUpsertOne

Update allows overriding fields `UPDATE` values. See the UpscaleCreate.OnConflict documentation for more info.

func (*UpscaleUpsertOne) UpdateAPITokenID

func (u *UpscaleUpsertOne) UpdateAPITokenID() *UpscaleUpsertOne

UpdateAPITokenID sets the "api_token_id" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateCompletedAt

func (u *UpscaleUpsertOne) UpdateCompletedAt() *UpscaleUpsertOne

UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateCountryCode

func (u *UpscaleUpsertOne) UpdateCountryCode() *UpscaleUpsertOne

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateDeviceInfoID

func (u *UpscaleUpsertOne) UpdateDeviceInfoID() *UpscaleUpsertOne

UpdateDeviceInfoID sets the "device_info_id" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateFailureReason

func (u *UpscaleUpsertOne) UpdateFailureReason() *UpscaleUpsertOne

UpdateFailureReason sets the "failure_reason" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateHeight

func (u *UpscaleUpsertOne) UpdateHeight() *UpscaleUpsertOne

UpdateHeight sets the "height" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateModelID

func (u *UpscaleUpsertOne) UpdateModelID() *UpscaleUpsertOne

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateNewValues

func (u *UpscaleUpsertOne) UpdateNewValues() *UpscaleUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Upscale.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(upscale.FieldID)
		}),
	).
	Exec(ctx)

func (*UpscaleUpsertOne) UpdateScale

func (u *UpscaleUpsertOne) UpdateScale() *UpscaleUpsertOne

UpdateScale sets the "scale" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateSourceType

func (u *UpscaleUpsertOne) UpdateSourceType() *UpscaleUpsertOne

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateStartedAt

func (u *UpscaleUpsertOne) UpdateStartedAt() *UpscaleUpsertOne

UpdateStartedAt sets the "started_at" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateStatus

func (u *UpscaleUpsertOne) UpdateStatus() *UpscaleUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateStripeProductID

func (u *UpscaleUpsertOne) UpdateStripeProductID() *UpscaleUpsertOne

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateSystemGenerated

func (u *UpscaleUpsertOne) UpdateSystemGenerated() *UpscaleUpsertOne

UpdateSystemGenerated sets the "system_generated" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateUpdatedAt

func (u *UpscaleUpsertOne) UpdateUpdatedAt() *UpscaleUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateUserID

func (u *UpscaleUpsertOne) UpdateUserID() *UpscaleUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*UpscaleUpsertOne) UpdateWidth

func (u *UpscaleUpsertOne) UpdateWidth() *UpscaleUpsertOne

UpdateWidth sets the "width" field to the value that was provided on create.

type Upscales

type Upscales []*Upscale

Upscales is a parsable slice of Upscale.

type User

type User struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// StripeCustomerID holds the value of the "stripe_customer_id" field.
	StripeCustomerID string `json:"stripe_customer_id,omitempty"`
	// ActiveProductID holds the value of the "active_product_id" field.
	ActiveProductID *string `json:"active_product_id,omitempty"`
	// LastSignInAt holds the value of the "last_sign_in_at" field.
	LastSignInAt *time.Time `json:"last_sign_in_at,omitempty"`
	// LastSeenAt holds the value of the "last_seen_at" field.
	LastSeenAt time.Time `json:"last_seen_at,omitempty"`
	// BannedAt holds the value of the "banned_at" field.
	BannedAt *time.Time `json:"banned_at,omitempty"`
	// ScheduledForDeletionOn holds the value of the "scheduled_for_deletion_on" field.
	ScheduledForDeletionOn *time.Time `json:"scheduled_for_deletion_on,omitempty"`
	// DataDeletedAt holds the value of the "data_deleted_at" field.
	DataDeletedAt *time.Time `json:"data_deleted_at,omitempty"`
	// WantsEmail holds the value of the "wants_email" field.
	WantsEmail *bool `json:"wants_email,omitempty"`
	// DiscordID holds the value of the "discord_id" field.
	DiscordID *string `json:"discord_id,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// UsernameChangedAt holds the value of the "username_changed_at" field.
	UsernameChangedAt *time.Time `json:"username_changed_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) ExecContext

func (c *User) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*User) QueryAPITokens

func (u *User) QueryAPITokens() *ApiTokenQuery

QueryAPITokens queries the "api_tokens" edge of the User entity.

func (*User) QueryContext

func (c *User) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*User) QueryCredits

func (u *User) QueryCredits() *CreditQuery

QueryCredits queries the "credits" edge of the User entity.

func (*User) QueryGenerationOutputLikes

func (u *User) QueryGenerationOutputLikes() *GenerationOutputLikeQuery

QueryGenerationOutputLikes queries the "generation_output_likes" edge of the User entity.

func (*User) QueryGenerations

func (u *User) QueryGenerations() *GenerationQuery

QueryGenerations queries the "generations" edge of the User entity.

func (*User) QueryRoles

func (u *User) QueryRoles() *RoleQuery

QueryRoles queries the "roles" edge of the User entity.

func (*User) QueryTipsGiven

func (u *User) QueryTipsGiven() *TipLogQuery

QueryTipsGiven queries the "tips_given" edge of the User entity.

func (*User) QueryTipsReceived

func (u *User) QueryTipsReceived() *TipLogQuery

QueryTipsReceived queries the "tips_received" edge of the User entity.

func (*User) QueryUpscales

func (u *User) QueryUpscales() *UpscaleQuery

QueryUpscales queries the "upscales" edge of the User entity.

func (*User) QueryVoiceovers

func (u *User) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers queries the "voiceovers" edge of the User entity.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) ExecContext

func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept

func (c *UserClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryAPITokens

func (c *UserClient) QueryAPITokens(u *User) *ApiTokenQuery

QueryAPITokens queries the api_tokens edge of a User.

func (*UserClient) QueryContext

func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserClient) QueryCredits

func (c *UserClient) QueryCredits(u *User) *CreditQuery

QueryCredits queries the credits edge of a User.

func (*UserClient) QueryGenerationOutputLikes

func (c *UserClient) QueryGenerationOutputLikes(u *User) *GenerationOutputLikeQuery

QueryGenerationOutputLikes queries the generation_output_likes edge of a User.

func (*UserClient) QueryGenerations

func (c *UserClient) QueryGenerations(u *User) *GenerationQuery

QueryGenerations queries the generations edge of a User.

func (*UserClient) QueryRoles

func (c *UserClient) QueryRoles(u *User) *RoleQuery

QueryRoles queries the roles edge of a User.

func (*UserClient) QueryTipsGiven

func (c *UserClient) QueryTipsGiven(u *User) *TipLogQuery

QueryTipsGiven queries the tips_given edge of a User.

func (*UserClient) QueryTipsReceived

func (c *UserClient) QueryTipsReceived(u *User) *TipLogQuery

QueryTipsReceived queries the tips_received edge of a User.

func (*UserClient) QueryUpscales

func (c *UserClient) QueryUpscales(u *User) *UpscaleQuery

QueryUpscales queries the upscales edge of a User.

func (*UserClient) QueryVoiceovers

func (c *UserClient) QueryVoiceovers(u *User) *VoiceoverQuery

QueryVoiceovers queries the voiceovers edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddAPITokenIDs

func (uc *UserCreate) AddAPITokenIDs(ids ...uuid.UUID) *UserCreate

AddAPITokenIDs adds the "api_tokens" edge to the ApiToken entity by IDs.

func (*UserCreate) AddAPITokens

func (uc *UserCreate) AddAPITokens(a ...*ApiToken) *UserCreate

AddAPITokens adds the "api_tokens" edges to the ApiToken entity.

func (*UserCreate) AddCreditIDs

func (uc *UserCreate) AddCreditIDs(ids ...uuid.UUID) *UserCreate

AddCreditIDs adds the "credits" edge to the Credit entity by IDs.

func (*UserCreate) AddCredits

func (uc *UserCreate) AddCredits(c ...*Credit) *UserCreate

AddCredits adds the "credits" edges to the Credit entity.

func (*UserCreate) AddGenerationIDs

func (uc *UserCreate) AddGenerationIDs(ids ...uuid.UUID) *UserCreate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*UserCreate) AddGenerationOutputLikeIDs

func (uc *UserCreate) AddGenerationOutputLikeIDs(ids ...uuid.UUID) *UserCreate

AddGenerationOutputLikeIDs adds the "generation_output_likes" edge to the GenerationOutputLike entity by IDs.

func (*UserCreate) AddGenerationOutputLikes

func (uc *UserCreate) AddGenerationOutputLikes(g ...*GenerationOutputLike) *UserCreate

AddGenerationOutputLikes adds the "generation_output_likes" edges to the GenerationOutputLike entity.

func (*UserCreate) AddGenerations

func (uc *UserCreate) AddGenerations(g ...*Generation) *UserCreate

AddGenerations adds the "generations" edges to the Generation entity.

func (*UserCreate) AddRoleIDs

func (uc *UserCreate) AddRoleIDs(ids ...uuid.UUID) *UserCreate

AddRoleIDs adds the "roles" edge to the Role entity by IDs.

func (*UserCreate) AddRoles

func (uc *UserCreate) AddRoles(r ...*Role) *UserCreate

AddRoles adds the "roles" edges to the Role entity.

func (*UserCreate) AddTipsGiven

func (uc *UserCreate) AddTipsGiven(t ...*TipLog) *UserCreate

AddTipsGiven adds the "tips_given" edges to the TipLog entity.

func (*UserCreate) AddTipsGivenIDs

func (uc *UserCreate) AddTipsGivenIDs(ids ...uuid.UUID) *UserCreate

AddTipsGivenIDs adds the "tips_given" edge to the TipLog entity by IDs.

func (*UserCreate) AddTipsReceived

func (uc *UserCreate) AddTipsReceived(t ...*TipLog) *UserCreate

AddTipsReceived adds the "tips_received" edges to the TipLog entity.

func (*UserCreate) AddTipsReceivedIDs

func (uc *UserCreate) AddTipsReceivedIDs(ids ...uuid.UUID) *UserCreate

AddTipsReceivedIDs adds the "tips_received" edge to the TipLog entity by IDs.

func (*UserCreate) AddUpscaleIDs

func (uc *UserCreate) AddUpscaleIDs(ids ...uuid.UUID) *UserCreate

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*UserCreate) AddUpscales

func (uc *UserCreate) AddUpscales(u ...*Upscale) *UserCreate

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*UserCreate) AddVoiceoverIDs

func (uc *UserCreate) AddVoiceoverIDs(ids ...uuid.UUID) *UserCreate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*UserCreate) AddVoiceovers

func (uc *UserCreate) AddVoiceovers(v ...*Voiceover) *UserCreate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecContext

func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) OnConflict

func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetEmail(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetEmail(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns

func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreate) QueryContext

func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetActiveProductID

func (uc *UserCreate) SetActiveProductID(s string) *UserCreate

SetActiveProductID sets the "active_product_id" field.

func (*UserCreate) SetBannedAt

func (uc *UserCreate) SetBannedAt(t time.Time) *UserCreate

SetBannedAt sets the "banned_at" field.

func (*UserCreate) SetCreatedAt

func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetDataDeletedAt

func (uc *UserCreate) SetDataDeletedAt(t time.Time) *UserCreate

SetDataDeletedAt sets the "data_deleted_at" field.

func (*UserCreate) SetDiscordID

func (uc *UserCreate) SetDiscordID(s string) *UserCreate

SetDiscordID sets the "discord_id" field.

func (*UserCreate) SetEmail

func (uc *UserCreate) SetEmail(s string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetLastSeenAt

func (uc *UserCreate) SetLastSeenAt(t time.Time) *UserCreate

SetLastSeenAt sets the "last_seen_at" field.

func (*UserCreate) SetLastSignInAt

func (uc *UserCreate) SetLastSignInAt(t time.Time) *UserCreate

SetLastSignInAt sets the "last_sign_in_at" field.

func (*UserCreate) SetNillableActiveProductID

func (uc *UserCreate) SetNillableActiveProductID(s *string) *UserCreate

SetNillableActiveProductID sets the "active_product_id" field if the given value is not nil.

func (*UserCreate) SetNillableBannedAt

func (uc *UserCreate) SetNillableBannedAt(t *time.Time) *UserCreate

SetNillableBannedAt sets the "banned_at" field if the given value is not nil.

func (*UserCreate) SetNillableCreatedAt

func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetNillableDataDeletedAt

func (uc *UserCreate) SetNillableDataDeletedAt(t *time.Time) *UserCreate

SetNillableDataDeletedAt sets the "data_deleted_at" field if the given value is not nil.

func (*UserCreate) SetNillableDiscordID

func (uc *UserCreate) SetNillableDiscordID(s *string) *UserCreate

SetNillableDiscordID sets the "discord_id" field if the given value is not nil.

func (*UserCreate) SetNillableID

func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*UserCreate) SetNillableLastSeenAt

func (uc *UserCreate) SetNillableLastSeenAt(t *time.Time) *UserCreate

SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.

func (*UserCreate) SetNillableLastSignInAt

func (uc *UserCreate) SetNillableLastSignInAt(t *time.Time) *UserCreate

SetNillableLastSignInAt sets the "last_sign_in_at" field if the given value is not nil.

func (*UserCreate) SetNillableScheduledForDeletionOn

func (uc *UserCreate) SetNillableScheduledForDeletionOn(t *time.Time) *UserCreate

SetNillableScheduledForDeletionOn sets the "scheduled_for_deletion_on" field if the given value is not nil.

func (*UserCreate) SetNillableUpdatedAt

func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserCreate) SetNillableUsernameChangedAt

func (uc *UserCreate) SetNillableUsernameChangedAt(t *time.Time) *UserCreate

SetNillableUsernameChangedAt sets the "username_changed_at" field if the given value is not nil.

func (*UserCreate) SetNillableWantsEmail

func (uc *UserCreate) SetNillableWantsEmail(b *bool) *UserCreate

SetNillableWantsEmail sets the "wants_email" field if the given value is not nil.

func (*UserCreate) SetScheduledForDeletionOn

func (uc *UserCreate) SetScheduledForDeletionOn(t time.Time) *UserCreate

SetScheduledForDeletionOn sets the "scheduled_for_deletion_on" field.

func (*UserCreate) SetStripeCustomerID

func (uc *UserCreate) SetStripeCustomerID(s string) *UserCreate

SetStripeCustomerID sets the "stripe_customer_id" field.

func (*UserCreate) SetUpdatedAt

func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate

SetUpdatedAt sets the "updated_at" field.

func (*UserCreate) SetUsername

func (uc *UserCreate) SetUsername(s string) *UserCreate

SetUsername sets the "username" field.

func (*UserCreate) SetUsernameChangedAt

func (uc *UserCreate) SetUsernameChangedAt(t time.Time) *UserCreate

SetUsernameChangedAt sets the "username_changed_at" field.

func (*UserCreate) SetWantsEmail

func (uc *UserCreate) SetWantsEmail(b bool) *UserCreate

SetWantsEmail sets the "wants_email" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecContext

func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) OnConflict

func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetEmail(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns

func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreateBulk) QueryContext

func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecContext

func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) QueryContext

func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type UserEdges

type UserEdges struct {
	// Generations holds the value of the generations edge.
	Generations []*Generation `json:"generations,omitempty"`
	// Upscales holds the value of the upscales edge.
	Upscales []*Upscale `json:"upscales,omitempty"`
	// Voiceovers holds the value of the voiceovers edge.
	Voiceovers []*Voiceover `json:"voiceovers,omitempty"`
	// Credits holds the value of the credits edge.
	Credits []*Credit `json:"credits,omitempty"`
	// APITokens holds the value of the api_tokens edge.
	APITokens []*ApiToken `json:"api_tokens,omitempty"`
	// TipsGiven holds the value of the tips_given edge.
	TipsGiven []*TipLog `json:"tips_given,omitempty"`
	// TipsReceived holds the value of the tips_received edge.
	TipsReceived []*TipLog `json:"tips_received,omitempty"`
	// Roles holds the value of the roles edge.
	Roles []*Role `json:"roles,omitempty"`
	// GenerationOutputLikes holds the value of the generation_output_likes edge.
	GenerationOutputLikes []*GenerationOutputLike `json:"generation_output_likes,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) APITokensOrErr

func (e UserEdges) APITokensOrErr() ([]*ApiToken, error)

APITokensOrErr returns the APITokens value or an error if the edge was not loaded in eager-loading.

func (UserEdges) CreditsOrErr

func (e UserEdges) CreditsOrErr() ([]*Credit, error)

CreditsOrErr returns the Credits value or an error if the edge was not loaded in eager-loading.

func (UserEdges) GenerationOutputLikesOrErr

func (e UserEdges) GenerationOutputLikesOrErr() ([]*GenerationOutputLike, error)

GenerationOutputLikesOrErr returns the GenerationOutputLikes value or an error if the edge was not loaded in eager-loading.

func (UserEdges) GenerationsOrErr

func (e UserEdges) GenerationsOrErr() ([]*Generation, error)

GenerationsOrErr returns the Generations value or an error if the edge was not loaded in eager-loading.

func (UserEdges) RolesOrErr

func (e UserEdges) RolesOrErr() ([]*Role, error)

RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.

func (UserEdges) TipsGivenOrErr

func (e UserEdges) TipsGivenOrErr() ([]*TipLog, error)

TipsGivenOrErr returns the TipsGiven value or an error if the edge was not loaded in eager-loading.

func (UserEdges) TipsReceivedOrErr

func (e UserEdges) TipsReceivedOrErr() ([]*TipLog, error)

TipsReceivedOrErr returns the TipsReceived value or an error if the edge was not loaded in eager-loading.

func (UserEdges) UpscalesOrErr

func (e UserEdges) UpscalesOrErr() ([]*Upscale, error)

UpscalesOrErr returns the Upscales value or an error if the edge was not loaded in eager-loading.

func (UserEdges) VoiceoversOrErr

func (e UserEdges) VoiceoversOrErr() ([]*Voiceover, error)

VoiceoversOrErr returns the Voiceovers value or an error if the edge was not loaded in eager-loading.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) APITokensCleared

func (m *UserMutation) APITokensCleared() bool

APITokensCleared reports if the "api_tokens" edge to the ApiToken entity was cleared.

func (*UserMutation) APITokensIDs

func (m *UserMutation) APITokensIDs() (ids []uuid.UUID)

APITokensIDs returns the "api_tokens" edge IDs in the mutation.

func (*UserMutation) ActiveProductID

func (m *UserMutation) ActiveProductID() (r string, exists bool)

ActiveProductID returns the value of the "active_product_id" field in the mutation.

func (*UserMutation) ActiveProductIDCleared

func (m *UserMutation) ActiveProductIDCleared() bool

ActiveProductIDCleared returns if the "active_product_id" field was cleared in this mutation.

func (*UserMutation) AddAPITokenIDs

func (m *UserMutation) AddAPITokenIDs(ids ...uuid.UUID)

AddAPITokenIDs adds the "api_tokens" edge to the ApiToken entity by ids.

func (*UserMutation) AddCreditIDs

func (m *UserMutation) AddCreditIDs(ids ...uuid.UUID)

AddCreditIDs adds the "credits" edge to the Credit entity by ids.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddGenerationIDs

func (m *UserMutation) AddGenerationIDs(ids ...uuid.UUID)

AddGenerationIDs adds the "generations" edge to the Generation entity by ids.

func (*UserMutation) AddGenerationOutputLikeIDs

func (m *UserMutation) AddGenerationOutputLikeIDs(ids ...uuid.UUID)

AddGenerationOutputLikeIDs adds the "generation_output_likes" edge to the GenerationOutputLike entity by ids.

func (*UserMutation) AddRoleIDs

func (m *UserMutation) AddRoleIDs(ids ...uuid.UUID)

AddRoleIDs adds the "roles" edge to the Role entity by ids.

func (*UserMutation) AddTipsGivenIDs

func (m *UserMutation) AddTipsGivenIDs(ids ...uuid.UUID)

AddTipsGivenIDs adds the "tips_given" edge to the TipLog entity by ids.

func (*UserMutation) AddTipsReceivedIDs

func (m *UserMutation) AddTipsReceivedIDs(ids ...uuid.UUID)

AddTipsReceivedIDs adds the "tips_received" edge to the TipLog entity by ids.

func (*UserMutation) AddUpscaleIDs

func (m *UserMutation) AddUpscaleIDs(ids ...uuid.UUID)

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by ids.

func (*UserMutation) AddVoiceoverIDs

func (m *UserMutation) AddVoiceoverIDs(ids ...uuid.UUID)

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by ids.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) BannedAt

func (m *UserMutation) BannedAt() (r time.Time, exists bool)

BannedAt returns the value of the "banned_at" field in the mutation.

func (*UserMutation) BannedAtCleared

func (m *UserMutation) BannedAtCleared() bool

BannedAtCleared returns if the "banned_at" field was cleared in this mutation.

func (*UserMutation) ClearAPITokens

func (m *UserMutation) ClearAPITokens()

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*UserMutation) ClearActiveProductID

func (m *UserMutation) ClearActiveProductID()

ClearActiveProductID clears the value of the "active_product_id" field.

func (*UserMutation) ClearBannedAt

func (m *UserMutation) ClearBannedAt()

ClearBannedAt clears the value of the "banned_at" field.

func (*UserMutation) ClearCredits

func (m *UserMutation) ClearCredits()

ClearCredits clears the "credits" edge to the Credit entity.

func (*UserMutation) ClearDataDeletedAt

func (m *UserMutation) ClearDataDeletedAt()

ClearDataDeletedAt clears the value of the "data_deleted_at" field.

func (*UserMutation) ClearDiscordID

func (m *UserMutation) ClearDiscordID()

ClearDiscordID clears the value of the "discord_id" field.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearGenerationOutputLikes

func (m *UserMutation) ClearGenerationOutputLikes()

ClearGenerationOutputLikes clears the "generation_output_likes" edge to the GenerationOutputLike entity.

func (*UserMutation) ClearGenerations

func (m *UserMutation) ClearGenerations()

ClearGenerations clears the "generations" edge to the Generation entity.

func (*UserMutation) ClearLastSignInAt

func (m *UserMutation) ClearLastSignInAt()

ClearLastSignInAt clears the value of the "last_sign_in_at" field.

func (*UserMutation) ClearRoles

func (m *UserMutation) ClearRoles()

ClearRoles clears the "roles" edge to the Role entity.

func (*UserMutation) ClearScheduledForDeletionOn

func (m *UserMutation) ClearScheduledForDeletionOn()

ClearScheduledForDeletionOn clears the value of the "scheduled_for_deletion_on" field.

func (*UserMutation) ClearTipsGiven

func (m *UserMutation) ClearTipsGiven()

ClearTipsGiven clears the "tips_given" edge to the TipLog entity.

func (*UserMutation) ClearTipsReceived

func (m *UserMutation) ClearTipsReceived()

ClearTipsReceived clears the "tips_received" edge to the TipLog entity.

func (*UserMutation) ClearUpscales

func (m *UserMutation) ClearUpscales()

ClearUpscales clears the "upscales" edge to the Upscale entity.

func (*UserMutation) ClearUsernameChangedAt

func (m *UserMutation) ClearUsernameChangedAt()

ClearUsernameChangedAt clears the value of the "username_changed_at" field.

func (*UserMutation) ClearVoiceovers

func (m *UserMutation) ClearVoiceovers()

ClearVoiceovers clears the "voiceovers" edge to the Voiceover entity.

func (*UserMutation) ClearWantsEmail

func (m *UserMutation) ClearWantsEmail()

ClearWantsEmail clears the value of the "wants_email" field.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserMutation) CreditsCleared

func (m *UserMutation) CreditsCleared() bool

CreditsCleared reports if the "credits" edge to the Credit entity was cleared.

func (*UserMutation) CreditsIDs

func (m *UserMutation) CreditsIDs() (ids []uuid.UUID)

CreditsIDs returns the "credits" edge IDs in the mutation.

func (*UserMutation) DataDeletedAt

func (m *UserMutation) DataDeletedAt() (r time.Time, exists bool)

DataDeletedAt returns the value of the "data_deleted_at" field in the mutation.

func (*UserMutation) DataDeletedAtCleared

func (m *UserMutation) DataDeletedAtCleared() bool

DataDeletedAtCleared returns if the "data_deleted_at" field was cleared in this mutation.

func (*UserMutation) DiscordID

func (m *UserMutation) DiscordID() (r string, exists bool)

DiscordID returns the value of the "discord_id" field in the mutation.

func (*UserMutation) DiscordIDCleared

func (m *UserMutation) DiscordIDCleared() bool

DiscordIDCleared returns if the "discord_id" field was cleared in this mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Email

func (m *UserMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UserMutation) ExecContext

func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) GenerationOutputLikesCleared

func (m *UserMutation) GenerationOutputLikesCleared() bool

GenerationOutputLikesCleared reports if the "generation_output_likes" edge to the GenerationOutputLike entity was cleared.

func (*UserMutation) GenerationOutputLikesIDs

func (m *UserMutation) GenerationOutputLikesIDs() (ids []uuid.UUID)

GenerationOutputLikesIDs returns the "generation_output_likes" edge IDs in the mutation.

func (*UserMutation) GenerationsCleared

func (m *UserMutation) GenerationsCleared() bool

GenerationsCleared reports if the "generations" edge to the Generation entity was cleared.

func (*UserMutation) GenerationsIDs

func (m *UserMutation) GenerationsIDs() (ids []uuid.UUID)

GenerationsIDs returns the "generations" edge IDs in the mutation.

func (*UserMutation) ID

func (m *UserMutation) 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 (*UserMutation) IDs

func (m *UserMutation) 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 (*UserMutation) LastSeenAt

func (m *UserMutation) LastSeenAt() (r time.Time, exists bool)

LastSeenAt returns the value of the "last_seen_at" field in the mutation.

func (*UserMutation) LastSignInAt

func (m *UserMutation) LastSignInAt() (r time.Time, exists bool)

LastSignInAt returns the value of the "last_sign_in_at" field in the mutation.

func (*UserMutation) LastSignInAtCleared

func (m *UserMutation) LastSignInAtCleared() bool

LastSignInAtCleared returns if the "last_sign_in_at" field was cleared in this mutation.

func (*UserMutation) OldActiveProductID

func (m *UserMutation) OldActiveProductID(ctx context.Context) (v *string, err error)

OldActiveProductID returns the old "active_product_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldBannedAt

func (m *UserMutation) OldBannedAt(ctx context.Context) (v *time.Time, err error)

OldBannedAt returns the old "banned_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldCreatedAt

func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldDataDeletedAt

func (m *UserMutation) OldDataDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDataDeletedAt returns the old "data_deleted_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldDiscordID

func (m *UserMutation) OldDiscordID(ctx context.Context) (v *string, err error)

OldDiscordID returns the old "discord_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldEmail

func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserMutation) OldLastSeenAt

func (m *UserMutation) OldLastSeenAt(ctx context.Context) (v time.Time, err error)

OldLastSeenAt returns the old "last_seen_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldLastSignInAt

func (m *UserMutation) OldLastSignInAt(ctx context.Context) (v *time.Time, err error)

OldLastSignInAt returns the old "last_sign_in_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldScheduledForDeletionOn

func (m *UserMutation) OldScheduledForDeletionOn(ctx context.Context) (v *time.Time, err error)

OldScheduledForDeletionOn returns the old "scheduled_for_deletion_on" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldStripeCustomerID

func (m *UserMutation) OldStripeCustomerID(ctx context.Context) (v string, err error)

OldStripeCustomerID returns the old "stripe_customer_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUpdatedAt

func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUsername

func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUsernameChangedAt

func (m *UserMutation) OldUsernameChangedAt(ctx context.Context) (v *time.Time, err error)

OldUsernameChangedAt returns the old "username_changed_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldWantsEmail

func (m *UserMutation) OldWantsEmail(ctx context.Context) (v *bool, err error)

OldWantsEmail returns the old "wants_email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) QueryContext

func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserMutation) RemoveAPITokenIDs

func (m *UserMutation) RemoveAPITokenIDs(ids ...uuid.UUID)

RemoveAPITokenIDs removes the "api_tokens" edge to the ApiToken entity by IDs.

func (*UserMutation) RemoveCreditIDs

func (m *UserMutation) RemoveCreditIDs(ids ...uuid.UUID)

RemoveCreditIDs removes the "credits" edge to the Credit entity by IDs.

func (*UserMutation) RemoveGenerationIDs

func (m *UserMutation) RemoveGenerationIDs(ids ...uuid.UUID)

RemoveGenerationIDs removes the "generations" edge to the Generation entity by IDs.

func (*UserMutation) RemoveGenerationOutputLikeIDs

func (m *UserMutation) RemoveGenerationOutputLikeIDs(ids ...uuid.UUID)

RemoveGenerationOutputLikeIDs removes the "generation_output_likes" edge to the GenerationOutputLike entity by IDs.

func (*UserMutation) RemoveRoleIDs

func (m *UserMutation) RemoveRoleIDs(ids ...uuid.UUID)

RemoveRoleIDs removes the "roles" edge to the Role entity by IDs.

func (*UserMutation) RemoveTipsGivenIDs

func (m *UserMutation) RemoveTipsGivenIDs(ids ...uuid.UUID)

RemoveTipsGivenIDs removes the "tips_given" edge to the TipLog entity by IDs.

func (*UserMutation) RemoveTipsReceivedIDs

func (m *UserMutation) RemoveTipsReceivedIDs(ids ...uuid.UUID)

RemoveTipsReceivedIDs removes the "tips_received" edge to the TipLog entity by IDs.

func (*UserMutation) RemoveUpscaleIDs

func (m *UserMutation) RemoveUpscaleIDs(ids ...uuid.UUID)

RemoveUpscaleIDs removes the "upscales" edge to the Upscale entity by IDs.

func (*UserMutation) RemoveVoiceoverIDs

func (m *UserMutation) RemoveVoiceoverIDs(ids ...uuid.UUID)

RemoveVoiceoverIDs removes the "voiceovers" edge to the Voiceover entity by IDs.

func (*UserMutation) RemovedAPITokensIDs

func (m *UserMutation) RemovedAPITokensIDs() (ids []uuid.UUID)

RemovedAPITokens returns the removed IDs of the "api_tokens" edge to the ApiToken entity.

func (*UserMutation) RemovedCreditsIDs

func (m *UserMutation) RemovedCreditsIDs() (ids []uuid.UUID)

RemovedCredits returns the removed IDs of the "credits" edge to the Credit entity.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedGenerationOutputLikesIDs

func (m *UserMutation) RemovedGenerationOutputLikesIDs() (ids []uuid.UUID)

RemovedGenerationOutputLikes returns the removed IDs of the "generation_output_likes" edge to the GenerationOutputLike entity.

func (*UserMutation) RemovedGenerationsIDs

func (m *UserMutation) RemovedGenerationsIDs() (ids []uuid.UUID)

RemovedGenerations returns the removed IDs of the "generations" edge to the Generation entity.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) RemovedRolesIDs

func (m *UserMutation) RemovedRolesIDs() (ids []uuid.UUID)

RemovedRoles returns the removed IDs of the "roles" edge to the Role entity.

func (*UserMutation) RemovedTipsGivenIDs

func (m *UserMutation) RemovedTipsGivenIDs() (ids []uuid.UUID)

RemovedTipsGiven returns the removed IDs of the "tips_given" edge to the TipLog entity.

func (*UserMutation) RemovedTipsReceivedIDs

func (m *UserMutation) RemovedTipsReceivedIDs() (ids []uuid.UUID)

RemovedTipsReceived returns the removed IDs of the "tips_received" edge to the TipLog entity.

func (*UserMutation) RemovedUpscalesIDs

func (m *UserMutation) RemovedUpscalesIDs() (ids []uuid.UUID)

RemovedUpscales returns the removed IDs of the "upscales" edge to the Upscale entity.

func (*UserMutation) RemovedVoiceoversIDs

func (m *UserMutation) RemovedVoiceoversIDs() (ids []uuid.UUID)

RemovedVoiceovers returns the removed IDs of the "voiceovers" edge to the Voiceover entity.

func (*UserMutation) ResetAPITokens

func (m *UserMutation) ResetAPITokens()

ResetAPITokens resets all changes to the "api_tokens" edge.

func (*UserMutation) ResetActiveProductID

func (m *UserMutation) ResetActiveProductID()

ResetActiveProductID resets all changes to the "active_product_id" field.

func (*UserMutation) ResetBannedAt

func (m *UserMutation) ResetBannedAt()

ResetBannedAt resets all changes to the "banned_at" field.

func (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserMutation) ResetCredits

func (m *UserMutation) ResetCredits()

ResetCredits resets all changes to the "credits" edge.

func (*UserMutation) ResetDataDeletedAt

func (m *UserMutation) ResetDataDeletedAt()

ResetDataDeletedAt resets all changes to the "data_deleted_at" field.

func (*UserMutation) ResetDiscordID

func (m *UserMutation) ResetDiscordID()

ResetDiscordID resets all changes to the "discord_id" field.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetEmail

func (m *UserMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetGenerationOutputLikes

func (m *UserMutation) ResetGenerationOutputLikes()

ResetGenerationOutputLikes resets all changes to the "generation_output_likes" edge.

func (*UserMutation) ResetGenerations

func (m *UserMutation) ResetGenerations()

ResetGenerations resets all changes to the "generations" edge.

func (*UserMutation) ResetLastSeenAt

func (m *UserMutation) ResetLastSeenAt()

ResetLastSeenAt resets all changes to the "last_seen_at" field.

func (*UserMutation) ResetLastSignInAt

func (m *UserMutation) ResetLastSignInAt()

ResetLastSignInAt resets all changes to the "last_sign_in_at" field.

func (*UserMutation) ResetRoles

func (m *UserMutation) ResetRoles()

ResetRoles resets all changes to the "roles" edge.

func (*UserMutation) ResetScheduledForDeletionOn

func (m *UserMutation) ResetScheduledForDeletionOn()

ResetScheduledForDeletionOn resets all changes to the "scheduled_for_deletion_on" field.

func (*UserMutation) ResetStripeCustomerID

func (m *UserMutation) ResetStripeCustomerID()

ResetStripeCustomerID resets all changes to the "stripe_customer_id" field.

func (*UserMutation) ResetTipsGiven

func (m *UserMutation) ResetTipsGiven()

ResetTipsGiven resets all changes to the "tips_given" edge.

func (*UserMutation) ResetTipsReceived

func (m *UserMutation) ResetTipsReceived()

ResetTipsReceived resets all changes to the "tips_received" edge.

func (*UserMutation) ResetUpdatedAt

func (m *UserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserMutation) ResetUpscales

func (m *UserMutation) ResetUpscales()

ResetUpscales resets all changes to the "upscales" edge.

func (*UserMutation) ResetUsername

func (m *UserMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*UserMutation) ResetUsernameChangedAt

func (m *UserMutation) ResetUsernameChangedAt()

ResetUsernameChangedAt resets all changes to the "username_changed_at" field.

func (*UserMutation) ResetVoiceovers

func (m *UserMutation) ResetVoiceovers()

ResetVoiceovers resets all changes to the "voiceovers" edge.

func (*UserMutation) ResetWantsEmail

func (m *UserMutation) ResetWantsEmail()

ResetWantsEmail resets all changes to the "wants_email" field.

func (*UserMutation) RolesCleared

func (m *UserMutation) RolesCleared() bool

RolesCleared reports if the "roles" edge to the Role entity was cleared.

func (*UserMutation) RolesIDs

func (m *UserMutation) RolesIDs() (ids []uuid.UUID)

RolesIDs returns the "roles" edge IDs in the mutation.

func (*UserMutation) ScheduledForDeletionOn

func (m *UserMutation) ScheduledForDeletionOn() (r time.Time, exists bool)

ScheduledForDeletionOn returns the value of the "scheduled_for_deletion_on" field in the mutation.

func (*UserMutation) ScheduledForDeletionOnCleared

func (m *UserMutation) ScheduledForDeletionOnCleared() bool

ScheduledForDeletionOnCleared returns if the "scheduled_for_deletion_on" field was cleared in this mutation.

func (*UserMutation) SetActiveProductID

func (m *UserMutation) SetActiveProductID(s string)

SetActiveProductID sets the "active_product_id" field.

func (*UserMutation) SetBannedAt

func (m *UserMutation) SetBannedAt(t time.Time)

SetBannedAt sets the "banned_at" field.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserMutation) SetDataDeletedAt

func (m *UserMutation) SetDataDeletedAt(t time.Time)

SetDataDeletedAt sets the "data_deleted_at" field.

func (*UserMutation) SetDiscordID

func (m *UserMutation) SetDiscordID(s string)

SetDiscordID sets the "discord_id" field.

func (*UserMutation) SetEmail

func (m *UserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetLastSeenAt

func (m *UserMutation) SetLastSeenAt(t time.Time)

SetLastSeenAt sets the "last_seen_at" field.

func (*UserMutation) SetLastSignInAt

func (m *UserMutation) SetLastSignInAt(t time.Time)

SetLastSignInAt sets the "last_sign_in_at" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetScheduledForDeletionOn

func (m *UserMutation) SetScheduledForDeletionOn(t time.Time)

SetScheduledForDeletionOn sets the "scheduled_for_deletion_on" field.

func (*UserMutation) SetStripeCustomerID

func (m *UserMutation) SetStripeCustomerID(s string)

SetStripeCustomerID sets the "stripe_customer_id" field.

func (*UserMutation) SetUpdatedAt

func (m *UserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserMutation) SetUsername

func (m *UserMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (*UserMutation) SetUsernameChangedAt

func (m *UserMutation) SetUsernameChangedAt(t time.Time)

SetUsernameChangedAt sets the "username_changed_at" field.

func (*UserMutation) SetWantsEmail

func (m *UserMutation) SetWantsEmail(b bool)

SetWantsEmail sets the "wants_email" field.

func (*UserMutation) StripeCustomerID

func (m *UserMutation) StripeCustomerID() (r string, exists bool)

StripeCustomerID returns the value of the "stripe_customer_id" field in the mutation.

func (*UserMutation) TipsGivenCleared

func (m *UserMutation) TipsGivenCleared() bool

TipsGivenCleared reports if the "tips_given" edge to the TipLog entity was cleared.

func (*UserMutation) TipsGivenIDs

func (m *UserMutation) TipsGivenIDs() (ids []uuid.UUID)

TipsGivenIDs returns the "tips_given" edge IDs in the mutation.

func (*UserMutation) TipsReceivedCleared

func (m *UserMutation) TipsReceivedCleared() bool

TipsReceivedCleared reports if the "tips_received" edge to the TipLog entity was cleared.

func (*UserMutation) TipsReceivedIDs

func (m *UserMutation) TipsReceivedIDs() (ids []uuid.UUID)

TipsReceivedIDs returns the "tips_received" edge IDs in the mutation.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) UpdatedAt

func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserMutation) UpscalesCleared

func (m *UserMutation) UpscalesCleared() bool

UpscalesCleared reports if the "upscales" edge to the Upscale entity was cleared.

func (*UserMutation) UpscalesIDs

func (m *UserMutation) UpscalesIDs() (ids []uuid.UUID)

UpscalesIDs returns the "upscales" edge IDs in the mutation.

func (*UserMutation) Username

func (m *UserMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*UserMutation) UsernameChangedAt

func (m *UserMutation) UsernameChangedAt() (r time.Time, exists bool)

UsernameChangedAt returns the value of the "username_changed_at" field in the mutation.

func (*UserMutation) UsernameChangedAtCleared

func (m *UserMutation) UsernameChangedAtCleared() bool

UsernameChangedAtCleared returns if the "username_changed_at" field was cleared in this mutation.

func (*UserMutation) VoiceoversCleared

func (m *UserMutation) VoiceoversCleared() bool

VoiceoversCleared reports if the "voiceovers" edge to the Voiceover entity was cleared.

func (*UserMutation) VoiceoversIDs

func (m *UserMutation) VoiceoversIDs() (ids []uuid.UUID)

VoiceoversIDs returns the "voiceovers" edge IDs in the mutation.

func (*UserMutation) WantsEmail

func (m *UserMutation) WantsEmail() (r bool, exists bool)

WantsEmail returns the value of the "wants_email" field in the mutation.

func (*UserMutation) WantsEmailCleared

func (m *UserMutation) WantsEmailCleared() bool

WantsEmailCleared returns if the "wants_email" field was cleared in this mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) ExecContext

func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Email string `json:"email,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldEmail).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Modify

func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) QueryAPITokens

func (uq *UserQuery) QueryAPITokens() *ApiTokenQuery

QueryAPITokens chains the current query on the "api_tokens" edge.

func (*UserQuery) QueryContext

func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserQuery) QueryCredits

func (uq *UserQuery) QueryCredits() *CreditQuery

QueryCredits chains the current query on the "credits" edge.

func (*UserQuery) QueryGenerationOutputLikes

func (uq *UserQuery) QueryGenerationOutputLikes() *GenerationOutputLikeQuery

QueryGenerationOutputLikes chains the current query on the "generation_output_likes" edge.

func (*UserQuery) QueryGenerations

func (uq *UserQuery) QueryGenerations() *GenerationQuery

QueryGenerations chains the current query on the "generations" edge.

func (*UserQuery) QueryRoles

func (uq *UserQuery) QueryRoles() *RoleQuery

QueryRoles chains the current query on the "roles" edge.

func (*UserQuery) QueryTipsGiven

func (uq *UserQuery) QueryTipsGiven() *TipLogQuery

QueryTipsGiven chains the current query on the "tips_given" edge.

func (*UserQuery) QueryTipsReceived

func (uq *UserQuery) QueryTipsReceived() *TipLogQuery

QueryTipsReceived chains the current query on the "tips_received" edge.

func (*UserQuery) QueryUpscales

func (uq *UserQuery) QueryUpscales() *UpscaleQuery

QueryUpscales chains the current query on the "upscales" edge.

func (*UserQuery) QueryVoiceovers

func (uq *UserQuery) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers chains the current query on the "voiceovers" edge.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Email string `json:"email,omitempty"`
}

client.User.Query().
	Select(user.FieldEmail).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithAPITokens

func (uq *UserQuery) WithAPITokens(opts ...func(*ApiTokenQuery)) *UserQuery

WithAPITokens tells the query-builder to eager-load the nodes that are connected to the "api_tokens" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithCredits

func (uq *UserQuery) WithCredits(opts ...func(*CreditQuery)) *UserQuery

WithCredits tells the query-builder to eager-load the nodes that are connected to the "credits" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithGenerationOutputLikes

func (uq *UserQuery) WithGenerationOutputLikes(opts ...func(*GenerationOutputLikeQuery)) *UserQuery

WithGenerationOutputLikes tells the query-builder to eager-load the nodes that are connected to the "generation_output_likes" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithGenerations

func (uq *UserQuery) WithGenerations(opts ...func(*GenerationQuery)) *UserQuery

WithGenerations tells the query-builder to eager-load the nodes that are connected to the "generations" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithRoles

func (uq *UserQuery) WithRoles(opts ...func(*RoleQuery)) *UserQuery

WithRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithTipsGiven

func (uq *UserQuery) WithTipsGiven(opts ...func(*TipLogQuery)) *UserQuery

WithTipsGiven tells the query-builder to eager-load the nodes that are connected to the "tips_given" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithTipsReceived

func (uq *UserQuery) WithTipsReceived(opts ...func(*TipLogQuery)) *UserQuery

WithTipsReceived tells the query-builder to eager-load the nodes that are connected to the "tips_received" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithUpscales

func (uq *UserQuery) WithUpscales(opts ...func(*UpscaleQuery)) *UserQuery

WithUpscales tells the query-builder to eager-load the nodes that are connected to the "upscales" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithVoiceovers

func (uq *UserQuery) WithVoiceovers(opts ...func(*VoiceoverQuery)) *UserQuery

WithVoiceovers tells the query-builder to eager-load the nodes that are connected to the "voiceovers" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (UserSelect) ExecContext

func (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Modify

func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect

Modify adds a query modifier for attaching custom logic to queries.

func (UserSelect) QueryContext

func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) AddAPITokenIDs

func (uu *UserUpdate) AddAPITokenIDs(ids ...uuid.UUID) *UserUpdate

AddAPITokenIDs adds the "api_tokens" edge to the ApiToken entity by IDs.

func (*UserUpdate) AddAPITokens

func (uu *UserUpdate) AddAPITokens(a ...*ApiToken) *UserUpdate

AddAPITokens adds the "api_tokens" edges to the ApiToken entity.

func (*UserUpdate) AddCreditIDs

func (uu *UserUpdate) AddCreditIDs(ids ...uuid.UUID) *UserUpdate

AddCreditIDs adds the "credits" edge to the Credit entity by IDs.

func (*UserUpdate) AddCredits

func (uu *UserUpdate) AddCredits(c ...*Credit) *UserUpdate

AddCredits adds the "credits" edges to the Credit entity.

func (*UserUpdate) AddGenerationIDs

func (uu *UserUpdate) AddGenerationIDs(ids ...uuid.UUID) *UserUpdate

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*UserUpdate) AddGenerationOutputLikeIDs

func (uu *UserUpdate) AddGenerationOutputLikeIDs(ids ...uuid.UUID) *UserUpdate

AddGenerationOutputLikeIDs adds the "generation_output_likes" edge to the GenerationOutputLike entity by IDs.

func (*UserUpdate) AddGenerationOutputLikes

func (uu *UserUpdate) AddGenerationOutputLikes(g ...*GenerationOutputLike) *UserUpdate

AddGenerationOutputLikes adds the "generation_output_likes" edges to the GenerationOutputLike entity.

func (*UserUpdate) AddGenerations

func (uu *UserUpdate) AddGenerations(g ...*Generation) *UserUpdate

AddGenerations adds the "generations" edges to the Generation entity.

func (*UserUpdate) AddRoleIDs

func (uu *UserUpdate) AddRoleIDs(ids ...uuid.UUID) *UserUpdate

AddRoleIDs adds the "roles" edge to the Role entity by IDs.

func (*UserUpdate) AddRoles

func (uu *UserUpdate) AddRoles(r ...*Role) *UserUpdate

AddRoles adds the "roles" edges to the Role entity.

func (*UserUpdate) AddTipsGiven

func (uu *UserUpdate) AddTipsGiven(t ...*TipLog) *UserUpdate

AddTipsGiven adds the "tips_given" edges to the TipLog entity.

func (*UserUpdate) AddTipsGivenIDs

func (uu *UserUpdate) AddTipsGivenIDs(ids ...uuid.UUID) *UserUpdate

AddTipsGivenIDs adds the "tips_given" edge to the TipLog entity by IDs.

func (*UserUpdate) AddTipsReceived

func (uu *UserUpdate) AddTipsReceived(t ...*TipLog) *UserUpdate

AddTipsReceived adds the "tips_received" edges to the TipLog entity.

func (*UserUpdate) AddTipsReceivedIDs

func (uu *UserUpdate) AddTipsReceivedIDs(ids ...uuid.UUID) *UserUpdate

AddTipsReceivedIDs adds the "tips_received" edge to the TipLog entity by IDs.

func (*UserUpdate) AddUpscaleIDs

func (uu *UserUpdate) AddUpscaleIDs(ids ...uuid.UUID) *UserUpdate

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*UserUpdate) AddUpscales

func (uu *UserUpdate) AddUpscales(u ...*Upscale) *UserUpdate

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*UserUpdate) AddVoiceoverIDs

func (uu *UserUpdate) AddVoiceoverIDs(ids ...uuid.UUID) *UserUpdate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*UserUpdate) AddVoiceovers

func (uu *UserUpdate) AddVoiceovers(v ...*Voiceover) *UserUpdate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*UserUpdate) ClearAPITokens

func (uu *UserUpdate) ClearAPITokens() *UserUpdate

ClearAPITokens clears all "api_tokens" edges to the ApiToken entity.

func (*UserUpdate) ClearActiveProductID

func (uu *UserUpdate) ClearActiveProductID() *UserUpdate

ClearActiveProductID clears the value of the "active_product_id" field.

func (*UserUpdate) ClearBannedAt

func (uu *UserUpdate) ClearBannedAt() *UserUpdate

ClearBannedAt clears the value of the "banned_at" field.

func (*UserUpdate) ClearCredits

func (uu *UserUpdate) ClearCredits() *UserUpdate

ClearCredits clears all "credits" edges to the Credit entity.

func (*UserUpdate) ClearDataDeletedAt

func (uu *UserUpdate) ClearDataDeletedAt() *UserUpdate

ClearDataDeletedAt clears the value of the "data_deleted_at" field.

func (*UserUpdate) ClearDiscordID

func (uu *UserUpdate) ClearDiscordID() *UserUpdate

ClearDiscordID clears the value of the "discord_id" field.

func (*UserUpdate) ClearGenerationOutputLikes

func (uu *UserUpdate) ClearGenerationOutputLikes() *UserUpdate

ClearGenerationOutputLikes clears all "generation_output_likes" edges to the GenerationOutputLike entity.

func (*UserUpdate) ClearGenerations

func (uu *UserUpdate) ClearGenerations() *UserUpdate

ClearGenerations clears all "generations" edges to the Generation entity.

func (*UserUpdate) ClearLastSignInAt

func (uu *UserUpdate) ClearLastSignInAt() *UserUpdate

ClearLastSignInAt clears the value of the "last_sign_in_at" field.

func (*UserUpdate) ClearRoles

func (uu *UserUpdate) ClearRoles() *UserUpdate

ClearRoles clears all "roles" edges to the Role entity.

func (*UserUpdate) ClearScheduledForDeletionOn

func (uu *UserUpdate) ClearScheduledForDeletionOn() *UserUpdate

ClearScheduledForDeletionOn clears the value of the "scheduled_for_deletion_on" field.

func (*UserUpdate) ClearTipsGiven

func (uu *UserUpdate) ClearTipsGiven() *UserUpdate

ClearTipsGiven clears all "tips_given" edges to the TipLog entity.

func (*UserUpdate) ClearTipsReceived

func (uu *UserUpdate) ClearTipsReceived() *UserUpdate

ClearTipsReceived clears all "tips_received" edges to the TipLog entity.

func (*UserUpdate) ClearUpscales

func (uu *UserUpdate) ClearUpscales() *UserUpdate

ClearUpscales clears all "upscales" edges to the Upscale entity.

func (*UserUpdate) ClearUsernameChangedAt

func (uu *UserUpdate) ClearUsernameChangedAt() *UserUpdate

ClearUsernameChangedAt clears the value of the "username_changed_at" field.

func (*UserUpdate) ClearVoiceovers

func (uu *UserUpdate) ClearVoiceovers() *UserUpdate

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*UserUpdate) ClearWantsEmail

func (uu *UserUpdate) ClearWantsEmail() *UserUpdate

ClearWantsEmail clears the value of the "wants_email" field.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecContext

func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Modify

func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) QueryContext

func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserUpdate) RemoveAPITokenIDs

func (uu *UserUpdate) RemoveAPITokenIDs(ids ...uuid.UUID) *UserUpdate

RemoveAPITokenIDs removes the "api_tokens" edge to ApiToken entities by IDs.

func (*UserUpdate) RemoveAPITokens

func (uu *UserUpdate) RemoveAPITokens(a ...*ApiToken) *UserUpdate

RemoveAPITokens removes "api_tokens" edges to ApiToken entities.

func (*UserUpdate) RemoveCreditIDs

func (uu *UserUpdate) RemoveCreditIDs(ids ...uuid.UUID) *UserUpdate

RemoveCreditIDs removes the "credits" edge to Credit entities by IDs.

func (*UserUpdate) RemoveCredits

func (uu *UserUpdate) RemoveCredits(c ...*Credit) *UserUpdate

RemoveCredits removes "credits" edges to Credit entities.

func (*UserUpdate) RemoveGenerationIDs

func (uu *UserUpdate) RemoveGenerationIDs(ids ...uuid.UUID) *UserUpdate

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*UserUpdate) RemoveGenerationOutputLikeIDs

func (uu *UserUpdate) RemoveGenerationOutputLikeIDs(ids ...uuid.UUID) *UserUpdate

RemoveGenerationOutputLikeIDs removes the "generation_output_likes" edge to GenerationOutputLike entities by IDs.

func (*UserUpdate) RemoveGenerationOutputLikes

func (uu *UserUpdate) RemoveGenerationOutputLikes(g ...*GenerationOutputLike) *UserUpdate

RemoveGenerationOutputLikes removes "generation_output_likes" edges to GenerationOutputLike entities.

func (*UserUpdate) RemoveGenerations

func (uu *UserUpdate) RemoveGenerations(g ...*Generation) *UserUpdate

RemoveGenerations removes "generations" edges to Generation entities.

func (*UserUpdate) RemoveRoleIDs

func (uu *UserUpdate) RemoveRoleIDs(ids ...uuid.UUID) *UserUpdate

RemoveRoleIDs removes the "roles" edge to Role entities by IDs.

func (*UserUpdate) RemoveRoles

func (uu *UserUpdate) RemoveRoles(r ...*Role) *UserUpdate

RemoveRoles removes "roles" edges to Role entities.

func (*UserUpdate) RemoveTipsGiven

func (uu *UserUpdate) RemoveTipsGiven(t ...*TipLog) *UserUpdate

RemoveTipsGiven removes "tips_given" edges to TipLog entities.

func (*UserUpdate) RemoveTipsGivenIDs

func (uu *UserUpdate) RemoveTipsGivenIDs(ids ...uuid.UUID) *UserUpdate

RemoveTipsGivenIDs removes the "tips_given" edge to TipLog entities by IDs.

func (*UserUpdate) RemoveTipsReceived

func (uu *UserUpdate) RemoveTipsReceived(t ...*TipLog) *UserUpdate

RemoveTipsReceived removes "tips_received" edges to TipLog entities.

func (*UserUpdate) RemoveTipsReceivedIDs

func (uu *UserUpdate) RemoveTipsReceivedIDs(ids ...uuid.UUID) *UserUpdate

RemoveTipsReceivedIDs removes the "tips_received" edge to TipLog entities by IDs.

func (*UserUpdate) RemoveUpscaleIDs

func (uu *UserUpdate) RemoveUpscaleIDs(ids ...uuid.UUID) *UserUpdate

RemoveUpscaleIDs removes the "upscales" edge to Upscale entities by IDs.

func (*UserUpdate) RemoveUpscales

func (uu *UserUpdate) RemoveUpscales(u ...*Upscale) *UserUpdate

RemoveUpscales removes "upscales" edges to Upscale entities.

func (*UserUpdate) RemoveVoiceoverIDs

func (uu *UserUpdate) RemoveVoiceoverIDs(ids ...uuid.UUID) *UserUpdate

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*UserUpdate) RemoveVoiceovers

func (uu *UserUpdate) RemoveVoiceovers(v ...*Voiceover) *UserUpdate

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetActiveProductID

func (uu *UserUpdate) SetActiveProductID(s string) *UserUpdate

SetActiveProductID sets the "active_product_id" field.

func (*UserUpdate) SetBannedAt

func (uu *UserUpdate) SetBannedAt(t time.Time) *UserUpdate

SetBannedAt sets the "banned_at" field.

func (*UserUpdate) SetDataDeletedAt

func (uu *UserUpdate) SetDataDeletedAt(t time.Time) *UserUpdate

SetDataDeletedAt sets the "data_deleted_at" field.

func (*UserUpdate) SetDiscordID

func (uu *UserUpdate) SetDiscordID(s string) *UserUpdate

SetDiscordID sets the "discord_id" field.

func (*UserUpdate) SetEmail

func (uu *UserUpdate) SetEmail(s string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetLastSeenAt

func (uu *UserUpdate) SetLastSeenAt(t time.Time) *UserUpdate

SetLastSeenAt sets the "last_seen_at" field.

func (*UserUpdate) SetLastSignInAt

func (uu *UserUpdate) SetLastSignInAt(t time.Time) *UserUpdate

SetLastSignInAt sets the "last_sign_in_at" field.

func (*UserUpdate) SetNillableActiveProductID

func (uu *UserUpdate) SetNillableActiveProductID(s *string) *UserUpdate

SetNillableActiveProductID sets the "active_product_id" field if the given value is not nil.

func (*UserUpdate) SetNillableBannedAt

func (uu *UserUpdate) SetNillableBannedAt(t *time.Time) *UserUpdate

SetNillableBannedAt sets the "banned_at" field if the given value is not nil.

func (*UserUpdate) SetNillableDataDeletedAt

func (uu *UserUpdate) SetNillableDataDeletedAt(t *time.Time) *UserUpdate

SetNillableDataDeletedAt sets the "data_deleted_at" field if the given value is not nil.

func (*UserUpdate) SetNillableDiscordID

func (uu *UserUpdate) SetNillableDiscordID(s *string) *UserUpdate

SetNillableDiscordID sets the "discord_id" field if the given value is not nil.

func (*UserUpdate) SetNillableLastSeenAt

func (uu *UserUpdate) SetNillableLastSeenAt(t *time.Time) *UserUpdate

SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.

func (*UserUpdate) SetNillableLastSignInAt

func (uu *UserUpdate) SetNillableLastSignInAt(t *time.Time) *UserUpdate

SetNillableLastSignInAt sets the "last_sign_in_at" field if the given value is not nil.

func (*UserUpdate) SetNillableScheduledForDeletionOn

func (uu *UserUpdate) SetNillableScheduledForDeletionOn(t *time.Time) *UserUpdate

SetNillableScheduledForDeletionOn sets the "scheduled_for_deletion_on" field if the given value is not nil.

func (*UserUpdate) SetNillableUsernameChangedAt

func (uu *UserUpdate) SetNillableUsernameChangedAt(t *time.Time) *UserUpdate

SetNillableUsernameChangedAt sets the "username_changed_at" field if the given value is not nil.

func (*UserUpdate) SetNillableWantsEmail

func (uu *UserUpdate) SetNillableWantsEmail(b *bool) *UserUpdate

SetNillableWantsEmail sets the "wants_email" field if the given value is not nil.

func (*UserUpdate) SetScheduledForDeletionOn

func (uu *UserUpdate) SetScheduledForDeletionOn(t time.Time) *UserUpdate

SetScheduledForDeletionOn sets the "scheduled_for_deletion_on" field.

func (*UserUpdate) SetStripeCustomerID

func (uu *UserUpdate) SetStripeCustomerID(s string) *UserUpdate

SetStripeCustomerID sets the "stripe_customer_id" field.

func (*UserUpdate) SetUpdatedAt

func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdate) SetUsername

func (uu *UserUpdate) SetUsername(s string) *UserUpdate

SetUsername sets the "username" field.

func (*UserUpdate) SetUsernameChangedAt

func (uu *UserUpdate) SetUsernameChangedAt(t time.Time) *UserUpdate

SetUsernameChangedAt sets the "username_changed_at" field.

func (*UserUpdate) SetWantsEmail

func (uu *UserUpdate) SetWantsEmail(b bool) *UserUpdate

SetWantsEmail sets the "wants_email" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddAPITokenIDs

func (uuo *UserUpdateOne) AddAPITokenIDs(ids ...uuid.UUID) *UserUpdateOne

AddAPITokenIDs adds the "api_tokens" edge to the ApiToken entity by IDs.

func (*UserUpdateOne) AddAPITokens

func (uuo *UserUpdateOne) AddAPITokens(a ...*ApiToken) *UserUpdateOne

AddAPITokens adds the "api_tokens" edges to the ApiToken entity.

func (*UserUpdateOne) AddCreditIDs

func (uuo *UserUpdateOne) AddCreditIDs(ids ...uuid.UUID) *UserUpdateOne

AddCreditIDs adds the "credits" edge to the Credit entity by IDs.

func (*UserUpdateOne) AddCredits

func (uuo *UserUpdateOne) AddCredits(c ...*Credit) *UserUpdateOne

AddCredits adds the "credits" edges to the Credit entity.

func (*UserUpdateOne) AddGenerationIDs

func (uuo *UserUpdateOne) AddGenerationIDs(ids ...uuid.UUID) *UserUpdateOne

AddGenerationIDs adds the "generations" edge to the Generation entity by IDs.

func (*UserUpdateOne) AddGenerationOutputLikeIDs

func (uuo *UserUpdateOne) AddGenerationOutputLikeIDs(ids ...uuid.UUID) *UserUpdateOne

AddGenerationOutputLikeIDs adds the "generation_output_likes" edge to the GenerationOutputLike entity by IDs.

func (*UserUpdateOne) AddGenerationOutputLikes

func (uuo *UserUpdateOne) AddGenerationOutputLikes(g ...*GenerationOutputLike) *UserUpdateOne

AddGenerationOutputLikes adds the "generation_output_likes" edges to the GenerationOutputLike entity.

func (*UserUpdateOne) AddGenerations

func (uuo *UserUpdateOne) AddGenerations(g ...*Generation) *UserUpdateOne

AddGenerations adds the "generations" edges to the Generation entity.

func (*UserUpdateOne) AddRoleIDs

func (uuo *UserUpdateOne) AddRoleIDs(ids ...uuid.UUID) *UserUpdateOne

AddRoleIDs adds the "roles" edge to the Role entity by IDs.

func (*UserUpdateOne) AddRoles

func (uuo *UserUpdateOne) AddRoles(r ...*Role) *UserUpdateOne

AddRoles adds the "roles" edges to the Role entity.

func (*UserUpdateOne) AddTipsGiven

func (uuo *UserUpdateOne) AddTipsGiven(t ...*TipLog) *UserUpdateOne

AddTipsGiven adds the "tips_given" edges to the TipLog entity.

func (*UserUpdateOne) AddTipsGivenIDs

func (uuo *UserUpdateOne) AddTipsGivenIDs(ids ...uuid.UUID) *UserUpdateOne

AddTipsGivenIDs adds the "tips_given" edge to the TipLog entity by IDs.

func (*UserUpdateOne) AddTipsReceived

func (uuo *UserUpdateOne) AddTipsReceived(t ...*TipLog) *UserUpdateOne

AddTipsReceived adds the "tips_received" edges to the TipLog entity.

func (*UserUpdateOne) AddTipsReceivedIDs

func (uuo *UserUpdateOne) AddTipsReceivedIDs(ids ...uuid.UUID) *UserUpdateOne

AddTipsReceivedIDs adds the "tips_received" edge to the TipLog entity by IDs.

func (*UserUpdateOne) AddUpscaleIDs

func (uuo *UserUpdateOne) AddUpscaleIDs(ids ...uuid.UUID) *UserUpdateOne

AddUpscaleIDs adds the "upscales" edge to the Upscale entity by IDs.

func (*UserUpdateOne) AddUpscales

func (uuo *UserUpdateOne) AddUpscales(u ...*Upscale) *UserUpdateOne

AddUpscales adds the "upscales" edges to the Upscale entity.

func (*UserUpdateOne) AddVoiceoverIDs

func (uuo *UserUpdateOne) AddVoiceoverIDs(ids ...uuid.UUID) *UserUpdateOne

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*UserUpdateOne) AddVoiceovers

func (uuo *UserUpdateOne) AddVoiceovers(v ...*Voiceover) *UserUpdateOne

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*UserUpdateOne) ClearAPITokens

func (uuo *UserUpdateOne) ClearAPITokens() *UserUpdateOne

ClearAPITokens clears all "api_tokens" edges to the ApiToken entity.

func (*UserUpdateOne) ClearActiveProductID

func (uuo *UserUpdateOne) ClearActiveProductID() *UserUpdateOne

ClearActiveProductID clears the value of the "active_product_id" field.

func (*UserUpdateOne) ClearBannedAt

func (uuo *UserUpdateOne) ClearBannedAt() *UserUpdateOne

ClearBannedAt clears the value of the "banned_at" field.

func (*UserUpdateOne) ClearCredits

func (uuo *UserUpdateOne) ClearCredits() *UserUpdateOne

ClearCredits clears all "credits" edges to the Credit entity.

func (*UserUpdateOne) ClearDataDeletedAt

func (uuo *UserUpdateOne) ClearDataDeletedAt() *UserUpdateOne

ClearDataDeletedAt clears the value of the "data_deleted_at" field.

func (*UserUpdateOne) ClearDiscordID

func (uuo *UserUpdateOne) ClearDiscordID() *UserUpdateOne

ClearDiscordID clears the value of the "discord_id" field.

func (*UserUpdateOne) ClearGenerationOutputLikes

func (uuo *UserUpdateOne) ClearGenerationOutputLikes() *UserUpdateOne

ClearGenerationOutputLikes clears all "generation_output_likes" edges to the GenerationOutputLike entity.

func (*UserUpdateOne) ClearGenerations

func (uuo *UserUpdateOne) ClearGenerations() *UserUpdateOne

ClearGenerations clears all "generations" edges to the Generation entity.

func (*UserUpdateOne) ClearLastSignInAt

func (uuo *UserUpdateOne) ClearLastSignInAt() *UserUpdateOne

ClearLastSignInAt clears the value of the "last_sign_in_at" field.

func (*UserUpdateOne) ClearRoles

func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne

ClearRoles clears all "roles" edges to the Role entity.

func (*UserUpdateOne) ClearScheduledForDeletionOn

func (uuo *UserUpdateOne) ClearScheduledForDeletionOn() *UserUpdateOne

ClearScheduledForDeletionOn clears the value of the "scheduled_for_deletion_on" field.

func (*UserUpdateOne) ClearTipsGiven

func (uuo *UserUpdateOne) ClearTipsGiven() *UserUpdateOne

ClearTipsGiven clears all "tips_given" edges to the TipLog entity.

func (*UserUpdateOne) ClearTipsReceived

func (uuo *UserUpdateOne) ClearTipsReceived() *UserUpdateOne

ClearTipsReceived clears all "tips_received" edges to the TipLog entity.

func (*UserUpdateOne) ClearUpscales

func (uuo *UserUpdateOne) ClearUpscales() *UserUpdateOne

ClearUpscales clears all "upscales" edges to the Upscale entity.

func (*UserUpdateOne) ClearUsernameChangedAt

func (uuo *UserUpdateOne) ClearUsernameChangedAt() *UserUpdateOne

ClearUsernameChangedAt clears the value of the "username_changed_at" field.

func (*UserUpdateOne) ClearVoiceovers

func (uuo *UserUpdateOne) ClearVoiceovers() *UserUpdateOne

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*UserUpdateOne) ClearWantsEmail

func (uuo *UserUpdateOne) ClearWantsEmail() *UserUpdateOne

ClearWantsEmail clears the value of the "wants_email" field.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecContext

func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Modify

func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) QueryContext

func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UserUpdateOne) RemoveAPITokenIDs

func (uuo *UserUpdateOne) RemoveAPITokenIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveAPITokenIDs removes the "api_tokens" edge to ApiToken entities by IDs.

func (*UserUpdateOne) RemoveAPITokens

func (uuo *UserUpdateOne) RemoveAPITokens(a ...*ApiToken) *UserUpdateOne

RemoveAPITokens removes "api_tokens" edges to ApiToken entities.

func (*UserUpdateOne) RemoveCreditIDs

func (uuo *UserUpdateOne) RemoveCreditIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveCreditIDs removes the "credits" edge to Credit entities by IDs.

func (*UserUpdateOne) RemoveCredits

func (uuo *UserUpdateOne) RemoveCredits(c ...*Credit) *UserUpdateOne

RemoveCredits removes "credits" edges to Credit entities.

func (*UserUpdateOne) RemoveGenerationIDs

func (uuo *UserUpdateOne) RemoveGenerationIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveGenerationIDs removes the "generations" edge to Generation entities by IDs.

func (*UserUpdateOne) RemoveGenerationOutputLikeIDs

func (uuo *UserUpdateOne) RemoveGenerationOutputLikeIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveGenerationOutputLikeIDs removes the "generation_output_likes" edge to GenerationOutputLike entities by IDs.

func (*UserUpdateOne) RemoveGenerationOutputLikes

func (uuo *UserUpdateOne) RemoveGenerationOutputLikes(g ...*GenerationOutputLike) *UserUpdateOne

RemoveGenerationOutputLikes removes "generation_output_likes" edges to GenerationOutputLike entities.

func (*UserUpdateOne) RemoveGenerations

func (uuo *UserUpdateOne) RemoveGenerations(g ...*Generation) *UserUpdateOne

RemoveGenerations removes "generations" edges to Generation entities.

func (*UserUpdateOne) RemoveRoleIDs

func (uuo *UserUpdateOne) RemoveRoleIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveRoleIDs removes the "roles" edge to Role entities by IDs.

func (*UserUpdateOne) RemoveRoles

func (uuo *UserUpdateOne) RemoveRoles(r ...*Role) *UserUpdateOne

RemoveRoles removes "roles" edges to Role entities.

func (*UserUpdateOne) RemoveTipsGiven

func (uuo *UserUpdateOne) RemoveTipsGiven(t ...*TipLog) *UserUpdateOne

RemoveTipsGiven removes "tips_given" edges to TipLog entities.

func (*UserUpdateOne) RemoveTipsGivenIDs

func (uuo *UserUpdateOne) RemoveTipsGivenIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveTipsGivenIDs removes the "tips_given" edge to TipLog entities by IDs.

func (*UserUpdateOne) RemoveTipsReceived

func (uuo *UserUpdateOne) RemoveTipsReceived(t ...*TipLog) *UserUpdateOne

RemoveTipsReceived removes "tips_received" edges to TipLog entities.

func (*UserUpdateOne) RemoveTipsReceivedIDs

func (uuo *UserUpdateOne) RemoveTipsReceivedIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveTipsReceivedIDs removes the "tips_received" edge to TipLog entities by IDs.

func (*UserUpdateOne) RemoveUpscaleIDs

func (uuo *UserUpdateOne) RemoveUpscaleIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveUpscaleIDs removes the "upscales" edge to Upscale entities by IDs.

func (*UserUpdateOne) RemoveUpscales

func (uuo *UserUpdateOne) RemoveUpscales(u ...*Upscale) *UserUpdateOne

RemoveUpscales removes "upscales" edges to Upscale entities.

func (*UserUpdateOne) RemoveVoiceoverIDs

func (uuo *UserUpdateOne) RemoveVoiceoverIDs(ids ...uuid.UUID) *UserUpdateOne

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*UserUpdateOne) RemoveVoiceovers

func (uuo *UserUpdateOne) RemoveVoiceovers(v ...*Voiceover) *UserUpdateOne

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetActiveProductID

func (uuo *UserUpdateOne) SetActiveProductID(s string) *UserUpdateOne

SetActiveProductID sets the "active_product_id" field.

func (*UserUpdateOne) SetBannedAt

func (uuo *UserUpdateOne) SetBannedAt(t time.Time) *UserUpdateOne

SetBannedAt sets the "banned_at" field.

func (*UserUpdateOne) SetDataDeletedAt

func (uuo *UserUpdateOne) SetDataDeletedAt(t time.Time) *UserUpdateOne

SetDataDeletedAt sets the "data_deleted_at" field.

func (*UserUpdateOne) SetDiscordID

func (uuo *UserUpdateOne) SetDiscordID(s string) *UserUpdateOne

SetDiscordID sets the "discord_id" field.

func (*UserUpdateOne) SetEmail

func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetLastSeenAt

func (uuo *UserUpdateOne) SetLastSeenAt(t time.Time) *UserUpdateOne

SetLastSeenAt sets the "last_seen_at" field.

func (*UserUpdateOne) SetLastSignInAt

func (uuo *UserUpdateOne) SetLastSignInAt(t time.Time) *UserUpdateOne

SetLastSignInAt sets the "last_sign_in_at" field.

func (*UserUpdateOne) SetNillableActiveProductID

func (uuo *UserUpdateOne) SetNillableActiveProductID(s *string) *UserUpdateOne

SetNillableActiveProductID sets the "active_product_id" field if the given value is not nil.

func (*UserUpdateOne) SetNillableBannedAt

func (uuo *UserUpdateOne) SetNillableBannedAt(t *time.Time) *UserUpdateOne

SetNillableBannedAt sets the "banned_at" field if the given value is not nil.

func (*UserUpdateOne) SetNillableDataDeletedAt

func (uuo *UserUpdateOne) SetNillableDataDeletedAt(t *time.Time) *UserUpdateOne

SetNillableDataDeletedAt sets the "data_deleted_at" field if the given value is not nil.

func (*UserUpdateOne) SetNillableDiscordID

func (uuo *UserUpdateOne) SetNillableDiscordID(s *string) *UserUpdateOne

SetNillableDiscordID sets the "discord_id" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLastSeenAt

func (uuo *UserUpdateOne) SetNillableLastSeenAt(t *time.Time) *UserUpdateOne

SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLastSignInAt

func (uuo *UserUpdateOne) SetNillableLastSignInAt(t *time.Time) *UserUpdateOne

SetNillableLastSignInAt sets the "last_sign_in_at" field if the given value is not nil.

func (*UserUpdateOne) SetNillableScheduledForDeletionOn

func (uuo *UserUpdateOne) SetNillableScheduledForDeletionOn(t *time.Time) *UserUpdateOne

SetNillableScheduledForDeletionOn sets the "scheduled_for_deletion_on" field if the given value is not nil.

func (*UserUpdateOne) SetNillableUsernameChangedAt

func (uuo *UserUpdateOne) SetNillableUsernameChangedAt(t *time.Time) *UserUpdateOne

SetNillableUsernameChangedAt sets the "username_changed_at" field if the given value is not nil.

func (*UserUpdateOne) SetNillableWantsEmail

func (uuo *UserUpdateOne) SetNillableWantsEmail(b *bool) *UserUpdateOne

SetNillableWantsEmail sets the "wants_email" field if the given value is not nil.

func (*UserUpdateOne) SetScheduledForDeletionOn

func (uuo *UserUpdateOne) SetScheduledForDeletionOn(t time.Time) *UserUpdateOne

SetScheduledForDeletionOn sets the "scheduled_for_deletion_on" field.

func (*UserUpdateOne) SetStripeCustomerID

func (uuo *UserUpdateOne) SetStripeCustomerID(s string) *UserUpdateOne

SetStripeCustomerID sets the "stripe_customer_id" field.

func (*UserUpdateOne) SetUpdatedAt

func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdateOne) SetUsername

func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne

SetUsername sets the "username" field.

func (*UserUpdateOne) SetUsernameChangedAt

func (uuo *UserUpdateOne) SetUsernameChangedAt(t time.Time) *UserUpdateOne

SetUsernameChangedAt sets the "username_changed_at" field.

func (*UserUpdateOne) SetWantsEmail

func (uuo *UserUpdateOne) SetWantsEmail(b bool) *UserUpdateOne

SetWantsEmail sets the "wants_email" field.

type UserUpsert

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) ClearActiveProductID

func (u *UserUpsert) ClearActiveProductID() *UserUpsert

ClearActiveProductID clears the value of the "active_product_id" field.

func (*UserUpsert) ClearBannedAt

func (u *UserUpsert) ClearBannedAt() *UserUpsert

ClearBannedAt clears the value of the "banned_at" field.

func (*UserUpsert) ClearDataDeletedAt

func (u *UserUpsert) ClearDataDeletedAt() *UserUpsert

ClearDataDeletedAt clears the value of the "data_deleted_at" field.

func (*UserUpsert) ClearDiscordID

func (u *UserUpsert) ClearDiscordID() *UserUpsert

ClearDiscordID clears the value of the "discord_id" field.

func (*UserUpsert) ClearLastSignInAt

func (u *UserUpsert) ClearLastSignInAt() *UserUpsert

ClearLastSignInAt clears the value of the "last_sign_in_at" field.

func (*UserUpsert) ClearScheduledForDeletionOn

func (u *UserUpsert) ClearScheduledForDeletionOn() *UserUpsert

ClearScheduledForDeletionOn clears the value of the "scheduled_for_deletion_on" field.

func (*UserUpsert) ClearUsernameChangedAt

func (u *UserUpsert) ClearUsernameChangedAt() *UserUpsert

ClearUsernameChangedAt clears the value of the "username_changed_at" field.

func (*UserUpsert) ClearWantsEmail

func (u *UserUpsert) ClearWantsEmail() *UserUpsert

ClearWantsEmail clears the value of the "wants_email" field.

func (*UserUpsert) SetActiveProductID

func (u *UserUpsert) SetActiveProductID(v string) *UserUpsert

SetActiveProductID sets the "active_product_id" field.

func (*UserUpsert) SetBannedAt

func (u *UserUpsert) SetBannedAt(v time.Time) *UserUpsert

SetBannedAt sets the "banned_at" field.

func (*UserUpsert) SetDataDeletedAt

func (u *UserUpsert) SetDataDeletedAt(v time.Time) *UserUpsert

SetDataDeletedAt sets the "data_deleted_at" field.

func (*UserUpsert) SetDiscordID

func (u *UserUpsert) SetDiscordID(v string) *UserUpsert

SetDiscordID sets the "discord_id" field.

func (*UserUpsert) SetEmail

func (u *UserUpsert) SetEmail(v string) *UserUpsert

SetEmail sets the "email" field.

func (*UserUpsert) SetLastSeenAt

func (u *UserUpsert) SetLastSeenAt(v time.Time) *UserUpsert

SetLastSeenAt sets the "last_seen_at" field.

func (*UserUpsert) SetLastSignInAt

func (u *UserUpsert) SetLastSignInAt(v time.Time) *UserUpsert

SetLastSignInAt sets the "last_sign_in_at" field.

func (*UserUpsert) SetScheduledForDeletionOn

func (u *UserUpsert) SetScheduledForDeletionOn(v time.Time) *UserUpsert

SetScheduledForDeletionOn sets the "scheduled_for_deletion_on" field.

func (*UserUpsert) SetStripeCustomerID

func (u *UserUpsert) SetStripeCustomerID(v string) *UserUpsert

SetStripeCustomerID sets the "stripe_customer_id" field.

func (*UserUpsert) SetUpdatedAt

func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsert) SetUsername

func (u *UserUpsert) SetUsername(v string) *UserUpsert

SetUsername sets the "username" field.

func (*UserUpsert) SetUsernameChangedAt

func (u *UserUpsert) SetUsernameChangedAt(v time.Time) *UserUpsert

SetUsernameChangedAt sets the "username_changed_at" field.

func (*UserUpsert) SetWantsEmail

func (u *UserUpsert) SetWantsEmail(v bool) *UserUpsert

SetWantsEmail sets the "wants_email" field.

func (*UserUpsert) UpdateActiveProductID

func (u *UserUpsert) UpdateActiveProductID() *UserUpsert

UpdateActiveProductID sets the "active_product_id" field to the value that was provided on create.

func (*UserUpsert) UpdateBannedAt

func (u *UserUpsert) UpdateBannedAt() *UserUpsert

UpdateBannedAt sets the "banned_at" field to the value that was provided on create.

func (*UserUpsert) UpdateDataDeletedAt

func (u *UserUpsert) UpdateDataDeletedAt() *UserUpsert

UpdateDataDeletedAt sets the "data_deleted_at" field to the value that was provided on create.

func (*UserUpsert) UpdateDiscordID

func (u *UserUpsert) UpdateDiscordID() *UserUpsert

UpdateDiscordID sets the "discord_id" field to the value that was provided on create.

func (*UserUpsert) UpdateEmail

func (u *UserUpsert) UpdateEmail() *UserUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsert) UpdateLastSeenAt

func (u *UserUpsert) UpdateLastSeenAt() *UserUpsert

UpdateLastSeenAt sets the "last_seen_at" field to the value that was provided on create.

func (*UserUpsert) UpdateLastSignInAt

func (u *UserUpsert) UpdateLastSignInAt() *UserUpsert

UpdateLastSignInAt sets the "last_sign_in_at" field to the value that was provided on create.

func (*UserUpsert) UpdateScheduledForDeletionOn

func (u *UserUpsert) UpdateScheduledForDeletionOn() *UserUpsert

UpdateScheduledForDeletionOn sets the "scheduled_for_deletion_on" field to the value that was provided on create.

func (*UserUpsert) UpdateStripeCustomerID

func (u *UserUpsert) UpdateStripeCustomerID() *UserUpsert

UpdateStripeCustomerID sets the "stripe_customer_id" field to the value that was provided on create.

func (*UserUpsert) UpdateUpdatedAt

func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserUpsert) UpdateUsername

func (u *UserUpsert) UpdateUsername() *UserUpsert

UpdateUsername sets the "username" field to the value that was provided on create.

func (*UserUpsert) UpdateUsernameChangedAt

func (u *UserUpsert) UpdateUsernameChangedAt() *UserUpsert

UpdateUsernameChangedAt sets the "username_changed_at" field to the value that was provided on create.

func (*UserUpsert) UpdateWantsEmail

func (u *UserUpsert) UpdateWantsEmail() *UserUpsert

UpdateWantsEmail sets the "wants_email" field to the value that was provided on create.

type UserUpsertBulk

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) ClearActiveProductID

func (u *UserUpsertBulk) ClearActiveProductID() *UserUpsertBulk

ClearActiveProductID clears the value of the "active_product_id" field.

func (*UserUpsertBulk) ClearBannedAt

func (u *UserUpsertBulk) ClearBannedAt() *UserUpsertBulk

ClearBannedAt clears the value of the "banned_at" field.

func (*UserUpsertBulk) ClearDataDeletedAt

func (u *UserUpsertBulk) ClearDataDeletedAt() *UserUpsertBulk

ClearDataDeletedAt clears the value of the "data_deleted_at" field.

func (*UserUpsertBulk) ClearDiscordID

func (u *UserUpsertBulk) ClearDiscordID() *UserUpsertBulk

ClearDiscordID clears the value of the "discord_id" field.

func (*UserUpsertBulk) ClearLastSignInAt

func (u *UserUpsertBulk) ClearLastSignInAt() *UserUpsertBulk

ClearLastSignInAt clears the value of the "last_sign_in_at" field.

func (*UserUpsertBulk) ClearScheduledForDeletionOn

func (u *UserUpsertBulk) ClearScheduledForDeletionOn() *UserUpsertBulk

ClearScheduledForDeletionOn clears the value of the "scheduled_for_deletion_on" field.

func (*UserUpsertBulk) ClearUsernameChangedAt

func (u *UserUpsertBulk) ClearUsernameChangedAt() *UserUpsertBulk

ClearUsernameChangedAt clears the value of the "username_changed_at" field.

func (*UserUpsertBulk) ClearWantsEmail

func (u *UserUpsertBulk) ClearWantsEmail() *UserUpsertBulk

ClearWantsEmail clears the value of the "wants_email" field.

func (*UserUpsertBulk) DoNothing

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetActiveProductID

func (u *UserUpsertBulk) SetActiveProductID(v string) *UserUpsertBulk

SetActiveProductID sets the "active_product_id" field.

func (*UserUpsertBulk) SetBannedAt

func (u *UserUpsertBulk) SetBannedAt(v time.Time) *UserUpsertBulk

SetBannedAt sets the "banned_at" field.

func (*UserUpsertBulk) SetDataDeletedAt

func (u *UserUpsertBulk) SetDataDeletedAt(v time.Time) *UserUpsertBulk

SetDataDeletedAt sets the "data_deleted_at" field.

func (*UserUpsertBulk) SetDiscordID

func (u *UserUpsertBulk) SetDiscordID(v string) *UserUpsertBulk

SetDiscordID sets the "discord_id" field.

func (*UserUpsertBulk) SetEmail

func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk

SetEmail sets the "email" field.

func (*UserUpsertBulk) SetLastSeenAt

func (u *UserUpsertBulk) SetLastSeenAt(v time.Time) *UserUpsertBulk

SetLastSeenAt sets the "last_seen_at" field.

func (*UserUpsertBulk) SetLastSignInAt

func (u *UserUpsertBulk) SetLastSignInAt(v time.Time) *UserUpsertBulk

SetLastSignInAt sets the "last_sign_in_at" field.

func (*UserUpsertBulk) SetScheduledForDeletionOn

func (u *UserUpsertBulk) SetScheduledForDeletionOn(v time.Time) *UserUpsertBulk

SetScheduledForDeletionOn sets the "scheduled_for_deletion_on" field.

func (*UserUpsertBulk) SetStripeCustomerID

func (u *UserUpsertBulk) SetStripeCustomerID(v string) *UserUpsertBulk

SetStripeCustomerID sets the "stripe_customer_id" field.

func (*UserUpsertBulk) SetUpdatedAt

func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsertBulk) SetUsername

func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk

SetUsername sets the "username" field.

func (*UserUpsertBulk) SetUsernameChangedAt

func (u *UserUpsertBulk) SetUsernameChangedAt(v time.Time) *UserUpsertBulk

SetUsernameChangedAt sets the "username_changed_at" field.

func (*UserUpsertBulk) SetWantsEmail

func (u *UserUpsertBulk) SetWantsEmail(v bool) *UserUpsertBulk

SetWantsEmail sets the "wants_email" field.

func (*UserUpsertBulk) Update

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateActiveProductID

func (u *UserUpsertBulk) UpdateActiveProductID() *UserUpsertBulk

UpdateActiveProductID sets the "active_product_id" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateBannedAt

func (u *UserUpsertBulk) UpdateBannedAt() *UserUpsertBulk

UpdateBannedAt sets the "banned_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateDataDeletedAt

func (u *UserUpsertBulk) UpdateDataDeletedAt() *UserUpsertBulk

UpdateDataDeletedAt sets the "data_deleted_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateDiscordID

func (u *UserUpsertBulk) UpdateDiscordID() *UserUpsertBulk

UpdateDiscordID sets the "discord_id" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateEmail

func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateLastSeenAt

func (u *UserUpsertBulk) UpdateLastSeenAt() *UserUpsertBulk

UpdateLastSeenAt sets the "last_seen_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateLastSignInAt

func (u *UserUpsertBulk) UpdateLastSignInAt() *UserUpsertBulk

UpdateLastSignInAt sets the "last_sign_in_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertBulk) UpdateScheduledForDeletionOn

func (u *UserUpsertBulk) UpdateScheduledForDeletionOn() *UserUpsertBulk

UpdateScheduledForDeletionOn sets the "scheduled_for_deletion_on" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateStripeCustomerID

func (u *UserUpsertBulk) UpdateStripeCustomerID() *UserUpsertBulk

UpdateStripeCustomerID sets the "stripe_customer_id" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUpdatedAt

func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUsername

func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk

UpdateUsername sets the "username" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUsernameChangedAt

func (u *UserUpsertBulk) UpdateUsernameChangedAt() *UserUpsertBulk

UpdateUsernameChangedAt sets the "username_changed_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateWantsEmail

func (u *UserUpsertBulk) UpdateWantsEmail() *UserUpsertBulk

UpdateWantsEmail sets the "wants_email" field to the value that was provided on create.

type UserUpsertOne

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) ClearActiveProductID

func (u *UserUpsertOne) ClearActiveProductID() *UserUpsertOne

ClearActiveProductID clears the value of the "active_product_id" field.

func (*UserUpsertOne) ClearBannedAt

func (u *UserUpsertOne) ClearBannedAt() *UserUpsertOne

ClearBannedAt clears the value of the "banned_at" field.

func (*UserUpsertOne) ClearDataDeletedAt

func (u *UserUpsertOne) ClearDataDeletedAt() *UserUpsertOne

ClearDataDeletedAt clears the value of the "data_deleted_at" field.

func (*UserUpsertOne) ClearDiscordID

func (u *UserUpsertOne) ClearDiscordID() *UserUpsertOne

ClearDiscordID clears the value of the "discord_id" field.

func (*UserUpsertOne) ClearLastSignInAt

func (u *UserUpsertOne) ClearLastSignInAt() *UserUpsertOne

ClearLastSignInAt clears the value of the "last_sign_in_at" field.

func (*UserUpsertOne) ClearScheduledForDeletionOn

func (u *UserUpsertOne) ClearScheduledForDeletionOn() *UserUpsertOne

ClearScheduledForDeletionOn clears the value of the "scheduled_for_deletion_on" field.

func (*UserUpsertOne) ClearUsernameChangedAt

func (u *UserUpsertOne) ClearUsernameChangedAt() *UserUpsertOne

ClearUsernameChangedAt clears the value of the "username_changed_at" field.

func (*UserUpsertOne) ClearWantsEmail

func (u *UserUpsertOne) ClearWantsEmail() *UserUpsertOne

ClearWantsEmail clears the value of the "wants_email" field.

func (*UserUpsertOne) DoNothing

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID

func (u *UserUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX

func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetActiveProductID

func (u *UserUpsertOne) SetActiveProductID(v string) *UserUpsertOne

SetActiveProductID sets the "active_product_id" field.

func (*UserUpsertOne) SetBannedAt

func (u *UserUpsertOne) SetBannedAt(v time.Time) *UserUpsertOne

SetBannedAt sets the "banned_at" field.

func (*UserUpsertOne) SetDataDeletedAt

func (u *UserUpsertOne) SetDataDeletedAt(v time.Time) *UserUpsertOne

SetDataDeletedAt sets the "data_deleted_at" field.

func (*UserUpsertOne) SetDiscordID

func (u *UserUpsertOne) SetDiscordID(v string) *UserUpsertOne

SetDiscordID sets the "discord_id" field.

func (*UserUpsertOne) SetEmail

func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne

SetEmail sets the "email" field.

func (*UserUpsertOne) SetLastSeenAt

func (u *UserUpsertOne) SetLastSeenAt(v time.Time) *UserUpsertOne

SetLastSeenAt sets the "last_seen_at" field.

func (*UserUpsertOne) SetLastSignInAt

func (u *UserUpsertOne) SetLastSignInAt(v time.Time) *UserUpsertOne

SetLastSignInAt sets the "last_sign_in_at" field.

func (*UserUpsertOne) SetScheduledForDeletionOn

func (u *UserUpsertOne) SetScheduledForDeletionOn(v time.Time) *UserUpsertOne

SetScheduledForDeletionOn sets the "scheduled_for_deletion_on" field.

func (*UserUpsertOne) SetStripeCustomerID

func (u *UserUpsertOne) SetStripeCustomerID(v string) *UserUpsertOne

SetStripeCustomerID sets the "stripe_customer_id" field.

func (*UserUpsertOne) SetUpdatedAt

func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsertOne) SetUsername

func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne

SetUsername sets the "username" field.

func (*UserUpsertOne) SetUsernameChangedAt

func (u *UserUpsertOne) SetUsernameChangedAt(v time.Time) *UserUpsertOne

SetUsernameChangedAt sets the "username_changed_at" field.

func (*UserUpsertOne) SetWantsEmail

func (u *UserUpsertOne) SetWantsEmail(v bool) *UserUpsertOne

SetWantsEmail sets the "wants_email" field.

func (*UserUpsertOne) Update

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateActiveProductID

func (u *UserUpsertOne) UpdateActiveProductID() *UserUpsertOne

UpdateActiveProductID sets the "active_product_id" field to the value that was provided on create.

func (*UserUpsertOne) UpdateBannedAt

func (u *UserUpsertOne) UpdateBannedAt() *UserUpsertOne

UpdateBannedAt sets the "banned_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateDataDeletedAt

func (u *UserUpsertOne) UpdateDataDeletedAt() *UserUpsertOne

UpdateDataDeletedAt sets the "data_deleted_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateDiscordID

func (u *UserUpsertOne) UpdateDiscordID() *UserUpsertOne

UpdateDiscordID sets the "discord_id" field to the value that was provided on create.

func (*UserUpsertOne) UpdateEmail

func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertOne) UpdateLastSeenAt

func (u *UserUpsertOne) UpdateLastSeenAt() *UserUpsertOne

UpdateLastSeenAt sets the "last_seen_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateLastSignInAt

func (u *UserUpsertOne) UpdateLastSignInAt() *UserUpsertOne

UpdateLastSignInAt sets the "last_sign_in_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertOne) UpdateScheduledForDeletionOn

func (u *UserUpsertOne) UpdateScheduledForDeletionOn() *UserUpsertOne

UpdateScheduledForDeletionOn sets the "scheduled_for_deletion_on" field to the value that was provided on create.

func (*UserUpsertOne) UpdateStripeCustomerID

func (u *UserUpsertOne) UpdateStripeCustomerID() *UserUpsertOne

UpdateStripeCustomerID sets the "stripe_customer_id" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUpdatedAt

func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUsername

func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne

UpdateUsername sets the "username" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUsernameChangedAt

func (u *UserUpsertOne) UpdateUsernameChangedAt() *UserUpsertOne

UpdateUsernameChangedAt sets the "username_changed_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateWantsEmail

func (u *UserUpsertOne) UpdateWantsEmail() *UserUpsertOne

UpdateWantsEmail sets the "wants_email" field to the value that was provided on create.

type UsernameBlacklist

type UsernameBlacklist struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

UsernameBlacklist is the model entity for the UsernameBlacklist schema.

func (*UsernameBlacklist) ExecContext

func (c *UsernameBlacklist) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UsernameBlacklist) QueryContext

func (c *UsernameBlacklist) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UsernameBlacklist) String

func (ub *UsernameBlacklist) String() string

String implements the fmt.Stringer.

func (*UsernameBlacklist) Unwrap

func (ub *UsernameBlacklist) Unwrap() *UsernameBlacklist

Unwrap unwraps the UsernameBlacklist 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 (*UsernameBlacklist) Update

Update returns a builder for updating this UsernameBlacklist. Note that you need to call UsernameBlacklist.Unwrap() before calling this method if this UsernameBlacklist was returned from a transaction, and the transaction was committed or rolled back.

type UsernameBlacklistClient

type UsernameBlacklistClient struct {
	// contains filtered or unexported fields
}

UsernameBlacklistClient is a client for the UsernameBlacklist schema.

func NewUsernameBlacklistClient

func NewUsernameBlacklistClient(c config) *UsernameBlacklistClient

NewUsernameBlacklistClient returns a client for the UsernameBlacklist from the given config.

func (*UsernameBlacklistClient) Create

Create returns a builder for creating a UsernameBlacklist entity.

func (*UsernameBlacklistClient) CreateBulk

CreateBulk returns a builder for creating a bulk of UsernameBlacklist entities.

func (*UsernameBlacklistClient) Delete

Delete returns a delete builder for UsernameBlacklist.

func (*UsernameBlacklistClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UsernameBlacklistClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UsernameBlacklistClient) ExecContext

func (c *UsernameBlacklistClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UsernameBlacklistClient) Get

Get returns a UsernameBlacklist entity by its id.

func (*UsernameBlacklistClient) GetX

GetX is like Get, but panics if an error occurs.

func (*UsernameBlacklistClient) Hooks

func (c *UsernameBlacklistClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UsernameBlacklistClient) Intercept

func (c *UsernameBlacklistClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usernameblacklist.Intercept(f(g(h())))`.

func (*UsernameBlacklistClient) Interceptors

func (c *UsernameBlacklistClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UsernameBlacklistClient) Query

Query returns a query builder for UsernameBlacklist.

func (*UsernameBlacklistClient) QueryContext

func (c *UsernameBlacklistClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UsernameBlacklistClient) Update

Update returns an update builder for UsernameBlacklist.

func (*UsernameBlacklistClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*UsernameBlacklistClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*UsernameBlacklistClient) Use

func (c *UsernameBlacklistClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usernameblacklist.Hooks(f(g(h())))`.

type UsernameBlacklistCreate

type UsernameBlacklistCreate struct {
	// contains filtered or unexported fields
}

UsernameBlacklistCreate is the builder for creating a UsernameBlacklist entity.

func (*UsernameBlacklistCreate) Exec

Exec executes the query.

func (*UsernameBlacklistCreate) ExecContext

func (c *UsernameBlacklistCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UsernameBlacklistCreate) ExecX

func (ubc *UsernameBlacklistCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsernameBlacklistCreate) Mutation

Mutation returns the UsernameBlacklistMutation object of the builder.

func (*UsernameBlacklistCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UsernameBlacklist.Create().
	SetUsername(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UsernameBlacklistUpsert) {
		SetUsername(v+v).
	}).
	Exec(ctx)

func (*UsernameBlacklistCreate) OnConflictColumns

func (ubc *UsernameBlacklistCreate) OnConflictColumns(columns ...string) *UsernameBlacklistUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UsernameBlacklist.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UsernameBlacklistCreate) QueryContext

func (c *UsernameBlacklistCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UsernameBlacklistCreate) Save

Save creates the UsernameBlacklist in the database.

func (*UsernameBlacklistCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*UsernameBlacklistCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*UsernameBlacklistCreate) SetID

SetID sets the "id" field.

func (*UsernameBlacklistCreate) SetNillableCreatedAt

func (ubc *UsernameBlacklistCreate) SetNillableCreatedAt(t *time.Time) *UsernameBlacklistCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UsernameBlacklistCreate) SetNillableID

func (ubc *UsernameBlacklistCreate) SetNillableID(u *uuid.UUID) *UsernameBlacklistCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*UsernameBlacklistCreate) SetNillableUpdatedAt

func (ubc *UsernameBlacklistCreate) SetNillableUpdatedAt(t *time.Time) *UsernameBlacklistCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UsernameBlacklistCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UsernameBlacklistCreate) SetUsername

SetUsername sets the "username" field.

type UsernameBlacklistCreateBulk

type UsernameBlacklistCreateBulk struct {
	// contains filtered or unexported fields
}

UsernameBlacklistCreateBulk is the builder for creating many UsernameBlacklist entities in bulk.

func (*UsernameBlacklistCreateBulk) Exec

Exec executes the query.

func (*UsernameBlacklistCreateBulk) ExecContext

func (c *UsernameBlacklistCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UsernameBlacklistCreateBulk) ExecX

func (ubcb *UsernameBlacklistCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsernameBlacklistCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.UsernameBlacklist.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UsernameBlacklistUpsert) {
		SetUsername(v+v).
	}).
	Exec(ctx)

func (*UsernameBlacklistCreateBulk) OnConflictColumns

func (ubcb *UsernameBlacklistCreateBulk) OnConflictColumns(columns ...string) *UsernameBlacklistUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.UsernameBlacklist.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UsernameBlacklistCreateBulk) QueryContext

func (c *UsernameBlacklistCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UsernameBlacklistCreateBulk) Save

Save creates the UsernameBlacklist entities in the database.

func (*UsernameBlacklistCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type UsernameBlacklistDelete

type UsernameBlacklistDelete struct {
	// contains filtered or unexported fields
}

UsernameBlacklistDelete is the builder for deleting a UsernameBlacklist entity.

func (*UsernameBlacklistDelete) Exec

func (ubd *UsernameBlacklistDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UsernameBlacklistDelete) ExecContext

func (c *UsernameBlacklistDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UsernameBlacklistDelete) ExecX

func (ubd *UsernameBlacklistDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UsernameBlacklistDelete) QueryContext

func (c *UsernameBlacklistDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UsernameBlacklistDelete) Where

Where appends a list predicates to the UsernameBlacklistDelete builder.

type UsernameBlacklistDeleteOne

type UsernameBlacklistDeleteOne struct {
	// contains filtered or unexported fields
}

UsernameBlacklistDeleteOne is the builder for deleting a single UsernameBlacklist entity.

func (*UsernameBlacklistDeleteOne) Exec

Exec executes the deletion query.

func (*UsernameBlacklistDeleteOne) ExecX

func (ubdo *UsernameBlacklistDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type UsernameBlacklistGroupBy

type UsernameBlacklistGroupBy struct {
	// contains filtered or unexported fields
}

UsernameBlacklistGroupBy is the group-by builder for UsernameBlacklist entities.

func (*UsernameBlacklistGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*UsernameBlacklistGroupBy) Bool

func (s *UsernameBlacklistGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistGroupBy) BoolX

func (s *UsernameBlacklistGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UsernameBlacklistGroupBy) Bools

func (s *UsernameBlacklistGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistGroupBy) BoolsX

func (s *UsernameBlacklistGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UsernameBlacklistGroupBy) Float64

func (s *UsernameBlacklistGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistGroupBy) Float64X

func (s *UsernameBlacklistGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UsernameBlacklistGroupBy) Float64s

func (s *UsernameBlacklistGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistGroupBy) Float64sX

func (s *UsernameBlacklistGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UsernameBlacklistGroupBy) Int

func (s *UsernameBlacklistGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistGroupBy) IntX

func (s *UsernameBlacklistGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UsernameBlacklistGroupBy) Ints

func (s *UsernameBlacklistGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistGroupBy) IntsX

func (s *UsernameBlacklistGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UsernameBlacklistGroupBy) Scan

func (ubgb *UsernameBlacklistGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UsernameBlacklistGroupBy) ScanX

func (s *UsernameBlacklistGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UsernameBlacklistGroupBy) String

func (s *UsernameBlacklistGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistGroupBy) StringX

func (s *UsernameBlacklistGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UsernameBlacklistGroupBy) Strings

func (s *UsernameBlacklistGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistGroupBy) StringsX

func (s *UsernameBlacklistGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UsernameBlacklistMutation

type UsernameBlacklistMutation struct {
	// contains filtered or unexported fields
}

UsernameBlacklistMutation represents an operation that mutates the UsernameBlacklist nodes in the graph.

func (*UsernameBlacklistMutation) AddField

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) AddedEdges

func (m *UsernameBlacklistMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UsernameBlacklistMutation) AddedField

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) AddedFields

func (m *UsernameBlacklistMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UsernameBlacklistMutation) AddedIDs

func (m *UsernameBlacklistMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UsernameBlacklistMutation) ClearEdge

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) ClearField

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) ClearedEdges

func (m *UsernameBlacklistMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UsernameBlacklistMutation) ClearedFields

func (m *UsernameBlacklistMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UsernameBlacklistMutation) Client

func (m UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) CreatedAt

func (m *UsernameBlacklistMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UsernameBlacklistMutation) EdgeCleared

func (m *UsernameBlacklistMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UsernameBlacklistMutation) ExecContext

func (c *UsernameBlacklistMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UsernameBlacklistMutation) Field

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) FieldCleared

func (m *UsernameBlacklistMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UsernameBlacklistMutation) Fields

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) ID

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) OldCreatedAt

func (m *UsernameBlacklistMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the UsernameBlacklist entity. If the UsernameBlacklist 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 (*UsernameBlacklistMutation) OldField

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) OldUpdatedAt

func (m *UsernameBlacklistMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the UsernameBlacklist entity. If the UsernameBlacklist 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 (*UsernameBlacklistMutation) OldUsername

func (m *UsernameBlacklistMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the UsernameBlacklist entity. If the UsernameBlacklist 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 (*UsernameBlacklistMutation) Op

func (m *UsernameBlacklistMutation) Op() Op

Op returns the operation name.

func (*UsernameBlacklistMutation) QueryContext

func (c *UsernameBlacklistMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UsernameBlacklistMutation) RemovedEdges

func (m *UsernameBlacklistMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UsernameBlacklistMutation) RemovedIDs

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) ResetCreatedAt

func (m *UsernameBlacklistMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UsernameBlacklistMutation) ResetEdge

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) ResetField

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) ResetUpdatedAt

func (m *UsernameBlacklistMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UsernameBlacklistMutation) ResetUsername

func (m *UsernameBlacklistMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*UsernameBlacklistMutation) SetCreatedAt

func (m *UsernameBlacklistMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UsernameBlacklistMutation) SetField

func (m *UsernameBlacklistMutation) 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 (*UsernameBlacklistMutation) SetID

func (m *UsernameBlacklistMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of UsernameBlacklist entities.

func (*UsernameBlacklistMutation) SetOp

func (m *UsernameBlacklistMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UsernameBlacklistMutation) SetUpdatedAt

func (m *UsernameBlacklistMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UsernameBlacklistMutation) SetUsername

func (m *UsernameBlacklistMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (UsernameBlacklistMutation) Tx

func (m UsernameBlacklistMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UsernameBlacklistMutation) Type

Type returns the node type of this mutation (UsernameBlacklist).

func (*UsernameBlacklistMutation) UpdatedAt

func (m *UsernameBlacklistMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UsernameBlacklistMutation) Username

func (m *UsernameBlacklistMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*UsernameBlacklistMutation) Where

Where appends a list predicates to the UsernameBlacklistMutation builder.

func (*UsernameBlacklistMutation) WhereP

func (m *UsernameBlacklistMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UsernameBlacklistMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UsernameBlacklistQuery

type UsernameBlacklistQuery struct {
	// contains filtered or unexported fields
}

UsernameBlacklistQuery is the builder for querying UsernameBlacklist entities.

func (*UsernameBlacklistQuery) Aggregate

Aggregate returns a UsernameBlacklistSelect configured with the given aggregations.

func (*UsernameBlacklistQuery) All

All executes the query and returns a list of UsernameBlacklists.

func (*UsernameBlacklistQuery) AllX

AllX is like All, but panics if an error occurs.

func (*UsernameBlacklistQuery) Clone

Clone returns a duplicate of the UsernameBlacklistQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UsernameBlacklistQuery) Count

func (ubq *UsernameBlacklistQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UsernameBlacklistQuery) CountX

func (ubq *UsernameBlacklistQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UsernameBlacklistQuery) ExecContext

func (c *UsernameBlacklistQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UsernameBlacklistQuery) Exist

func (ubq *UsernameBlacklistQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UsernameBlacklistQuery) ExistX

func (ubq *UsernameBlacklistQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UsernameBlacklistQuery) First

First returns the first UsernameBlacklist entity from the query. Returns a *NotFoundError when no UsernameBlacklist was found.

func (*UsernameBlacklistQuery) FirstID

func (ubq *UsernameBlacklistQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first UsernameBlacklist ID from the query. Returns a *NotFoundError when no UsernameBlacklist ID was found.

func (*UsernameBlacklistQuery) FirstIDX

func (ubq *UsernameBlacklistQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UsernameBlacklistQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*UsernameBlacklistQuery) GroupBy

func (ubq *UsernameBlacklistQuery) GroupBy(field string, fields ...string) *UsernameBlacklistGroupBy

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.UsernameBlacklist.Query().
	GroupBy(usernameblacklist.FieldUsername).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UsernameBlacklistQuery) IDs

func (ubq *UsernameBlacklistQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of UsernameBlacklist IDs.

func (*UsernameBlacklistQuery) IDsX

func (ubq *UsernameBlacklistQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UsernameBlacklistQuery) Limit

Limit the number of records to be returned by this query.

func (*UsernameBlacklistQuery) Modify

func (ubq *UsernameBlacklistQuery) Modify(modifiers ...func(s *sql.Selector)) *UsernameBlacklistSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*UsernameBlacklistQuery) Offset

func (ubq *UsernameBlacklistQuery) Offset(offset int) *UsernameBlacklistQuery

Offset to start from.

func (*UsernameBlacklistQuery) Only

Only returns a single UsernameBlacklist entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UsernameBlacklist entity is found. Returns a *NotFoundError when no UsernameBlacklist entities are found.

func (*UsernameBlacklistQuery) OnlyID

func (ubq *UsernameBlacklistQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only UsernameBlacklist ID in the query. Returns a *NotSingularError when more than one UsernameBlacklist ID is found. Returns a *NotFoundError when no entities are found.

func (*UsernameBlacklistQuery) OnlyIDX

func (ubq *UsernameBlacklistQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UsernameBlacklistQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*UsernameBlacklistQuery) Order

Order specifies how the records should be ordered.

func (*UsernameBlacklistQuery) QueryContext

func (c *UsernameBlacklistQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UsernameBlacklistQuery) Select

func (ubq *UsernameBlacklistQuery) Select(fields ...string) *UsernameBlacklistSelect

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.UsernameBlacklist.Query().
	Select(usernameblacklist.FieldUsername).
	Scan(ctx, &v)

func (*UsernameBlacklistQuery) Unique

func (ubq *UsernameBlacklistQuery) Unique(unique bool) *UsernameBlacklistQuery

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 (*UsernameBlacklistQuery) Where

Where adds a new predicate for the UsernameBlacklistQuery builder.

type UsernameBlacklistSelect

type UsernameBlacklistSelect struct {
	*UsernameBlacklistQuery
	// contains filtered or unexported fields
}

UsernameBlacklistSelect is the builder for selecting fields of UsernameBlacklist entities.

func (*UsernameBlacklistSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*UsernameBlacklistSelect) Bool

func (s *UsernameBlacklistSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistSelect) BoolX

func (s *UsernameBlacklistSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UsernameBlacklistSelect) Bools

func (s *UsernameBlacklistSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistSelect) BoolsX

func (s *UsernameBlacklistSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (UsernameBlacklistSelect) ExecContext

func (c UsernameBlacklistSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UsernameBlacklistSelect) Float64

func (s *UsernameBlacklistSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistSelect) Float64X

func (s *UsernameBlacklistSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UsernameBlacklistSelect) Float64s

func (s *UsernameBlacklistSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistSelect) Float64sX

func (s *UsernameBlacklistSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UsernameBlacklistSelect) Int

func (s *UsernameBlacklistSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistSelect) IntX

func (s *UsernameBlacklistSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UsernameBlacklistSelect) Ints

func (s *UsernameBlacklistSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistSelect) IntsX

func (s *UsernameBlacklistSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UsernameBlacklistSelect) Modify

func (ubs *UsernameBlacklistSelect) Modify(modifiers ...func(s *sql.Selector)) *UsernameBlacklistSelect

Modify adds a query modifier for attaching custom logic to queries.

func (UsernameBlacklistSelect) QueryContext

func (c UsernameBlacklistSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UsernameBlacklistSelect) Scan

func (ubs *UsernameBlacklistSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UsernameBlacklistSelect) ScanX

func (s *UsernameBlacklistSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UsernameBlacklistSelect) String

func (s *UsernameBlacklistSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistSelect) StringX

func (s *UsernameBlacklistSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UsernameBlacklistSelect) Strings

func (s *UsernameBlacklistSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UsernameBlacklistSelect) StringsX

func (s *UsernameBlacklistSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UsernameBlacklistUpdate

type UsernameBlacklistUpdate struct {
	// contains filtered or unexported fields
}

UsernameBlacklistUpdate is the builder for updating UsernameBlacklist entities.

func (*UsernameBlacklistUpdate) Exec

Exec executes the query.

func (*UsernameBlacklistUpdate) ExecContext

func (c *UsernameBlacklistUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UsernameBlacklistUpdate) ExecX

func (ubu *UsernameBlacklistUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsernameBlacklistUpdate) Modify

func (ubu *UsernameBlacklistUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UsernameBlacklistUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UsernameBlacklistUpdate) Mutation

Mutation returns the UsernameBlacklistMutation object of the builder.

func (*UsernameBlacklistUpdate) QueryContext

func (c *UsernameBlacklistUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UsernameBlacklistUpdate) Save

func (ubu *UsernameBlacklistUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UsernameBlacklistUpdate) SaveX

func (ubu *UsernameBlacklistUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UsernameBlacklistUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UsernameBlacklistUpdate) SetUsername

SetUsername sets the "username" field.

func (*UsernameBlacklistUpdate) Where

Where appends a list predicates to the UsernameBlacklistUpdate builder.

type UsernameBlacklistUpdateOne

type UsernameBlacklistUpdateOne struct {
	// contains filtered or unexported fields
}

UsernameBlacklistUpdateOne is the builder for updating a single UsernameBlacklist entity.

func (*UsernameBlacklistUpdateOne) Exec

Exec executes the query on the entity.

func (*UsernameBlacklistUpdateOne) ExecContext

func (c *UsernameBlacklistUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*UsernameBlacklistUpdateOne) ExecX

func (ubuo *UsernameBlacklistUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UsernameBlacklistUpdateOne) Modify

func (ubuo *UsernameBlacklistUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UsernameBlacklistUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*UsernameBlacklistUpdateOne) Mutation

Mutation returns the UsernameBlacklistMutation object of the builder.

func (*UsernameBlacklistUpdateOne) QueryContext

func (c *UsernameBlacklistUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*UsernameBlacklistUpdateOne) Save

Save executes the query and returns the updated UsernameBlacklist entity.

func (*UsernameBlacklistUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*UsernameBlacklistUpdateOne) Select

func (ubuo *UsernameBlacklistUpdateOne) Select(field string, fields ...string) *UsernameBlacklistUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UsernameBlacklistUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UsernameBlacklistUpdateOne) SetUsername

SetUsername sets the "username" field.

type UsernameBlacklistUpsert

type UsernameBlacklistUpsert struct {
	*sql.UpdateSet
}

UsernameBlacklistUpsert is the "OnConflict" setter.

func (*UsernameBlacklistUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UsernameBlacklistUpsert) SetUsername

SetUsername sets the "username" field.

func (*UsernameBlacklistUpsert) UpdateUpdatedAt

func (u *UsernameBlacklistUpsert) UpdateUpdatedAt() *UsernameBlacklistUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UsernameBlacklistUpsert) UpdateUsername

func (u *UsernameBlacklistUpsert) UpdateUsername() *UsernameBlacklistUpsert

UpdateUsername sets the "username" field to the value that was provided on create.

type UsernameBlacklistUpsertBulk

type UsernameBlacklistUpsertBulk struct {
	// contains filtered or unexported fields
}

UsernameBlacklistUpsertBulk is the builder for "upsert"-ing a bulk of UsernameBlacklist nodes.

func (*UsernameBlacklistUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UsernameBlacklistUpsertBulk) Exec

Exec executes the query.

func (*UsernameBlacklistUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UsernameBlacklistUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UsernameBlacklist.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UsernameBlacklistUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UsernameBlacklistUpsertBulk) SetUsername

SetUsername sets the "username" field.

func (*UsernameBlacklistUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the UsernameBlacklistCreateBulk.OnConflict documentation for more info.

func (*UsernameBlacklistUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.UsernameBlacklist.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(usernameblacklist.FieldID)
		}),
	).
	Exec(ctx)

func (*UsernameBlacklistUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UsernameBlacklistUpsertBulk) UpdateUsername

UpdateUsername sets the "username" field to the value that was provided on create.

type UsernameBlacklistUpsertOne

type UsernameBlacklistUpsertOne struct {
	// contains filtered or unexported fields
}

UsernameBlacklistUpsertOne is the builder for "upsert"-ing

one UsernameBlacklist node.

func (*UsernameBlacklistUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UsernameBlacklistUpsertOne) Exec

Exec executes the query.

func (*UsernameBlacklistUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*UsernameBlacklistUpsertOne) ID

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UsernameBlacklistUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*UsernameBlacklistUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.UsernameBlacklist.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UsernameBlacklistUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*UsernameBlacklistUpsertOne) SetUsername

SetUsername sets the "username" field.

func (*UsernameBlacklistUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the UsernameBlacklistCreate.OnConflict documentation for more info.

func (*UsernameBlacklistUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.UsernameBlacklist.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(usernameblacklist.FieldID)
		}),
	).
	Exec(ctx)

func (*UsernameBlacklistUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UsernameBlacklistUpsertOne) UpdateUsername

UpdateUsername sets the "username" field to the value that was provided on create.

type UsernameBlacklists

type UsernameBlacklists []*UsernameBlacklist

UsernameBlacklists is a parsable slice of UsernameBlacklist.

type Users

type Users []*User

Users is a parsable slice of User.

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.

type Voiceover

type Voiceover struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// CountryCode holds the value of the "country_code" field.
	CountryCode *string `json:"country_code,omitempty"`
	// Status holds the value of the "status" field.
	Status voiceover.Status `json:"status,omitempty"`
	// FailureReason holds the value of the "failure_reason" field.
	FailureReason *string `json:"failure_reason,omitempty"`
	// StripeProductID holds the value of the "stripe_product_id" field.
	StripeProductID *string `json:"stripe_product_id,omitempty"`
	// Temperature holds the value of the "temperature" field.
	Temperature float32 `json:"temperature,omitempty"`
	// Seed holds the value of the "seed" field.
	Seed int `json:"seed,omitempty"`
	// WasAutoSubmitted holds the value of the "was_auto_submitted" field.
	WasAutoSubmitted bool `json:"was_auto_submitted,omitempty"`
	// DenoiseAudio holds the value of the "denoise_audio" field.
	DenoiseAudio bool `json:"denoise_audio,omitempty"`
	// RemoveSilence holds the value of the "remove_silence" field.
	RemoveSilence bool `json:"remove_silence,omitempty"`
	// Cost holds the value of the "cost" field.
	Cost int32 `json:"cost,omitempty"`
	// SourceType holds the value of the "source_type" field.
	SourceType enttypes.SourceType `json:"source_type,omitempty"`
	// PromptID holds the value of the "prompt_id" field.
	PromptID *uuid.UUID `json:"prompt_id,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// DeviceInfoID holds the value of the "device_info_id" field.
	DeviceInfoID uuid.UUID `json:"device_info_id,omitempty"`
	// ModelID holds the value of the "model_id" field.
	ModelID uuid.UUID `json:"model_id,omitempty"`
	// SpeakerID holds the value of the "speaker_id" field.
	SpeakerID uuid.UUID `json:"speaker_id,omitempty"`
	// APITokenID holds the value of the "api_token_id" field.
	APITokenID *uuid.UUID `json:"api_token_id,omitempty"`
	// StartedAt holds the value of the "started_at" field.
	StartedAt *time.Time `json:"started_at,omitempty"`
	// CompletedAt holds the value of the "completed_at" field.
	CompletedAt *time.Time `json:"completed_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VoiceoverQuery when eager-loading is set.
	Edges VoiceoverEdges `json:"edges"`
	// contains filtered or unexported fields
}

Voiceover is the model entity for the Voiceover schema.

func (*Voiceover) ExecContext

func (c *Voiceover) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Voiceover) QueryAPITokens

func (v *Voiceover) QueryAPITokens() *ApiTokenQuery

QueryAPITokens queries the "api_tokens" edge of the Voiceover entity.

func (*Voiceover) QueryContext

func (c *Voiceover) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Voiceover) QueryDeviceInfo

func (v *Voiceover) QueryDeviceInfo() *DeviceInfoQuery

QueryDeviceInfo queries the "device_info" edge of the Voiceover entity.

func (*Voiceover) QueryPrompt

func (v *Voiceover) QueryPrompt() *PromptQuery

QueryPrompt queries the "prompt" edge of the Voiceover entity.

func (*Voiceover) QueryUser

func (v *Voiceover) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Voiceover entity.

func (*Voiceover) QueryVoiceoverModels

func (v *Voiceover) QueryVoiceoverModels() *VoiceoverModelQuery

QueryVoiceoverModels queries the "voiceover_models" edge of the Voiceover entity.

func (*Voiceover) QueryVoiceoverOutputs

func (v *Voiceover) QueryVoiceoverOutputs() *VoiceoverOutputQuery

QueryVoiceoverOutputs queries the "voiceover_outputs" edge of the Voiceover entity.

func (*Voiceover) QueryVoiceoverSpeakers

func (v *Voiceover) QueryVoiceoverSpeakers() *VoiceoverSpeakerQuery

QueryVoiceoverSpeakers queries the "voiceover_speakers" edge of the Voiceover entity.

func (*Voiceover) String

func (v *Voiceover) String() string

String implements the fmt.Stringer.

func (*Voiceover) Unwrap

func (v *Voiceover) Unwrap() *Voiceover

Unwrap unwraps the Voiceover 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 (*Voiceover) Update

func (v *Voiceover) Update() *VoiceoverUpdateOne

Update returns a builder for updating this Voiceover. Note that you need to call Voiceover.Unwrap() before calling this method if this Voiceover was returned from a transaction, and the transaction was committed or rolled back.

type VoiceoverClient

type VoiceoverClient struct {
	// contains filtered or unexported fields
}

VoiceoverClient is a client for the Voiceover schema.

func NewVoiceoverClient

func NewVoiceoverClient(c config) *VoiceoverClient

NewVoiceoverClient returns a client for the Voiceover from the given config.

func (*VoiceoverClient) Create

func (c *VoiceoverClient) Create() *VoiceoverCreate

Create returns a builder for creating a Voiceover entity.

func (*VoiceoverClient) CreateBulk

func (c *VoiceoverClient) CreateBulk(builders ...*VoiceoverCreate) *VoiceoverCreateBulk

CreateBulk returns a builder for creating a bulk of Voiceover entities.

func (*VoiceoverClient) Delete

func (c *VoiceoverClient) Delete() *VoiceoverDelete

Delete returns a delete builder for Voiceover.

func (*VoiceoverClient) DeleteOne

func (c *VoiceoverClient) DeleteOne(v *Voiceover) *VoiceoverDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VoiceoverClient) DeleteOneID

func (c *VoiceoverClient) DeleteOneID(id uuid.UUID) *VoiceoverDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VoiceoverClient) ExecContext

func (c *VoiceoverClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverClient) Get

func (c *VoiceoverClient) Get(ctx context.Context, id uuid.UUID) (*Voiceover, error)

Get returns a Voiceover entity by its id.

func (*VoiceoverClient) GetX

func (c *VoiceoverClient) GetX(ctx context.Context, id uuid.UUID) *Voiceover

GetX is like Get, but panics if an error occurs.

func (*VoiceoverClient) Hooks

func (c *VoiceoverClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VoiceoverClient) Intercept

func (c *VoiceoverClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `voiceover.Intercept(f(g(h())))`.

func (*VoiceoverClient) Interceptors

func (c *VoiceoverClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VoiceoverClient) Query

func (c *VoiceoverClient) Query() *VoiceoverQuery

Query returns a query builder for Voiceover.

func (*VoiceoverClient) QueryAPITokens

func (c *VoiceoverClient) QueryAPITokens(v *Voiceover) *ApiTokenQuery

QueryAPITokens queries the api_tokens edge of a Voiceover.

func (*VoiceoverClient) QueryContext

func (c *VoiceoverClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverClient) QueryDeviceInfo

func (c *VoiceoverClient) QueryDeviceInfo(v *Voiceover) *DeviceInfoQuery

QueryDeviceInfo queries the device_info edge of a Voiceover.

func (*VoiceoverClient) QueryPrompt

func (c *VoiceoverClient) QueryPrompt(v *Voiceover) *PromptQuery

QueryPrompt queries the prompt edge of a Voiceover.

func (*VoiceoverClient) QueryUser

func (c *VoiceoverClient) QueryUser(v *Voiceover) *UserQuery

QueryUser queries the user edge of a Voiceover.

func (*VoiceoverClient) QueryVoiceoverModels

func (c *VoiceoverClient) QueryVoiceoverModels(v *Voiceover) *VoiceoverModelQuery

QueryVoiceoverModels queries the voiceover_models edge of a Voiceover.

func (*VoiceoverClient) QueryVoiceoverOutputs

func (c *VoiceoverClient) QueryVoiceoverOutputs(v *Voiceover) *VoiceoverOutputQuery

QueryVoiceoverOutputs queries the voiceover_outputs edge of a Voiceover.

func (*VoiceoverClient) QueryVoiceoverSpeakers

func (c *VoiceoverClient) QueryVoiceoverSpeakers(v *Voiceover) *VoiceoverSpeakerQuery

QueryVoiceoverSpeakers queries the voiceover_speakers edge of a Voiceover.

func (*VoiceoverClient) Update

func (c *VoiceoverClient) Update() *VoiceoverUpdate

Update returns an update builder for Voiceover.

func (*VoiceoverClient) UpdateOne

func (c *VoiceoverClient) UpdateOne(v *Voiceover) *VoiceoverUpdateOne

UpdateOne returns an update builder for the given entity.

func (*VoiceoverClient) UpdateOneID

func (c *VoiceoverClient) UpdateOneID(id uuid.UUID) *VoiceoverUpdateOne

UpdateOneID returns an update builder for the given id.

func (*VoiceoverClient) Use

func (c *VoiceoverClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `voiceover.Hooks(f(g(h())))`.

type VoiceoverCreate

type VoiceoverCreate struct {
	// contains filtered or unexported fields
}

VoiceoverCreate is the builder for creating a Voiceover entity.

func (*VoiceoverCreate) AddVoiceoverOutputIDs

func (vc *VoiceoverCreate) AddVoiceoverOutputIDs(ids ...uuid.UUID) *VoiceoverCreate

AddVoiceoverOutputIDs adds the "voiceover_outputs" edge to the VoiceoverOutput entity by IDs.

func (*VoiceoverCreate) AddVoiceoverOutputs

func (vc *VoiceoverCreate) AddVoiceoverOutputs(v ...*VoiceoverOutput) *VoiceoverCreate

AddVoiceoverOutputs adds the "voiceover_outputs" edges to the VoiceoverOutput entity.

func (*VoiceoverCreate) Exec

func (vc *VoiceoverCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VoiceoverCreate) ExecContext

func (c *VoiceoverCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverCreate) ExecX

func (vc *VoiceoverCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverCreate) Mutation

func (vc *VoiceoverCreate) Mutation() *VoiceoverMutation

Mutation returns the VoiceoverMutation object of the builder.

func (*VoiceoverCreate) OnConflict

func (vc *VoiceoverCreate) OnConflict(opts ...sql.ConflictOption) *VoiceoverUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Voiceover.Create().
	SetCountryCode(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VoiceoverUpsert) {
		SetCountryCode(v+v).
	}).
	Exec(ctx)

func (*VoiceoverCreate) OnConflictColumns

func (vc *VoiceoverCreate) OnConflictColumns(columns ...string) *VoiceoverUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Voiceover.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VoiceoverCreate) QueryContext

func (c *VoiceoverCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverCreate) Save

func (vc *VoiceoverCreate) Save(ctx context.Context) (*Voiceover, error)

Save creates the Voiceover in the database.

func (*VoiceoverCreate) SaveX

func (vc *VoiceoverCreate) SaveX(ctx context.Context) *Voiceover

SaveX calls Save and panics if Save returns an error.

func (*VoiceoverCreate) SetAPITokenID

func (vc *VoiceoverCreate) SetAPITokenID(u uuid.UUID) *VoiceoverCreate

SetAPITokenID sets the "api_token_id" field.

func (*VoiceoverCreate) SetAPITokens

func (vc *VoiceoverCreate) SetAPITokens(a *ApiToken) *VoiceoverCreate

SetAPITokens sets the "api_tokens" edge to the ApiToken entity.

func (*VoiceoverCreate) SetAPITokensID

func (vc *VoiceoverCreate) SetAPITokensID(id uuid.UUID) *VoiceoverCreate

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID.

func (*VoiceoverCreate) SetCompletedAt

func (vc *VoiceoverCreate) SetCompletedAt(t time.Time) *VoiceoverCreate

SetCompletedAt sets the "completed_at" field.

func (*VoiceoverCreate) SetCost

func (vc *VoiceoverCreate) SetCost(i int32) *VoiceoverCreate

SetCost sets the "cost" field.

func (*VoiceoverCreate) SetCountryCode

func (vc *VoiceoverCreate) SetCountryCode(s string) *VoiceoverCreate

SetCountryCode sets the "country_code" field.

func (*VoiceoverCreate) SetCreatedAt

func (vc *VoiceoverCreate) SetCreatedAt(t time.Time) *VoiceoverCreate

SetCreatedAt sets the "created_at" field.

func (*VoiceoverCreate) SetDenoiseAudio

func (vc *VoiceoverCreate) SetDenoiseAudio(b bool) *VoiceoverCreate

SetDenoiseAudio sets the "denoise_audio" field.

func (*VoiceoverCreate) SetDeviceInfo

func (vc *VoiceoverCreate) SetDeviceInfo(d *DeviceInfo) *VoiceoverCreate

SetDeviceInfo sets the "device_info" edge to the DeviceInfo entity.

func (*VoiceoverCreate) SetDeviceInfoID

func (vc *VoiceoverCreate) SetDeviceInfoID(u uuid.UUID) *VoiceoverCreate

SetDeviceInfoID sets the "device_info_id" field.

func (*VoiceoverCreate) SetFailureReason

func (vc *VoiceoverCreate) SetFailureReason(s string) *VoiceoverCreate

SetFailureReason sets the "failure_reason" field.

func (*VoiceoverCreate) SetID

func (vc *VoiceoverCreate) SetID(u uuid.UUID) *VoiceoverCreate

SetID sets the "id" field.

func (*VoiceoverCreate) SetModelID

func (vc *VoiceoverCreate) SetModelID(u uuid.UUID) *VoiceoverCreate

SetModelID sets the "model_id" field.

func (*VoiceoverCreate) SetNillableAPITokenID

func (vc *VoiceoverCreate) SetNillableAPITokenID(u *uuid.UUID) *VoiceoverCreate

SetNillableAPITokenID sets the "api_token_id" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableAPITokensID

func (vc *VoiceoverCreate) SetNillableAPITokensID(id *uuid.UUID) *VoiceoverCreate

SetNillableAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID if the given value is not nil.

func (*VoiceoverCreate) SetNillableCompletedAt

func (vc *VoiceoverCreate) SetNillableCompletedAt(t *time.Time) *VoiceoverCreate

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableCountryCode

func (vc *VoiceoverCreate) SetNillableCountryCode(s *string) *VoiceoverCreate

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableCreatedAt

func (vc *VoiceoverCreate) SetNillableCreatedAt(t *time.Time) *VoiceoverCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableDenoiseAudio

func (vc *VoiceoverCreate) SetNillableDenoiseAudio(b *bool) *VoiceoverCreate

SetNillableDenoiseAudio sets the "denoise_audio" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableFailureReason

func (vc *VoiceoverCreate) SetNillableFailureReason(s *string) *VoiceoverCreate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableID

func (vc *VoiceoverCreate) SetNillableID(u *uuid.UUID) *VoiceoverCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*VoiceoverCreate) SetNillablePromptID

func (vc *VoiceoverCreate) SetNillablePromptID(u *uuid.UUID) *VoiceoverCreate

SetNillablePromptID sets the "prompt_id" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableRemoveSilence

func (vc *VoiceoverCreate) SetNillableRemoveSilence(b *bool) *VoiceoverCreate

SetNillableRemoveSilence sets the "remove_silence" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableSourceType

func (vc *VoiceoverCreate) SetNillableSourceType(et *enttypes.SourceType) *VoiceoverCreate

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableStartedAt

func (vc *VoiceoverCreate) SetNillableStartedAt(t *time.Time) *VoiceoverCreate

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableStripeProductID

func (vc *VoiceoverCreate) SetNillableStripeProductID(s *string) *VoiceoverCreate

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableUpdatedAt

func (vc *VoiceoverCreate) SetNillableUpdatedAt(t *time.Time) *VoiceoverCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*VoiceoverCreate) SetNillableWasAutoSubmitted

func (vc *VoiceoverCreate) SetNillableWasAutoSubmitted(b *bool) *VoiceoverCreate

SetNillableWasAutoSubmitted sets the "was_auto_submitted" field if the given value is not nil.

func (*VoiceoverCreate) SetPrompt

func (vc *VoiceoverCreate) SetPrompt(p *Prompt) *VoiceoverCreate

SetPrompt sets the "prompt" edge to the Prompt entity.

func (*VoiceoverCreate) SetPromptID

func (vc *VoiceoverCreate) SetPromptID(u uuid.UUID) *VoiceoverCreate

SetPromptID sets the "prompt_id" field.

func (*VoiceoverCreate) SetRemoveSilence

func (vc *VoiceoverCreate) SetRemoveSilence(b bool) *VoiceoverCreate

SetRemoveSilence sets the "remove_silence" field.

func (*VoiceoverCreate) SetSeed

func (vc *VoiceoverCreate) SetSeed(i int) *VoiceoverCreate

SetSeed sets the "seed" field.

func (*VoiceoverCreate) SetSourceType

func (vc *VoiceoverCreate) SetSourceType(et enttypes.SourceType) *VoiceoverCreate

SetSourceType sets the "source_type" field.

func (*VoiceoverCreate) SetSpeakerID

func (vc *VoiceoverCreate) SetSpeakerID(u uuid.UUID) *VoiceoverCreate

SetSpeakerID sets the "speaker_id" field.

func (*VoiceoverCreate) SetStartedAt

func (vc *VoiceoverCreate) SetStartedAt(t time.Time) *VoiceoverCreate

SetStartedAt sets the "started_at" field.

func (*VoiceoverCreate) SetStatus

func (vc *VoiceoverCreate) SetStatus(v voiceover.Status) *VoiceoverCreate

SetStatus sets the "status" field.

func (*VoiceoverCreate) SetStripeProductID

func (vc *VoiceoverCreate) SetStripeProductID(s string) *VoiceoverCreate

SetStripeProductID sets the "stripe_product_id" field.

func (*VoiceoverCreate) SetTemperature

func (vc *VoiceoverCreate) SetTemperature(f float32) *VoiceoverCreate

SetTemperature sets the "temperature" field.

func (*VoiceoverCreate) SetUpdatedAt

func (vc *VoiceoverCreate) SetUpdatedAt(t time.Time) *VoiceoverCreate

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverCreate) SetUser

func (vc *VoiceoverCreate) SetUser(u *User) *VoiceoverCreate

SetUser sets the "user" edge to the User entity.

func (*VoiceoverCreate) SetUserID

func (vc *VoiceoverCreate) SetUserID(u uuid.UUID) *VoiceoverCreate

SetUserID sets the "user_id" field.

func (*VoiceoverCreate) SetVoiceoverModels

func (vc *VoiceoverCreate) SetVoiceoverModels(v *VoiceoverModel) *VoiceoverCreate

SetVoiceoverModels sets the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverCreate) SetVoiceoverModelsID

func (vc *VoiceoverCreate) SetVoiceoverModelsID(id uuid.UUID) *VoiceoverCreate

SetVoiceoverModelsID sets the "voiceover_models" edge to the VoiceoverModel entity by ID.

func (*VoiceoverCreate) SetVoiceoverSpeakers

func (vc *VoiceoverCreate) SetVoiceoverSpeakers(v *VoiceoverSpeaker) *VoiceoverCreate

SetVoiceoverSpeakers sets the "voiceover_speakers" edge to the VoiceoverSpeaker entity.

func (*VoiceoverCreate) SetVoiceoverSpeakersID

func (vc *VoiceoverCreate) SetVoiceoverSpeakersID(id uuid.UUID) *VoiceoverCreate

SetVoiceoverSpeakersID sets the "voiceover_speakers" edge to the VoiceoverSpeaker entity by ID.

func (*VoiceoverCreate) SetWasAutoSubmitted

func (vc *VoiceoverCreate) SetWasAutoSubmitted(b bool) *VoiceoverCreate

SetWasAutoSubmitted sets the "was_auto_submitted" field.

type VoiceoverCreateBulk

type VoiceoverCreateBulk struct {
	// contains filtered or unexported fields
}

VoiceoverCreateBulk is the builder for creating many Voiceover entities in bulk.

func (*VoiceoverCreateBulk) Exec

func (vcb *VoiceoverCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VoiceoverCreateBulk) ExecContext

func (c *VoiceoverCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverCreateBulk) ExecX

func (vcb *VoiceoverCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverCreateBulk) OnConflict

func (vcb *VoiceoverCreateBulk) OnConflict(opts ...sql.ConflictOption) *VoiceoverUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Voiceover.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VoiceoverUpsert) {
		SetCountryCode(v+v).
	}).
	Exec(ctx)

func (*VoiceoverCreateBulk) OnConflictColumns

func (vcb *VoiceoverCreateBulk) OnConflictColumns(columns ...string) *VoiceoverUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Voiceover.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VoiceoverCreateBulk) QueryContext

func (c *VoiceoverCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverCreateBulk) Save

func (vcb *VoiceoverCreateBulk) Save(ctx context.Context) ([]*Voiceover, error)

Save creates the Voiceover entities in the database.

func (*VoiceoverCreateBulk) SaveX

func (vcb *VoiceoverCreateBulk) SaveX(ctx context.Context) []*Voiceover

SaveX is like Save, but panics if an error occurs.

type VoiceoverDelete

type VoiceoverDelete struct {
	// contains filtered or unexported fields
}

VoiceoverDelete is the builder for deleting a Voiceover entity.

func (*VoiceoverDelete) Exec

func (vd *VoiceoverDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VoiceoverDelete) ExecContext

func (c *VoiceoverDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverDelete) ExecX

func (vd *VoiceoverDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverDelete) QueryContext

func (c *VoiceoverDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverDelete) Where

Where appends a list predicates to the VoiceoverDelete builder.

type VoiceoverDeleteOne

type VoiceoverDeleteOne struct {
	// contains filtered or unexported fields
}

VoiceoverDeleteOne is the builder for deleting a single Voiceover entity.

func (*VoiceoverDeleteOne) Exec

func (vdo *VoiceoverDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*VoiceoverDeleteOne) ExecX

func (vdo *VoiceoverDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type VoiceoverEdges

type VoiceoverEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Prompt holds the value of the prompt edge.
	Prompt *Prompt `json:"prompt,omitempty"`
	// DeviceInfo holds the value of the device_info edge.
	DeviceInfo *DeviceInfo `json:"device_info,omitempty"`
	// VoiceoverModels holds the value of the voiceover_models edge.
	VoiceoverModels *VoiceoverModel `json:"voiceover_models,omitempty"`
	// VoiceoverSpeakers holds the value of the voiceover_speakers edge.
	VoiceoverSpeakers *VoiceoverSpeaker `json:"voiceover_speakers,omitempty"`
	// APITokens holds the value of the api_tokens edge.
	APITokens *ApiToken `json:"api_tokens,omitempty"`
	// VoiceoverOutputs holds the value of the voiceover_outputs edge.
	VoiceoverOutputs []*VoiceoverOutput `json:"voiceover_outputs,omitempty"`
	// contains filtered or unexported fields
}

VoiceoverEdges holds the relations/edges for other nodes in the graph.

func (VoiceoverEdges) APITokensOrErr

func (e VoiceoverEdges) APITokensOrErr() (*ApiToken, error)

APITokensOrErr returns the APITokens value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VoiceoverEdges) DeviceInfoOrErr

func (e VoiceoverEdges) DeviceInfoOrErr() (*DeviceInfo, error)

DeviceInfoOrErr returns the DeviceInfo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VoiceoverEdges) PromptOrErr

func (e VoiceoverEdges) PromptOrErr() (*Prompt, error)

PromptOrErr returns the Prompt value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VoiceoverEdges) UserOrErr

func (e VoiceoverEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VoiceoverEdges) VoiceoverModelsOrErr

func (e VoiceoverEdges) VoiceoverModelsOrErr() (*VoiceoverModel, error)

VoiceoverModelsOrErr returns the VoiceoverModels value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VoiceoverEdges) VoiceoverOutputsOrErr

func (e VoiceoverEdges) VoiceoverOutputsOrErr() ([]*VoiceoverOutput, error)

VoiceoverOutputsOrErr returns the VoiceoverOutputs value or an error if the edge was not loaded in eager-loading.

func (VoiceoverEdges) VoiceoverSpeakersOrErr

func (e VoiceoverEdges) VoiceoverSpeakersOrErr() (*VoiceoverSpeaker, error)

VoiceoverSpeakersOrErr returns the VoiceoverSpeakers value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type VoiceoverGroupBy

type VoiceoverGroupBy struct {
	// contains filtered or unexported fields
}

VoiceoverGroupBy is the group-by builder for Voiceover entities.

func (*VoiceoverGroupBy) Aggregate

func (vgb *VoiceoverGroupBy) Aggregate(fns ...AggregateFunc) *VoiceoverGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*VoiceoverGroupBy) Bool

func (s *VoiceoverGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VoiceoverGroupBy) BoolX

func (s *VoiceoverGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VoiceoverGroupBy) Bools

func (s *VoiceoverGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VoiceoverGroupBy) BoolsX

func (s *VoiceoverGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VoiceoverGroupBy) Float64

func (s *VoiceoverGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VoiceoverGroupBy) Float64X

func (s *VoiceoverGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VoiceoverGroupBy) Float64s

func (s *VoiceoverGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VoiceoverGroupBy) Float64sX

func (s *VoiceoverGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VoiceoverGroupBy) Int

func (s *VoiceoverGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VoiceoverGroupBy) IntX

func (s *VoiceoverGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VoiceoverGroupBy) Ints

func (s *VoiceoverGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VoiceoverGroupBy) IntsX

func (s *VoiceoverGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VoiceoverGroupBy) Scan

func (vgb *VoiceoverGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VoiceoverGroupBy) ScanX

func (s *VoiceoverGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VoiceoverGroupBy) String

func (s *VoiceoverGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VoiceoverGroupBy) StringX

func (s *VoiceoverGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VoiceoverGroupBy) Strings

func (s *VoiceoverGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VoiceoverGroupBy) StringsX

func (s *VoiceoverGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VoiceoverModel

type VoiceoverModel struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// NameInWorker holds the value of the "name_in_worker" field.
	NameInWorker string `json:"name_in_worker,omitempty"`
	// IsActive holds the value of the "is_active" field.
	IsActive bool `json:"is_active,omitempty"`
	// IsDefault holds the value of the "is_default" field.
	IsDefault bool `json:"is_default,omitempty"`
	// IsHidden holds the value of the "is_hidden" field.
	IsHidden bool `json:"is_hidden,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VoiceoverModelQuery when eager-loading is set.
	Edges VoiceoverModelEdges `json:"edges"`
	// contains filtered or unexported fields
}

VoiceoverModel is the model entity for the VoiceoverModel schema.

func (*VoiceoverModel) ExecContext

func (c *VoiceoverModel) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverModel) QueryContext

func (c *VoiceoverModel) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverModel) QueryVoiceoverSpeakers

func (vm *VoiceoverModel) QueryVoiceoverSpeakers() *VoiceoverSpeakerQuery

QueryVoiceoverSpeakers queries the "voiceover_speakers" edge of the VoiceoverModel entity.

func (*VoiceoverModel) QueryVoiceovers

func (vm *VoiceoverModel) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers queries the "voiceovers" edge of the VoiceoverModel entity.

func (*VoiceoverModel) String

func (vm *VoiceoverModel) String() string

String implements the fmt.Stringer.

func (*VoiceoverModel) Unwrap

func (vm *VoiceoverModel) Unwrap() *VoiceoverModel

Unwrap unwraps the VoiceoverModel 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 (*VoiceoverModel) Update

Update returns a builder for updating this VoiceoverModel. Note that you need to call VoiceoverModel.Unwrap() before calling this method if this VoiceoverModel was returned from a transaction, and the transaction was committed or rolled back.

type VoiceoverModelClient

type VoiceoverModelClient struct {
	// contains filtered or unexported fields
}

VoiceoverModelClient is a client for the VoiceoverModel schema.

func NewVoiceoverModelClient

func NewVoiceoverModelClient(c config) *VoiceoverModelClient

NewVoiceoverModelClient returns a client for the VoiceoverModel from the given config.

func (*VoiceoverModelClient) Create

Create returns a builder for creating a VoiceoverModel entity.

func (*VoiceoverModelClient) CreateBulk

CreateBulk returns a builder for creating a bulk of VoiceoverModel entities.

func (*VoiceoverModelClient) Delete

Delete returns a delete builder for VoiceoverModel.

func (*VoiceoverModelClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VoiceoverModelClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VoiceoverModelClient) ExecContext

func (c *VoiceoverModelClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverModelClient) Get

Get returns a VoiceoverModel entity by its id.

func (*VoiceoverModelClient) GetX

GetX is like Get, but panics if an error occurs.

func (*VoiceoverModelClient) Hooks

func (c *VoiceoverModelClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VoiceoverModelClient) Intercept

func (c *VoiceoverModelClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `voiceovermodel.Intercept(f(g(h())))`.

func (*VoiceoverModelClient) Interceptors

func (c *VoiceoverModelClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VoiceoverModelClient) Query

Query returns a query builder for VoiceoverModel.

func (*VoiceoverModelClient) QueryContext

func (c *VoiceoverModelClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverModelClient) QueryVoiceoverSpeakers

func (c *VoiceoverModelClient) QueryVoiceoverSpeakers(vm *VoiceoverModel) *VoiceoverSpeakerQuery

QueryVoiceoverSpeakers queries the voiceover_speakers edge of a VoiceoverModel.

func (*VoiceoverModelClient) QueryVoiceovers

func (c *VoiceoverModelClient) QueryVoiceovers(vm *VoiceoverModel) *VoiceoverQuery

QueryVoiceovers queries the voiceovers edge of a VoiceoverModel.

func (*VoiceoverModelClient) Update

Update returns an update builder for VoiceoverModel.

func (*VoiceoverModelClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*VoiceoverModelClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*VoiceoverModelClient) Use

func (c *VoiceoverModelClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `voiceovermodel.Hooks(f(g(h())))`.

type VoiceoverModelCreate

type VoiceoverModelCreate struct {
	// contains filtered or unexported fields
}

VoiceoverModelCreate is the builder for creating a VoiceoverModel entity.

func (*VoiceoverModelCreate) AddVoiceoverIDs

func (vmc *VoiceoverModelCreate) AddVoiceoverIDs(ids ...uuid.UUID) *VoiceoverModelCreate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*VoiceoverModelCreate) AddVoiceoverSpeakerIDs

func (vmc *VoiceoverModelCreate) AddVoiceoverSpeakerIDs(ids ...uuid.UUID) *VoiceoverModelCreate

AddVoiceoverSpeakerIDs adds the "voiceover_speakers" edge to the VoiceoverSpeaker entity by IDs.

func (*VoiceoverModelCreate) AddVoiceoverSpeakers

func (vmc *VoiceoverModelCreate) AddVoiceoverSpeakers(v ...*VoiceoverSpeaker) *VoiceoverModelCreate

AddVoiceoverSpeakers adds the "voiceover_speakers" edges to the VoiceoverSpeaker entity.

func (*VoiceoverModelCreate) AddVoiceovers

func (vmc *VoiceoverModelCreate) AddVoiceovers(v ...*Voiceover) *VoiceoverModelCreate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*VoiceoverModelCreate) Exec

func (vmc *VoiceoverModelCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VoiceoverModelCreate) ExecContext

func (c *VoiceoverModelCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverModelCreate) ExecX

func (vmc *VoiceoverModelCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverModelCreate) Mutation

Mutation returns the VoiceoverModelMutation object of the builder.

func (*VoiceoverModelCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VoiceoverModel.Create().
	SetNameInWorker(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VoiceoverModelUpsert) {
		SetNameInWorker(v+v).
	}).
	Exec(ctx)

func (*VoiceoverModelCreate) OnConflictColumns

func (vmc *VoiceoverModelCreate) OnConflictColumns(columns ...string) *VoiceoverModelUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VoiceoverModel.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VoiceoverModelCreate) QueryContext

func (c *VoiceoverModelCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverModelCreate) Save

Save creates the VoiceoverModel in the database.

func (*VoiceoverModelCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*VoiceoverModelCreate) SetCreatedAt

func (vmc *VoiceoverModelCreate) SetCreatedAt(t time.Time) *VoiceoverModelCreate

SetCreatedAt sets the "created_at" field.

func (*VoiceoverModelCreate) SetID

SetID sets the "id" field.

func (*VoiceoverModelCreate) SetIsActive

func (vmc *VoiceoverModelCreate) SetIsActive(b bool) *VoiceoverModelCreate

SetIsActive sets the "is_active" field.

func (*VoiceoverModelCreate) SetIsDefault

func (vmc *VoiceoverModelCreate) SetIsDefault(b bool) *VoiceoverModelCreate

SetIsDefault sets the "is_default" field.

func (*VoiceoverModelCreate) SetIsHidden

func (vmc *VoiceoverModelCreate) SetIsHidden(b bool) *VoiceoverModelCreate

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverModelCreate) SetNameInWorker

func (vmc *VoiceoverModelCreate) SetNameInWorker(s string) *VoiceoverModelCreate

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverModelCreate) SetNillableCreatedAt

func (vmc *VoiceoverModelCreate) SetNillableCreatedAt(t *time.Time) *VoiceoverModelCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*VoiceoverModelCreate) SetNillableID

func (vmc *VoiceoverModelCreate) SetNillableID(u *uuid.UUID) *VoiceoverModelCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*VoiceoverModelCreate) SetNillableIsActive

func (vmc *VoiceoverModelCreate) SetNillableIsActive(b *bool) *VoiceoverModelCreate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*VoiceoverModelCreate) SetNillableIsDefault

func (vmc *VoiceoverModelCreate) SetNillableIsDefault(b *bool) *VoiceoverModelCreate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*VoiceoverModelCreate) SetNillableIsHidden

func (vmc *VoiceoverModelCreate) SetNillableIsHidden(b *bool) *VoiceoverModelCreate

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*VoiceoverModelCreate) SetNillableUpdatedAt

func (vmc *VoiceoverModelCreate) SetNillableUpdatedAt(t *time.Time) *VoiceoverModelCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*VoiceoverModelCreate) SetUpdatedAt

func (vmc *VoiceoverModelCreate) SetUpdatedAt(t time.Time) *VoiceoverModelCreate

SetUpdatedAt sets the "updated_at" field.

type VoiceoverModelCreateBulk

type VoiceoverModelCreateBulk struct {
	// contains filtered or unexported fields
}

VoiceoverModelCreateBulk is the builder for creating many VoiceoverModel entities in bulk.

func (*VoiceoverModelCreateBulk) Exec

Exec executes the query.

func (*VoiceoverModelCreateBulk) ExecContext

func (c *VoiceoverModelCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverModelCreateBulk) ExecX

func (vmcb *VoiceoverModelCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverModelCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VoiceoverModel.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VoiceoverModelUpsert) {
		SetNameInWorker(v+v).
	}).
	Exec(ctx)

func (*VoiceoverModelCreateBulk) OnConflictColumns

func (vmcb *VoiceoverModelCreateBulk) OnConflictColumns(columns ...string) *VoiceoverModelUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VoiceoverModel.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VoiceoverModelCreateBulk) QueryContext

func (c *VoiceoverModelCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverModelCreateBulk) Save

Save creates the VoiceoverModel entities in the database.

func (*VoiceoverModelCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type VoiceoverModelDelete

type VoiceoverModelDelete struct {
	// contains filtered or unexported fields
}

VoiceoverModelDelete is the builder for deleting a VoiceoverModel entity.

func (*VoiceoverModelDelete) Exec

func (vmd *VoiceoverModelDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VoiceoverModelDelete) ExecContext

func (c *VoiceoverModelDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverModelDelete) ExecX

func (vmd *VoiceoverModelDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverModelDelete) QueryContext

func (c *VoiceoverModelDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverModelDelete) Where

Where appends a list predicates to the VoiceoverModelDelete builder.

type VoiceoverModelDeleteOne

type VoiceoverModelDeleteOne struct {
	// contains filtered or unexported fields
}

VoiceoverModelDeleteOne is the builder for deleting a single VoiceoverModel entity.

func (*VoiceoverModelDeleteOne) Exec

func (vmdo *VoiceoverModelDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*VoiceoverModelDeleteOne) ExecX

func (vmdo *VoiceoverModelDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type VoiceoverModelEdges

type VoiceoverModelEdges struct {
	// Voiceovers holds the value of the voiceovers edge.
	Voiceovers []*Voiceover `json:"voiceovers,omitempty"`
	// VoiceoverSpeakers holds the value of the voiceover_speakers edge.
	VoiceoverSpeakers []*VoiceoverSpeaker `json:"voiceover_speakers,omitempty"`
	// contains filtered or unexported fields
}

VoiceoverModelEdges holds the relations/edges for other nodes in the graph.

func (VoiceoverModelEdges) VoiceoverSpeakersOrErr

func (e VoiceoverModelEdges) VoiceoverSpeakersOrErr() ([]*VoiceoverSpeaker, error)

VoiceoverSpeakersOrErr returns the VoiceoverSpeakers value or an error if the edge was not loaded in eager-loading.

func (VoiceoverModelEdges) VoiceoversOrErr

func (e VoiceoverModelEdges) VoiceoversOrErr() ([]*Voiceover, error)

VoiceoversOrErr returns the Voiceovers value or an error if the edge was not loaded in eager-loading.

type VoiceoverModelGroupBy

type VoiceoverModelGroupBy struct {
	// contains filtered or unexported fields
}

VoiceoverModelGroupBy is the group-by builder for VoiceoverModel entities.

func (*VoiceoverModelGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*VoiceoverModelGroupBy) Bool

func (s *VoiceoverModelGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelGroupBy) BoolX

func (s *VoiceoverModelGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VoiceoverModelGroupBy) Bools

func (s *VoiceoverModelGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelGroupBy) BoolsX

func (s *VoiceoverModelGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VoiceoverModelGroupBy) Float64

func (s *VoiceoverModelGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelGroupBy) Float64X

func (s *VoiceoverModelGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VoiceoverModelGroupBy) Float64s

func (s *VoiceoverModelGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelGroupBy) Float64sX

func (s *VoiceoverModelGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VoiceoverModelGroupBy) Int

func (s *VoiceoverModelGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelGroupBy) IntX

func (s *VoiceoverModelGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VoiceoverModelGroupBy) Ints

func (s *VoiceoverModelGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelGroupBy) IntsX

func (s *VoiceoverModelGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VoiceoverModelGroupBy) Scan

func (vmgb *VoiceoverModelGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VoiceoverModelGroupBy) ScanX

func (s *VoiceoverModelGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VoiceoverModelGroupBy) String

func (s *VoiceoverModelGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelGroupBy) StringX

func (s *VoiceoverModelGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VoiceoverModelGroupBy) Strings

func (s *VoiceoverModelGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelGroupBy) StringsX

func (s *VoiceoverModelGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VoiceoverModelMutation

type VoiceoverModelMutation struct {
	// contains filtered or unexported fields
}

VoiceoverModelMutation represents an operation that mutates the VoiceoverModel nodes in the graph.

func (*VoiceoverModelMutation) AddField

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) AddVoiceoverIDs

func (m *VoiceoverModelMutation) AddVoiceoverIDs(ids ...uuid.UUID)

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by ids.

func (*VoiceoverModelMutation) AddVoiceoverSpeakerIDs

func (m *VoiceoverModelMutation) AddVoiceoverSpeakerIDs(ids ...uuid.UUID)

AddVoiceoverSpeakerIDs adds the "voiceover_speakers" edge to the VoiceoverSpeaker entity by ids.

func (*VoiceoverModelMutation) AddedEdges

func (m *VoiceoverModelMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VoiceoverModelMutation) AddedField

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) AddedFields

func (m *VoiceoverModelMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VoiceoverModelMutation) AddedIDs

func (m *VoiceoverModelMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VoiceoverModelMutation) ClearEdge

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) ClearField

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) ClearVoiceoverSpeakers

func (m *VoiceoverModelMutation) ClearVoiceoverSpeakers()

ClearVoiceoverSpeakers clears the "voiceover_speakers" edge to the VoiceoverSpeaker entity.

func (*VoiceoverModelMutation) ClearVoiceovers

func (m *VoiceoverModelMutation) ClearVoiceovers()

ClearVoiceovers clears the "voiceovers" edge to the Voiceover entity.

func (*VoiceoverModelMutation) ClearedEdges

func (m *VoiceoverModelMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VoiceoverModelMutation) ClearedFields

func (m *VoiceoverModelMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VoiceoverModelMutation) Client

func (m VoiceoverModelMutation) 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 (*VoiceoverModelMutation) CreatedAt

func (m *VoiceoverModelMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*VoiceoverModelMutation) EdgeCleared

func (m *VoiceoverModelMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VoiceoverModelMutation) ExecContext

func (c *VoiceoverModelMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverModelMutation) Field

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) FieldCleared

func (m *VoiceoverModelMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VoiceoverModelMutation) Fields

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) ID

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) 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 (*VoiceoverModelMutation) IsActive

func (m *VoiceoverModelMutation) IsActive() (r bool, exists bool)

IsActive returns the value of the "is_active" field in the mutation.

func (*VoiceoverModelMutation) IsDefault

func (m *VoiceoverModelMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "is_default" field in the mutation.

func (*VoiceoverModelMutation) IsHidden

func (m *VoiceoverModelMutation) IsHidden() (r bool, exists bool)

IsHidden returns the value of the "is_hidden" field in the mutation.

func (*VoiceoverModelMutation) NameInWorker

func (m *VoiceoverModelMutation) NameInWorker() (r string, exists bool)

NameInWorker returns the value of the "name_in_worker" field in the mutation.

func (*VoiceoverModelMutation) OldCreatedAt

func (m *VoiceoverModelMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the VoiceoverModel entity. If the VoiceoverModel 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 (*VoiceoverModelMutation) OldField

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) OldIsActive

func (m *VoiceoverModelMutation) OldIsActive(ctx context.Context) (v bool, err error)

OldIsActive returns the old "is_active" field's value of the VoiceoverModel entity. If the VoiceoverModel 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 (*VoiceoverModelMutation) OldIsDefault

func (m *VoiceoverModelMutation) OldIsDefault(ctx context.Context) (v bool, err error)

OldIsDefault returns the old "is_default" field's value of the VoiceoverModel entity. If the VoiceoverModel 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 (*VoiceoverModelMutation) OldIsHidden

func (m *VoiceoverModelMutation) OldIsHidden(ctx context.Context) (v bool, err error)

OldIsHidden returns the old "is_hidden" field's value of the VoiceoverModel entity. If the VoiceoverModel 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 (*VoiceoverModelMutation) OldNameInWorker

func (m *VoiceoverModelMutation) OldNameInWorker(ctx context.Context) (v string, err error)

OldNameInWorker returns the old "name_in_worker" field's value of the VoiceoverModel entity. If the VoiceoverModel 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 (*VoiceoverModelMutation) OldUpdatedAt

func (m *VoiceoverModelMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the VoiceoverModel entity. If the VoiceoverModel 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 (*VoiceoverModelMutation) Op

func (m *VoiceoverModelMutation) Op() Op

Op returns the operation name.

func (*VoiceoverModelMutation) QueryContext

func (c *VoiceoverModelMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverModelMutation) RemoveVoiceoverIDs

func (m *VoiceoverModelMutation) RemoveVoiceoverIDs(ids ...uuid.UUID)

RemoveVoiceoverIDs removes the "voiceovers" edge to the Voiceover entity by IDs.

func (*VoiceoverModelMutation) RemoveVoiceoverSpeakerIDs

func (m *VoiceoverModelMutation) RemoveVoiceoverSpeakerIDs(ids ...uuid.UUID)

RemoveVoiceoverSpeakerIDs removes the "voiceover_speakers" edge to the VoiceoverSpeaker entity by IDs.

func (*VoiceoverModelMutation) RemovedEdges

func (m *VoiceoverModelMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VoiceoverModelMutation) RemovedIDs

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) RemovedVoiceoverSpeakersIDs

func (m *VoiceoverModelMutation) RemovedVoiceoverSpeakersIDs() (ids []uuid.UUID)

RemovedVoiceoverSpeakers returns the removed IDs of the "voiceover_speakers" edge to the VoiceoverSpeaker entity.

func (*VoiceoverModelMutation) RemovedVoiceoversIDs

func (m *VoiceoverModelMutation) RemovedVoiceoversIDs() (ids []uuid.UUID)

RemovedVoiceovers returns the removed IDs of the "voiceovers" edge to the Voiceover entity.

func (*VoiceoverModelMutation) ResetCreatedAt

func (m *VoiceoverModelMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*VoiceoverModelMutation) ResetEdge

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) ResetField

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) ResetIsActive

func (m *VoiceoverModelMutation) ResetIsActive()

ResetIsActive resets all changes to the "is_active" field.

func (*VoiceoverModelMutation) ResetIsDefault

func (m *VoiceoverModelMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "is_default" field.

func (*VoiceoverModelMutation) ResetIsHidden

func (m *VoiceoverModelMutation) ResetIsHidden()

ResetIsHidden resets all changes to the "is_hidden" field.

func (*VoiceoverModelMutation) ResetNameInWorker

func (m *VoiceoverModelMutation) ResetNameInWorker()

ResetNameInWorker resets all changes to the "name_in_worker" field.

func (*VoiceoverModelMutation) ResetUpdatedAt

func (m *VoiceoverModelMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*VoiceoverModelMutation) ResetVoiceoverSpeakers

func (m *VoiceoverModelMutation) ResetVoiceoverSpeakers()

ResetVoiceoverSpeakers resets all changes to the "voiceover_speakers" edge.

func (*VoiceoverModelMutation) ResetVoiceovers

func (m *VoiceoverModelMutation) ResetVoiceovers()

ResetVoiceovers resets all changes to the "voiceovers" edge.

func (*VoiceoverModelMutation) SetCreatedAt

func (m *VoiceoverModelMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*VoiceoverModelMutation) SetField

func (m *VoiceoverModelMutation) 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 (*VoiceoverModelMutation) SetID

func (m *VoiceoverModelMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of VoiceoverModel entities.

func (*VoiceoverModelMutation) SetIsActive

func (m *VoiceoverModelMutation) SetIsActive(b bool)

SetIsActive sets the "is_active" field.

func (*VoiceoverModelMutation) SetIsDefault

func (m *VoiceoverModelMutation) SetIsDefault(b bool)

SetIsDefault sets the "is_default" field.

func (*VoiceoverModelMutation) SetIsHidden

func (m *VoiceoverModelMutation) SetIsHidden(b bool)

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverModelMutation) SetNameInWorker

func (m *VoiceoverModelMutation) SetNameInWorker(s string)

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverModelMutation) SetOp

func (m *VoiceoverModelMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VoiceoverModelMutation) SetUpdatedAt

func (m *VoiceoverModelMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (VoiceoverModelMutation) Tx

func (m VoiceoverModelMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VoiceoverModelMutation) Type

func (m *VoiceoverModelMutation) Type() string

Type returns the node type of this mutation (VoiceoverModel).

func (*VoiceoverModelMutation) UpdatedAt

func (m *VoiceoverModelMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*VoiceoverModelMutation) VoiceoverSpeakersCleared

func (m *VoiceoverModelMutation) VoiceoverSpeakersCleared() bool

VoiceoverSpeakersCleared reports if the "voiceover_speakers" edge to the VoiceoverSpeaker entity was cleared.

func (*VoiceoverModelMutation) VoiceoverSpeakersIDs

func (m *VoiceoverModelMutation) VoiceoverSpeakersIDs() (ids []uuid.UUID)

VoiceoverSpeakersIDs returns the "voiceover_speakers" edge IDs in the mutation.

func (*VoiceoverModelMutation) VoiceoversCleared

func (m *VoiceoverModelMutation) VoiceoversCleared() bool

VoiceoversCleared reports if the "voiceovers" edge to the Voiceover entity was cleared.

func (*VoiceoverModelMutation) VoiceoversIDs

func (m *VoiceoverModelMutation) VoiceoversIDs() (ids []uuid.UUID)

VoiceoversIDs returns the "voiceovers" edge IDs in the mutation.

func (*VoiceoverModelMutation) Where

Where appends a list predicates to the VoiceoverModelMutation builder.

func (*VoiceoverModelMutation) WhereP

func (m *VoiceoverModelMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VoiceoverModelMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VoiceoverModelQuery

type VoiceoverModelQuery struct {
	// contains filtered or unexported fields
}

VoiceoverModelQuery is the builder for querying VoiceoverModel entities.

func (*VoiceoverModelQuery) Aggregate

func (vmq *VoiceoverModelQuery) Aggregate(fns ...AggregateFunc) *VoiceoverModelSelect

Aggregate returns a VoiceoverModelSelect configured with the given aggregations.

func (*VoiceoverModelQuery) All

All executes the query and returns a list of VoiceoverModels.

func (*VoiceoverModelQuery) AllX

AllX is like All, but panics if an error occurs.

func (*VoiceoverModelQuery) Clone

Clone returns a duplicate of the VoiceoverModelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VoiceoverModelQuery) Count

func (vmq *VoiceoverModelQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VoiceoverModelQuery) CountX

func (vmq *VoiceoverModelQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VoiceoverModelQuery) ExecContext

func (c *VoiceoverModelQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverModelQuery) Exist

func (vmq *VoiceoverModelQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VoiceoverModelQuery) ExistX

func (vmq *VoiceoverModelQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VoiceoverModelQuery) First

First returns the first VoiceoverModel entity from the query. Returns a *NotFoundError when no VoiceoverModel was found.

func (*VoiceoverModelQuery) FirstID

func (vmq *VoiceoverModelQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first VoiceoverModel ID from the query. Returns a *NotFoundError when no VoiceoverModel ID was found.

func (*VoiceoverModelQuery) FirstIDX

func (vmq *VoiceoverModelQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*VoiceoverModelQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*VoiceoverModelQuery) GroupBy

func (vmq *VoiceoverModelQuery) GroupBy(field string, fields ...string) *VoiceoverModelGroupBy

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 {
	NameInWorker string `json:"name_in_worker,omitempty"`
	Count int `json:"count,omitempty"`
}

client.VoiceoverModel.Query().
	GroupBy(voiceovermodel.FieldNameInWorker).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VoiceoverModelQuery) IDs

func (vmq *VoiceoverModelQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of VoiceoverModel IDs.

func (*VoiceoverModelQuery) IDsX

func (vmq *VoiceoverModelQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*VoiceoverModelQuery) Limit

func (vmq *VoiceoverModelQuery) Limit(limit int) *VoiceoverModelQuery

Limit the number of records to be returned by this query.

func (*VoiceoverModelQuery) Modify

func (vmq *VoiceoverModelQuery) Modify(modifiers ...func(s *sql.Selector)) *VoiceoverModelSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*VoiceoverModelQuery) Offset

func (vmq *VoiceoverModelQuery) Offset(offset int) *VoiceoverModelQuery

Offset to start from.

func (*VoiceoverModelQuery) Only

Only returns a single VoiceoverModel entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VoiceoverModel entity is found. Returns a *NotFoundError when no VoiceoverModel entities are found.

func (*VoiceoverModelQuery) OnlyID

func (vmq *VoiceoverModelQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only VoiceoverModel ID in the query. Returns a *NotSingularError when more than one VoiceoverModel ID is found. Returns a *NotFoundError when no entities are found.

func (*VoiceoverModelQuery) OnlyIDX

func (vmq *VoiceoverModelQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VoiceoverModelQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*VoiceoverModelQuery) Order

Order specifies how the records should be ordered.

func (*VoiceoverModelQuery) QueryContext

func (c *VoiceoverModelQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverModelQuery) QueryVoiceoverSpeakers

func (vmq *VoiceoverModelQuery) QueryVoiceoverSpeakers() *VoiceoverSpeakerQuery

QueryVoiceoverSpeakers chains the current query on the "voiceover_speakers" edge.

func (*VoiceoverModelQuery) QueryVoiceovers

func (vmq *VoiceoverModelQuery) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers chains the current query on the "voiceovers" edge.

func (*VoiceoverModelQuery) Select

func (vmq *VoiceoverModelQuery) Select(fields ...string) *VoiceoverModelSelect

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 {
	NameInWorker string `json:"name_in_worker,omitempty"`
}

client.VoiceoverModel.Query().
	Select(voiceovermodel.FieldNameInWorker).
	Scan(ctx, &v)

func (*VoiceoverModelQuery) Unique

func (vmq *VoiceoverModelQuery) Unique(unique bool) *VoiceoverModelQuery

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 (*VoiceoverModelQuery) Where

Where adds a new predicate for the VoiceoverModelQuery builder.

func (*VoiceoverModelQuery) WithVoiceoverSpeakers

func (vmq *VoiceoverModelQuery) WithVoiceoverSpeakers(opts ...func(*VoiceoverSpeakerQuery)) *VoiceoverModelQuery

WithVoiceoverSpeakers tells the query-builder to eager-load the nodes that are connected to the "voiceover_speakers" edge. The optional arguments are used to configure the query builder of the edge.

func (*VoiceoverModelQuery) WithVoiceovers

func (vmq *VoiceoverModelQuery) WithVoiceovers(opts ...func(*VoiceoverQuery)) *VoiceoverModelQuery

WithVoiceovers tells the query-builder to eager-load the nodes that are connected to the "voiceovers" edge. The optional arguments are used to configure the query builder of the edge.

type VoiceoverModelSelect

type VoiceoverModelSelect struct {
	*VoiceoverModelQuery
	// contains filtered or unexported fields
}

VoiceoverModelSelect is the builder for selecting fields of VoiceoverModel entities.

func (*VoiceoverModelSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*VoiceoverModelSelect) Bool

func (s *VoiceoverModelSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelSelect) BoolX

func (s *VoiceoverModelSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VoiceoverModelSelect) Bools

func (s *VoiceoverModelSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelSelect) BoolsX

func (s *VoiceoverModelSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (VoiceoverModelSelect) ExecContext

func (c VoiceoverModelSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverModelSelect) Float64

func (s *VoiceoverModelSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelSelect) Float64X

func (s *VoiceoverModelSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VoiceoverModelSelect) Float64s

func (s *VoiceoverModelSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelSelect) Float64sX

func (s *VoiceoverModelSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VoiceoverModelSelect) Int

func (s *VoiceoverModelSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelSelect) IntX

func (s *VoiceoverModelSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VoiceoverModelSelect) Ints

func (s *VoiceoverModelSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelSelect) IntsX

func (s *VoiceoverModelSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VoiceoverModelSelect) Modify

func (vms *VoiceoverModelSelect) Modify(modifiers ...func(s *sql.Selector)) *VoiceoverModelSelect

Modify adds a query modifier for attaching custom logic to queries.

func (VoiceoverModelSelect) QueryContext

func (c VoiceoverModelSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverModelSelect) Scan

func (vms *VoiceoverModelSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VoiceoverModelSelect) ScanX

func (s *VoiceoverModelSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VoiceoverModelSelect) String

func (s *VoiceoverModelSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelSelect) StringX

func (s *VoiceoverModelSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VoiceoverModelSelect) Strings

func (s *VoiceoverModelSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VoiceoverModelSelect) StringsX

func (s *VoiceoverModelSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VoiceoverModelUpdate

type VoiceoverModelUpdate struct {
	// contains filtered or unexported fields
}

VoiceoverModelUpdate is the builder for updating VoiceoverModel entities.

func (*VoiceoverModelUpdate) AddVoiceoverIDs

func (vmu *VoiceoverModelUpdate) AddVoiceoverIDs(ids ...uuid.UUID) *VoiceoverModelUpdate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*VoiceoverModelUpdate) AddVoiceoverSpeakerIDs

func (vmu *VoiceoverModelUpdate) AddVoiceoverSpeakerIDs(ids ...uuid.UUID) *VoiceoverModelUpdate

AddVoiceoverSpeakerIDs adds the "voiceover_speakers" edge to the VoiceoverSpeaker entity by IDs.

func (*VoiceoverModelUpdate) AddVoiceoverSpeakers

func (vmu *VoiceoverModelUpdate) AddVoiceoverSpeakers(v ...*VoiceoverSpeaker) *VoiceoverModelUpdate

AddVoiceoverSpeakers adds the "voiceover_speakers" edges to the VoiceoverSpeaker entity.

func (*VoiceoverModelUpdate) AddVoiceovers

func (vmu *VoiceoverModelUpdate) AddVoiceovers(v ...*Voiceover) *VoiceoverModelUpdate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*VoiceoverModelUpdate) ClearVoiceoverSpeakers

func (vmu *VoiceoverModelUpdate) ClearVoiceoverSpeakers() *VoiceoverModelUpdate

ClearVoiceoverSpeakers clears all "voiceover_speakers" edges to the VoiceoverSpeaker entity.

func (*VoiceoverModelUpdate) ClearVoiceovers

func (vmu *VoiceoverModelUpdate) ClearVoiceovers() *VoiceoverModelUpdate

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*VoiceoverModelUpdate) Exec

func (vmu *VoiceoverModelUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VoiceoverModelUpdate) ExecContext

func (c *VoiceoverModelUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverModelUpdate) ExecX

func (vmu *VoiceoverModelUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverModelUpdate) Modify

func (vmu *VoiceoverModelUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VoiceoverModelUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VoiceoverModelUpdate) Mutation

Mutation returns the VoiceoverModelMutation object of the builder.

func (*VoiceoverModelUpdate) QueryContext

func (c *VoiceoverModelUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverModelUpdate) RemoveVoiceoverIDs

func (vmu *VoiceoverModelUpdate) RemoveVoiceoverIDs(ids ...uuid.UUID) *VoiceoverModelUpdate

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*VoiceoverModelUpdate) RemoveVoiceoverSpeakerIDs

func (vmu *VoiceoverModelUpdate) RemoveVoiceoverSpeakerIDs(ids ...uuid.UUID) *VoiceoverModelUpdate

RemoveVoiceoverSpeakerIDs removes the "voiceover_speakers" edge to VoiceoverSpeaker entities by IDs.

func (*VoiceoverModelUpdate) RemoveVoiceoverSpeakers

func (vmu *VoiceoverModelUpdate) RemoveVoiceoverSpeakers(v ...*VoiceoverSpeaker) *VoiceoverModelUpdate

RemoveVoiceoverSpeakers removes "voiceover_speakers" edges to VoiceoverSpeaker entities.

func (*VoiceoverModelUpdate) RemoveVoiceovers

func (vmu *VoiceoverModelUpdate) RemoveVoiceovers(v ...*Voiceover) *VoiceoverModelUpdate

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*VoiceoverModelUpdate) Save

func (vmu *VoiceoverModelUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VoiceoverModelUpdate) SaveX

func (vmu *VoiceoverModelUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VoiceoverModelUpdate) SetIsActive

func (vmu *VoiceoverModelUpdate) SetIsActive(b bool) *VoiceoverModelUpdate

SetIsActive sets the "is_active" field.

func (*VoiceoverModelUpdate) SetIsDefault

func (vmu *VoiceoverModelUpdate) SetIsDefault(b bool) *VoiceoverModelUpdate

SetIsDefault sets the "is_default" field.

func (*VoiceoverModelUpdate) SetIsHidden

func (vmu *VoiceoverModelUpdate) SetIsHidden(b bool) *VoiceoverModelUpdate

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverModelUpdate) SetNameInWorker

func (vmu *VoiceoverModelUpdate) SetNameInWorker(s string) *VoiceoverModelUpdate

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverModelUpdate) SetNillableIsActive

func (vmu *VoiceoverModelUpdate) SetNillableIsActive(b *bool) *VoiceoverModelUpdate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*VoiceoverModelUpdate) SetNillableIsDefault

func (vmu *VoiceoverModelUpdate) SetNillableIsDefault(b *bool) *VoiceoverModelUpdate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*VoiceoverModelUpdate) SetNillableIsHidden

func (vmu *VoiceoverModelUpdate) SetNillableIsHidden(b *bool) *VoiceoverModelUpdate

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*VoiceoverModelUpdate) SetUpdatedAt

func (vmu *VoiceoverModelUpdate) SetUpdatedAt(t time.Time) *VoiceoverModelUpdate

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverModelUpdate) Where

Where appends a list predicates to the VoiceoverModelUpdate builder.

type VoiceoverModelUpdateOne

type VoiceoverModelUpdateOne struct {
	// contains filtered or unexported fields
}

VoiceoverModelUpdateOne is the builder for updating a single VoiceoverModel entity.

func (*VoiceoverModelUpdateOne) AddVoiceoverIDs

func (vmuo *VoiceoverModelUpdateOne) AddVoiceoverIDs(ids ...uuid.UUID) *VoiceoverModelUpdateOne

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*VoiceoverModelUpdateOne) AddVoiceoverSpeakerIDs

func (vmuo *VoiceoverModelUpdateOne) AddVoiceoverSpeakerIDs(ids ...uuid.UUID) *VoiceoverModelUpdateOne

AddVoiceoverSpeakerIDs adds the "voiceover_speakers" edge to the VoiceoverSpeaker entity by IDs.

func (*VoiceoverModelUpdateOne) AddVoiceoverSpeakers

func (vmuo *VoiceoverModelUpdateOne) AddVoiceoverSpeakers(v ...*VoiceoverSpeaker) *VoiceoverModelUpdateOne

AddVoiceoverSpeakers adds the "voiceover_speakers" edges to the VoiceoverSpeaker entity.

func (*VoiceoverModelUpdateOne) AddVoiceovers

func (vmuo *VoiceoverModelUpdateOne) AddVoiceovers(v ...*Voiceover) *VoiceoverModelUpdateOne

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*VoiceoverModelUpdateOne) ClearVoiceoverSpeakers

func (vmuo *VoiceoverModelUpdateOne) ClearVoiceoverSpeakers() *VoiceoverModelUpdateOne

ClearVoiceoverSpeakers clears all "voiceover_speakers" edges to the VoiceoverSpeaker entity.

func (*VoiceoverModelUpdateOne) ClearVoiceovers

func (vmuo *VoiceoverModelUpdateOne) ClearVoiceovers() *VoiceoverModelUpdateOne

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*VoiceoverModelUpdateOne) Exec

func (vmuo *VoiceoverModelUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*VoiceoverModelUpdateOne) ExecContext

func (c *VoiceoverModelUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverModelUpdateOne) ExecX

func (vmuo *VoiceoverModelUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverModelUpdateOne) Modify

func (vmuo *VoiceoverModelUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VoiceoverModelUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VoiceoverModelUpdateOne) Mutation

Mutation returns the VoiceoverModelMutation object of the builder.

func (*VoiceoverModelUpdateOne) QueryContext

func (c *VoiceoverModelUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverModelUpdateOne) RemoveVoiceoverIDs

func (vmuo *VoiceoverModelUpdateOne) RemoveVoiceoverIDs(ids ...uuid.UUID) *VoiceoverModelUpdateOne

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*VoiceoverModelUpdateOne) RemoveVoiceoverSpeakerIDs

func (vmuo *VoiceoverModelUpdateOne) RemoveVoiceoverSpeakerIDs(ids ...uuid.UUID) *VoiceoverModelUpdateOne

RemoveVoiceoverSpeakerIDs removes the "voiceover_speakers" edge to VoiceoverSpeaker entities by IDs.

func (*VoiceoverModelUpdateOne) RemoveVoiceoverSpeakers

func (vmuo *VoiceoverModelUpdateOne) RemoveVoiceoverSpeakers(v ...*VoiceoverSpeaker) *VoiceoverModelUpdateOne

RemoveVoiceoverSpeakers removes "voiceover_speakers" edges to VoiceoverSpeaker entities.

func (*VoiceoverModelUpdateOne) RemoveVoiceovers

func (vmuo *VoiceoverModelUpdateOne) RemoveVoiceovers(v ...*Voiceover) *VoiceoverModelUpdateOne

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*VoiceoverModelUpdateOne) Save

Save executes the query and returns the updated VoiceoverModel entity.

func (*VoiceoverModelUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*VoiceoverModelUpdateOne) Select

func (vmuo *VoiceoverModelUpdateOne) Select(field string, fields ...string) *VoiceoverModelUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VoiceoverModelUpdateOne) SetIsActive

SetIsActive sets the "is_active" field.

func (*VoiceoverModelUpdateOne) SetIsDefault

func (vmuo *VoiceoverModelUpdateOne) SetIsDefault(b bool) *VoiceoverModelUpdateOne

SetIsDefault sets the "is_default" field.

func (*VoiceoverModelUpdateOne) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverModelUpdateOne) SetNameInWorker

func (vmuo *VoiceoverModelUpdateOne) SetNameInWorker(s string) *VoiceoverModelUpdateOne

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverModelUpdateOne) SetNillableIsActive

func (vmuo *VoiceoverModelUpdateOne) SetNillableIsActive(b *bool) *VoiceoverModelUpdateOne

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*VoiceoverModelUpdateOne) SetNillableIsDefault

func (vmuo *VoiceoverModelUpdateOne) SetNillableIsDefault(b *bool) *VoiceoverModelUpdateOne

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*VoiceoverModelUpdateOne) SetNillableIsHidden

func (vmuo *VoiceoverModelUpdateOne) SetNillableIsHidden(b *bool) *VoiceoverModelUpdateOne

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*VoiceoverModelUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type VoiceoverModelUpsert

type VoiceoverModelUpsert struct {
	*sql.UpdateSet
}

VoiceoverModelUpsert is the "OnConflict" setter.

func (*VoiceoverModelUpsert) SetIsActive

func (u *VoiceoverModelUpsert) SetIsActive(v bool) *VoiceoverModelUpsert

SetIsActive sets the "is_active" field.

func (*VoiceoverModelUpsert) SetIsDefault

func (u *VoiceoverModelUpsert) SetIsDefault(v bool) *VoiceoverModelUpsert

SetIsDefault sets the "is_default" field.

func (*VoiceoverModelUpsert) SetIsHidden

func (u *VoiceoverModelUpsert) SetIsHidden(v bool) *VoiceoverModelUpsert

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverModelUpsert) SetNameInWorker

func (u *VoiceoverModelUpsert) SetNameInWorker(v string) *VoiceoverModelUpsert

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverModelUpsert) SetUpdatedAt

func (u *VoiceoverModelUpsert) SetUpdatedAt(v time.Time) *VoiceoverModelUpsert

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverModelUpsert) UpdateIsActive

func (u *VoiceoverModelUpsert) UpdateIsActive() *VoiceoverModelUpsert

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*VoiceoverModelUpsert) UpdateIsDefault

func (u *VoiceoverModelUpsert) UpdateIsDefault() *VoiceoverModelUpsert

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*VoiceoverModelUpsert) UpdateIsHidden

func (u *VoiceoverModelUpsert) UpdateIsHidden() *VoiceoverModelUpsert

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*VoiceoverModelUpsert) UpdateNameInWorker

func (u *VoiceoverModelUpsert) UpdateNameInWorker() *VoiceoverModelUpsert

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*VoiceoverModelUpsert) UpdateUpdatedAt

func (u *VoiceoverModelUpsert) UpdateUpdatedAt() *VoiceoverModelUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type VoiceoverModelUpsertBulk

type VoiceoverModelUpsertBulk struct {
	// contains filtered or unexported fields
}

VoiceoverModelUpsertBulk is the builder for "upsert"-ing a bulk of VoiceoverModel nodes.

func (*VoiceoverModelUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VoiceoverModelUpsertBulk) Exec

Exec executes the query.

func (*VoiceoverModelUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverModelUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VoiceoverModel.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VoiceoverModelUpsertBulk) SetIsActive

SetIsActive sets the "is_active" field.

func (*VoiceoverModelUpsertBulk) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*VoiceoverModelUpsertBulk) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverModelUpsertBulk) SetNameInWorker

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverModelUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverModelUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VoiceoverModelCreateBulk.OnConflict documentation for more info.

func (*VoiceoverModelUpsertBulk) UpdateIsActive

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*VoiceoverModelUpsertBulk) UpdateIsDefault

func (u *VoiceoverModelUpsertBulk) UpdateIsDefault() *VoiceoverModelUpsertBulk

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*VoiceoverModelUpsertBulk) UpdateIsHidden

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*VoiceoverModelUpsertBulk) UpdateNameInWorker

func (u *VoiceoverModelUpsertBulk) UpdateNameInWorker() *VoiceoverModelUpsertBulk

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*VoiceoverModelUpsertBulk) UpdateNewValues

func (u *VoiceoverModelUpsertBulk) UpdateNewValues() *VoiceoverModelUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.VoiceoverModel.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(voiceovermodel.FieldID)
		}),
	).
	Exec(ctx)

func (*VoiceoverModelUpsertBulk) UpdateUpdatedAt

func (u *VoiceoverModelUpsertBulk) UpdateUpdatedAt() *VoiceoverModelUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type VoiceoverModelUpsertOne

type VoiceoverModelUpsertOne struct {
	// contains filtered or unexported fields
}

VoiceoverModelUpsertOne is the builder for "upsert"-ing

one VoiceoverModel node.

func (*VoiceoverModelUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VoiceoverModelUpsertOne) Exec

Exec executes the query.

func (*VoiceoverModelUpsertOne) ExecX

func (u *VoiceoverModelUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverModelUpsertOne) ID

func (u *VoiceoverModelUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VoiceoverModelUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VoiceoverModelUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VoiceoverModel.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VoiceoverModelUpsertOne) SetIsActive

SetIsActive sets the "is_active" field.

func (*VoiceoverModelUpsertOne) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*VoiceoverModelUpsertOne) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverModelUpsertOne) SetNameInWorker

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverModelUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverModelUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the VoiceoverModelCreate.OnConflict documentation for more info.

func (*VoiceoverModelUpsertOne) UpdateIsActive

func (u *VoiceoverModelUpsertOne) UpdateIsActive() *VoiceoverModelUpsertOne

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*VoiceoverModelUpsertOne) UpdateIsDefault

func (u *VoiceoverModelUpsertOne) UpdateIsDefault() *VoiceoverModelUpsertOne

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*VoiceoverModelUpsertOne) UpdateIsHidden

func (u *VoiceoverModelUpsertOne) UpdateIsHidden() *VoiceoverModelUpsertOne

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*VoiceoverModelUpsertOne) UpdateNameInWorker

func (u *VoiceoverModelUpsertOne) UpdateNameInWorker() *VoiceoverModelUpsertOne

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*VoiceoverModelUpsertOne) UpdateNewValues

func (u *VoiceoverModelUpsertOne) UpdateNewValues() *VoiceoverModelUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.VoiceoverModel.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(voiceovermodel.FieldID)
		}),
	).
	Exec(ctx)

func (*VoiceoverModelUpsertOne) UpdateUpdatedAt

func (u *VoiceoverModelUpsertOne) UpdateUpdatedAt() *VoiceoverModelUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type VoiceoverModels

type VoiceoverModels []*VoiceoverModel

VoiceoverModels is a parsable slice of VoiceoverModel.

type VoiceoverMutation

type VoiceoverMutation struct {
	// contains filtered or unexported fields
}

VoiceoverMutation represents an operation that mutates the Voiceover nodes in the graph.

func (*VoiceoverMutation) APITokenID

func (m *VoiceoverMutation) APITokenID() (r uuid.UUID, exists bool)

APITokenID returns the value of the "api_token_id" field in the mutation.

func (*VoiceoverMutation) APITokenIDCleared

func (m *VoiceoverMutation) APITokenIDCleared() bool

APITokenIDCleared returns if the "api_token_id" field was cleared in this mutation.

func (*VoiceoverMutation) APITokensCleared

func (m *VoiceoverMutation) APITokensCleared() bool

APITokensCleared reports if the "api_tokens" edge to the ApiToken entity was cleared.

func (*VoiceoverMutation) APITokensID

func (m *VoiceoverMutation) APITokensID() (id uuid.UUID, exists bool)

APITokensID returns the "api_tokens" edge ID in the mutation.

func (*VoiceoverMutation) APITokensIDs

func (m *VoiceoverMutation) APITokensIDs() (ids []uuid.UUID)

APITokensIDs returns the "api_tokens" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use APITokensID instead. It exists only for internal usage by the builders.

func (*VoiceoverMutation) AddCost

func (m *VoiceoverMutation) AddCost(i int32)

AddCost adds i to the "cost" field.

func (*VoiceoverMutation) AddField

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) AddSeed

func (m *VoiceoverMutation) AddSeed(i int)

AddSeed adds i to the "seed" field.

func (*VoiceoverMutation) AddTemperature

func (m *VoiceoverMutation) AddTemperature(f float32)

AddTemperature adds f to the "temperature" field.

func (*VoiceoverMutation) AddVoiceoverOutputIDs

func (m *VoiceoverMutation) AddVoiceoverOutputIDs(ids ...uuid.UUID)

AddVoiceoverOutputIDs adds the "voiceover_outputs" edge to the VoiceoverOutput entity by ids.

func (*VoiceoverMutation) AddedCost

func (m *VoiceoverMutation) AddedCost() (r int32, exists bool)

AddedCost returns the value that was added to the "cost" field in this mutation.

func (*VoiceoverMutation) AddedEdges

func (m *VoiceoverMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VoiceoverMutation) AddedField

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) AddedFields

func (m *VoiceoverMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VoiceoverMutation) AddedIDs

func (m *VoiceoverMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VoiceoverMutation) AddedSeed

func (m *VoiceoverMutation) AddedSeed() (r int, exists bool)

AddedSeed returns the value that was added to the "seed" field in this mutation.

func (*VoiceoverMutation) AddedTemperature

func (m *VoiceoverMutation) AddedTemperature() (r float32, exists bool)

AddedTemperature returns the value that was added to the "temperature" field in this mutation.

func (*VoiceoverMutation) ClearAPITokenID

func (m *VoiceoverMutation) ClearAPITokenID()

ClearAPITokenID clears the value of the "api_token_id" field.

func (*VoiceoverMutation) ClearAPITokens

func (m *VoiceoverMutation) ClearAPITokens()

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*VoiceoverMutation) ClearCompletedAt

func (m *VoiceoverMutation) ClearCompletedAt()

ClearCompletedAt clears the value of the "completed_at" field.

func (*VoiceoverMutation) ClearCountryCode

func (m *VoiceoverMutation) ClearCountryCode()

ClearCountryCode clears the value of the "country_code" field.

func (*VoiceoverMutation) ClearDeviceInfo

func (m *VoiceoverMutation) ClearDeviceInfo()

ClearDeviceInfo clears the "device_info" edge to the DeviceInfo entity.

func (*VoiceoverMutation) ClearEdge

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) ClearFailureReason

func (m *VoiceoverMutation) ClearFailureReason()

ClearFailureReason clears the value of the "failure_reason" field.

func (*VoiceoverMutation) ClearField

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) ClearPrompt

func (m *VoiceoverMutation) ClearPrompt()

ClearPrompt clears the "prompt" edge to the Prompt entity.

func (*VoiceoverMutation) ClearPromptID

func (m *VoiceoverMutation) ClearPromptID()

ClearPromptID clears the value of the "prompt_id" field.

func (*VoiceoverMutation) ClearStartedAt

func (m *VoiceoverMutation) ClearStartedAt()

ClearStartedAt clears the value of the "started_at" field.

func (*VoiceoverMutation) ClearStripeProductID

func (m *VoiceoverMutation) ClearStripeProductID()

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*VoiceoverMutation) ClearUser

func (m *VoiceoverMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*VoiceoverMutation) ClearVoiceoverModels

func (m *VoiceoverMutation) ClearVoiceoverModels()

ClearVoiceoverModels clears the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverMutation) ClearVoiceoverOutputs

func (m *VoiceoverMutation) ClearVoiceoverOutputs()

ClearVoiceoverOutputs clears the "voiceover_outputs" edge to the VoiceoverOutput entity.

func (*VoiceoverMutation) ClearVoiceoverSpeakers

func (m *VoiceoverMutation) ClearVoiceoverSpeakers()

ClearVoiceoverSpeakers clears the "voiceover_speakers" edge to the VoiceoverSpeaker entity.

func (*VoiceoverMutation) ClearedEdges

func (m *VoiceoverMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VoiceoverMutation) ClearedFields

func (m *VoiceoverMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VoiceoverMutation) Client

func (m VoiceoverMutation) 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 (*VoiceoverMutation) CompletedAt

func (m *VoiceoverMutation) CompletedAt() (r time.Time, exists bool)

CompletedAt returns the value of the "completed_at" field in the mutation.

func (*VoiceoverMutation) CompletedAtCleared

func (m *VoiceoverMutation) CompletedAtCleared() bool

CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.

func (*VoiceoverMutation) Cost

func (m *VoiceoverMutation) Cost() (r int32, exists bool)

Cost returns the value of the "cost" field in the mutation.

func (*VoiceoverMutation) CountryCode

func (m *VoiceoverMutation) CountryCode() (r string, exists bool)

CountryCode returns the value of the "country_code" field in the mutation.

func (*VoiceoverMutation) CountryCodeCleared

func (m *VoiceoverMutation) CountryCodeCleared() bool

CountryCodeCleared returns if the "country_code" field was cleared in this mutation.

func (*VoiceoverMutation) CreatedAt

func (m *VoiceoverMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*VoiceoverMutation) DenoiseAudio

func (m *VoiceoverMutation) DenoiseAudio() (r bool, exists bool)

DenoiseAudio returns the value of the "denoise_audio" field in the mutation.

func (*VoiceoverMutation) DeviceInfoCleared

func (m *VoiceoverMutation) DeviceInfoCleared() bool

DeviceInfoCleared reports if the "device_info" edge to the DeviceInfo entity was cleared.

func (*VoiceoverMutation) DeviceInfoID

func (m *VoiceoverMutation) DeviceInfoID() (r uuid.UUID, exists bool)

DeviceInfoID returns the value of the "device_info_id" field in the mutation.

func (*VoiceoverMutation) DeviceInfoIDs

func (m *VoiceoverMutation) DeviceInfoIDs() (ids []uuid.UUID)

DeviceInfoIDs returns the "device_info" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeviceInfoID instead. It exists only for internal usage by the builders.

func (*VoiceoverMutation) EdgeCleared

func (m *VoiceoverMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VoiceoverMutation) ExecContext

func (c *VoiceoverMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverMutation) FailureReason

func (m *VoiceoverMutation) FailureReason() (r string, exists bool)

FailureReason returns the value of the "failure_reason" field in the mutation.

func (*VoiceoverMutation) FailureReasonCleared

func (m *VoiceoverMutation) FailureReasonCleared() bool

FailureReasonCleared returns if the "failure_reason" field was cleared in this mutation.

func (*VoiceoverMutation) Field

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) FieldCleared

func (m *VoiceoverMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VoiceoverMutation) Fields

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) ID

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) IDs

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) ModelID

func (m *VoiceoverMutation) ModelID() (r uuid.UUID, exists bool)

ModelID returns the value of the "model_id" field in the mutation.

func (*VoiceoverMutation) OldAPITokenID

func (m *VoiceoverMutation) OldAPITokenID(ctx context.Context) (v *uuid.UUID, err error)

OldAPITokenID returns the old "api_token_id" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldCompletedAt

func (m *VoiceoverMutation) OldCompletedAt(ctx context.Context) (v *time.Time, err error)

OldCompletedAt returns the old "completed_at" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldCost

func (m *VoiceoverMutation) OldCost(ctx context.Context) (v int32, err error)

OldCost returns the old "cost" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldCountryCode

func (m *VoiceoverMutation) OldCountryCode(ctx context.Context) (v *string, err error)

OldCountryCode returns the old "country_code" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldCreatedAt

func (m *VoiceoverMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldDenoiseAudio

func (m *VoiceoverMutation) OldDenoiseAudio(ctx context.Context) (v bool, err error)

OldDenoiseAudio returns the old "denoise_audio" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldDeviceInfoID

func (m *VoiceoverMutation) OldDeviceInfoID(ctx context.Context) (v uuid.UUID, err error)

OldDeviceInfoID returns the old "device_info_id" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldFailureReason

func (m *VoiceoverMutation) OldFailureReason(ctx context.Context) (v *string, err error)

OldFailureReason returns the old "failure_reason" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldField

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) OldModelID

func (m *VoiceoverMutation) OldModelID(ctx context.Context) (v uuid.UUID, err error)

OldModelID returns the old "model_id" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldPromptID

func (m *VoiceoverMutation) OldPromptID(ctx context.Context) (v *uuid.UUID, err error)

OldPromptID returns the old "prompt_id" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldRemoveSilence

func (m *VoiceoverMutation) OldRemoveSilence(ctx context.Context) (v bool, err error)

OldRemoveSilence returns the old "remove_silence" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldSeed

func (m *VoiceoverMutation) OldSeed(ctx context.Context) (v int, err error)

OldSeed returns the old "seed" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldSourceType

func (m *VoiceoverMutation) OldSourceType(ctx context.Context) (v enttypes.SourceType, err error)

OldSourceType returns the old "source_type" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldSpeakerID

func (m *VoiceoverMutation) OldSpeakerID(ctx context.Context) (v uuid.UUID, err error)

OldSpeakerID returns the old "speaker_id" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldStartedAt

func (m *VoiceoverMutation) OldStartedAt(ctx context.Context) (v *time.Time, err error)

OldStartedAt returns the old "started_at" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldStatus

func (m *VoiceoverMutation) OldStatus(ctx context.Context) (v voiceover.Status, err error)

OldStatus returns the old "status" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldStripeProductID

func (m *VoiceoverMutation) OldStripeProductID(ctx context.Context) (v *string, err error)

OldStripeProductID returns the old "stripe_product_id" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldTemperature

func (m *VoiceoverMutation) OldTemperature(ctx context.Context) (v float32, err error)

OldTemperature returns the old "temperature" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldUpdatedAt

func (m *VoiceoverMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldUserID

func (m *VoiceoverMutation) OldUserID(ctx context.Context) (v uuid.UUID, err error)

OldUserID returns the old "user_id" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) OldWasAutoSubmitted

func (m *VoiceoverMutation) OldWasAutoSubmitted(ctx context.Context) (v bool, err error)

OldWasAutoSubmitted returns the old "was_auto_submitted" field's value of the Voiceover entity. If the Voiceover 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 (*VoiceoverMutation) Op

func (m *VoiceoverMutation) Op() Op

Op returns the operation name.

func (*VoiceoverMutation) PromptCleared

func (m *VoiceoverMutation) PromptCleared() bool

PromptCleared reports if the "prompt" edge to the Prompt entity was cleared.

func (*VoiceoverMutation) PromptID

func (m *VoiceoverMutation) PromptID() (r uuid.UUID, exists bool)

PromptID returns the value of the "prompt_id" field in the mutation.

func (*VoiceoverMutation) PromptIDCleared

func (m *VoiceoverMutation) PromptIDCleared() bool

PromptIDCleared returns if the "prompt_id" field was cleared in this mutation.

func (*VoiceoverMutation) PromptIDs

func (m *VoiceoverMutation) PromptIDs() (ids []uuid.UUID)

PromptIDs returns the "prompt" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PromptID instead. It exists only for internal usage by the builders.

func (*VoiceoverMutation) QueryContext

func (c *VoiceoverMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverMutation) RemoveSilence

func (m *VoiceoverMutation) RemoveSilence() (r bool, exists bool)

RemoveSilence returns the value of the "remove_silence" field in the mutation.

func (*VoiceoverMutation) RemoveVoiceoverOutputIDs

func (m *VoiceoverMutation) RemoveVoiceoverOutputIDs(ids ...uuid.UUID)

RemoveVoiceoverOutputIDs removes the "voiceover_outputs" edge to the VoiceoverOutput entity by IDs.

func (*VoiceoverMutation) RemovedEdges

func (m *VoiceoverMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VoiceoverMutation) RemovedIDs

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) RemovedVoiceoverOutputsIDs

func (m *VoiceoverMutation) RemovedVoiceoverOutputsIDs() (ids []uuid.UUID)

RemovedVoiceoverOutputs returns the removed IDs of the "voiceover_outputs" edge to the VoiceoverOutput entity.

func (*VoiceoverMutation) ResetAPITokenID

func (m *VoiceoverMutation) ResetAPITokenID()

ResetAPITokenID resets all changes to the "api_token_id" field.

func (*VoiceoverMutation) ResetAPITokens

func (m *VoiceoverMutation) ResetAPITokens()

ResetAPITokens resets all changes to the "api_tokens" edge.

func (*VoiceoverMutation) ResetCompletedAt

func (m *VoiceoverMutation) ResetCompletedAt()

ResetCompletedAt resets all changes to the "completed_at" field.

func (*VoiceoverMutation) ResetCost

func (m *VoiceoverMutation) ResetCost()

ResetCost resets all changes to the "cost" field.

func (*VoiceoverMutation) ResetCountryCode

func (m *VoiceoverMutation) ResetCountryCode()

ResetCountryCode resets all changes to the "country_code" field.

func (*VoiceoverMutation) ResetCreatedAt

func (m *VoiceoverMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*VoiceoverMutation) ResetDenoiseAudio

func (m *VoiceoverMutation) ResetDenoiseAudio()

ResetDenoiseAudio resets all changes to the "denoise_audio" field.

func (*VoiceoverMutation) ResetDeviceInfo

func (m *VoiceoverMutation) ResetDeviceInfo()

ResetDeviceInfo resets all changes to the "device_info" edge.

func (*VoiceoverMutation) ResetDeviceInfoID

func (m *VoiceoverMutation) ResetDeviceInfoID()

ResetDeviceInfoID resets all changes to the "device_info_id" field.

func (*VoiceoverMutation) ResetEdge

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) ResetFailureReason

func (m *VoiceoverMutation) ResetFailureReason()

ResetFailureReason resets all changes to the "failure_reason" field.

func (*VoiceoverMutation) ResetField

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) ResetModelID

func (m *VoiceoverMutation) ResetModelID()

ResetModelID resets all changes to the "model_id" field.

func (*VoiceoverMutation) ResetPrompt

func (m *VoiceoverMutation) ResetPrompt()

ResetPrompt resets all changes to the "prompt" edge.

func (*VoiceoverMutation) ResetPromptID

func (m *VoiceoverMutation) ResetPromptID()

ResetPromptID resets all changes to the "prompt_id" field.

func (*VoiceoverMutation) ResetRemoveSilence

func (m *VoiceoverMutation) ResetRemoveSilence()

ResetRemoveSilence resets all changes to the "remove_silence" field.

func (*VoiceoverMutation) ResetSeed

func (m *VoiceoverMutation) ResetSeed()

ResetSeed resets all changes to the "seed" field.

func (*VoiceoverMutation) ResetSourceType

func (m *VoiceoverMutation) ResetSourceType()

ResetSourceType resets all changes to the "source_type" field.

func (*VoiceoverMutation) ResetSpeakerID

func (m *VoiceoverMutation) ResetSpeakerID()

ResetSpeakerID resets all changes to the "speaker_id" field.

func (*VoiceoverMutation) ResetStartedAt

func (m *VoiceoverMutation) ResetStartedAt()

ResetStartedAt resets all changes to the "started_at" field.

func (*VoiceoverMutation) ResetStatus

func (m *VoiceoverMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*VoiceoverMutation) ResetStripeProductID

func (m *VoiceoverMutation) ResetStripeProductID()

ResetStripeProductID resets all changes to the "stripe_product_id" field.

func (*VoiceoverMutation) ResetTemperature

func (m *VoiceoverMutation) ResetTemperature()

ResetTemperature resets all changes to the "temperature" field.

func (*VoiceoverMutation) ResetUpdatedAt

func (m *VoiceoverMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*VoiceoverMutation) ResetUser

func (m *VoiceoverMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*VoiceoverMutation) ResetUserID

func (m *VoiceoverMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*VoiceoverMutation) ResetVoiceoverModels

func (m *VoiceoverMutation) ResetVoiceoverModels()

ResetVoiceoverModels resets all changes to the "voiceover_models" edge.

func (*VoiceoverMutation) ResetVoiceoverOutputs

func (m *VoiceoverMutation) ResetVoiceoverOutputs()

ResetVoiceoverOutputs resets all changes to the "voiceover_outputs" edge.

func (*VoiceoverMutation) ResetVoiceoverSpeakers

func (m *VoiceoverMutation) ResetVoiceoverSpeakers()

ResetVoiceoverSpeakers resets all changes to the "voiceover_speakers" edge.

func (*VoiceoverMutation) ResetWasAutoSubmitted

func (m *VoiceoverMutation) ResetWasAutoSubmitted()

ResetWasAutoSubmitted resets all changes to the "was_auto_submitted" field.

func (*VoiceoverMutation) Seed

func (m *VoiceoverMutation) Seed() (r int, exists bool)

Seed returns the value of the "seed" field in the mutation.

func (*VoiceoverMutation) SetAPITokenID

func (m *VoiceoverMutation) SetAPITokenID(u uuid.UUID)

SetAPITokenID sets the "api_token_id" field.

func (*VoiceoverMutation) SetAPITokensID

func (m *VoiceoverMutation) SetAPITokensID(id uuid.UUID)

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by id.

func (*VoiceoverMutation) SetCompletedAt

func (m *VoiceoverMutation) SetCompletedAt(t time.Time)

SetCompletedAt sets the "completed_at" field.

func (*VoiceoverMutation) SetCost

func (m *VoiceoverMutation) SetCost(i int32)

SetCost sets the "cost" field.

func (*VoiceoverMutation) SetCountryCode

func (m *VoiceoverMutation) SetCountryCode(s string)

SetCountryCode sets the "country_code" field.

func (*VoiceoverMutation) SetCreatedAt

func (m *VoiceoverMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*VoiceoverMutation) SetDenoiseAudio

func (m *VoiceoverMutation) SetDenoiseAudio(b bool)

SetDenoiseAudio sets the "denoise_audio" field.

func (*VoiceoverMutation) SetDeviceInfoID

func (m *VoiceoverMutation) SetDeviceInfoID(u uuid.UUID)

SetDeviceInfoID sets the "device_info_id" field.

func (*VoiceoverMutation) SetFailureReason

func (m *VoiceoverMutation) SetFailureReason(s string)

SetFailureReason sets the "failure_reason" field.

func (*VoiceoverMutation) SetField

func (m *VoiceoverMutation) 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 (*VoiceoverMutation) SetID

func (m *VoiceoverMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Voiceover entities.

func (*VoiceoverMutation) SetModelID

func (m *VoiceoverMutation) SetModelID(u uuid.UUID)

SetModelID sets the "model_id" field.

func (*VoiceoverMutation) SetOp

func (m *VoiceoverMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VoiceoverMutation) SetPromptID

func (m *VoiceoverMutation) SetPromptID(u uuid.UUID)

SetPromptID sets the "prompt_id" field.

func (*VoiceoverMutation) SetRemoveSilence

func (m *VoiceoverMutation) SetRemoveSilence(b bool)

SetRemoveSilence sets the "remove_silence" field.

func (*VoiceoverMutation) SetSeed

func (m *VoiceoverMutation) SetSeed(i int)

SetSeed sets the "seed" field.

func (*VoiceoverMutation) SetSourceType

func (m *VoiceoverMutation) SetSourceType(et enttypes.SourceType)

SetSourceType sets the "source_type" field.

func (*VoiceoverMutation) SetSpeakerID

func (m *VoiceoverMutation) SetSpeakerID(u uuid.UUID)

SetSpeakerID sets the "speaker_id" field.

func (*VoiceoverMutation) SetStartedAt

func (m *VoiceoverMutation) SetStartedAt(t time.Time)

SetStartedAt sets the "started_at" field.

func (*VoiceoverMutation) SetStatus

func (m *VoiceoverMutation) SetStatus(v voiceover.Status)

SetStatus sets the "status" field.

func (*VoiceoverMutation) SetStripeProductID

func (m *VoiceoverMutation) SetStripeProductID(s string)

SetStripeProductID sets the "stripe_product_id" field.

func (*VoiceoverMutation) SetTemperature

func (m *VoiceoverMutation) SetTemperature(f float32)

SetTemperature sets the "temperature" field.

func (*VoiceoverMutation) SetUpdatedAt

func (m *VoiceoverMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverMutation) SetUserID

func (m *VoiceoverMutation) SetUserID(u uuid.UUID)

SetUserID sets the "user_id" field.

func (*VoiceoverMutation) SetVoiceoverModelsID

func (m *VoiceoverMutation) SetVoiceoverModelsID(id uuid.UUID)

SetVoiceoverModelsID sets the "voiceover_models" edge to the VoiceoverModel entity by id.

func (*VoiceoverMutation) SetVoiceoverSpeakersID

func (m *VoiceoverMutation) SetVoiceoverSpeakersID(id uuid.UUID)

SetVoiceoverSpeakersID sets the "voiceover_speakers" edge to the VoiceoverSpeaker entity by id.

func (*VoiceoverMutation) SetWasAutoSubmitted

func (m *VoiceoverMutation) SetWasAutoSubmitted(b bool)

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*VoiceoverMutation) SourceType

func (m *VoiceoverMutation) SourceType() (r enttypes.SourceType, exists bool)

SourceType returns the value of the "source_type" field in the mutation.

func (*VoiceoverMutation) SpeakerID

func (m *VoiceoverMutation) SpeakerID() (r uuid.UUID, exists bool)

SpeakerID returns the value of the "speaker_id" field in the mutation.

func (*VoiceoverMutation) StartedAt

func (m *VoiceoverMutation) StartedAt() (r time.Time, exists bool)

StartedAt returns the value of the "started_at" field in the mutation.

func (*VoiceoverMutation) StartedAtCleared

func (m *VoiceoverMutation) StartedAtCleared() bool

StartedAtCleared returns if the "started_at" field was cleared in this mutation.

func (*VoiceoverMutation) Status

func (m *VoiceoverMutation) Status() (r voiceover.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*VoiceoverMutation) StripeProductID

func (m *VoiceoverMutation) StripeProductID() (r string, exists bool)

StripeProductID returns the value of the "stripe_product_id" field in the mutation.

func (*VoiceoverMutation) StripeProductIDCleared

func (m *VoiceoverMutation) StripeProductIDCleared() bool

StripeProductIDCleared returns if the "stripe_product_id" field was cleared in this mutation.

func (*VoiceoverMutation) Temperature

func (m *VoiceoverMutation) Temperature() (r float32, exists bool)

Temperature returns the value of the "temperature" field in the mutation.

func (VoiceoverMutation) Tx

func (m VoiceoverMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VoiceoverMutation) Type

func (m *VoiceoverMutation) Type() string

Type returns the node type of this mutation (Voiceover).

func (*VoiceoverMutation) UpdatedAt

func (m *VoiceoverMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*VoiceoverMutation) UserCleared

func (m *VoiceoverMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*VoiceoverMutation) UserID

func (m *VoiceoverMutation) UserID() (r uuid.UUID, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*VoiceoverMutation) UserIDs

func (m *VoiceoverMutation) UserIDs() (ids []uuid.UUID)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*VoiceoverMutation) VoiceoverModelsCleared

func (m *VoiceoverMutation) VoiceoverModelsCleared() bool

VoiceoverModelsCleared reports if the "voiceover_models" edge to the VoiceoverModel entity was cleared.

func (*VoiceoverMutation) VoiceoverModelsID

func (m *VoiceoverMutation) VoiceoverModelsID() (id uuid.UUID, exists bool)

VoiceoverModelsID returns the "voiceover_models" edge ID in the mutation.

func (*VoiceoverMutation) VoiceoverModelsIDs

func (m *VoiceoverMutation) VoiceoverModelsIDs() (ids []uuid.UUID)

VoiceoverModelsIDs returns the "voiceover_models" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VoiceoverModelsID instead. It exists only for internal usage by the builders.

func (*VoiceoverMutation) VoiceoverOutputsCleared

func (m *VoiceoverMutation) VoiceoverOutputsCleared() bool

VoiceoverOutputsCleared reports if the "voiceover_outputs" edge to the VoiceoverOutput entity was cleared.

func (*VoiceoverMutation) VoiceoverOutputsIDs

func (m *VoiceoverMutation) VoiceoverOutputsIDs() (ids []uuid.UUID)

VoiceoverOutputsIDs returns the "voiceover_outputs" edge IDs in the mutation.

func (*VoiceoverMutation) VoiceoverSpeakersCleared

func (m *VoiceoverMutation) VoiceoverSpeakersCleared() bool

VoiceoverSpeakersCleared reports if the "voiceover_speakers" edge to the VoiceoverSpeaker entity was cleared.

func (*VoiceoverMutation) VoiceoverSpeakersID

func (m *VoiceoverMutation) VoiceoverSpeakersID() (id uuid.UUID, exists bool)

VoiceoverSpeakersID returns the "voiceover_speakers" edge ID in the mutation.

func (*VoiceoverMutation) VoiceoverSpeakersIDs

func (m *VoiceoverMutation) VoiceoverSpeakersIDs() (ids []uuid.UUID)

VoiceoverSpeakersIDs returns the "voiceover_speakers" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VoiceoverSpeakersID instead. It exists only for internal usage by the builders.

func (*VoiceoverMutation) WasAutoSubmitted

func (m *VoiceoverMutation) WasAutoSubmitted() (r bool, exists bool)

WasAutoSubmitted returns the value of the "was_auto_submitted" field in the mutation.

func (*VoiceoverMutation) Where

func (m *VoiceoverMutation) Where(ps ...predicate.Voiceover)

Where appends a list predicates to the VoiceoverMutation builder.

func (*VoiceoverMutation) WhereP

func (m *VoiceoverMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VoiceoverMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VoiceoverOutput

type VoiceoverOutput struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// AudioPath holds the value of the "audio_path" field.
	AudioPath string `json:"audio_path,omitempty"`
	// VideoPath holds the value of the "video_path" field.
	VideoPath *string `json:"video_path,omitempty"`
	// AudioArray holds the value of the "audio_array" field.
	AudioArray []float64 `json:"audio_array,omitempty"`
	// IsFavorited holds the value of the "is_favorited" field.
	IsFavorited bool `json:"is_favorited,omitempty"`
	// AudioDuration holds the value of the "audio_duration" field.
	AudioDuration float32 `json:"audio_duration,omitempty"`
	// GalleryStatus holds the value of the "gallery_status" field.
	GalleryStatus voiceoveroutput.GalleryStatus `json:"gallery_status,omitempty"`
	// VoiceoverID holds the value of the "voiceover_id" field.
	VoiceoverID uuid.UUID `json:"voiceover_id,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VoiceoverOutputQuery when eager-loading is set.
	Edges VoiceoverOutputEdges `json:"edges"`
	// contains filtered or unexported fields
}

VoiceoverOutput is the model entity for the VoiceoverOutput schema.

func (*VoiceoverOutput) ExecContext

func (c *VoiceoverOutput) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverOutput) QueryContext

func (c *VoiceoverOutput) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverOutput) QueryVoiceovers

func (vo *VoiceoverOutput) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers queries the "voiceovers" edge of the VoiceoverOutput entity.

func (*VoiceoverOutput) String

func (vo *VoiceoverOutput) String() string

String implements the fmt.Stringer.

func (*VoiceoverOutput) Unwrap

func (vo *VoiceoverOutput) Unwrap() *VoiceoverOutput

Unwrap unwraps the VoiceoverOutput 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 (*VoiceoverOutput) Update

Update returns a builder for updating this VoiceoverOutput. Note that you need to call VoiceoverOutput.Unwrap() before calling this method if this VoiceoverOutput was returned from a transaction, and the transaction was committed or rolled back.

type VoiceoverOutputClient

type VoiceoverOutputClient struct {
	// contains filtered or unexported fields
}

VoiceoverOutputClient is a client for the VoiceoverOutput schema.

func NewVoiceoverOutputClient

func NewVoiceoverOutputClient(c config) *VoiceoverOutputClient

NewVoiceoverOutputClient returns a client for the VoiceoverOutput from the given config.

func (*VoiceoverOutputClient) Create

Create returns a builder for creating a VoiceoverOutput entity.

func (*VoiceoverOutputClient) CreateBulk

CreateBulk returns a builder for creating a bulk of VoiceoverOutput entities.

func (*VoiceoverOutputClient) Delete

Delete returns a delete builder for VoiceoverOutput.

func (*VoiceoverOutputClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VoiceoverOutputClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VoiceoverOutputClient) ExecContext

func (c *VoiceoverOutputClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverOutputClient) Get

Get returns a VoiceoverOutput entity by its id.

func (*VoiceoverOutputClient) GetX

GetX is like Get, but panics if an error occurs.

func (*VoiceoverOutputClient) Hooks

func (c *VoiceoverOutputClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VoiceoverOutputClient) Intercept

func (c *VoiceoverOutputClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `voiceoveroutput.Intercept(f(g(h())))`.

func (*VoiceoverOutputClient) Interceptors

func (c *VoiceoverOutputClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VoiceoverOutputClient) Query

Query returns a query builder for VoiceoverOutput.

func (*VoiceoverOutputClient) QueryContext

func (c *VoiceoverOutputClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverOutputClient) QueryVoiceovers

func (c *VoiceoverOutputClient) QueryVoiceovers(vo *VoiceoverOutput) *VoiceoverQuery

QueryVoiceovers queries the voiceovers edge of a VoiceoverOutput.

func (*VoiceoverOutputClient) Update

Update returns an update builder for VoiceoverOutput.

func (*VoiceoverOutputClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*VoiceoverOutputClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*VoiceoverOutputClient) Use

func (c *VoiceoverOutputClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `voiceoveroutput.Hooks(f(g(h())))`.

type VoiceoverOutputCreate

type VoiceoverOutputCreate struct {
	// contains filtered or unexported fields
}

VoiceoverOutputCreate is the builder for creating a VoiceoverOutput entity.

func (*VoiceoverOutputCreate) Exec

func (voc *VoiceoverOutputCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VoiceoverOutputCreate) ExecContext

func (c *VoiceoverOutputCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverOutputCreate) ExecX

func (voc *VoiceoverOutputCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverOutputCreate) Mutation

Mutation returns the VoiceoverOutputMutation object of the builder.

func (*VoiceoverOutputCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VoiceoverOutput.Create().
	SetAudioPath(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VoiceoverOutputUpsert) {
		SetAudioPath(v+v).
	}).
	Exec(ctx)

func (*VoiceoverOutputCreate) OnConflictColumns

func (voc *VoiceoverOutputCreate) OnConflictColumns(columns ...string) *VoiceoverOutputUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VoiceoverOutput.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VoiceoverOutputCreate) QueryContext

func (c *VoiceoverOutputCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverOutputCreate) Save

Save creates the VoiceoverOutput in the database.

func (*VoiceoverOutputCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*VoiceoverOutputCreate) SetAudioArray

func (voc *VoiceoverOutputCreate) SetAudioArray(f []float64) *VoiceoverOutputCreate

SetAudioArray sets the "audio_array" field.

func (*VoiceoverOutputCreate) SetAudioDuration

func (voc *VoiceoverOutputCreate) SetAudioDuration(f float32) *VoiceoverOutputCreate

SetAudioDuration sets the "audio_duration" field.

func (*VoiceoverOutputCreate) SetAudioPath

func (voc *VoiceoverOutputCreate) SetAudioPath(s string) *VoiceoverOutputCreate

SetAudioPath sets the "audio_path" field.

func (*VoiceoverOutputCreate) SetCreatedAt

func (voc *VoiceoverOutputCreate) SetCreatedAt(t time.Time) *VoiceoverOutputCreate

SetCreatedAt sets the "created_at" field.

func (*VoiceoverOutputCreate) SetDeletedAt

func (voc *VoiceoverOutputCreate) SetDeletedAt(t time.Time) *VoiceoverOutputCreate

SetDeletedAt sets the "deleted_at" field.

func (*VoiceoverOutputCreate) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*VoiceoverOutputCreate) SetID

SetID sets the "id" field.

func (*VoiceoverOutputCreate) SetIsFavorited

func (voc *VoiceoverOutputCreate) SetIsFavorited(b bool) *VoiceoverOutputCreate

SetIsFavorited sets the "is_favorited" field.

func (*VoiceoverOutputCreate) SetNillableCreatedAt

func (voc *VoiceoverOutputCreate) SetNillableCreatedAt(t *time.Time) *VoiceoverOutputCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*VoiceoverOutputCreate) SetNillableDeletedAt

func (voc *VoiceoverOutputCreate) SetNillableDeletedAt(t *time.Time) *VoiceoverOutputCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*VoiceoverOutputCreate) SetNillableGalleryStatus

func (voc *VoiceoverOutputCreate) SetNillableGalleryStatus(vs *voiceoveroutput.GalleryStatus) *VoiceoverOutputCreate

SetNillableGalleryStatus sets the "gallery_status" field if the given value is not nil.

func (*VoiceoverOutputCreate) SetNillableID

func (voc *VoiceoverOutputCreate) SetNillableID(u *uuid.UUID) *VoiceoverOutputCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*VoiceoverOutputCreate) SetNillableIsFavorited

func (voc *VoiceoverOutputCreate) SetNillableIsFavorited(b *bool) *VoiceoverOutputCreate

SetNillableIsFavorited sets the "is_favorited" field if the given value is not nil.

func (*VoiceoverOutputCreate) SetNillableUpdatedAt

func (voc *VoiceoverOutputCreate) SetNillableUpdatedAt(t *time.Time) *VoiceoverOutputCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*VoiceoverOutputCreate) SetNillableVideoPath

func (voc *VoiceoverOutputCreate) SetNillableVideoPath(s *string) *VoiceoverOutputCreate

SetNillableVideoPath sets the "video_path" field if the given value is not nil.

func (*VoiceoverOutputCreate) SetUpdatedAt

func (voc *VoiceoverOutputCreate) SetUpdatedAt(t time.Time) *VoiceoverOutputCreate

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverOutputCreate) SetVideoPath

func (voc *VoiceoverOutputCreate) SetVideoPath(s string) *VoiceoverOutputCreate

SetVideoPath sets the "video_path" field.

func (*VoiceoverOutputCreate) SetVoiceoverID

func (voc *VoiceoverOutputCreate) SetVoiceoverID(u uuid.UUID) *VoiceoverOutputCreate

SetVoiceoverID sets the "voiceover_id" field.

func (*VoiceoverOutputCreate) SetVoiceovers

func (voc *VoiceoverOutputCreate) SetVoiceovers(v *Voiceover) *VoiceoverOutputCreate

SetVoiceovers sets the "voiceovers" edge to the Voiceover entity.

func (*VoiceoverOutputCreate) SetVoiceoversID

func (voc *VoiceoverOutputCreate) SetVoiceoversID(id uuid.UUID) *VoiceoverOutputCreate

SetVoiceoversID sets the "voiceovers" edge to the Voiceover entity by ID.

type VoiceoverOutputCreateBulk

type VoiceoverOutputCreateBulk struct {
	// contains filtered or unexported fields
}

VoiceoverOutputCreateBulk is the builder for creating many VoiceoverOutput entities in bulk.

func (*VoiceoverOutputCreateBulk) Exec

Exec executes the query.

func (*VoiceoverOutputCreateBulk) ExecContext

func (c *VoiceoverOutputCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverOutputCreateBulk) ExecX

func (vocb *VoiceoverOutputCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverOutputCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VoiceoverOutput.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VoiceoverOutputUpsert) {
		SetAudioPath(v+v).
	}).
	Exec(ctx)

func (*VoiceoverOutputCreateBulk) OnConflictColumns

func (vocb *VoiceoverOutputCreateBulk) OnConflictColumns(columns ...string) *VoiceoverOutputUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VoiceoverOutput.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VoiceoverOutputCreateBulk) QueryContext

func (c *VoiceoverOutputCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverOutputCreateBulk) Save

Save creates the VoiceoverOutput entities in the database.

func (*VoiceoverOutputCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type VoiceoverOutputDelete

type VoiceoverOutputDelete struct {
	// contains filtered or unexported fields
}

VoiceoverOutputDelete is the builder for deleting a VoiceoverOutput entity.

func (*VoiceoverOutputDelete) Exec

func (vod *VoiceoverOutputDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VoiceoverOutputDelete) ExecContext

func (c *VoiceoverOutputDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverOutputDelete) ExecX

func (vod *VoiceoverOutputDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverOutputDelete) QueryContext

func (c *VoiceoverOutputDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverOutputDelete) Where

Where appends a list predicates to the VoiceoverOutputDelete builder.

type VoiceoverOutputDeleteOne

type VoiceoverOutputDeleteOne struct {
	// contains filtered or unexported fields
}

VoiceoverOutputDeleteOne is the builder for deleting a single VoiceoverOutput entity.

func (*VoiceoverOutputDeleteOne) Exec

Exec executes the deletion query.

func (*VoiceoverOutputDeleteOne) ExecX

func (vodo *VoiceoverOutputDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type VoiceoverOutputEdges

type VoiceoverOutputEdges struct {
	// Voiceovers holds the value of the voiceovers edge.
	Voiceovers *Voiceover `json:"voiceovers,omitempty"`
	// contains filtered or unexported fields
}

VoiceoverOutputEdges holds the relations/edges for other nodes in the graph.

func (VoiceoverOutputEdges) VoiceoversOrErr

func (e VoiceoverOutputEdges) VoiceoversOrErr() (*Voiceover, error)

VoiceoversOrErr returns the Voiceovers value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type VoiceoverOutputGroupBy

type VoiceoverOutputGroupBy struct {
	// contains filtered or unexported fields
}

VoiceoverOutputGroupBy is the group-by builder for VoiceoverOutput entities.

func (*VoiceoverOutputGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*VoiceoverOutputGroupBy) Bool

func (s *VoiceoverOutputGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputGroupBy) BoolX

func (s *VoiceoverOutputGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VoiceoverOutputGroupBy) Bools

func (s *VoiceoverOutputGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputGroupBy) BoolsX

func (s *VoiceoverOutputGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VoiceoverOutputGroupBy) Float64

func (s *VoiceoverOutputGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputGroupBy) Float64X

func (s *VoiceoverOutputGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VoiceoverOutputGroupBy) Float64s

func (s *VoiceoverOutputGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputGroupBy) Float64sX

func (s *VoiceoverOutputGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VoiceoverOutputGroupBy) Int

func (s *VoiceoverOutputGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputGroupBy) IntX

func (s *VoiceoverOutputGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VoiceoverOutputGroupBy) Ints

func (s *VoiceoverOutputGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputGroupBy) IntsX

func (s *VoiceoverOutputGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VoiceoverOutputGroupBy) Scan

func (vogb *VoiceoverOutputGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VoiceoverOutputGroupBy) ScanX

func (s *VoiceoverOutputGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VoiceoverOutputGroupBy) String

func (s *VoiceoverOutputGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputGroupBy) StringX

func (s *VoiceoverOutputGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VoiceoverOutputGroupBy) Strings

func (s *VoiceoverOutputGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputGroupBy) StringsX

func (s *VoiceoverOutputGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VoiceoverOutputMutation

type VoiceoverOutputMutation struct {
	// contains filtered or unexported fields
}

VoiceoverOutputMutation represents an operation that mutates the VoiceoverOutput nodes in the graph.

func (*VoiceoverOutputMutation) AddAudioDuration

func (m *VoiceoverOutputMutation) AddAudioDuration(f float32)

AddAudioDuration adds f to the "audio_duration" field.

func (*VoiceoverOutputMutation) AddField

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) AddedAudioDuration

func (m *VoiceoverOutputMutation) AddedAudioDuration() (r float32, exists bool)

AddedAudioDuration returns the value that was added to the "audio_duration" field in this mutation.

func (*VoiceoverOutputMutation) AddedEdges

func (m *VoiceoverOutputMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VoiceoverOutputMutation) AddedField

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) AddedFields

func (m *VoiceoverOutputMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VoiceoverOutputMutation) AddedIDs

func (m *VoiceoverOutputMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VoiceoverOutputMutation) AppendAudioArray

func (m *VoiceoverOutputMutation) AppendAudioArray(f []float64)

AppendAudioArray adds f to the "audio_array" field.

func (*VoiceoverOutputMutation) AppendedAudioArray

func (m *VoiceoverOutputMutation) AppendedAudioArray() ([]float64, bool)

AppendedAudioArray returns the list of values that were appended to the "audio_array" field in this mutation.

func (*VoiceoverOutputMutation) AudioArray

func (m *VoiceoverOutputMutation) AudioArray() (r []float64, exists bool)

AudioArray returns the value of the "audio_array" field in the mutation.

func (*VoiceoverOutputMutation) AudioArrayCleared

func (m *VoiceoverOutputMutation) AudioArrayCleared() bool

AudioArrayCleared returns if the "audio_array" field was cleared in this mutation.

func (*VoiceoverOutputMutation) AudioDuration

func (m *VoiceoverOutputMutation) AudioDuration() (r float32, exists bool)

AudioDuration returns the value of the "audio_duration" field in the mutation.

func (*VoiceoverOutputMutation) AudioPath

func (m *VoiceoverOutputMutation) AudioPath() (r string, exists bool)

AudioPath returns the value of the "audio_path" field in the mutation.

func (*VoiceoverOutputMutation) ClearAudioArray

func (m *VoiceoverOutputMutation) ClearAudioArray()

ClearAudioArray clears the value of the "audio_array" field.

func (*VoiceoverOutputMutation) ClearDeletedAt

func (m *VoiceoverOutputMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*VoiceoverOutputMutation) ClearEdge

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) ClearField

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) ClearVideoPath

func (m *VoiceoverOutputMutation) ClearVideoPath()

ClearVideoPath clears the value of the "video_path" field.

func (*VoiceoverOutputMutation) ClearVoiceovers

func (m *VoiceoverOutputMutation) ClearVoiceovers()

ClearVoiceovers clears the "voiceovers" edge to the Voiceover entity.

func (*VoiceoverOutputMutation) ClearedEdges

func (m *VoiceoverOutputMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VoiceoverOutputMutation) ClearedFields

func (m *VoiceoverOutputMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VoiceoverOutputMutation) Client

func (m VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) CreatedAt

func (m *VoiceoverOutputMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*VoiceoverOutputMutation) DeletedAt

func (m *VoiceoverOutputMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*VoiceoverOutputMutation) DeletedAtCleared

func (m *VoiceoverOutputMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*VoiceoverOutputMutation) EdgeCleared

func (m *VoiceoverOutputMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VoiceoverOutputMutation) ExecContext

func (c *VoiceoverOutputMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverOutputMutation) Field

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) FieldCleared

func (m *VoiceoverOutputMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VoiceoverOutputMutation) Fields

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) GalleryStatus

func (m *VoiceoverOutputMutation) GalleryStatus() (r voiceoveroutput.GalleryStatus, exists bool)

GalleryStatus returns the value of the "gallery_status" field in the mutation.

func (*VoiceoverOutputMutation) ID

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) IsFavorited

func (m *VoiceoverOutputMutation) IsFavorited() (r bool, exists bool)

IsFavorited returns the value of the "is_favorited" field in the mutation.

func (*VoiceoverOutputMutation) OldAudioArray

func (m *VoiceoverOutputMutation) OldAudioArray(ctx context.Context) (v []float64, err error)

OldAudioArray returns the old "audio_array" field's value of the VoiceoverOutput entity. If the VoiceoverOutput 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 (*VoiceoverOutputMutation) OldAudioDuration

func (m *VoiceoverOutputMutation) OldAudioDuration(ctx context.Context) (v float32, err error)

OldAudioDuration returns the old "audio_duration" field's value of the VoiceoverOutput entity. If the VoiceoverOutput 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 (*VoiceoverOutputMutation) OldAudioPath

func (m *VoiceoverOutputMutation) OldAudioPath(ctx context.Context) (v string, err error)

OldAudioPath returns the old "audio_path" field's value of the VoiceoverOutput entity. If the VoiceoverOutput 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 (*VoiceoverOutputMutation) OldCreatedAt

func (m *VoiceoverOutputMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the VoiceoverOutput entity. If the VoiceoverOutput 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 (*VoiceoverOutputMutation) OldDeletedAt

func (m *VoiceoverOutputMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the VoiceoverOutput entity. If the VoiceoverOutput 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 (*VoiceoverOutputMutation) OldField

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) OldGalleryStatus

func (m *VoiceoverOutputMutation) OldGalleryStatus(ctx context.Context) (v voiceoveroutput.GalleryStatus, err error)

OldGalleryStatus returns the old "gallery_status" field's value of the VoiceoverOutput entity. If the VoiceoverOutput 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 (*VoiceoverOutputMutation) OldIsFavorited

func (m *VoiceoverOutputMutation) OldIsFavorited(ctx context.Context) (v bool, err error)

OldIsFavorited returns the old "is_favorited" field's value of the VoiceoverOutput entity. If the VoiceoverOutput 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 (*VoiceoverOutputMutation) OldUpdatedAt

func (m *VoiceoverOutputMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the VoiceoverOutput entity. If the VoiceoverOutput 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 (*VoiceoverOutputMutation) OldVideoPath

func (m *VoiceoverOutputMutation) OldVideoPath(ctx context.Context) (v *string, err error)

OldVideoPath returns the old "video_path" field's value of the VoiceoverOutput entity. If the VoiceoverOutput 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 (*VoiceoverOutputMutation) OldVoiceoverID

func (m *VoiceoverOutputMutation) OldVoiceoverID(ctx context.Context) (v uuid.UUID, err error)

OldVoiceoverID returns the old "voiceover_id" field's value of the VoiceoverOutput entity. If the VoiceoverOutput 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 (*VoiceoverOutputMutation) Op

func (m *VoiceoverOutputMutation) Op() Op

Op returns the operation name.

func (*VoiceoverOutputMutation) QueryContext

func (c *VoiceoverOutputMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverOutputMutation) RemovedEdges

func (m *VoiceoverOutputMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VoiceoverOutputMutation) RemovedIDs

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) ResetAudioArray

func (m *VoiceoverOutputMutation) ResetAudioArray()

ResetAudioArray resets all changes to the "audio_array" field.

func (*VoiceoverOutputMutation) ResetAudioDuration

func (m *VoiceoverOutputMutation) ResetAudioDuration()

ResetAudioDuration resets all changes to the "audio_duration" field.

func (*VoiceoverOutputMutation) ResetAudioPath

func (m *VoiceoverOutputMutation) ResetAudioPath()

ResetAudioPath resets all changes to the "audio_path" field.

func (*VoiceoverOutputMutation) ResetCreatedAt

func (m *VoiceoverOutputMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*VoiceoverOutputMutation) ResetDeletedAt

func (m *VoiceoverOutputMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*VoiceoverOutputMutation) ResetEdge

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) ResetField

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) ResetGalleryStatus

func (m *VoiceoverOutputMutation) ResetGalleryStatus()

ResetGalleryStatus resets all changes to the "gallery_status" field.

func (*VoiceoverOutputMutation) ResetIsFavorited

func (m *VoiceoverOutputMutation) ResetIsFavorited()

ResetIsFavorited resets all changes to the "is_favorited" field.

func (*VoiceoverOutputMutation) ResetUpdatedAt

func (m *VoiceoverOutputMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*VoiceoverOutputMutation) ResetVideoPath

func (m *VoiceoverOutputMutation) ResetVideoPath()

ResetVideoPath resets all changes to the "video_path" field.

func (*VoiceoverOutputMutation) ResetVoiceoverID

func (m *VoiceoverOutputMutation) ResetVoiceoverID()

ResetVoiceoverID resets all changes to the "voiceover_id" field.

func (*VoiceoverOutputMutation) ResetVoiceovers

func (m *VoiceoverOutputMutation) ResetVoiceovers()

ResetVoiceovers resets all changes to the "voiceovers" edge.

func (*VoiceoverOutputMutation) SetAudioArray

func (m *VoiceoverOutputMutation) SetAudioArray(f []float64)

SetAudioArray sets the "audio_array" field.

func (*VoiceoverOutputMutation) SetAudioDuration

func (m *VoiceoverOutputMutation) SetAudioDuration(f float32)

SetAudioDuration sets the "audio_duration" field.

func (*VoiceoverOutputMutation) SetAudioPath

func (m *VoiceoverOutputMutation) SetAudioPath(s string)

SetAudioPath sets the "audio_path" field.

func (*VoiceoverOutputMutation) SetCreatedAt

func (m *VoiceoverOutputMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*VoiceoverOutputMutation) SetDeletedAt

func (m *VoiceoverOutputMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*VoiceoverOutputMutation) SetField

func (m *VoiceoverOutputMutation) 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 (*VoiceoverOutputMutation) SetGalleryStatus

func (m *VoiceoverOutputMutation) SetGalleryStatus(vs voiceoveroutput.GalleryStatus)

SetGalleryStatus sets the "gallery_status" field.

func (*VoiceoverOutputMutation) SetID

func (m *VoiceoverOutputMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of VoiceoverOutput entities.

func (*VoiceoverOutputMutation) SetIsFavorited

func (m *VoiceoverOutputMutation) SetIsFavorited(b bool)

SetIsFavorited sets the "is_favorited" field.

func (*VoiceoverOutputMutation) SetOp

func (m *VoiceoverOutputMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VoiceoverOutputMutation) SetUpdatedAt

func (m *VoiceoverOutputMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverOutputMutation) SetVideoPath

func (m *VoiceoverOutputMutation) SetVideoPath(s string)

SetVideoPath sets the "video_path" field.

func (*VoiceoverOutputMutation) SetVoiceoverID

func (m *VoiceoverOutputMutation) SetVoiceoverID(u uuid.UUID)

SetVoiceoverID sets the "voiceover_id" field.

func (*VoiceoverOutputMutation) SetVoiceoversID

func (m *VoiceoverOutputMutation) SetVoiceoversID(id uuid.UUID)

SetVoiceoversID sets the "voiceovers" edge to the Voiceover entity by id.

func (VoiceoverOutputMutation) Tx

func (m VoiceoverOutputMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VoiceoverOutputMutation) Type

func (m *VoiceoverOutputMutation) Type() string

Type returns the node type of this mutation (VoiceoverOutput).

func (*VoiceoverOutputMutation) UpdatedAt

func (m *VoiceoverOutputMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*VoiceoverOutputMutation) VideoPath

func (m *VoiceoverOutputMutation) VideoPath() (r string, exists bool)

VideoPath returns the value of the "video_path" field in the mutation.

func (*VoiceoverOutputMutation) VideoPathCleared

func (m *VoiceoverOutputMutation) VideoPathCleared() bool

VideoPathCleared returns if the "video_path" field was cleared in this mutation.

func (*VoiceoverOutputMutation) VoiceoverID

func (m *VoiceoverOutputMutation) VoiceoverID() (r uuid.UUID, exists bool)

VoiceoverID returns the value of the "voiceover_id" field in the mutation.

func (*VoiceoverOutputMutation) VoiceoversCleared

func (m *VoiceoverOutputMutation) VoiceoversCleared() bool

VoiceoversCleared reports if the "voiceovers" edge to the Voiceover entity was cleared.

func (*VoiceoverOutputMutation) VoiceoversID

func (m *VoiceoverOutputMutation) VoiceoversID() (id uuid.UUID, exists bool)

VoiceoversID returns the "voiceovers" edge ID in the mutation.

func (*VoiceoverOutputMutation) VoiceoversIDs

func (m *VoiceoverOutputMutation) VoiceoversIDs() (ids []uuid.UUID)

VoiceoversIDs returns the "voiceovers" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VoiceoversID instead. It exists only for internal usage by the builders.

func (*VoiceoverOutputMutation) Where

Where appends a list predicates to the VoiceoverOutputMutation builder.

func (*VoiceoverOutputMutation) WhereP

func (m *VoiceoverOutputMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VoiceoverOutputMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VoiceoverOutputQuery

type VoiceoverOutputQuery struct {
	// contains filtered or unexported fields
}

VoiceoverOutputQuery is the builder for querying VoiceoverOutput entities.

func (*VoiceoverOutputQuery) Aggregate

Aggregate returns a VoiceoverOutputSelect configured with the given aggregations.

func (*VoiceoverOutputQuery) All

All executes the query and returns a list of VoiceoverOutputs.

func (*VoiceoverOutputQuery) AllX

AllX is like All, but panics if an error occurs.

func (*VoiceoverOutputQuery) Clone

Clone returns a duplicate of the VoiceoverOutputQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VoiceoverOutputQuery) Count

func (voq *VoiceoverOutputQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VoiceoverOutputQuery) CountX

func (voq *VoiceoverOutputQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VoiceoverOutputQuery) ExecContext

func (c *VoiceoverOutputQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverOutputQuery) Exist

func (voq *VoiceoverOutputQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VoiceoverOutputQuery) ExistX

func (voq *VoiceoverOutputQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VoiceoverOutputQuery) First

First returns the first VoiceoverOutput entity from the query. Returns a *NotFoundError when no VoiceoverOutput was found.

func (*VoiceoverOutputQuery) FirstID

func (voq *VoiceoverOutputQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first VoiceoverOutput ID from the query. Returns a *NotFoundError when no VoiceoverOutput ID was found.

func (*VoiceoverOutputQuery) FirstIDX

func (voq *VoiceoverOutputQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*VoiceoverOutputQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*VoiceoverOutputQuery) GroupBy

func (voq *VoiceoverOutputQuery) GroupBy(field string, fields ...string) *VoiceoverOutputGroupBy

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 {
	AudioPath string `json:"audio_path,omitempty"`
	Count int `json:"count,omitempty"`
}

client.VoiceoverOutput.Query().
	GroupBy(voiceoveroutput.FieldAudioPath).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VoiceoverOutputQuery) IDs

func (voq *VoiceoverOutputQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of VoiceoverOutput IDs.

func (*VoiceoverOutputQuery) IDsX

func (voq *VoiceoverOutputQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*VoiceoverOutputQuery) Limit

func (voq *VoiceoverOutputQuery) Limit(limit int) *VoiceoverOutputQuery

Limit the number of records to be returned by this query.

func (*VoiceoverOutputQuery) Modify

func (voq *VoiceoverOutputQuery) Modify(modifiers ...func(s *sql.Selector)) *VoiceoverOutputSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*VoiceoverOutputQuery) Offset

func (voq *VoiceoverOutputQuery) Offset(offset int) *VoiceoverOutputQuery

Offset to start from.

func (*VoiceoverOutputQuery) Only

Only returns a single VoiceoverOutput entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VoiceoverOutput entity is found. Returns a *NotFoundError when no VoiceoverOutput entities are found.

func (*VoiceoverOutputQuery) OnlyID

func (voq *VoiceoverOutputQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only VoiceoverOutput ID in the query. Returns a *NotSingularError when more than one VoiceoverOutput ID is found. Returns a *NotFoundError when no entities are found.

func (*VoiceoverOutputQuery) OnlyIDX

func (voq *VoiceoverOutputQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VoiceoverOutputQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*VoiceoverOutputQuery) Order

Order specifies how the records should be ordered.

func (*VoiceoverOutputQuery) QueryContext

func (c *VoiceoverOutputQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverOutputQuery) QueryVoiceovers

func (voq *VoiceoverOutputQuery) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers chains the current query on the "voiceovers" edge.

func (*VoiceoverOutputQuery) Select

func (voq *VoiceoverOutputQuery) Select(fields ...string) *VoiceoverOutputSelect

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 {
	AudioPath string `json:"audio_path,omitempty"`
}

client.VoiceoverOutput.Query().
	Select(voiceoveroutput.FieldAudioPath).
	Scan(ctx, &v)

func (*VoiceoverOutputQuery) Unique

func (voq *VoiceoverOutputQuery) Unique(unique bool) *VoiceoverOutputQuery

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 (*VoiceoverOutputQuery) Where

Where adds a new predicate for the VoiceoverOutputQuery builder.

func (*VoiceoverOutputQuery) WithVoiceovers

func (voq *VoiceoverOutputQuery) WithVoiceovers(opts ...func(*VoiceoverQuery)) *VoiceoverOutputQuery

WithVoiceovers tells the query-builder to eager-load the nodes that are connected to the "voiceovers" edge. The optional arguments are used to configure the query builder of the edge.

type VoiceoverOutputSelect

type VoiceoverOutputSelect struct {
	*VoiceoverOutputQuery
	// contains filtered or unexported fields
}

VoiceoverOutputSelect is the builder for selecting fields of VoiceoverOutput entities.

func (*VoiceoverOutputSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*VoiceoverOutputSelect) Bool

func (s *VoiceoverOutputSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputSelect) BoolX

func (s *VoiceoverOutputSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VoiceoverOutputSelect) Bools

func (s *VoiceoverOutputSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputSelect) BoolsX

func (s *VoiceoverOutputSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (VoiceoverOutputSelect) ExecContext

func (c VoiceoverOutputSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverOutputSelect) Float64

func (s *VoiceoverOutputSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputSelect) Float64X

func (s *VoiceoverOutputSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VoiceoverOutputSelect) Float64s

func (s *VoiceoverOutputSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputSelect) Float64sX

func (s *VoiceoverOutputSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VoiceoverOutputSelect) Int

func (s *VoiceoverOutputSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputSelect) IntX

func (s *VoiceoverOutputSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VoiceoverOutputSelect) Ints

func (s *VoiceoverOutputSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputSelect) IntsX

func (s *VoiceoverOutputSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VoiceoverOutputSelect) Modify

func (vos *VoiceoverOutputSelect) Modify(modifiers ...func(s *sql.Selector)) *VoiceoverOutputSelect

Modify adds a query modifier for attaching custom logic to queries.

func (VoiceoverOutputSelect) QueryContext

func (c VoiceoverOutputSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverOutputSelect) Scan

func (vos *VoiceoverOutputSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VoiceoverOutputSelect) ScanX

func (s *VoiceoverOutputSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VoiceoverOutputSelect) String

func (s *VoiceoverOutputSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputSelect) StringX

func (s *VoiceoverOutputSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VoiceoverOutputSelect) Strings

func (s *VoiceoverOutputSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VoiceoverOutputSelect) StringsX

func (s *VoiceoverOutputSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VoiceoverOutputUpdate

type VoiceoverOutputUpdate struct {
	// contains filtered or unexported fields
}

VoiceoverOutputUpdate is the builder for updating VoiceoverOutput entities.

func (*VoiceoverOutputUpdate) AddAudioDuration

func (vou *VoiceoverOutputUpdate) AddAudioDuration(f float32) *VoiceoverOutputUpdate

AddAudioDuration adds f to the "audio_duration" field.

func (*VoiceoverOutputUpdate) AppendAudioArray

func (vou *VoiceoverOutputUpdate) AppendAudioArray(f []float64) *VoiceoverOutputUpdate

AppendAudioArray appends f to the "audio_array" field.

func (*VoiceoverOutputUpdate) ClearAudioArray

func (vou *VoiceoverOutputUpdate) ClearAudioArray() *VoiceoverOutputUpdate

ClearAudioArray clears the value of the "audio_array" field.

func (*VoiceoverOutputUpdate) ClearDeletedAt

func (vou *VoiceoverOutputUpdate) ClearDeletedAt() *VoiceoverOutputUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*VoiceoverOutputUpdate) ClearVideoPath

func (vou *VoiceoverOutputUpdate) ClearVideoPath() *VoiceoverOutputUpdate

ClearVideoPath clears the value of the "video_path" field.

func (*VoiceoverOutputUpdate) ClearVoiceovers

func (vou *VoiceoverOutputUpdate) ClearVoiceovers() *VoiceoverOutputUpdate

ClearVoiceovers clears the "voiceovers" edge to the Voiceover entity.

func (*VoiceoverOutputUpdate) Exec

func (vou *VoiceoverOutputUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VoiceoverOutputUpdate) ExecContext

func (c *VoiceoverOutputUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverOutputUpdate) ExecX

func (vou *VoiceoverOutputUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverOutputUpdate) Modify

func (vou *VoiceoverOutputUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VoiceoverOutputUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VoiceoverOutputUpdate) Mutation

Mutation returns the VoiceoverOutputMutation object of the builder.

func (*VoiceoverOutputUpdate) QueryContext

func (c *VoiceoverOutputUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverOutputUpdate) Save

func (vou *VoiceoverOutputUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VoiceoverOutputUpdate) SaveX

func (vou *VoiceoverOutputUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VoiceoverOutputUpdate) SetAudioArray

func (vou *VoiceoverOutputUpdate) SetAudioArray(f []float64) *VoiceoverOutputUpdate

SetAudioArray sets the "audio_array" field.

func (*VoiceoverOutputUpdate) SetAudioDuration

func (vou *VoiceoverOutputUpdate) SetAudioDuration(f float32) *VoiceoverOutputUpdate

SetAudioDuration sets the "audio_duration" field.

func (*VoiceoverOutputUpdate) SetAudioPath

func (vou *VoiceoverOutputUpdate) SetAudioPath(s string) *VoiceoverOutputUpdate

SetAudioPath sets the "audio_path" field.

func (*VoiceoverOutputUpdate) SetDeletedAt

func (vou *VoiceoverOutputUpdate) SetDeletedAt(t time.Time) *VoiceoverOutputUpdate

SetDeletedAt sets the "deleted_at" field.

func (*VoiceoverOutputUpdate) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*VoiceoverOutputUpdate) SetIsFavorited

func (vou *VoiceoverOutputUpdate) SetIsFavorited(b bool) *VoiceoverOutputUpdate

SetIsFavorited sets the "is_favorited" field.

func (*VoiceoverOutputUpdate) SetNillableDeletedAt

func (vou *VoiceoverOutputUpdate) SetNillableDeletedAt(t *time.Time) *VoiceoverOutputUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*VoiceoverOutputUpdate) SetNillableGalleryStatus

func (vou *VoiceoverOutputUpdate) SetNillableGalleryStatus(vs *voiceoveroutput.GalleryStatus) *VoiceoverOutputUpdate

SetNillableGalleryStatus sets the "gallery_status" field if the given value is not nil.

func (*VoiceoverOutputUpdate) SetNillableIsFavorited

func (vou *VoiceoverOutputUpdate) SetNillableIsFavorited(b *bool) *VoiceoverOutputUpdate

SetNillableIsFavorited sets the "is_favorited" field if the given value is not nil.

func (*VoiceoverOutputUpdate) SetNillableVideoPath

func (vou *VoiceoverOutputUpdate) SetNillableVideoPath(s *string) *VoiceoverOutputUpdate

SetNillableVideoPath sets the "video_path" field if the given value is not nil.

func (*VoiceoverOutputUpdate) SetUpdatedAt

func (vou *VoiceoverOutputUpdate) SetUpdatedAt(t time.Time) *VoiceoverOutputUpdate

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverOutputUpdate) SetVideoPath

func (vou *VoiceoverOutputUpdate) SetVideoPath(s string) *VoiceoverOutputUpdate

SetVideoPath sets the "video_path" field.

func (*VoiceoverOutputUpdate) SetVoiceoverID

func (vou *VoiceoverOutputUpdate) SetVoiceoverID(u uuid.UUID) *VoiceoverOutputUpdate

SetVoiceoverID sets the "voiceover_id" field.

func (*VoiceoverOutputUpdate) SetVoiceovers

func (vou *VoiceoverOutputUpdate) SetVoiceovers(v *Voiceover) *VoiceoverOutputUpdate

SetVoiceovers sets the "voiceovers" edge to the Voiceover entity.

func (*VoiceoverOutputUpdate) SetVoiceoversID

func (vou *VoiceoverOutputUpdate) SetVoiceoversID(id uuid.UUID) *VoiceoverOutputUpdate

SetVoiceoversID sets the "voiceovers" edge to the Voiceover entity by ID.

func (*VoiceoverOutputUpdate) Where

Where appends a list predicates to the VoiceoverOutputUpdate builder.

type VoiceoverOutputUpdateOne

type VoiceoverOutputUpdateOne struct {
	// contains filtered or unexported fields
}

VoiceoverOutputUpdateOne is the builder for updating a single VoiceoverOutput entity.

func (*VoiceoverOutputUpdateOne) AddAudioDuration

func (vouo *VoiceoverOutputUpdateOne) AddAudioDuration(f float32) *VoiceoverOutputUpdateOne

AddAudioDuration adds f to the "audio_duration" field.

func (*VoiceoverOutputUpdateOne) AppendAudioArray

func (vouo *VoiceoverOutputUpdateOne) AppendAudioArray(f []float64) *VoiceoverOutputUpdateOne

AppendAudioArray appends f to the "audio_array" field.

func (*VoiceoverOutputUpdateOne) ClearAudioArray

func (vouo *VoiceoverOutputUpdateOne) ClearAudioArray() *VoiceoverOutputUpdateOne

ClearAudioArray clears the value of the "audio_array" field.

func (*VoiceoverOutputUpdateOne) ClearDeletedAt

func (vouo *VoiceoverOutputUpdateOne) ClearDeletedAt() *VoiceoverOutputUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*VoiceoverOutputUpdateOne) ClearVideoPath

func (vouo *VoiceoverOutputUpdateOne) ClearVideoPath() *VoiceoverOutputUpdateOne

ClearVideoPath clears the value of the "video_path" field.

func (*VoiceoverOutputUpdateOne) ClearVoiceovers

func (vouo *VoiceoverOutputUpdateOne) ClearVoiceovers() *VoiceoverOutputUpdateOne

ClearVoiceovers clears the "voiceovers" edge to the Voiceover entity.

func (*VoiceoverOutputUpdateOne) Exec

Exec executes the query on the entity.

func (*VoiceoverOutputUpdateOne) ExecContext

func (c *VoiceoverOutputUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverOutputUpdateOne) ExecX

func (vouo *VoiceoverOutputUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverOutputUpdateOne) Modify

func (vouo *VoiceoverOutputUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VoiceoverOutputUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VoiceoverOutputUpdateOne) Mutation

Mutation returns the VoiceoverOutputMutation object of the builder.

func (*VoiceoverOutputUpdateOne) QueryContext

func (c *VoiceoverOutputUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverOutputUpdateOne) Save

Save executes the query and returns the updated VoiceoverOutput entity.

func (*VoiceoverOutputUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*VoiceoverOutputUpdateOne) Select

func (vouo *VoiceoverOutputUpdateOne) Select(field string, fields ...string) *VoiceoverOutputUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VoiceoverOutputUpdateOne) SetAudioArray

func (vouo *VoiceoverOutputUpdateOne) SetAudioArray(f []float64) *VoiceoverOutputUpdateOne

SetAudioArray sets the "audio_array" field.

func (*VoiceoverOutputUpdateOne) SetAudioDuration

func (vouo *VoiceoverOutputUpdateOne) SetAudioDuration(f float32) *VoiceoverOutputUpdateOne

SetAudioDuration sets the "audio_duration" field.

func (*VoiceoverOutputUpdateOne) SetAudioPath

SetAudioPath sets the "audio_path" field.

func (*VoiceoverOutputUpdateOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*VoiceoverOutputUpdateOne) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*VoiceoverOutputUpdateOne) SetIsFavorited

func (vouo *VoiceoverOutputUpdateOne) SetIsFavorited(b bool) *VoiceoverOutputUpdateOne

SetIsFavorited sets the "is_favorited" field.

func (*VoiceoverOutputUpdateOne) SetNillableDeletedAt

func (vouo *VoiceoverOutputUpdateOne) SetNillableDeletedAt(t *time.Time) *VoiceoverOutputUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*VoiceoverOutputUpdateOne) SetNillableGalleryStatus

SetNillableGalleryStatus sets the "gallery_status" field if the given value is not nil.

func (*VoiceoverOutputUpdateOne) SetNillableIsFavorited

func (vouo *VoiceoverOutputUpdateOne) SetNillableIsFavorited(b *bool) *VoiceoverOutputUpdateOne

SetNillableIsFavorited sets the "is_favorited" field if the given value is not nil.

func (*VoiceoverOutputUpdateOne) SetNillableVideoPath

func (vouo *VoiceoverOutputUpdateOne) SetNillableVideoPath(s *string) *VoiceoverOutputUpdateOne

SetNillableVideoPath sets the "video_path" field if the given value is not nil.

func (*VoiceoverOutputUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverOutputUpdateOne) SetVideoPath

SetVideoPath sets the "video_path" field.

func (*VoiceoverOutputUpdateOne) SetVoiceoverID

SetVoiceoverID sets the "voiceover_id" field.

func (*VoiceoverOutputUpdateOne) SetVoiceovers

SetVoiceovers sets the "voiceovers" edge to the Voiceover entity.

func (*VoiceoverOutputUpdateOne) SetVoiceoversID

func (vouo *VoiceoverOutputUpdateOne) SetVoiceoversID(id uuid.UUID) *VoiceoverOutputUpdateOne

SetVoiceoversID sets the "voiceovers" edge to the Voiceover entity by ID.

type VoiceoverOutputUpsert

type VoiceoverOutputUpsert struct {
	*sql.UpdateSet
}

VoiceoverOutputUpsert is the "OnConflict" setter.

func (*VoiceoverOutputUpsert) AddAudioDuration

func (u *VoiceoverOutputUpsert) AddAudioDuration(v float32) *VoiceoverOutputUpsert

AddAudioDuration adds v to the "audio_duration" field.

func (*VoiceoverOutputUpsert) ClearAudioArray

func (u *VoiceoverOutputUpsert) ClearAudioArray() *VoiceoverOutputUpsert

ClearAudioArray clears the value of the "audio_array" field.

func (*VoiceoverOutputUpsert) ClearDeletedAt

func (u *VoiceoverOutputUpsert) ClearDeletedAt() *VoiceoverOutputUpsert

ClearDeletedAt clears the value of the "deleted_at" field.

func (*VoiceoverOutputUpsert) ClearVideoPath

func (u *VoiceoverOutputUpsert) ClearVideoPath() *VoiceoverOutputUpsert

ClearVideoPath clears the value of the "video_path" field.

func (*VoiceoverOutputUpsert) SetAudioArray

func (u *VoiceoverOutputUpsert) SetAudioArray(v []float64) *VoiceoverOutputUpsert

SetAudioArray sets the "audio_array" field.

func (*VoiceoverOutputUpsert) SetAudioDuration

func (u *VoiceoverOutputUpsert) SetAudioDuration(v float32) *VoiceoverOutputUpsert

SetAudioDuration sets the "audio_duration" field.

func (*VoiceoverOutputUpsert) SetAudioPath

SetAudioPath sets the "audio_path" field.

func (*VoiceoverOutputUpsert) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*VoiceoverOutputUpsert) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*VoiceoverOutputUpsert) SetIsFavorited

func (u *VoiceoverOutputUpsert) SetIsFavorited(v bool) *VoiceoverOutputUpsert

SetIsFavorited sets the "is_favorited" field.

func (*VoiceoverOutputUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverOutputUpsert) SetVideoPath

SetVideoPath sets the "video_path" field.

func (*VoiceoverOutputUpsert) SetVoiceoverID

func (u *VoiceoverOutputUpsert) SetVoiceoverID(v uuid.UUID) *VoiceoverOutputUpsert

SetVoiceoverID sets the "voiceover_id" field.

func (*VoiceoverOutputUpsert) UpdateAudioArray

func (u *VoiceoverOutputUpsert) UpdateAudioArray() *VoiceoverOutputUpsert

UpdateAudioArray sets the "audio_array" field to the value that was provided on create.

func (*VoiceoverOutputUpsert) UpdateAudioDuration

func (u *VoiceoverOutputUpsert) UpdateAudioDuration() *VoiceoverOutputUpsert

UpdateAudioDuration sets the "audio_duration" field to the value that was provided on create.

func (*VoiceoverOutputUpsert) UpdateAudioPath

func (u *VoiceoverOutputUpsert) UpdateAudioPath() *VoiceoverOutputUpsert

UpdateAudioPath sets the "audio_path" field to the value that was provided on create.

func (*VoiceoverOutputUpsert) UpdateDeletedAt

func (u *VoiceoverOutputUpsert) UpdateDeletedAt() *VoiceoverOutputUpsert

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*VoiceoverOutputUpsert) UpdateGalleryStatus

func (u *VoiceoverOutputUpsert) UpdateGalleryStatus() *VoiceoverOutputUpsert

UpdateGalleryStatus sets the "gallery_status" field to the value that was provided on create.

func (*VoiceoverOutputUpsert) UpdateIsFavorited

func (u *VoiceoverOutputUpsert) UpdateIsFavorited() *VoiceoverOutputUpsert

UpdateIsFavorited sets the "is_favorited" field to the value that was provided on create.

func (*VoiceoverOutputUpsert) UpdateUpdatedAt

func (u *VoiceoverOutputUpsert) UpdateUpdatedAt() *VoiceoverOutputUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*VoiceoverOutputUpsert) UpdateVideoPath

func (u *VoiceoverOutputUpsert) UpdateVideoPath() *VoiceoverOutputUpsert

UpdateVideoPath sets the "video_path" field to the value that was provided on create.

func (*VoiceoverOutputUpsert) UpdateVoiceoverID

func (u *VoiceoverOutputUpsert) UpdateVoiceoverID() *VoiceoverOutputUpsert

UpdateVoiceoverID sets the "voiceover_id" field to the value that was provided on create.

type VoiceoverOutputUpsertBulk

type VoiceoverOutputUpsertBulk struct {
	// contains filtered or unexported fields
}

VoiceoverOutputUpsertBulk is the builder for "upsert"-ing a bulk of VoiceoverOutput nodes.

func (*VoiceoverOutputUpsertBulk) AddAudioDuration

AddAudioDuration adds v to the "audio_duration" field.

func (*VoiceoverOutputUpsertBulk) ClearAudioArray

ClearAudioArray clears the value of the "audio_array" field.

func (*VoiceoverOutputUpsertBulk) ClearDeletedAt

ClearDeletedAt clears the value of the "deleted_at" field.

func (*VoiceoverOutputUpsertBulk) ClearVideoPath

ClearVideoPath clears the value of the "video_path" field.

func (*VoiceoverOutputUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VoiceoverOutputUpsertBulk) Exec

Exec executes the query.

func (*VoiceoverOutputUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverOutputUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VoiceoverOutput.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VoiceoverOutputUpsertBulk) SetAudioArray

SetAudioArray sets the "audio_array" field.

func (*VoiceoverOutputUpsertBulk) SetAudioDuration

SetAudioDuration sets the "audio_duration" field.

func (*VoiceoverOutputUpsertBulk) SetAudioPath

SetAudioPath sets the "audio_path" field.

func (*VoiceoverOutputUpsertBulk) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*VoiceoverOutputUpsertBulk) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*VoiceoverOutputUpsertBulk) SetIsFavorited

SetIsFavorited sets the "is_favorited" field.

func (*VoiceoverOutputUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverOutputUpsertBulk) SetVideoPath

SetVideoPath sets the "video_path" field.

func (*VoiceoverOutputUpsertBulk) SetVoiceoverID

SetVoiceoverID sets the "voiceover_id" field.

func (*VoiceoverOutputUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VoiceoverOutputCreateBulk.OnConflict documentation for more info.

func (*VoiceoverOutputUpsertBulk) UpdateAudioArray

UpdateAudioArray sets the "audio_array" field to the value that was provided on create.

func (*VoiceoverOutputUpsertBulk) UpdateAudioDuration

func (u *VoiceoverOutputUpsertBulk) UpdateAudioDuration() *VoiceoverOutputUpsertBulk

UpdateAudioDuration sets the "audio_duration" field to the value that was provided on create.

func (*VoiceoverOutputUpsertBulk) UpdateAudioPath

UpdateAudioPath sets the "audio_path" field to the value that was provided on create.

func (*VoiceoverOutputUpsertBulk) UpdateDeletedAt

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*VoiceoverOutputUpsertBulk) UpdateGalleryStatus

func (u *VoiceoverOutputUpsertBulk) UpdateGalleryStatus() *VoiceoverOutputUpsertBulk

UpdateGalleryStatus sets the "gallery_status" field to the value that was provided on create.

func (*VoiceoverOutputUpsertBulk) UpdateIsFavorited

func (u *VoiceoverOutputUpsertBulk) UpdateIsFavorited() *VoiceoverOutputUpsertBulk

UpdateIsFavorited sets the "is_favorited" field to the value that was provided on create.

func (*VoiceoverOutputUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.VoiceoverOutput.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(voiceoveroutput.FieldID)
		}),
	).
	Exec(ctx)

func (*VoiceoverOutputUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*VoiceoverOutputUpsertBulk) UpdateVideoPath

UpdateVideoPath sets the "video_path" field to the value that was provided on create.

func (*VoiceoverOutputUpsertBulk) UpdateVoiceoverID

func (u *VoiceoverOutputUpsertBulk) UpdateVoiceoverID() *VoiceoverOutputUpsertBulk

UpdateVoiceoverID sets the "voiceover_id" field to the value that was provided on create.

type VoiceoverOutputUpsertOne

type VoiceoverOutputUpsertOne struct {
	// contains filtered or unexported fields
}

VoiceoverOutputUpsertOne is the builder for "upsert"-ing

one VoiceoverOutput node.

func (*VoiceoverOutputUpsertOne) AddAudioDuration

AddAudioDuration adds v to the "audio_duration" field.

func (*VoiceoverOutputUpsertOne) ClearAudioArray

func (u *VoiceoverOutputUpsertOne) ClearAudioArray() *VoiceoverOutputUpsertOne

ClearAudioArray clears the value of the "audio_array" field.

func (*VoiceoverOutputUpsertOne) ClearDeletedAt

ClearDeletedAt clears the value of the "deleted_at" field.

func (*VoiceoverOutputUpsertOne) ClearVideoPath

ClearVideoPath clears the value of the "video_path" field.

func (*VoiceoverOutputUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VoiceoverOutputUpsertOne) Exec

Exec executes the query.

func (*VoiceoverOutputUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverOutputUpsertOne) ID

func (u *VoiceoverOutputUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VoiceoverOutputUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VoiceoverOutputUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VoiceoverOutput.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VoiceoverOutputUpsertOne) SetAudioArray

SetAudioArray sets the "audio_array" field.

func (*VoiceoverOutputUpsertOne) SetAudioDuration

SetAudioDuration sets the "audio_duration" field.

func (*VoiceoverOutputUpsertOne) SetAudioPath

SetAudioPath sets the "audio_path" field.

func (*VoiceoverOutputUpsertOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*VoiceoverOutputUpsertOne) SetGalleryStatus

SetGalleryStatus sets the "gallery_status" field.

func (*VoiceoverOutputUpsertOne) SetIsFavorited

SetIsFavorited sets the "is_favorited" field.

func (*VoiceoverOutputUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverOutputUpsertOne) SetVideoPath

SetVideoPath sets the "video_path" field.

func (*VoiceoverOutputUpsertOne) SetVoiceoverID

SetVoiceoverID sets the "voiceover_id" field.

func (*VoiceoverOutputUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the VoiceoverOutputCreate.OnConflict documentation for more info.

func (*VoiceoverOutputUpsertOne) UpdateAudioArray

func (u *VoiceoverOutputUpsertOne) UpdateAudioArray() *VoiceoverOutputUpsertOne

UpdateAudioArray sets the "audio_array" field to the value that was provided on create.

func (*VoiceoverOutputUpsertOne) UpdateAudioDuration

func (u *VoiceoverOutputUpsertOne) UpdateAudioDuration() *VoiceoverOutputUpsertOne

UpdateAudioDuration sets the "audio_duration" field to the value that was provided on create.

func (*VoiceoverOutputUpsertOne) UpdateAudioPath

func (u *VoiceoverOutputUpsertOne) UpdateAudioPath() *VoiceoverOutputUpsertOne

UpdateAudioPath sets the "audio_path" field to the value that was provided on create.

func (*VoiceoverOutputUpsertOne) UpdateDeletedAt

func (u *VoiceoverOutputUpsertOne) UpdateDeletedAt() *VoiceoverOutputUpsertOne

UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.

func (*VoiceoverOutputUpsertOne) UpdateGalleryStatus

func (u *VoiceoverOutputUpsertOne) UpdateGalleryStatus() *VoiceoverOutputUpsertOne

UpdateGalleryStatus sets the "gallery_status" field to the value that was provided on create.

func (*VoiceoverOutputUpsertOne) UpdateIsFavorited

func (u *VoiceoverOutputUpsertOne) UpdateIsFavorited() *VoiceoverOutputUpsertOne

UpdateIsFavorited sets the "is_favorited" field to the value that was provided on create.

func (*VoiceoverOutputUpsertOne) UpdateNewValues

func (u *VoiceoverOutputUpsertOne) UpdateNewValues() *VoiceoverOutputUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.VoiceoverOutput.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(voiceoveroutput.FieldID)
		}),
	).
	Exec(ctx)

func (*VoiceoverOutputUpsertOne) UpdateUpdatedAt

func (u *VoiceoverOutputUpsertOne) UpdateUpdatedAt() *VoiceoverOutputUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*VoiceoverOutputUpsertOne) UpdateVideoPath

func (u *VoiceoverOutputUpsertOne) UpdateVideoPath() *VoiceoverOutputUpsertOne

UpdateVideoPath sets the "video_path" field to the value that was provided on create.

func (*VoiceoverOutputUpsertOne) UpdateVoiceoverID

func (u *VoiceoverOutputUpsertOne) UpdateVoiceoverID() *VoiceoverOutputUpsertOne

UpdateVoiceoverID sets the "voiceover_id" field to the value that was provided on create.

type VoiceoverOutputs

type VoiceoverOutputs []*VoiceoverOutput

VoiceoverOutputs is a parsable slice of VoiceoverOutput.

type VoiceoverQuery

type VoiceoverQuery struct {
	// contains filtered or unexported fields
}

VoiceoverQuery is the builder for querying Voiceover entities.

func (*VoiceoverQuery) Aggregate

func (vq *VoiceoverQuery) Aggregate(fns ...AggregateFunc) *VoiceoverSelect

Aggregate returns a VoiceoverSelect configured with the given aggregations.

func (*VoiceoverQuery) All

func (vq *VoiceoverQuery) All(ctx context.Context) ([]*Voiceover, error)

All executes the query and returns a list of Voiceovers.

func (*VoiceoverQuery) AllX

func (vq *VoiceoverQuery) AllX(ctx context.Context) []*Voiceover

AllX is like All, but panics if an error occurs.

func (*VoiceoverQuery) Clone

func (vq *VoiceoverQuery) Clone() *VoiceoverQuery

Clone returns a duplicate of the VoiceoverQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VoiceoverQuery) Count

func (vq *VoiceoverQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VoiceoverQuery) CountX

func (vq *VoiceoverQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VoiceoverQuery) ExecContext

func (c *VoiceoverQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverQuery) Exist

func (vq *VoiceoverQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VoiceoverQuery) ExistX

func (vq *VoiceoverQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VoiceoverQuery) First

func (vq *VoiceoverQuery) First(ctx context.Context) (*Voiceover, error)

First returns the first Voiceover entity from the query. Returns a *NotFoundError when no Voiceover was found.

func (*VoiceoverQuery) FirstID

func (vq *VoiceoverQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Voiceover ID from the query. Returns a *NotFoundError when no Voiceover ID was found.

func (*VoiceoverQuery) FirstIDX

func (vq *VoiceoverQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*VoiceoverQuery) FirstX

func (vq *VoiceoverQuery) FirstX(ctx context.Context) *Voiceover

FirstX is like First, but panics if an error occurs.

func (*VoiceoverQuery) GroupBy

func (vq *VoiceoverQuery) GroupBy(field string, fields ...string) *VoiceoverGroupBy

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 {
	CountryCode string `json:"country_code,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Voiceover.Query().
	GroupBy(voiceover.FieldCountryCode).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VoiceoverQuery) IDs

func (vq *VoiceoverQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of Voiceover IDs.

func (*VoiceoverQuery) IDsX

func (vq *VoiceoverQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*VoiceoverQuery) Limit

func (vq *VoiceoverQuery) Limit(limit int) *VoiceoverQuery

Limit the number of records to be returned by this query.

func (*VoiceoverQuery) Modify

func (vq *VoiceoverQuery) Modify(modifiers ...func(s *sql.Selector)) *VoiceoverSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*VoiceoverQuery) Offset

func (vq *VoiceoverQuery) Offset(offset int) *VoiceoverQuery

Offset to start from.

func (*VoiceoverQuery) Only

func (vq *VoiceoverQuery) Only(ctx context.Context) (*Voiceover, error)

Only returns a single Voiceover entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Voiceover entity is found. Returns a *NotFoundError when no Voiceover entities are found.

func (*VoiceoverQuery) OnlyID

func (vq *VoiceoverQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Voiceover ID in the query. Returns a *NotSingularError when more than one Voiceover ID is found. Returns a *NotFoundError when no entities are found.

func (*VoiceoverQuery) OnlyIDX

func (vq *VoiceoverQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VoiceoverQuery) OnlyX

func (vq *VoiceoverQuery) OnlyX(ctx context.Context) *Voiceover

OnlyX is like Only, but panics if an error occurs.

func (*VoiceoverQuery) Order

func (vq *VoiceoverQuery) Order(o ...OrderFunc) *VoiceoverQuery

Order specifies how the records should be ordered.

func (*VoiceoverQuery) QueryAPITokens

func (vq *VoiceoverQuery) QueryAPITokens() *ApiTokenQuery

QueryAPITokens chains the current query on the "api_tokens" edge.

func (*VoiceoverQuery) QueryContext

func (c *VoiceoverQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverQuery) QueryDeviceInfo

func (vq *VoiceoverQuery) QueryDeviceInfo() *DeviceInfoQuery

QueryDeviceInfo chains the current query on the "device_info" edge.

func (*VoiceoverQuery) QueryPrompt

func (vq *VoiceoverQuery) QueryPrompt() *PromptQuery

QueryPrompt chains the current query on the "prompt" edge.

func (*VoiceoverQuery) QueryUser

func (vq *VoiceoverQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*VoiceoverQuery) QueryVoiceoverModels

func (vq *VoiceoverQuery) QueryVoiceoverModels() *VoiceoverModelQuery

QueryVoiceoverModels chains the current query on the "voiceover_models" edge.

func (*VoiceoverQuery) QueryVoiceoverOutputs

func (vq *VoiceoverQuery) QueryVoiceoverOutputs() *VoiceoverOutputQuery

QueryVoiceoverOutputs chains the current query on the "voiceover_outputs" edge.

func (*VoiceoverQuery) QueryVoiceoverSpeakers

func (vq *VoiceoverQuery) QueryVoiceoverSpeakers() *VoiceoverSpeakerQuery

QueryVoiceoverSpeakers chains the current query on the "voiceover_speakers" edge.

func (*VoiceoverQuery) Select

func (vq *VoiceoverQuery) Select(fields ...string) *VoiceoverSelect

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 {
	CountryCode string `json:"country_code,omitempty"`
}

client.Voiceover.Query().
	Select(voiceover.FieldCountryCode).
	Scan(ctx, &v)

func (*VoiceoverQuery) Unique

func (vq *VoiceoverQuery) Unique(unique bool) *VoiceoverQuery

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 (*VoiceoverQuery) Where

Where adds a new predicate for the VoiceoverQuery builder.

func (*VoiceoverQuery) WithAPITokens

func (vq *VoiceoverQuery) WithAPITokens(opts ...func(*ApiTokenQuery)) *VoiceoverQuery

WithAPITokens tells the query-builder to eager-load the nodes that are connected to the "api_tokens" edge. The optional arguments are used to configure the query builder of the edge.

func (*VoiceoverQuery) WithDeviceInfo

func (vq *VoiceoverQuery) WithDeviceInfo(opts ...func(*DeviceInfoQuery)) *VoiceoverQuery

WithDeviceInfo tells the query-builder to eager-load the nodes that are connected to the "device_info" edge. The optional arguments are used to configure the query builder of the edge.

func (*VoiceoverQuery) WithPrompt

func (vq *VoiceoverQuery) WithPrompt(opts ...func(*PromptQuery)) *VoiceoverQuery

WithPrompt tells the query-builder to eager-load the nodes that are connected to the "prompt" edge. The optional arguments are used to configure the query builder of the edge.

func (*VoiceoverQuery) WithUser

func (vq *VoiceoverQuery) WithUser(opts ...func(*UserQuery)) *VoiceoverQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

func (*VoiceoverQuery) WithVoiceoverModels

func (vq *VoiceoverQuery) WithVoiceoverModels(opts ...func(*VoiceoverModelQuery)) *VoiceoverQuery

WithVoiceoverModels tells the query-builder to eager-load the nodes that are connected to the "voiceover_models" edge. The optional arguments are used to configure the query builder of the edge.

func (*VoiceoverQuery) WithVoiceoverOutputs

func (vq *VoiceoverQuery) WithVoiceoverOutputs(opts ...func(*VoiceoverOutputQuery)) *VoiceoverQuery

WithVoiceoverOutputs tells the query-builder to eager-load the nodes that are connected to the "voiceover_outputs" edge. The optional arguments are used to configure the query builder of the edge.

func (*VoiceoverQuery) WithVoiceoverSpeakers

func (vq *VoiceoverQuery) WithVoiceoverSpeakers(opts ...func(*VoiceoverSpeakerQuery)) *VoiceoverQuery

WithVoiceoverSpeakers tells the query-builder to eager-load the nodes that are connected to the "voiceover_speakers" edge. The optional arguments are used to configure the query builder of the edge.

type VoiceoverSelect

type VoiceoverSelect struct {
	*VoiceoverQuery
	// contains filtered or unexported fields
}

VoiceoverSelect is the builder for selecting fields of Voiceover entities.

func (*VoiceoverSelect) Aggregate

func (vs *VoiceoverSelect) Aggregate(fns ...AggregateFunc) *VoiceoverSelect

Aggregate adds the given aggregation functions to the selector query.

func (*VoiceoverSelect) Bool

func (s *VoiceoverSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VoiceoverSelect) BoolX

func (s *VoiceoverSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VoiceoverSelect) Bools

func (s *VoiceoverSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VoiceoverSelect) BoolsX

func (s *VoiceoverSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (VoiceoverSelect) ExecContext

func (c VoiceoverSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSelect) Float64

func (s *VoiceoverSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VoiceoverSelect) Float64X

func (s *VoiceoverSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VoiceoverSelect) Float64s

func (s *VoiceoverSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VoiceoverSelect) Float64sX

func (s *VoiceoverSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VoiceoverSelect) Int

func (s *VoiceoverSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VoiceoverSelect) IntX

func (s *VoiceoverSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VoiceoverSelect) Ints

func (s *VoiceoverSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VoiceoverSelect) IntsX

func (s *VoiceoverSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VoiceoverSelect) Modify

func (vs *VoiceoverSelect) Modify(modifiers ...func(s *sql.Selector)) *VoiceoverSelect

Modify adds a query modifier for attaching custom logic to queries.

func (VoiceoverSelect) QueryContext

func (c VoiceoverSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSelect) Scan

func (vs *VoiceoverSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VoiceoverSelect) ScanX

func (s *VoiceoverSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VoiceoverSelect) String

func (s *VoiceoverSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VoiceoverSelect) StringX

func (s *VoiceoverSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VoiceoverSelect) Strings

func (s *VoiceoverSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VoiceoverSelect) StringsX

func (s *VoiceoverSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VoiceoverSpeaker

type VoiceoverSpeaker struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// NameInWorker holds the value of the "name_in_worker" field.
	NameInWorker string `json:"name_in_worker,omitempty"`
	// Name holds the value of the "name" field.
	Name *string `json:"name,omitempty"`
	// IsActive holds the value of the "is_active" field.
	IsActive bool `json:"is_active,omitempty"`
	// IsDefault holds the value of the "is_default" field.
	IsDefault bool `json:"is_default,omitempty"`
	// IsHidden holds the value of the "is_hidden" field.
	IsHidden bool `json:"is_hidden,omitempty"`
	// Locale holds the value of the "locale" field.
	Locale string `json:"locale,omitempty"`
	// ModelID holds the value of the "model_id" field.
	ModelID uuid.UUID `json:"model_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VoiceoverSpeakerQuery when eager-loading is set.
	Edges VoiceoverSpeakerEdges `json:"edges"`
	// contains filtered or unexported fields
}

VoiceoverSpeaker is the model entity for the VoiceoverSpeaker schema.

func (*VoiceoverSpeaker) ExecContext

func (c *VoiceoverSpeaker) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSpeaker) QueryContext

func (c *VoiceoverSpeaker) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSpeaker) QueryVoiceoverModels

func (vs *VoiceoverSpeaker) QueryVoiceoverModels() *VoiceoverModelQuery

QueryVoiceoverModels queries the "voiceover_models" edge of the VoiceoverSpeaker entity.

func (*VoiceoverSpeaker) QueryVoiceovers

func (vs *VoiceoverSpeaker) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers queries the "voiceovers" edge of the VoiceoverSpeaker entity.

func (*VoiceoverSpeaker) String

func (vs *VoiceoverSpeaker) String() string

String implements the fmt.Stringer.

func (*VoiceoverSpeaker) Unwrap

func (vs *VoiceoverSpeaker) Unwrap() *VoiceoverSpeaker

Unwrap unwraps the VoiceoverSpeaker 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 (*VoiceoverSpeaker) Update

Update returns a builder for updating this VoiceoverSpeaker. Note that you need to call VoiceoverSpeaker.Unwrap() before calling this method if this VoiceoverSpeaker was returned from a transaction, and the transaction was committed or rolled back.

type VoiceoverSpeakerClient

type VoiceoverSpeakerClient struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerClient is a client for the VoiceoverSpeaker schema.

func NewVoiceoverSpeakerClient

func NewVoiceoverSpeakerClient(c config) *VoiceoverSpeakerClient

NewVoiceoverSpeakerClient returns a client for the VoiceoverSpeaker from the given config.

func (*VoiceoverSpeakerClient) Create

Create returns a builder for creating a VoiceoverSpeaker entity.

func (*VoiceoverSpeakerClient) CreateBulk

CreateBulk returns a builder for creating a bulk of VoiceoverSpeaker entities.

func (*VoiceoverSpeakerClient) Delete

Delete returns a delete builder for VoiceoverSpeaker.

func (*VoiceoverSpeakerClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VoiceoverSpeakerClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VoiceoverSpeakerClient) ExecContext

func (c *VoiceoverSpeakerClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSpeakerClient) Get

Get returns a VoiceoverSpeaker entity by its id.

func (*VoiceoverSpeakerClient) GetX

GetX is like Get, but panics if an error occurs.

func (*VoiceoverSpeakerClient) Hooks

func (c *VoiceoverSpeakerClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VoiceoverSpeakerClient) Intercept

func (c *VoiceoverSpeakerClient) Intercept(interceptors ...Interceptor)

Use adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `voiceoverspeaker.Intercept(f(g(h())))`.

func (*VoiceoverSpeakerClient) Interceptors

func (c *VoiceoverSpeakerClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VoiceoverSpeakerClient) Query

Query returns a query builder for VoiceoverSpeaker.

func (*VoiceoverSpeakerClient) QueryContext

func (c *VoiceoverSpeakerClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSpeakerClient) QueryVoiceoverModels

func (c *VoiceoverSpeakerClient) QueryVoiceoverModels(vs *VoiceoverSpeaker) *VoiceoverModelQuery

QueryVoiceoverModels queries the voiceover_models edge of a VoiceoverSpeaker.

func (*VoiceoverSpeakerClient) QueryVoiceovers

func (c *VoiceoverSpeakerClient) QueryVoiceovers(vs *VoiceoverSpeaker) *VoiceoverQuery

QueryVoiceovers queries the voiceovers edge of a VoiceoverSpeaker.

func (*VoiceoverSpeakerClient) Update

Update returns an update builder for VoiceoverSpeaker.

func (*VoiceoverSpeakerClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*VoiceoverSpeakerClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*VoiceoverSpeakerClient) Use

func (c *VoiceoverSpeakerClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `voiceoverspeaker.Hooks(f(g(h())))`.

type VoiceoverSpeakerCreate

type VoiceoverSpeakerCreate struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerCreate is the builder for creating a VoiceoverSpeaker entity.

func (*VoiceoverSpeakerCreate) AddVoiceoverIDs

func (vsc *VoiceoverSpeakerCreate) AddVoiceoverIDs(ids ...uuid.UUID) *VoiceoverSpeakerCreate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*VoiceoverSpeakerCreate) AddVoiceovers

func (vsc *VoiceoverSpeakerCreate) AddVoiceovers(v ...*Voiceover) *VoiceoverSpeakerCreate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*VoiceoverSpeakerCreate) Exec

Exec executes the query.

func (*VoiceoverSpeakerCreate) ExecContext

func (c *VoiceoverSpeakerCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSpeakerCreate) ExecX

func (vsc *VoiceoverSpeakerCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverSpeakerCreate) Mutation

Mutation returns the VoiceoverSpeakerMutation object of the builder.

func (*VoiceoverSpeakerCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VoiceoverSpeaker.Create().
	SetNameInWorker(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VoiceoverSpeakerUpsert) {
		SetNameInWorker(v+v).
	}).
	Exec(ctx)

func (*VoiceoverSpeakerCreate) OnConflictColumns

func (vsc *VoiceoverSpeakerCreate) OnConflictColumns(columns ...string) *VoiceoverSpeakerUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VoiceoverSpeaker.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VoiceoverSpeakerCreate) QueryContext

func (c *VoiceoverSpeakerCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSpeakerCreate) Save

Save creates the VoiceoverSpeaker in the database.

func (*VoiceoverSpeakerCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*VoiceoverSpeakerCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*VoiceoverSpeakerCreate) SetID

SetID sets the "id" field.

func (*VoiceoverSpeakerCreate) SetIsActive

func (vsc *VoiceoverSpeakerCreate) SetIsActive(b bool) *VoiceoverSpeakerCreate

SetIsActive sets the "is_active" field.

func (*VoiceoverSpeakerCreate) SetIsDefault

func (vsc *VoiceoverSpeakerCreate) SetIsDefault(b bool) *VoiceoverSpeakerCreate

SetIsDefault sets the "is_default" field.

func (*VoiceoverSpeakerCreate) SetIsHidden

func (vsc *VoiceoverSpeakerCreate) SetIsHidden(b bool) *VoiceoverSpeakerCreate

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverSpeakerCreate) SetLocale

SetLocale sets the "locale" field.

func (*VoiceoverSpeakerCreate) SetModelID

SetModelID sets the "model_id" field.

func (*VoiceoverSpeakerCreate) SetName

SetName sets the "name" field.

func (*VoiceoverSpeakerCreate) SetNameInWorker

func (vsc *VoiceoverSpeakerCreate) SetNameInWorker(s string) *VoiceoverSpeakerCreate

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverSpeakerCreate) SetNillableCreatedAt

func (vsc *VoiceoverSpeakerCreate) SetNillableCreatedAt(t *time.Time) *VoiceoverSpeakerCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*VoiceoverSpeakerCreate) SetNillableID

func (vsc *VoiceoverSpeakerCreate) SetNillableID(u *uuid.UUID) *VoiceoverSpeakerCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*VoiceoverSpeakerCreate) SetNillableIsActive

func (vsc *VoiceoverSpeakerCreate) SetNillableIsActive(b *bool) *VoiceoverSpeakerCreate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*VoiceoverSpeakerCreate) SetNillableIsDefault

func (vsc *VoiceoverSpeakerCreate) SetNillableIsDefault(b *bool) *VoiceoverSpeakerCreate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*VoiceoverSpeakerCreate) SetNillableIsHidden

func (vsc *VoiceoverSpeakerCreate) SetNillableIsHidden(b *bool) *VoiceoverSpeakerCreate

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*VoiceoverSpeakerCreate) SetNillableLocale

func (vsc *VoiceoverSpeakerCreate) SetNillableLocale(s *string) *VoiceoverSpeakerCreate

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*VoiceoverSpeakerCreate) SetNillableName

func (vsc *VoiceoverSpeakerCreate) SetNillableName(s *string) *VoiceoverSpeakerCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*VoiceoverSpeakerCreate) SetNillableUpdatedAt

func (vsc *VoiceoverSpeakerCreate) SetNillableUpdatedAt(t *time.Time) *VoiceoverSpeakerCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*VoiceoverSpeakerCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverSpeakerCreate) SetVoiceoverModels

func (vsc *VoiceoverSpeakerCreate) SetVoiceoverModels(v *VoiceoverModel) *VoiceoverSpeakerCreate

SetVoiceoverModels sets the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverSpeakerCreate) SetVoiceoverModelsID

func (vsc *VoiceoverSpeakerCreate) SetVoiceoverModelsID(id uuid.UUID) *VoiceoverSpeakerCreate

SetVoiceoverModelsID sets the "voiceover_models" edge to the VoiceoverModel entity by ID.

type VoiceoverSpeakerCreateBulk

type VoiceoverSpeakerCreateBulk struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerCreateBulk is the builder for creating many VoiceoverSpeaker entities in bulk.

func (*VoiceoverSpeakerCreateBulk) Exec

Exec executes the query.

func (*VoiceoverSpeakerCreateBulk) ExecContext

func (c *VoiceoverSpeakerCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSpeakerCreateBulk) ExecX

func (vscb *VoiceoverSpeakerCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverSpeakerCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VoiceoverSpeaker.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VoiceoverSpeakerUpsert) {
		SetNameInWorker(v+v).
	}).
	Exec(ctx)

func (*VoiceoverSpeakerCreateBulk) OnConflictColumns

func (vscb *VoiceoverSpeakerCreateBulk) OnConflictColumns(columns ...string) *VoiceoverSpeakerUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VoiceoverSpeaker.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VoiceoverSpeakerCreateBulk) QueryContext

func (c *VoiceoverSpeakerCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSpeakerCreateBulk) Save

Save creates the VoiceoverSpeaker entities in the database.

func (*VoiceoverSpeakerCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type VoiceoverSpeakerDelete

type VoiceoverSpeakerDelete struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerDelete is the builder for deleting a VoiceoverSpeaker entity.

func (*VoiceoverSpeakerDelete) Exec

func (vsd *VoiceoverSpeakerDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VoiceoverSpeakerDelete) ExecContext

func (c *VoiceoverSpeakerDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSpeakerDelete) ExecX

func (vsd *VoiceoverSpeakerDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverSpeakerDelete) QueryContext

func (c *VoiceoverSpeakerDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSpeakerDelete) Where

Where appends a list predicates to the VoiceoverSpeakerDelete builder.

type VoiceoverSpeakerDeleteOne

type VoiceoverSpeakerDeleteOne struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerDeleteOne is the builder for deleting a single VoiceoverSpeaker entity.

func (*VoiceoverSpeakerDeleteOne) Exec

Exec executes the deletion query.

func (*VoiceoverSpeakerDeleteOne) ExecX

func (vsdo *VoiceoverSpeakerDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type VoiceoverSpeakerEdges

type VoiceoverSpeakerEdges struct {
	// Voiceovers holds the value of the voiceovers edge.
	Voiceovers []*Voiceover `json:"voiceovers,omitempty"`
	// VoiceoverModels holds the value of the voiceover_models edge.
	VoiceoverModels *VoiceoverModel `json:"voiceover_models,omitempty"`
	// contains filtered or unexported fields
}

VoiceoverSpeakerEdges holds the relations/edges for other nodes in the graph.

func (VoiceoverSpeakerEdges) VoiceoverModelsOrErr

func (e VoiceoverSpeakerEdges) VoiceoverModelsOrErr() (*VoiceoverModel, error)

VoiceoverModelsOrErr returns the VoiceoverModels value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VoiceoverSpeakerEdges) VoiceoversOrErr

func (e VoiceoverSpeakerEdges) VoiceoversOrErr() ([]*Voiceover, error)

VoiceoversOrErr returns the Voiceovers value or an error if the edge was not loaded in eager-loading.

type VoiceoverSpeakerGroupBy

type VoiceoverSpeakerGroupBy struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerGroupBy is the group-by builder for VoiceoverSpeaker entities.

func (*VoiceoverSpeakerGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*VoiceoverSpeakerGroupBy) Bool

func (s *VoiceoverSpeakerGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerGroupBy) BoolX

func (s *VoiceoverSpeakerGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VoiceoverSpeakerGroupBy) Bools

func (s *VoiceoverSpeakerGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerGroupBy) BoolsX

func (s *VoiceoverSpeakerGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VoiceoverSpeakerGroupBy) Float64

func (s *VoiceoverSpeakerGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerGroupBy) Float64X

func (s *VoiceoverSpeakerGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VoiceoverSpeakerGroupBy) Float64s

func (s *VoiceoverSpeakerGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerGroupBy) Float64sX

func (s *VoiceoverSpeakerGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VoiceoverSpeakerGroupBy) Int

func (s *VoiceoverSpeakerGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerGroupBy) IntX

func (s *VoiceoverSpeakerGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VoiceoverSpeakerGroupBy) Ints

func (s *VoiceoverSpeakerGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerGroupBy) IntsX

func (s *VoiceoverSpeakerGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VoiceoverSpeakerGroupBy) Scan

func (vsgb *VoiceoverSpeakerGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VoiceoverSpeakerGroupBy) ScanX

func (s *VoiceoverSpeakerGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VoiceoverSpeakerGroupBy) String

func (s *VoiceoverSpeakerGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerGroupBy) StringX

func (s *VoiceoverSpeakerGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VoiceoverSpeakerGroupBy) Strings

func (s *VoiceoverSpeakerGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerGroupBy) StringsX

func (s *VoiceoverSpeakerGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VoiceoverSpeakerMutation

type VoiceoverSpeakerMutation struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerMutation represents an operation that mutates the VoiceoverSpeaker nodes in the graph.

func (*VoiceoverSpeakerMutation) AddField

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) AddVoiceoverIDs

func (m *VoiceoverSpeakerMutation) AddVoiceoverIDs(ids ...uuid.UUID)

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by ids.

func (*VoiceoverSpeakerMutation) AddedEdges

func (m *VoiceoverSpeakerMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VoiceoverSpeakerMutation) AddedField

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) AddedFields

func (m *VoiceoverSpeakerMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VoiceoverSpeakerMutation) AddedIDs

func (m *VoiceoverSpeakerMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VoiceoverSpeakerMutation) ClearEdge

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) ClearField

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) ClearName

func (m *VoiceoverSpeakerMutation) ClearName()

ClearName clears the value of the "name" field.

func (*VoiceoverSpeakerMutation) ClearVoiceoverModels

func (m *VoiceoverSpeakerMutation) ClearVoiceoverModels()

ClearVoiceoverModels clears the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverSpeakerMutation) ClearVoiceovers

func (m *VoiceoverSpeakerMutation) ClearVoiceovers()

ClearVoiceovers clears the "voiceovers" edge to the Voiceover entity.

func (*VoiceoverSpeakerMutation) ClearedEdges

func (m *VoiceoverSpeakerMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VoiceoverSpeakerMutation) ClearedFields

func (m *VoiceoverSpeakerMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VoiceoverSpeakerMutation) Client

func (m VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) CreatedAt

func (m *VoiceoverSpeakerMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*VoiceoverSpeakerMutation) EdgeCleared

func (m *VoiceoverSpeakerMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VoiceoverSpeakerMutation) ExecContext

func (c *VoiceoverSpeakerMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSpeakerMutation) Field

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) FieldCleared

func (m *VoiceoverSpeakerMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VoiceoverSpeakerMutation) Fields

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) ID

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) IsActive

func (m *VoiceoverSpeakerMutation) IsActive() (r bool, exists bool)

IsActive returns the value of the "is_active" field in the mutation.

func (*VoiceoverSpeakerMutation) IsDefault

func (m *VoiceoverSpeakerMutation) IsDefault() (r bool, exists bool)

IsDefault returns the value of the "is_default" field in the mutation.

func (*VoiceoverSpeakerMutation) IsHidden

func (m *VoiceoverSpeakerMutation) IsHidden() (r bool, exists bool)

IsHidden returns the value of the "is_hidden" field in the mutation.

func (*VoiceoverSpeakerMutation) Locale

func (m *VoiceoverSpeakerMutation) Locale() (r string, exists bool)

Locale returns the value of the "locale" field in the mutation.

func (*VoiceoverSpeakerMutation) ModelID

func (m *VoiceoverSpeakerMutation) ModelID() (r uuid.UUID, exists bool)

ModelID returns the value of the "model_id" field in the mutation.

func (*VoiceoverSpeakerMutation) Name

func (m *VoiceoverSpeakerMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*VoiceoverSpeakerMutation) NameCleared

func (m *VoiceoverSpeakerMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*VoiceoverSpeakerMutation) NameInWorker

func (m *VoiceoverSpeakerMutation) NameInWorker() (r string, exists bool)

NameInWorker returns the value of the "name_in_worker" field in the mutation.

func (*VoiceoverSpeakerMutation) OldCreatedAt

func (m *VoiceoverSpeakerMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the VoiceoverSpeaker entity. If the VoiceoverSpeaker 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 (*VoiceoverSpeakerMutation) OldField

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) OldIsActive

func (m *VoiceoverSpeakerMutation) OldIsActive(ctx context.Context) (v bool, err error)

OldIsActive returns the old "is_active" field's value of the VoiceoverSpeaker entity. If the VoiceoverSpeaker 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 (*VoiceoverSpeakerMutation) OldIsDefault

func (m *VoiceoverSpeakerMutation) OldIsDefault(ctx context.Context) (v bool, err error)

OldIsDefault returns the old "is_default" field's value of the VoiceoverSpeaker entity. If the VoiceoverSpeaker 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 (*VoiceoverSpeakerMutation) OldIsHidden

func (m *VoiceoverSpeakerMutation) OldIsHidden(ctx context.Context) (v bool, err error)

OldIsHidden returns the old "is_hidden" field's value of the VoiceoverSpeaker entity. If the VoiceoverSpeaker 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 (*VoiceoverSpeakerMutation) OldLocale

func (m *VoiceoverSpeakerMutation) OldLocale(ctx context.Context) (v string, err error)

OldLocale returns the old "locale" field's value of the VoiceoverSpeaker entity. If the VoiceoverSpeaker 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 (*VoiceoverSpeakerMutation) OldModelID

func (m *VoiceoverSpeakerMutation) OldModelID(ctx context.Context) (v uuid.UUID, err error)

OldModelID returns the old "model_id" field's value of the VoiceoverSpeaker entity. If the VoiceoverSpeaker 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 (*VoiceoverSpeakerMutation) OldName

func (m *VoiceoverSpeakerMutation) OldName(ctx context.Context) (v *string, err error)

OldName returns the old "name" field's value of the VoiceoverSpeaker entity. If the VoiceoverSpeaker 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 (*VoiceoverSpeakerMutation) OldNameInWorker

func (m *VoiceoverSpeakerMutation) OldNameInWorker(ctx context.Context) (v string, err error)

OldNameInWorker returns the old "name_in_worker" field's value of the VoiceoverSpeaker entity. If the VoiceoverSpeaker 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 (*VoiceoverSpeakerMutation) OldUpdatedAt

func (m *VoiceoverSpeakerMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the VoiceoverSpeaker entity. If the VoiceoverSpeaker 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 (*VoiceoverSpeakerMutation) Op

func (m *VoiceoverSpeakerMutation) Op() Op

Op returns the operation name.

func (*VoiceoverSpeakerMutation) QueryContext

func (c *VoiceoverSpeakerMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSpeakerMutation) RemoveVoiceoverIDs

func (m *VoiceoverSpeakerMutation) RemoveVoiceoverIDs(ids ...uuid.UUID)

RemoveVoiceoverIDs removes the "voiceovers" edge to the Voiceover entity by IDs.

func (*VoiceoverSpeakerMutation) RemovedEdges

func (m *VoiceoverSpeakerMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VoiceoverSpeakerMutation) RemovedIDs

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) RemovedVoiceoversIDs

func (m *VoiceoverSpeakerMutation) RemovedVoiceoversIDs() (ids []uuid.UUID)

RemovedVoiceovers returns the removed IDs of the "voiceovers" edge to the Voiceover entity.

func (*VoiceoverSpeakerMutation) ResetCreatedAt

func (m *VoiceoverSpeakerMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*VoiceoverSpeakerMutation) ResetEdge

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) ResetField

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) ResetIsActive

func (m *VoiceoverSpeakerMutation) ResetIsActive()

ResetIsActive resets all changes to the "is_active" field.

func (*VoiceoverSpeakerMutation) ResetIsDefault

func (m *VoiceoverSpeakerMutation) ResetIsDefault()

ResetIsDefault resets all changes to the "is_default" field.

func (*VoiceoverSpeakerMutation) ResetIsHidden

func (m *VoiceoverSpeakerMutation) ResetIsHidden()

ResetIsHidden resets all changes to the "is_hidden" field.

func (*VoiceoverSpeakerMutation) ResetLocale

func (m *VoiceoverSpeakerMutation) ResetLocale()

ResetLocale resets all changes to the "locale" field.

func (*VoiceoverSpeakerMutation) ResetModelID

func (m *VoiceoverSpeakerMutation) ResetModelID()

ResetModelID resets all changes to the "model_id" field.

func (*VoiceoverSpeakerMutation) ResetName

func (m *VoiceoverSpeakerMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*VoiceoverSpeakerMutation) ResetNameInWorker

func (m *VoiceoverSpeakerMutation) ResetNameInWorker()

ResetNameInWorker resets all changes to the "name_in_worker" field.

func (*VoiceoverSpeakerMutation) ResetUpdatedAt

func (m *VoiceoverSpeakerMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*VoiceoverSpeakerMutation) ResetVoiceoverModels

func (m *VoiceoverSpeakerMutation) ResetVoiceoverModels()

ResetVoiceoverModels resets all changes to the "voiceover_models" edge.

func (*VoiceoverSpeakerMutation) ResetVoiceovers

func (m *VoiceoverSpeakerMutation) ResetVoiceovers()

ResetVoiceovers resets all changes to the "voiceovers" edge.

func (*VoiceoverSpeakerMutation) SetCreatedAt

func (m *VoiceoverSpeakerMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*VoiceoverSpeakerMutation) SetField

func (m *VoiceoverSpeakerMutation) 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 (*VoiceoverSpeakerMutation) SetID

func (m *VoiceoverSpeakerMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of VoiceoverSpeaker entities.

func (*VoiceoverSpeakerMutation) SetIsActive

func (m *VoiceoverSpeakerMutation) SetIsActive(b bool)

SetIsActive sets the "is_active" field.

func (*VoiceoverSpeakerMutation) SetIsDefault

func (m *VoiceoverSpeakerMutation) SetIsDefault(b bool)

SetIsDefault sets the "is_default" field.

func (*VoiceoverSpeakerMutation) SetIsHidden

func (m *VoiceoverSpeakerMutation) SetIsHidden(b bool)

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverSpeakerMutation) SetLocale

func (m *VoiceoverSpeakerMutation) SetLocale(s string)

SetLocale sets the "locale" field.

func (*VoiceoverSpeakerMutation) SetModelID

func (m *VoiceoverSpeakerMutation) SetModelID(u uuid.UUID)

SetModelID sets the "model_id" field.

func (*VoiceoverSpeakerMutation) SetName

func (m *VoiceoverSpeakerMutation) SetName(s string)

SetName sets the "name" field.

func (*VoiceoverSpeakerMutation) SetNameInWorker

func (m *VoiceoverSpeakerMutation) SetNameInWorker(s string)

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverSpeakerMutation) SetOp

func (m *VoiceoverSpeakerMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VoiceoverSpeakerMutation) SetUpdatedAt

func (m *VoiceoverSpeakerMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverSpeakerMutation) SetVoiceoverModelsID

func (m *VoiceoverSpeakerMutation) SetVoiceoverModelsID(id uuid.UUID)

SetVoiceoverModelsID sets the "voiceover_models" edge to the VoiceoverModel entity by id.

func (VoiceoverSpeakerMutation) Tx

func (m VoiceoverSpeakerMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VoiceoverSpeakerMutation) Type

func (m *VoiceoverSpeakerMutation) Type() string

Type returns the node type of this mutation (VoiceoverSpeaker).

func (*VoiceoverSpeakerMutation) UpdatedAt

func (m *VoiceoverSpeakerMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*VoiceoverSpeakerMutation) VoiceoverModelsCleared

func (m *VoiceoverSpeakerMutation) VoiceoverModelsCleared() bool

VoiceoverModelsCleared reports if the "voiceover_models" edge to the VoiceoverModel entity was cleared.

func (*VoiceoverSpeakerMutation) VoiceoverModelsID

func (m *VoiceoverSpeakerMutation) VoiceoverModelsID() (id uuid.UUID, exists bool)

VoiceoverModelsID returns the "voiceover_models" edge ID in the mutation.

func (*VoiceoverSpeakerMutation) VoiceoverModelsIDs

func (m *VoiceoverSpeakerMutation) VoiceoverModelsIDs() (ids []uuid.UUID)

VoiceoverModelsIDs returns the "voiceover_models" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VoiceoverModelsID instead. It exists only for internal usage by the builders.

func (*VoiceoverSpeakerMutation) VoiceoversCleared

func (m *VoiceoverSpeakerMutation) VoiceoversCleared() bool

VoiceoversCleared reports if the "voiceovers" edge to the Voiceover entity was cleared.

func (*VoiceoverSpeakerMutation) VoiceoversIDs

func (m *VoiceoverSpeakerMutation) VoiceoversIDs() (ids []uuid.UUID)

VoiceoversIDs returns the "voiceovers" edge IDs in the mutation.

func (*VoiceoverSpeakerMutation) Where

Where appends a list predicates to the VoiceoverSpeakerMutation builder.

func (*VoiceoverSpeakerMutation) WhereP

func (m *VoiceoverSpeakerMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VoiceoverSpeakerMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VoiceoverSpeakerQuery

type VoiceoverSpeakerQuery struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerQuery is the builder for querying VoiceoverSpeaker entities.

func (*VoiceoverSpeakerQuery) Aggregate

Aggregate returns a VoiceoverSpeakerSelect configured with the given aggregations.

func (*VoiceoverSpeakerQuery) All

All executes the query and returns a list of VoiceoverSpeakers.

func (*VoiceoverSpeakerQuery) AllX

AllX is like All, but panics if an error occurs.

func (*VoiceoverSpeakerQuery) Clone

Clone returns a duplicate of the VoiceoverSpeakerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VoiceoverSpeakerQuery) Count

func (vsq *VoiceoverSpeakerQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VoiceoverSpeakerQuery) CountX

func (vsq *VoiceoverSpeakerQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VoiceoverSpeakerQuery) ExecContext

func (c *VoiceoverSpeakerQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSpeakerQuery) Exist

func (vsq *VoiceoverSpeakerQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VoiceoverSpeakerQuery) ExistX

func (vsq *VoiceoverSpeakerQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VoiceoverSpeakerQuery) First

First returns the first VoiceoverSpeaker entity from the query. Returns a *NotFoundError when no VoiceoverSpeaker was found.

func (*VoiceoverSpeakerQuery) FirstID

func (vsq *VoiceoverSpeakerQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first VoiceoverSpeaker ID from the query. Returns a *NotFoundError when no VoiceoverSpeaker ID was found.

func (*VoiceoverSpeakerQuery) FirstIDX

func (vsq *VoiceoverSpeakerQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*VoiceoverSpeakerQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*VoiceoverSpeakerQuery) GroupBy

func (vsq *VoiceoverSpeakerQuery) GroupBy(field string, fields ...string) *VoiceoverSpeakerGroupBy

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 {
	NameInWorker string `json:"name_in_worker,omitempty"`
	Count int `json:"count,omitempty"`
}

client.VoiceoverSpeaker.Query().
	GroupBy(voiceoverspeaker.FieldNameInWorker).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VoiceoverSpeakerQuery) IDs

func (vsq *VoiceoverSpeakerQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs executes the query and returns a list of VoiceoverSpeaker IDs.

func (*VoiceoverSpeakerQuery) IDsX

func (vsq *VoiceoverSpeakerQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*VoiceoverSpeakerQuery) Limit

func (vsq *VoiceoverSpeakerQuery) Limit(limit int) *VoiceoverSpeakerQuery

Limit the number of records to be returned by this query.

func (*VoiceoverSpeakerQuery) Modify

func (vsq *VoiceoverSpeakerQuery) Modify(modifiers ...func(s *sql.Selector)) *VoiceoverSpeakerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (*VoiceoverSpeakerQuery) Offset

func (vsq *VoiceoverSpeakerQuery) Offset(offset int) *VoiceoverSpeakerQuery

Offset to start from.

func (*VoiceoverSpeakerQuery) Only

Only returns a single VoiceoverSpeaker entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VoiceoverSpeaker entity is found. Returns a *NotFoundError when no VoiceoverSpeaker entities are found.

func (*VoiceoverSpeakerQuery) OnlyID

func (vsq *VoiceoverSpeakerQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only VoiceoverSpeaker ID in the query. Returns a *NotSingularError when more than one VoiceoverSpeaker ID is found. Returns a *NotFoundError when no entities are found.

func (*VoiceoverSpeakerQuery) OnlyIDX

func (vsq *VoiceoverSpeakerQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VoiceoverSpeakerQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*VoiceoverSpeakerQuery) Order

Order specifies how the records should be ordered.

func (*VoiceoverSpeakerQuery) QueryContext

func (c *VoiceoverSpeakerQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSpeakerQuery) QueryVoiceoverModels

func (vsq *VoiceoverSpeakerQuery) QueryVoiceoverModels() *VoiceoverModelQuery

QueryVoiceoverModels chains the current query on the "voiceover_models" edge.

func (*VoiceoverSpeakerQuery) QueryVoiceovers

func (vsq *VoiceoverSpeakerQuery) QueryVoiceovers() *VoiceoverQuery

QueryVoiceovers chains the current query on the "voiceovers" edge.

func (*VoiceoverSpeakerQuery) Select

func (vsq *VoiceoverSpeakerQuery) Select(fields ...string) *VoiceoverSpeakerSelect

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 {
	NameInWorker string `json:"name_in_worker,omitempty"`
}

client.VoiceoverSpeaker.Query().
	Select(voiceoverspeaker.FieldNameInWorker).
	Scan(ctx, &v)

func (*VoiceoverSpeakerQuery) Unique

func (vsq *VoiceoverSpeakerQuery) Unique(unique bool) *VoiceoverSpeakerQuery

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 (*VoiceoverSpeakerQuery) Where

Where adds a new predicate for the VoiceoverSpeakerQuery builder.

func (*VoiceoverSpeakerQuery) WithVoiceoverModels

func (vsq *VoiceoverSpeakerQuery) WithVoiceoverModels(opts ...func(*VoiceoverModelQuery)) *VoiceoverSpeakerQuery

WithVoiceoverModels tells the query-builder to eager-load the nodes that are connected to the "voiceover_models" edge. The optional arguments are used to configure the query builder of the edge.

func (*VoiceoverSpeakerQuery) WithVoiceovers

func (vsq *VoiceoverSpeakerQuery) WithVoiceovers(opts ...func(*VoiceoverQuery)) *VoiceoverSpeakerQuery

WithVoiceovers tells the query-builder to eager-load the nodes that are connected to the "voiceovers" edge. The optional arguments are used to configure the query builder of the edge.

type VoiceoverSpeakerSelect

type VoiceoverSpeakerSelect struct {
	*VoiceoverSpeakerQuery
	// contains filtered or unexported fields
}

VoiceoverSpeakerSelect is the builder for selecting fields of VoiceoverSpeaker entities.

func (*VoiceoverSpeakerSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*VoiceoverSpeakerSelect) Bool

func (s *VoiceoverSpeakerSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerSelect) BoolX

func (s *VoiceoverSpeakerSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VoiceoverSpeakerSelect) Bools

func (s *VoiceoverSpeakerSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerSelect) BoolsX

func (s *VoiceoverSpeakerSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (VoiceoverSpeakerSelect) ExecContext

func (c VoiceoverSpeakerSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSpeakerSelect) Float64

func (s *VoiceoverSpeakerSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerSelect) Float64X

func (s *VoiceoverSpeakerSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VoiceoverSpeakerSelect) Float64s

func (s *VoiceoverSpeakerSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerSelect) Float64sX

func (s *VoiceoverSpeakerSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VoiceoverSpeakerSelect) Int

func (s *VoiceoverSpeakerSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerSelect) IntX

func (s *VoiceoverSpeakerSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VoiceoverSpeakerSelect) Ints

func (s *VoiceoverSpeakerSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerSelect) IntsX

func (s *VoiceoverSpeakerSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VoiceoverSpeakerSelect) Modify

func (vss *VoiceoverSpeakerSelect) Modify(modifiers ...func(s *sql.Selector)) *VoiceoverSpeakerSelect

Modify adds a query modifier for attaching custom logic to queries.

func (VoiceoverSpeakerSelect) QueryContext

func (c VoiceoverSpeakerSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSpeakerSelect) Scan

func (vss *VoiceoverSpeakerSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VoiceoverSpeakerSelect) ScanX

func (s *VoiceoverSpeakerSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VoiceoverSpeakerSelect) String

func (s *VoiceoverSpeakerSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerSelect) StringX

func (s *VoiceoverSpeakerSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VoiceoverSpeakerSelect) Strings

func (s *VoiceoverSpeakerSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VoiceoverSpeakerSelect) StringsX

func (s *VoiceoverSpeakerSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VoiceoverSpeakerUpdate

type VoiceoverSpeakerUpdate struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerUpdate is the builder for updating VoiceoverSpeaker entities.

func (*VoiceoverSpeakerUpdate) AddVoiceoverIDs

func (vsu *VoiceoverSpeakerUpdate) AddVoiceoverIDs(ids ...uuid.UUID) *VoiceoverSpeakerUpdate

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*VoiceoverSpeakerUpdate) AddVoiceovers

func (vsu *VoiceoverSpeakerUpdate) AddVoiceovers(v ...*Voiceover) *VoiceoverSpeakerUpdate

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*VoiceoverSpeakerUpdate) ClearName

ClearName clears the value of the "name" field.

func (*VoiceoverSpeakerUpdate) ClearVoiceoverModels

func (vsu *VoiceoverSpeakerUpdate) ClearVoiceoverModels() *VoiceoverSpeakerUpdate

ClearVoiceoverModels clears the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverSpeakerUpdate) ClearVoiceovers

func (vsu *VoiceoverSpeakerUpdate) ClearVoiceovers() *VoiceoverSpeakerUpdate

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*VoiceoverSpeakerUpdate) Exec

Exec executes the query.

func (*VoiceoverSpeakerUpdate) ExecContext

func (c *VoiceoverSpeakerUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSpeakerUpdate) ExecX

func (vsu *VoiceoverSpeakerUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverSpeakerUpdate) Modify

func (vsu *VoiceoverSpeakerUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VoiceoverSpeakerUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VoiceoverSpeakerUpdate) Mutation

Mutation returns the VoiceoverSpeakerMutation object of the builder.

func (*VoiceoverSpeakerUpdate) QueryContext

func (c *VoiceoverSpeakerUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSpeakerUpdate) RemoveVoiceoverIDs

func (vsu *VoiceoverSpeakerUpdate) RemoveVoiceoverIDs(ids ...uuid.UUID) *VoiceoverSpeakerUpdate

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*VoiceoverSpeakerUpdate) RemoveVoiceovers

func (vsu *VoiceoverSpeakerUpdate) RemoveVoiceovers(v ...*Voiceover) *VoiceoverSpeakerUpdate

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*VoiceoverSpeakerUpdate) Save

func (vsu *VoiceoverSpeakerUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VoiceoverSpeakerUpdate) SaveX

func (vsu *VoiceoverSpeakerUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VoiceoverSpeakerUpdate) SetIsActive

func (vsu *VoiceoverSpeakerUpdate) SetIsActive(b bool) *VoiceoverSpeakerUpdate

SetIsActive sets the "is_active" field.

func (*VoiceoverSpeakerUpdate) SetIsDefault

func (vsu *VoiceoverSpeakerUpdate) SetIsDefault(b bool) *VoiceoverSpeakerUpdate

SetIsDefault sets the "is_default" field.

func (*VoiceoverSpeakerUpdate) SetIsHidden

func (vsu *VoiceoverSpeakerUpdate) SetIsHidden(b bool) *VoiceoverSpeakerUpdate

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverSpeakerUpdate) SetLocale

SetLocale sets the "locale" field.

func (*VoiceoverSpeakerUpdate) SetModelID

SetModelID sets the "model_id" field.

func (*VoiceoverSpeakerUpdate) SetName

SetName sets the "name" field.

func (*VoiceoverSpeakerUpdate) SetNameInWorker

func (vsu *VoiceoverSpeakerUpdate) SetNameInWorker(s string) *VoiceoverSpeakerUpdate

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverSpeakerUpdate) SetNillableIsActive

func (vsu *VoiceoverSpeakerUpdate) SetNillableIsActive(b *bool) *VoiceoverSpeakerUpdate

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*VoiceoverSpeakerUpdate) SetNillableIsDefault

func (vsu *VoiceoverSpeakerUpdate) SetNillableIsDefault(b *bool) *VoiceoverSpeakerUpdate

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*VoiceoverSpeakerUpdate) SetNillableIsHidden

func (vsu *VoiceoverSpeakerUpdate) SetNillableIsHidden(b *bool) *VoiceoverSpeakerUpdate

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*VoiceoverSpeakerUpdate) SetNillableLocale

func (vsu *VoiceoverSpeakerUpdate) SetNillableLocale(s *string) *VoiceoverSpeakerUpdate

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*VoiceoverSpeakerUpdate) SetNillableName

func (vsu *VoiceoverSpeakerUpdate) SetNillableName(s *string) *VoiceoverSpeakerUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*VoiceoverSpeakerUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverSpeakerUpdate) SetVoiceoverModels

func (vsu *VoiceoverSpeakerUpdate) SetVoiceoverModels(v *VoiceoverModel) *VoiceoverSpeakerUpdate

SetVoiceoverModels sets the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverSpeakerUpdate) SetVoiceoverModelsID

func (vsu *VoiceoverSpeakerUpdate) SetVoiceoverModelsID(id uuid.UUID) *VoiceoverSpeakerUpdate

SetVoiceoverModelsID sets the "voiceover_models" edge to the VoiceoverModel entity by ID.

func (*VoiceoverSpeakerUpdate) Where

Where appends a list predicates to the VoiceoverSpeakerUpdate builder.

type VoiceoverSpeakerUpdateOne

type VoiceoverSpeakerUpdateOne struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerUpdateOne is the builder for updating a single VoiceoverSpeaker entity.

func (*VoiceoverSpeakerUpdateOne) AddVoiceoverIDs

func (vsuo *VoiceoverSpeakerUpdateOne) AddVoiceoverIDs(ids ...uuid.UUID) *VoiceoverSpeakerUpdateOne

AddVoiceoverIDs adds the "voiceovers" edge to the Voiceover entity by IDs.

func (*VoiceoverSpeakerUpdateOne) AddVoiceovers

AddVoiceovers adds the "voiceovers" edges to the Voiceover entity.

func (*VoiceoverSpeakerUpdateOne) ClearName

ClearName clears the value of the "name" field.

func (*VoiceoverSpeakerUpdateOne) ClearVoiceoverModels

func (vsuo *VoiceoverSpeakerUpdateOne) ClearVoiceoverModels() *VoiceoverSpeakerUpdateOne

ClearVoiceoverModels clears the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverSpeakerUpdateOne) ClearVoiceovers

func (vsuo *VoiceoverSpeakerUpdateOne) ClearVoiceovers() *VoiceoverSpeakerUpdateOne

ClearVoiceovers clears all "voiceovers" edges to the Voiceover entity.

func (*VoiceoverSpeakerUpdateOne) Exec

Exec executes the query on the entity.

func (*VoiceoverSpeakerUpdateOne) ExecContext

func (c *VoiceoverSpeakerUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverSpeakerUpdateOne) ExecX

func (vsuo *VoiceoverSpeakerUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverSpeakerUpdateOne) Modify

func (vsuo *VoiceoverSpeakerUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VoiceoverSpeakerUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VoiceoverSpeakerUpdateOne) Mutation

Mutation returns the VoiceoverSpeakerMutation object of the builder.

func (*VoiceoverSpeakerUpdateOne) QueryContext

func (c *VoiceoverSpeakerUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverSpeakerUpdateOne) RemoveVoiceoverIDs

func (vsuo *VoiceoverSpeakerUpdateOne) RemoveVoiceoverIDs(ids ...uuid.UUID) *VoiceoverSpeakerUpdateOne

RemoveVoiceoverIDs removes the "voiceovers" edge to Voiceover entities by IDs.

func (*VoiceoverSpeakerUpdateOne) RemoveVoiceovers

func (vsuo *VoiceoverSpeakerUpdateOne) RemoveVoiceovers(v ...*Voiceover) *VoiceoverSpeakerUpdateOne

RemoveVoiceovers removes "voiceovers" edges to Voiceover entities.

func (*VoiceoverSpeakerUpdateOne) Save

Save executes the query and returns the updated VoiceoverSpeaker entity.

func (*VoiceoverSpeakerUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*VoiceoverSpeakerUpdateOne) Select

func (vsuo *VoiceoverSpeakerUpdateOne) Select(field string, fields ...string) *VoiceoverSpeakerUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VoiceoverSpeakerUpdateOne) SetIsActive

SetIsActive sets the "is_active" field.

func (*VoiceoverSpeakerUpdateOne) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*VoiceoverSpeakerUpdateOne) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverSpeakerUpdateOne) SetLocale

SetLocale sets the "locale" field.

func (*VoiceoverSpeakerUpdateOne) SetModelID

SetModelID sets the "model_id" field.

func (*VoiceoverSpeakerUpdateOne) SetName

SetName sets the "name" field.

func (*VoiceoverSpeakerUpdateOne) SetNameInWorker

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverSpeakerUpdateOne) SetNillableIsActive

func (vsuo *VoiceoverSpeakerUpdateOne) SetNillableIsActive(b *bool) *VoiceoverSpeakerUpdateOne

SetNillableIsActive sets the "is_active" field if the given value is not nil.

func (*VoiceoverSpeakerUpdateOne) SetNillableIsDefault

func (vsuo *VoiceoverSpeakerUpdateOne) SetNillableIsDefault(b *bool) *VoiceoverSpeakerUpdateOne

SetNillableIsDefault sets the "is_default" field if the given value is not nil.

func (*VoiceoverSpeakerUpdateOne) SetNillableIsHidden

func (vsuo *VoiceoverSpeakerUpdateOne) SetNillableIsHidden(b *bool) *VoiceoverSpeakerUpdateOne

SetNillableIsHidden sets the "is_hidden" field if the given value is not nil.

func (*VoiceoverSpeakerUpdateOne) SetNillableLocale

func (vsuo *VoiceoverSpeakerUpdateOne) SetNillableLocale(s *string) *VoiceoverSpeakerUpdateOne

SetNillableLocale sets the "locale" field if the given value is not nil.

func (*VoiceoverSpeakerUpdateOne) SetNillableName

func (vsuo *VoiceoverSpeakerUpdateOne) SetNillableName(s *string) *VoiceoverSpeakerUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*VoiceoverSpeakerUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverSpeakerUpdateOne) SetVoiceoverModels

SetVoiceoverModels sets the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverSpeakerUpdateOne) SetVoiceoverModelsID

func (vsuo *VoiceoverSpeakerUpdateOne) SetVoiceoverModelsID(id uuid.UUID) *VoiceoverSpeakerUpdateOne

SetVoiceoverModelsID sets the "voiceover_models" edge to the VoiceoverModel entity by ID.

type VoiceoverSpeakerUpsert

type VoiceoverSpeakerUpsert struct {
	*sql.UpdateSet
}

VoiceoverSpeakerUpsert is the "OnConflict" setter.

func (*VoiceoverSpeakerUpsert) ClearName

ClearName clears the value of the "name" field.

func (*VoiceoverSpeakerUpsert) SetIsActive

SetIsActive sets the "is_active" field.

func (*VoiceoverSpeakerUpsert) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*VoiceoverSpeakerUpsert) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverSpeakerUpsert) SetLocale

SetLocale sets the "locale" field.

func (*VoiceoverSpeakerUpsert) SetModelID

SetModelID sets the "model_id" field.

func (*VoiceoverSpeakerUpsert) SetName

SetName sets the "name" field.

func (*VoiceoverSpeakerUpsert) SetNameInWorker

func (u *VoiceoverSpeakerUpsert) SetNameInWorker(v string) *VoiceoverSpeakerUpsert

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverSpeakerUpsert) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverSpeakerUpsert) UpdateIsActive

func (u *VoiceoverSpeakerUpsert) UpdateIsActive() *VoiceoverSpeakerUpsert

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsert) UpdateIsDefault

func (u *VoiceoverSpeakerUpsert) UpdateIsDefault() *VoiceoverSpeakerUpsert

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsert) UpdateIsHidden

func (u *VoiceoverSpeakerUpsert) UpdateIsHidden() *VoiceoverSpeakerUpsert

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsert) UpdateLocale

UpdateLocale sets the "locale" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsert) UpdateModelID

func (u *VoiceoverSpeakerUpsert) UpdateModelID() *VoiceoverSpeakerUpsert

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsert) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsert) UpdateNameInWorker

func (u *VoiceoverSpeakerUpsert) UpdateNameInWorker() *VoiceoverSpeakerUpsert

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsert) UpdateUpdatedAt

func (u *VoiceoverSpeakerUpsert) UpdateUpdatedAt() *VoiceoverSpeakerUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type VoiceoverSpeakerUpsertBulk

type VoiceoverSpeakerUpsertBulk struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerUpsertBulk is the builder for "upsert"-ing a bulk of VoiceoverSpeaker nodes.

func (*VoiceoverSpeakerUpsertBulk) ClearName

ClearName clears the value of the "name" field.

func (*VoiceoverSpeakerUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VoiceoverSpeakerUpsertBulk) Exec

Exec executes the query.

func (*VoiceoverSpeakerUpsertBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverSpeakerUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VoiceoverSpeaker.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VoiceoverSpeakerUpsertBulk) SetIsActive

SetIsActive sets the "is_active" field.

func (*VoiceoverSpeakerUpsertBulk) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*VoiceoverSpeakerUpsertBulk) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverSpeakerUpsertBulk) SetLocale

SetLocale sets the "locale" field.

func (*VoiceoverSpeakerUpsertBulk) SetModelID

SetModelID sets the "model_id" field.

func (*VoiceoverSpeakerUpsertBulk) SetName

SetName sets the "name" field.

func (*VoiceoverSpeakerUpsertBulk) SetNameInWorker

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverSpeakerUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverSpeakerUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VoiceoverSpeakerCreateBulk.OnConflict documentation for more info.

func (*VoiceoverSpeakerUpsertBulk) UpdateIsActive

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertBulk) UpdateIsDefault

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertBulk) UpdateIsHidden

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertBulk) UpdateLocale

UpdateLocale sets the "locale" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertBulk) UpdateModelID

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertBulk) UpdateNameInWorker

func (u *VoiceoverSpeakerUpsertBulk) UpdateNameInWorker() *VoiceoverSpeakerUpsertBulk

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertBulk) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.VoiceoverSpeaker.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(voiceoverspeaker.FieldID)
		}),
	).
	Exec(ctx)

func (*VoiceoverSpeakerUpsertBulk) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type VoiceoverSpeakerUpsertOne

type VoiceoverSpeakerUpsertOne struct {
	// contains filtered or unexported fields
}

VoiceoverSpeakerUpsertOne is the builder for "upsert"-ing

one VoiceoverSpeaker node.

func (*VoiceoverSpeakerUpsertOne) ClearName

ClearName clears the value of the "name" field.

func (*VoiceoverSpeakerUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VoiceoverSpeakerUpsertOne) Exec

Exec executes the query.

func (*VoiceoverSpeakerUpsertOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverSpeakerUpsertOne) ID

func (u *VoiceoverSpeakerUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VoiceoverSpeakerUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VoiceoverSpeakerUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VoiceoverSpeaker.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VoiceoverSpeakerUpsertOne) SetIsActive

SetIsActive sets the "is_active" field.

func (*VoiceoverSpeakerUpsertOne) SetIsDefault

SetIsDefault sets the "is_default" field.

func (*VoiceoverSpeakerUpsertOne) SetIsHidden

SetIsHidden sets the "is_hidden" field.

func (*VoiceoverSpeakerUpsertOne) SetLocale

SetLocale sets the "locale" field.

func (*VoiceoverSpeakerUpsertOne) SetModelID

SetModelID sets the "model_id" field.

func (*VoiceoverSpeakerUpsertOne) SetName

SetName sets the "name" field.

func (*VoiceoverSpeakerUpsertOne) SetNameInWorker

SetNameInWorker sets the "name_in_worker" field.

func (*VoiceoverSpeakerUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverSpeakerUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the VoiceoverSpeakerCreate.OnConflict documentation for more info.

func (*VoiceoverSpeakerUpsertOne) UpdateIsActive

UpdateIsActive sets the "is_active" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertOne) UpdateIsDefault

UpdateIsDefault sets the "is_default" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertOne) UpdateIsHidden

UpdateIsHidden sets the "is_hidden" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertOne) UpdateLocale

UpdateLocale sets the "locale" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertOne) UpdateModelID

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertOne) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertOne) UpdateNameInWorker

func (u *VoiceoverSpeakerUpsertOne) UpdateNameInWorker() *VoiceoverSpeakerUpsertOne

UpdateNameInWorker sets the "name_in_worker" field to the value that was provided on create.

func (*VoiceoverSpeakerUpsertOne) UpdateNewValues

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.VoiceoverSpeaker.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(voiceoverspeaker.FieldID)
		}),
	).
	Exec(ctx)

func (*VoiceoverSpeakerUpsertOne) UpdateUpdatedAt

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type VoiceoverSpeakers

type VoiceoverSpeakers []*VoiceoverSpeaker

VoiceoverSpeakers is a parsable slice of VoiceoverSpeaker.

type VoiceoverUpdate

type VoiceoverUpdate struct {
	// contains filtered or unexported fields
}

VoiceoverUpdate is the builder for updating Voiceover entities.

func (*VoiceoverUpdate) AddCost

func (vu *VoiceoverUpdate) AddCost(i int32) *VoiceoverUpdate

AddCost adds i to the "cost" field.

func (*VoiceoverUpdate) AddSeed

func (vu *VoiceoverUpdate) AddSeed(i int) *VoiceoverUpdate

AddSeed adds i to the "seed" field.

func (*VoiceoverUpdate) AddTemperature

func (vu *VoiceoverUpdate) AddTemperature(f float32) *VoiceoverUpdate

AddTemperature adds f to the "temperature" field.

func (*VoiceoverUpdate) AddVoiceoverOutputIDs

func (vu *VoiceoverUpdate) AddVoiceoverOutputIDs(ids ...uuid.UUID) *VoiceoverUpdate

AddVoiceoverOutputIDs adds the "voiceover_outputs" edge to the VoiceoverOutput entity by IDs.

func (*VoiceoverUpdate) AddVoiceoverOutputs

func (vu *VoiceoverUpdate) AddVoiceoverOutputs(v ...*VoiceoverOutput) *VoiceoverUpdate

AddVoiceoverOutputs adds the "voiceover_outputs" edges to the VoiceoverOutput entity.

func (*VoiceoverUpdate) ClearAPITokenID

func (vu *VoiceoverUpdate) ClearAPITokenID() *VoiceoverUpdate

ClearAPITokenID clears the value of the "api_token_id" field.

func (*VoiceoverUpdate) ClearAPITokens

func (vu *VoiceoverUpdate) ClearAPITokens() *VoiceoverUpdate

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*VoiceoverUpdate) ClearCompletedAt

func (vu *VoiceoverUpdate) ClearCompletedAt() *VoiceoverUpdate

ClearCompletedAt clears the value of the "completed_at" field.

func (*VoiceoverUpdate) ClearCountryCode

func (vu *VoiceoverUpdate) ClearCountryCode() *VoiceoverUpdate

ClearCountryCode clears the value of the "country_code" field.

func (*VoiceoverUpdate) ClearDeviceInfo

func (vu *VoiceoverUpdate) ClearDeviceInfo() *VoiceoverUpdate

ClearDeviceInfo clears the "device_info" edge to the DeviceInfo entity.

func (*VoiceoverUpdate) ClearFailureReason

func (vu *VoiceoverUpdate) ClearFailureReason() *VoiceoverUpdate

ClearFailureReason clears the value of the "failure_reason" field.

func (*VoiceoverUpdate) ClearPrompt

func (vu *VoiceoverUpdate) ClearPrompt() *VoiceoverUpdate

ClearPrompt clears the "prompt" edge to the Prompt entity.

func (*VoiceoverUpdate) ClearPromptID

func (vu *VoiceoverUpdate) ClearPromptID() *VoiceoverUpdate

ClearPromptID clears the value of the "prompt_id" field.

func (*VoiceoverUpdate) ClearStartedAt

func (vu *VoiceoverUpdate) ClearStartedAt() *VoiceoverUpdate

ClearStartedAt clears the value of the "started_at" field.

func (*VoiceoverUpdate) ClearStripeProductID

func (vu *VoiceoverUpdate) ClearStripeProductID() *VoiceoverUpdate

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*VoiceoverUpdate) ClearUser

func (vu *VoiceoverUpdate) ClearUser() *VoiceoverUpdate

ClearUser clears the "user" edge to the User entity.

func (*VoiceoverUpdate) ClearVoiceoverModels

func (vu *VoiceoverUpdate) ClearVoiceoverModels() *VoiceoverUpdate

ClearVoiceoverModels clears the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverUpdate) ClearVoiceoverOutputs

func (vu *VoiceoverUpdate) ClearVoiceoverOutputs() *VoiceoverUpdate

ClearVoiceoverOutputs clears all "voiceover_outputs" edges to the VoiceoverOutput entity.

func (*VoiceoverUpdate) ClearVoiceoverSpeakers

func (vu *VoiceoverUpdate) ClearVoiceoverSpeakers() *VoiceoverUpdate

ClearVoiceoverSpeakers clears the "voiceover_speakers" edge to the VoiceoverSpeaker entity.

func (*VoiceoverUpdate) Exec

func (vu *VoiceoverUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VoiceoverUpdate) ExecContext

func (c *VoiceoverUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverUpdate) ExecX

func (vu *VoiceoverUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverUpdate) Modify

func (vu *VoiceoverUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VoiceoverUpdate

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VoiceoverUpdate) Mutation

func (vu *VoiceoverUpdate) Mutation() *VoiceoverMutation

Mutation returns the VoiceoverMutation object of the builder.

func (*VoiceoverUpdate) QueryContext

func (c *VoiceoverUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverUpdate) RemoveVoiceoverOutputIDs

func (vu *VoiceoverUpdate) RemoveVoiceoverOutputIDs(ids ...uuid.UUID) *VoiceoverUpdate

RemoveVoiceoverOutputIDs removes the "voiceover_outputs" edge to VoiceoverOutput entities by IDs.

func (*VoiceoverUpdate) RemoveVoiceoverOutputs

func (vu *VoiceoverUpdate) RemoveVoiceoverOutputs(v ...*VoiceoverOutput) *VoiceoverUpdate

RemoveVoiceoverOutputs removes "voiceover_outputs" edges to VoiceoverOutput entities.

func (*VoiceoverUpdate) Save

func (vu *VoiceoverUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VoiceoverUpdate) SaveX

func (vu *VoiceoverUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VoiceoverUpdate) SetAPITokenID

func (vu *VoiceoverUpdate) SetAPITokenID(u uuid.UUID) *VoiceoverUpdate

SetAPITokenID sets the "api_token_id" field.

func (*VoiceoverUpdate) SetAPITokens

func (vu *VoiceoverUpdate) SetAPITokens(a *ApiToken) *VoiceoverUpdate

SetAPITokens sets the "api_tokens" edge to the ApiToken entity.

func (*VoiceoverUpdate) SetAPITokensID

func (vu *VoiceoverUpdate) SetAPITokensID(id uuid.UUID) *VoiceoverUpdate

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID.

func (*VoiceoverUpdate) SetCompletedAt

func (vu *VoiceoverUpdate) SetCompletedAt(t time.Time) *VoiceoverUpdate

SetCompletedAt sets the "completed_at" field.

func (*VoiceoverUpdate) SetCost

func (vu *VoiceoverUpdate) SetCost(i int32) *VoiceoverUpdate

SetCost sets the "cost" field.

func (*VoiceoverUpdate) SetCountryCode

func (vu *VoiceoverUpdate) SetCountryCode(s string) *VoiceoverUpdate

SetCountryCode sets the "country_code" field.

func (*VoiceoverUpdate) SetDenoiseAudio

func (vu *VoiceoverUpdate) SetDenoiseAudio(b bool) *VoiceoverUpdate

SetDenoiseAudio sets the "denoise_audio" field.

func (*VoiceoverUpdate) SetDeviceInfo

func (vu *VoiceoverUpdate) SetDeviceInfo(d *DeviceInfo) *VoiceoverUpdate

SetDeviceInfo sets the "device_info" edge to the DeviceInfo entity.

func (*VoiceoverUpdate) SetDeviceInfoID

func (vu *VoiceoverUpdate) SetDeviceInfoID(u uuid.UUID) *VoiceoverUpdate

SetDeviceInfoID sets the "device_info_id" field.

func (*VoiceoverUpdate) SetFailureReason

func (vu *VoiceoverUpdate) SetFailureReason(s string) *VoiceoverUpdate

SetFailureReason sets the "failure_reason" field.

func (*VoiceoverUpdate) SetModelID

func (vu *VoiceoverUpdate) SetModelID(u uuid.UUID) *VoiceoverUpdate

SetModelID sets the "model_id" field.

func (*VoiceoverUpdate) SetNillableAPITokenID

func (vu *VoiceoverUpdate) SetNillableAPITokenID(u *uuid.UUID) *VoiceoverUpdate

SetNillableAPITokenID sets the "api_token_id" field if the given value is not nil.

func (*VoiceoverUpdate) SetNillableAPITokensID

func (vu *VoiceoverUpdate) SetNillableAPITokensID(id *uuid.UUID) *VoiceoverUpdate

SetNillableAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID if the given value is not nil.

func (*VoiceoverUpdate) SetNillableCompletedAt

func (vu *VoiceoverUpdate) SetNillableCompletedAt(t *time.Time) *VoiceoverUpdate

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*VoiceoverUpdate) SetNillableCountryCode

func (vu *VoiceoverUpdate) SetNillableCountryCode(s *string) *VoiceoverUpdate

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*VoiceoverUpdate) SetNillableDenoiseAudio

func (vu *VoiceoverUpdate) SetNillableDenoiseAudio(b *bool) *VoiceoverUpdate

SetNillableDenoiseAudio sets the "denoise_audio" field if the given value is not nil.

func (*VoiceoverUpdate) SetNillableFailureReason

func (vu *VoiceoverUpdate) SetNillableFailureReason(s *string) *VoiceoverUpdate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*VoiceoverUpdate) SetNillablePromptID

func (vu *VoiceoverUpdate) SetNillablePromptID(u *uuid.UUID) *VoiceoverUpdate

SetNillablePromptID sets the "prompt_id" field if the given value is not nil.

func (*VoiceoverUpdate) SetNillableRemoveSilence

func (vu *VoiceoverUpdate) SetNillableRemoveSilence(b *bool) *VoiceoverUpdate

SetNillableRemoveSilence sets the "remove_silence" field if the given value is not nil.

func (*VoiceoverUpdate) SetNillableSourceType

func (vu *VoiceoverUpdate) SetNillableSourceType(et *enttypes.SourceType) *VoiceoverUpdate

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*VoiceoverUpdate) SetNillableStartedAt

func (vu *VoiceoverUpdate) SetNillableStartedAt(t *time.Time) *VoiceoverUpdate

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*VoiceoverUpdate) SetNillableStripeProductID

func (vu *VoiceoverUpdate) SetNillableStripeProductID(s *string) *VoiceoverUpdate

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*VoiceoverUpdate) SetNillableWasAutoSubmitted

func (vu *VoiceoverUpdate) SetNillableWasAutoSubmitted(b *bool) *VoiceoverUpdate

SetNillableWasAutoSubmitted sets the "was_auto_submitted" field if the given value is not nil.

func (*VoiceoverUpdate) SetPrompt

func (vu *VoiceoverUpdate) SetPrompt(p *Prompt) *VoiceoverUpdate

SetPrompt sets the "prompt" edge to the Prompt entity.

func (*VoiceoverUpdate) SetPromptID

func (vu *VoiceoverUpdate) SetPromptID(u uuid.UUID) *VoiceoverUpdate

SetPromptID sets the "prompt_id" field.

func (*VoiceoverUpdate) SetRemoveSilence

func (vu *VoiceoverUpdate) SetRemoveSilence(b bool) *VoiceoverUpdate

SetRemoveSilence sets the "remove_silence" field.

func (*VoiceoverUpdate) SetSeed

func (vu *VoiceoverUpdate) SetSeed(i int) *VoiceoverUpdate

SetSeed sets the "seed" field.

func (*VoiceoverUpdate) SetSourceType

func (vu *VoiceoverUpdate) SetSourceType(et enttypes.SourceType) *VoiceoverUpdate

SetSourceType sets the "source_type" field.

func (*VoiceoverUpdate) SetSpeakerID

func (vu *VoiceoverUpdate) SetSpeakerID(u uuid.UUID) *VoiceoverUpdate

SetSpeakerID sets the "speaker_id" field.

func (*VoiceoverUpdate) SetStartedAt

func (vu *VoiceoverUpdate) SetStartedAt(t time.Time) *VoiceoverUpdate

SetStartedAt sets the "started_at" field.

func (*VoiceoverUpdate) SetStatus

func (vu *VoiceoverUpdate) SetStatus(v voiceover.Status) *VoiceoverUpdate

SetStatus sets the "status" field.

func (*VoiceoverUpdate) SetStripeProductID

func (vu *VoiceoverUpdate) SetStripeProductID(s string) *VoiceoverUpdate

SetStripeProductID sets the "stripe_product_id" field.

func (*VoiceoverUpdate) SetTemperature

func (vu *VoiceoverUpdate) SetTemperature(f float32) *VoiceoverUpdate

SetTemperature sets the "temperature" field.

func (*VoiceoverUpdate) SetUpdatedAt

func (vu *VoiceoverUpdate) SetUpdatedAt(t time.Time) *VoiceoverUpdate

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverUpdate) SetUser

func (vu *VoiceoverUpdate) SetUser(u *User) *VoiceoverUpdate

SetUser sets the "user" edge to the User entity.

func (*VoiceoverUpdate) SetUserID

func (vu *VoiceoverUpdate) SetUserID(u uuid.UUID) *VoiceoverUpdate

SetUserID sets the "user_id" field.

func (*VoiceoverUpdate) SetVoiceoverModels

func (vu *VoiceoverUpdate) SetVoiceoverModels(v *VoiceoverModel) *VoiceoverUpdate

SetVoiceoverModels sets the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverUpdate) SetVoiceoverModelsID

func (vu *VoiceoverUpdate) SetVoiceoverModelsID(id uuid.UUID) *VoiceoverUpdate

SetVoiceoverModelsID sets the "voiceover_models" edge to the VoiceoverModel entity by ID.

func (*VoiceoverUpdate) SetVoiceoverSpeakers

func (vu *VoiceoverUpdate) SetVoiceoverSpeakers(v *VoiceoverSpeaker) *VoiceoverUpdate

SetVoiceoverSpeakers sets the "voiceover_speakers" edge to the VoiceoverSpeaker entity.

func (*VoiceoverUpdate) SetVoiceoverSpeakersID

func (vu *VoiceoverUpdate) SetVoiceoverSpeakersID(id uuid.UUID) *VoiceoverUpdate

SetVoiceoverSpeakersID sets the "voiceover_speakers" edge to the VoiceoverSpeaker entity by ID.

func (*VoiceoverUpdate) SetWasAutoSubmitted

func (vu *VoiceoverUpdate) SetWasAutoSubmitted(b bool) *VoiceoverUpdate

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*VoiceoverUpdate) Where

Where appends a list predicates to the VoiceoverUpdate builder.

type VoiceoverUpdateOne

type VoiceoverUpdateOne struct {
	// contains filtered or unexported fields
}

VoiceoverUpdateOne is the builder for updating a single Voiceover entity.

func (*VoiceoverUpdateOne) AddCost

func (vuo *VoiceoverUpdateOne) AddCost(i int32) *VoiceoverUpdateOne

AddCost adds i to the "cost" field.

func (*VoiceoverUpdateOne) AddSeed

func (vuo *VoiceoverUpdateOne) AddSeed(i int) *VoiceoverUpdateOne

AddSeed adds i to the "seed" field.

func (*VoiceoverUpdateOne) AddTemperature

func (vuo *VoiceoverUpdateOne) AddTemperature(f float32) *VoiceoverUpdateOne

AddTemperature adds f to the "temperature" field.

func (*VoiceoverUpdateOne) AddVoiceoverOutputIDs

func (vuo *VoiceoverUpdateOne) AddVoiceoverOutputIDs(ids ...uuid.UUID) *VoiceoverUpdateOne

AddVoiceoverOutputIDs adds the "voiceover_outputs" edge to the VoiceoverOutput entity by IDs.

func (*VoiceoverUpdateOne) AddVoiceoverOutputs

func (vuo *VoiceoverUpdateOne) AddVoiceoverOutputs(v ...*VoiceoverOutput) *VoiceoverUpdateOne

AddVoiceoverOutputs adds the "voiceover_outputs" edges to the VoiceoverOutput entity.

func (*VoiceoverUpdateOne) ClearAPITokenID

func (vuo *VoiceoverUpdateOne) ClearAPITokenID() *VoiceoverUpdateOne

ClearAPITokenID clears the value of the "api_token_id" field.

func (*VoiceoverUpdateOne) ClearAPITokens

func (vuo *VoiceoverUpdateOne) ClearAPITokens() *VoiceoverUpdateOne

ClearAPITokens clears the "api_tokens" edge to the ApiToken entity.

func (*VoiceoverUpdateOne) ClearCompletedAt

func (vuo *VoiceoverUpdateOne) ClearCompletedAt() *VoiceoverUpdateOne

ClearCompletedAt clears the value of the "completed_at" field.

func (*VoiceoverUpdateOne) ClearCountryCode

func (vuo *VoiceoverUpdateOne) ClearCountryCode() *VoiceoverUpdateOne

ClearCountryCode clears the value of the "country_code" field.

func (*VoiceoverUpdateOne) ClearDeviceInfo

func (vuo *VoiceoverUpdateOne) ClearDeviceInfo() *VoiceoverUpdateOne

ClearDeviceInfo clears the "device_info" edge to the DeviceInfo entity.

func (*VoiceoverUpdateOne) ClearFailureReason

func (vuo *VoiceoverUpdateOne) ClearFailureReason() *VoiceoverUpdateOne

ClearFailureReason clears the value of the "failure_reason" field.

func (*VoiceoverUpdateOne) ClearPrompt

func (vuo *VoiceoverUpdateOne) ClearPrompt() *VoiceoverUpdateOne

ClearPrompt clears the "prompt" edge to the Prompt entity.

func (*VoiceoverUpdateOne) ClearPromptID

func (vuo *VoiceoverUpdateOne) ClearPromptID() *VoiceoverUpdateOne

ClearPromptID clears the value of the "prompt_id" field.

func (*VoiceoverUpdateOne) ClearStartedAt

func (vuo *VoiceoverUpdateOne) ClearStartedAt() *VoiceoverUpdateOne

ClearStartedAt clears the value of the "started_at" field.

func (*VoiceoverUpdateOne) ClearStripeProductID

func (vuo *VoiceoverUpdateOne) ClearStripeProductID() *VoiceoverUpdateOne

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*VoiceoverUpdateOne) ClearUser

func (vuo *VoiceoverUpdateOne) ClearUser() *VoiceoverUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*VoiceoverUpdateOne) ClearVoiceoverModels

func (vuo *VoiceoverUpdateOne) ClearVoiceoverModels() *VoiceoverUpdateOne

ClearVoiceoverModels clears the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverUpdateOne) ClearVoiceoverOutputs

func (vuo *VoiceoverUpdateOne) ClearVoiceoverOutputs() *VoiceoverUpdateOne

ClearVoiceoverOutputs clears all "voiceover_outputs" edges to the VoiceoverOutput entity.

func (*VoiceoverUpdateOne) ClearVoiceoverSpeakers

func (vuo *VoiceoverUpdateOne) ClearVoiceoverSpeakers() *VoiceoverUpdateOne

ClearVoiceoverSpeakers clears the "voiceover_speakers" edge to the VoiceoverSpeaker entity.

func (*VoiceoverUpdateOne) Exec

func (vuo *VoiceoverUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*VoiceoverUpdateOne) ExecContext

func (c *VoiceoverUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*VoiceoverUpdateOne) ExecX

func (vuo *VoiceoverUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverUpdateOne) Modify

func (vuo *VoiceoverUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *VoiceoverUpdateOne

Modify adds a statement modifier for attaching custom logic to the UPDATE statement.

func (*VoiceoverUpdateOne) Mutation

func (vuo *VoiceoverUpdateOne) Mutation() *VoiceoverMutation

Mutation returns the VoiceoverMutation object of the builder.

func (*VoiceoverUpdateOne) QueryContext

func (c *VoiceoverUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*VoiceoverUpdateOne) RemoveVoiceoverOutputIDs

func (vuo *VoiceoverUpdateOne) RemoveVoiceoverOutputIDs(ids ...uuid.UUID) *VoiceoverUpdateOne

RemoveVoiceoverOutputIDs removes the "voiceover_outputs" edge to VoiceoverOutput entities by IDs.

func (*VoiceoverUpdateOne) RemoveVoiceoverOutputs

func (vuo *VoiceoverUpdateOne) RemoveVoiceoverOutputs(v ...*VoiceoverOutput) *VoiceoverUpdateOne

RemoveVoiceoverOutputs removes "voiceover_outputs" edges to VoiceoverOutput entities.

func (*VoiceoverUpdateOne) Save

func (vuo *VoiceoverUpdateOne) Save(ctx context.Context) (*Voiceover, error)

Save executes the query and returns the updated Voiceover entity.

func (*VoiceoverUpdateOne) SaveX

func (vuo *VoiceoverUpdateOne) SaveX(ctx context.Context) *Voiceover

SaveX is like Save, but panics if an error occurs.

func (*VoiceoverUpdateOne) Select

func (vuo *VoiceoverUpdateOne) Select(field string, fields ...string) *VoiceoverUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VoiceoverUpdateOne) SetAPITokenID

func (vuo *VoiceoverUpdateOne) SetAPITokenID(u uuid.UUID) *VoiceoverUpdateOne

SetAPITokenID sets the "api_token_id" field.

func (*VoiceoverUpdateOne) SetAPITokens

func (vuo *VoiceoverUpdateOne) SetAPITokens(a *ApiToken) *VoiceoverUpdateOne

SetAPITokens sets the "api_tokens" edge to the ApiToken entity.

func (*VoiceoverUpdateOne) SetAPITokensID

func (vuo *VoiceoverUpdateOne) SetAPITokensID(id uuid.UUID) *VoiceoverUpdateOne

SetAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID.

func (*VoiceoverUpdateOne) SetCompletedAt

func (vuo *VoiceoverUpdateOne) SetCompletedAt(t time.Time) *VoiceoverUpdateOne

SetCompletedAt sets the "completed_at" field.

func (*VoiceoverUpdateOne) SetCost

func (vuo *VoiceoverUpdateOne) SetCost(i int32) *VoiceoverUpdateOne

SetCost sets the "cost" field.

func (*VoiceoverUpdateOne) SetCountryCode

func (vuo *VoiceoverUpdateOne) SetCountryCode(s string) *VoiceoverUpdateOne

SetCountryCode sets the "country_code" field.

func (*VoiceoverUpdateOne) SetDenoiseAudio

func (vuo *VoiceoverUpdateOne) SetDenoiseAudio(b bool) *VoiceoverUpdateOne

SetDenoiseAudio sets the "denoise_audio" field.

func (*VoiceoverUpdateOne) SetDeviceInfo

func (vuo *VoiceoverUpdateOne) SetDeviceInfo(d *DeviceInfo) *VoiceoverUpdateOne

SetDeviceInfo sets the "device_info" edge to the DeviceInfo entity.

func (*VoiceoverUpdateOne) SetDeviceInfoID

func (vuo *VoiceoverUpdateOne) SetDeviceInfoID(u uuid.UUID) *VoiceoverUpdateOne

SetDeviceInfoID sets the "device_info_id" field.

func (*VoiceoverUpdateOne) SetFailureReason

func (vuo *VoiceoverUpdateOne) SetFailureReason(s string) *VoiceoverUpdateOne

SetFailureReason sets the "failure_reason" field.

func (*VoiceoverUpdateOne) SetModelID

func (vuo *VoiceoverUpdateOne) SetModelID(u uuid.UUID) *VoiceoverUpdateOne

SetModelID sets the "model_id" field.

func (*VoiceoverUpdateOne) SetNillableAPITokenID

func (vuo *VoiceoverUpdateOne) SetNillableAPITokenID(u *uuid.UUID) *VoiceoverUpdateOne

SetNillableAPITokenID sets the "api_token_id" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillableAPITokensID

func (vuo *VoiceoverUpdateOne) SetNillableAPITokensID(id *uuid.UUID) *VoiceoverUpdateOne

SetNillableAPITokensID sets the "api_tokens" edge to the ApiToken entity by ID if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillableCompletedAt

func (vuo *VoiceoverUpdateOne) SetNillableCompletedAt(t *time.Time) *VoiceoverUpdateOne

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillableCountryCode

func (vuo *VoiceoverUpdateOne) SetNillableCountryCode(s *string) *VoiceoverUpdateOne

SetNillableCountryCode sets the "country_code" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillableDenoiseAudio

func (vuo *VoiceoverUpdateOne) SetNillableDenoiseAudio(b *bool) *VoiceoverUpdateOne

SetNillableDenoiseAudio sets the "denoise_audio" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillableFailureReason

func (vuo *VoiceoverUpdateOne) SetNillableFailureReason(s *string) *VoiceoverUpdateOne

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillablePromptID

func (vuo *VoiceoverUpdateOne) SetNillablePromptID(u *uuid.UUID) *VoiceoverUpdateOne

SetNillablePromptID sets the "prompt_id" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillableRemoveSilence

func (vuo *VoiceoverUpdateOne) SetNillableRemoveSilence(b *bool) *VoiceoverUpdateOne

SetNillableRemoveSilence sets the "remove_silence" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillableSourceType

func (vuo *VoiceoverUpdateOne) SetNillableSourceType(et *enttypes.SourceType) *VoiceoverUpdateOne

SetNillableSourceType sets the "source_type" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillableStartedAt

func (vuo *VoiceoverUpdateOne) SetNillableStartedAt(t *time.Time) *VoiceoverUpdateOne

SetNillableStartedAt sets the "started_at" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillableStripeProductID

func (vuo *VoiceoverUpdateOne) SetNillableStripeProductID(s *string) *VoiceoverUpdateOne

SetNillableStripeProductID sets the "stripe_product_id" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetNillableWasAutoSubmitted

func (vuo *VoiceoverUpdateOne) SetNillableWasAutoSubmitted(b *bool) *VoiceoverUpdateOne

SetNillableWasAutoSubmitted sets the "was_auto_submitted" field if the given value is not nil.

func (*VoiceoverUpdateOne) SetPrompt

func (vuo *VoiceoverUpdateOne) SetPrompt(p *Prompt) *VoiceoverUpdateOne

SetPrompt sets the "prompt" edge to the Prompt entity.

func (*VoiceoverUpdateOne) SetPromptID

func (vuo *VoiceoverUpdateOne) SetPromptID(u uuid.UUID) *VoiceoverUpdateOne

SetPromptID sets the "prompt_id" field.

func (*VoiceoverUpdateOne) SetRemoveSilence

func (vuo *VoiceoverUpdateOne) SetRemoveSilence(b bool) *VoiceoverUpdateOne

SetRemoveSilence sets the "remove_silence" field.

func (*VoiceoverUpdateOne) SetSeed

func (vuo *VoiceoverUpdateOne) SetSeed(i int) *VoiceoverUpdateOne

SetSeed sets the "seed" field.

func (*VoiceoverUpdateOne) SetSourceType

func (vuo *VoiceoverUpdateOne) SetSourceType(et enttypes.SourceType) *VoiceoverUpdateOne

SetSourceType sets the "source_type" field.

func (*VoiceoverUpdateOne) SetSpeakerID

func (vuo *VoiceoverUpdateOne) SetSpeakerID(u uuid.UUID) *VoiceoverUpdateOne

SetSpeakerID sets the "speaker_id" field.

func (*VoiceoverUpdateOne) SetStartedAt

func (vuo *VoiceoverUpdateOne) SetStartedAt(t time.Time) *VoiceoverUpdateOne

SetStartedAt sets the "started_at" field.

func (*VoiceoverUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*VoiceoverUpdateOne) SetStripeProductID

func (vuo *VoiceoverUpdateOne) SetStripeProductID(s string) *VoiceoverUpdateOne

SetStripeProductID sets the "stripe_product_id" field.

func (*VoiceoverUpdateOne) SetTemperature

func (vuo *VoiceoverUpdateOne) SetTemperature(f float32) *VoiceoverUpdateOne

SetTemperature sets the "temperature" field.

func (*VoiceoverUpdateOne) SetUpdatedAt

func (vuo *VoiceoverUpdateOne) SetUpdatedAt(t time.Time) *VoiceoverUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverUpdateOne) SetUser

func (vuo *VoiceoverUpdateOne) SetUser(u *User) *VoiceoverUpdateOne

SetUser sets the "user" edge to the User entity.

func (*VoiceoverUpdateOne) SetUserID

func (vuo *VoiceoverUpdateOne) SetUserID(u uuid.UUID) *VoiceoverUpdateOne

SetUserID sets the "user_id" field.

func (*VoiceoverUpdateOne) SetVoiceoverModels

func (vuo *VoiceoverUpdateOne) SetVoiceoverModels(v *VoiceoverModel) *VoiceoverUpdateOne

SetVoiceoverModels sets the "voiceover_models" edge to the VoiceoverModel entity.

func (*VoiceoverUpdateOne) SetVoiceoverModelsID

func (vuo *VoiceoverUpdateOne) SetVoiceoverModelsID(id uuid.UUID) *VoiceoverUpdateOne

SetVoiceoverModelsID sets the "voiceover_models" edge to the VoiceoverModel entity by ID.

func (*VoiceoverUpdateOne) SetVoiceoverSpeakers

func (vuo *VoiceoverUpdateOne) SetVoiceoverSpeakers(v *VoiceoverSpeaker) *VoiceoverUpdateOne

SetVoiceoverSpeakers sets the "voiceover_speakers" edge to the VoiceoverSpeaker entity.

func (*VoiceoverUpdateOne) SetVoiceoverSpeakersID

func (vuo *VoiceoverUpdateOne) SetVoiceoverSpeakersID(id uuid.UUID) *VoiceoverUpdateOne

SetVoiceoverSpeakersID sets the "voiceover_speakers" edge to the VoiceoverSpeaker entity by ID.

func (*VoiceoverUpdateOne) SetWasAutoSubmitted

func (vuo *VoiceoverUpdateOne) SetWasAutoSubmitted(b bool) *VoiceoverUpdateOne

SetWasAutoSubmitted sets the "was_auto_submitted" field.

type VoiceoverUpsert

type VoiceoverUpsert struct {
	*sql.UpdateSet
}

VoiceoverUpsert is the "OnConflict" setter.

func (*VoiceoverUpsert) AddCost

func (u *VoiceoverUpsert) AddCost(v int32) *VoiceoverUpsert

AddCost adds v to the "cost" field.

func (*VoiceoverUpsert) AddSeed

func (u *VoiceoverUpsert) AddSeed(v int) *VoiceoverUpsert

AddSeed adds v to the "seed" field.

func (*VoiceoverUpsert) AddTemperature

func (u *VoiceoverUpsert) AddTemperature(v float32) *VoiceoverUpsert

AddTemperature adds v to the "temperature" field.

func (*VoiceoverUpsert) ClearAPITokenID

func (u *VoiceoverUpsert) ClearAPITokenID() *VoiceoverUpsert

ClearAPITokenID clears the value of the "api_token_id" field.

func (*VoiceoverUpsert) ClearCompletedAt

func (u *VoiceoverUpsert) ClearCompletedAt() *VoiceoverUpsert

ClearCompletedAt clears the value of the "completed_at" field.

func (*VoiceoverUpsert) ClearCountryCode

func (u *VoiceoverUpsert) ClearCountryCode() *VoiceoverUpsert

ClearCountryCode clears the value of the "country_code" field.

func (*VoiceoverUpsert) ClearFailureReason

func (u *VoiceoverUpsert) ClearFailureReason() *VoiceoverUpsert

ClearFailureReason clears the value of the "failure_reason" field.

func (*VoiceoverUpsert) ClearPromptID

func (u *VoiceoverUpsert) ClearPromptID() *VoiceoverUpsert

ClearPromptID clears the value of the "prompt_id" field.

func (*VoiceoverUpsert) ClearStartedAt

func (u *VoiceoverUpsert) ClearStartedAt() *VoiceoverUpsert

ClearStartedAt clears the value of the "started_at" field.

func (*VoiceoverUpsert) ClearStripeProductID

func (u *VoiceoverUpsert) ClearStripeProductID() *VoiceoverUpsert

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*VoiceoverUpsert) SetAPITokenID

func (u *VoiceoverUpsert) SetAPITokenID(v uuid.UUID) *VoiceoverUpsert

SetAPITokenID sets the "api_token_id" field.

func (*VoiceoverUpsert) SetCompletedAt

func (u *VoiceoverUpsert) SetCompletedAt(v time.Time) *VoiceoverUpsert

SetCompletedAt sets the "completed_at" field.

func (*VoiceoverUpsert) SetCost

func (u *VoiceoverUpsert) SetCost(v int32) *VoiceoverUpsert

SetCost sets the "cost" field.

func (*VoiceoverUpsert) SetCountryCode

func (u *VoiceoverUpsert) SetCountryCode(v string) *VoiceoverUpsert

SetCountryCode sets the "country_code" field.

func (*VoiceoverUpsert) SetDenoiseAudio

func (u *VoiceoverUpsert) SetDenoiseAudio(v bool) *VoiceoverUpsert

SetDenoiseAudio sets the "denoise_audio" field.

func (*VoiceoverUpsert) SetDeviceInfoID

func (u *VoiceoverUpsert) SetDeviceInfoID(v uuid.UUID) *VoiceoverUpsert

SetDeviceInfoID sets the "device_info_id" field.

func (*VoiceoverUpsert) SetFailureReason

func (u *VoiceoverUpsert) SetFailureReason(v string) *VoiceoverUpsert

SetFailureReason sets the "failure_reason" field.

func (*VoiceoverUpsert) SetModelID

func (u *VoiceoverUpsert) SetModelID(v uuid.UUID) *VoiceoverUpsert

SetModelID sets the "model_id" field.

func (*VoiceoverUpsert) SetPromptID

func (u *VoiceoverUpsert) SetPromptID(v uuid.UUID) *VoiceoverUpsert

SetPromptID sets the "prompt_id" field.

func (*VoiceoverUpsert) SetRemoveSilence

func (u *VoiceoverUpsert) SetRemoveSilence(v bool) *VoiceoverUpsert

SetRemoveSilence sets the "remove_silence" field.

func (*VoiceoverUpsert) SetSeed

func (u *VoiceoverUpsert) SetSeed(v int) *VoiceoverUpsert

SetSeed sets the "seed" field.

func (*VoiceoverUpsert) SetSourceType

func (u *VoiceoverUpsert) SetSourceType(v enttypes.SourceType) *VoiceoverUpsert

SetSourceType sets the "source_type" field.

func (*VoiceoverUpsert) SetSpeakerID

func (u *VoiceoverUpsert) SetSpeakerID(v uuid.UUID) *VoiceoverUpsert

SetSpeakerID sets the "speaker_id" field.

func (*VoiceoverUpsert) SetStartedAt

func (u *VoiceoverUpsert) SetStartedAt(v time.Time) *VoiceoverUpsert

SetStartedAt sets the "started_at" field.

func (*VoiceoverUpsert) SetStatus

SetStatus sets the "status" field.

func (*VoiceoverUpsert) SetStripeProductID

func (u *VoiceoverUpsert) SetStripeProductID(v string) *VoiceoverUpsert

SetStripeProductID sets the "stripe_product_id" field.

func (*VoiceoverUpsert) SetTemperature

func (u *VoiceoverUpsert) SetTemperature(v float32) *VoiceoverUpsert

SetTemperature sets the "temperature" field.

func (*VoiceoverUpsert) SetUpdatedAt

func (u *VoiceoverUpsert) SetUpdatedAt(v time.Time) *VoiceoverUpsert

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverUpsert) SetUserID

func (u *VoiceoverUpsert) SetUserID(v uuid.UUID) *VoiceoverUpsert

SetUserID sets the "user_id" field.

func (*VoiceoverUpsert) SetWasAutoSubmitted

func (u *VoiceoverUpsert) SetWasAutoSubmitted(v bool) *VoiceoverUpsert

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*VoiceoverUpsert) UpdateAPITokenID

func (u *VoiceoverUpsert) UpdateAPITokenID() *VoiceoverUpsert

UpdateAPITokenID sets the "api_token_id" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateCompletedAt

func (u *VoiceoverUpsert) UpdateCompletedAt() *VoiceoverUpsert

UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateCost

func (u *VoiceoverUpsert) UpdateCost() *VoiceoverUpsert

UpdateCost sets the "cost" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateCountryCode

func (u *VoiceoverUpsert) UpdateCountryCode() *VoiceoverUpsert

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateDenoiseAudio

func (u *VoiceoverUpsert) UpdateDenoiseAudio() *VoiceoverUpsert

UpdateDenoiseAudio sets the "denoise_audio" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateDeviceInfoID

func (u *VoiceoverUpsert) UpdateDeviceInfoID() *VoiceoverUpsert

UpdateDeviceInfoID sets the "device_info_id" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateFailureReason

func (u *VoiceoverUpsert) UpdateFailureReason() *VoiceoverUpsert

UpdateFailureReason sets the "failure_reason" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateModelID

func (u *VoiceoverUpsert) UpdateModelID() *VoiceoverUpsert

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdatePromptID

func (u *VoiceoverUpsert) UpdatePromptID() *VoiceoverUpsert

UpdatePromptID sets the "prompt_id" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateRemoveSilence

func (u *VoiceoverUpsert) UpdateRemoveSilence() *VoiceoverUpsert

UpdateRemoveSilence sets the "remove_silence" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateSeed

func (u *VoiceoverUpsert) UpdateSeed() *VoiceoverUpsert

UpdateSeed sets the "seed" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateSourceType

func (u *VoiceoverUpsert) UpdateSourceType() *VoiceoverUpsert

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateSpeakerID

func (u *VoiceoverUpsert) UpdateSpeakerID() *VoiceoverUpsert

UpdateSpeakerID sets the "speaker_id" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateStartedAt

func (u *VoiceoverUpsert) UpdateStartedAt() *VoiceoverUpsert

UpdateStartedAt sets the "started_at" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateStatus

func (u *VoiceoverUpsert) UpdateStatus() *VoiceoverUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateStripeProductID

func (u *VoiceoverUpsert) UpdateStripeProductID() *VoiceoverUpsert

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateTemperature

func (u *VoiceoverUpsert) UpdateTemperature() *VoiceoverUpsert

UpdateTemperature sets the "temperature" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateUpdatedAt

func (u *VoiceoverUpsert) UpdateUpdatedAt() *VoiceoverUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateUserID

func (u *VoiceoverUpsert) UpdateUserID() *VoiceoverUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*VoiceoverUpsert) UpdateWasAutoSubmitted

func (u *VoiceoverUpsert) UpdateWasAutoSubmitted() *VoiceoverUpsert

UpdateWasAutoSubmitted sets the "was_auto_submitted" field to the value that was provided on create.

type VoiceoverUpsertBulk

type VoiceoverUpsertBulk struct {
	// contains filtered or unexported fields
}

VoiceoverUpsertBulk is the builder for "upsert"-ing a bulk of Voiceover nodes.

func (*VoiceoverUpsertBulk) AddCost

AddCost adds v to the "cost" field.

func (*VoiceoverUpsertBulk) AddSeed

AddSeed adds v to the "seed" field.

func (*VoiceoverUpsertBulk) AddTemperature

func (u *VoiceoverUpsertBulk) AddTemperature(v float32) *VoiceoverUpsertBulk

AddTemperature adds v to the "temperature" field.

func (*VoiceoverUpsertBulk) ClearAPITokenID

func (u *VoiceoverUpsertBulk) ClearAPITokenID() *VoiceoverUpsertBulk

ClearAPITokenID clears the value of the "api_token_id" field.

func (*VoiceoverUpsertBulk) ClearCompletedAt

func (u *VoiceoverUpsertBulk) ClearCompletedAt() *VoiceoverUpsertBulk

ClearCompletedAt clears the value of the "completed_at" field.

func (*VoiceoverUpsertBulk) ClearCountryCode

func (u *VoiceoverUpsertBulk) ClearCountryCode() *VoiceoverUpsertBulk

ClearCountryCode clears the value of the "country_code" field.

func (*VoiceoverUpsertBulk) ClearFailureReason

func (u *VoiceoverUpsertBulk) ClearFailureReason() *VoiceoverUpsertBulk

ClearFailureReason clears the value of the "failure_reason" field.

func (*VoiceoverUpsertBulk) ClearPromptID

func (u *VoiceoverUpsertBulk) ClearPromptID() *VoiceoverUpsertBulk

ClearPromptID clears the value of the "prompt_id" field.

func (*VoiceoverUpsertBulk) ClearStartedAt

func (u *VoiceoverUpsertBulk) ClearStartedAt() *VoiceoverUpsertBulk

ClearStartedAt clears the value of the "started_at" field.

func (*VoiceoverUpsertBulk) ClearStripeProductID

func (u *VoiceoverUpsertBulk) ClearStripeProductID() *VoiceoverUpsertBulk

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*VoiceoverUpsertBulk) DoNothing

func (u *VoiceoverUpsertBulk) DoNothing() *VoiceoverUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VoiceoverUpsertBulk) Exec

Exec executes the query.

func (*VoiceoverUpsertBulk) ExecX

func (u *VoiceoverUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Voiceover.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VoiceoverUpsertBulk) SetAPITokenID

func (u *VoiceoverUpsertBulk) SetAPITokenID(v uuid.UUID) *VoiceoverUpsertBulk

SetAPITokenID sets the "api_token_id" field.

func (*VoiceoverUpsertBulk) SetCompletedAt

func (u *VoiceoverUpsertBulk) SetCompletedAt(v time.Time) *VoiceoverUpsertBulk

SetCompletedAt sets the "completed_at" field.

func (*VoiceoverUpsertBulk) SetCost

SetCost sets the "cost" field.

func (*VoiceoverUpsertBulk) SetCountryCode

func (u *VoiceoverUpsertBulk) SetCountryCode(v string) *VoiceoverUpsertBulk

SetCountryCode sets the "country_code" field.

func (*VoiceoverUpsertBulk) SetDenoiseAudio

func (u *VoiceoverUpsertBulk) SetDenoiseAudio(v bool) *VoiceoverUpsertBulk

SetDenoiseAudio sets the "denoise_audio" field.

func (*VoiceoverUpsertBulk) SetDeviceInfoID

func (u *VoiceoverUpsertBulk) SetDeviceInfoID(v uuid.UUID) *VoiceoverUpsertBulk

SetDeviceInfoID sets the "device_info_id" field.

func (*VoiceoverUpsertBulk) SetFailureReason

func (u *VoiceoverUpsertBulk) SetFailureReason(v string) *VoiceoverUpsertBulk

SetFailureReason sets the "failure_reason" field.

func (*VoiceoverUpsertBulk) SetModelID

SetModelID sets the "model_id" field.

func (*VoiceoverUpsertBulk) SetPromptID

func (u *VoiceoverUpsertBulk) SetPromptID(v uuid.UUID) *VoiceoverUpsertBulk

SetPromptID sets the "prompt_id" field.

func (*VoiceoverUpsertBulk) SetRemoveSilence

func (u *VoiceoverUpsertBulk) SetRemoveSilence(v bool) *VoiceoverUpsertBulk

SetRemoveSilence sets the "remove_silence" field.

func (*VoiceoverUpsertBulk) SetSeed

SetSeed sets the "seed" field.

func (*VoiceoverUpsertBulk) SetSourceType

SetSourceType sets the "source_type" field.

func (*VoiceoverUpsertBulk) SetSpeakerID

func (u *VoiceoverUpsertBulk) SetSpeakerID(v uuid.UUID) *VoiceoverUpsertBulk

SetSpeakerID sets the "speaker_id" field.

func (*VoiceoverUpsertBulk) SetStartedAt

func (u *VoiceoverUpsertBulk) SetStartedAt(v time.Time) *VoiceoverUpsertBulk

SetStartedAt sets the "started_at" field.

func (*VoiceoverUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*VoiceoverUpsertBulk) SetStripeProductID

func (u *VoiceoverUpsertBulk) SetStripeProductID(v string) *VoiceoverUpsertBulk

SetStripeProductID sets the "stripe_product_id" field.

func (*VoiceoverUpsertBulk) SetTemperature

func (u *VoiceoverUpsertBulk) SetTemperature(v float32) *VoiceoverUpsertBulk

SetTemperature sets the "temperature" field.

func (*VoiceoverUpsertBulk) SetUpdatedAt

func (u *VoiceoverUpsertBulk) SetUpdatedAt(v time.Time) *VoiceoverUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*VoiceoverUpsertBulk) SetWasAutoSubmitted

func (u *VoiceoverUpsertBulk) SetWasAutoSubmitted(v bool) *VoiceoverUpsertBulk

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*VoiceoverUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VoiceoverCreateBulk.OnConflict documentation for more info.

func (*VoiceoverUpsertBulk) UpdateAPITokenID

func (u *VoiceoverUpsertBulk) UpdateAPITokenID() *VoiceoverUpsertBulk

UpdateAPITokenID sets the "api_token_id" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateCompletedAt

func (u *VoiceoverUpsertBulk) UpdateCompletedAt() *VoiceoverUpsertBulk

UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateCost

func (u *VoiceoverUpsertBulk) UpdateCost() *VoiceoverUpsertBulk

UpdateCost sets the "cost" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateCountryCode

func (u *VoiceoverUpsertBulk) UpdateCountryCode() *VoiceoverUpsertBulk

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateDenoiseAudio

func (u *VoiceoverUpsertBulk) UpdateDenoiseAudio() *VoiceoverUpsertBulk

UpdateDenoiseAudio sets the "denoise_audio" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateDeviceInfoID

func (u *VoiceoverUpsertBulk) UpdateDeviceInfoID() *VoiceoverUpsertBulk

UpdateDeviceInfoID sets the "device_info_id" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateFailureReason

func (u *VoiceoverUpsertBulk) UpdateFailureReason() *VoiceoverUpsertBulk

UpdateFailureReason sets the "failure_reason" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateModelID

func (u *VoiceoverUpsertBulk) UpdateModelID() *VoiceoverUpsertBulk

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateNewValues

func (u *VoiceoverUpsertBulk) UpdateNewValues() *VoiceoverUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Voiceover.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(voiceover.FieldID)
		}),
	).
	Exec(ctx)

func (*VoiceoverUpsertBulk) UpdatePromptID

func (u *VoiceoverUpsertBulk) UpdatePromptID() *VoiceoverUpsertBulk

UpdatePromptID sets the "prompt_id" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateRemoveSilence

func (u *VoiceoverUpsertBulk) UpdateRemoveSilence() *VoiceoverUpsertBulk

UpdateRemoveSilence sets the "remove_silence" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateSeed

func (u *VoiceoverUpsertBulk) UpdateSeed() *VoiceoverUpsertBulk

UpdateSeed sets the "seed" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateSourceType

func (u *VoiceoverUpsertBulk) UpdateSourceType() *VoiceoverUpsertBulk

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateSpeakerID

func (u *VoiceoverUpsertBulk) UpdateSpeakerID() *VoiceoverUpsertBulk

UpdateSpeakerID sets the "speaker_id" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateStartedAt

func (u *VoiceoverUpsertBulk) UpdateStartedAt() *VoiceoverUpsertBulk

UpdateStartedAt sets the "started_at" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateStatus

func (u *VoiceoverUpsertBulk) UpdateStatus() *VoiceoverUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateStripeProductID

func (u *VoiceoverUpsertBulk) UpdateStripeProductID() *VoiceoverUpsertBulk

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateTemperature

func (u *VoiceoverUpsertBulk) UpdateTemperature() *VoiceoverUpsertBulk

UpdateTemperature sets the "temperature" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateUpdatedAt

func (u *VoiceoverUpsertBulk) UpdateUpdatedAt() *VoiceoverUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateUserID

func (u *VoiceoverUpsertBulk) UpdateUserID() *VoiceoverUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*VoiceoverUpsertBulk) UpdateWasAutoSubmitted

func (u *VoiceoverUpsertBulk) UpdateWasAutoSubmitted() *VoiceoverUpsertBulk

UpdateWasAutoSubmitted sets the "was_auto_submitted" field to the value that was provided on create.

type VoiceoverUpsertOne

type VoiceoverUpsertOne struct {
	// contains filtered or unexported fields
}

VoiceoverUpsertOne is the builder for "upsert"-ing

one Voiceover node.

func (*VoiceoverUpsertOne) AddCost

AddCost adds v to the "cost" field.

func (*VoiceoverUpsertOne) AddSeed

func (u *VoiceoverUpsertOne) AddSeed(v int) *VoiceoverUpsertOne

AddSeed adds v to the "seed" field.

func (*VoiceoverUpsertOne) AddTemperature

func (u *VoiceoverUpsertOne) AddTemperature(v float32) *VoiceoverUpsertOne

AddTemperature adds v to the "temperature" field.

func (*VoiceoverUpsertOne) ClearAPITokenID

func (u *VoiceoverUpsertOne) ClearAPITokenID() *VoiceoverUpsertOne

ClearAPITokenID clears the value of the "api_token_id" field.

func (*VoiceoverUpsertOne) ClearCompletedAt

func (u *VoiceoverUpsertOne) ClearCompletedAt() *VoiceoverUpsertOne

ClearCompletedAt clears the value of the "completed_at" field.

func (*VoiceoverUpsertOne) ClearCountryCode

func (u *VoiceoverUpsertOne) ClearCountryCode() *VoiceoverUpsertOne

ClearCountryCode clears the value of the "country_code" field.

func (*VoiceoverUpsertOne) ClearFailureReason

func (u *VoiceoverUpsertOne) ClearFailureReason() *VoiceoverUpsertOne

ClearFailureReason clears the value of the "failure_reason" field.

func (*VoiceoverUpsertOne) ClearPromptID

func (u *VoiceoverUpsertOne) ClearPromptID() *VoiceoverUpsertOne

ClearPromptID clears the value of the "prompt_id" field.

func (*VoiceoverUpsertOne) ClearStartedAt

func (u *VoiceoverUpsertOne) ClearStartedAt() *VoiceoverUpsertOne

ClearStartedAt clears the value of the "started_at" field.

func (*VoiceoverUpsertOne) ClearStripeProductID

func (u *VoiceoverUpsertOne) ClearStripeProductID() *VoiceoverUpsertOne

ClearStripeProductID clears the value of the "stripe_product_id" field.

func (*VoiceoverUpsertOne) DoNothing

func (u *VoiceoverUpsertOne) DoNothing() *VoiceoverUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VoiceoverUpsertOne) Exec

func (u *VoiceoverUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*VoiceoverUpsertOne) ExecX

func (u *VoiceoverUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VoiceoverUpsertOne) ID

func (u *VoiceoverUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VoiceoverUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VoiceoverUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Voiceover.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VoiceoverUpsertOne) SetAPITokenID

func (u *VoiceoverUpsertOne) SetAPITokenID(v uuid.UUID) *VoiceoverUpsertOne

SetAPITokenID sets the "api_token_id" field.

func (*VoiceoverUpsertOne) SetCompletedAt

func (u *VoiceoverUpsertOne) SetCompletedAt(v time.Time) *VoiceoverUpsertOne

SetCompletedAt sets the "completed_at" field.

func (*VoiceoverUpsertOne) SetCost

SetCost sets the "cost" field.

func (*VoiceoverUpsertOne) SetCountryCode

func (u *VoiceoverUpsertOne) SetCountryCode(v string) *VoiceoverUpsertOne

SetCountryCode sets the "country_code" field.

func (*VoiceoverUpsertOne) SetDenoiseAudio

func (u *VoiceoverUpsertOne) SetDenoiseAudio(v bool) *VoiceoverUpsertOne

SetDenoiseAudio sets the "denoise_audio" field.

func (*VoiceoverUpsertOne) SetDeviceInfoID

func (u *VoiceoverUpsertOne) SetDeviceInfoID(v uuid.UUID) *VoiceoverUpsertOne

SetDeviceInfoID sets the "device_info_id" field.

func (*VoiceoverUpsertOne) SetFailureReason

func (u *VoiceoverUpsertOne) SetFailureReason(v string) *VoiceoverUpsertOne

SetFailureReason sets the "failure_reason" field.

func (*VoiceoverUpsertOne) SetModelID

func (u *VoiceoverUpsertOne) SetModelID(v uuid.UUID) *VoiceoverUpsertOne

SetModelID sets the "model_id" field.

func (*VoiceoverUpsertOne) SetPromptID

func (u *VoiceoverUpsertOne) SetPromptID(v uuid.UUID) *VoiceoverUpsertOne

SetPromptID sets the "prompt_id" field.

func (*VoiceoverUpsertOne) SetRemoveSilence

func (u *VoiceoverUpsertOne) SetRemoveSilence(v bool) *VoiceoverUpsertOne

SetRemoveSilence sets the "remove_silence" field.

func (*VoiceoverUpsertOne) SetSeed

func (u *VoiceoverUpsertOne) SetSeed(v int) *VoiceoverUpsertOne

SetSeed sets the "seed" field.

func (*VoiceoverUpsertOne) SetSourceType

SetSourceType sets the "source_type" field.

func (*VoiceoverUpsertOne) SetSpeakerID

func (u *VoiceoverUpsertOne) SetSpeakerID(v uuid.UUID) *VoiceoverUpsertOne

SetSpeakerID sets the "speaker_id" field.

func (*VoiceoverUpsertOne) SetStartedAt

func (u *VoiceoverUpsertOne) SetStartedAt(v time.Time) *VoiceoverUpsertOne

SetStartedAt sets the "started_at" field.

func (*VoiceoverUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*VoiceoverUpsertOne) SetStripeProductID

func (u *VoiceoverUpsertOne) SetStripeProductID(v string) *VoiceoverUpsertOne

SetStripeProductID sets the "stripe_product_id" field.

func (*VoiceoverUpsertOne) SetTemperature

func (u *VoiceoverUpsertOne) SetTemperature(v float32) *VoiceoverUpsertOne

SetTemperature sets the "temperature" field.

func (*VoiceoverUpsertOne) SetUpdatedAt

func (u *VoiceoverUpsertOne) SetUpdatedAt(v time.Time) *VoiceoverUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*VoiceoverUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*VoiceoverUpsertOne) SetWasAutoSubmitted

func (u *VoiceoverUpsertOne) SetWasAutoSubmitted(v bool) *VoiceoverUpsertOne

SetWasAutoSubmitted sets the "was_auto_submitted" field.

func (*VoiceoverUpsertOne) Update

func (u *VoiceoverUpsertOne) Update(set func(*VoiceoverUpsert)) *VoiceoverUpsertOne

Update allows overriding fields `UPDATE` values. See the VoiceoverCreate.OnConflict documentation for more info.

func (*VoiceoverUpsertOne) UpdateAPITokenID

func (u *VoiceoverUpsertOne) UpdateAPITokenID() *VoiceoverUpsertOne

UpdateAPITokenID sets the "api_token_id" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateCompletedAt

func (u *VoiceoverUpsertOne) UpdateCompletedAt() *VoiceoverUpsertOne

UpdateCompletedAt sets the "completed_at" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateCost

func (u *VoiceoverUpsertOne) UpdateCost() *VoiceoverUpsertOne

UpdateCost sets the "cost" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateCountryCode

func (u *VoiceoverUpsertOne) UpdateCountryCode() *VoiceoverUpsertOne

UpdateCountryCode sets the "country_code" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateDenoiseAudio

func (u *VoiceoverUpsertOne) UpdateDenoiseAudio() *VoiceoverUpsertOne

UpdateDenoiseAudio sets the "denoise_audio" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateDeviceInfoID

func (u *VoiceoverUpsertOne) UpdateDeviceInfoID() *VoiceoverUpsertOne

UpdateDeviceInfoID sets the "device_info_id" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateFailureReason

func (u *VoiceoverUpsertOne) UpdateFailureReason() *VoiceoverUpsertOne

UpdateFailureReason sets the "failure_reason" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateModelID

func (u *VoiceoverUpsertOne) UpdateModelID() *VoiceoverUpsertOne

UpdateModelID sets the "model_id" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateNewValues

func (u *VoiceoverUpsertOne) UpdateNewValues() *VoiceoverUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Voiceover.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(voiceover.FieldID)
		}),
	).
	Exec(ctx)

func (*VoiceoverUpsertOne) UpdatePromptID

func (u *VoiceoverUpsertOne) UpdatePromptID() *VoiceoverUpsertOne

UpdatePromptID sets the "prompt_id" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateRemoveSilence

func (u *VoiceoverUpsertOne) UpdateRemoveSilence() *VoiceoverUpsertOne

UpdateRemoveSilence sets the "remove_silence" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateSeed

func (u *VoiceoverUpsertOne) UpdateSeed() *VoiceoverUpsertOne

UpdateSeed sets the "seed" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateSourceType

func (u *VoiceoverUpsertOne) UpdateSourceType() *VoiceoverUpsertOne

UpdateSourceType sets the "source_type" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateSpeakerID

func (u *VoiceoverUpsertOne) UpdateSpeakerID() *VoiceoverUpsertOne

UpdateSpeakerID sets the "speaker_id" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateStartedAt

func (u *VoiceoverUpsertOne) UpdateStartedAt() *VoiceoverUpsertOne

UpdateStartedAt sets the "started_at" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateStatus

func (u *VoiceoverUpsertOne) UpdateStatus() *VoiceoverUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateStripeProductID

func (u *VoiceoverUpsertOne) UpdateStripeProductID() *VoiceoverUpsertOne

UpdateStripeProductID sets the "stripe_product_id" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateTemperature

func (u *VoiceoverUpsertOne) UpdateTemperature() *VoiceoverUpsertOne

UpdateTemperature sets the "temperature" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateUpdatedAt

func (u *VoiceoverUpsertOne) UpdateUpdatedAt() *VoiceoverUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateUserID

func (u *VoiceoverUpsertOne) UpdateUserID() *VoiceoverUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*VoiceoverUpsertOne) UpdateWasAutoSubmitted

func (u *VoiceoverUpsertOne) UpdateWasAutoSubmitted() *VoiceoverUpsertOne

UpdateWasAutoSubmitted sets the "was_auto_submitted" field to the value that was provided on create.

type Voiceovers

type Voiceovers []*Voiceover

Voiceovers is a parsable slice of Voiceover.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL