ent

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: GPL-3.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeApiKey         = "ApiKey"
	TypeDownloadRecord = "DownloadRecord"
	TypeEpisode        = "Episode"
	TypeImportScan     = "ImportScan"
	TypeImportScanFile = "ImportScanFile"
	TypeImportScanShow = "ImportScanShow"
	TypeInvite         = "Invite"
	TypeMediaFile      = "MediaFile"
	TypeMovie          = "Movie"
	TypeMovieEvent     = "MovieEvent"
	TypeOIDCIdentity   = "OIDCIdentity"
	TypeRequest        = "Request"
	TypeScheduledJob   = "ScheduledJob"
	TypeSeason         = "Season"
	TypeSession        = "Session"
	TypeTVShow         = "TVShow"
	TypeTorrentSession = "TorrentSession"
	TypeUser           = "User"
)

Variables

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

Functions

func Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

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 ApiKey

type ApiKey struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// KeyHash holds the value of the "key_hash" field.
	KeyHash string `json:"-"`
	// LastUsedAt holds the value of the "last_used_at" field.
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ApiKeyQuery when eager-loading is set.
	Edges ApiKeyEdges `json:"edges"`
	// contains filtered or unexported fields
}

ApiKey is the model entity for the ApiKey schema.

func (*ApiKey) QueryOwner

func (_m *ApiKey) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the ApiKey entity.

func (*ApiKey) String

func (_m *ApiKey) String() string

String implements the fmt.Stringer.

func (*ApiKey) Unwrap

func (_m *ApiKey) Unwrap() *ApiKey

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

func (_m *ApiKey) Update() *ApiKeyUpdateOne

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

func (*ApiKey) Value

func (_m *ApiKey) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ApiKey. This includes values selected through modifiers, order, etc.

type ApiKeyClient

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

ApiKeyClient is a client for the ApiKey schema.

func NewApiKeyClient

func NewApiKeyClient(c config) *ApiKeyClient

NewApiKeyClient returns a client for the ApiKey from the given config.

func (*ApiKeyClient) Create

func (c *ApiKeyClient) Create() *ApiKeyCreate

Create returns a builder for creating a ApiKey entity.

func (*ApiKeyClient) CreateBulk

func (c *ApiKeyClient) CreateBulk(builders ...*ApiKeyCreate) *ApiKeyCreateBulk

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

func (*ApiKeyClient) Delete

func (c *ApiKeyClient) Delete() *ApiKeyDelete

Delete returns a delete builder for ApiKey.

func (*ApiKeyClient) DeleteOne

func (c *ApiKeyClient) DeleteOne(_m *ApiKey) *ApiKeyDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ApiKeyClient) DeleteOneID

func (c *ApiKeyClient) DeleteOneID(id uint32) *ApiKeyDeleteOne

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

func (*ApiKeyClient) Get

func (c *ApiKeyClient) Get(ctx context.Context, id uint32) (*ApiKey, error)

Get returns a ApiKey entity by its id.

func (*ApiKeyClient) GetX

func (c *ApiKeyClient) GetX(ctx context.Context, id uint32) *ApiKey

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

func (*ApiKeyClient) Hooks

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

Hooks returns the client hooks.

func (*ApiKeyClient) Intercept

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

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

func (*ApiKeyClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ApiKeyClient) MapCreateBulk

func (c *ApiKeyClient) MapCreateBulk(slice any, setFunc func(*ApiKeyCreate, int)) *ApiKeyCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ApiKeyClient) Query

func (c *ApiKeyClient) Query() *ApiKeyQuery

Query returns a query builder for ApiKey.

func (*ApiKeyClient) QueryOwner

func (c *ApiKeyClient) QueryOwner(_m *ApiKey) *UserQuery

QueryOwner queries the owner edge of a ApiKey.

func (*ApiKeyClient) Update

func (c *ApiKeyClient) Update() *ApiKeyUpdate

Update returns an update builder for ApiKey.

func (*ApiKeyClient) UpdateOne

func (c *ApiKeyClient) UpdateOne(_m *ApiKey) *ApiKeyUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ApiKeyClient) UpdateOneID

func (c *ApiKeyClient) UpdateOneID(id uint32) *ApiKeyUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ApiKeyClient) Use

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

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

type ApiKeyCreate

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

ApiKeyCreate is the builder for creating a ApiKey entity.

func (*ApiKeyCreate) Exec

func (_c *ApiKeyCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ApiKeyCreate) ExecX

func (_c *ApiKeyCreate) ExecX(ctx context.Context)

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

func (*ApiKeyCreate) Mutation

func (_c *ApiKeyCreate) Mutation() *ApiKeyMutation

Mutation returns the ApiKeyMutation object of the builder.

func (*ApiKeyCreate) Save

func (_c *ApiKeyCreate) Save(ctx context.Context) (*ApiKey, error)

Save creates the ApiKey in the database.

func (*ApiKeyCreate) SaveX

func (_c *ApiKeyCreate) SaveX(ctx context.Context) *ApiKey

SaveX calls Save and panics if Save returns an error.

func (*ApiKeyCreate) SetCreateTime

func (_c *ApiKeyCreate) SetCreateTime(v time.Time) *ApiKeyCreate

SetCreateTime sets the "create_time" field.

func (*ApiKeyCreate) SetID

func (_c *ApiKeyCreate) SetID(v uint32) *ApiKeyCreate

SetID sets the "id" field.

func (*ApiKeyCreate) SetKeyHash

func (_c *ApiKeyCreate) SetKeyHash(v string) *ApiKeyCreate

SetKeyHash sets the "key_hash" field.

func (*ApiKeyCreate) SetLastUsedAt

func (_c *ApiKeyCreate) SetLastUsedAt(v time.Time) *ApiKeyCreate

SetLastUsedAt sets the "last_used_at" field.

func (*ApiKeyCreate) SetName

func (_c *ApiKeyCreate) SetName(v string) *ApiKeyCreate

SetName sets the "name" field.

func (*ApiKeyCreate) SetNillableCreateTime

func (_c *ApiKeyCreate) SetNillableCreateTime(v *time.Time) *ApiKeyCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ApiKeyCreate) SetNillableLastUsedAt

func (_c *ApiKeyCreate) SetNillableLastUsedAt(v *time.Time) *ApiKeyCreate

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

func (*ApiKeyCreate) SetNillableUpdateTime

func (_c *ApiKeyCreate) SetNillableUpdateTime(v *time.Time) *ApiKeyCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*ApiKeyCreate) SetOwner

func (_c *ApiKeyCreate) SetOwner(v *User) *ApiKeyCreate

SetOwner sets the "owner" edge to the User entity.

func (*ApiKeyCreate) SetOwnerID

func (_c *ApiKeyCreate) SetOwnerID(id uint32) *ApiKeyCreate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*ApiKeyCreate) SetUpdateTime

func (_c *ApiKeyCreate) SetUpdateTime(v time.Time) *ApiKeyCreate

SetUpdateTime sets the "update_time" field.

type ApiKeyCreateBulk

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

ApiKeyCreateBulk is the builder for creating many ApiKey entities in bulk.

func (*ApiKeyCreateBulk) Exec

func (_c *ApiKeyCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ApiKeyCreateBulk) ExecX

func (_c *ApiKeyCreateBulk) ExecX(ctx context.Context)

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

func (*ApiKeyCreateBulk) Save

func (_c *ApiKeyCreateBulk) Save(ctx context.Context) ([]*ApiKey, error)

Save creates the ApiKey entities in the database.

func (*ApiKeyCreateBulk) SaveX

func (_c *ApiKeyCreateBulk) SaveX(ctx context.Context) []*ApiKey

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

type ApiKeyDelete

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

ApiKeyDelete is the builder for deleting a ApiKey entity.

func (*ApiKeyDelete) Exec

func (_d *ApiKeyDelete) Exec(ctx context.Context) (int, error)

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

func (*ApiKeyDelete) ExecX

func (_d *ApiKeyDelete) ExecX(ctx context.Context) int

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

func (*ApiKeyDelete) Where

func (_d *ApiKeyDelete) Where(ps ...predicate.ApiKey) *ApiKeyDelete

Where appends a list predicates to the ApiKeyDelete builder.

type ApiKeyDeleteOne

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

ApiKeyDeleteOne is the builder for deleting a single ApiKey entity.

func (*ApiKeyDeleteOne) Exec

func (_d *ApiKeyDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ApiKeyDeleteOne) ExecX

func (_d *ApiKeyDeleteOne) ExecX(ctx context.Context)

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

func (*ApiKeyDeleteOne) Where

func (_d *ApiKeyDeleteOne) Where(ps ...predicate.ApiKey) *ApiKeyDeleteOne

Where appends a list predicates to the ApiKeyDelete builder.

type ApiKeyEdges

type ApiKeyEdges struct {
	// Owner holds the value of the owner edge.
	Owner *User `json:"owner,omitempty"`
	// contains filtered or unexported fields
}

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

func (ApiKeyEdges) OwnerOrErr

func (e ApiKeyEdges) OwnerOrErr() (*User, error)

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

type ApiKeyGroupBy

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

ApiKeyGroupBy is the group-by builder for ApiKey entities.

func (*ApiKeyGroupBy) Aggregate

func (_g *ApiKeyGroupBy) Aggregate(fns ...AggregateFunc) *ApiKeyGroupBy

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

func (*ApiKeyGroupBy) Bool

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

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

func (*ApiKeyGroupBy) BoolX

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

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

func (*ApiKeyGroupBy) Bools

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

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

func (*ApiKeyGroupBy) BoolsX

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

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

func (*ApiKeyGroupBy) Float64

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

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

func (*ApiKeyGroupBy) Float64X

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

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

func (*ApiKeyGroupBy) Float64s

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

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

func (*ApiKeyGroupBy) Float64sX

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

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

func (*ApiKeyGroupBy) Int

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

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

func (*ApiKeyGroupBy) IntX

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

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

func (*ApiKeyGroupBy) Ints

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

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

func (*ApiKeyGroupBy) IntsX

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

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

func (*ApiKeyGroupBy) Scan

func (_g *ApiKeyGroupBy) Scan(ctx context.Context, v any) error

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

func (*ApiKeyGroupBy) ScanX

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

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

func (*ApiKeyGroupBy) String

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

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

func (*ApiKeyGroupBy) StringX

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

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

func (*ApiKeyGroupBy) Strings

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

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

func (*ApiKeyGroupBy) StringsX

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

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

type ApiKeyMutation

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

ApiKeyMutation represents an operation that mutates the ApiKey nodes in the graph.

func (*ApiKeyMutation) AddField

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

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

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

func (*ApiKeyMutation) AddedField

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

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

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

func (*ApiKeyMutation) AddedIDs

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

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

func (*ApiKeyMutation) ClearEdge

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

func (m *ApiKeyMutation) 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 (*ApiKeyMutation) ClearLastUsedAt

func (m *ApiKeyMutation) ClearLastUsedAt()

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ApiKeyMutation) ClearOwner

func (m *ApiKeyMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*ApiKeyMutation) ClearedEdges

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

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

func (*ApiKeyMutation) ClearedFields

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

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

func (ApiKeyMutation) Client

func (m ApiKeyMutation) 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 (*ApiKeyMutation) CreateTime

func (m *ApiKeyMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ApiKeyMutation) EdgeCleared

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

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

func (*ApiKeyMutation) Field

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

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

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

func (*ApiKeyMutation) Fields

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

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

func (m *ApiKeyMutation) IDs(ctx context.Context) ([]uint32, 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 (*ApiKeyMutation) KeyHash

func (m *ApiKeyMutation) KeyHash() (r string, exists bool)

KeyHash returns the value of the "key_hash" field in the mutation.

func (*ApiKeyMutation) LastUsedAt

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

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

func (*ApiKeyMutation) LastUsedAtCleared

func (m *ApiKeyMutation) LastUsedAtCleared() bool

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

func (*ApiKeyMutation) Name

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

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

func (*ApiKeyMutation) OldCreateTime

func (m *ApiKeyMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the ApiKey entity. If the ApiKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ApiKeyMutation) OldField

func (m *ApiKeyMutation) 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 (*ApiKeyMutation) OldKeyHash

func (m *ApiKeyMutation) OldKeyHash(ctx context.Context) (v string, err error)

OldKeyHash returns the old "key_hash" field's value of the ApiKey entity. If the ApiKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ApiKeyMutation) OldLastUsedAt

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

OldLastUsedAt returns the old "last_used_at" field's value of the ApiKey entity. If the ApiKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ApiKeyMutation) OldName

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

OldName returns the old "name" field's value of the ApiKey entity. If the ApiKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ApiKeyMutation) OldUpdateTime

func (m *ApiKeyMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the ApiKey entity. If the ApiKey object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ApiKeyMutation) Op

func (m *ApiKeyMutation) Op() Op

Op returns the operation name.

func (*ApiKeyMutation) OwnerCleared

func (m *ApiKeyMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*ApiKeyMutation) OwnerID

func (m *ApiKeyMutation) OwnerID() (id uint32, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*ApiKeyMutation) OwnerIDs

func (m *ApiKeyMutation) OwnerIDs() (ids []uint32)

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

func (*ApiKeyMutation) RemovedEdges

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

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

func (*ApiKeyMutation) RemovedIDs

func (m *ApiKeyMutation) 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 (*ApiKeyMutation) ResetCreateTime

func (m *ApiKeyMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ApiKeyMutation) ResetEdge

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

func (m *ApiKeyMutation) 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 (*ApiKeyMutation) ResetKeyHash

func (m *ApiKeyMutation) ResetKeyHash()

ResetKeyHash resets all changes to the "key_hash" field.

func (*ApiKeyMutation) ResetLastUsedAt

func (m *ApiKeyMutation) ResetLastUsedAt()

ResetLastUsedAt resets all changes to the "last_used_at" field.

func (*ApiKeyMutation) ResetName

func (m *ApiKeyMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ApiKeyMutation) ResetOwner

func (m *ApiKeyMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*ApiKeyMutation) ResetUpdateTime

func (m *ApiKeyMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*ApiKeyMutation) SetCreateTime

func (m *ApiKeyMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ApiKeyMutation) SetField

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

func (m *ApiKeyMutation) SetID(id uint32)

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

func (*ApiKeyMutation) SetKeyHash

func (m *ApiKeyMutation) SetKeyHash(s string)

SetKeyHash sets the "key_hash" field.

func (*ApiKeyMutation) SetLastUsedAt

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

SetLastUsedAt sets the "last_used_at" field.

func (*ApiKeyMutation) SetName

func (m *ApiKeyMutation) SetName(s string)

SetName sets the "name" field.

func (*ApiKeyMutation) SetOp

func (m *ApiKeyMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ApiKeyMutation) SetOwnerID

func (m *ApiKeyMutation) SetOwnerID(id uint32)

SetOwnerID sets the "owner" edge to the User entity by id.

func (*ApiKeyMutation) SetUpdateTime

func (m *ApiKeyMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (ApiKeyMutation) Tx

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

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

func (*ApiKeyMutation) Type

func (m *ApiKeyMutation) Type() string

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

func (*ApiKeyMutation) UpdateTime

func (m *ApiKeyMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*ApiKeyMutation) Where

func (m *ApiKeyMutation) Where(ps ...predicate.ApiKey)

Where appends a list predicates to the ApiKeyMutation builder.

func (*ApiKeyMutation) WhereP

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

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

type ApiKeyQuery

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

ApiKeyQuery is the builder for querying ApiKey entities.

func (*ApiKeyQuery) Aggregate

func (_q *ApiKeyQuery) Aggregate(fns ...AggregateFunc) *ApiKeySelect

Aggregate returns a ApiKeySelect configured with the given aggregations.

func (*ApiKeyQuery) All

func (_q *ApiKeyQuery) All(ctx context.Context) ([]*ApiKey, error)

All executes the query and returns a list of ApiKeys.

func (*ApiKeyQuery) AllX

func (_q *ApiKeyQuery) AllX(ctx context.Context) []*ApiKey

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

func (*ApiKeyQuery) Clone

func (_q *ApiKeyQuery) Clone() *ApiKeyQuery

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

func (*ApiKeyQuery) Count

func (_q *ApiKeyQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ApiKeyQuery) CountX

func (_q *ApiKeyQuery) CountX(ctx context.Context) int

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

func (*ApiKeyQuery) Exist

func (_q *ApiKeyQuery) Exist(ctx context.Context) (bool, error)

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

func (*ApiKeyQuery) ExistX

func (_q *ApiKeyQuery) ExistX(ctx context.Context) bool

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

func (*ApiKeyQuery) First

func (_q *ApiKeyQuery) First(ctx context.Context) (*ApiKey, error)

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

func (*ApiKeyQuery) FirstID

func (_q *ApiKeyQuery) FirstID(ctx context.Context) (id uint32, err error)

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

func (*ApiKeyQuery) FirstIDX

func (_q *ApiKeyQuery) FirstIDX(ctx context.Context) uint32

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

func (*ApiKeyQuery) FirstX

func (_q *ApiKeyQuery) FirstX(ctx context.Context) *ApiKey

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

func (*ApiKeyQuery) GroupBy

func (_q *ApiKeyQuery) GroupBy(field string, fields ...string) *ApiKeyGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ApiKey.Query().
	GroupBy(apikey.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ApiKeyQuery) IDs

func (_q *ApiKeyQuery) IDs(ctx context.Context) (ids []uint32, err error)

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

func (*ApiKeyQuery) IDsX

func (_q *ApiKeyQuery) IDsX(ctx context.Context) []uint32

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

func (*ApiKeyQuery) Limit

func (_q *ApiKeyQuery) Limit(limit int) *ApiKeyQuery

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

func (*ApiKeyQuery) Offset

func (_q *ApiKeyQuery) Offset(offset int) *ApiKeyQuery

Offset to start from.

func (*ApiKeyQuery) Only

func (_q *ApiKeyQuery) Only(ctx context.Context) (*ApiKey, error)

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

func (*ApiKeyQuery) OnlyID

func (_q *ApiKeyQuery) OnlyID(ctx context.Context) (id uint32, err error)

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

func (*ApiKeyQuery) OnlyIDX

func (_q *ApiKeyQuery) OnlyIDX(ctx context.Context) uint32

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

func (*ApiKeyQuery) OnlyX

func (_q *ApiKeyQuery) OnlyX(ctx context.Context) *ApiKey

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

func (*ApiKeyQuery) Order

func (_q *ApiKeyQuery) Order(o ...apikey.OrderOption) *ApiKeyQuery

Order specifies how the records should be ordered.

func (*ApiKeyQuery) QueryOwner

func (_q *ApiKeyQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*ApiKeyQuery) Select

func (_q *ApiKeyQuery) Select(fields ...string) *ApiKeySelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.ApiKey.Query().
	Select(apikey.FieldCreateTime).
	Scan(ctx, &v)

func (*ApiKeyQuery) Unique

func (_q *ApiKeyQuery) Unique(unique bool) *ApiKeyQuery

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

func (_q *ApiKeyQuery) Where(ps ...predicate.ApiKey) *ApiKeyQuery

Where adds a new predicate for the ApiKeyQuery builder.

func (*ApiKeyQuery) WithOwner

func (_q *ApiKeyQuery) WithOwner(opts ...func(*UserQuery)) *ApiKeyQuery

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

type ApiKeySelect

type ApiKeySelect struct {
	*ApiKeyQuery
	// contains filtered or unexported fields
}

ApiKeySelect is the builder for selecting fields of ApiKey entities.

func (*ApiKeySelect) Aggregate

func (_s *ApiKeySelect) Aggregate(fns ...AggregateFunc) *ApiKeySelect

Aggregate adds the given aggregation functions to the selector query.

func (*ApiKeySelect) Bool

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

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

func (*ApiKeySelect) BoolX

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

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

func (*ApiKeySelect) Bools

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

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

func (*ApiKeySelect) BoolsX

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

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

func (*ApiKeySelect) Float64

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

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

func (*ApiKeySelect) Float64X

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

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

func (*ApiKeySelect) Float64s

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

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

func (*ApiKeySelect) Float64sX

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

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

func (*ApiKeySelect) Int

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

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

func (*ApiKeySelect) IntX

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

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

func (*ApiKeySelect) Ints

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

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

func (*ApiKeySelect) IntsX

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

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

func (*ApiKeySelect) Scan

func (_s *ApiKeySelect) Scan(ctx context.Context, v any) error

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

func (*ApiKeySelect) ScanX

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

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

func (*ApiKeySelect) String

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

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

func (*ApiKeySelect) StringX

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

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

func (*ApiKeySelect) Strings

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

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

func (*ApiKeySelect) StringsX

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

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

type ApiKeyUpdate

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

ApiKeyUpdate is the builder for updating ApiKey entities.

func (*ApiKeyUpdate) ClearLastUsedAt

func (_u *ApiKeyUpdate) ClearLastUsedAt() *ApiKeyUpdate

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ApiKeyUpdate) ClearOwner

func (_u *ApiKeyUpdate) ClearOwner() *ApiKeyUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*ApiKeyUpdate) Exec

func (_u *ApiKeyUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ApiKeyUpdate) ExecX

func (_u *ApiKeyUpdate) ExecX(ctx context.Context)

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

func (*ApiKeyUpdate) Mutation

func (_u *ApiKeyUpdate) Mutation() *ApiKeyMutation

Mutation returns the ApiKeyMutation object of the builder.

func (*ApiKeyUpdate) Save

func (_u *ApiKeyUpdate) Save(ctx context.Context) (int, error)

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

func (*ApiKeyUpdate) SaveX

func (_u *ApiKeyUpdate) SaveX(ctx context.Context) int

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

func (*ApiKeyUpdate) SetKeyHash

func (_u *ApiKeyUpdate) SetKeyHash(v string) *ApiKeyUpdate

SetKeyHash sets the "key_hash" field.

func (*ApiKeyUpdate) SetLastUsedAt

func (_u *ApiKeyUpdate) SetLastUsedAt(v time.Time) *ApiKeyUpdate

SetLastUsedAt sets the "last_used_at" field.

func (*ApiKeyUpdate) SetName

func (_u *ApiKeyUpdate) SetName(v string) *ApiKeyUpdate

SetName sets the "name" field.

func (*ApiKeyUpdate) SetNillableKeyHash

func (_u *ApiKeyUpdate) SetNillableKeyHash(v *string) *ApiKeyUpdate

SetNillableKeyHash sets the "key_hash" field if the given value is not nil.

func (*ApiKeyUpdate) SetNillableLastUsedAt

func (_u *ApiKeyUpdate) SetNillableLastUsedAt(v *time.Time) *ApiKeyUpdate

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

func (*ApiKeyUpdate) SetNillableName

func (_u *ApiKeyUpdate) SetNillableName(v *string) *ApiKeyUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*ApiKeyUpdate) SetOwner

func (_u *ApiKeyUpdate) SetOwner(v *User) *ApiKeyUpdate

SetOwner sets the "owner" edge to the User entity.

func (*ApiKeyUpdate) SetOwnerID

func (_u *ApiKeyUpdate) SetOwnerID(id uint32) *ApiKeyUpdate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*ApiKeyUpdate) SetUpdateTime

func (_u *ApiKeyUpdate) SetUpdateTime(v time.Time) *ApiKeyUpdate

SetUpdateTime sets the "update_time" field.

func (*ApiKeyUpdate) Where

func (_u *ApiKeyUpdate) Where(ps ...predicate.ApiKey) *ApiKeyUpdate

Where appends a list predicates to the ApiKeyUpdate builder.

type ApiKeyUpdateOne

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

ApiKeyUpdateOne is the builder for updating a single ApiKey entity.

func (*ApiKeyUpdateOne) ClearLastUsedAt

func (_u *ApiKeyUpdateOne) ClearLastUsedAt() *ApiKeyUpdateOne

ClearLastUsedAt clears the value of the "last_used_at" field.

func (*ApiKeyUpdateOne) ClearOwner

func (_u *ApiKeyUpdateOne) ClearOwner() *ApiKeyUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*ApiKeyUpdateOne) Exec

func (_u *ApiKeyUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ApiKeyUpdateOne) ExecX

func (_u *ApiKeyUpdateOne) ExecX(ctx context.Context)

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

func (*ApiKeyUpdateOne) Mutation

func (_u *ApiKeyUpdateOne) Mutation() *ApiKeyMutation

Mutation returns the ApiKeyMutation object of the builder.

func (*ApiKeyUpdateOne) Save

func (_u *ApiKeyUpdateOne) Save(ctx context.Context) (*ApiKey, error)

Save executes the query and returns the updated ApiKey entity.

func (*ApiKeyUpdateOne) SaveX

func (_u *ApiKeyUpdateOne) SaveX(ctx context.Context) *ApiKey

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

func (*ApiKeyUpdateOne) Select

func (_u *ApiKeyUpdateOne) Select(field string, fields ...string) *ApiKeyUpdateOne

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

func (*ApiKeyUpdateOne) SetKeyHash

func (_u *ApiKeyUpdateOne) SetKeyHash(v string) *ApiKeyUpdateOne

SetKeyHash sets the "key_hash" field.

func (*ApiKeyUpdateOne) SetLastUsedAt

func (_u *ApiKeyUpdateOne) SetLastUsedAt(v time.Time) *ApiKeyUpdateOne

SetLastUsedAt sets the "last_used_at" field.

func (*ApiKeyUpdateOne) SetName

func (_u *ApiKeyUpdateOne) SetName(v string) *ApiKeyUpdateOne

SetName sets the "name" field.

func (*ApiKeyUpdateOne) SetNillableKeyHash

func (_u *ApiKeyUpdateOne) SetNillableKeyHash(v *string) *ApiKeyUpdateOne

SetNillableKeyHash sets the "key_hash" field if the given value is not nil.

func (*ApiKeyUpdateOne) SetNillableLastUsedAt

func (_u *ApiKeyUpdateOne) SetNillableLastUsedAt(v *time.Time) *ApiKeyUpdateOne

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

func (*ApiKeyUpdateOne) SetNillableName

func (_u *ApiKeyUpdateOne) SetNillableName(v *string) *ApiKeyUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*ApiKeyUpdateOne) SetOwner

func (_u *ApiKeyUpdateOne) SetOwner(v *User) *ApiKeyUpdateOne

SetOwner sets the "owner" edge to the User entity.

func (*ApiKeyUpdateOne) SetOwnerID

func (_u *ApiKeyUpdateOne) SetOwnerID(id uint32) *ApiKeyUpdateOne

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*ApiKeyUpdateOne) SetUpdateTime

func (_u *ApiKeyUpdateOne) SetUpdateTime(v time.Time) *ApiKeyUpdateOne

SetUpdateTime sets the "update_time" field.

func (*ApiKeyUpdateOne) Where

func (_u *ApiKeyUpdateOne) Where(ps ...predicate.ApiKey) *ApiKeyUpdateOne

Where appends a list predicates to the ApiKeyUpdate builder.

type ApiKeys

type ApiKeys []*ApiKey

ApiKeys is a parsable slice of ApiKey.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// ApiKey is the client for interacting with the ApiKey builders.
	ApiKey *ApiKeyClient
	// DownloadRecord is the client for interacting with the DownloadRecord builders.
	DownloadRecord *DownloadRecordClient
	// Episode is the client for interacting with the Episode builders.
	Episode *EpisodeClient
	// ImportScan is the client for interacting with the ImportScan builders.
	ImportScan *ImportScanClient
	// ImportScanFile is the client for interacting with the ImportScanFile builders.
	ImportScanFile *ImportScanFileClient
	// ImportScanShow is the client for interacting with the ImportScanShow builders.
	ImportScanShow *ImportScanShowClient
	// Invite is the client for interacting with the Invite builders.
	Invite *InviteClient
	// MediaFile is the client for interacting with the MediaFile builders.
	MediaFile *MediaFileClient
	// Movie is the client for interacting with the Movie builders.
	Movie *MovieClient
	// MovieEvent is the client for interacting with the MovieEvent builders.
	MovieEvent *MovieEventClient
	// OIDCIdentity is the client for interacting with the OIDCIdentity builders.
	OIDCIdentity *OIDCIdentityClient
	// Request is the client for interacting with the Request builders.
	Request *RequestClient
	// ScheduledJob is the client for interacting with the ScheduledJob builders.
	ScheduledJob *ScheduledJobClient
	// Season is the client for interacting with the Season builders.
	Season *SeasonClient
	// Session is the client for interacting with the Session builders.
	Session *SessionClient
	// TVShow is the client for interacting with the TVShow builders.
	TVShow *TVShowClient
	// TorrentSession is the client for interacting with the TorrentSession builders.
	TorrentSession *TorrentSessionClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// 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().
	ApiKey.
	Query().
	Count(ctx)

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

type DownloadRecord struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Quality holds the value of the "quality" field.
	Quality string `json:"quality,omitempty"`
	// Size holds the value of the "size" field.
	Size int64 `json:"size,omitempty"`
	// Status holds the value of the "status" field.
	Status downloadrecord.Status `json:"status,omitempty"`
	// TorrentHash holds the value of the "torrent_hash" field.
	TorrentHash string `json:"torrent_hash,omitempty"`
	// ReleaseGroup holds the value of the "release_group" field.
	ReleaseGroup string `json:"release_group,omitempty"`
	// SavePath holds the value of the "save_path" field.
	SavePath string `json:"save_path,omitempty"`
	// ImportAttempts holds the value of the "import_attempts" field.
	ImportAttempts uint8 `json:"import_attempts,omitempty"`
	// FailureReason holds the value of the "failure_reason" field.
	FailureReason string `json:"failure_reason,omitempty"`
	// ImportedAt holds the value of the "imported_at" field.
	ImportedAt *time.Time `json:"imported_at,omitempty"`
	// IndexerName holds the value of the "indexer_name" field.
	IndexerName string `json:"indexer_name,omitempty"`
	// DownloadClientName holds the value of the "download_client_name" field.
	DownloadClientName string `json:"download_client_name,omitempty"`
	// ReplaceExisting holds the value of the "replace_existing" field.
	ReplaceExisting bool `json:"replace_existing,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DownloadRecordQuery when eager-loading is set.
	Edges DownloadRecordEdges `json:"edges"`
	// contains filtered or unexported fields
}

DownloadRecord is the model entity for the DownloadRecord schema.

func (*DownloadRecord) QueryEpisode

func (_m *DownloadRecord) QueryEpisode() *EpisodeQuery

QueryEpisode queries the "episode" edge of the DownloadRecord entity.

func (*DownloadRecord) QueryMovie

func (_m *DownloadRecord) QueryMovie() *MovieQuery

QueryMovie queries the "movie" edge of the DownloadRecord entity.

func (*DownloadRecord) String

func (_m *DownloadRecord) String() string

String implements the fmt.Stringer.

func (*DownloadRecord) Unwrap

func (_m *DownloadRecord) Unwrap() *DownloadRecord

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

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

func (*DownloadRecord) Value

func (_m *DownloadRecord) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DownloadRecord. This includes values selected through modifiers, order, etc.

type DownloadRecordClient

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

DownloadRecordClient is a client for the DownloadRecord schema.

func NewDownloadRecordClient

func NewDownloadRecordClient(c config) *DownloadRecordClient

NewDownloadRecordClient returns a client for the DownloadRecord from the given config.

func (*DownloadRecordClient) Create

Create returns a builder for creating a DownloadRecord entity.

func (*DownloadRecordClient) CreateBulk

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

func (*DownloadRecordClient) Delete

Delete returns a delete builder for DownloadRecord.

func (*DownloadRecordClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*DownloadRecordClient) DeleteOneID

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

func (*DownloadRecordClient) Get

Get returns a DownloadRecord entity by its id.

func (*DownloadRecordClient) GetX

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

func (*DownloadRecordClient) Hooks

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

Hooks returns the client hooks.

func (*DownloadRecordClient) Intercept

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

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

func (*DownloadRecordClient) Interceptors

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

Interceptors returns the client interceptors.

func (*DownloadRecordClient) MapCreateBulk

func (c *DownloadRecordClient) MapCreateBulk(slice any, setFunc func(*DownloadRecordCreate, int)) *DownloadRecordCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*DownloadRecordClient) Query

Query returns a query builder for DownloadRecord.

func (*DownloadRecordClient) QueryEpisode

func (c *DownloadRecordClient) QueryEpisode(_m *DownloadRecord) *EpisodeQuery

QueryEpisode queries the episode edge of a DownloadRecord.

func (*DownloadRecordClient) QueryMovie

func (c *DownloadRecordClient) QueryMovie(_m *DownloadRecord) *MovieQuery

QueryMovie queries the movie edge of a DownloadRecord.

func (*DownloadRecordClient) Update

Update returns an update builder for DownloadRecord.

func (*DownloadRecordClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DownloadRecordClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DownloadRecordClient) Use

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

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

type DownloadRecordCreate

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

DownloadRecordCreate is the builder for creating a DownloadRecord entity.

func (*DownloadRecordCreate) Exec

func (_c *DownloadRecordCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DownloadRecordCreate) ExecX

func (_c *DownloadRecordCreate) ExecX(ctx context.Context)

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

func (*DownloadRecordCreate) Mutation

Mutation returns the DownloadRecordMutation object of the builder.

func (*DownloadRecordCreate) Save

Save creates the DownloadRecord in the database.

func (*DownloadRecordCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DownloadRecordCreate) SetCreateTime

func (_c *DownloadRecordCreate) SetCreateTime(v time.Time) *DownloadRecordCreate

SetCreateTime sets the "create_time" field.

func (*DownloadRecordCreate) SetDownloadClientName

func (_c *DownloadRecordCreate) SetDownloadClientName(v string) *DownloadRecordCreate

SetDownloadClientName sets the "download_client_name" field.

func (*DownloadRecordCreate) SetEpisode

SetEpisode sets the "episode" edge to the Episode entity.

func (*DownloadRecordCreate) SetEpisodeID

func (_c *DownloadRecordCreate) SetEpisodeID(id uint32) *DownloadRecordCreate

SetEpisodeID sets the "episode" edge to the Episode entity by ID.

func (*DownloadRecordCreate) SetFailureReason

func (_c *DownloadRecordCreate) SetFailureReason(v string) *DownloadRecordCreate

SetFailureReason sets the "failure_reason" field.

func (*DownloadRecordCreate) SetID

SetID sets the "id" field.

func (*DownloadRecordCreate) SetImportAttempts

func (_c *DownloadRecordCreate) SetImportAttempts(v uint8) *DownloadRecordCreate

SetImportAttempts sets the "import_attempts" field.

func (*DownloadRecordCreate) SetImportedAt

func (_c *DownloadRecordCreate) SetImportedAt(v time.Time) *DownloadRecordCreate

SetImportedAt sets the "imported_at" field.

func (*DownloadRecordCreate) SetIndexerName

func (_c *DownloadRecordCreate) SetIndexerName(v string) *DownloadRecordCreate

SetIndexerName sets the "indexer_name" field.

func (*DownloadRecordCreate) SetMovie

SetMovie sets the "movie" edge to the Movie entity.

func (*DownloadRecordCreate) SetMovieID

func (_c *DownloadRecordCreate) SetMovieID(id uint32) *DownloadRecordCreate

SetMovieID sets the "movie" edge to the Movie entity by ID.

func (*DownloadRecordCreate) SetNillableCreateTime

func (_c *DownloadRecordCreate) SetNillableCreateTime(v *time.Time) *DownloadRecordCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableDownloadClientName

func (_c *DownloadRecordCreate) SetNillableDownloadClientName(v *string) *DownloadRecordCreate

SetNillableDownloadClientName sets the "download_client_name" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableEpisodeID

func (_c *DownloadRecordCreate) SetNillableEpisodeID(id *uint32) *DownloadRecordCreate

SetNillableEpisodeID sets the "episode" edge to the Episode entity by ID if the given value is not nil.

func (*DownloadRecordCreate) SetNillableFailureReason

func (_c *DownloadRecordCreate) SetNillableFailureReason(v *string) *DownloadRecordCreate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableImportAttempts

func (_c *DownloadRecordCreate) SetNillableImportAttempts(v *uint8) *DownloadRecordCreate

SetNillableImportAttempts sets the "import_attempts" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableImportedAt

func (_c *DownloadRecordCreate) SetNillableImportedAt(v *time.Time) *DownloadRecordCreate

SetNillableImportedAt sets the "imported_at" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableIndexerName

func (_c *DownloadRecordCreate) SetNillableIndexerName(v *string) *DownloadRecordCreate

SetNillableIndexerName sets the "indexer_name" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableMovieID

func (_c *DownloadRecordCreate) SetNillableMovieID(id *uint32) *DownloadRecordCreate

SetNillableMovieID sets the "movie" edge to the Movie entity by ID if the given value is not nil.

func (*DownloadRecordCreate) SetNillableQuality

func (_c *DownloadRecordCreate) SetNillableQuality(v *string) *DownloadRecordCreate

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableReleaseGroup

func (_c *DownloadRecordCreate) SetNillableReleaseGroup(v *string) *DownloadRecordCreate

SetNillableReleaseGroup sets the "release_group" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableReplaceExisting

func (_c *DownloadRecordCreate) SetNillableReplaceExisting(v *bool) *DownloadRecordCreate

SetNillableReplaceExisting sets the "replace_existing" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableSavePath

func (_c *DownloadRecordCreate) SetNillableSavePath(v *string) *DownloadRecordCreate

SetNillableSavePath sets the "save_path" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableSize

func (_c *DownloadRecordCreate) SetNillableSize(v *int64) *DownloadRecordCreate

SetNillableSize sets the "size" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableTorrentHash

func (_c *DownloadRecordCreate) SetNillableTorrentHash(v *string) *DownloadRecordCreate

SetNillableTorrentHash sets the "torrent_hash" field if the given value is not nil.

func (*DownloadRecordCreate) SetNillableUpdateTime

func (_c *DownloadRecordCreate) SetNillableUpdateTime(v *time.Time) *DownloadRecordCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*DownloadRecordCreate) SetQuality

SetQuality sets the "quality" field.

func (*DownloadRecordCreate) SetReleaseGroup

func (_c *DownloadRecordCreate) SetReleaseGroup(v string) *DownloadRecordCreate

SetReleaseGroup sets the "release_group" field.

func (*DownloadRecordCreate) SetReplaceExisting

func (_c *DownloadRecordCreate) SetReplaceExisting(v bool) *DownloadRecordCreate

SetReplaceExisting sets the "replace_existing" field.

func (*DownloadRecordCreate) SetSavePath

func (_c *DownloadRecordCreate) SetSavePath(v string) *DownloadRecordCreate

SetSavePath sets the "save_path" field.

func (*DownloadRecordCreate) SetSize

SetSize sets the "size" field.

func (*DownloadRecordCreate) SetStatus

SetStatus sets the "status" field.

func (*DownloadRecordCreate) SetTitle

SetTitle sets the "title" field.

func (*DownloadRecordCreate) SetTorrentHash

func (_c *DownloadRecordCreate) SetTorrentHash(v string) *DownloadRecordCreate

SetTorrentHash sets the "torrent_hash" field.

func (*DownloadRecordCreate) SetUpdateTime

func (_c *DownloadRecordCreate) SetUpdateTime(v time.Time) *DownloadRecordCreate

SetUpdateTime sets the "update_time" field.

type DownloadRecordCreateBulk

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

DownloadRecordCreateBulk is the builder for creating many DownloadRecord entities in bulk.

func (*DownloadRecordCreateBulk) Exec

Exec executes the query.

func (*DownloadRecordCreateBulk) ExecX

func (_c *DownloadRecordCreateBulk) ExecX(ctx context.Context)

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

func (*DownloadRecordCreateBulk) Save

Save creates the DownloadRecord entities in the database.

func (*DownloadRecordCreateBulk) SaveX

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

type DownloadRecordDelete

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

DownloadRecordDelete is the builder for deleting a DownloadRecord entity.

func (*DownloadRecordDelete) Exec

func (_d *DownloadRecordDelete) Exec(ctx context.Context) (int, error)

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

func (*DownloadRecordDelete) ExecX

func (_d *DownloadRecordDelete) ExecX(ctx context.Context) int

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

func (*DownloadRecordDelete) Where

Where appends a list predicates to the DownloadRecordDelete builder.

type DownloadRecordDeleteOne

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

DownloadRecordDeleteOne is the builder for deleting a single DownloadRecord entity.

func (*DownloadRecordDeleteOne) Exec

Exec executes the deletion query.

func (*DownloadRecordDeleteOne) ExecX

func (_d *DownloadRecordDeleteOne) ExecX(ctx context.Context)

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

func (*DownloadRecordDeleteOne) Where

Where appends a list predicates to the DownloadRecordDelete builder.

type DownloadRecordEdges

type DownloadRecordEdges struct {
	// Movie holds the value of the movie edge.
	Movie *Movie `json:"movie,omitempty"`
	// Episode holds the value of the episode edge.
	Episode *Episode `json:"episode,omitempty"`
	// contains filtered or unexported fields
}

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

func (DownloadRecordEdges) EpisodeOrErr

func (e DownloadRecordEdges) EpisodeOrErr() (*Episode, error)

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

func (DownloadRecordEdges) MovieOrErr

func (e DownloadRecordEdges) MovieOrErr() (*Movie, error)

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

type DownloadRecordGroupBy

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

DownloadRecordGroupBy is the group-by builder for DownloadRecord entities.

func (*DownloadRecordGroupBy) Aggregate

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

func (*DownloadRecordGroupBy) Bool

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

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

func (*DownloadRecordGroupBy) BoolX

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

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

func (*DownloadRecordGroupBy) Bools

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

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

func (*DownloadRecordGroupBy) BoolsX

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

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

func (*DownloadRecordGroupBy) Float64

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

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

func (*DownloadRecordGroupBy) Float64X

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

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

func (*DownloadRecordGroupBy) Float64s

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

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

func (*DownloadRecordGroupBy) Float64sX

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

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

func (*DownloadRecordGroupBy) Int

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

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

func (*DownloadRecordGroupBy) IntX

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

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

func (*DownloadRecordGroupBy) Ints

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

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

func (*DownloadRecordGroupBy) IntsX

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

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

func (*DownloadRecordGroupBy) Scan

func (_g *DownloadRecordGroupBy) Scan(ctx context.Context, v any) error

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

func (*DownloadRecordGroupBy) ScanX

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

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

func (*DownloadRecordGroupBy) String

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

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

func (*DownloadRecordGroupBy) StringX

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

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

func (*DownloadRecordGroupBy) Strings

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

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

func (*DownloadRecordGroupBy) StringsX

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

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

type DownloadRecordMutation

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

DownloadRecordMutation represents an operation that mutates the DownloadRecord nodes in the graph.

func (*DownloadRecordMutation) AddField

func (m *DownloadRecordMutation) 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 (*DownloadRecordMutation) AddImportAttempts

func (m *DownloadRecordMutation) AddImportAttempts(u int8)

AddImportAttempts adds u to the "import_attempts" field.

func (*DownloadRecordMutation) AddSize

func (m *DownloadRecordMutation) AddSize(i int64)

AddSize adds i to the "size" field.

func (*DownloadRecordMutation) AddedEdges

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

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

func (*DownloadRecordMutation) AddedField

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

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

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

func (*DownloadRecordMutation) AddedIDs

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

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

func (*DownloadRecordMutation) AddedImportAttempts

func (m *DownloadRecordMutation) AddedImportAttempts() (r int8, exists bool)

AddedImportAttempts returns the value that was added to the "import_attempts" field in this mutation.

func (*DownloadRecordMutation) AddedSize

func (m *DownloadRecordMutation) AddedSize() (r int64, exists bool)

AddedSize returns the value that was added to the "size" field in this mutation.

func (*DownloadRecordMutation) ClearDownloadClientName

func (m *DownloadRecordMutation) ClearDownloadClientName()

ClearDownloadClientName clears the value of the "download_client_name" field.

func (*DownloadRecordMutation) ClearEdge

func (m *DownloadRecordMutation) 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 (*DownloadRecordMutation) ClearEpisode

func (m *DownloadRecordMutation) ClearEpisode()

ClearEpisode clears the "episode" edge to the Episode entity.

func (*DownloadRecordMutation) ClearFailureReason

func (m *DownloadRecordMutation) ClearFailureReason()

ClearFailureReason clears the value of the "failure_reason" field.

func (*DownloadRecordMutation) ClearField

func (m *DownloadRecordMutation) 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 (*DownloadRecordMutation) ClearImportedAt

func (m *DownloadRecordMutation) ClearImportedAt()

ClearImportedAt clears the value of the "imported_at" field.

func (*DownloadRecordMutation) ClearIndexerName

func (m *DownloadRecordMutation) ClearIndexerName()

ClearIndexerName clears the value of the "indexer_name" field.

func (*DownloadRecordMutation) ClearMovie

func (m *DownloadRecordMutation) ClearMovie()

ClearMovie clears the "movie" edge to the Movie entity.

func (*DownloadRecordMutation) ClearQuality

func (m *DownloadRecordMutation) ClearQuality()

ClearQuality clears the value of the "quality" field.

func (*DownloadRecordMutation) ClearReleaseGroup

func (m *DownloadRecordMutation) ClearReleaseGroup()

ClearReleaseGroup clears the value of the "release_group" field.

func (*DownloadRecordMutation) ClearSavePath

func (m *DownloadRecordMutation) ClearSavePath()

ClearSavePath clears the value of the "save_path" field.

func (*DownloadRecordMutation) ClearSize

func (m *DownloadRecordMutation) ClearSize()

ClearSize clears the value of the "size" field.

func (*DownloadRecordMutation) ClearTorrentHash

func (m *DownloadRecordMutation) ClearTorrentHash()

ClearTorrentHash clears the value of the "torrent_hash" field.

func (*DownloadRecordMutation) ClearedEdges

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

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

func (*DownloadRecordMutation) ClearedFields

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

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

func (DownloadRecordMutation) Client

func (m DownloadRecordMutation) 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 (*DownloadRecordMutation) CreateTime

func (m *DownloadRecordMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*DownloadRecordMutation) DownloadClientName

func (m *DownloadRecordMutation) DownloadClientName() (r string, exists bool)

DownloadClientName returns the value of the "download_client_name" field in the mutation.

func (*DownloadRecordMutation) DownloadClientNameCleared

func (m *DownloadRecordMutation) DownloadClientNameCleared() bool

DownloadClientNameCleared returns if the "download_client_name" field was cleared in this mutation.

func (*DownloadRecordMutation) EdgeCleared

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

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

func (*DownloadRecordMutation) EpisodeCleared

func (m *DownloadRecordMutation) EpisodeCleared() bool

EpisodeCleared reports if the "episode" edge to the Episode entity was cleared.

func (*DownloadRecordMutation) EpisodeID

func (m *DownloadRecordMutation) EpisodeID() (id uint32, exists bool)

EpisodeID returns the "episode" edge ID in the mutation.

func (*DownloadRecordMutation) EpisodeIDs

func (m *DownloadRecordMutation) EpisodeIDs() (ids []uint32)

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

func (*DownloadRecordMutation) FailureReason

func (m *DownloadRecordMutation) FailureReason() (r string, exists bool)

FailureReason returns the value of the "failure_reason" field in the mutation.

func (*DownloadRecordMutation) FailureReasonCleared

func (m *DownloadRecordMutation) FailureReasonCleared() bool

FailureReasonCleared returns if the "failure_reason" field was cleared in this mutation.

func (*DownloadRecordMutation) Field

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

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

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

func (*DownloadRecordMutation) Fields

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

func (m *DownloadRecordMutation) ID() (id uint32, 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 (*DownloadRecordMutation) 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 (*DownloadRecordMutation) ImportAttempts

func (m *DownloadRecordMutation) ImportAttempts() (r uint8, exists bool)

ImportAttempts returns the value of the "import_attempts" field in the mutation.

func (*DownloadRecordMutation) ImportedAt

func (m *DownloadRecordMutation) ImportedAt() (r time.Time, exists bool)

ImportedAt returns the value of the "imported_at" field in the mutation.

func (*DownloadRecordMutation) ImportedAtCleared

func (m *DownloadRecordMutation) ImportedAtCleared() bool

ImportedAtCleared returns if the "imported_at" field was cleared in this mutation.

func (*DownloadRecordMutation) IndexerName

func (m *DownloadRecordMutation) IndexerName() (r string, exists bool)

IndexerName returns the value of the "indexer_name" field in the mutation.

func (*DownloadRecordMutation) IndexerNameCleared

func (m *DownloadRecordMutation) IndexerNameCleared() bool

IndexerNameCleared returns if the "indexer_name" field was cleared in this mutation.

func (*DownloadRecordMutation) MovieCleared

func (m *DownloadRecordMutation) MovieCleared() bool

MovieCleared reports if the "movie" edge to the Movie entity was cleared.

func (*DownloadRecordMutation) MovieID

func (m *DownloadRecordMutation) MovieID() (id uint32, exists bool)

MovieID returns the "movie" edge ID in the mutation.

func (*DownloadRecordMutation) MovieIDs

func (m *DownloadRecordMutation) MovieIDs() (ids []uint32)

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

func (*DownloadRecordMutation) OldCreateTime

func (m *DownloadRecordMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldDownloadClientName

func (m *DownloadRecordMutation) OldDownloadClientName(ctx context.Context) (v string, err error)

OldDownloadClientName returns the old "download_client_name" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldFailureReason

func (m *DownloadRecordMutation) OldFailureReason(ctx context.Context) (v string, err error)

OldFailureReason returns the old "failure_reason" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldField

func (m *DownloadRecordMutation) 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 (*DownloadRecordMutation) OldImportAttempts

func (m *DownloadRecordMutation) OldImportAttempts(ctx context.Context) (v uint8, err error)

OldImportAttempts returns the old "import_attempts" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldImportedAt

func (m *DownloadRecordMutation) OldImportedAt(ctx context.Context) (v *time.Time, err error)

OldImportedAt returns the old "imported_at" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldIndexerName

func (m *DownloadRecordMutation) OldIndexerName(ctx context.Context) (v string, err error)

OldIndexerName returns the old "indexer_name" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldQuality

func (m *DownloadRecordMutation) OldQuality(ctx context.Context) (v string, err error)

OldQuality returns the old "quality" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldReleaseGroup

func (m *DownloadRecordMutation) OldReleaseGroup(ctx context.Context) (v string, err error)

OldReleaseGroup returns the old "release_group" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldReplaceExisting

func (m *DownloadRecordMutation) OldReplaceExisting(ctx context.Context) (v bool, err error)

OldReplaceExisting returns the old "replace_existing" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldSavePath

func (m *DownloadRecordMutation) OldSavePath(ctx context.Context) (v string, err error)

OldSavePath returns the old "save_path" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldSize

func (m *DownloadRecordMutation) OldSize(ctx context.Context) (v int64, err error)

OldSize returns the old "size" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldStatus

func (m *DownloadRecordMutation) OldStatus(ctx context.Context) (v downloadrecord.Status, err error)

OldStatus returns the old "status" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldTitle

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

OldTitle returns the old "title" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldTorrentHash

func (m *DownloadRecordMutation) OldTorrentHash(ctx context.Context) (v string, err error)

OldTorrentHash returns the old "torrent_hash" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) OldUpdateTime

func (m *DownloadRecordMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the DownloadRecord entity. If the DownloadRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DownloadRecordMutation) Op

func (m *DownloadRecordMutation) Op() Op

Op returns the operation name.

func (*DownloadRecordMutation) Quality

func (m *DownloadRecordMutation) Quality() (r string, exists bool)

Quality returns the value of the "quality" field in the mutation.

func (*DownloadRecordMutation) QualityCleared

func (m *DownloadRecordMutation) QualityCleared() bool

QualityCleared returns if the "quality" field was cleared in this mutation.

func (*DownloadRecordMutation) ReleaseGroup

func (m *DownloadRecordMutation) ReleaseGroup() (r string, exists bool)

ReleaseGroup returns the value of the "release_group" field in the mutation.

func (*DownloadRecordMutation) ReleaseGroupCleared

func (m *DownloadRecordMutation) ReleaseGroupCleared() bool

ReleaseGroupCleared returns if the "release_group" field was cleared in this mutation.

func (*DownloadRecordMutation) RemovedEdges

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

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

func (*DownloadRecordMutation) RemovedIDs

func (m *DownloadRecordMutation) 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 (*DownloadRecordMutation) ReplaceExisting

func (m *DownloadRecordMutation) ReplaceExisting() (r bool, exists bool)

ReplaceExisting returns the value of the "replace_existing" field in the mutation.

func (*DownloadRecordMutation) ResetCreateTime

func (m *DownloadRecordMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*DownloadRecordMutation) ResetDownloadClientName

func (m *DownloadRecordMutation) ResetDownloadClientName()

ResetDownloadClientName resets all changes to the "download_client_name" field.

func (*DownloadRecordMutation) ResetEdge

func (m *DownloadRecordMutation) 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 (*DownloadRecordMutation) ResetEpisode

func (m *DownloadRecordMutation) ResetEpisode()

ResetEpisode resets all changes to the "episode" edge.

func (*DownloadRecordMutation) ResetFailureReason

func (m *DownloadRecordMutation) ResetFailureReason()

ResetFailureReason resets all changes to the "failure_reason" field.

func (*DownloadRecordMutation) ResetField

func (m *DownloadRecordMutation) 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 (*DownloadRecordMutation) ResetImportAttempts

func (m *DownloadRecordMutation) ResetImportAttempts()

ResetImportAttempts resets all changes to the "import_attempts" field.

func (*DownloadRecordMutation) ResetImportedAt

func (m *DownloadRecordMutation) ResetImportedAt()

ResetImportedAt resets all changes to the "imported_at" field.

func (*DownloadRecordMutation) ResetIndexerName

func (m *DownloadRecordMutation) ResetIndexerName()

ResetIndexerName resets all changes to the "indexer_name" field.

func (*DownloadRecordMutation) ResetMovie

func (m *DownloadRecordMutation) ResetMovie()

ResetMovie resets all changes to the "movie" edge.

func (*DownloadRecordMutation) ResetQuality

func (m *DownloadRecordMutation) ResetQuality()

ResetQuality resets all changes to the "quality" field.

func (*DownloadRecordMutation) ResetReleaseGroup

func (m *DownloadRecordMutation) ResetReleaseGroup()

ResetReleaseGroup resets all changes to the "release_group" field.

func (*DownloadRecordMutation) ResetReplaceExisting

func (m *DownloadRecordMutation) ResetReplaceExisting()

ResetReplaceExisting resets all changes to the "replace_existing" field.

func (*DownloadRecordMutation) ResetSavePath

func (m *DownloadRecordMutation) ResetSavePath()

ResetSavePath resets all changes to the "save_path" field.

func (*DownloadRecordMutation) ResetSize

func (m *DownloadRecordMutation) ResetSize()

ResetSize resets all changes to the "size" field.

func (*DownloadRecordMutation) ResetStatus

func (m *DownloadRecordMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DownloadRecordMutation) ResetTitle

func (m *DownloadRecordMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*DownloadRecordMutation) ResetTorrentHash

func (m *DownloadRecordMutation) ResetTorrentHash()

ResetTorrentHash resets all changes to the "torrent_hash" field.

func (*DownloadRecordMutation) ResetUpdateTime

func (m *DownloadRecordMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*DownloadRecordMutation) SavePath

func (m *DownloadRecordMutation) SavePath() (r string, exists bool)

SavePath returns the value of the "save_path" field in the mutation.

func (*DownloadRecordMutation) SavePathCleared

func (m *DownloadRecordMutation) SavePathCleared() bool

SavePathCleared returns if the "save_path" field was cleared in this mutation.

func (*DownloadRecordMutation) SetCreateTime

func (m *DownloadRecordMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*DownloadRecordMutation) SetDownloadClientName

func (m *DownloadRecordMutation) SetDownloadClientName(s string)

SetDownloadClientName sets the "download_client_name" field.

func (*DownloadRecordMutation) SetEpisodeID

func (m *DownloadRecordMutation) SetEpisodeID(id uint32)

SetEpisodeID sets the "episode" edge to the Episode entity by id.

func (*DownloadRecordMutation) SetFailureReason

func (m *DownloadRecordMutation) SetFailureReason(s string)

SetFailureReason sets the "failure_reason" field.

func (*DownloadRecordMutation) SetField

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

func (m *DownloadRecordMutation) SetID(id uint32)

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

func (*DownloadRecordMutation) SetImportAttempts

func (m *DownloadRecordMutation) SetImportAttempts(u uint8)

SetImportAttempts sets the "import_attempts" field.

func (*DownloadRecordMutation) SetImportedAt

func (m *DownloadRecordMutation) SetImportedAt(t time.Time)

SetImportedAt sets the "imported_at" field.

func (*DownloadRecordMutation) SetIndexerName

func (m *DownloadRecordMutation) SetIndexerName(s string)

SetIndexerName sets the "indexer_name" field.

func (*DownloadRecordMutation) SetMovieID

func (m *DownloadRecordMutation) SetMovieID(id uint32)

SetMovieID sets the "movie" edge to the Movie entity by id.

func (*DownloadRecordMutation) SetOp

func (m *DownloadRecordMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*DownloadRecordMutation) SetQuality

func (m *DownloadRecordMutation) SetQuality(s string)

SetQuality sets the "quality" field.

func (*DownloadRecordMutation) SetReleaseGroup

func (m *DownloadRecordMutation) SetReleaseGroup(s string)

SetReleaseGroup sets the "release_group" field.

func (*DownloadRecordMutation) SetReplaceExisting

func (m *DownloadRecordMutation) SetReplaceExisting(b bool)

SetReplaceExisting sets the "replace_existing" field.

func (*DownloadRecordMutation) SetSavePath

func (m *DownloadRecordMutation) SetSavePath(s string)

SetSavePath sets the "save_path" field.

func (*DownloadRecordMutation) SetSize

func (m *DownloadRecordMutation) SetSize(i int64)

SetSize sets the "size" field.

func (*DownloadRecordMutation) SetStatus

SetStatus sets the "status" field.

func (*DownloadRecordMutation) SetTitle

func (m *DownloadRecordMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*DownloadRecordMutation) SetTorrentHash

func (m *DownloadRecordMutation) SetTorrentHash(s string)

SetTorrentHash sets the "torrent_hash" field.

func (*DownloadRecordMutation) SetUpdateTime

func (m *DownloadRecordMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*DownloadRecordMutation) Size

func (m *DownloadRecordMutation) Size() (r int64, exists bool)

Size returns the value of the "size" field in the mutation.

func (*DownloadRecordMutation) SizeCleared

func (m *DownloadRecordMutation) SizeCleared() bool

SizeCleared returns if the "size" field was cleared in this mutation.

func (*DownloadRecordMutation) Status

func (m *DownloadRecordMutation) Status() (r downloadrecord.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*DownloadRecordMutation) Title

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

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

func (*DownloadRecordMutation) TorrentHash

func (m *DownloadRecordMutation) TorrentHash() (r string, exists bool)

TorrentHash returns the value of the "torrent_hash" field in the mutation.

func (*DownloadRecordMutation) TorrentHashCleared

func (m *DownloadRecordMutation) TorrentHashCleared() bool

TorrentHashCleared returns if the "torrent_hash" field was cleared in this mutation.

func (DownloadRecordMutation) Tx

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

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

func (*DownloadRecordMutation) Type

func (m *DownloadRecordMutation) Type() string

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

func (*DownloadRecordMutation) UpdateTime

func (m *DownloadRecordMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*DownloadRecordMutation) Where

Where appends a list predicates to the DownloadRecordMutation builder.

func (*DownloadRecordMutation) WhereP

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

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

type DownloadRecordQuery

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

DownloadRecordQuery is the builder for querying DownloadRecord entities.

func (*DownloadRecordQuery) Aggregate

Aggregate returns a DownloadRecordSelect configured with the given aggregations.

func (*DownloadRecordQuery) All

All executes the query and returns a list of DownloadRecords.

func (*DownloadRecordQuery) AllX

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

func (*DownloadRecordQuery) Clone

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

func (*DownloadRecordQuery) Count

func (_q *DownloadRecordQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DownloadRecordQuery) CountX

func (_q *DownloadRecordQuery) CountX(ctx context.Context) int

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

func (*DownloadRecordQuery) Exist

func (_q *DownloadRecordQuery) Exist(ctx context.Context) (bool, error)

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

func (*DownloadRecordQuery) ExistX

func (_q *DownloadRecordQuery) ExistX(ctx context.Context) bool

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

func (*DownloadRecordQuery) First

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

func (*DownloadRecordQuery) FirstID

func (_q *DownloadRecordQuery) FirstID(ctx context.Context) (id uint32, err error)

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

func (*DownloadRecordQuery) FirstIDX

func (_q *DownloadRecordQuery) FirstIDX(ctx context.Context) uint32

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

func (*DownloadRecordQuery) FirstX

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

func (*DownloadRecordQuery) GroupBy

func (_q *DownloadRecordQuery) GroupBy(field string, fields ...string) *DownloadRecordGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.DownloadRecord.Query().
	GroupBy(downloadrecord.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DownloadRecordQuery) IDs

func (_q *DownloadRecordQuery) IDs(ctx context.Context) (ids []uint32, err error)

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

func (*DownloadRecordQuery) IDsX

func (_q *DownloadRecordQuery) IDsX(ctx context.Context) []uint32

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

func (*DownloadRecordQuery) Limit

func (_q *DownloadRecordQuery) Limit(limit int) *DownloadRecordQuery

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

func (*DownloadRecordQuery) Offset

func (_q *DownloadRecordQuery) Offset(offset int) *DownloadRecordQuery

Offset to start from.

func (*DownloadRecordQuery) Only

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

func (*DownloadRecordQuery) OnlyID

func (_q *DownloadRecordQuery) OnlyID(ctx context.Context) (id uint32, err error)

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

func (*DownloadRecordQuery) OnlyIDX

func (_q *DownloadRecordQuery) OnlyIDX(ctx context.Context) uint32

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

func (*DownloadRecordQuery) OnlyX

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

func (*DownloadRecordQuery) Order

Order specifies how the records should be ordered.

func (*DownloadRecordQuery) QueryEpisode

func (_q *DownloadRecordQuery) QueryEpisode() *EpisodeQuery

QueryEpisode chains the current query on the "episode" edge.

func (*DownloadRecordQuery) QueryMovie

func (_q *DownloadRecordQuery) QueryMovie() *MovieQuery

QueryMovie chains the current query on the "movie" edge.

func (*DownloadRecordQuery) Select

func (_q *DownloadRecordQuery) Select(fields ...string) *DownloadRecordSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.DownloadRecord.Query().
	Select(downloadrecord.FieldCreateTime).
	Scan(ctx, &v)

func (*DownloadRecordQuery) Unique

func (_q *DownloadRecordQuery) Unique(unique bool) *DownloadRecordQuery

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

Where adds a new predicate for the DownloadRecordQuery builder.

func (*DownloadRecordQuery) WithEpisode

func (_q *DownloadRecordQuery) WithEpisode(opts ...func(*EpisodeQuery)) *DownloadRecordQuery

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

func (*DownloadRecordQuery) WithMovie

func (_q *DownloadRecordQuery) WithMovie(opts ...func(*MovieQuery)) *DownloadRecordQuery

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

type DownloadRecordSelect

type DownloadRecordSelect struct {
	*DownloadRecordQuery
	// contains filtered or unexported fields
}

DownloadRecordSelect is the builder for selecting fields of DownloadRecord entities.

func (*DownloadRecordSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*DownloadRecordSelect) Bool

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

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

func (*DownloadRecordSelect) BoolX

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

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

func (*DownloadRecordSelect) Bools

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

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

func (*DownloadRecordSelect) BoolsX

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

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

func (*DownloadRecordSelect) Float64

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

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

func (*DownloadRecordSelect) Float64X

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

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

func (*DownloadRecordSelect) Float64s

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

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

func (*DownloadRecordSelect) Float64sX

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

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

func (*DownloadRecordSelect) Int

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

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

func (*DownloadRecordSelect) IntX

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

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

func (*DownloadRecordSelect) Ints

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

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

func (*DownloadRecordSelect) IntsX

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

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

func (*DownloadRecordSelect) Scan

func (_s *DownloadRecordSelect) Scan(ctx context.Context, v any) error

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

func (*DownloadRecordSelect) ScanX

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

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

func (*DownloadRecordSelect) String

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

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

func (*DownloadRecordSelect) StringX

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

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

func (*DownloadRecordSelect) Strings

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

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

func (*DownloadRecordSelect) StringsX

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

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

type DownloadRecordUpdate

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

DownloadRecordUpdate is the builder for updating DownloadRecord entities.

func (*DownloadRecordUpdate) AddImportAttempts

func (_u *DownloadRecordUpdate) AddImportAttempts(v int8) *DownloadRecordUpdate

AddImportAttempts adds value to the "import_attempts" field.

func (*DownloadRecordUpdate) AddSize

AddSize adds value to the "size" field.

func (*DownloadRecordUpdate) ClearDownloadClientName

func (_u *DownloadRecordUpdate) ClearDownloadClientName() *DownloadRecordUpdate

ClearDownloadClientName clears the value of the "download_client_name" field.

func (*DownloadRecordUpdate) ClearEpisode

func (_u *DownloadRecordUpdate) ClearEpisode() *DownloadRecordUpdate

ClearEpisode clears the "episode" edge to the Episode entity.

func (*DownloadRecordUpdate) ClearFailureReason

func (_u *DownloadRecordUpdate) ClearFailureReason() *DownloadRecordUpdate

ClearFailureReason clears the value of the "failure_reason" field.

func (*DownloadRecordUpdate) ClearImportedAt

func (_u *DownloadRecordUpdate) ClearImportedAt() *DownloadRecordUpdate

ClearImportedAt clears the value of the "imported_at" field.

func (*DownloadRecordUpdate) ClearIndexerName

func (_u *DownloadRecordUpdate) ClearIndexerName() *DownloadRecordUpdate

ClearIndexerName clears the value of the "indexer_name" field.

func (*DownloadRecordUpdate) ClearMovie

func (_u *DownloadRecordUpdate) ClearMovie() *DownloadRecordUpdate

ClearMovie clears the "movie" edge to the Movie entity.

func (*DownloadRecordUpdate) ClearQuality

func (_u *DownloadRecordUpdate) ClearQuality() *DownloadRecordUpdate

ClearQuality clears the value of the "quality" field.

func (*DownloadRecordUpdate) ClearReleaseGroup

func (_u *DownloadRecordUpdate) ClearReleaseGroup() *DownloadRecordUpdate

ClearReleaseGroup clears the value of the "release_group" field.

func (*DownloadRecordUpdate) ClearSavePath

func (_u *DownloadRecordUpdate) ClearSavePath() *DownloadRecordUpdate

ClearSavePath clears the value of the "save_path" field.

func (*DownloadRecordUpdate) ClearSize

func (_u *DownloadRecordUpdate) ClearSize() *DownloadRecordUpdate

ClearSize clears the value of the "size" field.

func (*DownloadRecordUpdate) ClearTorrentHash

func (_u *DownloadRecordUpdate) ClearTorrentHash() *DownloadRecordUpdate

ClearTorrentHash clears the value of the "torrent_hash" field.

func (*DownloadRecordUpdate) Exec

func (_u *DownloadRecordUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DownloadRecordUpdate) ExecX

func (_u *DownloadRecordUpdate) ExecX(ctx context.Context)

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

func (*DownloadRecordUpdate) Mutation

Mutation returns the DownloadRecordMutation object of the builder.

func (*DownloadRecordUpdate) Save

func (_u *DownloadRecordUpdate) Save(ctx context.Context) (int, error)

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

func (*DownloadRecordUpdate) SaveX

func (_u *DownloadRecordUpdate) SaveX(ctx context.Context) int

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

func (*DownloadRecordUpdate) SetDownloadClientName

func (_u *DownloadRecordUpdate) SetDownloadClientName(v string) *DownloadRecordUpdate

SetDownloadClientName sets the "download_client_name" field.

func (*DownloadRecordUpdate) SetEpisode

SetEpisode sets the "episode" edge to the Episode entity.

func (*DownloadRecordUpdate) SetEpisodeID

func (_u *DownloadRecordUpdate) SetEpisodeID(id uint32) *DownloadRecordUpdate

SetEpisodeID sets the "episode" edge to the Episode entity by ID.

func (*DownloadRecordUpdate) SetFailureReason

func (_u *DownloadRecordUpdate) SetFailureReason(v string) *DownloadRecordUpdate

SetFailureReason sets the "failure_reason" field.

func (*DownloadRecordUpdate) SetImportAttempts

func (_u *DownloadRecordUpdate) SetImportAttempts(v uint8) *DownloadRecordUpdate

SetImportAttempts sets the "import_attempts" field.

func (*DownloadRecordUpdate) SetImportedAt

func (_u *DownloadRecordUpdate) SetImportedAt(v time.Time) *DownloadRecordUpdate

SetImportedAt sets the "imported_at" field.

func (*DownloadRecordUpdate) SetIndexerName

func (_u *DownloadRecordUpdate) SetIndexerName(v string) *DownloadRecordUpdate

SetIndexerName sets the "indexer_name" field.

func (*DownloadRecordUpdate) SetMovie

SetMovie sets the "movie" edge to the Movie entity.

func (*DownloadRecordUpdate) SetMovieID

func (_u *DownloadRecordUpdate) SetMovieID(id uint32) *DownloadRecordUpdate

SetMovieID sets the "movie" edge to the Movie entity by ID.

func (*DownloadRecordUpdate) SetNillableDownloadClientName

func (_u *DownloadRecordUpdate) SetNillableDownloadClientName(v *string) *DownloadRecordUpdate

SetNillableDownloadClientName sets the "download_client_name" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableEpisodeID

func (_u *DownloadRecordUpdate) SetNillableEpisodeID(id *uint32) *DownloadRecordUpdate

SetNillableEpisodeID sets the "episode" edge to the Episode entity by ID if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableFailureReason

func (_u *DownloadRecordUpdate) SetNillableFailureReason(v *string) *DownloadRecordUpdate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableImportAttempts

func (_u *DownloadRecordUpdate) SetNillableImportAttempts(v *uint8) *DownloadRecordUpdate

SetNillableImportAttempts sets the "import_attempts" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableImportedAt

func (_u *DownloadRecordUpdate) SetNillableImportedAt(v *time.Time) *DownloadRecordUpdate

SetNillableImportedAt sets the "imported_at" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableIndexerName

func (_u *DownloadRecordUpdate) SetNillableIndexerName(v *string) *DownloadRecordUpdate

SetNillableIndexerName sets the "indexer_name" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableMovieID

func (_u *DownloadRecordUpdate) SetNillableMovieID(id *uint32) *DownloadRecordUpdate

SetNillableMovieID sets the "movie" edge to the Movie entity by ID if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableQuality

func (_u *DownloadRecordUpdate) SetNillableQuality(v *string) *DownloadRecordUpdate

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableReleaseGroup

func (_u *DownloadRecordUpdate) SetNillableReleaseGroup(v *string) *DownloadRecordUpdate

SetNillableReleaseGroup sets the "release_group" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableReplaceExisting

func (_u *DownloadRecordUpdate) SetNillableReplaceExisting(v *bool) *DownloadRecordUpdate

SetNillableReplaceExisting sets the "replace_existing" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableSavePath

func (_u *DownloadRecordUpdate) SetNillableSavePath(v *string) *DownloadRecordUpdate

SetNillableSavePath sets the "save_path" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableSize

func (_u *DownloadRecordUpdate) SetNillableSize(v *int64) *DownloadRecordUpdate

SetNillableSize sets the "size" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableTitle

func (_u *DownloadRecordUpdate) SetNillableTitle(v *string) *DownloadRecordUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*DownloadRecordUpdate) SetNillableTorrentHash

func (_u *DownloadRecordUpdate) SetNillableTorrentHash(v *string) *DownloadRecordUpdate

SetNillableTorrentHash sets the "torrent_hash" field if the given value is not nil.

func (*DownloadRecordUpdate) SetQuality

SetQuality sets the "quality" field.

func (*DownloadRecordUpdate) SetReleaseGroup

func (_u *DownloadRecordUpdate) SetReleaseGroup(v string) *DownloadRecordUpdate

SetReleaseGroup sets the "release_group" field.

func (*DownloadRecordUpdate) SetReplaceExisting

func (_u *DownloadRecordUpdate) SetReplaceExisting(v bool) *DownloadRecordUpdate

SetReplaceExisting sets the "replace_existing" field.

func (*DownloadRecordUpdate) SetSavePath

func (_u *DownloadRecordUpdate) SetSavePath(v string) *DownloadRecordUpdate

SetSavePath sets the "save_path" field.

func (*DownloadRecordUpdate) SetSize

SetSize sets the "size" field.

func (*DownloadRecordUpdate) SetStatus

SetStatus sets the "status" field.

func (*DownloadRecordUpdate) SetTitle

SetTitle sets the "title" field.

func (*DownloadRecordUpdate) SetTorrentHash

func (_u *DownloadRecordUpdate) SetTorrentHash(v string) *DownloadRecordUpdate

SetTorrentHash sets the "torrent_hash" field.

func (*DownloadRecordUpdate) SetUpdateTime

func (_u *DownloadRecordUpdate) SetUpdateTime(v time.Time) *DownloadRecordUpdate

SetUpdateTime sets the "update_time" field.

func (*DownloadRecordUpdate) Where

Where appends a list predicates to the DownloadRecordUpdate builder.

type DownloadRecordUpdateOne

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

DownloadRecordUpdateOne is the builder for updating a single DownloadRecord entity.

func (*DownloadRecordUpdateOne) AddImportAttempts

func (_u *DownloadRecordUpdateOne) AddImportAttempts(v int8) *DownloadRecordUpdateOne

AddImportAttempts adds value to the "import_attempts" field.

func (*DownloadRecordUpdateOne) AddSize

AddSize adds value to the "size" field.

func (*DownloadRecordUpdateOne) ClearDownloadClientName

func (_u *DownloadRecordUpdateOne) ClearDownloadClientName() *DownloadRecordUpdateOne

ClearDownloadClientName clears the value of the "download_client_name" field.

func (*DownloadRecordUpdateOne) ClearEpisode

ClearEpisode clears the "episode" edge to the Episode entity.

func (*DownloadRecordUpdateOne) ClearFailureReason

func (_u *DownloadRecordUpdateOne) ClearFailureReason() *DownloadRecordUpdateOne

ClearFailureReason clears the value of the "failure_reason" field.

func (*DownloadRecordUpdateOne) ClearImportedAt

func (_u *DownloadRecordUpdateOne) ClearImportedAt() *DownloadRecordUpdateOne

ClearImportedAt clears the value of the "imported_at" field.

func (*DownloadRecordUpdateOne) ClearIndexerName

func (_u *DownloadRecordUpdateOne) ClearIndexerName() *DownloadRecordUpdateOne

ClearIndexerName clears the value of the "indexer_name" field.

func (*DownloadRecordUpdateOne) ClearMovie

ClearMovie clears the "movie" edge to the Movie entity.

func (*DownloadRecordUpdateOne) ClearQuality

ClearQuality clears the value of the "quality" field.

func (*DownloadRecordUpdateOne) ClearReleaseGroup

func (_u *DownloadRecordUpdateOne) ClearReleaseGroup() *DownloadRecordUpdateOne

ClearReleaseGroup clears the value of the "release_group" field.

func (*DownloadRecordUpdateOne) ClearSavePath

func (_u *DownloadRecordUpdateOne) ClearSavePath() *DownloadRecordUpdateOne

ClearSavePath clears the value of the "save_path" field.

func (*DownloadRecordUpdateOne) ClearSize

ClearSize clears the value of the "size" field.

func (*DownloadRecordUpdateOne) ClearTorrentHash

func (_u *DownloadRecordUpdateOne) ClearTorrentHash() *DownloadRecordUpdateOne

ClearTorrentHash clears the value of the "torrent_hash" field.

func (*DownloadRecordUpdateOne) Exec

Exec executes the query on the entity.

func (*DownloadRecordUpdateOne) ExecX

func (_u *DownloadRecordUpdateOne) ExecX(ctx context.Context)

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

func (*DownloadRecordUpdateOne) Mutation

Mutation returns the DownloadRecordMutation object of the builder.

func (*DownloadRecordUpdateOne) Save

Save executes the query and returns the updated DownloadRecord entity.

func (*DownloadRecordUpdateOne) SaveX

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

func (*DownloadRecordUpdateOne) Select

func (_u *DownloadRecordUpdateOne) Select(field string, fields ...string) *DownloadRecordUpdateOne

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

func (*DownloadRecordUpdateOne) SetDownloadClientName

func (_u *DownloadRecordUpdateOne) SetDownloadClientName(v string) *DownloadRecordUpdateOne

SetDownloadClientName sets the "download_client_name" field.

func (*DownloadRecordUpdateOne) SetEpisode

SetEpisode sets the "episode" edge to the Episode entity.

func (*DownloadRecordUpdateOne) SetEpisodeID

SetEpisodeID sets the "episode" edge to the Episode entity by ID.

func (*DownloadRecordUpdateOne) SetFailureReason

func (_u *DownloadRecordUpdateOne) SetFailureReason(v string) *DownloadRecordUpdateOne

SetFailureReason sets the "failure_reason" field.

func (*DownloadRecordUpdateOne) SetImportAttempts

func (_u *DownloadRecordUpdateOne) SetImportAttempts(v uint8) *DownloadRecordUpdateOne

SetImportAttempts sets the "import_attempts" field.

func (*DownloadRecordUpdateOne) SetImportedAt

SetImportedAt sets the "imported_at" field.

func (*DownloadRecordUpdateOne) SetIndexerName

SetIndexerName sets the "indexer_name" field.

func (*DownloadRecordUpdateOne) SetMovie

SetMovie sets the "movie" edge to the Movie entity.

func (*DownloadRecordUpdateOne) SetMovieID

SetMovieID sets the "movie" edge to the Movie entity by ID.

func (*DownloadRecordUpdateOne) SetNillableDownloadClientName

func (_u *DownloadRecordUpdateOne) SetNillableDownloadClientName(v *string) *DownloadRecordUpdateOne

SetNillableDownloadClientName sets the "download_client_name" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableEpisodeID

func (_u *DownloadRecordUpdateOne) SetNillableEpisodeID(id *uint32) *DownloadRecordUpdateOne

SetNillableEpisodeID sets the "episode" edge to the Episode entity by ID if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableFailureReason

func (_u *DownloadRecordUpdateOne) SetNillableFailureReason(v *string) *DownloadRecordUpdateOne

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableImportAttempts

func (_u *DownloadRecordUpdateOne) SetNillableImportAttempts(v *uint8) *DownloadRecordUpdateOne

SetNillableImportAttempts sets the "import_attempts" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableImportedAt

func (_u *DownloadRecordUpdateOne) SetNillableImportedAt(v *time.Time) *DownloadRecordUpdateOne

SetNillableImportedAt sets the "imported_at" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableIndexerName

func (_u *DownloadRecordUpdateOne) SetNillableIndexerName(v *string) *DownloadRecordUpdateOne

SetNillableIndexerName sets the "indexer_name" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableMovieID

func (_u *DownloadRecordUpdateOne) SetNillableMovieID(id *uint32) *DownloadRecordUpdateOne

SetNillableMovieID sets the "movie" edge to the Movie entity by ID if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableQuality

func (_u *DownloadRecordUpdateOne) SetNillableQuality(v *string) *DownloadRecordUpdateOne

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableReleaseGroup

func (_u *DownloadRecordUpdateOne) SetNillableReleaseGroup(v *string) *DownloadRecordUpdateOne

SetNillableReleaseGroup sets the "release_group" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableReplaceExisting

func (_u *DownloadRecordUpdateOne) SetNillableReplaceExisting(v *bool) *DownloadRecordUpdateOne

SetNillableReplaceExisting sets the "replace_existing" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableSavePath

func (_u *DownloadRecordUpdateOne) SetNillableSavePath(v *string) *DownloadRecordUpdateOne

SetNillableSavePath sets the "save_path" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableSize

func (_u *DownloadRecordUpdateOne) SetNillableSize(v *int64) *DownloadRecordUpdateOne

SetNillableSize sets the "size" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableStatus

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableTitle

func (_u *DownloadRecordUpdateOne) SetNillableTitle(v *string) *DownloadRecordUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetNillableTorrentHash

func (_u *DownloadRecordUpdateOne) SetNillableTorrentHash(v *string) *DownloadRecordUpdateOne

SetNillableTorrentHash sets the "torrent_hash" field if the given value is not nil.

func (*DownloadRecordUpdateOne) SetQuality

SetQuality sets the "quality" field.

func (*DownloadRecordUpdateOne) SetReleaseGroup

func (_u *DownloadRecordUpdateOne) SetReleaseGroup(v string) *DownloadRecordUpdateOne

SetReleaseGroup sets the "release_group" field.

func (*DownloadRecordUpdateOne) SetReplaceExisting

func (_u *DownloadRecordUpdateOne) SetReplaceExisting(v bool) *DownloadRecordUpdateOne

SetReplaceExisting sets the "replace_existing" field.

func (*DownloadRecordUpdateOne) SetSavePath

SetSavePath sets the "save_path" field.

func (*DownloadRecordUpdateOne) SetSize

SetSize sets the "size" field.

func (*DownloadRecordUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*DownloadRecordUpdateOne) SetTitle

SetTitle sets the "title" field.

func (*DownloadRecordUpdateOne) SetTorrentHash

SetTorrentHash sets the "torrent_hash" field.

func (*DownloadRecordUpdateOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*DownloadRecordUpdateOne) Where

Where appends a list predicates to the DownloadRecordUpdate builder.

type DownloadRecords

type DownloadRecords []*DownloadRecord

DownloadRecords is a parsable slice of DownloadRecord.

type Episode

type Episode struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Number holds the value of the "number" field.
	Number uint16 `json:"number,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// AirDate holds the value of the "air_date" field.
	AirDate time.Time `json:"air_date,omitempty"`
	// Monitored holds the value of the "monitored" field.
	Monitored bool `json:"monitored,omitempty"`
	// AbsoluteNumber holds the value of the "absolute_number" field.
	AbsoluteNumber uint16 `json:"absolute_number,omitempty"`
	// GrabFailures holds the value of the "grab_failures" field.
	GrabFailures uint8 `json:"grab_failures,omitempty"`
	// LastSearchAt holds the value of the "last_search_at" field.
	LastSearchAt *time.Time `json:"last_search_at,omitempty"`
	// Status holds the value of the "status" field.
	Status episode.Status `json:"status,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EpisodeQuery when eager-loading is set.
	Edges EpisodeEdges `json:"edges"`
	// contains filtered or unexported fields
}

Episode is the model entity for the Episode schema.

func (*Episode) QueryDownloadRecords

func (_m *Episode) QueryDownloadRecords() *DownloadRecordQuery

QueryDownloadRecords queries the "download_records" edge of the Episode entity.

func (*Episode) QueryMediaFiles

func (_m *Episode) QueryMediaFiles() *MediaFileQuery

QueryMediaFiles queries the "media_files" edge of the Episode entity.

func (*Episode) QuerySeason

func (_m *Episode) QuerySeason() *SeasonQuery

QuerySeason queries the "season" edge of the Episode entity.

func (*Episode) String

func (_m *Episode) String() string

String implements the fmt.Stringer.

func (*Episode) Unwrap

func (_m *Episode) Unwrap() *Episode

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

func (_m *Episode) Update() *EpisodeUpdateOne

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

func (*Episode) Value

func (_m *Episode) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Episode. This includes values selected through modifiers, order, etc.

type EpisodeClient

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

EpisodeClient is a client for the Episode schema.

func NewEpisodeClient

func NewEpisodeClient(c config) *EpisodeClient

NewEpisodeClient returns a client for the Episode from the given config.

func (*EpisodeClient) Create

func (c *EpisodeClient) Create() *EpisodeCreate

Create returns a builder for creating a Episode entity.

func (*EpisodeClient) CreateBulk

func (c *EpisodeClient) CreateBulk(builders ...*EpisodeCreate) *EpisodeCreateBulk

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

func (*EpisodeClient) Delete

func (c *EpisodeClient) Delete() *EpisodeDelete

Delete returns a delete builder for Episode.

func (*EpisodeClient) DeleteOne

func (c *EpisodeClient) DeleteOne(_m *Episode) *EpisodeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*EpisodeClient) DeleteOneID

func (c *EpisodeClient) DeleteOneID(id uint32) *EpisodeDeleteOne

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

func (*EpisodeClient) Get

func (c *EpisodeClient) Get(ctx context.Context, id uint32) (*Episode, error)

Get returns a Episode entity by its id.

func (*EpisodeClient) GetX

func (c *EpisodeClient) GetX(ctx context.Context, id uint32) *Episode

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

func (*EpisodeClient) Hooks

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

Hooks returns the client hooks.

func (*EpisodeClient) Intercept

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

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

func (*EpisodeClient) Interceptors

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

Interceptors returns the client interceptors.

func (*EpisodeClient) MapCreateBulk

func (c *EpisodeClient) MapCreateBulk(slice any, setFunc func(*EpisodeCreate, int)) *EpisodeCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*EpisodeClient) Query

func (c *EpisodeClient) Query() *EpisodeQuery

Query returns a query builder for Episode.

func (*EpisodeClient) QueryDownloadRecords

func (c *EpisodeClient) QueryDownloadRecords(_m *Episode) *DownloadRecordQuery

QueryDownloadRecords queries the download_records edge of a Episode.

func (*EpisodeClient) QueryMediaFiles

func (c *EpisodeClient) QueryMediaFiles(_m *Episode) *MediaFileQuery

QueryMediaFiles queries the media_files edge of a Episode.

func (*EpisodeClient) QuerySeason

func (c *EpisodeClient) QuerySeason(_m *Episode) *SeasonQuery

QuerySeason queries the season edge of a Episode.

func (*EpisodeClient) Update

func (c *EpisodeClient) Update() *EpisodeUpdate

Update returns an update builder for Episode.

func (*EpisodeClient) UpdateOne

func (c *EpisodeClient) UpdateOne(_m *Episode) *EpisodeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EpisodeClient) UpdateOneID

func (c *EpisodeClient) UpdateOneID(id uint32) *EpisodeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EpisodeClient) Use

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

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

type EpisodeCreate

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

EpisodeCreate is the builder for creating a Episode entity.

func (*EpisodeCreate) AddDownloadRecordIDs

func (_c *EpisodeCreate) AddDownloadRecordIDs(ids ...uint32) *EpisodeCreate

AddDownloadRecordIDs adds the "download_records" edge to the DownloadRecord entity by IDs.

func (*EpisodeCreate) AddDownloadRecords

func (_c *EpisodeCreate) AddDownloadRecords(v ...*DownloadRecord) *EpisodeCreate

AddDownloadRecords adds the "download_records" edges to the DownloadRecord entity.

func (*EpisodeCreate) AddMediaFileIDs

func (_c *EpisodeCreate) AddMediaFileIDs(ids ...uint32) *EpisodeCreate

AddMediaFileIDs adds the "media_files" edge to the MediaFile entity by IDs.

func (*EpisodeCreate) AddMediaFiles

func (_c *EpisodeCreate) AddMediaFiles(v ...*MediaFile) *EpisodeCreate

AddMediaFiles adds the "media_files" edges to the MediaFile entity.

func (*EpisodeCreate) Exec

func (_c *EpisodeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EpisodeCreate) ExecX

func (_c *EpisodeCreate) ExecX(ctx context.Context)

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

func (*EpisodeCreate) Mutation

func (_c *EpisodeCreate) Mutation() *EpisodeMutation

Mutation returns the EpisodeMutation object of the builder.

func (*EpisodeCreate) Save

func (_c *EpisodeCreate) Save(ctx context.Context) (*Episode, error)

Save creates the Episode in the database.

func (*EpisodeCreate) SaveX

func (_c *EpisodeCreate) SaveX(ctx context.Context) *Episode

SaveX calls Save and panics if Save returns an error.

func (*EpisodeCreate) SetAbsoluteNumber

func (_c *EpisodeCreate) SetAbsoluteNumber(v uint16) *EpisodeCreate

SetAbsoluteNumber sets the "absolute_number" field.

func (*EpisodeCreate) SetAirDate

func (_c *EpisodeCreate) SetAirDate(v time.Time) *EpisodeCreate

SetAirDate sets the "air_date" field.

func (*EpisodeCreate) SetCreateTime

func (_c *EpisodeCreate) SetCreateTime(v time.Time) *EpisodeCreate

SetCreateTime sets the "create_time" field.

func (*EpisodeCreate) SetGrabFailures

func (_c *EpisodeCreate) SetGrabFailures(v uint8) *EpisodeCreate

SetGrabFailures sets the "grab_failures" field.

func (*EpisodeCreate) SetID

func (_c *EpisodeCreate) SetID(v uint32) *EpisodeCreate

SetID sets the "id" field.

func (*EpisodeCreate) SetLastSearchAt

func (_c *EpisodeCreate) SetLastSearchAt(v time.Time) *EpisodeCreate

SetLastSearchAt sets the "last_search_at" field.

func (*EpisodeCreate) SetMonitored

func (_c *EpisodeCreate) SetMonitored(v bool) *EpisodeCreate

SetMonitored sets the "monitored" field.

func (*EpisodeCreate) SetNillableAbsoluteNumber

func (_c *EpisodeCreate) SetNillableAbsoluteNumber(v *uint16) *EpisodeCreate

SetNillableAbsoluteNumber sets the "absolute_number" field if the given value is not nil.

func (*EpisodeCreate) SetNillableAirDate

func (_c *EpisodeCreate) SetNillableAirDate(v *time.Time) *EpisodeCreate

SetNillableAirDate sets the "air_date" field if the given value is not nil.

func (*EpisodeCreate) SetNillableCreateTime

func (_c *EpisodeCreate) SetNillableCreateTime(v *time.Time) *EpisodeCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*EpisodeCreate) SetNillableGrabFailures

func (_c *EpisodeCreate) SetNillableGrabFailures(v *uint8) *EpisodeCreate

SetNillableGrabFailures sets the "grab_failures" field if the given value is not nil.

func (*EpisodeCreate) SetNillableLastSearchAt

func (_c *EpisodeCreate) SetNillableLastSearchAt(v *time.Time) *EpisodeCreate

SetNillableLastSearchAt sets the "last_search_at" field if the given value is not nil.

func (*EpisodeCreate) SetNillableMonitored

func (_c *EpisodeCreate) SetNillableMonitored(v *bool) *EpisodeCreate

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*EpisodeCreate) SetNillableStatus

func (_c *EpisodeCreate) SetNillableStatus(v *episode.Status) *EpisodeCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*EpisodeCreate) SetNillableTitle

func (_c *EpisodeCreate) SetNillableTitle(v *string) *EpisodeCreate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*EpisodeCreate) SetNillableUpdateTime

func (_c *EpisodeCreate) SetNillableUpdateTime(v *time.Time) *EpisodeCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*EpisodeCreate) SetNumber

func (_c *EpisodeCreate) SetNumber(v uint16) *EpisodeCreate

SetNumber sets the "number" field.

func (*EpisodeCreate) SetSeason

func (_c *EpisodeCreate) SetSeason(v *Season) *EpisodeCreate

SetSeason sets the "season" edge to the Season entity.

func (*EpisodeCreate) SetSeasonID

func (_c *EpisodeCreate) SetSeasonID(id uint32) *EpisodeCreate

SetSeasonID sets the "season" edge to the Season entity by ID.

func (*EpisodeCreate) SetStatus

func (_c *EpisodeCreate) SetStatus(v episode.Status) *EpisodeCreate

SetStatus sets the "status" field.

func (*EpisodeCreate) SetTitle

func (_c *EpisodeCreate) SetTitle(v string) *EpisodeCreate

SetTitle sets the "title" field.

func (*EpisodeCreate) SetUpdateTime

func (_c *EpisodeCreate) SetUpdateTime(v time.Time) *EpisodeCreate

SetUpdateTime sets the "update_time" field.

type EpisodeCreateBulk

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

EpisodeCreateBulk is the builder for creating many Episode entities in bulk.

func (*EpisodeCreateBulk) Exec

func (_c *EpisodeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EpisodeCreateBulk) ExecX

func (_c *EpisodeCreateBulk) ExecX(ctx context.Context)

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

func (*EpisodeCreateBulk) Save

func (_c *EpisodeCreateBulk) Save(ctx context.Context) ([]*Episode, error)

Save creates the Episode entities in the database.

func (*EpisodeCreateBulk) SaveX

func (_c *EpisodeCreateBulk) SaveX(ctx context.Context) []*Episode

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

type EpisodeDelete

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

EpisodeDelete is the builder for deleting a Episode entity.

func (*EpisodeDelete) Exec

func (_d *EpisodeDelete) Exec(ctx context.Context) (int, error)

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

func (*EpisodeDelete) ExecX

func (_d *EpisodeDelete) ExecX(ctx context.Context) int

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

func (*EpisodeDelete) Where

func (_d *EpisodeDelete) Where(ps ...predicate.Episode) *EpisodeDelete

Where appends a list predicates to the EpisodeDelete builder.

type EpisodeDeleteOne

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

EpisodeDeleteOne is the builder for deleting a single Episode entity.

func (*EpisodeDeleteOne) Exec

func (_d *EpisodeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EpisodeDeleteOne) ExecX

func (_d *EpisodeDeleteOne) ExecX(ctx context.Context)

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

func (*EpisodeDeleteOne) Where

Where appends a list predicates to the EpisodeDelete builder.

type EpisodeEdges

type EpisodeEdges struct {
	// Season holds the value of the season edge.
	Season *Season `json:"season,omitempty"`
	// DownloadRecords holds the value of the download_records edge.
	DownloadRecords []*DownloadRecord `json:"download_records,omitempty"`
	// MediaFiles holds the value of the media_files edge.
	MediaFiles []*MediaFile `json:"media_files,omitempty"`
	// contains filtered or unexported fields
}

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

func (EpisodeEdges) DownloadRecordsOrErr

func (e EpisodeEdges) DownloadRecordsOrErr() ([]*DownloadRecord, error)

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

func (EpisodeEdges) MediaFilesOrErr

func (e EpisodeEdges) MediaFilesOrErr() ([]*MediaFile, error)

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

func (EpisodeEdges) SeasonOrErr

func (e EpisodeEdges) SeasonOrErr() (*Season, error)

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

type EpisodeGroupBy

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

EpisodeGroupBy is the group-by builder for Episode entities.

func (*EpisodeGroupBy) Aggregate

func (_g *EpisodeGroupBy) Aggregate(fns ...AggregateFunc) *EpisodeGroupBy

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

func (*EpisodeGroupBy) Bool

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

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

func (*EpisodeGroupBy) BoolX

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

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

func (*EpisodeGroupBy) Bools

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

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

func (*EpisodeGroupBy) BoolsX

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

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

func (*EpisodeGroupBy) Float64

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

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

func (*EpisodeGroupBy) Float64X

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

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

func (*EpisodeGroupBy) Float64s

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

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

func (*EpisodeGroupBy) Float64sX

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

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

func (*EpisodeGroupBy) Int

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

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

func (*EpisodeGroupBy) IntX

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

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

func (*EpisodeGroupBy) Ints

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

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

func (*EpisodeGroupBy) IntsX

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

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

func (*EpisodeGroupBy) Scan

func (_g *EpisodeGroupBy) Scan(ctx context.Context, v any) error

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

func (*EpisodeGroupBy) ScanX

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

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

func (*EpisodeGroupBy) String

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

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

func (*EpisodeGroupBy) StringX

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

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

func (*EpisodeGroupBy) Strings

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

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

func (*EpisodeGroupBy) StringsX

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

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

type EpisodeMutation

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

EpisodeMutation represents an operation that mutates the Episode nodes in the graph.

func (*EpisodeMutation) AbsoluteNumber

func (m *EpisodeMutation) AbsoluteNumber() (r uint16, exists bool)

AbsoluteNumber returns the value of the "absolute_number" field in the mutation.

func (*EpisodeMutation) AbsoluteNumberCleared

func (m *EpisodeMutation) AbsoluteNumberCleared() bool

AbsoluteNumberCleared returns if the "absolute_number" field was cleared in this mutation.

func (*EpisodeMutation) AddAbsoluteNumber

func (m *EpisodeMutation) AddAbsoluteNumber(u int16)

AddAbsoluteNumber adds u to the "absolute_number" field.

func (*EpisodeMutation) AddDownloadRecordIDs

func (m *EpisodeMutation) AddDownloadRecordIDs(ids ...uint32)

AddDownloadRecordIDs adds the "download_records" edge to the DownloadRecord entity by ids.

func (*EpisodeMutation) AddField

func (m *EpisodeMutation) 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 (*EpisodeMutation) AddGrabFailures

func (m *EpisodeMutation) AddGrabFailures(u int8)

AddGrabFailures adds u to the "grab_failures" field.

func (*EpisodeMutation) AddMediaFileIDs

func (m *EpisodeMutation) AddMediaFileIDs(ids ...uint32)

AddMediaFileIDs adds the "media_files" edge to the MediaFile entity by ids.

func (*EpisodeMutation) AddNumber

func (m *EpisodeMutation) AddNumber(u int16)

AddNumber adds u to the "number" field.

func (*EpisodeMutation) AddedAbsoluteNumber

func (m *EpisodeMutation) AddedAbsoluteNumber() (r int16, exists bool)

AddedAbsoluteNumber returns the value that was added to the "absolute_number" field in this mutation.

func (*EpisodeMutation) AddedEdges

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

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

func (*EpisodeMutation) AddedField

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

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

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

func (*EpisodeMutation) AddedGrabFailures

func (m *EpisodeMutation) AddedGrabFailures() (r int8, exists bool)

AddedGrabFailures returns the value that was added to the "grab_failures" field in this mutation.

func (*EpisodeMutation) AddedIDs

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

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

func (*EpisodeMutation) AddedNumber

func (m *EpisodeMutation) AddedNumber() (r int16, exists bool)

AddedNumber returns the value that was added to the "number" field in this mutation.

func (*EpisodeMutation) AirDate

func (m *EpisodeMutation) AirDate() (r time.Time, exists bool)

AirDate returns the value of the "air_date" field in the mutation.

func (*EpisodeMutation) AirDateCleared

func (m *EpisodeMutation) AirDateCleared() bool

AirDateCleared returns if the "air_date" field was cleared in this mutation.

func (*EpisodeMutation) ClearAbsoluteNumber

func (m *EpisodeMutation) ClearAbsoluteNumber()

ClearAbsoluteNumber clears the value of the "absolute_number" field.

func (*EpisodeMutation) ClearAirDate

func (m *EpisodeMutation) ClearAirDate()

ClearAirDate clears the value of the "air_date" field.

func (*EpisodeMutation) ClearDownloadRecords

func (m *EpisodeMutation) ClearDownloadRecords()

ClearDownloadRecords clears the "download_records" edge to the DownloadRecord entity.

func (*EpisodeMutation) ClearEdge

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

func (m *EpisodeMutation) 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 (*EpisodeMutation) ClearLastSearchAt

func (m *EpisodeMutation) ClearLastSearchAt()

ClearLastSearchAt clears the value of the "last_search_at" field.

func (*EpisodeMutation) ClearMediaFiles

func (m *EpisodeMutation) ClearMediaFiles()

ClearMediaFiles clears the "media_files" edge to the MediaFile entity.

func (*EpisodeMutation) ClearSeason

func (m *EpisodeMutation) ClearSeason()

ClearSeason clears the "season" edge to the Season entity.

func (*EpisodeMutation) ClearTitle

func (m *EpisodeMutation) ClearTitle()

ClearTitle clears the value of the "title" field.

func (*EpisodeMutation) ClearedEdges

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

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

func (*EpisodeMutation) ClearedFields

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

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

func (EpisodeMutation) Client

func (m EpisodeMutation) 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 (*EpisodeMutation) CreateTime

func (m *EpisodeMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*EpisodeMutation) DownloadRecordsCleared

func (m *EpisodeMutation) DownloadRecordsCleared() bool

DownloadRecordsCleared reports if the "download_records" edge to the DownloadRecord entity was cleared.

func (*EpisodeMutation) DownloadRecordsIDs

func (m *EpisodeMutation) DownloadRecordsIDs() (ids []uint32)

DownloadRecordsIDs returns the "download_records" edge IDs in the mutation.

func (*EpisodeMutation) EdgeCleared

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

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

func (*EpisodeMutation) Field

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

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

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

func (*EpisodeMutation) Fields

func (m *EpisodeMutation) 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 (*EpisodeMutation) GrabFailures

func (m *EpisodeMutation) GrabFailures() (r uint8, exists bool)

GrabFailures returns the value of the "grab_failures" field in the mutation.

func (*EpisodeMutation) ID

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

func (m *EpisodeMutation) IDs(ctx context.Context) ([]uint32, 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 (*EpisodeMutation) LastSearchAt

func (m *EpisodeMutation) LastSearchAt() (r time.Time, exists bool)

LastSearchAt returns the value of the "last_search_at" field in the mutation.

func (*EpisodeMutation) LastSearchAtCleared

func (m *EpisodeMutation) LastSearchAtCleared() bool

LastSearchAtCleared returns if the "last_search_at" field was cleared in this mutation.

func (*EpisodeMutation) MediaFilesCleared

func (m *EpisodeMutation) MediaFilesCleared() bool

MediaFilesCleared reports if the "media_files" edge to the MediaFile entity was cleared.

func (*EpisodeMutation) MediaFilesIDs

func (m *EpisodeMutation) MediaFilesIDs() (ids []uint32)

MediaFilesIDs returns the "media_files" edge IDs in the mutation.

func (*EpisodeMutation) Monitored

func (m *EpisodeMutation) Monitored() (r bool, exists bool)

Monitored returns the value of the "monitored" field in the mutation.

func (*EpisodeMutation) Number

func (m *EpisodeMutation) Number() (r uint16, exists bool)

Number returns the value of the "number" field in the mutation.

func (*EpisodeMutation) OldAbsoluteNumber

func (m *EpisodeMutation) OldAbsoluteNumber(ctx context.Context) (v uint16, err error)

OldAbsoluteNumber returns the old "absolute_number" field's value of the Episode entity. If the Episode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EpisodeMutation) OldAirDate

func (m *EpisodeMutation) OldAirDate(ctx context.Context) (v time.Time, err error)

OldAirDate returns the old "air_date" field's value of the Episode entity. If the Episode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EpisodeMutation) OldCreateTime

func (m *EpisodeMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Episode entity. If the Episode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EpisodeMutation) OldField

func (m *EpisodeMutation) 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 (*EpisodeMutation) OldGrabFailures

func (m *EpisodeMutation) OldGrabFailures(ctx context.Context) (v uint8, err error)

OldGrabFailures returns the old "grab_failures" field's value of the Episode entity. If the Episode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EpisodeMutation) OldLastSearchAt

func (m *EpisodeMutation) OldLastSearchAt(ctx context.Context) (v *time.Time, err error)

OldLastSearchAt returns the old "last_search_at" field's value of the Episode entity. If the Episode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EpisodeMutation) OldMonitored

func (m *EpisodeMutation) OldMonitored(ctx context.Context) (v bool, err error)

OldMonitored returns the old "monitored" field's value of the Episode entity. If the Episode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EpisodeMutation) OldNumber

func (m *EpisodeMutation) OldNumber(ctx context.Context) (v uint16, err error)

OldNumber returns the old "number" field's value of the Episode entity. If the Episode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EpisodeMutation) OldStatus

func (m *EpisodeMutation) OldStatus(ctx context.Context) (v episode.Status, err error)

OldStatus returns the old "status" field's value of the Episode entity. If the Episode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EpisodeMutation) OldTitle

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

OldTitle returns the old "title" field's value of the Episode entity. If the Episode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EpisodeMutation) OldUpdateTime

func (m *EpisodeMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Episode entity. If the Episode object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EpisodeMutation) Op

func (m *EpisodeMutation) Op() Op

Op returns the operation name.

func (*EpisodeMutation) RemoveDownloadRecordIDs

func (m *EpisodeMutation) RemoveDownloadRecordIDs(ids ...uint32)

RemoveDownloadRecordIDs removes the "download_records" edge to the DownloadRecord entity by IDs.

func (*EpisodeMutation) RemoveMediaFileIDs

func (m *EpisodeMutation) RemoveMediaFileIDs(ids ...uint32)

RemoveMediaFileIDs removes the "media_files" edge to the MediaFile entity by IDs.

func (*EpisodeMutation) RemovedDownloadRecordsIDs

func (m *EpisodeMutation) RemovedDownloadRecordsIDs() (ids []uint32)

RemovedDownloadRecords returns the removed IDs of the "download_records" edge to the DownloadRecord entity.

func (*EpisodeMutation) RemovedEdges

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

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

func (*EpisodeMutation) RemovedIDs

func (m *EpisodeMutation) 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 (*EpisodeMutation) RemovedMediaFilesIDs

func (m *EpisodeMutation) RemovedMediaFilesIDs() (ids []uint32)

RemovedMediaFiles returns the removed IDs of the "media_files" edge to the MediaFile entity.

func (*EpisodeMutation) ResetAbsoluteNumber

func (m *EpisodeMutation) ResetAbsoluteNumber()

ResetAbsoluteNumber resets all changes to the "absolute_number" field.

func (*EpisodeMutation) ResetAirDate

func (m *EpisodeMutation) ResetAirDate()

ResetAirDate resets all changes to the "air_date" field.

func (*EpisodeMutation) ResetCreateTime

func (m *EpisodeMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*EpisodeMutation) ResetDownloadRecords

func (m *EpisodeMutation) ResetDownloadRecords()

ResetDownloadRecords resets all changes to the "download_records" edge.

func (*EpisodeMutation) ResetEdge

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

func (m *EpisodeMutation) 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 (*EpisodeMutation) ResetGrabFailures

func (m *EpisodeMutation) ResetGrabFailures()

ResetGrabFailures resets all changes to the "grab_failures" field.

func (*EpisodeMutation) ResetLastSearchAt

func (m *EpisodeMutation) ResetLastSearchAt()

ResetLastSearchAt resets all changes to the "last_search_at" field.

func (*EpisodeMutation) ResetMediaFiles

func (m *EpisodeMutation) ResetMediaFiles()

ResetMediaFiles resets all changes to the "media_files" edge.

func (*EpisodeMutation) ResetMonitored

func (m *EpisodeMutation) ResetMonitored()

ResetMonitored resets all changes to the "monitored" field.

func (*EpisodeMutation) ResetNumber

func (m *EpisodeMutation) ResetNumber()

ResetNumber resets all changes to the "number" field.

func (*EpisodeMutation) ResetSeason

func (m *EpisodeMutation) ResetSeason()

ResetSeason resets all changes to the "season" edge.

func (*EpisodeMutation) ResetStatus

func (m *EpisodeMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*EpisodeMutation) ResetTitle

func (m *EpisodeMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*EpisodeMutation) ResetUpdateTime

func (m *EpisodeMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*EpisodeMutation) SeasonCleared

func (m *EpisodeMutation) SeasonCleared() bool

SeasonCleared reports if the "season" edge to the Season entity was cleared.

func (*EpisodeMutation) SeasonID

func (m *EpisodeMutation) SeasonID() (id uint32, exists bool)

SeasonID returns the "season" edge ID in the mutation.

func (*EpisodeMutation) SeasonIDs

func (m *EpisodeMutation) SeasonIDs() (ids []uint32)

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

func (*EpisodeMutation) SetAbsoluteNumber

func (m *EpisodeMutation) SetAbsoluteNumber(u uint16)

SetAbsoluteNumber sets the "absolute_number" field.

func (*EpisodeMutation) SetAirDate

func (m *EpisodeMutation) SetAirDate(t time.Time)

SetAirDate sets the "air_date" field.

func (*EpisodeMutation) SetCreateTime

func (m *EpisodeMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*EpisodeMutation) SetField

func (m *EpisodeMutation) 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 (*EpisodeMutation) SetGrabFailures

func (m *EpisodeMutation) SetGrabFailures(u uint8)

SetGrabFailures sets the "grab_failures" field.

func (*EpisodeMutation) SetID

func (m *EpisodeMutation) SetID(id uint32)

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

func (*EpisodeMutation) SetLastSearchAt

func (m *EpisodeMutation) SetLastSearchAt(t time.Time)

SetLastSearchAt sets the "last_search_at" field.

func (*EpisodeMutation) SetMonitored

func (m *EpisodeMutation) SetMonitored(b bool)

SetMonitored sets the "monitored" field.

func (*EpisodeMutation) SetNumber

func (m *EpisodeMutation) SetNumber(u uint16)

SetNumber sets the "number" field.

func (*EpisodeMutation) SetOp

func (m *EpisodeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*EpisodeMutation) SetSeasonID

func (m *EpisodeMutation) SetSeasonID(id uint32)

SetSeasonID sets the "season" edge to the Season entity by id.

func (*EpisodeMutation) SetStatus

func (m *EpisodeMutation) SetStatus(e episode.Status)

SetStatus sets the "status" field.

func (*EpisodeMutation) SetTitle

func (m *EpisodeMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*EpisodeMutation) SetUpdateTime

func (m *EpisodeMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*EpisodeMutation) Status

func (m *EpisodeMutation) Status() (r episode.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*EpisodeMutation) Title

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

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

func (*EpisodeMutation) TitleCleared

func (m *EpisodeMutation) TitleCleared() bool

TitleCleared returns if the "title" field was cleared in this mutation.

func (EpisodeMutation) Tx

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

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

func (*EpisodeMutation) Type

func (m *EpisodeMutation) Type() string

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

func (*EpisodeMutation) UpdateTime

func (m *EpisodeMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*EpisodeMutation) Where

func (m *EpisodeMutation) Where(ps ...predicate.Episode)

Where appends a list predicates to the EpisodeMutation builder.

func (*EpisodeMutation) WhereP

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

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

type EpisodeQuery

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

EpisodeQuery is the builder for querying Episode entities.

func (*EpisodeQuery) Aggregate

func (_q *EpisodeQuery) Aggregate(fns ...AggregateFunc) *EpisodeSelect

Aggregate returns a EpisodeSelect configured with the given aggregations.

func (*EpisodeQuery) All

func (_q *EpisodeQuery) All(ctx context.Context) ([]*Episode, error)

All executes the query and returns a list of Episodes.

func (*EpisodeQuery) AllX

func (_q *EpisodeQuery) AllX(ctx context.Context) []*Episode

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

func (*EpisodeQuery) Clone

func (_q *EpisodeQuery) Clone() *EpisodeQuery

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

func (*EpisodeQuery) Count

func (_q *EpisodeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EpisodeQuery) CountX

func (_q *EpisodeQuery) CountX(ctx context.Context) int

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

func (*EpisodeQuery) Exist

func (_q *EpisodeQuery) Exist(ctx context.Context) (bool, error)

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

func (*EpisodeQuery) ExistX

func (_q *EpisodeQuery) ExistX(ctx context.Context) bool

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

func (*EpisodeQuery) First

func (_q *EpisodeQuery) First(ctx context.Context) (*Episode, error)

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

func (*EpisodeQuery) FirstID

func (_q *EpisodeQuery) FirstID(ctx context.Context) (id uint32, err error)

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

func (*EpisodeQuery) FirstIDX

func (_q *EpisodeQuery) FirstIDX(ctx context.Context) uint32

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

func (*EpisodeQuery) FirstX

func (_q *EpisodeQuery) FirstX(ctx context.Context) *Episode

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

func (*EpisodeQuery) GroupBy

func (_q *EpisodeQuery) GroupBy(field string, fields ...string) *EpisodeGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Episode.Query().
	GroupBy(episode.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EpisodeQuery) IDs

func (_q *EpisodeQuery) IDs(ctx context.Context) (ids []uint32, err error)

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

func (*EpisodeQuery) IDsX

func (_q *EpisodeQuery) IDsX(ctx context.Context) []uint32

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

func (*EpisodeQuery) Limit

func (_q *EpisodeQuery) Limit(limit int) *EpisodeQuery

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

func (*EpisodeQuery) Offset

func (_q *EpisodeQuery) Offset(offset int) *EpisodeQuery

Offset to start from.

func (*EpisodeQuery) Only

func (_q *EpisodeQuery) Only(ctx context.Context) (*Episode, error)

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

func (*EpisodeQuery) OnlyID

func (_q *EpisodeQuery) OnlyID(ctx context.Context) (id uint32, err error)

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

func (*EpisodeQuery) OnlyIDX

func (_q *EpisodeQuery) OnlyIDX(ctx context.Context) uint32

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

func (*EpisodeQuery) OnlyX

func (_q *EpisodeQuery) OnlyX(ctx context.Context) *Episode

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

func (*EpisodeQuery) Order

func (_q *EpisodeQuery) Order(o ...episode.OrderOption) *EpisodeQuery

Order specifies how the records should be ordered.

func (*EpisodeQuery) QueryDownloadRecords

func (_q *EpisodeQuery) QueryDownloadRecords() *DownloadRecordQuery

QueryDownloadRecords chains the current query on the "download_records" edge.

func (*EpisodeQuery) QueryMediaFiles

func (_q *EpisodeQuery) QueryMediaFiles() *MediaFileQuery

QueryMediaFiles chains the current query on the "media_files" edge.

func (*EpisodeQuery) QuerySeason

func (_q *EpisodeQuery) QuerySeason() *SeasonQuery

QuerySeason chains the current query on the "season" edge.

func (*EpisodeQuery) Select

func (_q *EpisodeQuery) Select(fields ...string) *EpisodeSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Episode.Query().
	Select(episode.FieldCreateTime).
	Scan(ctx, &v)

func (*EpisodeQuery) Unique

func (_q *EpisodeQuery) Unique(unique bool) *EpisodeQuery

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

func (_q *EpisodeQuery) Where(ps ...predicate.Episode) *EpisodeQuery

Where adds a new predicate for the EpisodeQuery builder.

func (*EpisodeQuery) WithDownloadRecords

func (_q *EpisodeQuery) WithDownloadRecords(opts ...func(*DownloadRecordQuery)) *EpisodeQuery

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

func (*EpisodeQuery) WithMediaFiles

func (_q *EpisodeQuery) WithMediaFiles(opts ...func(*MediaFileQuery)) *EpisodeQuery

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

func (*EpisodeQuery) WithSeason

func (_q *EpisodeQuery) WithSeason(opts ...func(*SeasonQuery)) *EpisodeQuery

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

type EpisodeSelect

type EpisodeSelect struct {
	*EpisodeQuery
	// contains filtered or unexported fields
}

EpisodeSelect is the builder for selecting fields of Episode entities.

func (*EpisodeSelect) Aggregate

func (_s *EpisodeSelect) Aggregate(fns ...AggregateFunc) *EpisodeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*EpisodeSelect) Bool

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

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

func (*EpisodeSelect) BoolX

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

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

func (*EpisodeSelect) Bools

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

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

func (*EpisodeSelect) BoolsX

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

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

func (*EpisodeSelect) Float64

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

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

func (*EpisodeSelect) Float64X

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

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

func (*EpisodeSelect) Float64s

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

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

func (*EpisodeSelect) Float64sX

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

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

func (*EpisodeSelect) Int

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

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

func (*EpisodeSelect) IntX

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

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

func (*EpisodeSelect) Ints

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

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

func (*EpisodeSelect) IntsX

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

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

func (*EpisodeSelect) Scan

func (_s *EpisodeSelect) Scan(ctx context.Context, v any) error

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

func (*EpisodeSelect) ScanX

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

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

func (*EpisodeSelect) String

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

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

func (*EpisodeSelect) StringX

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

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

func (*EpisodeSelect) Strings

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

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

func (*EpisodeSelect) StringsX

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

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

type EpisodeUpdate

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

EpisodeUpdate is the builder for updating Episode entities.

func (*EpisodeUpdate) AddAbsoluteNumber

func (_u *EpisodeUpdate) AddAbsoluteNumber(v int16) *EpisodeUpdate

AddAbsoluteNumber adds value to the "absolute_number" field.

func (*EpisodeUpdate) AddDownloadRecordIDs

func (_u *EpisodeUpdate) AddDownloadRecordIDs(ids ...uint32) *EpisodeUpdate

AddDownloadRecordIDs adds the "download_records" edge to the DownloadRecord entity by IDs.

func (*EpisodeUpdate) AddDownloadRecords

func (_u *EpisodeUpdate) AddDownloadRecords(v ...*DownloadRecord) *EpisodeUpdate

AddDownloadRecords adds the "download_records" edges to the DownloadRecord entity.

func (*EpisodeUpdate) AddGrabFailures

func (_u *EpisodeUpdate) AddGrabFailures(v int8) *EpisodeUpdate

AddGrabFailures adds value to the "grab_failures" field.

func (*EpisodeUpdate) AddMediaFileIDs

func (_u *EpisodeUpdate) AddMediaFileIDs(ids ...uint32) *EpisodeUpdate

AddMediaFileIDs adds the "media_files" edge to the MediaFile entity by IDs.

func (*EpisodeUpdate) AddMediaFiles

func (_u *EpisodeUpdate) AddMediaFiles(v ...*MediaFile) *EpisodeUpdate

AddMediaFiles adds the "media_files" edges to the MediaFile entity.

func (*EpisodeUpdate) AddNumber

func (_u *EpisodeUpdate) AddNumber(v int16) *EpisodeUpdate

AddNumber adds value to the "number" field.

func (*EpisodeUpdate) ClearAbsoluteNumber

func (_u *EpisodeUpdate) ClearAbsoluteNumber() *EpisodeUpdate

ClearAbsoluteNumber clears the value of the "absolute_number" field.

func (*EpisodeUpdate) ClearAirDate

func (_u *EpisodeUpdate) ClearAirDate() *EpisodeUpdate

ClearAirDate clears the value of the "air_date" field.

func (*EpisodeUpdate) ClearDownloadRecords

func (_u *EpisodeUpdate) ClearDownloadRecords() *EpisodeUpdate

ClearDownloadRecords clears all "download_records" edges to the DownloadRecord entity.

func (*EpisodeUpdate) ClearLastSearchAt

func (_u *EpisodeUpdate) ClearLastSearchAt() *EpisodeUpdate

ClearLastSearchAt clears the value of the "last_search_at" field.

func (*EpisodeUpdate) ClearMediaFiles

func (_u *EpisodeUpdate) ClearMediaFiles() *EpisodeUpdate

ClearMediaFiles clears all "media_files" edges to the MediaFile entity.

func (*EpisodeUpdate) ClearSeason

func (_u *EpisodeUpdate) ClearSeason() *EpisodeUpdate

ClearSeason clears the "season" edge to the Season entity.

func (*EpisodeUpdate) ClearTitle

func (_u *EpisodeUpdate) ClearTitle() *EpisodeUpdate

ClearTitle clears the value of the "title" field.

func (*EpisodeUpdate) Exec

func (_u *EpisodeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EpisodeUpdate) ExecX

func (_u *EpisodeUpdate) ExecX(ctx context.Context)

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

func (*EpisodeUpdate) Mutation

func (_u *EpisodeUpdate) Mutation() *EpisodeMutation

Mutation returns the EpisodeMutation object of the builder.

func (*EpisodeUpdate) RemoveDownloadRecordIDs

func (_u *EpisodeUpdate) RemoveDownloadRecordIDs(ids ...uint32) *EpisodeUpdate

RemoveDownloadRecordIDs removes the "download_records" edge to DownloadRecord entities by IDs.

func (*EpisodeUpdate) RemoveDownloadRecords

func (_u *EpisodeUpdate) RemoveDownloadRecords(v ...*DownloadRecord) *EpisodeUpdate

RemoveDownloadRecords removes "download_records" edges to DownloadRecord entities.

func (*EpisodeUpdate) RemoveMediaFileIDs

func (_u *EpisodeUpdate) RemoveMediaFileIDs(ids ...uint32) *EpisodeUpdate

RemoveMediaFileIDs removes the "media_files" edge to MediaFile entities by IDs.

func (*EpisodeUpdate) RemoveMediaFiles

func (_u *EpisodeUpdate) RemoveMediaFiles(v ...*MediaFile) *EpisodeUpdate

RemoveMediaFiles removes "media_files" edges to MediaFile entities.

func (*EpisodeUpdate) Save

func (_u *EpisodeUpdate) Save(ctx context.Context) (int, error)

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

func (*EpisodeUpdate) SaveX

func (_u *EpisodeUpdate) SaveX(ctx context.Context) int

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

func (*EpisodeUpdate) SetAbsoluteNumber

func (_u *EpisodeUpdate) SetAbsoluteNumber(v uint16) *EpisodeUpdate

SetAbsoluteNumber sets the "absolute_number" field.

func (*EpisodeUpdate) SetAirDate

func (_u *EpisodeUpdate) SetAirDate(v time.Time) *EpisodeUpdate

SetAirDate sets the "air_date" field.

func (*EpisodeUpdate) SetGrabFailures

func (_u *EpisodeUpdate) SetGrabFailures(v uint8) *EpisodeUpdate

SetGrabFailures sets the "grab_failures" field.

func (*EpisodeUpdate) SetLastSearchAt

func (_u *EpisodeUpdate) SetLastSearchAt(v time.Time) *EpisodeUpdate

SetLastSearchAt sets the "last_search_at" field.

func (*EpisodeUpdate) SetMonitored

func (_u *EpisodeUpdate) SetMonitored(v bool) *EpisodeUpdate

SetMonitored sets the "monitored" field.

func (*EpisodeUpdate) SetNillableAbsoluteNumber

func (_u *EpisodeUpdate) SetNillableAbsoluteNumber(v *uint16) *EpisodeUpdate

SetNillableAbsoluteNumber sets the "absolute_number" field if the given value is not nil.

func (*EpisodeUpdate) SetNillableAirDate

func (_u *EpisodeUpdate) SetNillableAirDate(v *time.Time) *EpisodeUpdate

SetNillableAirDate sets the "air_date" field if the given value is not nil.

func (*EpisodeUpdate) SetNillableGrabFailures

func (_u *EpisodeUpdate) SetNillableGrabFailures(v *uint8) *EpisodeUpdate

SetNillableGrabFailures sets the "grab_failures" field if the given value is not nil.

func (*EpisodeUpdate) SetNillableLastSearchAt

func (_u *EpisodeUpdate) SetNillableLastSearchAt(v *time.Time) *EpisodeUpdate

SetNillableLastSearchAt sets the "last_search_at" field if the given value is not nil.

func (*EpisodeUpdate) SetNillableMonitored

func (_u *EpisodeUpdate) SetNillableMonitored(v *bool) *EpisodeUpdate

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*EpisodeUpdate) SetNillableNumber

func (_u *EpisodeUpdate) SetNillableNumber(v *uint16) *EpisodeUpdate

SetNillableNumber sets the "number" field if the given value is not nil.

func (*EpisodeUpdate) SetNillableStatus

func (_u *EpisodeUpdate) SetNillableStatus(v *episode.Status) *EpisodeUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*EpisodeUpdate) SetNillableTitle

func (_u *EpisodeUpdate) SetNillableTitle(v *string) *EpisodeUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*EpisodeUpdate) SetNumber

func (_u *EpisodeUpdate) SetNumber(v uint16) *EpisodeUpdate

SetNumber sets the "number" field.

func (*EpisodeUpdate) SetSeason

func (_u *EpisodeUpdate) SetSeason(v *Season) *EpisodeUpdate

SetSeason sets the "season" edge to the Season entity.

func (*EpisodeUpdate) SetSeasonID

func (_u *EpisodeUpdate) SetSeasonID(id uint32) *EpisodeUpdate

SetSeasonID sets the "season" edge to the Season entity by ID.

func (*EpisodeUpdate) SetStatus

func (_u *EpisodeUpdate) SetStatus(v episode.Status) *EpisodeUpdate

SetStatus sets the "status" field.

func (*EpisodeUpdate) SetTitle

func (_u *EpisodeUpdate) SetTitle(v string) *EpisodeUpdate

SetTitle sets the "title" field.

func (*EpisodeUpdate) SetUpdateTime

func (_u *EpisodeUpdate) SetUpdateTime(v time.Time) *EpisodeUpdate

SetUpdateTime sets the "update_time" field.

func (*EpisodeUpdate) Where

func (_u *EpisodeUpdate) Where(ps ...predicate.Episode) *EpisodeUpdate

Where appends a list predicates to the EpisodeUpdate builder.

type EpisodeUpdateOne

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

EpisodeUpdateOne is the builder for updating a single Episode entity.

func (*EpisodeUpdateOne) AddAbsoluteNumber

func (_u *EpisodeUpdateOne) AddAbsoluteNumber(v int16) *EpisodeUpdateOne

AddAbsoluteNumber adds value to the "absolute_number" field.

func (*EpisodeUpdateOne) AddDownloadRecordIDs

func (_u *EpisodeUpdateOne) AddDownloadRecordIDs(ids ...uint32) *EpisodeUpdateOne

AddDownloadRecordIDs adds the "download_records" edge to the DownloadRecord entity by IDs.

func (*EpisodeUpdateOne) AddDownloadRecords

func (_u *EpisodeUpdateOne) AddDownloadRecords(v ...*DownloadRecord) *EpisodeUpdateOne

AddDownloadRecords adds the "download_records" edges to the DownloadRecord entity.

func (*EpisodeUpdateOne) AddGrabFailures

func (_u *EpisodeUpdateOne) AddGrabFailures(v int8) *EpisodeUpdateOne

AddGrabFailures adds value to the "grab_failures" field.

func (*EpisodeUpdateOne) AddMediaFileIDs

func (_u *EpisodeUpdateOne) AddMediaFileIDs(ids ...uint32) *EpisodeUpdateOne

AddMediaFileIDs adds the "media_files" edge to the MediaFile entity by IDs.

func (*EpisodeUpdateOne) AddMediaFiles

func (_u *EpisodeUpdateOne) AddMediaFiles(v ...*MediaFile) *EpisodeUpdateOne

AddMediaFiles adds the "media_files" edges to the MediaFile entity.

func (*EpisodeUpdateOne) AddNumber

func (_u *EpisodeUpdateOne) AddNumber(v int16) *EpisodeUpdateOne

AddNumber adds value to the "number" field.

func (*EpisodeUpdateOne) ClearAbsoluteNumber

func (_u *EpisodeUpdateOne) ClearAbsoluteNumber() *EpisodeUpdateOne

ClearAbsoluteNumber clears the value of the "absolute_number" field.

func (*EpisodeUpdateOne) ClearAirDate

func (_u *EpisodeUpdateOne) ClearAirDate() *EpisodeUpdateOne

ClearAirDate clears the value of the "air_date" field.

func (*EpisodeUpdateOne) ClearDownloadRecords

func (_u *EpisodeUpdateOne) ClearDownloadRecords() *EpisodeUpdateOne

ClearDownloadRecords clears all "download_records" edges to the DownloadRecord entity.

func (*EpisodeUpdateOne) ClearLastSearchAt

func (_u *EpisodeUpdateOne) ClearLastSearchAt() *EpisodeUpdateOne

ClearLastSearchAt clears the value of the "last_search_at" field.

func (*EpisodeUpdateOne) ClearMediaFiles

func (_u *EpisodeUpdateOne) ClearMediaFiles() *EpisodeUpdateOne

ClearMediaFiles clears all "media_files" edges to the MediaFile entity.

func (*EpisodeUpdateOne) ClearSeason

func (_u *EpisodeUpdateOne) ClearSeason() *EpisodeUpdateOne

ClearSeason clears the "season" edge to the Season entity.

func (*EpisodeUpdateOne) ClearTitle

func (_u *EpisodeUpdateOne) ClearTitle() *EpisodeUpdateOne

ClearTitle clears the value of the "title" field.

func (*EpisodeUpdateOne) Exec

func (_u *EpisodeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EpisodeUpdateOne) ExecX

func (_u *EpisodeUpdateOne) ExecX(ctx context.Context)

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

func (*EpisodeUpdateOne) Mutation

func (_u *EpisodeUpdateOne) Mutation() *EpisodeMutation

Mutation returns the EpisodeMutation object of the builder.

func (*EpisodeUpdateOne) RemoveDownloadRecordIDs

func (_u *EpisodeUpdateOne) RemoveDownloadRecordIDs(ids ...uint32) *EpisodeUpdateOne

RemoveDownloadRecordIDs removes the "download_records" edge to DownloadRecord entities by IDs.

func (*EpisodeUpdateOne) RemoveDownloadRecords

func (_u *EpisodeUpdateOne) RemoveDownloadRecords(v ...*DownloadRecord) *EpisodeUpdateOne

RemoveDownloadRecords removes "download_records" edges to DownloadRecord entities.

func (*EpisodeUpdateOne) RemoveMediaFileIDs

func (_u *EpisodeUpdateOne) RemoveMediaFileIDs(ids ...uint32) *EpisodeUpdateOne

RemoveMediaFileIDs removes the "media_files" edge to MediaFile entities by IDs.

func (*EpisodeUpdateOne) RemoveMediaFiles

func (_u *EpisodeUpdateOne) RemoveMediaFiles(v ...*MediaFile) *EpisodeUpdateOne

RemoveMediaFiles removes "media_files" edges to MediaFile entities.

func (*EpisodeUpdateOne) Save

func (_u *EpisodeUpdateOne) Save(ctx context.Context) (*Episode, error)

Save executes the query and returns the updated Episode entity.

func (*EpisodeUpdateOne) SaveX

func (_u *EpisodeUpdateOne) SaveX(ctx context.Context) *Episode

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

func (*EpisodeUpdateOne) Select

func (_u *EpisodeUpdateOne) Select(field string, fields ...string) *EpisodeUpdateOne

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

func (*EpisodeUpdateOne) SetAbsoluteNumber

func (_u *EpisodeUpdateOne) SetAbsoluteNumber(v uint16) *EpisodeUpdateOne

SetAbsoluteNumber sets the "absolute_number" field.

func (*EpisodeUpdateOne) SetAirDate

func (_u *EpisodeUpdateOne) SetAirDate(v time.Time) *EpisodeUpdateOne

SetAirDate sets the "air_date" field.

func (*EpisodeUpdateOne) SetGrabFailures

func (_u *EpisodeUpdateOne) SetGrabFailures(v uint8) *EpisodeUpdateOne

SetGrabFailures sets the "grab_failures" field.

func (*EpisodeUpdateOne) SetLastSearchAt

func (_u *EpisodeUpdateOne) SetLastSearchAt(v time.Time) *EpisodeUpdateOne

SetLastSearchAt sets the "last_search_at" field.

func (*EpisodeUpdateOne) SetMonitored

func (_u *EpisodeUpdateOne) SetMonitored(v bool) *EpisodeUpdateOne

SetMonitored sets the "monitored" field.

func (*EpisodeUpdateOne) SetNillableAbsoluteNumber

func (_u *EpisodeUpdateOne) SetNillableAbsoluteNumber(v *uint16) *EpisodeUpdateOne

SetNillableAbsoluteNumber sets the "absolute_number" field if the given value is not nil.

func (*EpisodeUpdateOne) SetNillableAirDate

func (_u *EpisodeUpdateOne) SetNillableAirDate(v *time.Time) *EpisodeUpdateOne

SetNillableAirDate sets the "air_date" field if the given value is not nil.

func (*EpisodeUpdateOne) SetNillableGrabFailures

func (_u *EpisodeUpdateOne) SetNillableGrabFailures(v *uint8) *EpisodeUpdateOne

SetNillableGrabFailures sets the "grab_failures" field if the given value is not nil.

func (*EpisodeUpdateOne) SetNillableLastSearchAt

func (_u *EpisodeUpdateOne) SetNillableLastSearchAt(v *time.Time) *EpisodeUpdateOne

SetNillableLastSearchAt sets the "last_search_at" field if the given value is not nil.

func (*EpisodeUpdateOne) SetNillableMonitored

func (_u *EpisodeUpdateOne) SetNillableMonitored(v *bool) *EpisodeUpdateOne

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*EpisodeUpdateOne) SetNillableNumber

func (_u *EpisodeUpdateOne) SetNillableNumber(v *uint16) *EpisodeUpdateOne

SetNillableNumber sets the "number" field if the given value is not nil.

func (*EpisodeUpdateOne) SetNillableStatus

func (_u *EpisodeUpdateOne) SetNillableStatus(v *episode.Status) *EpisodeUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*EpisodeUpdateOne) SetNillableTitle

func (_u *EpisodeUpdateOne) SetNillableTitle(v *string) *EpisodeUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*EpisodeUpdateOne) SetNumber

func (_u *EpisodeUpdateOne) SetNumber(v uint16) *EpisodeUpdateOne

SetNumber sets the "number" field.

func (*EpisodeUpdateOne) SetSeason

func (_u *EpisodeUpdateOne) SetSeason(v *Season) *EpisodeUpdateOne

SetSeason sets the "season" edge to the Season entity.

func (*EpisodeUpdateOne) SetSeasonID

func (_u *EpisodeUpdateOne) SetSeasonID(id uint32) *EpisodeUpdateOne

SetSeasonID sets the "season" edge to the Season entity by ID.

func (*EpisodeUpdateOne) SetStatus

func (_u *EpisodeUpdateOne) SetStatus(v episode.Status) *EpisodeUpdateOne

SetStatus sets the "status" field.

func (*EpisodeUpdateOne) SetTitle

func (_u *EpisodeUpdateOne) SetTitle(v string) *EpisodeUpdateOne

SetTitle sets the "title" field.

func (*EpisodeUpdateOne) SetUpdateTime

func (_u *EpisodeUpdateOne) SetUpdateTime(v time.Time) *EpisodeUpdateOne

SetUpdateTime sets the "update_time" field.

func (*EpisodeUpdateOne) Where

Where appends a list predicates to the EpisodeUpdate builder.

type Episodes

type Episodes []*Episode

Episodes is a parsable slice of Episode.

type Hook

type Hook = ent.Hook

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

type ImportScan

type ImportScan struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// SourcePath holds the value of the "source_path" field.
	SourcePath string `json:"source_path,omitempty"`
	// Kind holds the value of the "kind" field.
	Kind importscan.Kind `json:"kind,omitempty"`
	// Mode holds the value of the "mode" field.
	Mode importscan.Mode `json:"mode,omitempty"`
	// ImportMode holds the value of the "import_mode" field.
	ImportMode importscan.ImportMode `json:"import_mode,omitempty"`
	// Status holds the value of the "status" field.
	Status importscan.Status `json:"status,omitempty"`
	// TotalCount holds the value of the "total_count" field.
	TotalCount uint32 `json:"total_count,omitempty"`
	// ProcessedCount holds the value of the "processed_count" field.
	ProcessedCount uint32 `json:"processed_count,omitempty"`
	// CommitSuccessCount holds the value of the "commit_success_count" field.
	CommitSuccessCount uint32 `json:"commit_success_count,omitempty"`
	// CommitFailedCount holds the value of the "commit_failed_count" field.
	CommitFailedCount uint32 `json:"commit_failed_count,omitempty"`
	// FailureReason holds the value of the "failure_reason" field.
	FailureReason string `json:"failure_reason,omitempty"`
	// ScannedAt holds the value of the "scanned_at" field.
	ScannedAt *time.Time `json:"scanned_at,omitempty"`
	// CommittedAt holds the value of the "committed_at" field.
	CommittedAt *time.Time `json:"committed_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ImportScanQuery when eager-loading is set.
	Edges ImportScanEdges `json:"edges"`
	// contains filtered or unexported fields
}

ImportScan is the model entity for the ImportScan schema.

func (*ImportScan) QueryFiles

func (_m *ImportScan) QueryFiles() *ImportScanFileQuery

QueryFiles queries the "files" edge of the ImportScan entity.

func (*ImportScan) QueryShows

func (_m *ImportScan) QueryShows() *ImportScanShowQuery

QueryShows queries the "shows" edge of the ImportScan entity.

func (*ImportScan) String

func (_m *ImportScan) String() string

String implements the fmt.Stringer.

func (*ImportScan) Unwrap

func (_m *ImportScan) Unwrap() *ImportScan

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

func (_m *ImportScan) Update() *ImportScanUpdateOne

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

func (*ImportScan) Value

func (_m *ImportScan) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ImportScan. This includes values selected through modifiers, order, etc.

type ImportScanClient

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

ImportScanClient is a client for the ImportScan schema.

func NewImportScanClient

func NewImportScanClient(c config) *ImportScanClient

NewImportScanClient returns a client for the ImportScan from the given config.

func (*ImportScanClient) Create

func (c *ImportScanClient) Create() *ImportScanCreate

Create returns a builder for creating a ImportScan entity.

func (*ImportScanClient) CreateBulk

func (c *ImportScanClient) CreateBulk(builders ...*ImportScanCreate) *ImportScanCreateBulk

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

func (*ImportScanClient) Delete

func (c *ImportScanClient) Delete() *ImportScanDelete

Delete returns a delete builder for ImportScan.

func (*ImportScanClient) DeleteOne

func (c *ImportScanClient) DeleteOne(_m *ImportScan) *ImportScanDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ImportScanClient) DeleteOneID

func (c *ImportScanClient) DeleteOneID(id uint32) *ImportScanDeleteOne

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

func (*ImportScanClient) Get

func (c *ImportScanClient) Get(ctx context.Context, id uint32) (*ImportScan, error)

Get returns a ImportScan entity by its id.

func (*ImportScanClient) GetX

func (c *ImportScanClient) GetX(ctx context.Context, id uint32) *ImportScan

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

func (*ImportScanClient) Hooks

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

Hooks returns the client hooks.

func (*ImportScanClient) Intercept

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

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

func (*ImportScanClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ImportScanClient) MapCreateBulk

func (c *ImportScanClient) MapCreateBulk(slice any, setFunc func(*ImportScanCreate, int)) *ImportScanCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ImportScanClient) Query

func (c *ImportScanClient) Query() *ImportScanQuery

Query returns a query builder for ImportScan.

func (*ImportScanClient) QueryFiles

func (c *ImportScanClient) QueryFiles(_m *ImportScan) *ImportScanFileQuery

QueryFiles queries the files edge of a ImportScan.

func (*ImportScanClient) QueryShows

func (c *ImportScanClient) QueryShows(_m *ImportScan) *ImportScanShowQuery

QueryShows queries the shows edge of a ImportScan.

func (*ImportScanClient) Update

func (c *ImportScanClient) Update() *ImportScanUpdate

Update returns an update builder for ImportScan.

func (*ImportScanClient) UpdateOne

func (c *ImportScanClient) UpdateOne(_m *ImportScan) *ImportScanUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ImportScanClient) UpdateOneID

func (c *ImportScanClient) UpdateOneID(id uint32) *ImportScanUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ImportScanClient) Use

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

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

type ImportScanCreate

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

ImportScanCreate is the builder for creating a ImportScan entity.

func (*ImportScanCreate) AddFileIDs

func (_c *ImportScanCreate) AddFileIDs(ids ...uint32) *ImportScanCreate

AddFileIDs adds the "files" edge to the ImportScanFile entity by IDs.

func (*ImportScanCreate) AddFiles

func (_c *ImportScanCreate) AddFiles(v ...*ImportScanFile) *ImportScanCreate

AddFiles adds the "files" edges to the ImportScanFile entity.

func (*ImportScanCreate) AddShowIDs

func (_c *ImportScanCreate) AddShowIDs(ids ...uint32) *ImportScanCreate

AddShowIDs adds the "shows" edge to the ImportScanShow entity by IDs.

func (*ImportScanCreate) AddShows

func (_c *ImportScanCreate) AddShows(v ...*ImportScanShow) *ImportScanCreate

AddShows adds the "shows" edges to the ImportScanShow entity.

func (*ImportScanCreate) Exec

func (_c *ImportScanCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ImportScanCreate) ExecX

func (_c *ImportScanCreate) ExecX(ctx context.Context)

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

func (*ImportScanCreate) Mutation

func (_c *ImportScanCreate) Mutation() *ImportScanMutation

Mutation returns the ImportScanMutation object of the builder.

func (*ImportScanCreate) Save

func (_c *ImportScanCreate) Save(ctx context.Context) (*ImportScan, error)

Save creates the ImportScan in the database.

func (*ImportScanCreate) SaveX

func (_c *ImportScanCreate) SaveX(ctx context.Context) *ImportScan

SaveX calls Save and panics if Save returns an error.

func (*ImportScanCreate) SetCommitFailedCount

func (_c *ImportScanCreate) SetCommitFailedCount(v uint32) *ImportScanCreate

SetCommitFailedCount sets the "commit_failed_count" field.

func (*ImportScanCreate) SetCommitSuccessCount

func (_c *ImportScanCreate) SetCommitSuccessCount(v uint32) *ImportScanCreate

SetCommitSuccessCount sets the "commit_success_count" field.

func (*ImportScanCreate) SetCommittedAt

func (_c *ImportScanCreate) SetCommittedAt(v time.Time) *ImportScanCreate

SetCommittedAt sets the "committed_at" field.

func (*ImportScanCreate) SetCreateTime

func (_c *ImportScanCreate) SetCreateTime(v time.Time) *ImportScanCreate

SetCreateTime sets the "create_time" field.

func (*ImportScanCreate) SetFailureReason

func (_c *ImportScanCreate) SetFailureReason(v string) *ImportScanCreate

SetFailureReason sets the "failure_reason" field.

func (*ImportScanCreate) SetID

SetID sets the "id" field.

func (*ImportScanCreate) SetImportMode

SetImportMode sets the "import_mode" field.

func (*ImportScanCreate) SetKind

SetKind sets the "kind" field.

func (*ImportScanCreate) SetMode

SetMode sets the "mode" field.

func (*ImportScanCreate) SetNillableCommitFailedCount

func (_c *ImportScanCreate) SetNillableCommitFailedCount(v *uint32) *ImportScanCreate

SetNillableCommitFailedCount sets the "commit_failed_count" field if the given value is not nil.

func (*ImportScanCreate) SetNillableCommitSuccessCount

func (_c *ImportScanCreate) SetNillableCommitSuccessCount(v *uint32) *ImportScanCreate

SetNillableCommitSuccessCount sets the "commit_success_count" field if the given value is not nil.

func (*ImportScanCreate) SetNillableCommittedAt

func (_c *ImportScanCreate) SetNillableCommittedAt(v *time.Time) *ImportScanCreate

SetNillableCommittedAt sets the "committed_at" field if the given value is not nil.

func (*ImportScanCreate) SetNillableCreateTime

func (_c *ImportScanCreate) SetNillableCreateTime(v *time.Time) *ImportScanCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ImportScanCreate) SetNillableFailureReason

func (_c *ImportScanCreate) SetNillableFailureReason(v *string) *ImportScanCreate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*ImportScanCreate) SetNillableImportMode

func (_c *ImportScanCreate) SetNillableImportMode(v *importscan.ImportMode) *ImportScanCreate

SetNillableImportMode sets the "import_mode" field if the given value is not nil.

func (*ImportScanCreate) SetNillableKind

func (_c *ImportScanCreate) SetNillableKind(v *importscan.Kind) *ImportScanCreate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*ImportScanCreate) SetNillableProcessedCount

func (_c *ImportScanCreate) SetNillableProcessedCount(v *uint32) *ImportScanCreate

SetNillableProcessedCount sets the "processed_count" field if the given value is not nil.

func (*ImportScanCreate) SetNillableScannedAt

func (_c *ImportScanCreate) SetNillableScannedAt(v *time.Time) *ImportScanCreate

SetNillableScannedAt sets the "scanned_at" field if the given value is not nil.

func (*ImportScanCreate) SetNillableStatus

func (_c *ImportScanCreate) SetNillableStatus(v *importscan.Status) *ImportScanCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ImportScanCreate) SetNillableTotalCount

func (_c *ImportScanCreate) SetNillableTotalCount(v *uint32) *ImportScanCreate

SetNillableTotalCount sets the "total_count" field if the given value is not nil.

func (*ImportScanCreate) SetNillableUpdateTime

func (_c *ImportScanCreate) SetNillableUpdateTime(v *time.Time) *ImportScanCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*ImportScanCreate) SetProcessedCount

func (_c *ImportScanCreate) SetProcessedCount(v uint32) *ImportScanCreate

SetProcessedCount sets the "processed_count" field.

func (*ImportScanCreate) SetScannedAt

func (_c *ImportScanCreate) SetScannedAt(v time.Time) *ImportScanCreate

SetScannedAt sets the "scanned_at" field.

func (*ImportScanCreate) SetSourcePath

func (_c *ImportScanCreate) SetSourcePath(v string) *ImportScanCreate

SetSourcePath sets the "source_path" field.

func (*ImportScanCreate) SetStatus

SetStatus sets the "status" field.

func (*ImportScanCreate) SetTotalCount

func (_c *ImportScanCreate) SetTotalCount(v uint32) *ImportScanCreate

SetTotalCount sets the "total_count" field.

func (*ImportScanCreate) SetUpdateTime

func (_c *ImportScanCreate) SetUpdateTime(v time.Time) *ImportScanCreate

SetUpdateTime sets the "update_time" field.

type ImportScanCreateBulk

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

ImportScanCreateBulk is the builder for creating many ImportScan entities in bulk.

func (*ImportScanCreateBulk) Exec

func (_c *ImportScanCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ImportScanCreateBulk) ExecX

func (_c *ImportScanCreateBulk) ExecX(ctx context.Context)

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

func (*ImportScanCreateBulk) Save

func (_c *ImportScanCreateBulk) Save(ctx context.Context) ([]*ImportScan, error)

Save creates the ImportScan entities in the database.

func (*ImportScanCreateBulk) SaveX

func (_c *ImportScanCreateBulk) SaveX(ctx context.Context) []*ImportScan

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

type ImportScanDelete

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

ImportScanDelete is the builder for deleting a ImportScan entity.

func (*ImportScanDelete) Exec

func (_d *ImportScanDelete) Exec(ctx context.Context) (int, error)

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

func (*ImportScanDelete) ExecX

func (_d *ImportScanDelete) ExecX(ctx context.Context) int

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

func (*ImportScanDelete) Where

Where appends a list predicates to the ImportScanDelete builder.

type ImportScanDeleteOne

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

ImportScanDeleteOne is the builder for deleting a single ImportScan entity.

func (*ImportScanDeleteOne) Exec

func (_d *ImportScanDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ImportScanDeleteOne) ExecX

func (_d *ImportScanDeleteOne) ExecX(ctx context.Context)

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

func (*ImportScanDeleteOne) Where

Where appends a list predicates to the ImportScanDelete builder.

type ImportScanEdges

type ImportScanEdges struct {
	// Files holds the value of the files edge.
	Files []*ImportScanFile `json:"files,omitempty"`
	// Shows holds the value of the shows edge.
	Shows []*ImportScanShow `json:"shows,omitempty"`
	// contains filtered or unexported fields
}

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

func (ImportScanEdges) FilesOrErr

func (e ImportScanEdges) FilesOrErr() ([]*ImportScanFile, error)

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

func (ImportScanEdges) ShowsOrErr

func (e ImportScanEdges) ShowsOrErr() ([]*ImportScanShow, error)

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

type ImportScanFile

type ImportScanFile struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// SourcePath holds the value of the "source_path" field.
	SourcePath string `json:"source_path,omitempty"`
	// Size holds the value of the "size" field.
	Size int64 `json:"size,omitempty"`
	// ParsedTitle holds the value of the "parsed_title" field.
	ParsedTitle string `json:"parsed_title,omitempty"`
	// ParsedYear holds the value of the "parsed_year" field.
	ParsedYear *uint16 `json:"parsed_year,omitempty"`
	// ParsedQuality holds the value of the "parsed_quality" field.
	ParsedQuality string `json:"parsed_quality,omitempty"`
	// ParsedReleaseGroup holds the value of the "parsed_release_group" field.
	ParsedReleaseGroup string `json:"parsed_release_group,omitempty"`
	// Classification holds the value of the "classification" field.
	Classification importscanfile.Classification `json:"classification,omitempty"`
	// Candidates holds the value of the "candidates" field.
	Candidates []schema.ScannedCandidate `json:"candidates,omitempty"`
	// TmdbID holds the value of the "tmdb_id" field.
	TmdbID uint32 `json:"tmdb_id,omitempty"`
	// ExistingMovieID holds the value of the "existing_movie_id" field.
	ExistingMovieID uint32 `json:"existing_movie_id,omitempty"`
	// Decision holds the value of the "decision" field.
	Decision importscanfile.Decision `json:"decision,omitempty"`
	// DecisionTmdbID holds the value of the "decision_tmdb_id" field.
	DecisionTmdbID uint32 `json:"decision_tmdb_id,omitempty"`
	// Outcome holds the value of the "outcome" field.
	Outcome importscanfile.Outcome `json:"outcome,omitempty"`
	// OutcomeMessage holds the value of the "outcome_message" field.
	OutcomeMessage string `json:"outcome_message,omitempty"`
	// CreatedMovieID holds the value of the "created_movie_id" field.
	CreatedMovieID uint32 `json:"created_movie_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ImportScanFileQuery when eager-loading is set.
	Edges ImportScanFileEdges `json:"edges"`
	// contains filtered or unexported fields
}

ImportScanFile is the model entity for the ImportScanFile schema.

func (*ImportScanFile) QueryScan

func (_m *ImportScanFile) QueryScan() *ImportScanQuery

QueryScan queries the "scan" edge of the ImportScanFile entity.

func (*ImportScanFile) String

func (_m *ImportScanFile) String() string

String implements the fmt.Stringer.

func (*ImportScanFile) Unwrap

func (_m *ImportScanFile) Unwrap() *ImportScanFile

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

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

func (*ImportScanFile) Value

func (_m *ImportScanFile) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ImportScanFile. This includes values selected through modifiers, order, etc.

type ImportScanFileClient

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

ImportScanFileClient is a client for the ImportScanFile schema.

func NewImportScanFileClient

func NewImportScanFileClient(c config) *ImportScanFileClient

NewImportScanFileClient returns a client for the ImportScanFile from the given config.

func (*ImportScanFileClient) Create

Create returns a builder for creating a ImportScanFile entity.

func (*ImportScanFileClient) CreateBulk

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

func (*ImportScanFileClient) Delete

Delete returns a delete builder for ImportScanFile.

func (*ImportScanFileClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ImportScanFileClient) DeleteOneID

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

func (*ImportScanFileClient) Get

Get returns a ImportScanFile entity by its id.

func (*ImportScanFileClient) GetX

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

func (*ImportScanFileClient) Hooks

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

Hooks returns the client hooks.

func (*ImportScanFileClient) Intercept

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

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

func (*ImportScanFileClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ImportScanFileClient) MapCreateBulk

func (c *ImportScanFileClient) MapCreateBulk(slice any, setFunc func(*ImportScanFileCreate, int)) *ImportScanFileCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ImportScanFileClient) Query

Query returns a query builder for ImportScanFile.

func (*ImportScanFileClient) QueryScan

QueryScan queries the scan edge of a ImportScanFile.

func (*ImportScanFileClient) Update

Update returns an update builder for ImportScanFile.

func (*ImportScanFileClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ImportScanFileClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ImportScanFileClient) Use

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

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

type ImportScanFileCreate

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

ImportScanFileCreate is the builder for creating a ImportScanFile entity.

func (*ImportScanFileCreate) Exec

func (_c *ImportScanFileCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ImportScanFileCreate) ExecX

func (_c *ImportScanFileCreate) ExecX(ctx context.Context)

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

func (*ImportScanFileCreate) Mutation

Mutation returns the ImportScanFileMutation object of the builder.

func (*ImportScanFileCreate) Save

Save creates the ImportScanFile in the database.

func (*ImportScanFileCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ImportScanFileCreate) SetCandidates

SetCandidates sets the "candidates" field.

func (*ImportScanFileCreate) SetClassification

SetClassification sets the "classification" field.

func (*ImportScanFileCreate) SetCreateTime

func (_c *ImportScanFileCreate) SetCreateTime(v time.Time) *ImportScanFileCreate

SetCreateTime sets the "create_time" field.

func (*ImportScanFileCreate) SetCreatedMovieID

func (_c *ImportScanFileCreate) SetCreatedMovieID(v uint32) *ImportScanFileCreate

SetCreatedMovieID sets the "created_movie_id" field.

func (*ImportScanFileCreate) SetDecision

SetDecision sets the "decision" field.

func (*ImportScanFileCreate) SetDecisionTmdbID

func (_c *ImportScanFileCreate) SetDecisionTmdbID(v uint32) *ImportScanFileCreate

SetDecisionTmdbID sets the "decision_tmdb_id" field.

func (*ImportScanFileCreate) SetExistingMovieID

func (_c *ImportScanFileCreate) SetExistingMovieID(v uint32) *ImportScanFileCreate

SetExistingMovieID sets the "existing_movie_id" field.

func (*ImportScanFileCreate) SetID

SetID sets the "id" field.

func (*ImportScanFileCreate) SetNillableClassification

func (_c *ImportScanFileCreate) SetNillableClassification(v *importscanfile.Classification) *ImportScanFileCreate

SetNillableClassification sets the "classification" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableCreateTime

func (_c *ImportScanFileCreate) SetNillableCreateTime(v *time.Time) *ImportScanFileCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableCreatedMovieID

func (_c *ImportScanFileCreate) SetNillableCreatedMovieID(v *uint32) *ImportScanFileCreate

SetNillableCreatedMovieID sets the "created_movie_id" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableDecision

SetNillableDecision sets the "decision" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableDecisionTmdbID

func (_c *ImportScanFileCreate) SetNillableDecisionTmdbID(v *uint32) *ImportScanFileCreate

SetNillableDecisionTmdbID sets the "decision_tmdb_id" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableExistingMovieID

func (_c *ImportScanFileCreate) SetNillableExistingMovieID(v *uint32) *ImportScanFileCreate

SetNillableExistingMovieID sets the "existing_movie_id" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableOutcome

SetNillableOutcome sets the "outcome" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableOutcomeMessage

func (_c *ImportScanFileCreate) SetNillableOutcomeMessage(v *string) *ImportScanFileCreate

SetNillableOutcomeMessage sets the "outcome_message" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableParsedQuality

func (_c *ImportScanFileCreate) SetNillableParsedQuality(v *string) *ImportScanFileCreate

SetNillableParsedQuality sets the "parsed_quality" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableParsedReleaseGroup

func (_c *ImportScanFileCreate) SetNillableParsedReleaseGroup(v *string) *ImportScanFileCreate

SetNillableParsedReleaseGroup sets the "parsed_release_group" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableParsedTitle

func (_c *ImportScanFileCreate) SetNillableParsedTitle(v *string) *ImportScanFileCreate

SetNillableParsedTitle sets the "parsed_title" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableParsedYear

func (_c *ImportScanFileCreate) SetNillableParsedYear(v *uint16) *ImportScanFileCreate

SetNillableParsedYear sets the "parsed_year" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableTmdbID

func (_c *ImportScanFileCreate) SetNillableTmdbID(v *uint32) *ImportScanFileCreate

SetNillableTmdbID sets the "tmdb_id" field if the given value is not nil.

func (*ImportScanFileCreate) SetNillableUpdateTime

func (_c *ImportScanFileCreate) SetNillableUpdateTime(v *time.Time) *ImportScanFileCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*ImportScanFileCreate) SetOutcome

SetOutcome sets the "outcome" field.

func (*ImportScanFileCreate) SetOutcomeMessage

func (_c *ImportScanFileCreate) SetOutcomeMessage(v string) *ImportScanFileCreate

SetOutcomeMessage sets the "outcome_message" field.

func (*ImportScanFileCreate) SetParsedQuality

func (_c *ImportScanFileCreate) SetParsedQuality(v string) *ImportScanFileCreate

SetParsedQuality sets the "parsed_quality" field.

func (*ImportScanFileCreate) SetParsedReleaseGroup

func (_c *ImportScanFileCreate) SetParsedReleaseGroup(v string) *ImportScanFileCreate

SetParsedReleaseGroup sets the "parsed_release_group" field.

func (*ImportScanFileCreate) SetParsedTitle

func (_c *ImportScanFileCreate) SetParsedTitle(v string) *ImportScanFileCreate

SetParsedTitle sets the "parsed_title" field.

func (*ImportScanFileCreate) SetParsedYear

func (_c *ImportScanFileCreate) SetParsedYear(v uint16) *ImportScanFileCreate

SetParsedYear sets the "parsed_year" field.

func (*ImportScanFileCreate) SetScan

SetScan sets the "scan" edge to the ImportScan entity.

func (*ImportScanFileCreate) SetScanID

SetScanID sets the "scan" edge to the ImportScan entity by ID.

func (*ImportScanFileCreate) SetSize

SetSize sets the "size" field.

func (*ImportScanFileCreate) SetSourcePath

func (_c *ImportScanFileCreate) SetSourcePath(v string) *ImportScanFileCreate

SetSourcePath sets the "source_path" field.

func (*ImportScanFileCreate) SetTmdbID

SetTmdbID sets the "tmdb_id" field.

func (*ImportScanFileCreate) SetUpdateTime

func (_c *ImportScanFileCreate) SetUpdateTime(v time.Time) *ImportScanFileCreate

SetUpdateTime sets the "update_time" field.

type ImportScanFileCreateBulk

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

ImportScanFileCreateBulk is the builder for creating many ImportScanFile entities in bulk.

func (*ImportScanFileCreateBulk) Exec

Exec executes the query.

func (*ImportScanFileCreateBulk) ExecX

func (_c *ImportScanFileCreateBulk) ExecX(ctx context.Context)

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

func (*ImportScanFileCreateBulk) Save

Save creates the ImportScanFile entities in the database.

func (*ImportScanFileCreateBulk) SaveX

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

type ImportScanFileDelete

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

ImportScanFileDelete is the builder for deleting a ImportScanFile entity.

func (*ImportScanFileDelete) Exec

func (_d *ImportScanFileDelete) Exec(ctx context.Context) (int, error)

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

func (*ImportScanFileDelete) ExecX

func (_d *ImportScanFileDelete) ExecX(ctx context.Context) int

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

func (*ImportScanFileDelete) Where

Where appends a list predicates to the ImportScanFileDelete builder.

type ImportScanFileDeleteOne

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

ImportScanFileDeleteOne is the builder for deleting a single ImportScanFile entity.

func (*ImportScanFileDeleteOne) Exec

Exec executes the deletion query.

func (*ImportScanFileDeleteOne) ExecX

func (_d *ImportScanFileDeleteOne) ExecX(ctx context.Context)

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

func (*ImportScanFileDeleteOne) Where

Where appends a list predicates to the ImportScanFileDelete builder.

type ImportScanFileEdges

type ImportScanFileEdges struct {
	// Scan holds the value of the scan edge.
	Scan *ImportScan `json:"scan,omitempty"`
	// contains filtered or unexported fields
}

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

func (ImportScanFileEdges) ScanOrErr

func (e ImportScanFileEdges) ScanOrErr() (*ImportScan, error)

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

type ImportScanFileGroupBy

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

ImportScanFileGroupBy is the group-by builder for ImportScanFile entities.

func (*ImportScanFileGroupBy) Aggregate

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

func (*ImportScanFileGroupBy) Bool

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

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

func (*ImportScanFileGroupBy) BoolX

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

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

func (*ImportScanFileGroupBy) Bools

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

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

func (*ImportScanFileGroupBy) BoolsX

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

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

func (*ImportScanFileGroupBy) Float64

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

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

func (*ImportScanFileGroupBy) Float64X

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

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

func (*ImportScanFileGroupBy) Float64s

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

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

func (*ImportScanFileGroupBy) Float64sX

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

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

func (*ImportScanFileGroupBy) Int

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

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

func (*ImportScanFileGroupBy) IntX

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

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

func (*ImportScanFileGroupBy) Ints

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

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

func (*ImportScanFileGroupBy) IntsX

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

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

func (*ImportScanFileGroupBy) Scan

func (_g *ImportScanFileGroupBy) Scan(ctx context.Context, v any) error

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

func (*ImportScanFileGroupBy) ScanX

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

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

func (*ImportScanFileGroupBy) String

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

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

func (*ImportScanFileGroupBy) StringX

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

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

func (*ImportScanFileGroupBy) Strings

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

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

func (*ImportScanFileGroupBy) StringsX

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

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

type ImportScanFileMutation

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

ImportScanFileMutation represents an operation that mutates the ImportScanFile nodes in the graph.

func (*ImportScanFileMutation) AddCreatedMovieID

func (m *ImportScanFileMutation) AddCreatedMovieID(u int32)

AddCreatedMovieID adds u to the "created_movie_id" field.

func (*ImportScanFileMutation) AddDecisionTmdbID

func (m *ImportScanFileMutation) AddDecisionTmdbID(u int32)

AddDecisionTmdbID adds u to the "decision_tmdb_id" field.

func (*ImportScanFileMutation) AddExistingMovieID

func (m *ImportScanFileMutation) AddExistingMovieID(u int32)

AddExistingMovieID adds u to the "existing_movie_id" field.

func (*ImportScanFileMutation) AddField

func (m *ImportScanFileMutation) 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 (*ImportScanFileMutation) AddParsedYear

func (m *ImportScanFileMutation) AddParsedYear(u int16)

AddParsedYear adds u to the "parsed_year" field.

func (*ImportScanFileMutation) AddSize

func (m *ImportScanFileMutation) AddSize(i int64)

AddSize adds i to the "size" field.

func (*ImportScanFileMutation) AddTmdbID

func (m *ImportScanFileMutation) AddTmdbID(u int32)

AddTmdbID adds u to the "tmdb_id" field.

func (*ImportScanFileMutation) AddedCreatedMovieID

func (m *ImportScanFileMutation) AddedCreatedMovieID() (r int32, exists bool)

AddedCreatedMovieID returns the value that was added to the "created_movie_id" field in this mutation.

func (*ImportScanFileMutation) AddedDecisionTmdbID

func (m *ImportScanFileMutation) AddedDecisionTmdbID() (r int32, exists bool)

AddedDecisionTmdbID returns the value that was added to the "decision_tmdb_id" field in this mutation.

func (*ImportScanFileMutation) AddedEdges

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

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

func (*ImportScanFileMutation) AddedExistingMovieID

func (m *ImportScanFileMutation) AddedExistingMovieID() (r int32, exists bool)

AddedExistingMovieID returns the value that was added to the "existing_movie_id" field in this mutation.

func (*ImportScanFileMutation) AddedField

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

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

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

func (*ImportScanFileMutation) AddedIDs

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

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

func (*ImportScanFileMutation) AddedParsedYear

func (m *ImportScanFileMutation) AddedParsedYear() (r int16, exists bool)

AddedParsedYear returns the value that was added to the "parsed_year" field in this mutation.

func (*ImportScanFileMutation) AddedSize

func (m *ImportScanFileMutation) AddedSize() (r int64, exists bool)

AddedSize returns the value that was added to the "size" field in this mutation.

func (*ImportScanFileMutation) AddedTmdbID

func (m *ImportScanFileMutation) AddedTmdbID() (r int32, exists bool)

AddedTmdbID returns the value that was added to the "tmdb_id" field in this mutation.

func (*ImportScanFileMutation) AppendCandidates

func (m *ImportScanFileMutation) AppendCandidates(sc []schema.ScannedCandidate)

AppendCandidates adds sc to the "candidates" field.

func (*ImportScanFileMutation) AppendedCandidates

func (m *ImportScanFileMutation) AppendedCandidates() ([]schema.ScannedCandidate, bool)

AppendedCandidates returns the list of values that were appended to the "candidates" field in this mutation.

func (*ImportScanFileMutation) Candidates

func (m *ImportScanFileMutation) Candidates() (r []schema.ScannedCandidate, exists bool)

Candidates returns the value of the "candidates" field in the mutation.

func (*ImportScanFileMutation) CandidatesCleared

func (m *ImportScanFileMutation) CandidatesCleared() bool

CandidatesCleared returns if the "candidates" field was cleared in this mutation.

func (*ImportScanFileMutation) Classification

func (m *ImportScanFileMutation) Classification() (r importscanfile.Classification, exists bool)

Classification returns the value of the "classification" field in the mutation.

func (*ImportScanFileMutation) ClearCandidates

func (m *ImportScanFileMutation) ClearCandidates()

ClearCandidates clears the value of the "candidates" field.

func (*ImportScanFileMutation) ClearCreatedMovieID

func (m *ImportScanFileMutation) ClearCreatedMovieID()

ClearCreatedMovieID clears the value of the "created_movie_id" field.

func (*ImportScanFileMutation) ClearDecisionTmdbID

func (m *ImportScanFileMutation) ClearDecisionTmdbID()

ClearDecisionTmdbID clears the value of the "decision_tmdb_id" field.

func (*ImportScanFileMutation) ClearEdge

func (m *ImportScanFileMutation) 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 (*ImportScanFileMutation) ClearExistingMovieID

func (m *ImportScanFileMutation) ClearExistingMovieID()

ClearExistingMovieID clears the value of the "existing_movie_id" field.

func (*ImportScanFileMutation) ClearField

func (m *ImportScanFileMutation) 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 (*ImportScanFileMutation) ClearOutcomeMessage

func (m *ImportScanFileMutation) ClearOutcomeMessage()

ClearOutcomeMessage clears the value of the "outcome_message" field.

func (*ImportScanFileMutation) ClearParsedQuality

func (m *ImportScanFileMutation) ClearParsedQuality()

ClearParsedQuality clears the value of the "parsed_quality" field.

func (*ImportScanFileMutation) ClearParsedReleaseGroup

func (m *ImportScanFileMutation) ClearParsedReleaseGroup()

ClearParsedReleaseGroup clears the value of the "parsed_release_group" field.

func (*ImportScanFileMutation) ClearParsedTitle

func (m *ImportScanFileMutation) ClearParsedTitle()

ClearParsedTitle clears the value of the "parsed_title" field.

func (*ImportScanFileMutation) ClearParsedYear

func (m *ImportScanFileMutation) ClearParsedYear()

ClearParsedYear clears the value of the "parsed_year" field.

func (*ImportScanFileMutation) ClearScan

func (m *ImportScanFileMutation) ClearScan()

ClearScan clears the "scan" edge to the ImportScan entity.

func (*ImportScanFileMutation) ClearTmdbID

func (m *ImportScanFileMutation) ClearTmdbID()

ClearTmdbID clears the value of the "tmdb_id" field.

func (*ImportScanFileMutation) ClearedEdges

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

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

func (*ImportScanFileMutation) ClearedFields

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

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

func (ImportScanFileMutation) Client

func (m ImportScanFileMutation) 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 (*ImportScanFileMutation) CreateTime

func (m *ImportScanFileMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ImportScanFileMutation) CreatedMovieID

func (m *ImportScanFileMutation) CreatedMovieID() (r uint32, exists bool)

CreatedMovieID returns the value of the "created_movie_id" field in the mutation.

func (*ImportScanFileMutation) CreatedMovieIDCleared

func (m *ImportScanFileMutation) CreatedMovieIDCleared() bool

CreatedMovieIDCleared returns if the "created_movie_id" field was cleared in this mutation.

func (*ImportScanFileMutation) Decision

func (m *ImportScanFileMutation) Decision() (r importscanfile.Decision, exists bool)

Decision returns the value of the "decision" field in the mutation.

func (*ImportScanFileMutation) DecisionTmdbID

func (m *ImportScanFileMutation) DecisionTmdbID() (r uint32, exists bool)

DecisionTmdbID returns the value of the "decision_tmdb_id" field in the mutation.

func (*ImportScanFileMutation) DecisionTmdbIDCleared

func (m *ImportScanFileMutation) DecisionTmdbIDCleared() bool

DecisionTmdbIDCleared returns if the "decision_tmdb_id" field was cleared in this mutation.

func (*ImportScanFileMutation) EdgeCleared

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

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

func (*ImportScanFileMutation) ExistingMovieID

func (m *ImportScanFileMutation) ExistingMovieID() (r uint32, exists bool)

ExistingMovieID returns the value of the "existing_movie_id" field in the mutation.

func (*ImportScanFileMutation) ExistingMovieIDCleared

func (m *ImportScanFileMutation) ExistingMovieIDCleared() bool

ExistingMovieIDCleared returns if the "existing_movie_id" field was cleared in this mutation.

func (*ImportScanFileMutation) Field

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

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

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

func (*ImportScanFileMutation) Fields

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

func (m *ImportScanFileMutation) ID() (id uint32, 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 (*ImportScanFileMutation) 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 (*ImportScanFileMutation) OldCandidates

func (m *ImportScanFileMutation) OldCandidates(ctx context.Context) (v []schema.ScannedCandidate, err error)

OldCandidates returns the old "candidates" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldClassification

func (m *ImportScanFileMutation) OldClassification(ctx context.Context) (v importscanfile.Classification, err error)

OldClassification returns the old "classification" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldCreateTime

func (m *ImportScanFileMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldCreatedMovieID

func (m *ImportScanFileMutation) OldCreatedMovieID(ctx context.Context) (v uint32, err error)

OldCreatedMovieID returns the old "created_movie_id" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldDecision

func (m *ImportScanFileMutation) OldDecision(ctx context.Context) (v importscanfile.Decision, err error)

OldDecision returns the old "decision" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldDecisionTmdbID

func (m *ImportScanFileMutation) OldDecisionTmdbID(ctx context.Context) (v uint32, err error)

OldDecisionTmdbID returns the old "decision_tmdb_id" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldExistingMovieID

func (m *ImportScanFileMutation) OldExistingMovieID(ctx context.Context) (v uint32, err error)

OldExistingMovieID returns the old "existing_movie_id" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldField

func (m *ImportScanFileMutation) 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 (*ImportScanFileMutation) OldOutcome

func (m *ImportScanFileMutation) OldOutcome(ctx context.Context) (v importscanfile.Outcome, err error)

OldOutcome returns the old "outcome" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldOutcomeMessage

func (m *ImportScanFileMutation) OldOutcomeMessage(ctx context.Context) (v string, err error)

OldOutcomeMessage returns the old "outcome_message" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldParsedQuality

func (m *ImportScanFileMutation) OldParsedQuality(ctx context.Context) (v string, err error)

OldParsedQuality returns the old "parsed_quality" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldParsedReleaseGroup

func (m *ImportScanFileMutation) OldParsedReleaseGroup(ctx context.Context) (v string, err error)

OldParsedReleaseGroup returns the old "parsed_release_group" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldParsedTitle

func (m *ImportScanFileMutation) OldParsedTitle(ctx context.Context) (v string, err error)

OldParsedTitle returns the old "parsed_title" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldParsedYear

func (m *ImportScanFileMutation) OldParsedYear(ctx context.Context) (v *uint16, err error)

OldParsedYear returns the old "parsed_year" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldSize

func (m *ImportScanFileMutation) OldSize(ctx context.Context) (v int64, err error)

OldSize returns the old "size" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldSourcePath

func (m *ImportScanFileMutation) OldSourcePath(ctx context.Context) (v string, err error)

OldSourcePath returns the old "source_path" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldTmdbID

func (m *ImportScanFileMutation) OldTmdbID(ctx context.Context) (v uint32, err error)

OldTmdbID returns the old "tmdb_id" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) OldUpdateTime

func (m *ImportScanFileMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the ImportScanFile entity. If the ImportScanFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanFileMutation) Op

func (m *ImportScanFileMutation) Op() Op

Op returns the operation name.

func (*ImportScanFileMutation) Outcome

func (m *ImportScanFileMutation) Outcome() (r importscanfile.Outcome, exists bool)

Outcome returns the value of the "outcome" field in the mutation.

func (*ImportScanFileMutation) OutcomeMessage

func (m *ImportScanFileMutation) OutcomeMessage() (r string, exists bool)

OutcomeMessage returns the value of the "outcome_message" field in the mutation.

func (*ImportScanFileMutation) OutcomeMessageCleared

func (m *ImportScanFileMutation) OutcomeMessageCleared() bool

OutcomeMessageCleared returns if the "outcome_message" field was cleared in this mutation.

func (*ImportScanFileMutation) ParsedQuality

func (m *ImportScanFileMutation) ParsedQuality() (r string, exists bool)

ParsedQuality returns the value of the "parsed_quality" field in the mutation.

func (*ImportScanFileMutation) ParsedQualityCleared

func (m *ImportScanFileMutation) ParsedQualityCleared() bool

ParsedQualityCleared returns if the "parsed_quality" field was cleared in this mutation.

func (*ImportScanFileMutation) ParsedReleaseGroup

func (m *ImportScanFileMutation) ParsedReleaseGroup() (r string, exists bool)

ParsedReleaseGroup returns the value of the "parsed_release_group" field in the mutation.

func (*ImportScanFileMutation) ParsedReleaseGroupCleared

func (m *ImportScanFileMutation) ParsedReleaseGroupCleared() bool

ParsedReleaseGroupCleared returns if the "parsed_release_group" field was cleared in this mutation.

func (*ImportScanFileMutation) ParsedTitle

func (m *ImportScanFileMutation) ParsedTitle() (r string, exists bool)

ParsedTitle returns the value of the "parsed_title" field in the mutation.

func (*ImportScanFileMutation) ParsedTitleCleared

func (m *ImportScanFileMutation) ParsedTitleCleared() bool

ParsedTitleCleared returns if the "parsed_title" field was cleared in this mutation.

func (*ImportScanFileMutation) ParsedYear

func (m *ImportScanFileMutation) ParsedYear() (r uint16, exists bool)

ParsedYear returns the value of the "parsed_year" field in the mutation.

func (*ImportScanFileMutation) ParsedYearCleared

func (m *ImportScanFileMutation) ParsedYearCleared() bool

ParsedYearCleared returns if the "parsed_year" field was cleared in this mutation.

func (*ImportScanFileMutation) RemovedEdges

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

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

func (*ImportScanFileMutation) RemovedIDs

func (m *ImportScanFileMutation) 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 (*ImportScanFileMutation) ResetCandidates

func (m *ImportScanFileMutation) ResetCandidates()

ResetCandidates resets all changes to the "candidates" field.

func (*ImportScanFileMutation) ResetClassification

func (m *ImportScanFileMutation) ResetClassification()

ResetClassification resets all changes to the "classification" field.

func (*ImportScanFileMutation) ResetCreateTime

func (m *ImportScanFileMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ImportScanFileMutation) ResetCreatedMovieID

func (m *ImportScanFileMutation) ResetCreatedMovieID()

ResetCreatedMovieID resets all changes to the "created_movie_id" field.

func (*ImportScanFileMutation) ResetDecision

func (m *ImportScanFileMutation) ResetDecision()

ResetDecision resets all changes to the "decision" field.

func (*ImportScanFileMutation) ResetDecisionTmdbID

func (m *ImportScanFileMutation) ResetDecisionTmdbID()

ResetDecisionTmdbID resets all changes to the "decision_tmdb_id" field.

func (*ImportScanFileMutation) ResetEdge

func (m *ImportScanFileMutation) 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 (*ImportScanFileMutation) ResetExistingMovieID

func (m *ImportScanFileMutation) ResetExistingMovieID()

ResetExistingMovieID resets all changes to the "existing_movie_id" field.

func (*ImportScanFileMutation) ResetField

func (m *ImportScanFileMutation) 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 (*ImportScanFileMutation) ResetOutcome

func (m *ImportScanFileMutation) ResetOutcome()

ResetOutcome resets all changes to the "outcome" field.

func (*ImportScanFileMutation) ResetOutcomeMessage

func (m *ImportScanFileMutation) ResetOutcomeMessage()

ResetOutcomeMessage resets all changes to the "outcome_message" field.

func (*ImportScanFileMutation) ResetParsedQuality

func (m *ImportScanFileMutation) ResetParsedQuality()

ResetParsedQuality resets all changes to the "parsed_quality" field.

func (*ImportScanFileMutation) ResetParsedReleaseGroup

func (m *ImportScanFileMutation) ResetParsedReleaseGroup()

ResetParsedReleaseGroup resets all changes to the "parsed_release_group" field.

func (*ImportScanFileMutation) ResetParsedTitle

func (m *ImportScanFileMutation) ResetParsedTitle()

ResetParsedTitle resets all changes to the "parsed_title" field.

func (*ImportScanFileMutation) ResetParsedYear

func (m *ImportScanFileMutation) ResetParsedYear()

ResetParsedYear resets all changes to the "parsed_year" field.

func (*ImportScanFileMutation) ResetScan

func (m *ImportScanFileMutation) ResetScan()

ResetScan resets all changes to the "scan" edge.

func (*ImportScanFileMutation) ResetSize

func (m *ImportScanFileMutation) ResetSize()

ResetSize resets all changes to the "size" field.

func (*ImportScanFileMutation) ResetSourcePath

func (m *ImportScanFileMutation) ResetSourcePath()

ResetSourcePath resets all changes to the "source_path" field.

func (*ImportScanFileMutation) ResetTmdbID

func (m *ImportScanFileMutation) ResetTmdbID()

ResetTmdbID resets all changes to the "tmdb_id" field.

func (*ImportScanFileMutation) ResetUpdateTime

func (m *ImportScanFileMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*ImportScanFileMutation) ScanCleared

func (m *ImportScanFileMutation) ScanCleared() bool

ScanCleared reports if the "scan" edge to the ImportScan entity was cleared.

func (*ImportScanFileMutation) ScanID

func (m *ImportScanFileMutation) ScanID() (id uint32, exists bool)

ScanID returns the "scan" edge ID in the mutation.

func (*ImportScanFileMutation) ScanIDs

func (m *ImportScanFileMutation) ScanIDs() (ids []uint32)

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

func (*ImportScanFileMutation) SetCandidates

func (m *ImportScanFileMutation) SetCandidates(sc []schema.ScannedCandidate)

SetCandidates sets the "candidates" field.

func (*ImportScanFileMutation) SetClassification

func (m *ImportScanFileMutation) SetClassification(i importscanfile.Classification)

SetClassification sets the "classification" field.

func (*ImportScanFileMutation) SetCreateTime

func (m *ImportScanFileMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ImportScanFileMutation) SetCreatedMovieID

func (m *ImportScanFileMutation) SetCreatedMovieID(u uint32)

SetCreatedMovieID sets the "created_movie_id" field.

func (*ImportScanFileMutation) SetDecision

SetDecision sets the "decision" field.

func (*ImportScanFileMutation) SetDecisionTmdbID

func (m *ImportScanFileMutation) SetDecisionTmdbID(u uint32)

SetDecisionTmdbID sets the "decision_tmdb_id" field.

func (*ImportScanFileMutation) SetExistingMovieID

func (m *ImportScanFileMutation) SetExistingMovieID(u uint32)

SetExistingMovieID sets the "existing_movie_id" field.

func (*ImportScanFileMutation) SetField

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

func (m *ImportScanFileMutation) SetID(id uint32)

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

func (*ImportScanFileMutation) SetOp

func (m *ImportScanFileMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ImportScanFileMutation) SetOutcome

SetOutcome sets the "outcome" field.

func (*ImportScanFileMutation) SetOutcomeMessage

func (m *ImportScanFileMutation) SetOutcomeMessage(s string)

SetOutcomeMessage sets the "outcome_message" field.

func (*ImportScanFileMutation) SetParsedQuality

func (m *ImportScanFileMutation) SetParsedQuality(s string)

SetParsedQuality sets the "parsed_quality" field.

func (*ImportScanFileMutation) SetParsedReleaseGroup

func (m *ImportScanFileMutation) SetParsedReleaseGroup(s string)

SetParsedReleaseGroup sets the "parsed_release_group" field.

func (*ImportScanFileMutation) SetParsedTitle

func (m *ImportScanFileMutation) SetParsedTitle(s string)

SetParsedTitle sets the "parsed_title" field.

func (*ImportScanFileMutation) SetParsedYear

func (m *ImportScanFileMutation) SetParsedYear(u uint16)

SetParsedYear sets the "parsed_year" field.

func (*ImportScanFileMutation) SetScanID

func (m *ImportScanFileMutation) SetScanID(id uint32)

SetScanID sets the "scan" edge to the ImportScan entity by id.

func (*ImportScanFileMutation) SetSize

func (m *ImportScanFileMutation) SetSize(i int64)

SetSize sets the "size" field.

func (*ImportScanFileMutation) SetSourcePath

func (m *ImportScanFileMutation) SetSourcePath(s string)

SetSourcePath sets the "source_path" field.

func (*ImportScanFileMutation) SetTmdbID

func (m *ImportScanFileMutation) SetTmdbID(u uint32)

SetTmdbID sets the "tmdb_id" field.

func (*ImportScanFileMutation) SetUpdateTime

func (m *ImportScanFileMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*ImportScanFileMutation) Size

func (m *ImportScanFileMutation) Size() (r int64, exists bool)

Size returns the value of the "size" field in the mutation.

func (*ImportScanFileMutation) SourcePath

func (m *ImportScanFileMutation) SourcePath() (r string, exists bool)

SourcePath returns the value of the "source_path" field in the mutation.

func (*ImportScanFileMutation) TmdbID

func (m *ImportScanFileMutation) TmdbID() (r uint32, exists bool)

TmdbID returns the value of the "tmdb_id" field in the mutation.

func (*ImportScanFileMutation) TmdbIDCleared

func (m *ImportScanFileMutation) TmdbIDCleared() bool

TmdbIDCleared returns if the "tmdb_id" field was cleared in this mutation.

func (ImportScanFileMutation) Tx

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

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

func (*ImportScanFileMutation) Type

func (m *ImportScanFileMutation) Type() string

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

func (*ImportScanFileMutation) UpdateTime

func (m *ImportScanFileMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*ImportScanFileMutation) Where

Where appends a list predicates to the ImportScanFileMutation builder.

func (*ImportScanFileMutation) WhereP

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

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

type ImportScanFileQuery

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

ImportScanFileQuery is the builder for querying ImportScanFile entities.

func (*ImportScanFileQuery) Aggregate

Aggregate returns a ImportScanFileSelect configured with the given aggregations.

func (*ImportScanFileQuery) All

All executes the query and returns a list of ImportScanFiles.

func (*ImportScanFileQuery) AllX

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

func (*ImportScanFileQuery) Clone

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

func (*ImportScanFileQuery) Count

func (_q *ImportScanFileQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ImportScanFileQuery) CountX

func (_q *ImportScanFileQuery) CountX(ctx context.Context) int

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

func (*ImportScanFileQuery) Exist

func (_q *ImportScanFileQuery) Exist(ctx context.Context) (bool, error)

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

func (*ImportScanFileQuery) ExistX

func (_q *ImportScanFileQuery) ExistX(ctx context.Context) bool

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

func (*ImportScanFileQuery) First

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

func (*ImportScanFileQuery) FirstID

func (_q *ImportScanFileQuery) FirstID(ctx context.Context) (id uint32, err error)

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

func (*ImportScanFileQuery) FirstIDX

func (_q *ImportScanFileQuery) FirstIDX(ctx context.Context) uint32

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

func (*ImportScanFileQuery) FirstX

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

func (*ImportScanFileQuery) GroupBy

func (_q *ImportScanFileQuery) GroupBy(field string, fields ...string) *ImportScanFileGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ImportScanFile.Query().
	GroupBy(importscanfile.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ImportScanFileQuery) IDs

func (_q *ImportScanFileQuery) IDs(ctx context.Context) (ids []uint32, err error)

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

func (*ImportScanFileQuery) IDsX

func (_q *ImportScanFileQuery) IDsX(ctx context.Context) []uint32

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

func (*ImportScanFileQuery) Limit

func (_q *ImportScanFileQuery) Limit(limit int) *ImportScanFileQuery

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

func (*ImportScanFileQuery) Offset

func (_q *ImportScanFileQuery) Offset(offset int) *ImportScanFileQuery

Offset to start from.

func (*ImportScanFileQuery) Only

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

func (*ImportScanFileQuery) OnlyID

func (_q *ImportScanFileQuery) OnlyID(ctx context.Context) (id uint32, err error)

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

func (*ImportScanFileQuery) OnlyIDX

func (_q *ImportScanFileQuery) OnlyIDX(ctx context.Context) uint32

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

func (*ImportScanFileQuery) OnlyX

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

func (*ImportScanFileQuery) Order

Order specifies how the records should be ordered.

func (*ImportScanFileQuery) QueryScan

func (_q *ImportScanFileQuery) QueryScan() *ImportScanQuery

QueryScan chains the current query on the "scan" edge.

func (*ImportScanFileQuery) Select

func (_q *ImportScanFileQuery) Select(fields ...string) *ImportScanFileSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.ImportScanFile.Query().
	Select(importscanfile.FieldCreateTime).
	Scan(ctx, &v)

func (*ImportScanFileQuery) Unique

func (_q *ImportScanFileQuery) Unique(unique bool) *ImportScanFileQuery

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

Where adds a new predicate for the ImportScanFileQuery builder.

func (*ImportScanFileQuery) WithScan

func (_q *ImportScanFileQuery) WithScan(opts ...func(*ImportScanQuery)) *ImportScanFileQuery

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

type ImportScanFileSelect

type ImportScanFileSelect struct {
	*ImportScanFileQuery
	// contains filtered or unexported fields
}

ImportScanFileSelect is the builder for selecting fields of ImportScanFile entities.

func (*ImportScanFileSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ImportScanFileSelect) Bool

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

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

func (*ImportScanFileSelect) BoolX

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

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

func (*ImportScanFileSelect) Bools

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

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

func (*ImportScanFileSelect) BoolsX

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

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

func (*ImportScanFileSelect) Float64

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

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

func (*ImportScanFileSelect) Float64X

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

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

func (*ImportScanFileSelect) Float64s

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

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

func (*ImportScanFileSelect) Float64sX

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

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

func (*ImportScanFileSelect) Int

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

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

func (*ImportScanFileSelect) IntX

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

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

func (*ImportScanFileSelect) Ints

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

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

func (*ImportScanFileSelect) IntsX

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

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

func (*ImportScanFileSelect) Scan

func (_s *ImportScanFileSelect) Scan(ctx context.Context, v any) error

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

func (*ImportScanFileSelect) ScanX

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

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

func (*ImportScanFileSelect) String

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

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

func (*ImportScanFileSelect) StringX

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

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

func (*ImportScanFileSelect) Strings

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

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

func (*ImportScanFileSelect) StringsX

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

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

type ImportScanFileUpdate

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

ImportScanFileUpdate is the builder for updating ImportScanFile entities.

func (*ImportScanFileUpdate) AddCreatedMovieID

func (_u *ImportScanFileUpdate) AddCreatedMovieID(v int32) *ImportScanFileUpdate

AddCreatedMovieID adds value to the "created_movie_id" field.

func (*ImportScanFileUpdate) AddDecisionTmdbID

func (_u *ImportScanFileUpdate) AddDecisionTmdbID(v int32) *ImportScanFileUpdate

AddDecisionTmdbID adds value to the "decision_tmdb_id" field.

func (*ImportScanFileUpdate) AddExistingMovieID

func (_u *ImportScanFileUpdate) AddExistingMovieID(v int32) *ImportScanFileUpdate

AddExistingMovieID adds value to the "existing_movie_id" field.

func (*ImportScanFileUpdate) AddParsedYear

func (_u *ImportScanFileUpdate) AddParsedYear(v int16) *ImportScanFileUpdate

AddParsedYear adds value to the "parsed_year" field.

func (*ImportScanFileUpdate) AddSize

AddSize adds value to the "size" field.

func (*ImportScanFileUpdate) AddTmdbID

AddTmdbID adds value to the "tmdb_id" field.

func (*ImportScanFileUpdate) AppendCandidates

AppendCandidates appends value to the "candidates" field.

func (*ImportScanFileUpdate) ClearCandidates

func (_u *ImportScanFileUpdate) ClearCandidates() *ImportScanFileUpdate

ClearCandidates clears the value of the "candidates" field.

func (*ImportScanFileUpdate) ClearCreatedMovieID

func (_u *ImportScanFileUpdate) ClearCreatedMovieID() *ImportScanFileUpdate

ClearCreatedMovieID clears the value of the "created_movie_id" field.

func (*ImportScanFileUpdate) ClearDecisionTmdbID

func (_u *ImportScanFileUpdate) ClearDecisionTmdbID() *ImportScanFileUpdate

ClearDecisionTmdbID clears the value of the "decision_tmdb_id" field.

func (*ImportScanFileUpdate) ClearExistingMovieID

func (_u *ImportScanFileUpdate) ClearExistingMovieID() *ImportScanFileUpdate

ClearExistingMovieID clears the value of the "existing_movie_id" field.

func (*ImportScanFileUpdate) ClearOutcomeMessage

func (_u *ImportScanFileUpdate) ClearOutcomeMessage() *ImportScanFileUpdate

ClearOutcomeMessage clears the value of the "outcome_message" field.

func (*ImportScanFileUpdate) ClearParsedQuality

func (_u *ImportScanFileUpdate) ClearParsedQuality() *ImportScanFileUpdate

ClearParsedQuality clears the value of the "parsed_quality" field.

func (*ImportScanFileUpdate) ClearParsedReleaseGroup

func (_u *ImportScanFileUpdate) ClearParsedReleaseGroup() *ImportScanFileUpdate

ClearParsedReleaseGroup clears the value of the "parsed_release_group" field.

func (*ImportScanFileUpdate) ClearParsedTitle

func (_u *ImportScanFileUpdate) ClearParsedTitle() *ImportScanFileUpdate

ClearParsedTitle clears the value of the "parsed_title" field.

func (*ImportScanFileUpdate) ClearParsedYear

func (_u *ImportScanFileUpdate) ClearParsedYear() *ImportScanFileUpdate

ClearParsedYear clears the value of the "parsed_year" field.

func (*ImportScanFileUpdate) ClearScan

func (_u *ImportScanFileUpdate) ClearScan() *ImportScanFileUpdate

ClearScan clears the "scan" edge to the ImportScan entity.

func (*ImportScanFileUpdate) ClearTmdbID

func (_u *ImportScanFileUpdate) ClearTmdbID() *ImportScanFileUpdate

ClearTmdbID clears the value of the "tmdb_id" field.

func (*ImportScanFileUpdate) Exec

func (_u *ImportScanFileUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ImportScanFileUpdate) ExecX

func (_u *ImportScanFileUpdate) ExecX(ctx context.Context)

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

func (*ImportScanFileUpdate) Mutation

Mutation returns the ImportScanFileMutation object of the builder.

func (*ImportScanFileUpdate) Save

func (_u *ImportScanFileUpdate) Save(ctx context.Context) (int, error)

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

func (*ImportScanFileUpdate) SaveX

func (_u *ImportScanFileUpdate) SaveX(ctx context.Context) int

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

func (*ImportScanFileUpdate) SetCandidates

SetCandidates sets the "candidates" field.

func (*ImportScanFileUpdate) SetClassification

SetClassification sets the "classification" field.

func (*ImportScanFileUpdate) SetCreatedMovieID

func (_u *ImportScanFileUpdate) SetCreatedMovieID(v uint32) *ImportScanFileUpdate

SetCreatedMovieID sets the "created_movie_id" field.

func (*ImportScanFileUpdate) SetDecision

SetDecision sets the "decision" field.

func (*ImportScanFileUpdate) SetDecisionTmdbID

func (_u *ImportScanFileUpdate) SetDecisionTmdbID(v uint32) *ImportScanFileUpdate

SetDecisionTmdbID sets the "decision_tmdb_id" field.

func (*ImportScanFileUpdate) SetExistingMovieID

func (_u *ImportScanFileUpdate) SetExistingMovieID(v uint32) *ImportScanFileUpdate

SetExistingMovieID sets the "existing_movie_id" field.

func (*ImportScanFileUpdate) SetNillableClassification

func (_u *ImportScanFileUpdate) SetNillableClassification(v *importscanfile.Classification) *ImportScanFileUpdate

SetNillableClassification sets the "classification" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableCreatedMovieID

func (_u *ImportScanFileUpdate) SetNillableCreatedMovieID(v *uint32) *ImportScanFileUpdate

SetNillableCreatedMovieID sets the "created_movie_id" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableDecision

SetNillableDecision sets the "decision" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableDecisionTmdbID

func (_u *ImportScanFileUpdate) SetNillableDecisionTmdbID(v *uint32) *ImportScanFileUpdate

SetNillableDecisionTmdbID sets the "decision_tmdb_id" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableExistingMovieID

func (_u *ImportScanFileUpdate) SetNillableExistingMovieID(v *uint32) *ImportScanFileUpdate

SetNillableExistingMovieID sets the "existing_movie_id" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableOutcome

SetNillableOutcome sets the "outcome" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableOutcomeMessage

func (_u *ImportScanFileUpdate) SetNillableOutcomeMessage(v *string) *ImportScanFileUpdate

SetNillableOutcomeMessage sets the "outcome_message" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableParsedQuality

func (_u *ImportScanFileUpdate) SetNillableParsedQuality(v *string) *ImportScanFileUpdate

SetNillableParsedQuality sets the "parsed_quality" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableParsedReleaseGroup

func (_u *ImportScanFileUpdate) SetNillableParsedReleaseGroup(v *string) *ImportScanFileUpdate

SetNillableParsedReleaseGroup sets the "parsed_release_group" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableParsedTitle

func (_u *ImportScanFileUpdate) SetNillableParsedTitle(v *string) *ImportScanFileUpdate

SetNillableParsedTitle sets the "parsed_title" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableParsedYear

func (_u *ImportScanFileUpdate) SetNillableParsedYear(v *uint16) *ImportScanFileUpdate

SetNillableParsedYear sets the "parsed_year" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableSize

func (_u *ImportScanFileUpdate) SetNillableSize(v *int64) *ImportScanFileUpdate

SetNillableSize sets the "size" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableSourcePath

func (_u *ImportScanFileUpdate) SetNillableSourcePath(v *string) *ImportScanFileUpdate

SetNillableSourcePath sets the "source_path" field if the given value is not nil.

func (*ImportScanFileUpdate) SetNillableTmdbID

func (_u *ImportScanFileUpdate) SetNillableTmdbID(v *uint32) *ImportScanFileUpdate

SetNillableTmdbID sets the "tmdb_id" field if the given value is not nil.

func (*ImportScanFileUpdate) SetOutcome

SetOutcome sets the "outcome" field.

func (*ImportScanFileUpdate) SetOutcomeMessage

func (_u *ImportScanFileUpdate) SetOutcomeMessage(v string) *ImportScanFileUpdate

SetOutcomeMessage sets the "outcome_message" field.

func (*ImportScanFileUpdate) SetParsedQuality

func (_u *ImportScanFileUpdate) SetParsedQuality(v string) *ImportScanFileUpdate

SetParsedQuality sets the "parsed_quality" field.

func (*ImportScanFileUpdate) SetParsedReleaseGroup

func (_u *ImportScanFileUpdate) SetParsedReleaseGroup(v string) *ImportScanFileUpdate

SetParsedReleaseGroup sets the "parsed_release_group" field.

func (*ImportScanFileUpdate) SetParsedTitle

func (_u *ImportScanFileUpdate) SetParsedTitle(v string) *ImportScanFileUpdate

SetParsedTitle sets the "parsed_title" field.

func (*ImportScanFileUpdate) SetParsedYear

func (_u *ImportScanFileUpdate) SetParsedYear(v uint16) *ImportScanFileUpdate

SetParsedYear sets the "parsed_year" field.

func (*ImportScanFileUpdate) SetScan

SetScan sets the "scan" edge to the ImportScan entity.

func (*ImportScanFileUpdate) SetScanID

SetScanID sets the "scan" edge to the ImportScan entity by ID.

func (*ImportScanFileUpdate) SetSize

SetSize sets the "size" field.

func (*ImportScanFileUpdate) SetSourcePath

func (_u *ImportScanFileUpdate) SetSourcePath(v string) *ImportScanFileUpdate

SetSourcePath sets the "source_path" field.

func (*ImportScanFileUpdate) SetTmdbID

SetTmdbID sets the "tmdb_id" field.

func (*ImportScanFileUpdate) SetUpdateTime

func (_u *ImportScanFileUpdate) SetUpdateTime(v time.Time) *ImportScanFileUpdate

SetUpdateTime sets the "update_time" field.

func (*ImportScanFileUpdate) Where

Where appends a list predicates to the ImportScanFileUpdate builder.

type ImportScanFileUpdateOne

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

ImportScanFileUpdateOne is the builder for updating a single ImportScanFile entity.

func (*ImportScanFileUpdateOne) AddCreatedMovieID

func (_u *ImportScanFileUpdateOne) AddCreatedMovieID(v int32) *ImportScanFileUpdateOne

AddCreatedMovieID adds value to the "created_movie_id" field.

func (*ImportScanFileUpdateOne) AddDecisionTmdbID

func (_u *ImportScanFileUpdateOne) AddDecisionTmdbID(v int32) *ImportScanFileUpdateOne

AddDecisionTmdbID adds value to the "decision_tmdb_id" field.

func (*ImportScanFileUpdateOne) AddExistingMovieID

func (_u *ImportScanFileUpdateOne) AddExistingMovieID(v int32) *ImportScanFileUpdateOne

AddExistingMovieID adds value to the "existing_movie_id" field.

func (*ImportScanFileUpdateOne) AddParsedYear

AddParsedYear adds value to the "parsed_year" field.

func (*ImportScanFileUpdateOne) AddSize

AddSize adds value to the "size" field.

func (*ImportScanFileUpdateOne) AddTmdbID

AddTmdbID adds value to the "tmdb_id" field.

func (*ImportScanFileUpdateOne) AppendCandidates

AppendCandidates appends value to the "candidates" field.

func (*ImportScanFileUpdateOne) ClearCandidates

func (_u *ImportScanFileUpdateOne) ClearCandidates() *ImportScanFileUpdateOne

ClearCandidates clears the value of the "candidates" field.

func (*ImportScanFileUpdateOne) ClearCreatedMovieID

func (_u *ImportScanFileUpdateOne) ClearCreatedMovieID() *ImportScanFileUpdateOne

ClearCreatedMovieID clears the value of the "created_movie_id" field.

func (*ImportScanFileUpdateOne) ClearDecisionTmdbID

func (_u *ImportScanFileUpdateOne) ClearDecisionTmdbID() *ImportScanFileUpdateOne

ClearDecisionTmdbID clears the value of the "decision_tmdb_id" field.

func (*ImportScanFileUpdateOne) ClearExistingMovieID

func (_u *ImportScanFileUpdateOne) ClearExistingMovieID() *ImportScanFileUpdateOne

ClearExistingMovieID clears the value of the "existing_movie_id" field.

func (*ImportScanFileUpdateOne) ClearOutcomeMessage

func (_u *ImportScanFileUpdateOne) ClearOutcomeMessage() *ImportScanFileUpdateOne

ClearOutcomeMessage clears the value of the "outcome_message" field.

func (*ImportScanFileUpdateOne) ClearParsedQuality

func (_u *ImportScanFileUpdateOne) ClearParsedQuality() *ImportScanFileUpdateOne

ClearParsedQuality clears the value of the "parsed_quality" field.

func (*ImportScanFileUpdateOne) ClearParsedReleaseGroup

func (_u *ImportScanFileUpdateOne) ClearParsedReleaseGroup() *ImportScanFileUpdateOne

ClearParsedReleaseGroup clears the value of the "parsed_release_group" field.

func (*ImportScanFileUpdateOne) ClearParsedTitle

func (_u *ImportScanFileUpdateOne) ClearParsedTitle() *ImportScanFileUpdateOne

ClearParsedTitle clears the value of the "parsed_title" field.

func (*ImportScanFileUpdateOne) ClearParsedYear

func (_u *ImportScanFileUpdateOne) ClearParsedYear() *ImportScanFileUpdateOne

ClearParsedYear clears the value of the "parsed_year" field.

func (*ImportScanFileUpdateOne) ClearScan

ClearScan clears the "scan" edge to the ImportScan entity.

func (*ImportScanFileUpdateOne) ClearTmdbID

ClearTmdbID clears the value of the "tmdb_id" field.

func (*ImportScanFileUpdateOne) Exec

Exec executes the query on the entity.

func (*ImportScanFileUpdateOne) ExecX

func (_u *ImportScanFileUpdateOne) ExecX(ctx context.Context)

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

func (*ImportScanFileUpdateOne) Mutation

Mutation returns the ImportScanFileMutation object of the builder.

func (*ImportScanFileUpdateOne) Save

Save executes the query and returns the updated ImportScanFile entity.

func (*ImportScanFileUpdateOne) SaveX

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

func (*ImportScanFileUpdateOne) Select

func (_u *ImportScanFileUpdateOne) Select(field string, fields ...string) *ImportScanFileUpdateOne

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

func (*ImportScanFileUpdateOne) SetCandidates

SetCandidates sets the "candidates" field.

func (*ImportScanFileUpdateOne) SetClassification

SetClassification sets the "classification" field.

func (*ImportScanFileUpdateOne) SetCreatedMovieID

func (_u *ImportScanFileUpdateOne) SetCreatedMovieID(v uint32) *ImportScanFileUpdateOne

SetCreatedMovieID sets the "created_movie_id" field.

func (*ImportScanFileUpdateOne) SetDecision

SetDecision sets the "decision" field.

func (*ImportScanFileUpdateOne) SetDecisionTmdbID

func (_u *ImportScanFileUpdateOne) SetDecisionTmdbID(v uint32) *ImportScanFileUpdateOne

SetDecisionTmdbID sets the "decision_tmdb_id" field.

func (*ImportScanFileUpdateOne) SetExistingMovieID

func (_u *ImportScanFileUpdateOne) SetExistingMovieID(v uint32) *ImportScanFileUpdateOne

SetExistingMovieID sets the "existing_movie_id" field.

func (*ImportScanFileUpdateOne) SetNillableClassification

SetNillableClassification sets the "classification" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableCreatedMovieID

func (_u *ImportScanFileUpdateOne) SetNillableCreatedMovieID(v *uint32) *ImportScanFileUpdateOne

SetNillableCreatedMovieID sets the "created_movie_id" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableDecision

SetNillableDecision sets the "decision" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableDecisionTmdbID

func (_u *ImportScanFileUpdateOne) SetNillableDecisionTmdbID(v *uint32) *ImportScanFileUpdateOne

SetNillableDecisionTmdbID sets the "decision_tmdb_id" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableExistingMovieID

func (_u *ImportScanFileUpdateOne) SetNillableExistingMovieID(v *uint32) *ImportScanFileUpdateOne

SetNillableExistingMovieID sets the "existing_movie_id" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableOutcome

SetNillableOutcome sets the "outcome" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableOutcomeMessage

func (_u *ImportScanFileUpdateOne) SetNillableOutcomeMessage(v *string) *ImportScanFileUpdateOne

SetNillableOutcomeMessage sets the "outcome_message" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableParsedQuality

func (_u *ImportScanFileUpdateOne) SetNillableParsedQuality(v *string) *ImportScanFileUpdateOne

SetNillableParsedQuality sets the "parsed_quality" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableParsedReleaseGroup

func (_u *ImportScanFileUpdateOne) SetNillableParsedReleaseGroup(v *string) *ImportScanFileUpdateOne

SetNillableParsedReleaseGroup sets the "parsed_release_group" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableParsedTitle

func (_u *ImportScanFileUpdateOne) SetNillableParsedTitle(v *string) *ImportScanFileUpdateOne

SetNillableParsedTitle sets the "parsed_title" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableParsedYear

func (_u *ImportScanFileUpdateOne) SetNillableParsedYear(v *uint16) *ImportScanFileUpdateOne

SetNillableParsedYear sets the "parsed_year" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableSize

func (_u *ImportScanFileUpdateOne) SetNillableSize(v *int64) *ImportScanFileUpdateOne

SetNillableSize sets the "size" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableSourcePath

func (_u *ImportScanFileUpdateOne) SetNillableSourcePath(v *string) *ImportScanFileUpdateOne

SetNillableSourcePath sets the "source_path" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetNillableTmdbID

func (_u *ImportScanFileUpdateOne) SetNillableTmdbID(v *uint32) *ImportScanFileUpdateOne

SetNillableTmdbID sets the "tmdb_id" field if the given value is not nil.

func (*ImportScanFileUpdateOne) SetOutcome

SetOutcome sets the "outcome" field.

func (*ImportScanFileUpdateOne) SetOutcomeMessage

func (_u *ImportScanFileUpdateOne) SetOutcomeMessage(v string) *ImportScanFileUpdateOne

SetOutcomeMessage sets the "outcome_message" field.

func (*ImportScanFileUpdateOne) SetParsedQuality

func (_u *ImportScanFileUpdateOne) SetParsedQuality(v string) *ImportScanFileUpdateOne

SetParsedQuality sets the "parsed_quality" field.

func (*ImportScanFileUpdateOne) SetParsedReleaseGroup

func (_u *ImportScanFileUpdateOne) SetParsedReleaseGroup(v string) *ImportScanFileUpdateOne

SetParsedReleaseGroup sets the "parsed_release_group" field.

func (*ImportScanFileUpdateOne) SetParsedTitle

SetParsedTitle sets the "parsed_title" field.

func (*ImportScanFileUpdateOne) SetParsedYear

SetParsedYear sets the "parsed_year" field.

func (*ImportScanFileUpdateOne) SetScan

SetScan sets the "scan" edge to the ImportScan entity.

func (*ImportScanFileUpdateOne) SetScanID

SetScanID sets the "scan" edge to the ImportScan entity by ID.

func (*ImportScanFileUpdateOne) SetSize

SetSize sets the "size" field.

func (*ImportScanFileUpdateOne) SetSourcePath

SetSourcePath sets the "source_path" field.

func (*ImportScanFileUpdateOne) SetTmdbID

SetTmdbID sets the "tmdb_id" field.

func (*ImportScanFileUpdateOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*ImportScanFileUpdateOne) Where

Where appends a list predicates to the ImportScanFileUpdate builder.

type ImportScanFiles

type ImportScanFiles []*ImportScanFile

ImportScanFiles is a parsable slice of ImportScanFile.

type ImportScanGroupBy

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

ImportScanGroupBy is the group-by builder for ImportScan entities.

func (*ImportScanGroupBy) Aggregate

func (_g *ImportScanGroupBy) Aggregate(fns ...AggregateFunc) *ImportScanGroupBy

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

func (*ImportScanGroupBy) Bool

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

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

func (*ImportScanGroupBy) BoolX

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

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

func (*ImportScanGroupBy) Bools

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

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

func (*ImportScanGroupBy) BoolsX

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

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

func (*ImportScanGroupBy) Float64

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

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

func (*ImportScanGroupBy) Float64X

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

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

func (*ImportScanGroupBy) Float64s

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

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

func (*ImportScanGroupBy) Float64sX

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

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

func (*ImportScanGroupBy) Int

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

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

func (*ImportScanGroupBy) IntX

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

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

func (*ImportScanGroupBy) Ints

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

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

func (*ImportScanGroupBy) IntsX

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

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

func (*ImportScanGroupBy) Scan

func (_g *ImportScanGroupBy) Scan(ctx context.Context, v any) error

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

func (*ImportScanGroupBy) ScanX

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

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

func (*ImportScanGroupBy) String

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

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

func (*ImportScanGroupBy) StringX

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

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

func (*ImportScanGroupBy) Strings

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

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

func (*ImportScanGroupBy) StringsX

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

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

type ImportScanMutation

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

ImportScanMutation represents an operation that mutates the ImportScan nodes in the graph.

func (*ImportScanMutation) AddCommitFailedCount

func (m *ImportScanMutation) AddCommitFailedCount(u int32)

AddCommitFailedCount adds u to the "commit_failed_count" field.

func (*ImportScanMutation) AddCommitSuccessCount

func (m *ImportScanMutation) AddCommitSuccessCount(u int32)

AddCommitSuccessCount adds u to the "commit_success_count" field.

func (*ImportScanMutation) AddField

func (m *ImportScanMutation) 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 (*ImportScanMutation) AddFileIDs

func (m *ImportScanMutation) AddFileIDs(ids ...uint32)

AddFileIDs adds the "files" edge to the ImportScanFile entity by ids.

func (*ImportScanMutation) AddProcessedCount

func (m *ImportScanMutation) AddProcessedCount(u int32)

AddProcessedCount adds u to the "processed_count" field.

func (*ImportScanMutation) AddShowIDs

func (m *ImportScanMutation) AddShowIDs(ids ...uint32)

AddShowIDs adds the "shows" edge to the ImportScanShow entity by ids.

func (*ImportScanMutation) AddTotalCount

func (m *ImportScanMutation) AddTotalCount(u int32)

AddTotalCount adds u to the "total_count" field.

func (*ImportScanMutation) AddedCommitFailedCount

func (m *ImportScanMutation) AddedCommitFailedCount() (r int32, exists bool)

AddedCommitFailedCount returns the value that was added to the "commit_failed_count" field in this mutation.

func (*ImportScanMutation) AddedCommitSuccessCount

func (m *ImportScanMutation) AddedCommitSuccessCount() (r int32, exists bool)

AddedCommitSuccessCount returns the value that was added to the "commit_success_count" field in this mutation.

func (*ImportScanMutation) AddedEdges

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

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

func (*ImportScanMutation) AddedField

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

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

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

func (*ImportScanMutation) AddedIDs

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

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

func (*ImportScanMutation) AddedProcessedCount

func (m *ImportScanMutation) AddedProcessedCount() (r int32, exists bool)

AddedProcessedCount returns the value that was added to the "processed_count" field in this mutation.

func (*ImportScanMutation) AddedTotalCount

func (m *ImportScanMutation) AddedTotalCount() (r int32, exists bool)

AddedTotalCount returns the value that was added to the "total_count" field in this mutation.

func (*ImportScanMutation) ClearCommittedAt

func (m *ImportScanMutation) ClearCommittedAt()

ClearCommittedAt clears the value of the "committed_at" field.

func (*ImportScanMutation) ClearEdge

func (m *ImportScanMutation) 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 (*ImportScanMutation) ClearFailureReason

func (m *ImportScanMutation) ClearFailureReason()

ClearFailureReason clears the value of the "failure_reason" field.

func (*ImportScanMutation) ClearField

func (m *ImportScanMutation) 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 (*ImportScanMutation) ClearFiles

func (m *ImportScanMutation) ClearFiles()

ClearFiles clears the "files" edge to the ImportScanFile entity.

func (*ImportScanMutation) ClearImportMode

func (m *ImportScanMutation) ClearImportMode()

ClearImportMode clears the value of the "import_mode" field.

func (*ImportScanMutation) ClearScannedAt

func (m *ImportScanMutation) ClearScannedAt()

ClearScannedAt clears the value of the "scanned_at" field.

func (*ImportScanMutation) ClearShows

func (m *ImportScanMutation) ClearShows()

ClearShows clears the "shows" edge to the ImportScanShow entity.

func (*ImportScanMutation) ClearedEdges

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

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

func (*ImportScanMutation) ClearedFields

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

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

func (ImportScanMutation) Client

func (m ImportScanMutation) 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 (*ImportScanMutation) CommitFailedCount

func (m *ImportScanMutation) CommitFailedCount() (r uint32, exists bool)

CommitFailedCount returns the value of the "commit_failed_count" field in the mutation.

func (*ImportScanMutation) CommitSuccessCount

func (m *ImportScanMutation) CommitSuccessCount() (r uint32, exists bool)

CommitSuccessCount returns the value of the "commit_success_count" field in the mutation.

func (*ImportScanMutation) CommittedAt

func (m *ImportScanMutation) CommittedAt() (r time.Time, exists bool)

CommittedAt returns the value of the "committed_at" field in the mutation.

func (*ImportScanMutation) CommittedAtCleared

func (m *ImportScanMutation) CommittedAtCleared() bool

CommittedAtCleared returns if the "committed_at" field was cleared in this mutation.

func (*ImportScanMutation) CreateTime

func (m *ImportScanMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ImportScanMutation) EdgeCleared

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

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

func (*ImportScanMutation) FailureReason

func (m *ImportScanMutation) FailureReason() (r string, exists bool)

FailureReason returns the value of the "failure_reason" field in the mutation.

func (*ImportScanMutation) FailureReasonCleared

func (m *ImportScanMutation) FailureReasonCleared() bool

FailureReasonCleared returns if the "failure_reason" field was cleared in this mutation.

func (*ImportScanMutation) Field

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

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

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

func (*ImportScanMutation) Fields

func (m *ImportScanMutation) 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 (*ImportScanMutation) FilesCleared

func (m *ImportScanMutation) FilesCleared() bool

FilesCleared reports if the "files" edge to the ImportScanFile entity was cleared.

func (*ImportScanMutation) FilesIDs

func (m *ImportScanMutation) FilesIDs() (ids []uint32)

FilesIDs returns the "files" edge IDs in the mutation.

func (*ImportScanMutation) ID

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

func (m *ImportScanMutation) IDs(ctx context.Context) ([]uint32, 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 (*ImportScanMutation) ImportMode

func (m *ImportScanMutation) ImportMode() (r importscan.ImportMode, exists bool)

ImportMode returns the value of the "import_mode" field in the mutation.

func (*ImportScanMutation) ImportModeCleared

func (m *ImportScanMutation) ImportModeCleared() bool

ImportModeCleared returns if the "import_mode" field was cleared in this mutation.

func (*ImportScanMutation) Kind

func (m *ImportScanMutation) Kind() (r importscan.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*ImportScanMutation) Mode

func (m *ImportScanMutation) Mode() (r importscan.Mode, exists bool)

Mode returns the value of the "mode" field in the mutation.

func (*ImportScanMutation) OldCommitFailedCount

func (m *ImportScanMutation) OldCommitFailedCount(ctx context.Context) (v uint32, err error)

OldCommitFailedCount returns the old "commit_failed_count" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldCommitSuccessCount

func (m *ImportScanMutation) OldCommitSuccessCount(ctx context.Context) (v uint32, err error)

OldCommitSuccessCount returns the old "commit_success_count" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldCommittedAt

func (m *ImportScanMutation) OldCommittedAt(ctx context.Context) (v *time.Time, err error)

OldCommittedAt returns the old "committed_at" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldCreateTime

func (m *ImportScanMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldFailureReason

func (m *ImportScanMutation) OldFailureReason(ctx context.Context) (v string, err error)

OldFailureReason returns the old "failure_reason" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldField

func (m *ImportScanMutation) 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 (*ImportScanMutation) OldImportMode

func (m *ImportScanMutation) OldImportMode(ctx context.Context) (v importscan.ImportMode, err error)

OldImportMode returns the old "import_mode" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldKind

func (m *ImportScanMutation) OldKind(ctx context.Context) (v importscan.Kind, err error)

OldKind returns the old "kind" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldMode

func (m *ImportScanMutation) OldMode(ctx context.Context) (v importscan.Mode, err error)

OldMode returns the old "mode" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldProcessedCount

func (m *ImportScanMutation) OldProcessedCount(ctx context.Context) (v uint32, err error)

OldProcessedCount returns the old "processed_count" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldScannedAt

func (m *ImportScanMutation) OldScannedAt(ctx context.Context) (v *time.Time, err error)

OldScannedAt returns the old "scanned_at" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldSourcePath

func (m *ImportScanMutation) OldSourcePath(ctx context.Context) (v string, err error)

OldSourcePath returns the old "source_path" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldStatus

func (m *ImportScanMutation) OldStatus(ctx context.Context) (v importscan.Status, err error)

OldStatus returns the old "status" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldTotalCount

func (m *ImportScanMutation) OldTotalCount(ctx context.Context) (v uint32, err error)

OldTotalCount returns the old "total_count" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) OldUpdateTime

func (m *ImportScanMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the ImportScan entity. If the ImportScan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanMutation) Op

func (m *ImportScanMutation) Op() Op

Op returns the operation name.

func (*ImportScanMutation) ProcessedCount

func (m *ImportScanMutation) ProcessedCount() (r uint32, exists bool)

ProcessedCount returns the value of the "processed_count" field in the mutation.

func (*ImportScanMutation) RemoveFileIDs

func (m *ImportScanMutation) RemoveFileIDs(ids ...uint32)

RemoveFileIDs removes the "files" edge to the ImportScanFile entity by IDs.

func (*ImportScanMutation) RemoveShowIDs

func (m *ImportScanMutation) RemoveShowIDs(ids ...uint32)

RemoveShowIDs removes the "shows" edge to the ImportScanShow entity by IDs.

func (*ImportScanMutation) RemovedEdges

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

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

func (*ImportScanMutation) RemovedFilesIDs

func (m *ImportScanMutation) RemovedFilesIDs() (ids []uint32)

RemovedFiles returns the removed IDs of the "files" edge to the ImportScanFile entity.

func (*ImportScanMutation) RemovedIDs

func (m *ImportScanMutation) 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 (*ImportScanMutation) RemovedShowsIDs

func (m *ImportScanMutation) RemovedShowsIDs() (ids []uint32)

RemovedShows returns the removed IDs of the "shows" edge to the ImportScanShow entity.

func (*ImportScanMutation) ResetCommitFailedCount

func (m *ImportScanMutation) ResetCommitFailedCount()

ResetCommitFailedCount resets all changes to the "commit_failed_count" field.

func (*ImportScanMutation) ResetCommitSuccessCount

func (m *ImportScanMutation) ResetCommitSuccessCount()

ResetCommitSuccessCount resets all changes to the "commit_success_count" field.

func (*ImportScanMutation) ResetCommittedAt

func (m *ImportScanMutation) ResetCommittedAt()

ResetCommittedAt resets all changes to the "committed_at" field.

func (*ImportScanMutation) ResetCreateTime

func (m *ImportScanMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ImportScanMutation) ResetEdge

func (m *ImportScanMutation) 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 (*ImportScanMutation) ResetFailureReason

func (m *ImportScanMutation) ResetFailureReason()

ResetFailureReason resets all changes to the "failure_reason" field.

func (*ImportScanMutation) ResetField

func (m *ImportScanMutation) 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 (*ImportScanMutation) ResetFiles

func (m *ImportScanMutation) ResetFiles()

ResetFiles resets all changes to the "files" edge.

func (*ImportScanMutation) ResetImportMode

func (m *ImportScanMutation) ResetImportMode()

ResetImportMode resets all changes to the "import_mode" field.

func (*ImportScanMutation) ResetKind

func (m *ImportScanMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*ImportScanMutation) ResetMode

func (m *ImportScanMutation) ResetMode()

ResetMode resets all changes to the "mode" field.

func (*ImportScanMutation) ResetProcessedCount

func (m *ImportScanMutation) ResetProcessedCount()

ResetProcessedCount resets all changes to the "processed_count" field.

func (*ImportScanMutation) ResetScannedAt

func (m *ImportScanMutation) ResetScannedAt()

ResetScannedAt resets all changes to the "scanned_at" field.

func (*ImportScanMutation) ResetShows

func (m *ImportScanMutation) ResetShows()

ResetShows resets all changes to the "shows" edge.

func (*ImportScanMutation) ResetSourcePath

func (m *ImportScanMutation) ResetSourcePath()

ResetSourcePath resets all changes to the "source_path" field.

func (*ImportScanMutation) ResetStatus

func (m *ImportScanMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ImportScanMutation) ResetTotalCount

func (m *ImportScanMutation) ResetTotalCount()

ResetTotalCount resets all changes to the "total_count" field.

func (*ImportScanMutation) ResetUpdateTime

func (m *ImportScanMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*ImportScanMutation) ScannedAt

func (m *ImportScanMutation) ScannedAt() (r time.Time, exists bool)

ScannedAt returns the value of the "scanned_at" field in the mutation.

func (*ImportScanMutation) ScannedAtCleared

func (m *ImportScanMutation) ScannedAtCleared() bool

ScannedAtCleared returns if the "scanned_at" field was cleared in this mutation.

func (*ImportScanMutation) SetCommitFailedCount

func (m *ImportScanMutation) SetCommitFailedCount(u uint32)

SetCommitFailedCount sets the "commit_failed_count" field.

func (*ImportScanMutation) SetCommitSuccessCount

func (m *ImportScanMutation) SetCommitSuccessCount(u uint32)

SetCommitSuccessCount sets the "commit_success_count" field.

func (*ImportScanMutation) SetCommittedAt

func (m *ImportScanMutation) SetCommittedAt(t time.Time)

SetCommittedAt sets the "committed_at" field.

func (*ImportScanMutation) SetCreateTime

func (m *ImportScanMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ImportScanMutation) SetFailureReason

func (m *ImportScanMutation) SetFailureReason(s string)

SetFailureReason sets the "failure_reason" field.

func (*ImportScanMutation) SetField

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

func (m *ImportScanMutation) SetID(id uint32)

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

func (*ImportScanMutation) SetImportMode

func (m *ImportScanMutation) SetImportMode(im importscan.ImportMode)

SetImportMode sets the "import_mode" field.

func (*ImportScanMutation) SetKind

func (m *ImportScanMutation) SetKind(i importscan.Kind)

SetKind sets the "kind" field.

func (*ImportScanMutation) SetMode

func (m *ImportScanMutation) SetMode(i importscan.Mode)

SetMode sets the "mode" field.

func (*ImportScanMutation) SetOp

func (m *ImportScanMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ImportScanMutation) SetProcessedCount

func (m *ImportScanMutation) SetProcessedCount(u uint32)

SetProcessedCount sets the "processed_count" field.

func (*ImportScanMutation) SetScannedAt

func (m *ImportScanMutation) SetScannedAt(t time.Time)

SetScannedAt sets the "scanned_at" field.

func (*ImportScanMutation) SetSourcePath

func (m *ImportScanMutation) SetSourcePath(s string)

SetSourcePath sets the "source_path" field.

func (*ImportScanMutation) SetStatus

func (m *ImportScanMutation) SetStatus(i importscan.Status)

SetStatus sets the "status" field.

func (*ImportScanMutation) SetTotalCount

func (m *ImportScanMutation) SetTotalCount(u uint32)

SetTotalCount sets the "total_count" field.

func (*ImportScanMutation) SetUpdateTime

func (m *ImportScanMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*ImportScanMutation) ShowsCleared

func (m *ImportScanMutation) ShowsCleared() bool

ShowsCleared reports if the "shows" edge to the ImportScanShow entity was cleared.

func (*ImportScanMutation) ShowsIDs

func (m *ImportScanMutation) ShowsIDs() (ids []uint32)

ShowsIDs returns the "shows" edge IDs in the mutation.

func (*ImportScanMutation) SourcePath

func (m *ImportScanMutation) SourcePath() (r string, exists bool)

SourcePath returns the value of the "source_path" field in the mutation.

func (*ImportScanMutation) Status

func (m *ImportScanMutation) Status() (r importscan.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*ImportScanMutation) TotalCount

func (m *ImportScanMutation) TotalCount() (r uint32, exists bool)

TotalCount returns the value of the "total_count" field in the mutation.

func (ImportScanMutation) Tx

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

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

func (*ImportScanMutation) Type

func (m *ImportScanMutation) Type() string

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

func (*ImportScanMutation) UpdateTime

func (m *ImportScanMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*ImportScanMutation) Where

func (m *ImportScanMutation) Where(ps ...predicate.ImportScan)

Where appends a list predicates to the ImportScanMutation builder.

func (*ImportScanMutation) WhereP

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

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

type ImportScanQuery

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

ImportScanQuery is the builder for querying ImportScan entities.

func (*ImportScanQuery) Aggregate

func (_q *ImportScanQuery) Aggregate(fns ...AggregateFunc) *ImportScanSelect

Aggregate returns a ImportScanSelect configured with the given aggregations.

func (*ImportScanQuery) All

func (_q *ImportScanQuery) All(ctx context.Context) ([]*ImportScan, error)

All executes the query and returns a list of ImportScans.

func (*ImportScanQuery) AllX

func (_q *ImportScanQuery) AllX(ctx context.Context) []*ImportScan

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

func (*ImportScanQuery) Clone

func (_q *ImportScanQuery) Clone() *ImportScanQuery

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

func (*ImportScanQuery) Count

func (_q *ImportScanQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ImportScanQuery) CountX

func (_q *ImportScanQuery) CountX(ctx context.Context) int

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

func (*ImportScanQuery) Exist

func (_q *ImportScanQuery) Exist(ctx context.Context) (bool, error)

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

func (*ImportScanQuery) ExistX

func (_q *ImportScanQuery) ExistX(ctx context.Context) bool

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

func (*ImportScanQuery) First

func (_q *ImportScanQuery) First(ctx context.Context) (*ImportScan, error)

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

func (*ImportScanQuery) FirstID

func (_q *ImportScanQuery) FirstID(ctx context.Context) (id uint32, err error)

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

func (*ImportScanQuery) FirstIDX

func (_q *ImportScanQuery) FirstIDX(ctx context.Context) uint32

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

func (*ImportScanQuery) FirstX

func (_q *ImportScanQuery) FirstX(ctx context.Context) *ImportScan

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

func (*ImportScanQuery) GroupBy

func (_q *ImportScanQuery) GroupBy(field string, fields ...string) *ImportScanGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ImportScan.Query().
	GroupBy(importscan.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ImportScanQuery) IDs

func (_q *ImportScanQuery) IDs(ctx context.Context) (ids []uint32, err error)

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

func (*ImportScanQuery) IDsX

func (_q *ImportScanQuery) IDsX(ctx context.Context) []uint32

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

func (*ImportScanQuery) Limit

func (_q *ImportScanQuery) Limit(limit int) *ImportScanQuery

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

func (*ImportScanQuery) Offset

func (_q *ImportScanQuery) Offset(offset int) *ImportScanQuery

Offset to start from.

func (*ImportScanQuery) Only

func (_q *ImportScanQuery) Only(ctx context.Context) (*ImportScan, error)

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

func (*ImportScanQuery) OnlyID

func (_q *ImportScanQuery) OnlyID(ctx context.Context) (id uint32, err error)

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

func (*ImportScanQuery) OnlyIDX

func (_q *ImportScanQuery) OnlyIDX(ctx context.Context) uint32

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

func (*ImportScanQuery) OnlyX

func (_q *ImportScanQuery) OnlyX(ctx context.Context) *ImportScan

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

func (*ImportScanQuery) Order

Order specifies how the records should be ordered.

func (*ImportScanQuery) QueryFiles

func (_q *ImportScanQuery) QueryFiles() *ImportScanFileQuery

QueryFiles chains the current query on the "files" edge.

func (*ImportScanQuery) QueryShows

func (_q *ImportScanQuery) QueryShows() *ImportScanShowQuery

QueryShows chains the current query on the "shows" edge.

func (*ImportScanQuery) Select

func (_q *ImportScanQuery) Select(fields ...string) *ImportScanSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.ImportScan.Query().
	Select(importscan.FieldCreateTime).
	Scan(ctx, &v)

func (*ImportScanQuery) Unique

func (_q *ImportScanQuery) Unique(unique bool) *ImportScanQuery

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

Where adds a new predicate for the ImportScanQuery builder.

func (*ImportScanQuery) WithFiles

func (_q *ImportScanQuery) WithFiles(opts ...func(*ImportScanFileQuery)) *ImportScanQuery

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

func (*ImportScanQuery) WithShows

func (_q *ImportScanQuery) WithShows(opts ...func(*ImportScanShowQuery)) *ImportScanQuery

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

type ImportScanSelect

type ImportScanSelect struct {
	*ImportScanQuery
	// contains filtered or unexported fields
}

ImportScanSelect is the builder for selecting fields of ImportScan entities.

func (*ImportScanSelect) Aggregate

func (_s *ImportScanSelect) Aggregate(fns ...AggregateFunc) *ImportScanSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ImportScanSelect) Bool

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

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

func (*ImportScanSelect) BoolX

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

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

func (*ImportScanSelect) Bools

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

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

func (*ImportScanSelect) BoolsX

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

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

func (*ImportScanSelect) Float64

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

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

func (*ImportScanSelect) Float64X

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

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

func (*ImportScanSelect) Float64s

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

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

func (*ImportScanSelect) Float64sX

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

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

func (*ImportScanSelect) Int

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

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

func (*ImportScanSelect) IntX

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

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

func (*ImportScanSelect) Ints

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

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

func (*ImportScanSelect) IntsX

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

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

func (*ImportScanSelect) Scan

func (_s *ImportScanSelect) Scan(ctx context.Context, v any) error

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

func (*ImportScanSelect) ScanX

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

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

func (*ImportScanSelect) String

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

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

func (*ImportScanSelect) StringX

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

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

func (*ImportScanSelect) Strings

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

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

func (*ImportScanSelect) StringsX

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

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

type ImportScanShow

type ImportScanShow struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// FolderPath holds the value of the "folder_path" field.
	FolderPath string `json:"folder_path,omitempty"`
	// ParsedTitle holds the value of the "parsed_title" field.
	ParsedTitle string `json:"parsed_title,omitempty"`
	// ParsedYear holds the value of the "parsed_year" field.
	ParsedYear *uint16 `json:"parsed_year,omitempty"`
	// Classification holds the value of the "classification" field.
	Classification importscanshow.Classification `json:"classification,omitempty"`
	// TvdbID holds the value of the "tvdb_id" field.
	TvdbID *uint32 `json:"tvdb_id,omitempty"`
	// Candidates holds the value of the "candidates" field.
	Candidates []schema.ScannedShowCandidate `json:"candidates,omitempty"`
	// ExistingTvshowID holds the value of the "existing_tvshow_id" field.
	ExistingTvshowID *uint32 `json:"existing_tvshow_id,omitempty"`
	// FileCount holds the value of the "file_count" field.
	FileCount uint16 `json:"file_count,omitempty"`
	// Decision holds the value of the "decision" field.
	Decision importscanshow.Decision `json:"decision,omitempty"`
	// DecisionTvdbID holds the value of the "decision_tvdb_id" field.
	DecisionTvdbID *uint32 `json:"decision_tvdb_id,omitempty"`
	// Outcome holds the value of the "outcome" field.
	Outcome importscanshow.Outcome `json:"outcome,omitempty"`
	// OutcomeMessage holds the value of the "outcome_message" field.
	OutcomeMessage string `json:"outcome_message,omitempty"`
	// CreatedTvshowID holds the value of the "created_tvshow_id" field.
	CreatedTvshowID *uint32 `json:"created_tvshow_id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ImportScanShowQuery when eager-loading is set.
	Edges ImportScanShowEdges `json:"edges"`
	// contains filtered or unexported fields
}

ImportScanShow is the model entity for the ImportScanShow schema.

func (*ImportScanShow) QueryScan

func (_m *ImportScanShow) QueryScan() *ImportScanQuery

QueryScan queries the "scan" edge of the ImportScanShow entity.

func (*ImportScanShow) String

func (_m *ImportScanShow) String() string

String implements the fmt.Stringer.

func (*ImportScanShow) Unwrap

func (_m *ImportScanShow) Unwrap() *ImportScanShow

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

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

func (*ImportScanShow) Value

func (_m *ImportScanShow) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ImportScanShow. This includes values selected through modifiers, order, etc.

type ImportScanShowClient

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

ImportScanShowClient is a client for the ImportScanShow schema.

func NewImportScanShowClient

func NewImportScanShowClient(c config) *ImportScanShowClient

NewImportScanShowClient returns a client for the ImportScanShow from the given config.

func (*ImportScanShowClient) Create

Create returns a builder for creating a ImportScanShow entity.

func (*ImportScanShowClient) CreateBulk

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

func (*ImportScanShowClient) Delete

Delete returns a delete builder for ImportScanShow.

func (*ImportScanShowClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ImportScanShowClient) DeleteOneID

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

func (*ImportScanShowClient) Get

Get returns a ImportScanShow entity by its id.

func (*ImportScanShowClient) GetX

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

func (*ImportScanShowClient) Hooks

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

Hooks returns the client hooks.

func (*ImportScanShowClient) Intercept

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

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

func (*ImportScanShowClient) Interceptors

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

Interceptors returns the client interceptors.

func (*ImportScanShowClient) MapCreateBulk

func (c *ImportScanShowClient) MapCreateBulk(slice any, setFunc func(*ImportScanShowCreate, int)) *ImportScanShowCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ImportScanShowClient) Query

Query returns a query builder for ImportScanShow.

func (*ImportScanShowClient) QueryScan

QueryScan queries the scan edge of a ImportScanShow.

func (*ImportScanShowClient) Update

Update returns an update builder for ImportScanShow.

func (*ImportScanShowClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ImportScanShowClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ImportScanShowClient) Use

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

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

type ImportScanShowCreate

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

ImportScanShowCreate is the builder for creating a ImportScanShow entity.

func (*ImportScanShowCreate) Exec

func (_c *ImportScanShowCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ImportScanShowCreate) ExecX

func (_c *ImportScanShowCreate) ExecX(ctx context.Context)

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

func (*ImportScanShowCreate) Mutation

Mutation returns the ImportScanShowMutation object of the builder.

func (*ImportScanShowCreate) Save

Save creates the ImportScanShow in the database.

func (*ImportScanShowCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ImportScanShowCreate) SetCandidates

SetCandidates sets the "candidates" field.

func (*ImportScanShowCreate) SetClassification

SetClassification sets the "classification" field.

func (*ImportScanShowCreate) SetCreateTime

func (_c *ImportScanShowCreate) SetCreateTime(v time.Time) *ImportScanShowCreate

SetCreateTime sets the "create_time" field.

func (*ImportScanShowCreate) SetCreatedTvshowID

func (_c *ImportScanShowCreate) SetCreatedTvshowID(v uint32) *ImportScanShowCreate

SetCreatedTvshowID sets the "created_tvshow_id" field.

func (*ImportScanShowCreate) SetDecision

SetDecision sets the "decision" field.

func (*ImportScanShowCreate) SetDecisionTvdbID

func (_c *ImportScanShowCreate) SetDecisionTvdbID(v uint32) *ImportScanShowCreate

SetDecisionTvdbID sets the "decision_tvdb_id" field.

func (*ImportScanShowCreate) SetExistingTvshowID

func (_c *ImportScanShowCreate) SetExistingTvshowID(v uint32) *ImportScanShowCreate

SetExistingTvshowID sets the "existing_tvshow_id" field.

func (*ImportScanShowCreate) SetFileCount

func (_c *ImportScanShowCreate) SetFileCount(v uint16) *ImportScanShowCreate

SetFileCount sets the "file_count" field.

func (*ImportScanShowCreate) SetFolderPath

func (_c *ImportScanShowCreate) SetFolderPath(v string) *ImportScanShowCreate

SetFolderPath sets the "folder_path" field.

func (*ImportScanShowCreate) SetID

SetID sets the "id" field.

func (*ImportScanShowCreate) SetNillableClassification

func (_c *ImportScanShowCreate) SetNillableClassification(v *importscanshow.Classification) *ImportScanShowCreate

SetNillableClassification sets the "classification" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableCreateTime

func (_c *ImportScanShowCreate) SetNillableCreateTime(v *time.Time) *ImportScanShowCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableCreatedTvshowID

func (_c *ImportScanShowCreate) SetNillableCreatedTvshowID(v *uint32) *ImportScanShowCreate

SetNillableCreatedTvshowID sets the "created_tvshow_id" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableDecision

SetNillableDecision sets the "decision" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableDecisionTvdbID

func (_c *ImportScanShowCreate) SetNillableDecisionTvdbID(v *uint32) *ImportScanShowCreate

SetNillableDecisionTvdbID sets the "decision_tvdb_id" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableExistingTvshowID

func (_c *ImportScanShowCreate) SetNillableExistingTvshowID(v *uint32) *ImportScanShowCreate

SetNillableExistingTvshowID sets the "existing_tvshow_id" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableFileCount

func (_c *ImportScanShowCreate) SetNillableFileCount(v *uint16) *ImportScanShowCreate

SetNillableFileCount sets the "file_count" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableOutcome

SetNillableOutcome sets the "outcome" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableOutcomeMessage

func (_c *ImportScanShowCreate) SetNillableOutcomeMessage(v *string) *ImportScanShowCreate

SetNillableOutcomeMessage sets the "outcome_message" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableParsedTitle

func (_c *ImportScanShowCreate) SetNillableParsedTitle(v *string) *ImportScanShowCreate

SetNillableParsedTitle sets the "parsed_title" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableParsedYear

func (_c *ImportScanShowCreate) SetNillableParsedYear(v *uint16) *ImportScanShowCreate

SetNillableParsedYear sets the "parsed_year" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableTvdbID

func (_c *ImportScanShowCreate) SetNillableTvdbID(v *uint32) *ImportScanShowCreate

SetNillableTvdbID sets the "tvdb_id" field if the given value is not nil.

func (*ImportScanShowCreate) SetNillableUpdateTime

func (_c *ImportScanShowCreate) SetNillableUpdateTime(v *time.Time) *ImportScanShowCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*ImportScanShowCreate) SetOutcome

SetOutcome sets the "outcome" field.

func (*ImportScanShowCreate) SetOutcomeMessage

func (_c *ImportScanShowCreate) SetOutcomeMessage(v string) *ImportScanShowCreate

SetOutcomeMessage sets the "outcome_message" field.

func (*ImportScanShowCreate) SetParsedTitle

func (_c *ImportScanShowCreate) SetParsedTitle(v string) *ImportScanShowCreate

SetParsedTitle sets the "parsed_title" field.

func (*ImportScanShowCreate) SetParsedYear

func (_c *ImportScanShowCreate) SetParsedYear(v uint16) *ImportScanShowCreate

SetParsedYear sets the "parsed_year" field.

func (*ImportScanShowCreate) SetScan

SetScan sets the "scan" edge to the ImportScan entity.

func (*ImportScanShowCreate) SetScanID

SetScanID sets the "scan" edge to the ImportScan entity by ID.

func (*ImportScanShowCreate) SetTvdbID

SetTvdbID sets the "tvdb_id" field.

func (*ImportScanShowCreate) SetUpdateTime

func (_c *ImportScanShowCreate) SetUpdateTime(v time.Time) *ImportScanShowCreate

SetUpdateTime sets the "update_time" field.

type ImportScanShowCreateBulk

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

ImportScanShowCreateBulk is the builder for creating many ImportScanShow entities in bulk.

func (*ImportScanShowCreateBulk) Exec

Exec executes the query.

func (*ImportScanShowCreateBulk) ExecX

func (_c *ImportScanShowCreateBulk) ExecX(ctx context.Context)

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

func (*ImportScanShowCreateBulk) Save

Save creates the ImportScanShow entities in the database.

func (*ImportScanShowCreateBulk) SaveX

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

type ImportScanShowDelete

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

ImportScanShowDelete is the builder for deleting a ImportScanShow entity.

func (*ImportScanShowDelete) Exec

func (_d *ImportScanShowDelete) Exec(ctx context.Context) (int, error)

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

func (*ImportScanShowDelete) ExecX

func (_d *ImportScanShowDelete) ExecX(ctx context.Context) int

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

func (*ImportScanShowDelete) Where

Where appends a list predicates to the ImportScanShowDelete builder.

type ImportScanShowDeleteOne

type ImportScanShowDeleteOne struct {
	// contains filtered or unexported fields
}

ImportScanShowDeleteOne is the builder for deleting a single ImportScanShow entity.

func (*ImportScanShowDeleteOne) Exec

Exec executes the deletion query.

func (*ImportScanShowDeleteOne) ExecX

func (_d *ImportScanShowDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImportScanShowDeleteOne) Where

Where appends a list predicates to the ImportScanShowDelete builder.

type ImportScanShowEdges

type ImportScanShowEdges struct {
	// Scan holds the value of the scan edge.
	Scan *ImportScan `json:"scan,omitempty"`
	// contains filtered or unexported fields
}

ImportScanShowEdges holds the relations/edges for other nodes in the graph.

func (ImportScanShowEdges) ScanOrErr

func (e ImportScanShowEdges) ScanOrErr() (*ImportScan, error)

ScanOrErr returns the Scan value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ImportScanShowGroupBy

type ImportScanShowGroupBy struct {
	// contains filtered or unexported fields
}

ImportScanShowGroupBy is the group-by builder for ImportScanShow entities.

func (*ImportScanShowGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*ImportScanShowGroupBy) Bool

func (s *ImportScanShowGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ImportScanShowGroupBy) BoolX

func (s *ImportScanShowGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ImportScanShowGroupBy) Bools

func (s *ImportScanShowGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ImportScanShowGroupBy) BoolsX

func (s *ImportScanShowGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ImportScanShowGroupBy) Float64

func (s *ImportScanShowGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ImportScanShowGroupBy) Float64X

func (s *ImportScanShowGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ImportScanShowGroupBy) Float64s

func (s *ImportScanShowGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ImportScanShowGroupBy) Float64sX

func (s *ImportScanShowGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ImportScanShowGroupBy) Int

func (s *ImportScanShowGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ImportScanShowGroupBy) IntX

func (s *ImportScanShowGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ImportScanShowGroupBy) Ints

func (s *ImportScanShowGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ImportScanShowGroupBy) IntsX

func (s *ImportScanShowGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ImportScanShowGroupBy) Scan

func (_g *ImportScanShowGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ImportScanShowGroupBy) ScanX

func (s *ImportScanShowGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ImportScanShowGroupBy) String

func (s *ImportScanShowGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ImportScanShowGroupBy) StringX

func (s *ImportScanShowGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ImportScanShowGroupBy) Strings

func (s *ImportScanShowGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ImportScanShowGroupBy) StringsX

func (s *ImportScanShowGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ImportScanShowMutation

type ImportScanShowMutation struct {
	// contains filtered or unexported fields
}

ImportScanShowMutation represents an operation that mutates the ImportScanShow nodes in the graph.

func (*ImportScanShowMutation) AddCreatedTvshowID

func (m *ImportScanShowMutation) AddCreatedTvshowID(u int32)

AddCreatedTvshowID adds u to the "created_tvshow_id" field.

func (*ImportScanShowMutation) AddDecisionTvdbID

func (m *ImportScanShowMutation) AddDecisionTvdbID(u int32)

AddDecisionTvdbID adds u to the "decision_tvdb_id" field.

func (*ImportScanShowMutation) AddExistingTvshowID

func (m *ImportScanShowMutation) AddExistingTvshowID(u int32)

AddExistingTvshowID adds u to the "existing_tvshow_id" field.

func (*ImportScanShowMutation) AddField

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) AddFileCount

func (m *ImportScanShowMutation) AddFileCount(u int16)

AddFileCount adds u to the "file_count" field.

func (*ImportScanShowMutation) AddParsedYear

func (m *ImportScanShowMutation) AddParsedYear(u int16)

AddParsedYear adds u to the "parsed_year" field.

func (*ImportScanShowMutation) AddTvdbID

func (m *ImportScanShowMutation) AddTvdbID(u int32)

AddTvdbID adds u to the "tvdb_id" field.

func (*ImportScanShowMutation) AddedCreatedTvshowID

func (m *ImportScanShowMutation) AddedCreatedTvshowID() (r int32, exists bool)

AddedCreatedTvshowID returns the value that was added to the "created_tvshow_id" field in this mutation.

func (*ImportScanShowMutation) AddedDecisionTvdbID

func (m *ImportScanShowMutation) AddedDecisionTvdbID() (r int32, exists bool)

AddedDecisionTvdbID returns the value that was added to the "decision_tvdb_id" field in this mutation.

func (*ImportScanShowMutation) AddedEdges

func (m *ImportScanShowMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ImportScanShowMutation) AddedExistingTvshowID

func (m *ImportScanShowMutation) AddedExistingTvshowID() (r int32, exists bool)

AddedExistingTvshowID returns the value that was added to the "existing_tvshow_id" field in this mutation.

func (*ImportScanShowMutation) AddedField

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) AddedFields

func (m *ImportScanShowMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ImportScanShowMutation) AddedFileCount

func (m *ImportScanShowMutation) AddedFileCount() (r int16, exists bool)

AddedFileCount returns the value that was added to the "file_count" field in this mutation.

func (*ImportScanShowMutation) AddedIDs

func (m *ImportScanShowMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ImportScanShowMutation) AddedParsedYear

func (m *ImportScanShowMutation) AddedParsedYear() (r int16, exists bool)

AddedParsedYear returns the value that was added to the "parsed_year" field in this mutation.

func (*ImportScanShowMutation) AddedTvdbID

func (m *ImportScanShowMutation) AddedTvdbID() (r int32, exists bool)

AddedTvdbID returns the value that was added to the "tvdb_id" field in this mutation.

func (*ImportScanShowMutation) AppendCandidates

func (m *ImportScanShowMutation) AppendCandidates(ssc []schema.ScannedShowCandidate)

AppendCandidates adds ssc to the "candidates" field.

func (*ImportScanShowMutation) AppendedCandidates

func (m *ImportScanShowMutation) AppendedCandidates() ([]schema.ScannedShowCandidate, bool)

AppendedCandidates returns the list of values that were appended to the "candidates" field in this mutation.

func (*ImportScanShowMutation) Candidates

func (m *ImportScanShowMutation) Candidates() (r []schema.ScannedShowCandidate, exists bool)

Candidates returns the value of the "candidates" field in the mutation.

func (*ImportScanShowMutation) CandidatesCleared

func (m *ImportScanShowMutation) CandidatesCleared() bool

CandidatesCleared returns if the "candidates" field was cleared in this mutation.

func (*ImportScanShowMutation) Classification

func (m *ImportScanShowMutation) Classification() (r importscanshow.Classification, exists bool)

Classification returns the value of the "classification" field in the mutation.

func (*ImportScanShowMutation) ClearCandidates

func (m *ImportScanShowMutation) ClearCandidates()

ClearCandidates clears the value of the "candidates" field.

func (*ImportScanShowMutation) ClearCreatedTvshowID

func (m *ImportScanShowMutation) ClearCreatedTvshowID()

ClearCreatedTvshowID clears the value of the "created_tvshow_id" field.

func (*ImportScanShowMutation) ClearDecisionTvdbID

func (m *ImportScanShowMutation) ClearDecisionTvdbID()

ClearDecisionTvdbID clears the value of the "decision_tvdb_id" field.

func (*ImportScanShowMutation) ClearEdge

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) ClearExistingTvshowID

func (m *ImportScanShowMutation) ClearExistingTvshowID()

ClearExistingTvshowID clears the value of the "existing_tvshow_id" field.

func (*ImportScanShowMutation) ClearField

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) ClearOutcomeMessage

func (m *ImportScanShowMutation) ClearOutcomeMessage()

ClearOutcomeMessage clears the value of the "outcome_message" field.

func (*ImportScanShowMutation) ClearParsedTitle

func (m *ImportScanShowMutation) ClearParsedTitle()

ClearParsedTitle clears the value of the "parsed_title" field.

func (*ImportScanShowMutation) ClearParsedYear

func (m *ImportScanShowMutation) ClearParsedYear()

ClearParsedYear clears the value of the "parsed_year" field.

func (*ImportScanShowMutation) ClearScan

func (m *ImportScanShowMutation) ClearScan()

ClearScan clears the "scan" edge to the ImportScan entity.

func (*ImportScanShowMutation) ClearTvdbID

func (m *ImportScanShowMutation) ClearTvdbID()

ClearTvdbID clears the value of the "tvdb_id" field.

func (*ImportScanShowMutation) ClearedEdges

func (m *ImportScanShowMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ImportScanShowMutation) ClearedFields

func (m *ImportScanShowMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ImportScanShowMutation) Client

func (m ImportScanShowMutation) 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 (*ImportScanShowMutation) CreateTime

func (m *ImportScanShowMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*ImportScanShowMutation) CreatedTvshowID

func (m *ImportScanShowMutation) CreatedTvshowID() (r uint32, exists bool)

CreatedTvshowID returns the value of the "created_tvshow_id" field in the mutation.

func (*ImportScanShowMutation) CreatedTvshowIDCleared

func (m *ImportScanShowMutation) CreatedTvshowIDCleared() bool

CreatedTvshowIDCleared returns if the "created_tvshow_id" field was cleared in this mutation.

func (*ImportScanShowMutation) Decision

func (m *ImportScanShowMutation) Decision() (r importscanshow.Decision, exists bool)

Decision returns the value of the "decision" field in the mutation.

func (*ImportScanShowMutation) DecisionTvdbID

func (m *ImportScanShowMutation) DecisionTvdbID() (r uint32, exists bool)

DecisionTvdbID returns the value of the "decision_tvdb_id" field in the mutation.

func (*ImportScanShowMutation) DecisionTvdbIDCleared

func (m *ImportScanShowMutation) DecisionTvdbIDCleared() bool

DecisionTvdbIDCleared returns if the "decision_tvdb_id" field was cleared in this mutation.

func (*ImportScanShowMutation) EdgeCleared

func (m *ImportScanShowMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ImportScanShowMutation) ExistingTvshowID

func (m *ImportScanShowMutation) ExistingTvshowID() (r uint32, exists bool)

ExistingTvshowID returns the value of the "existing_tvshow_id" field in the mutation.

func (*ImportScanShowMutation) ExistingTvshowIDCleared

func (m *ImportScanShowMutation) ExistingTvshowIDCleared() bool

ExistingTvshowIDCleared returns if the "existing_tvshow_id" field was cleared in this mutation.

func (*ImportScanShowMutation) Field

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) FieldCleared

func (m *ImportScanShowMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ImportScanShowMutation) Fields

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) FileCount

func (m *ImportScanShowMutation) FileCount() (r uint16, exists bool)

FileCount returns the value of the "file_count" field in the mutation.

func (*ImportScanShowMutation) FolderPath

func (m *ImportScanShowMutation) FolderPath() (r string, exists bool)

FolderPath returns the value of the "folder_path" field in the mutation.

func (*ImportScanShowMutation) ID

func (m *ImportScanShowMutation) ID() (id uint32, 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 (*ImportScanShowMutation) 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 (*ImportScanShowMutation) OldCandidates

func (m *ImportScanShowMutation) OldCandidates(ctx context.Context) (v []schema.ScannedShowCandidate, err error)

OldCandidates returns the old "candidates" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldClassification

func (m *ImportScanShowMutation) OldClassification(ctx context.Context) (v importscanshow.Classification, err error)

OldClassification returns the old "classification" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldCreateTime

func (m *ImportScanShowMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldCreatedTvshowID

func (m *ImportScanShowMutation) OldCreatedTvshowID(ctx context.Context) (v *uint32, err error)

OldCreatedTvshowID returns the old "created_tvshow_id" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldDecision

func (m *ImportScanShowMutation) OldDecision(ctx context.Context) (v importscanshow.Decision, err error)

OldDecision returns the old "decision" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldDecisionTvdbID

func (m *ImportScanShowMutation) OldDecisionTvdbID(ctx context.Context) (v *uint32, err error)

OldDecisionTvdbID returns the old "decision_tvdb_id" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldExistingTvshowID

func (m *ImportScanShowMutation) OldExistingTvshowID(ctx context.Context) (v *uint32, err error)

OldExistingTvshowID returns the old "existing_tvshow_id" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldField

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) OldFileCount

func (m *ImportScanShowMutation) OldFileCount(ctx context.Context) (v uint16, err error)

OldFileCount returns the old "file_count" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldFolderPath

func (m *ImportScanShowMutation) OldFolderPath(ctx context.Context) (v string, err error)

OldFolderPath returns the old "folder_path" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldOutcome

func (m *ImportScanShowMutation) OldOutcome(ctx context.Context) (v importscanshow.Outcome, err error)

OldOutcome returns the old "outcome" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldOutcomeMessage

func (m *ImportScanShowMutation) OldOutcomeMessage(ctx context.Context) (v string, err error)

OldOutcomeMessage returns the old "outcome_message" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldParsedTitle

func (m *ImportScanShowMutation) OldParsedTitle(ctx context.Context) (v string, err error)

OldParsedTitle returns the old "parsed_title" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldParsedYear

func (m *ImportScanShowMutation) OldParsedYear(ctx context.Context) (v *uint16, err error)

OldParsedYear returns the old "parsed_year" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldTvdbID

func (m *ImportScanShowMutation) OldTvdbID(ctx context.Context) (v *uint32, err error)

OldTvdbID returns the old "tvdb_id" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) OldUpdateTime

func (m *ImportScanShowMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the ImportScanShow entity. If the ImportScanShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ImportScanShowMutation) Op

func (m *ImportScanShowMutation) Op() Op

Op returns the operation name.

func (*ImportScanShowMutation) Outcome

func (m *ImportScanShowMutation) Outcome() (r importscanshow.Outcome, exists bool)

Outcome returns the value of the "outcome" field in the mutation.

func (*ImportScanShowMutation) OutcomeMessage

func (m *ImportScanShowMutation) OutcomeMessage() (r string, exists bool)

OutcomeMessage returns the value of the "outcome_message" field in the mutation.

func (*ImportScanShowMutation) OutcomeMessageCleared

func (m *ImportScanShowMutation) OutcomeMessageCleared() bool

OutcomeMessageCleared returns if the "outcome_message" field was cleared in this mutation.

func (*ImportScanShowMutation) ParsedTitle

func (m *ImportScanShowMutation) ParsedTitle() (r string, exists bool)

ParsedTitle returns the value of the "parsed_title" field in the mutation.

func (*ImportScanShowMutation) ParsedTitleCleared

func (m *ImportScanShowMutation) ParsedTitleCleared() bool

ParsedTitleCleared returns if the "parsed_title" field was cleared in this mutation.

func (*ImportScanShowMutation) ParsedYear

func (m *ImportScanShowMutation) ParsedYear() (r uint16, exists bool)

ParsedYear returns the value of the "parsed_year" field in the mutation.

func (*ImportScanShowMutation) ParsedYearCleared

func (m *ImportScanShowMutation) ParsedYearCleared() bool

ParsedYearCleared returns if the "parsed_year" field was cleared in this mutation.

func (*ImportScanShowMutation) RemovedEdges

func (m *ImportScanShowMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ImportScanShowMutation) RemovedIDs

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) ResetCandidates

func (m *ImportScanShowMutation) ResetCandidates()

ResetCandidates resets all changes to the "candidates" field.

func (*ImportScanShowMutation) ResetClassification

func (m *ImportScanShowMutation) ResetClassification()

ResetClassification resets all changes to the "classification" field.

func (*ImportScanShowMutation) ResetCreateTime

func (m *ImportScanShowMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*ImportScanShowMutation) ResetCreatedTvshowID

func (m *ImportScanShowMutation) ResetCreatedTvshowID()

ResetCreatedTvshowID resets all changes to the "created_tvshow_id" field.

func (*ImportScanShowMutation) ResetDecision

func (m *ImportScanShowMutation) ResetDecision()

ResetDecision resets all changes to the "decision" field.

func (*ImportScanShowMutation) ResetDecisionTvdbID

func (m *ImportScanShowMutation) ResetDecisionTvdbID()

ResetDecisionTvdbID resets all changes to the "decision_tvdb_id" field.

func (*ImportScanShowMutation) ResetEdge

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) ResetExistingTvshowID

func (m *ImportScanShowMutation) ResetExistingTvshowID()

ResetExistingTvshowID resets all changes to the "existing_tvshow_id" field.

func (*ImportScanShowMutation) ResetField

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) ResetFileCount

func (m *ImportScanShowMutation) ResetFileCount()

ResetFileCount resets all changes to the "file_count" field.

func (*ImportScanShowMutation) ResetFolderPath

func (m *ImportScanShowMutation) ResetFolderPath()

ResetFolderPath resets all changes to the "folder_path" field.

func (*ImportScanShowMutation) ResetOutcome

func (m *ImportScanShowMutation) ResetOutcome()

ResetOutcome resets all changes to the "outcome" field.

func (*ImportScanShowMutation) ResetOutcomeMessage

func (m *ImportScanShowMutation) ResetOutcomeMessage()

ResetOutcomeMessage resets all changes to the "outcome_message" field.

func (*ImportScanShowMutation) ResetParsedTitle

func (m *ImportScanShowMutation) ResetParsedTitle()

ResetParsedTitle resets all changes to the "parsed_title" field.

func (*ImportScanShowMutation) ResetParsedYear

func (m *ImportScanShowMutation) ResetParsedYear()

ResetParsedYear resets all changes to the "parsed_year" field.

func (*ImportScanShowMutation) ResetScan

func (m *ImportScanShowMutation) ResetScan()

ResetScan resets all changes to the "scan" edge.

func (*ImportScanShowMutation) ResetTvdbID

func (m *ImportScanShowMutation) ResetTvdbID()

ResetTvdbID resets all changes to the "tvdb_id" field.

func (*ImportScanShowMutation) ResetUpdateTime

func (m *ImportScanShowMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*ImportScanShowMutation) ScanCleared

func (m *ImportScanShowMutation) ScanCleared() bool

ScanCleared reports if the "scan" edge to the ImportScan entity was cleared.

func (*ImportScanShowMutation) ScanID

func (m *ImportScanShowMutation) ScanID() (id uint32, exists bool)

ScanID returns the "scan" edge ID in the mutation.

func (*ImportScanShowMutation) ScanIDs

func (m *ImportScanShowMutation) ScanIDs() (ids []uint32)

ScanIDs returns the "scan" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ScanID instead. It exists only for internal usage by the builders.

func (*ImportScanShowMutation) SetCandidates

func (m *ImportScanShowMutation) SetCandidates(ssc []schema.ScannedShowCandidate)

SetCandidates sets the "candidates" field.

func (*ImportScanShowMutation) SetClassification

func (m *ImportScanShowMutation) SetClassification(i importscanshow.Classification)

SetClassification sets the "classification" field.

func (*ImportScanShowMutation) SetCreateTime

func (m *ImportScanShowMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*ImportScanShowMutation) SetCreatedTvshowID

func (m *ImportScanShowMutation) SetCreatedTvshowID(u uint32)

SetCreatedTvshowID sets the "created_tvshow_id" field.

func (*ImportScanShowMutation) SetDecision

SetDecision sets the "decision" field.

func (*ImportScanShowMutation) SetDecisionTvdbID

func (m *ImportScanShowMutation) SetDecisionTvdbID(u uint32)

SetDecisionTvdbID sets the "decision_tvdb_id" field.

func (*ImportScanShowMutation) SetExistingTvshowID

func (m *ImportScanShowMutation) SetExistingTvshowID(u uint32)

SetExistingTvshowID sets the "existing_tvshow_id" field.

func (*ImportScanShowMutation) SetField

func (m *ImportScanShowMutation) 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 (*ImportScanShowMutation) SetFileCount

func (m *ImportScanShowMutation) SetFileCount(u uint16)

SetFileCount sets the "file_count" field.

func (*ImportScanShowMutation) SetFolderPath

func (m *ImportScanShowMutation) SetFolderPath(s string)

SetFolderPath sets the "folder_path" field.

func (*ImportScanShowMutation) SetID

func (m *ImportScanShowMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ImportScanShow entities.

func (*ImportScanShowMutation) SetOp

func (m *ImportScanShowMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ImportScanShowMutation) SetOutcome

SetOutcome sets the "outcome" field.

func (*ImportScanShowMutation) SetOutcomeMessage

func (m *ImportScanShowMutation) SetOutcomeMessage(s string)

SetOutcomeMessage sets the "outcome_message" field.

func (*ImportScanShowMutation) SetParsedTitle

func (m *ImportScanShowMutation) SetParsedTitle(s string)

SetParsedTitle sets the "parsed_title" field.

func (*ImportScanShowMutation) SetParsedYear

func (m *ImportScanShowMutation) SetParsedYear(u uint16)

SetParsedYear sets the "parsed_year" field.

func (*ImportScanShowMutation) SetScanID

func (m *ImportScanShowMutation) SetScanID(id uint32)

SetScanID sets the "scan" edge to the ImportScan entity by id.

func (*ImportScanShowMutation) SetTvdbID

func (m *ImportScanShowMutation) SetTvdbID(u uint32)

SetTvdbID sets the "tvdb_id" field.

func (*ImportScanShowMutation) SetUpdateTime

func (m *ImportScanShowMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*ImportScanShowMutation) TvdbID

func (m *ImportScanShowMutation) TvdbID() (r uint32, exists bool)

TvdbID returns the value of the "tvdb_id" field in the mutation.

func (*ImportScanShowMutation) TvdbIDCleared

func (m *ImportScanShowMutation) TvdbIDCleared() bool

TvdbIDCleared returns if the "tvdb_id" field was cleared in this mutation.

func (ImportScanShowMutation) Tx

func (m ImportScanShowMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ImportScanShowMutation) Type

func (m *ImportScanShowMutation) Type() string

Type returns the node type of this mutation (ImportScanShow).

func (*ImportScanShowMutation) UpdateTime

func (m *ImportScanShowMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*ImportScanShowMutation) Where

Where appends a list predicates to the ImportScanShowMutation builder.

func (*ImportScanShowMutation) WhereP

func (m *ImportScanShowMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ImportScanShowMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ImportScanShowQuery

type ImportScanShowQuery struct {
	// contains filtered or unexported fields
}

ImportScanShowQuery is the builder for querying ImportScanShow entities.

func (*ImportScanShowQuery) Aggregate

Aggregate returns a ImportScanShowSelect configured with the given aggregations.

func (*ImportScanShowQuery) All

All executes the query and returns a list of ImportScanShows.

func (*ImportScanShowQuery) AllX

AllX is like All, but panics if an error occurs.

func (*ImportScanShowQuery) Clone

Clone returns a duplicate of the ImportScanShowQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ImportScanShowQuery) Count

func (_q *ImportScanShowQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ImportScanShowQuery) CountX

func (_q *ImportScanShowQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ImportScanShowQuery) Exist

func (_q *ImportScanShowQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ImportScanShowQuery) ExistX

func (_q *ImportScanShowQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ImportScanShowQuery) First

First returns the first ImportScanShow entity from the query. Returns a *NotFoundError when no ImportScanShow was found.

func (*ImportScanShowQuery) FirstID

func (_q *ImportScanShowQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first ImportScanShow ID from the query. Returns a *NotFoundError when no ImportScanShow ID was found.

func (*ImportScanShowQuery) FirstIDX

func (_q *ImportScanShowQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*ImportScanShowQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*ImportScanShowQuery) GroupBy

func (_q *ImportScanShowQuery) GroupBy(field string, fields ...string) *ImportScanShowGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ImportScanShow.Query().
	GroupBy(importscanshow.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ImportScanShowQuery) IDs

func (_q *ImportScanShowQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of ImportScanShow IDs.

func (*ImportScanShowQuery) IDsX

func (_q *ImportScanShowQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*ImportScanShowQuery) Limit

func (_q *ImportScanShowQuery) Limit(limit int) *ImportScanShowQuery

Limit the number of records to be returned by this query.

func (*ImportScanShowQuery) Offset

func (_q *ImportScanShowQuery) Offset(offset int) *ImportScanShowQuery

Offset to start from.

func (*ImportScanShowQuery) Only

Only returns a single ImportScanShow entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ImportScanShow entity is found. Returns a *NotFoundError when no ImportScanShow entities are found.

func (*ImportScanShowQuery) OnlyID

func (_q *ImportScanShowQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only ImportScanShow ID in the query. Returns a *NotSingularError when more than one ImportScanShow ID is found. Returns a *NotFoundError when no entities are found.

func (*ImportScanShowQuery) OnlyIDX

func (_q *ImportScanShowQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ImportScanShowQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ImportScanShowQuery) Order

Order specifies how the records should be ordered.

func (*ImportScanShowQuery) QueryScan

func (_q *ImportScanShowQuery) QueryScan() *ImportScanQuery

QueryScan chains the current query on the "scan" edge.

func (*ImportScanShowQuery) Select

func (_q *ImportScanShowQuery) Select(fields ...string) *ImportScanShowSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.ImportScanShow.Query().
	Select(importscanshow.FieldCreateTime).
	Scan(ctx, &v)

func (*ImportScanShowQuery) Unique

func (_q *ImportScanShowQuery) Unique(unique bool) *ImportScanShowQuery

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 (*ImportScanShowQuery) Where

Where adds a new predicate for the ImportScanShowQuery builder.

func (*ImportScanShowQuery) WithScan

func (_q *ImportScanShowQuery) WithScan(opts ...func(*ImportScanQuery)) *ImportScanShowQuery

WithScan tells the query-builder to eager-load the nodes that are connected to the "scan" edge. The optional arguments are used to configure the query builder of the edge.

type ImportScanShowSelect

type ImportScanShowSelect struct {
	*ImportScanShowQuery
	// contains filtered or unexported fields
}

ImportScanShowSelect is the builder for selecting fields of ImportScanShow entities.

func (*ImportScanShowSelect) Aggregate

Aggregate adds the given aggregation functions to the selector query.

func (*ImportScanShowSelect) Bool

func (s *ImportScanShowSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ImportScanShowSelect) BoolX

func (s *ImportScanShowSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ImportScanShowSelect) Bools

func (s *ImportScanShowSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ImportScanShowSelect) BoolsX

func (s *ImportScanShowSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ImportScanShowSelect) Float64

func (s *ImportScanShowSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ImportScanShowSelect) Float64X

func (s *ImportScanShowSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ImportScanShowSelect) Float64s

func (s *ImportScanShowSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ImportScanShowSelect) Float64sX

func (s *ImportScanShowSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ImportScanShowSelect) Int

func (s *ImportScanShowSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ImportScanShowSelect) IntX

func (s *ImportScanShowSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ImportScanShowSelect) Ints

func (s *ImportScanShowSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ImportScanShowSelect) IntsX

func (s *ImportScanShowSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ImportScanShowSelect) Scan

func (_s *ImportScanShowSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ImportScanShowSelect) ScanX

func (s *ImportScanShowSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ImportScanShowSelect) String

func (s *ImportScanShowSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ImportScanShowSelect) StringX

func (s *ImportScanShowSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ImportScanShowSelect) Strings

func (s *ImportScanShowSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ImportScanShowSelect) StringsX

func (s *ImportScanShowSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ImportScanShowUpdate

type ImportScanShowUpdate struct {
	// contains filtered or unexported fields
}

ImportScanShowUpdate is the builder for updating ImportScanShow entities.

func (*ImportScanShowUpdate) AddCreatedTvshowID

func (_u *ImportScanShowUpdate) AddCreatedTvshowID(v int32) *ImportScanShowUpdate

AddCreatedTvshowID adds value to the "created_tvshow_id" field.

func (*ImportScanShowUpdate) AddDecisionTvdbID

func (_u *ImportScanShowUpdate) AddDecisionTvdbID(v int32) *ImportScanShowUpdate

AddDecisionTvdbID adds value to the "decision_tvdb_id" field.

func (*ImportScanShowUpdate) AddExistingTvshowID

func (_u *ImportScanShowUpdate) AddExistingTvshowID(v int32) *ImportScanShowUpdate

AddExistingTvshowID adds value to the "existing_tvshow_id" field.

func (*ImportScanShowUpdate) AddFileCount

func (_u *ImportScanShowUpdate) AddFileCount(v int16) *ImportScanShowUpdate

AddFileCount adds value to the "file_count" field.

func (*ImportScanShowUpdate) AddParsedYear

func (_u *ImportScanShowUpdate) AddParsedYear(v int16) *ImportScanShowUpdate

AddParsedYear adds value to the "parsed_year" field.

func (*ImportScanShowUpdate) AddTvdbID

AddTvdbID adds value to the "tvdb_id" field.

func (*ImportScanShowUpdate) AppendCandidates

AppendCandidates appends value to the "candidates" field.

func (*ImportScanShowUpdate) ClearCandidates

func (_u *ImportScanShowUpdate) ClearCandidates() *ImportScanShowUpdate

ClearCandidates clears the value of the "candidates" field.

func (*ImportScanShowUpdate) ClearCreatedTvshowID

func (_u *ImportScanShowUpdate) ClearCreatedTvshowID() *ImportScanShowUpdate

ClearCreatedTvshowID clears the value of the "created_tvshow_id" field.

func (*ImportScanShowUpdate) ClearDecisionTvdbID

func (_u *ImportScanShowUpdate) ClearDecisionTvdbID() *ImportScanShowUpdate

ClearDecisionTvdbID clears the value of the "decision_tvdb_id" field.

func (*ImportScanShowUpdate) ClearExistingTvshowID

func (_u *ImportScanShowUpdate) ClearExistingTvshowID() *ImportScanShowUpdate

ClearExistingTvshowID clears the value of the "existing_tvshow_id" field.

func (*ImportScanShowUpdate) ClearOutcomeMessage

func (_u *ImportScanShowUpdate) ClearOutcomeMessage() *ImportScanShowUpdate

ClearOutcomeMessage clears the value of the "outcome_message" field.

func (*ImportScanShowUpdate) ClearParsedTitle

func (_u *ImportScanShowUpdate) ClearParsedTitle() *ImportScanShowUpdate

ClearParsedTitle clears the value of the "parsed_title" field.

func (*ImportScanShowUpdate) ClearParsedYear

func (_u *ImportScanShowUpdate) ClearParsedYear() *ImportScanShowUpdate

ClearParsedYear clears the value of the "parsed_year" field.

func (*ImportScanShowUpdate) ClearScan

func (_u *ImportScanShowUpdate) ClearScan() *ImportScanShowUpdate

ClearScan clears the "scan" edge to the ImportScan entity.

func (*ImportScanShowUpdate) ClearTvdbID

func (_u *ImportScanShowUpdate) ClearTvdbID() *ImportScanShowUpdate

ClearTvdbID clears the value of the "tvdb_id" field.

func (*ImportScanShowUpdate) Exec

func (_u *ImportScanShowUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ImportScanShowUpdate) ExecX

func (_u *ImportScanShowUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImportScanShowUpdate) Mutation

Mutation returns the ImportScanShowMutation object of the builder.

func (*ImportScanShowUpdate) Save

func (_u *ImportScanShowUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ImportScanShowUpdate) SaveX

func (_u *ImportScanShowUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ImportScanShowUpdate) SetCandidates

SetCandidates sets the "candidates" field.

func (*ImportScanShowUpdate) SetClassification

SetClassification sets the "classification" field.

func (*ImportScanShowUpdate) SetCreatedTvshowID

func (_u *ImportScanShowUpdate) SetCreatedTvshowID(v uint32) *ImportScanShowUpdate

SetCreatedTvshowID sets the "created_tvshow_id" field.

func (*ImportScanShowUpdate) SetDecision

SetDecision sets the "decision" field.

func (*ImportScanShowUpdate) SetDecisionTvdbID

func (_u *ImportScanShowUpdate) SetDecisionTvdbID(v uint32) *ImportScanShowUpdate

SetDecisionTvdbID sets the "decision_tvdb_id" field.

func (*ImportScanShowUpdate) SetExistingTvshowID

func (_u *ImportScanShowUpdate) SetExistingTvshowID(v uint32) *ImportScanShowUpdate

SetExistingTvshowID sets the "existing_tvshow_id" field.

func (*ImportScanShowUpdate) SetFileCount

func (_u *ImportScanShowUpdate) SetFileCount(v uint16) *ImportScanShowUpdate

SetFileCount sets the "file_count" field.

func (*ImportScanShowUpdate) SetFolderPath

func (_u *ImportScanShowUpdate) SetFolderPath(v string) *ImportScanShowUpdate

SetFolderPath sets the "folder_path" field.

func (*ImportScanShowUpdate) SetNillableClassification

func (_u *ImportScanShowUpdate) SetNillableClassification(v *importscanshow.Classification) *ImportScanShowUpdate

SetNillableClassification sets the "classification" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableCreatedTvshowID

func (_u *ImportScanShowUpdate) SetNillableCreatedTvshowID(v *uint32) *ImportScanShowUpdate

SetNillableCreatedTvshowID sets the "created_tvshow_id" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableDecision

SetNillableDecision sets the "decision" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableDecisionTvdbID

func (_u *ImportScanShowUpdate) SetNillableDecisionTvdbID(v *uint32) *ImportScanShowUpdate

SetNillableDecisionTvdbID sets the "decision_tvdb_id" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableExistingTvshowID

func (_u *ImportScanShowUpdate) SetNillableExistingTvshowID(v *uint32) *ImportScanShowUpdate

SetNillableExistingTvshowID sets the "existing_tvshow_id" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableFileCount

func (_u *ImportScanShowUpdate) SetNillableFileCount(v *uint16) *ImportScanShowUpdate

SetNillableFileCount sets the "file_count" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableFolderPath

func (_u *ImportScanShowUpdate) SetNillableFolderPath(v *string) *ImportScanShowUpdate

SetNillableFolderPath sets the "folder_path" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableOutcome

SetNillableOutcome sets the "outcome" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableOutcomeMessage

func (_u *ImportScanShowUpdate) SetNillableOutcomeMessage(v *string) *ImportScanShowUpdate

SetNillableOutcomeMessage sets the "outcome_message" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableParsedTitle

func (_u *ImportScanShowUpdate) SetNillableParsedTitle(v *string) *ImportScanShowUpdate

SetNillableParsedTitle sets the "parsed_title" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableParsedYear

func (_u *ImportScanShowUpdate) SetNillableParsedYear(v *uint16) *ImportScanShowUpdate

SetNillableParsedYear sets the "parsed_year" field if the given value is not nil.

func (*ImportScanShowUpdate) SetNillableTvdbID

func (_u *ImportScanShowUpdate) SetNillableTvdbID(v *uint32) *ImportScanShowUpdate

SetNillableTvdbID sets the "tvdb_id" field if the given value is not nil.

func (*ImportScanShowUpdate) SetOutcome

SetOutcome sets the "outcome" field.

func (*ImportScanShowUpdate) SetOutcomeMessage

func (_u *ImportScanShowUpdate) SetOutcomeMessage(v string) *ImportScanShowUpdate

SetOutcomeMessage sets the "outcome_message" field.

func (*ImportScanShowUpdate) SetParsedTitle

func (_u *ImportScanShowUpdate) SetParsedTitle(v string) *ImportScanShowUpdate

SetParsedTitle sets the "parsed_title" field.

func (*ImportScanShowUpdate) SetParsedYear

func (_u *ImportScanShowUpdate) SetParsedYear(v uint16) *ImportScanShowUpdate

SetParsedYear sets the "parsed_year" field.

func (*ImportScanShowUpdate) SetScan

SetScan sets the "scan" edge to the ImportScan entity.

func (*ImportScanShowUpdate) SetScanID

SetScanID sets the "scan" edge to the ImportScan entity by ID.

func (*ImportScanShowUpdate) SetTvdbID

SetTvdbID sets the "tvdb_id" field.

func (*ImportScanShowUpdate) SetUpdateTime

func (_u *ImportScanShowUpdate) SetUpdateTime(v time.Time) *ImportScanShowUpdate

SetUpdateTime sets the "update_time" field.

func (*ImportScanShowUpdate) Where

Where appends a list predicates to the ImportScanShowUpdate builder.

type ImportScanShowUpdateOne

type ImportScanShowUpdateOne struct {
	// contains filtered or unexported fields
}

ImportScanShowUpdateOne is the builder for updating a single ImportScanShow entity.

func (*ImportScanShowUpdateOne) AddCreatedTvshowID

func (_u *ImportScanShowUpdateOne) AddCreatedTvshowID(v int32) *ImportScanShowUpdateOne

AddCreatedTvshowID adds value to the "created_tvshow_id" field.

func (*ImportScanShowUpdateOne) AddDecisionTvdbID

func (_u *ImportScanShowUpdateOne) AddDecisionTvdbID(v int32) *ImportScanShowUpdateOne

AddDecisionTvdbID adds value to the "decision_tvdb_id" field.

func (*ImportScanShowUpdateOne) AddExistingTvshowID

func (_u *ImportScanShowUpdateOne) AddExistingTvshowID(v int32) *ImportScanShowUpdateOne

AddExistingTvshowID adds value to the "existing_tvshow_id" field.

func (*ImportScanShowUpdateOne) AddFileCount

AddFileCount adds value to the "file_count" field.

func (*ImportScanShowUpdateOne) AddParsedYear

AddParsedYear adds value to the "parsed_year" field.

func (*ImportScanShowUpdateOne) AddTvdbID

AddTvdbID adds value to the "tvdb_id" field.

func (*ImportScanShowUpdateOne) AppendCandidates

AppendCandidates appends value to the "candidates" field.

func (*ImportScanShowUpdateOne) ClearCandidates

func (_u *ImportScanShowUpdateOne) ClearCandidates() *ImportScanShowUpdateOne

ClearCandidates clears the value of the "candidates" field.

func (*ImportScanShowUpdateOne) ClearCreatedTvshowID

func (_u *ImportScanShowUpdateOne) ClearCreatedTvshowID() *ImportScanShowUpdateOne

ClearCreatedTvshowID clears the value of the "created_tvshow_id" field.

func (*ImportScanShowUpdateOne) ClearDecisionTvdbID

func (_u *ImportScanShowUpdateOne) ClearDecisionTvdbID() *ImportScanShowUpdateOne

ClearDecisionTvdbID clears the value of the "decision_tvdb_id" field.

func (*ImportScanShowUpdateOne) ClearExistingTvshowID

func (_u *ImportScanShowUpdateOne) ClearExistingTvshowID() *ImportScanShowUpdateOne

ClearExistingTvshowID clears the value of the "existing_tvshow_id" field.

func (*ImportScanShowUpdateOne) ClearOutcomeMessage

func (_u *ImportScanShowUpdateOne) ClearOutcomeMessage() *ImportScanShowUpdateOne

ClearOutcomeMessage clears the value of the "outcome_message" field.

func (*ImportScanShowUpdateOne) ClearParsedTitle

func (_u *ImportScanShowUpdateOne) ClearParsedTitle() *ImportScanShowUpdateOne

ClearParsedTitle clears the value of the "parsed_title" field.

func (*ImportScanShowUpdateOne) ClearParsedYear

func (_u *ImportScanShowUpdateOne) ClearParsedYear() *ImportScanShowUpdateOne

ClearParsedYear clears the value of the "parsed_year" field.

func (*ImportScanShowUpdateOne) ClearScan

ClearScan clears the "scan" edge to the ImportScan entity.

func (*ImportScanShowUpdateOne) ClearTvdbID

ClearTvdbID clears the value of the "tvdb_id" field.

func (*ImportScanShowUpdateOne) Exec

Exec executes the query on the entity.

func (*ImportScanShowUpdateOne) ExecX

func (_u *ImportScanShowUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImportScanShowUpdateOne) Mutation

Mutation returns the ImportScanShowMutation object of the builder.

func (*ImportScanShowUpdateOne) Save

Save executes the query and returns the updated ImportScanShow entity.

func (*ImportScanShowUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ImportScanShowUpdateOne) Select

func (_u *ImportScanShowUpdateOne) Select(field string, fields ...string) *ImportScanShowUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ImportScanShowUpdateOne) SetCandidates

SetCandidates sets the "candidates" field.

func (*ImportScanShowUpdateOne) SetClassification

SetClassification sets the "classification" field.

func (*ImportScanShowUpdateOne) SetCreatedTvshowID

func (_u *ImportScanShowUpdateOne) SetCreatedTvshowID(v uint32) *ImportScanShowUpdateOne

SetCreatedTvshowID sets the "created_tvshow_id" field.

func (*ImportScanShowUpdateOne) SetDecision

SetDecision sets the "decision" field.

func (*ImportScanShowUpdateOne) SetDecisionTvdbID

func (_u *ImportScanShowUpdateOne) SetDecisionTvdbID(v uint32) *ImportScanShowUpdateOne

SetDecisionTvdbID sets the "decision_tvdb_id" field.

func (*ImportScanShowUpdateOne) SetExistingTvshowID

func (_u *ImportScanShowUpdateOne) SetExistingTvshowID(v uint32) *ImportScanShowUpdateOne

SetExistingTvshowID sets the "existing_tvshow_id" field.

func (*ImportScanShowUpdateOne) SetFileCount

SetFileCount sets the "file_count" field.

func (*ImportScanShowUpdateOne) SetFolderPath

SetFolderPath sets the "folder_path" field.

func (*ImportScanShowUpdateOne) SetNillableClassification

SetNillableClassification sets the "classification" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableCreatedTvshowID

func (_u *ImportScanShowUpdateOne) SetNillableCreatedTvshowID(v *uint32) *ImportScanShowUpdateOne

SetNillableCreatedTvshowID sets the "created_tvshow_id" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableDecision

SetNillableDecision sets the "decision" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableDecisionTvdbID

func (_u *ImportScanShowUpdateOne) SetNillableDecisionTvdbID(v *uint32) *ImportScanShowUpdateOne

SetNillableDecisionTvdbID sets the "decision_tvdb_id" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableExistingTvshowID

func (_u *ImportScanShowUpdateOne) SetNillableExistingTvshowID(v *uint32) *ImportScanShowUpdateOne

SetNillableExistingTvshowID sets the "existing_tvshow_id" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableFileCount

func (_u *ImportScanShowUpdateOne) SetNillableFileCount(v *uint16) *ImportScanShowUpdateOne

SetNillableFileCount sets the "file_count" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableFolderPath

func (_u *ImportScanShowUpdateOne) SetNillableFolderPath(v *string) *ImportScanShowUpdateOne

SetNillableFolderPath sets the "folder_path" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableOutcome

SetNillableOutcome sets the "outcome" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableOutcomeMessage

func (_u *ImportScanShowUpdateOne) SetNillableOutcomeMessage(v *string) *ImportScanShowUpdateOne

SetNillableOutcomeMessage sets the "outcome_message" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableParsedTitle

func (_u *ImportScanShowUpdateOne) SetNillableParsedTitle(v *string) *ImportScanShowUpdateOne

SetNillableParsedTitle sets the "parsed_title" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableParsedYear

func (_u *ImportScanShowUpdateOne) SetNillableParsedYear(v *uint16) *ImportScanShowUpdateOne

SetNillableParsedYear sets the "parsed_year" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetNillableTvdbID

func (_u *ImportScanShowUpdateOne) SetNillableTvdbID(v *uint32) *ImportScanShowUpdateOne

SetNillableTvdbID sets the "tvdb_id" field if the given value is not nil.

func (*ImportScanShowUpdateOne) SetOutcome

SetOutcome sets the "outcome" field.

func (*ImportScanShowUpdateOne) SetOutcomeMessage

func (_u *ImportScanShowUpdateOne) SetOutcomeMessage(v string) *ImportScanShowUpdateOne

SetOutcomeMessage sets the "outcome_message" field.

func (*ImportScanShowUpdateOne) SetParsedTitle

SetParsedTitle sets the "parsed_title" field.

func (*ImportScanShowUpdateOne) SetParsedYear

SetParsedYear sets the "parsed_year" field.

func (*ImportScanShowUpdateOne) SetScan

SetScan sets the "scan" edge to the ImportScan entity.

func (*ImportScanShowUpdateOne) SetScanID

SetScanID sets the "scan" edge to the ImportScan entity by ID.

func (*ImportScanShowUpdateOne) SetTvdbID

SetTvdbID sets the "tvdb_id" field.

func (*ImportScanShowUpdateOne) SetUpdateTime

SetUpdateTime sets the "update_time" field.

func (*ImportScanShowUpdateOne) Where

Where appends a list predicates to the ImportScanShowUpdate builder.

type ImportScanShows

type ImportScanShows []*ImportScanShow

ImportScanShows is a parsable slice of ImportScanShow.

type ImportScanUpdate

type ImportScanUpdate struct {
	// contains filtered or unexported fields
}

ImportScanUpdate is the builder for updating ImportScan entities.

func (*ImportScanUpdate) AddCommitFailedCount

func (_u *ImportScanUpdate) AddCommitFailedCount(v int32) *ImportScanUpdate

AddCommitFailedCount adds value to the "commit_failed_count" field.

func (*ImportScanUpdate) AddCommitSuccessCount

func (_u *ImportScanUpdate) AddCommitSuccessCount(v int32) *ImportScanUpdate

AddCommitSuccessCount adds value to the "commit_success_count" field.

func (*ImportScanUpdate) AddFileIDs

func (_u *ImportScanUpdate) AddFileIDs(ids ...uint32) *ImportScanUpdate

AddFileIDs adds the "files" edge to the ImportScanFile entity by IDs.

func (*ImportScanUpdate) AddFiles

func (_u *ImportScanUpdate) AddFiles(v ...*ImportScanFile) *ImportScanUpdate

AddFiles adds the "files" edges to the ImportScanFile entity.

func (*ImportScanUpdate) AddProcessedCount

func (_u *ImportScanUpdate) AddProcessedCount(v int32) *ImportScanUpdate

AddProcessedCount adds value to the "processed_count" field.

func (*ImportScanUpdate) AddShowIDs

func (_u *ImportScanUpdate) AddShowIDs(ids ...uint32) *ImportScanUpdate

AddShowIDs adds the "shows" edge to the ImportScanShow entity by IDs.

func (*ImportScanUpdate) AddShows

func (_u *ImportScanUpdate) AddShows(v ...*ImportScanShow) *ImportScanUpdate

AddShows adds the "shows" edges to the ImportScanShow entity.

func (*ImportScanUpdate) AddTotalCount

func (_u *ImportScanUpdate) AddTotalCount(v int32) *ImportScanUpdate

AddTotalCount adds value to the "total_count" field.

func (*ImportScanUpdate) ClearCommittedAt

func (_u *ImportScanUpdate) ClearCommittedAt() *ImportScanUpdate

ClearCommittedAt clears the value of the "committed_at" field.

func (*ImportScanUpdate) ClearFailureReason

func (_u *ImportScanUpdate) ClearFailureReason() *ImportScanUpdate

ClearFailureReason clears the value of the "failure_reason" field.

func (*ImportScanUpdate) ClearFiles

func (_u *ImportScanUpdate) ClearFiles() *ImportScanUpdate

ClearFiles clears all "files" edges to the ImportScanFile entity.

func (*ImportScanUpdate) ClearImportMode

func (_u *ImportScanUpdate) ClearImportMode() *ImportScanUpdate

ClearImportMode clears the value of the "import_mode" field.

func (*ImportScanUpdate) ClearScannedAt

func (_u *ImportScanUpdate) ClearScannedAt() *ImportScanUpdate

ClearScannedAt clears the value of the "scanned_at" field.

func (*ImportScanUpdate) ClearShows

func (_u *ImportScanUpdate) ClearShows() *ImportScanUpdate

ClearShows clears all "shows" edges to the ImportScanShow entity.

func (*ImportScanUpdate) Exec

func (_u *ImportScanUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ImportScanUpdate) ExecX

func (_u *ImportScanUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImportScanUpdate) Mutation

func (_u *ImportScanUpdate) Mutation() *ImportScanMutation

Mutation returns the ImportScanMutation object of the builder.

func (*ImportScanUpdate) RemoveFileIDs

func (_u *ImportScanUpdate) RemoveFileIDs(ids ...uint32) *ImportScanUpdate

RemoveFileIDs removes the "files" edge to ImportScanFile entities by IDs.

func (*ImportScanUpdate) RemoveFiles

func (_u *ImportScanUpdate) RemoveFiles(v ...*ImportScanFile) *ImportScanUpdate

RemoveFiles removes "files" edges to ImportScanFile entities.

func (*ImportScanUpdate) RemoveShowIDs

func (_u *ImportScanUpdate) RemoveShowIDs(ids ...uint32) *ImportScanUpdate

RemoveShowIDs removes the "shows" edge to ImportScanShow entities by IDs.

func (*ImportScanUpdate) RemoveShows

func (_u *ImportScanUpdate) RemoveShows(v ...*ImportScanShow) *ImportScanUpdate

RemoveShows removes "shows" edges to ImportScanShow entities.

func (*ImportScanUpdate) Save

func (_u *ImportScanUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ImportScanUpdate) SaveX

func (_u *ImportScanUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ImportScanUpdate) SetCommitFailedCount

func (_u *ImportScanUpdate) SetCommitFailedCount(v uint32) *ImportScanUpdate

SetCommitFailedCount sets the "commit_failed_count" field.

func (*ImportScanUpdate) SetCommitSuccessCount

func (_u *ImportScanUpdate) SetCommitSuccessCount(v uint32) *ImportScanUpdate

SetCommitSuccessCount sets the "commit_success_count" field.

func (*ImportScanUpdate) SetCommittedAt

func (_u *ImportScanUpdate) SetCommittedAt(v time.Time) *ImportScanUpdate

SetCommittedAt sets the "committed_at" field.

func (*ImportScanUpdate) SetFailureReason

func (_u *ImportScanUpdate) SetFailureReason(v string) *ImportScanUpdate

SetFailureReason sets the "failure_reason" field.

func (*ImportScanUpdate) SetImportMode

SetImportMode sets the "import_mode" field.

func (*ImportScanUpdate) SetKind

SetKind sets the "kind" field.

func (*ImportScanUpdate) SetMode

SetMode sets the "mode" field.

func (*ImportScanUpdate) SetNillableCommitFailedCount

func (_u *ImportScanUpdate) SetNillableCommitFailedCount(v *uint32) *ImportScanUpdate

SetNillableCommitFailedCount sets the "commit_failed_count" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableCommitSuccessCount

func (_u *ImportScanUpdate) SetNillableCommitSuccessCount(v *uint32) *ImportScanUpdate

SetNillableCommitSuccessCount sets the "commit_success_count" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableCommittedAt

func (_u *ImportScanUpdate) SetNillableCommittedAt(v *time.Time) *ImportScanUpdate

SetNillableCommittedAt sets the "committed_at" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableFailureReason

func (_u *ImportScanUpdate) SetNillableFailureReason(v *string) *ImportScanUpdate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableImportMode

func (_u *ImportScanUpdate) SetNillableImportMode(v *importscan.ImportMode) *ImportScanUpdate

SetNillableImportMode sets the "import_mode" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableKind

func (_u *ImportScanUpdate) SetNillableKind(v *importscan.Kind) *ImportScanUpdate

SetNillableKind sets the "kind" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableMode

func (_u *ImportScanUpdate) SetNillableMode(v *importscan.Mode) *ImportScanUpdate

SetNillableMode sets the "mode" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableProcessedCount

func (_u *ImportScanUpdate) SetNillableProcessedCount(v *uint32) *ImportScanUpdate

SetNillableProcessedCount sets the "processed_count" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableScannedAt

func (_u *ImportScanUpdate) SetNillableScannedAt(v *time.Time) *ImportScanUpdate

SetNillableScannedAt sets the "scanned_at" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableSourcePath

func (_u *ImportScanUpdate) SetNillableSourcePath(v *string) *ImportScanUpdate

SetNillableSourcePath sets the "source_path" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableStatus

func (_u *ImportScanUpdate) SetNillableStatus(v *importscan.Status) *ImportScanUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ImportScanUpdate) SetNillableTotalCount

func (_u *ImportScanUpdate) SetNillableTotalCount(v *uint32) *ImportScanUpdate

SetNillableTotalCount sets the "total_count" field if the given value is not nil.

func (*ImportScanUpdate) SetProcessedCount

func (_u *ImportScanUpdate) SetProcessedCount(v uint32) *ImportScanUpdate

SetProcessedCount sets the "processed_count" field.

func (*ImportScanUpdate) SetScannedAt

func (_u *ImportScanUpdate) SetScannedAt(v time.Time) *ImportScanUpdate

SetScannedAt sets the "scanned_at" field.

func (*ImportScanUpdate) SetSourcePath

func (_u *ImportScanUpdate) SetSourcePath(v string) *ImportScanUpdate

SetSourcePath sets the "source_path" field.

func (*ImportScanUpdate) SetStatus

SetStatus sets the "status" field.

func (*ImportScanUpdate) SetTotalCount

func (_u *ImportScanUpdate) SetTotalCount(v uint32) *ImportScanUpdate

SetTotalCount sets the "total_count" field.

func (*ImportScanUpdate) SetUpdateTime

func (_u *ImportScanUpdate) SetUpdateTime(v time.Time) *ImportScanUpdate

SetUpdateTime sets the "update_time" field.

func (*ImportScanUpdate) Where

Where appends a list predicates to the ImportScanUpdate builder.

type ImportScanUpdateOne

type ImportScanUpdateOne struct {
	// contains filtered or unexported fields
}

ImportScanUpdateOne is the builder for updating a single ImportScan entity.

func (*ImportScanUpdateOne) AddCommitFailedCount

func (_u *ImportScanUpdateOne) AddCommitFailedCount(v int32) *ImportScanUpdateOne

AddCommitFailedCount adds value to the "commit_failed_count" field.

func (*ImportScanUpdateOne) AddCommitSuccessCount

func (_u *ImportScanUpdateOne) AddCommitSuccessCount(v int32) *ImportScanUpdateOne

AddCommitSuccessCount adds value to the "commit_success_count" field.

func (*ImportScanUpdateOne) AddFileIDs

func (_u *ImportScanUpdateOne) AddFileIDs(ids ...uint32) *ImportScanUpdateOne

AddFileIDs adds the "files" edge to the ImportScanFile entity by IDs.

func (*ImportScanUpdateOne) AddFiles

AddFiles adds the "files" edges to the ImportScanFile entity.

func (*ImportScanUpdateOne) AddProcessedCount

func (_u *ImportScanUpdateOne) AddProcessedCount(v int32) *ImportScanUpdateOne

AddProcessedCount adds value to the "processed_count" field.

func (*ImportScanUpdateOne) AddShowIDs

func (_u *ImportScanUpdateOne) AddShowIDs(ids ...uint32) *ImportScanUpdateOne

AddShowIDs adds the "shows" edge to the ImportScanShow entity by IDs.

func (*ImportScanUpdateOne) AddShows

AddShows adds the "shows" edges to the ImportScanShow entity.

func (*ImportScanUpdateOne) AddTotalCount

func (_u *ImportScanUpdateOne) AddTotalCount(v int32) *ImportScanUpdateOne

AddTotalCount adds value to the "total_count" field.

func (*ImportScanUpdateOne) ClearCommittedAt

func (_u *ImportScanUpdateOne) ClearCommittedAt() *ImportScanUpdateOne

ClearCommittedAt clears the value of the "committed_at" field.

func (*ImportScanUpdateOne) ClearFailureReason

func (_u *ImportScanUpdateOne) ClearFailureReason() *ImportScanUpdateOne

ClearFailureReason clears the value of the "failure_reason" field.

func (*ImportScanUpdateOne) ClearFiles

func (_u *ImportScanUpdateOne) ClearFiles() *ImportScanUpdateOne

ClearFiles clears all "files" edges to the ImportScanFile entity.

func (*ImportScanUpdateOne) ClearImportMode

func (_u *ImportScanUpdateOne) ClearImportMode() *ImportScanUpdateOne

ClearImportMode clears the value of the "import_mode" field.

func (*ImportScanUpdateOne) ClearScannedAt

func (_u *ImportScanUpdateOne) ClearScannedAt() *ImportScanUpdateOne

ClearScannedAt clears the value of the "scanned_at" field.

func (*ImportScanUpdateOne) ClearShows

func (_u *ImportScanUpdateOne) ClearShows() *ImportScanUpdateOne

ClearShows clears all "shows" edges to the ImportScanShow entity.

func (*ImportScanUpdateOne) Exec

func (_u *ImportScanUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ImportScanUpdateOne) ExecX

func (_u *ImportScanUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ImportScanUpdateOne) Mutation

func (_u *ImportScanUpdateOne) Mutation() *ImportScanMutation

Mutation returns the ImportScanMutation object of the builder.

func (*ImportScanUpdateOne) RemoveFileIDs

func (_u *ImportScanUpdateOne) RemoveFileIDs(ids ...uint32) *ImportScanUpdateOne

RemoveFileIDs removes the "files" edge to ImportScanFile entities by IDs.

func (*ImportScanUpdateOne) RemoveFiles

func (_u *ImportScanUpdateOne) RemoveFiles(v ...*ImportScanFile) *ImportScanUpdateOne

RemoveFiles removes "files" edges to ImportScanFile entities.

func (*ImportScanUpdateOne) RemoveShowIDs

func (_u *ImportScanUpdateOne) RemoveShowIDs(ids ...uint32) *ImportScanUpdateOne

RemoveShowIDs removes the "shows" edge to ImportScanShow entities by IDs.

func (*ImportScanUpdateOne) RemoveShows

func (_u *ImportScanUpdateOne) RemoveShows(v ...*ImportScanShow) *ImportScanUpdateOne

RemoveShows removes "shows" edges to ImportScanShow entities.

func (*ImportScanUpdateOne) Save

Save executes the query and returns the updated ImportScan entity.

func (*ImportScanUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ImportScanUpdateOne) Select

func (_u *ImportScanUpdateOne) Select(field string, fields ...string) *ImportScanUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ImportScanUpdateOne) SetCommitFailedCount

func (_u *ImportScanUpdateOne) SetCommitFailedCount(v uint32) *ImportScanUpdateOne

SetCommitFailedCount sets the "commit_failed_count" field.

func (*ImportScanUpdateOne) SetCommitSuccessCount

func (_u *ImportScanUpdateOne) SetCommitSuccessCount(v uint32) *ImportScanUpdateOne

SetCommitSuccessCount sets the "commit_success_count" field.

func (*ImportScanUpdateOne) SetCommittedAt

func (_u *ImportScanUpdateOne) SetCommittedAt(v time.Time) *ImportScanUpdateOne

SetCommittedAt sets the "committed_at" field.

func (*ImportScanUpdateOne) SetFailureReason

func (_u *ImportScanUpdateOne) SetFailureReason(v string) *ImportScanUpdateOne

SetFailureReason sets the "failure_reason" field.

func (*ImportScanUpdateOne) SetImportMode

SetImportMode sets the "import_mode" field.

func (*ImportScanUpdateOne) SetKind

SetKind sets the "kind" field.

func (*ImportScanUpdateOne) SetMode

SetMode sets the "mode" field.

func (*ImportScanUpdateOne) SetNillableCommitFailedCount

func (_u *ImportScanUpdateOne) SetNillableCommitFailedCount(v *uint32) *ImportScanUpdateOne

SetNillableCommitFailedCount sets the "commit_failed_count" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableCommitSuccessCount

func (_u *ImportScanUpdateOne) SetNillableCommitSuccessCount(v *uint32) *ImportScanUpdateOne

SetNillableCommitSuccessCount sets the "commit_success_count" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableCommittedAt

func (_u *ImportScanUpdateOne) SetNillableCommittedAt(v *time.Time) *ImportScanUpdateOne

SetNillableCommittedAt sets the "committed_at" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableFailureReason

func (_u *ImportScanUpdateOne) SetNillableFailureReason(v *string) *ImportScanUpdateOne

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableImportMode

func (_u *ImportScanUpdateOne) SetNillableImportMode(v *importscan.ImportMode) *ImportScanUpdateOne

SetNillableImportMode sets the "import_mode" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableKind

func (_u *ImportScanUpdateOne) SetNillableKind(v *importscan.Kind) *ImportScanUpdateOne

SetNillableKind sets the "kind" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableMode

func (_u *ImportScanUpdateOne) SetNillableMode(v *importscan.Mode) *ImportScanUpdateOne

SetNillableMode sets the "mode" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableProcessedCount

func (_u *ImportScanUpdateOne) SetNillableProcessedCount(v *uint32) *ImportScanUpdateOne

SetNillableProcessedCount sets the "processed_count" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableScannedAt

func (_u *ImportScanUpdateOne) SetNillableScannedAt(v *time.Time) *ImportScanUpdateOne

SetNillableScannedAt sets the "scanned_at" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableSourcePath

func (_u *ImportScanUpdateOne) SetNillableSourcePath(v *string) *ImportScanUpdateOne

SetNillableSourcePath sets the "source_path" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableStatus

func (_u *ImportScanUpdateOne) SetNillableStatus(v *importscan.Status) *ImportScanUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ImportScanUpdateOne) SetNillableTotalCount

func (_u *ImportScanUpdateOne) SetNillableTotalCount(v *uint32) *ImportScanUpdateOne

SetNillableTotalCount sets the "total_count" field if the given value is not nil.

func (*ImportScanUpdateOne) SetProcessedCount

func (_u *ImportScanUpdateOne) SetProcessedCount(v uint32) *ImportScanUpdateOne

SetProcessedCount sets the "processed_count" field.

func (*ImportScanUpdateOne) SetScannedAt

func (_u *ImportScanUpdateOne) SetScannedAt(v time.Time) *ImportScanUpdateOne

SetScannedAt sets the "scanned_at" field.

func (*ImportScanUpdateOne) SetSourcePath

func (_u *ImportScanUpdateOne) SetSourcePath(v string) *ImportScanUpdateOne

SetSourcePath sets the "source_path" field.

func (*ImportScanUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*ImportScanUpdateOne) SetTotalCount

func (_u *ImportScanUpdateOne) SetTotalCount(v uint32) *ImportScanUpdateOne

SetTotalCount sets the "total_count" field.

func (*ImportScanUpdateOne) SetUpdateTime

func (_u *ImportScanUpdateOne) SetUpdateTime(v time.Time) *ImportScanUpdateOne

SetUpdateTime sets the "update_time" field.

func (*ImportScanUpdateOne) Where

Where appends a list predicates to the ImportScanUpdate builder.

type ImportScans

type ImportScans []*ImportScan

ImportScans is a parsable slice of ImportScan.

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 Invite

type Invite struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// TokenHash holds the value of the "token_hash" field.
	TokenHash string `json:"token_hash,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Role holds the value of the "role" field.
	Role invite.Role `json:"role,omitempty"`
	// ExpiresAt holds the value of the "expires_at" field.
	ExpiresAt time.Time `json:"expires_at,omitempty"`
	// UsedAt holds the value of the "used_at" field.
	UsedAt *time.Time `json:"used_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the InviteQuery when eager-loading is set.
	Edges InviteEdges `json:"edges"`
	// contains filtered or unexported fields
}

Invite is the model entity for the Invite schema.

func (*Invite) QueryCreatedBy

func (_m *Invite) QueryCreatedBy() *UserQuery

QueryCreatedBy queries the "created_by" edge of the Invite entity.

func (*Invite) QueryUsedBy

func (_m *Invite) QueryUsedBy() *UserQuery

QueryUsedBy queries the "used_by" edge of the Invite entity.

func (*Invite) String

func (_m *Invite) String() string

String implements the fmt.Stringer.

func (*Invite) Unwrap

func (_m *Invite) Unwrap() *Invite

Unwrap unwraps the Invite 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 (*Invite) Update

func (_m *Invite) Update() *InviteUpdateOne

Update returns a builder for updating this Invite. Note that you need to call Invite.Unwrap() before calling this method if this Invite was returned from a transaction, and the transaction was committed or rolled back.

func (*Invite) Value

func (_m *Invite) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Invite. This includes values selected through modifiers, order, etc.

type InviteClient

type InviteClient struct {
	// contains filtered or unexported fields
}

InviteClient is a client for the Invite schema.

func NewInviteClient

func NewInviteClient(c config) *InviteClient

NewInviteClient returns a client for the Invite from the given config.

func (*InviteClient) Create

func (c *InviteClient) Create() *InviteCreate

Create returns a builder for creating a Invite entity.

func (*InviteClient) CreateBulk

func (c *InviteClient) CreateBulk(builders ...*InviteCreate) *InviteCreateBulk

CreateBulk returns a builder for creating a bulk of Invite entities.

func (*InviteClient) Delete

func (c *InviteClient) Delete() *InviteDelete

Delete returns a delete builder for Invite.

func (*InviteClient) DeleteOne

func (c *InviteClient) DeleteOne(_m *Invite) *InviteDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*InviteClient) DeleteOneID

func (c *InviteClient) DeleteOneID(id uint32) *InviteDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*InviteClient) Get

func (c *InviteClient) Get(ctx context.Context, id uint32) (*Invite, error)

Get returns a Invite entity by its id.

func (*InviteClient) GetX

func (c *InviteClient) GetX(ctx context.Context, id uint32) *Invite

GetX is like Get, but panics if an error occurs.

func (*InviteClient) Hooks

func (c *InviteClient) Hooks() []Hook

Hooks returns the client hooks.

func (*InviteClient) Intercept

func (c *InviteClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `invite.Intercept(f(g(h())))`.

func (*InviteClient) Interceptors

func (c *InviteClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*InviteClient) MapCreateBulk

func (c *InviteClient) MapCreateBulk(slice any, setFunc func(*InviteCreate, int)) *InviteCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*InviteClient) Query

func (c *InviteClient) Query() *InviteQuery

Query returns a query builder for Invite.

func (*InviteClient) QueryCreatedBy

func (c *InviteClient) QueryCreatedBy(_m *Invite) *UserQuery

QueryCreatedBy queries the created_by edge of a Invite.

func (*InviteClient) QueryUsedBy

func (c *InviteClient) QueryUsedBy(_m *Invite) *UserQuery

QueryUsedBy queries the used_by edge of a Invite.

func (*InviteClient) Update

func (c *InviteClient) Update() *InviteUpdate

Update returns an update builder for Invite.

func (*InviteClient) UpdateOne

func (c *InviteClient) UpdateOne(_m *Invite) *InviteUpdateOne

UpdateOne returns an update builder for the given entity.

func (*InviteClient) UpdateOneID

func (c *InviteClient) UpdateOneID(id uint32) *InviteUpdateOne

UpdateOneID returns an update builder for the given id.

func (*InviteClient) Use

func (c *InviteClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `invite.Hooks(f(g(h())))`.

type InviteCreate

type InviteCreate struct {
	// contains filtered or unexported fields
}

InviteCreate is the builder for creating a Invite entity.

func (*InviteCreate) Exec

func (_c *InviteCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*InviteCreate) ExecX

func (_c *InviteCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteCreate) Mutation

func (_c *InviteCreate) Mutation() *InviteMutation

Mutation returns the InviteMutation object of the builder.

func (*InviteCreate) Save

func (_c *InviteCreate) Save(ctx context.Context) (*Invite, error)

Save creates the Invite in the database.

func (*InviteCreate) SaveX

func (_c *InviteCreate) SaveX(ctx context.Context) *Invite

SaveX calls Save and panics if Save returns an error.

func (*InviteCreate) SetCreateTime

func (_c *InviteCreate) SetCreateTime(v time.Time) *InviteCreate

SetCreateTime sets the "create_time" field.

func (*InviteCreate) SetCreatedBy

func (_c *InviteCreate) SetCreatedBy(v *User) *InviteCreate

SetCreatedBy sets the "created_by" edge to the User entity.

func (*InviteCreate) SetCreatedByID

func (_c *InviteCreate) SetCreatedByID(id uint32) *InviteCreate

SetCreatedByID sets the "created_by" edge to the User entity by ID.

func (*InviteCreate) SetEmail

func (_c *InviteCreate) SetEmail(v string) *InviteCreate

SetEmail sets the "email" field.

func (*InviteCreate) SetExpiresAt

func (_c *InviteCreate) SetExpiresAt(v time.Time) *InviteCreate

SetExpiresAt sets the "expires_at" field.

func (*InviteCreate) SetID

func (_c *InviteCreate) SetID(v uint32) *InviteCreate

SetID sets the "id" field.

func (*InviteCreate) SetNillableCreateTime

func (_c *InviteCreate) SetNillableCreateTime(v *time.Time) *InviteCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*InviteCreate) SetNillableEmail

func (_c *InviteCreate) SetNillableEmail(v *string) *InviteCreate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*InviteCreate) SetNillableRole

func (_c *InviteCreate) SetNillableRole(v *invite.Role) *InviteCreate

SetNillableRole sets the "role" field if the given value is not nil.

func (*InviteCreate) SetNillableUpdateTime

func (_c *InviteCreate) SetNillableUpdateTime(v *time.Time) *InviteCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*InviteCreate) SetNillableUsedAt

func (_c *InviteCreate) SetNillableUsedAt(v *time.Time) *InviteCreate

SetNillableUsedAt sets the "used_at" field if the given value is not nil.

func (*InviteCreate) SetNillableUsedByID

func (_c *InviteCreate) SetNillableUsedByID(id *uint32) *InviteCreate

SetNillableUsedByID sets the "used_by" edge to the User entity by ID if the given value is not nil.

func (*InviteCreate) SetRole

func (_c *InviteCreate) SetRole(v invite.Role) *InviteCreate

SetRole sets the "role" field.

func (*InviteCreate) SetTokenHash

func (_c *InviteCreate) SetTokenHash(v string) *InviteCreate

SetTokenHash sets the "token_hash" field.

func (*InviteCreate) SetUpdateTime

func (_c *InviteCreate) SetUpdateTime(v time.Time) *InviteCreate

SetUpdateTime sets the "update_time" field.

func (*InviteCreate) SetUsedAt

func (_c *InviteCreate) SetUsedAt(v time.Time) *InviteCreate

SetUsedAt sets the "used_at" field.

func (*InviteCreate) SetUsedBy

func (_c *InviteCreate) SetUsedBy(v *User) *InviteCreate

SetUsedBy sets the "used_by" edge to the User entity.

func (*InviteCreate) SetUsedByID

func (_c *InviteCreate) SetUsedByID(id uint32) *InviteCreate

SetUsedByID sets the "used_by" edge to the User entity by ID.

type InviteCreateBulk

type InviteCreateBulk struct {
	// contains filtered or unexported fields
}

InviteCreateBulk is the builder for creating many Invite entities in bulk.

func (*InviteCreateBulk) Exec

func (_c *InviteCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*InviteCreateBulk) ExecX

func (_c *InviteCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteCreateBulk) Save

func (_c *InviteCreateBulk) Save(ctx context.Context) ([]*Invite, error)

Save creates the Invite entities in the database.

func (*InviteCreateBulk) SaveX

func (_c *InviteCreateBulk) SaveX(ctx context.Context) []*Invite

SaveX is like Save, but panics if an error occurs.

type InviteDelete

type InviteDelete struct {
	// contains filtered or unexported fields
}

InviteDelete is the builder for deleting a Invite entity.

func (*InviteDelete) Exec

func (_d *InviteDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*InviteDelete) ExecX

func (_d *InviteDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*InviteDelete) Where

func (_d *InviteDelete) Where(ps ...predicate.Invite) *InviteDelete

Where appends a list predicates to the InviteDelete builder.

type InviteDeleteOne

type InviteDeleteOne struct {
	// contains filtered or unexported fields
}

InviteDeleteOne is the builder for deleting a single Invite entity.

func (*InviteDeleteOne) Exec

func (_d *InviteDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*InviteDeleteOne) ExecX

func (_d *InviteDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteDeleteOne) Where

func (_d *InviteDeleteOne) Where(ps ...predicate.Invite) *InviteDeleteOne

Where appends a list predicates to the InviteDelete builder.

type InviteEdges

type InviteEdges struct {
	// CreatedBy holds the value of the created_by edge.
	CreatedBy *User `json:"created_by,omitempty"`
	// UsedBy holds the value of the used_by edge.
	UsedBy *User `json:"used_by,omitempty"`
	// contains filtered or unexported fields
}

InviteEdges holds the relations/edges for other nodes in the graph.

func (InviteEdges) CreatedByOrErr

func (e InviteEdges) CreatedByOrErr() (*User, error)

CreatedByOrErr returns the CreatedBy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (InviteEdges) UsedByOrErr

func (e InviteEdges) UsedByOrErr() (*User, error)

UsedByOrErr returns the UsedBy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type InviteGroupBy

type InviteGroupBy struct {
	// contains filtered or unexported fields
}

InviteGroupBy is the group-by builder for Invite entities.

func (*InviteGroupBy) Aggregate

func (_g *InviteGroupBy) Aggregate(fns ...AggregateFunc) *InviteGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*InviteGroupBy) Bool

func (s *InviteGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) BoolX

func (s *InviteGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*InviteGroupBy) Bools

func (s *InviteGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) BoolsX

func (s *InviteGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*InviteGroupBy) Float64

func (s *InviteGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) Float64X

func (s *InviteGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*InviteGroupBy) Float64s

func (s *InviteGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) Float64sX

func (s *InviteGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*InviteGroupBy) Int

func (s *InviteGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) IntX

func (s *InviteGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*InviteGroupBy) Ints

func (s *InviteGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) IntsX

func (s *InviteGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*InviteGroupBy) Scan

func (_g *InviteGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*InviteGroupBy) ScanX

func (s *InviteGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*InviteGroupBy) String

func (s *InviteGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) StringX

func (s *InviteGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*InviteGroupBy) Strings

func (s *InviteGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*InviteGroupBy) StringsX

func (s *InviteGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type InviteMutation

type InviteMutation struct {
	// contains filtered or unexported fields
}

InviteMutation represents an operation that mutates the Invite nodes in the graph.

func (*InviteMutation) AddField

func (m *InviteMutation) 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 (*InviteMutation) AddedEdges

func (m *InviteMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*InviteMutation) AddedField

func (m *InviteMutation) 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 (*InviteMutation) AddedFields

func (m *InviteMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*InviteMutation) AddedIDs

func (m *InviteMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*InviteMutation) ClearCreatedBy

func (m *InviteMutation) ClearCreatedBy()

ClearCreatedBy clears the "created_by" edge to the User entity.

func (*InviteMutation) ClearEdge

func (m *InviteMutation) 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 (*InviteMutation) ClearEmail

func (m *InviteMutation) ClearEmail()

ClearEmail clears the value of the "email" field.

func (*InviteMutation) ClearField

func (m *InviteMutation) 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 (*InviteMutation) ClearUsedAt

func (m *InviteMutation) ClearUsedAt()

ClearUsedAt clears the value of the "used_at" field.

func (*InviteMutation) ClearUsedBy

func (m *InviteMutation) ClearUsedBy()

ClearUsedBy clears the "used_by" edge to the User entity.

func (*InviteMutation) ClearedEdges

func (m *InviteMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*InviteMutation) ClearedFields

func (m *InviteMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (InviteMutation) Client

func (m InviteMutation) 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 (*InviteMutation) CreateTime

func (m *InviteMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*InviteMutation) CreatedByCleared

func (m *InviteMutation) CreatedByCleared() bool

CreatedByCleared reports if the "created_by" edge to the User entity was cleared.

func (*InviteMutation) CreatedByID

func (m *InviteMutation) CreatedByID() (id uint32, exists bool)

CreatedByID returns the "created_by" edge ID in the mutation.

func (*InviteMutation) CreatedByIDs

func (m *InviteMutation) CreatedByIDs() (ids []uint32)

CreatedByIDs returns the "created_by" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatedByID instead. It exists only for internal usage by the builders.

func (*InviteMutation) EdgeCleared

func (m *InviteMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*InviteMutation) Email

func (m *InviteMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*InviteMutation) EmailCleared

func (m *InviteMutation) EmailCleared() bool

EmailCleared returns if the "email" field was cleared in this mutation.

func (*InviteMutation) ExpiresAt

func (m *InviteMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*InviteMutation) Field

func (m *InviteMutation) 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 (*InviteMutation) FieldCleared

func (m *InviteMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*InviteMutation) Fields

func (m *InviteMutation) 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 (*InviteMutation) ID

func (m *InviteMutation) ID() (id uint32, 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 (*InviteMutation) IDs

func (m *InviteMutation) IDs(ctx context.Context) ([]uint32, 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 (*InviteMutation) OldCreateTime

func (m *InviteMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Invite entity. If the Invite object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*InviteMutation) OldEmail

func (m *InviteMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the Invite entity. If the Invite object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*InviteMutation) OldExpiresAt

func (m *InviteMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)

OldExpiresAt returns the old "expires_at" field's value of the Invite entity. If the Invite object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*InviteMutation) OldField

func (m *InviteMutation) 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 (*InviteMutation) OldRole

func (m *InviteMutation) OldRole(ctx context.Context) (v invite.Role, err error)

OldRole returns the old "role" field's value of the Invite entity. If the Invite object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*InviteMutation) OldTokenHash

func (m *InviteMutation) OldTokenHash(ctx context.Context) (v string, err error)

OldTokenHash returns the old "token_hash" field's value of the Invite entity. If the Invite object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*InviteMutation) OldUpdateTime

func (m *InviteMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Invite entity. If the Invite object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*InviteMutation) OldUsedAt

func (m *InviteMutation) OldUsedAt(ctx context.Context) (v *time.Time, err error)

OldUsedAt returns the old "used_at" field's value of the Invite entity. If the Invite object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*InviteMutation) Op

func (m *InviteMutation) Op() Op

Op returns the operation name.

func (*InviteMutation) RemovedEdges

func (m *InviteMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*InviteMutation) RemovedIDs

func (m *InviteMutation) 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 (*InviteMutation) ResetCreateTime

func (m *InviteMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*InviteMutation) ResetCreatedBy

func (m *InviteMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" edge.

func (*InviteMutation) ResetEdge

func (m *InviteMutation) 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 (*InviteMutation) ResetEmail

func (m *InviteMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*InviteMutation) ResetExpiresAt

func (m *InviteMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*InviteMutation) ResetField

func (m *InviteMutation) 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 (*InviteMutation) ResetRole

func (m *InviteMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*InviteMutation) ResetTokenHash

func (m *InviteMutation) ResetTokenHash()

ResetTokenHash resets all changes to the "token_hash" field.

func (*InviteMutation) ResetUpdateTime

func (m *InviteMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*InviteMutation) ResetUsedAt

func (m *InviteMutation) ResetUsedAt()

ResetUsedAt resets all changes to the "used_at" field.

func (*InviteMutation) ResetUsedBy

func (m *InviteMutation) ResetUsedBy()

ResetUsedBy resets all changes to the "used_by" edge.

func (*InviteMutation) Role

func (m *InviteMutation) Role() (r invite.Role, exists bool)

Role returns the value of the "role" field in the mutation.

func (*InviteMutation) SetCreateTime

func (m *InviteMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*InviteMutation) SetCreatedByID

func (m *InviteMutation) SetCreatedByID(id uint32)

SetCreatedByID sets the "created_by" edge to the User entity by id.

func (*InviteMutation) SetEmail

func (m *InviteMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*InviteMutation) SetExpiresAt

func (m *InviteMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*InviteMutation) SetField

func (m *InviteMutation) 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 (*InviteMutation) SetID

func (m *InviteMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Invite entities.

func (*InviteMutation) SetOp

func (m *InviteMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*InviteMutation) SetRole

func (m *InviteMutation) SetRole(i invite.Role)

SetRole sets the "role" field.

func (*InviteMutation) SetTokenHash

func (m *InviteMutation) SetTokenHash(s string)

SetTokenHash sets the "token_hash" field.

func (*InviteMutation) SetUpdateTime

func (m *InviteMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*InviteMutation) SetUsedAt

func (m *InviteMutation) SetUsedAt(t time.Time)

SetUsedAt sets the "used_at" field.

func (*InviteMutation) SetUsedByID

func (m *InviteMutation) SetUsedByID(id uint32)

SetUsedByID sets the "used_by" edge to the User entity by id.

func (*InviteMutation) TokenHash

func (m *InviteMutation) TokenHash() (r string, exists bool)

TokenHash returns the value of the "token_hash" field in the mutation.

func (InviteMutation) Tx

func (m InviteMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*InviteMutation) Type

func (m *InviteMutation) Type() string

Type returns the node type of this mutation (Invite).

func (*InviteMutation) UpdateTime

func (m *InviteMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*InviteMutation) UsedAt

func (m *InviteMutation) UsedAt() (r time.Time, exists bool)

UsedAt returns the value of the "used_at" field in the mutation.

func (*InviteMutation) UsedAtCleared

func (m *InviteMutation) UsedAtCleared() bool

UsedAtCleared returns if the "used_at" field was cleared in this mutation.

func (*InviteMutation) UsedByCleared

func (m *InviteMutation) UsedByCleared() bool

UsedByCleared reports if the "used_by" edge to the User entity was cleared.

func (*InviteMutation) UsedByID

func (m *InviteMutation) UsedByID() (id uint32, exists bool)

UsedByID returns the "used_by" edge ID in the mutation.

func (*InviteMutation) UsedByIDs

func (m *InviteMutation) UsedByIDs() (ids []uint32)

UsedByIDs returns the "used_by" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UsedByID instead. It exists only for internal usage by the builders.

func (*InviteMutation) Where

func (m *InviteMutation) Where(ps ...predicate.Invite)

Where appends a list predicates to the InviteMutation builder.

func (*InviteMutation) WhereP

func (m *InviteMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the InviteMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type InviteQuery

type InviteQuery struct {
	// contains filtered or unexported fields
}

InviteQuery is the builder for querying Invite entities.

func (*InviteQuery) Aggregate

func (_q *InviteQuery) Aggregate(fns ...AggregateFunc) *InviteSelect

Aggregate returns a InviteSelect configured with the given aggregations.

func (*InviteQuery) All

func (_q *InviteQuery) All(ctx context.Context) ([]*Invite, error)

All executes the query and returns a list of Invites.

func (*InviteQuery) AllX

func (_q *InviteQuery) AllX(ctx context.Context) []*Invite

AllX is like All, but panics if an error occurs.

func (*InviteQuery) Clone

func (_q *InviteQuery) Clone() *InviteQuery

Clone returns a duplicate of the InviteQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*InviteQuery) Count

func (_q *InviteQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*InviteQuery) CountX

func (_q *InviteQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*InviteQuery) Exist

func (_q *InviteQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*InviteQuery) ExistX

func (_q *InviteQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*InviteQuery) First

func (_q *InviteQuery) First(ctx context.Context) (*Invite, error)

First returns the first Invite entity from the query. Returns a *NotFoundError when no Invite was found.

func (*InviteQuery) FirstID

func (_q *InviteQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first Invite ID from the query. Returns a *NotFoundError when no Invite ID was found.

func (*InviteQuery) FirstIDX

func (_q *InviteQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*InviteQuery) FirstX

func (_q *InviteQuery) FirstX(ctx context.Context) *Invite

FirstX is like First, but panics if an error occurs.

func (*InviteQuery) GroupBy

func (_q *InviteQuery) GroupBy(field string, fields ...string) *InviteGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Invite.Query().
	GroupBy(invite.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*InviteQuery) IDs

func (_q *InviteQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of Invite IDs.

func (*InviteQuery) IDsX

func (_q *InviteQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*InviteQuery) Limit

func (_q *InviteQuery) Limit(limit int) *InviteQuery

Limit the number of records to be returned by this query.

func (*InviteQuery) Offset

func (_q *InviteQuery) Offset(offset int) *InviteQuery

Offset to start from.

func (*InviteQuery) Only

func (_q *InviteQuery) Only(ctx context.Context) (*Invite, error)

Only returns a single Invite entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Invite entity is found. Returns a *NotFoundError when no Invite entities are found.

func (*InviteQuery) OnlyID

func (_q *InviteQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only Invite ID in the query. Returns a *NotSingularError when more than one Invite ID is found. Returns a *NotFoundError when no entities are found.

func (*InviteQuery) OnlyIDX

func (_q *InviteQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*InviteQuery) OnlyX

func (_q *InviteQuery) OnlyX(ctx context.Context) *Invite

OnlyX is like Only, but panics if an error occurs.

func (*InviteQuery) Order

func (_q *InviteQuery) Order(o ...invite.OrderOption) *InviteQuery

Order specifies how the records should be ordered.

func (*InviteQuery) QueryCreatedBy

func (_q *InviteQuery) QueryCreatedBy() *UserQuery

QueryCreatedBy chains the current query on the "created_by" edge.

func (*InviteQuery) QueryUsedBy

func (_q *InviteQuery) QueryUsedBy() *UserQuery

QueryUsedBy chains the current query on the "used_by" edge.

func (*InviteQuery) Select

func (_q *InviteQuery) Select(fields ...string) *InviteSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Invite.Query().
	Select(invite.FieldCreateTime).
	Scan(ctx, &v)

func (*InviteQuery) Unique

func (_q *InviteQuery) Unique(unique bool) *InviteQuery

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 (*InviteQuery) Where

func (_q *InviteQuery) Where(ps ...predicate.Invite) *InviteQuery

Where adds a new predicate for the InviteQuery builder.

func (*InviteQuery) WithCreatedBy

func (_q *InviteQuery) WithCreatedBy(opts ...func(*UserQuery)) *InviteQuery

WithCreatedBy tells the query-builder to eager-load the nodes that are connected to the "created_by" edge. The optional arguments are used to configure the query builder of the edge.

func (*InviteQuery) WithUsedBy

func (_q *InviteQuery) WithUsedBy(opts ...func(*UserQuery)) *InviteQuery

WithUsedBy tells the query-builder to eager-load the nodes that are connected to the "used_by" edge. The optional arguments are used to configure the query builder of the edge.

type InviteSelect

type InviteSelect struct {
	*InviteQuery
	// contains filtered or unexported fields
}

InviteSelect is the builder for selecting fields of Invite entities.

func (*InviteSelect) Aggregate

func (_s *InviteSelect) Aggregate(fns ...AggregateFunc) *InviteSelect

Aggregate adds the given aggregation functions to the selector query.

func (*InviteSelect) Bool

func (s *InviteSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*InviteSelect) BoolX

func (s *InviteSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*InviteSelect) Bools

func (s *InviteSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*InviteSelect) BoolsX

func (s *InviteSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*InviteSelect) Float64

func (s *InviteSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*InviteSelect) Float64X

func (s *InviteSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*InviteSelect) Float64s

func (s *InviteSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*InviteSelect) Float64sX

func (s *InviteSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*InviteSelect) Int

func (s *InviteSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*InviteSelect) IntX

func (s *InviteSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*InviteSelect) Ints

func (s *InviteSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*InviteSelect) IntsX

func (s *InviteSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*InviteSelect) Scan

func (_s *InviteSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*InviteSelect) ScanX

func (s *InviteSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*InviteSelect) String

func (s *InviteSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*InviteSelect) StringX

func (s *InviteSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*InviteSelect) Strings

func (s *InviteSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*InviteSelect) StringsX

func (s *InviteSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type InviteUpdate

type InviteUpdate struct {
	// contains filtered or unexported fields
}

InviteUpdate is the builder for updating Invite entities.

func (*InviteUpdate) ClearCreatedBy

func (_u *InviteUpdate) ClearCreatedBy() *InviteUpdate

ClearCreatedBy clears the "created_by" edge to the User entity.

func (*InviteUpdate) ClearEmail

func (_u *InviteUpdate) ClearEmail() *InviteUpdate

ClearEmail clears the value of the "email" field.

func (*InviteUpdate) ClearUsedAt

func (_u *InviteUpdate) ClearUsedAt() *InviteUpdate

ClearUsedAt clears the value of the "used_at" field.

func (*InviteUpdate) ClearUsedBy

func (_u *InviteUpdate) ClearUsedBy() *InviteUpdate

ClearUsedBy clears the "used_by" edge to the User entity.

func (*InviteUpdate) Exec

func (_u *InviteUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*InviteUpdate) ExecX

func (_u *InviteUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteUpdate) Mutation

func (_u *InviteUpdate) Mutation() *InviteMutation

Mutation returns the InviteMutation object of the builder.

func (*InviteUpdate) Save

func (_u *InviteUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*InviteUpdate) SaveX

func (_u *InviteUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*InviteUpdate) SetCreatedBy

func (_u *InviteUpdate) SetCreatedBy(v *User) *InviteUpdate

SetCreatedBy sets the "created_by" edge to the User entity.

func (*InviteUpdate) SetCreatedByID

func (_u *InviteUpdate) SetCreatedByID(id uint32) *InviteUpdate

SetCreatedByID sets the "created_by" edge to the User entity by ID.

func (*InviteUpdate) SetEmail

func (_u *InviteUpdate) SetEmail(v string) *InviteUpdate

SetEmail sets the "email" field.

func (*InviteUpdate) SetExpiresAt

func (_u *InviteUpdate) SetExpiresAt(v time.Time) *InviteUpdate

SetExpiresAt sets the "expires_at" field.

func (*InviteUpdate) SetNillableEmail

func (_u *InviteUpdate) SetNillableEmail(v *string) *InviteUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*InviteUpdate) SetNillableExpiresAt

func (_u *InviteUpdate) SetNillableExpiresAt(v *time.Time) *InviteUpdate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*InviteUpdate) SetNillableRole

func (_u *InviteUpdate) SetNillableRole(v *invite.Role) *InviteUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*InviteUpdate) SetNillableTokenHash

func (_u *InviteUpdate) SetNillableTokenHash(v *string) *InviteUpdate

SetNillableTokenHash sets the "token_hash" field if the given value is not nil.

func (*InviteUpdate) SetNillableUsedAt

func (_u *InviteUpdate) SetNillableUsedAt(v *time.Time) *InviteUpdate

SetNillableUsedAt sets the "used_at" field if the given value is not nil.

func (*InviteUpdate) SetNillableUsedByID

func (_u *InviteUpdate) SetNillableUsedByID(id *uint32) *InviteUpdate

SetNillableUsedByID sets the "used_by" edge to the User entity by ID if the given value is not nil.

func (*InviteUpdate) SetRole

func (_u *InviteUpdate) SetRole(v invite.Role) *InviteUpdate

SetRole sets the "role" field.

func (*InviteUpdate) SetTokenHash

func (_u *InviteUpdate) SetTokenHash(v string) *InviteUpdate

SetTokenHash sets the "token_hash" field.

func (*InviteUpdate) SetUpdateTime

func (_u *InviteUpdate) SetUpdateTime(v time.Time) *InviteUpdate

SetUpdateTime sets the "update_time" field.

func (*InviteUpdate) SetUsedAt

func (_u *InviteUpdate) SetUsedAt(v time.Time) *InviteUpdate

SetUsedAt sets the "used_at" field.

func (*InviteUpdate) SetUsedBy

func (_u *InviteUpdate) SetUsedBy(v *User) *InviteUpdate

SetUsedBy sets the "used_by" edge to the User entity.

func (*InviteUpdate) SetUsedByID

func (_u *InviteUpdate) SetUsedByID(id uint32) *InviteUpdate

SetUsedByID sets the "used_by" edge to the User entity by ID.

func (*InviteUpdate) Where

func (_u *InviteUpdate) Where(ps ...predicate.Invite) *InviteUpdate

Where appends a list predicates to the InviteUpdate builder.

type InviteUpdateOne

type InviteUpdateOne struct {
	// contains filtered or unexported fields
}

InviteUpdateOne is the builder for updating a single Invite entity.

func (*InviteUpdateOne) ClearCreatedBy

func (_u *InviteUpdateOne) ClearCreatedBy() *InviteUpdateOne

ClearCreatedBy clears the "created_by" edge to the User entity.

func (*InviteUpdateOne) ClearEmail

func (_u *InviteUpdateOne) ClearEmail() *InviteUpdateOne

ClearEmail clears the value of the "email" field.

func (*InviteUpdateOne) ClearUsedAt

func (_u *InviteUpdateOne) ClearUsedAt() *InviteUpdateOne

ClearUsedAt clears the value of the "used_at" field.

func (*InviteUpdateOne) ClearUsedBy

func (_u *InviteUpdateOne) ClearUsedBy() *InviteUpdateOne

ClearUsedBy clears the "used_by" edge to the User entity.

func (*InviteUpdateOne) Exec

func (_u *InviteUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*InviteUpdateOne) ExecX

func (_u *InviteUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*InviteUpdateOne) Mutation

func (_u *InviteUpdateOne) Mutation() *InviteMutation

Mutation returns the InviteMutation object of the builder.

func (*InviteUpdateOne) Save

func (_u *InviteUpdateOne) Save(ctx context.Context) (*Invite, error)

Save executes the query and returns the updated Invite entity.

func (*InviteUpdateOne) SaveX

func (_u *InviteUpdateOne) SaveX(ctx context.Context) *Invite

SaveX is like Save, but panics if an error occurs.

func (*InviteUpdateOne) Select

func (_u *InviteUpdateOne) Select(field string, fields ...string) *InviteUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*InviteUpdateOne) SetCreatedBy

func (_u *InviteUpdateOne) SetCreatedBy(v *User) *InviteUpdateOne

SetCreatedBy sets the "created_by" edge to the User entity.

func (*InviteUpdateOne) SetCreatedByID

func (_u *InviteUpdateOne) SetCreatedByID(id uint32) *InviteUpdateOne

SetCreatedByID sets the "created_by" edge to the User entity by ID.

func (*InviteUpdateOne) SetEmail

func (_u *InviteUpdateOne) SetEmail(v string) *InviteUpdateOne

SetEmail sets the "email" field.

func (*InviteUpdateOne) SetExpiresAt

func (_u *InviteUpdateOne) SetExpiresAt(v time.Time) *InviteUpdateOne

SetExpiresAt sets the "expires_at" field.

func (*InviteUpdateOne) SetNillableEmail

func (_u *InviteUpdateOne) SetNillableEmail(v *string) *InviteUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableExpiresAt

func (_u *InviteUpdateOne) SetNillableExpiresAt(v *time.Time) *InviteUpdateOne

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableRole

func (_u *InviteUpdateOne) SetNillableRole(v *invite.Role) *InviteUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableTokenHash

func (_u *InviteUpdateOne) SetNillableTokenHash(v *string) *InviteUpdateOne

SetNillableTokenHash sets the "token_hash" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableUsedAt

func (_u *InviteUpdateOne) SetNillableUsedAt(v *time.Time) *InviteUpdateOne

SetNillableUsedAt sets the "used_at" field if the given value is not nil.

func (*InviteUpdateOne) SetNillableUsedByID

func (_u *InviteUpdateOne) SetNillableUsedByID(id *uint32) *InviteUpdateOne

SetNillableUsedByID sets the "used_by" edge to the User entity by ID if the given value is not nil.

func (*InviteUpdateOne) SetRole

func (_u *InviteUpdateOne) SetRole(v invite.Role) *InviteUpdateOne

SetRole sets the "role" field.

func (*InviteUpdateOne) SetTokenHash

func (_u *InviteUpdateOne) SetTokenHash(v string) *InviteUpdateOne

SetTokenHash sets the "token_hash" field.

func (*InviteUpdateOne) SetUpdateTime

func (_u *InviteUpdateOne) SetUpdateTime(v time.Time) *InviteUpdateOne

SetUpdateTime sets the "update_time" field.

func (*InviteUpdateOne) SetUsedAt

func (_u *InviteUpdateOne) SetUsedAt(v time.Time) *InviteUpdateOne

SetUsedAt sets the "used_at" field.

func (*InviteUpdateOne) SetUsedBy

func (_u *InviteUpdateOne) SetUsedBy(v *User) *InviteUpdateOne

SetUsedBy sets the "used_by" edge to the User entity.

func (*InviteUpdateOne) SetUsedByID

func (_u *InviteUpdateOne) SetUsedByID(id uint32) *InviteUpdateOne

SetUsedByID sets the "used_by" edge to the User entity by ID.

func (*InviteUpdateOne) Where

func (_u *InviteUpdateOne) Where(ps ...predicate.Invite) *InviteUpdateOne

Where appends a list predicates to the InviteUpdate builder.

type Invites

type Invites []*Invite

Invites is a parsable slice of Invite.

type MediaFile

type MediaFile struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Path holds the value of the "path" field.
	Path string `json:"path,omitempty"`
	// Size holds the value of the "size" field.
	Size int64 `json:"size,omitempty"`
	// Quality holds the value of the "quality" field.
	Quality string `json:"quality,omitempty"`
	// Format holds the value of the "format" field.
	Format string `json:"format,omitempty"`
	// ReleaseGroup holds the value of the "release_group" field.
	ReleaseGroup string `json:"release_group,omitempty"`
	// Source holds the value of the "source" field.
	Source mediafile.Source `json:"source,omitempty"`
	// LastSeenAt holds the value of the "last_seen_at" field.
	LastSeenAt *time.Time `json:"last_seen_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MediaFileQuery when eager-loading is set.
	Edges MediaFileEdges `json:"edges"`
	// contains filtered or unexported fields
}

MediaFile is the model entity for the MediaFile schema.

func (*MediaFile) QueryEpisode

func (_m *MediaFile) QueryEpisode() *EpisodeQuery

QueryEpisode queries the "episode" edge of the MediaFile entity.

func (*MediaFile) QueryMovie

func (_m *MediaFile) QueryMovie() *MovieQuery

QueryMovie queries the "movie" edge of the MediaFile entity.

func (*MediaFile) String

func (_m *MediaFile) String() string

String implements the fmt.Stringer.

func (*MediaFile) Unwrap

func (_m *MediaFile) Unwrap() *MediaFile

Unwrap unwraps the MediaFile 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 (*MediaFile) Update

func (_m *MediaFile) Update() *MediaFileUpdateOne

Update returns a builder for updating this MediaFile. Note that you need to call MediaFile.Unwrap() before calling this method if this MediaFile was returned from a transaction, and the transaction was committed or rolled back.

func (*MediaFile) Value

func (_m *MediaFile) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the MediaFile. This includes values selected through modifiers, order, etc.

type MediaFileClient

type MediaFileClient struct {
	// contains filtered or unexported fields
}

MediaFileClient is a client for the MediaFile schema.

func NewMediaFileClient

func NewMediaFileClient(c config) *MediaFileClient

NewMediaFileClient returns a client for the MediaFile from the given config.

func (*MediaFileClient) Create

func (c *MediaFileClient) Create() *MediaFileCreate

Create returns a builder for creating a MediaFile entity.

func (*MediaFileClient) CreateBulk

func (c *MediaFileClient) CreateBulk(builders ...*MediaFileCreate) *MediaFileCreateBulk

CreateBulk returns a builder for creating a bulk of MediaFile entities.

func (*MediaFileClient) Delete

func (c *MediaFileClient) Delete() *MediaFileDelete

Delete returns a delete builder for MediaFile.

func (*MediaFileClient) DeleteOne

func (c *MediaFileClient) DeleteOne(_m *MediaFile) *MediaFileDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MediaFileClient) DeleteOneID

func (c *MediaFileClient) DeleteOneID(id uint32) *MediaFileDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MediaFileClient) Get

func (c *MediaFileClient) Get(ctx context.Context, id uint32) (*MediaFile, error)

Get returns a MediaFile entity by its id.

func (*MediaFileClient) GetX

func (c *MediaFileClient) GetX(ctx context.Context, id uint32) *MediaFile

GetX is like Get, but panics if an error occurs.

func (*MediaFileClient) Hooks

func (c *MediaFileClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MediaFileClient) Intercept

func (c *MediaFileClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `mediafile.Intercept(f(g(h())))`.

func (*MediaFileClient) Interceptors

func (c *MediaFileClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MediaFileClient) MapCreateBulk

func (c *MediaFileClient) MapCreateBulk(slice any, setFunc func(*MediaFileCreate, int)) *MediaFileCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MediaFileClient) Query

func (c *MediaFileClient) Query() *MediaFileQuery

Query returns a query builder for MediaFile.

func (*MediaFileClient) QueryEpisode

func (c *MediaFileClient) QueryEpisode(_m *MediaFile) *EpisodeQuery

QueryEpisode queries the episode edge of a MediaFile.

func (*MediaFileClient) QueryMovie

func (c *MediaFileClient) QueryMovie(_m *MediaFile) *MovieQuery

QueryMovie queries the movie edge of a MediaFile.

func (*MediaFileClient) Update

func (c *MediaFileClient) Update() *MediaFileUpdate

Update returns an update builder for MediaFile.

func (*MediaFileClient) UpdateOne

func (c *MediaFileClient) UpdateOne(_m *MediaFile) *MediaFileUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MediaFileClient) UpdateOneID

func (c *MediaFileClient) UpdateOneID(id uint32) *MediaFileUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MediaFileClient) Use

func (c *MediaFileClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `mediafile.Hooks(f(g(h())))`.

type MediaFileCreate

type MediaFileCreate struct {
	// contains filtered or unexported fields
}

MediaFileCreate is the builder for creating a MediaFile entity.

func (*MediaFileCreate) Exec

func (_c *MediaFileCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MediaFileCreate) ExecX

func (_c *MediaFileCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MediaFileCreate) Mutation

func (_c *MediaFileCreate) Mutation() *MediaFileMutation

Mutation returns the MediaFileMutation object of the builder.

func (*MediaFileCreate) Save

func (_c *MediaFileCreate) Save(ctx context.Context) (*MediaFile, error)

Save creates the MediaFile in the database.

func (*MediaFileCreate) SaveX

func (_c *MediaFileCreate) SaveX(ctx context.Context) *MediaFile

SaveX calls Save and panics if Save returns an error.

func (*MediaFileCreate) SetCreateTime

func (_c *MediaFileCreate) SetCreateTime(v time.Time) *MediaFileCreate

SetCreateTime sets the "create_time" field.

func (*MediaFileCreate) SetEpisode

func (_c *MediaFileCreate) SetEpisode(v *Episode) *MediaFileCreate

SetEpisode sets the "episode" edge to the Episode entity.

func (*MediaFileCreate) SetEpisodeID

func (_c *MediaFileCreate) SetEpisodeID(id uint32) *MediaFileCreate

SetEpisodeID sets the "episode" edge to the Episode entity by ID.

func (*MediaFileCreate) SetFormat

func (_c *MediaFileCreate) SetFormat(v string) *MediaFileCreate

SetFormat sets the "format" field.

func (*MediaFileCreate) SetID

func (_c *MediaFileCreate) SetID(v uint32) *MediaFileCreate

SetID sets the "id" field.

func (*MediaFileCreate) SetLastSeenAt

func (_c *MediaFileCreate) SetLastSeenAt(v time.Time) *MediaFileCreate

SetLastSeenAt sets the "last_seen_at" field.

func (*MediaFileCreate) SetMovie

func (_c *MediaFileCreate) SetMovie(v *Movie) *MediaFileCreate

SetMovie sets the "movie" edge to the Movie entity.

func (*MediaFileCreate) SetMovieID

func (_c *MediaFileCreate) SetMovieID(id uint32) *MediaFileCreate

SetMovieID sets the "movie" edge to the Movie entity by ID.

func (*MediaFileCreate) SetNillableCreateTime

func (_c *MediaFileCreate) SetNillableCreateTime(v *time.Time) *MediaFileCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*MediaFileCreate) SetNillableEpisodeID

func (_c *MediaFileCreate) SetNillableEpisodeID(id *uint32) *MediaFileCreate

SetNillableEpisodeID sets the "episode" edge to the Episode entity by ID if the given value is not nil.

func (*MediaFileCreate) SetNillableFormat

func (_c *MediaFileCreate) SetNillableFormat(v *string) *MediaFileCreate

SetNillableFormat sets the "format" field if the given value is not nil.

func (*MediaFileCreate) SetNillableLastSeenAt

func (_c *MediaFileCreate) SetNillableLastSeenAt(v *time.Time) *MediaFileCreate

SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.

func (*MediaFileCreate) SetNillableMovieID

func (_c *MediaFileCreate) SetNillableMovieID(id *uint32) *MediaFileCreate

SetNillableMovieID sets the "movie" edge to the Movie entity by ID if the given value is not nil.

func (*MediaFileCreate) SetNillableQuality

func (_c *MediaFileCreate) SetNillableQuality(v *string) *MediaFileCreate

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*MediaFileCreate) SetNillableReleaseGroup

func (_c *MediaFileCreate) SetNillableReleaseGroup(v *string) *MediaFileCreate

SetNillableReleaseGroup sets the "release_group" field if the given value is not nil.

func (*MediaFileCreate) SetNillableSource

func (_c *MediaFileCreate) SetNillableSource(v *mediafile.Source) *MediaFileCreate

SetNillableSource sets the "source" field if the given value is not nil.

func (*MediaFileCreate) SetNillableUpdateTime

func (_c *MediaFileCreate) SetNillableUpdateTime(v *time.Time) *MediaFileCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*MediaFileCreate) SetPath

func (_c *MediaFileCreate) SetPath(v string) *MediaFileCreate

SetPath sets the "path" field.

func (*MediaFileCreate) SetQuality

func (_c *MediaFileCreate) SetQuality(v string) *MediaFileCreate

SetQuality sets the "quality" field.

func (*MediaFileCreate) SetReleaseGroup

func (_c *MediaFileCreate) SetReleaseGroup(v string) *MediaFileCreate

SetReleaseGroup sets the "release_group" field.

func (*MediaFileCreate) SetSize

func (_c *MediaFileCreate) SetSize(v int64) *MediaFileCreate

SetSize sets the "size" field.

func (*MediaFileCreate) SetSource

func (_c *MediaFileCreate) SetSource(v mediafile.Source) *MediaFileCreate

SetSource sets the "source" field.

func (*MediaFileCreate) SetUpdateTime

func (_c *MediaFileCreate) SetUpdateTime(v time.Time) *MediaFileCreate

SetUpdateTime sets the "update_time" field.

type MediaFileCreateBulk

type MediaFileCreateBulk struct {
	// contains filtered or unexported fields
}

MediaFileCreateBulk is the builder for creating many MediaFile entities in bulk.

func (*MediaFileCreateBulk) Exec

func (_c *MediaFileCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MediaFileCreateBulk) ExecX

func (_c *MediaFileCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MediaFileCreateBulk) Save

func (_c *MediaFileCreateBulk) Save(ctx context.Context) ([]*MediaFile, error)

Save creates the MediaFile entities in the database.

func (*MediaFileCreateBulk) SaveX

func (_c *MediaFileCreateBulk) SaveX(ctx context.Context) []*MediaFile

SaveX is like Save, but panics if an error occurs.

type MediaFileDelete

type MediaFileDelete struct {
	// contains filtered or unexported fields
}

MediaFileDelete is the builder for deleting a MediaFile entity.

func (*MediaFileDelete) Exec

func (_d *MediaFileDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MediaFileDelete) ExecX

func (_d *MediaFileDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MediaFileDelete) Where

Where appends a list predicates to the MediaFileDelete builder.

type MediaFileDeleteOne

type MediaFileDeleteOne struct {
	// contains filtered or unexported fields
}

MediaFileDeleteOne is the builder for deleting a single MediaFile entity.

func (*MediaFileDeleteOne) Exec

func (_d *MediaFileDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MediaFileDeleteOne) ExecX

func (_d *MediaFileDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MediaFileDeleteOne) Where

Where appends a list predicates to the MediaFileDelete builder.

type MediaFileEdges

type MediaFileEdges struct {
	// Movie holds the value of the movie edge.
	Movie *Movie `json:"movie,omitempty"`
	// Episode holds the value of the episode edge.
	Episode *Episode `json:"episode,omitempty"`
	// contains filtered or unexported fields
}

MediaFileEdges holds the relations/edges for other nodes in the graph.

func (MediaFileEdges) EpisodeOrErr

func (e MediaFileEdges) EpisodeOrErr() (*Episode, error)

EpisodeOrErr returns the Episode value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (MediaFileEdges) MovieOrErr

func (e MediaFileEdges) MovieOrErr() (*Movie, error)

MovieOrErr returns the Movie value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MediaFileGroupBy

type MediaFileGroupBy struct {
	// contains filtered or unexported fields
}

MediaFileGroupBy is the group-by builder for MediaFile entities.

func (*MediaFileGroupBy) Aggregate

func (_g *MediaFileGroupBy) Aggregate(fns ...AggregateFunc) *MediaFileGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MediaFileGroupBy) Bool

func (s *MediaFileGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MediaFileGroupBy) BoolX

func (s *MediaFileGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MediaFileGroupBy) Bools

func (s *MediaFileGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MediaFileGroupBy) BoolsX

func (s *MediaFileGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MediaFileGroupBy) Float64

func (s *MediaFileGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MediaFileGroupBy) Float64X

func (s *MediaFileGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MediaFileGroupBy) Float64s

func (s *MediaFileGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MediaFileGroupBy) Float64sX

func (s *MediaFileGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MediaFileGroupBy) Int

func (s *MediaFileGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MediaFileGroupBy) IntX

func (s *MediaFileGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MediaFileGroupBy) Ints

func (s *MediaFileGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MediaFileGroupBy) IntsX

func (s *MediaFileGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MediaFileGroupBy) Scan

func (_g *MediaFileGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MediaFileGroupBy) ScanX

func (s *MediaFileGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MediaFileGroupBy) String

func (s *MediaFileGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MediaFileGroupBy) StringX

func (s *MediaFileGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MediaFileGroupBy) Strings

func (s *MediaFileGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MediaFileGroupBy) StringsX

func (s *MediaFileGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MediaFileMutation

type MediaFileMutation struct {
	// contains filtered or unexported fields
}

MediaFileMutation represents an operation that mutates the MediaFile nodes in the graph.

func (*MediaFileMutation) AddField

func (m *MediaFileMutation) 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 (*MediaFileMutation) AddSize

func (m *MediaFileMutation) AddSize(i int64)

AddSize adds i to the "size" field.

func (*MediaFileMutation) AddedEdges

func (m *MediaFileMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MediaFileMutation) AddedField

func (m *MediaFileMutation) 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 (*MediaFileMutation) AddedFields

func (m *MediaFileMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MediaFileMutation) AddedIDs

func (m *MediaFileMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MediaFileMutation) AddedSize

func (m *MediaFileMutation) AddedSize() (r int64, exists bool)

AddedSize returns the value that was added to the "size" field in this mutation.

func (*MediaFileMutation) ClearEdge

func (m *MediaFileMutation) 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 (*MediaFileMutation) ClearEpisode

func (m *MediaFileMutation) ClearEpisode()

ClearEpisode clears the "episode" edge to the Episode entity.

func (*MediaFileMutation) ClearField

func (m *MediaFileMutation) 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 (*MediaFileMutation) ClearFormat

func (m *MediaFileMutation) ClearFormat()

ClearFormat clears the value of the "format" field.

func (*MediaFileMutation) ClearLastSeenAt

func (m *MediaFileMutation) ClearLastSeenAt()

ClearLastSeenAt clears the value of the "last_seen_at" field.

func (*MediaFileMutation) ClearMovie

func (m *MediaFileMutation) ClearMovie()

ClearMovie clears the "movie" edge to the Movie entity.

func (*MediaFileMutation) ClearQuality

func (m *MediaFileMutation) ClearQuality()

ClearQuality clears the value of the "quality" field.

func (*MediaFileMutation) ClearReleaseGroup

func (m *MediaFileMutation) ClearReleaseGroup()

ClearReleaseGroup clears the value of the "release_group" field.

func (*MediaFileMutation) ClearedEdges

func (m *MediaFileMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MediaFileMutation) ClearedFields

func (m *MediaFileMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MediaFileMutation) Client

func (m MediaFileMutation) 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 (*MediaFileMutation) CreateTime

func (m *MediaFileMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*MediaFileMutation) EdgeCleared

func (m *MediaFileMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MediaFileMutation) EpisodeCleared

func (m *MediaFileMutation) EpisodeCleared() bool

EpisodeCleared reports if the "episode" edge to the Episode entity was cleared.

func (*MediaFileMutation) EpisodeID

func (m *MediaFileMutation) EpisodeID() (id uint32, exists bool)

EpisodeID returns the "episode" edge ID in the mutation.

func (*MediaFileMutation) EpisodeIDs

func (m *MediaFileMutation) EpisodeIDs() (ids []uint32)

EpisodeIDs returns the "episode" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EpisodeID instead. It exists only for internal usage by the builders.

func (*MediaFileMutation) Field

func (m *MediaFileMutation) 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 (*MediaFileMutation) FieldCleared

func (m *MediaFileMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MediaFileMutation) Fields

func (m *MediaFileMutation) 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 (*MediaFileMutation) Format

func (m *MediaFileMutation) Format() (r string, exists bool)

Format returns the value of the "format" field in the mutation.

func (*MediaFileMutation) FormatCleared

func (m *MediaFileMutation) FormatCleared() bool

FormatCleared returns if the "format" field was cleared in this mutation.

func (*MediaFileMutation) ID

func (m *MediaFileMutation) ID() (id uint32, 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 (*MediaFileMutation) IDs

func (m *MediaFileMutation) IDs(ctx context.Context) ([]uint32, 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 (*MediaFileMutation) LastSeenAt

func (m *MediaFileMutation) LastSeenAt() (r time.Time, exists bool)

LastSeenAt returns the value of the "last_seen_at" field in the mutation.

func (*MediaFileMutation) LastSeenAtCleared

func (m *MediaFileMutation) LastSeenAtCleared() bool

LastSeenAtCleared returns if the "last_seen_at" field was cleared in this mutation.

func (*MediaFileMutation) MovieCleared

func (m *MediaFileMutation) MovieCleared() bool

MovieCleared reports if the "movie" edge to the Movie entity was cleared.

func (*MediaFileMutation) MovieID

func (m *MediaFileMutation) MovieID() (id uint32, exists bool)

MovieID returns the "movie" edge ID in the mutation.

func (*MediaFileMutation) MovieIDs

func (m *MediaFileMutation) MovieIDs() (ids []uint32)

MovieIDs returns the "movie" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MovieID instead. It exists only for internal usage by the builders.

func (*MediaFileMutation) OldCreateTime

func (m *MediaFileMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the MediaFile entity. If the MediaFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MediaFileMutation) OldField

func (m *MediaFileMutation) 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 (*MediaFileMutation) OldFormat

func (m *MediaFileMutation) OldFormat(ctx context.Context) (v string, err error)

OldFormat returns the old "format" field's value of the MediaFile entity. If the MediaFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MediaFileMutation) OldLastSeenAt

func (m *MediaFileMutation) OldLastSeenAt(ctx context.Context) (v *time.Time, err error)

OldLastSeenAt returns the old "last_seen_at" field's value of the MediaFile entity. If the MediaFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MediaFileMutation) OldPath

func (m *MediaFileMutation) OldPath(ctx context.Context) (v string, err error)

OldPath returns the old "path" field's value of the MediaFile entity. If the MediaFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MediaFileMutation) OldQuality

func (m *MediaFileMutation) OldQuality(ctx context.Context) (v string, err error)

OldQuality returns the old "quality" field's value of the MediaFile entity. If the MediaFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MediaFileMutation) OldReleaseGroup

func (m *MediaFileMutation) OldReleaseGroup(ctx context.Context) (v string, err error)

OldReleaseGroup returns the old "release_group" field's value of the MediaFile entity. If the MediaFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MediaFileMutation) OldSize

func (m *MediaFileMutation) OldSize(ctx context.Context) (v int64, err error)

OldSize returns the old "size" field's value of the MediaFile entity. If the MediaFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MediaFileMutation) OldSource

func (m *MediaFileMutation) OldSource(ctx context.Context) (v mediafile.Source, err error)

OldSource returns the old "source" field's value of the MediaFile entity. If the MediaFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MediaFileMutation) OldUpdateTime

func (m *MediaFileMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the MediaFile entity. If the MediaFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MediaFileMutation) Op

func (m *MediaFileMutation) Op() Op

Op returns the operation name.

func (*MediaFileMutation) Path

func (m *MediaFileMutation) Path() (r string, exists bool)

Path returns the value of the "path" field in the mutation.

func (*MediaFileMutation) Quality

func (m *MediaFileMutation) Quality() (r string, exists bool)

Quality returns the value of the "quality" field in the mutation.

func (*MediaFileMutation) QualityCleared

func (m *MediaFileMutation) QualityCleared() bool

QualityCleared returns if the "quality" field was cleared in this mutation.

func (*MediaFileMutation) ReleaseGroup

func (m *MediaFileMutation) ReleaseGroup() (r string, exists bool)

ReleaseGroup returns the value of the "release_group" field in the mutation.

func (*MediaFileMutation) ReleaseGroupCleared

func (m *MediaFileMutation) ReleaseGroupCleared() bool

ReleaseGroupCleared returns if the "release_group" field was cleared in this mutation.

func (*MediaFileMutation) RemovedEdges

func (m *MediaFileMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MediaFileMutation) RemovedIDs

func (m *MediaFileMutation) 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 (*MediaFileMutation) ResetCreateTime

func (m *MediaFileMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*MediaFileMutation) ResetEdge

func (m *MediaFileMutation) 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 (*MediaFileMutation) ResetEpisode

func (m *MediaFileMutation) ResetEpisode()

ResetEpisode resets all changes to the "episode" edge.

func (*MediaFileMutation) ResetField

func (m *MediaFileMutation) 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 (*MediaFileMutation) ResetFormat

func (m *MediaFileMutation) ResetFormat()

ResetFormat resets all changes to the "format" field.

func (*MediaFileMutation) ResetLastSeenAt

func (m *MediaFileMutation) ResetLastSeenAt()

ResetLastSeenAt resets all changes to the "last_seen_at" field.

func (*MediaFileMutation) ResetMovie

func (m *MediaFileMutation) ResetMovie()

ResetMovie resets all changes to the "movie" edge.

func (*MediaFileMutation) ResetPath

func (m *MediaFileMutation) ResetPath()

ResetPath resets all changes to the "path" field.

func (*MediaFileMutation) ResetQuality

func (m *MediaFileMutation) ResetQuality()

ResetQuality resets all changes to the "quality" field.

func (*MediaFileMutation) ResetReleaseGroup

func (m *MediaFileMutation) ResetReleaseGroup()

ResetReleaseGroup resets all changes to the "release_group" field.

func (*MediaFileMutation) ResetSize

func (m *MediaFileMutation) ResetSize()

ResetSize resets all changes to the "size" field.

func (*MediaFileMutation) ResetSource

func (m *MediaFileMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*MediaFileMutation) ResetUpdateTime

func (m *MediaFileMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*MediaFileMutation) SetCreateTime

func (m *MediaFileMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*MediaFileMutation) SetEpisodeID

func (m *MediaFileMutation) SetEpisodeID(id uint32)

SetEpisodeID sets the "episode" edge to the Episode entity by id.

func (*MediaFileMutation) SetField

func (m *MediaFileMutation) 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 (*MediaFileMutation) SetFormat

func (m *MediaFileMutation) SetFormat(s string)

SetFormat sets the "format" field.

func (*MediaFileMutation) SetID

func (m *MediaFileMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of MediaFile entities.

func (*MediaFileMutation) SetLastSeenAt

func (m *MediaFileMutation) SetLastSeenAt(t time.Time)

SetLastSeenAt sets the "last_seen_at" field.

func (*MediaFileMutation) SetMovieID

func (m *MediaFileMutation) SetMovieID(id uint32)

SetMovieID sets the "movie" edge to the Movie entity by id.

func (*MediaFileMutation) SetOp

func (m *MediaFileMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MediaFileMutation) SetPath

func (m *MediaFileMutation) SetPath(s string)

SetPath sets the "path" field.

func (*MediaFileMutation) SetQuality

func (m *MediaFileMutation) SetQuality(s string)

SetQuality sets the "quality" field.

func (*MediaFileMutation) SetReleaseGroup

func (m *MediaFileMutation) SetReleaseGroup(s string)

SetReleaseGroup sets the "release_group" field.

func (*MediaFileMutation) SetSize

func (m *MediaFileMutation) SetSize(i int64)

SetSize sets the "size" field.

func (*MediaFileMutation) SetSource

func (m *MediaFileMutation) SetSource(value mediafile.Source)

SetSource sets the "source" field.

func (*MediaFileMutation) SetUpdateTime

func (m *MediaFileMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*MediaFileMutation) Size

func (m *MediaFileMutation) Size() (r int64, exists bool)

Size returns the value of the "size" field in the mutation.

func (*MediaFileMutation) Source

func (m *MediaFileMutation) Source() (r mediafile.Source, exists bool)

Source returns the value of the "source" field in the mutation.

func (MediaFileMutation) Tx

func (m MediaFileMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MediaFileMutation) Type

func (m *MediaFileMutation) Type() string

Type returns the node type of this mutation (MediaFile).

func (*MediaFileMutation) UpdateTime

func (m *MediaFileMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*MediaFileMutation) Where

func (m *MediaFileMutation) Where(ps ...predicate.MediaFile)

Where appends a list predicates to the MediaFileMutation builder.

func (*MediaFileMutation) WhereP

func (m *MediaFileMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MediaFileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MediaFileQuery

type MediaFileQuery struct {
	// contains filtered or unexported fields
}

MediaFileQuery is the builder for querying MediaFile entities.

func (*MediaFileQuery) Aggregate

func (_q *MediaFileQuery) Aggregate(fns ...AggregateFunc) *MediaFileSelect

Aggregate returns a MediaFileSelect configured with the given aggregations.

func (*MediaFileQuery) All

func (_q *MediaFileQuery) All(ctx context.Context) ([]*MediaFile, error)

All executes the query and returns a list of MediaFiles.

func (*MediaFileQuery) AllX

func (_q *MediaFileQuery) AllX(ctx context.Context) []*MediaFile

AllX is like All, but panics if an error occurs.

func (*MediaFileQuery) Clone

func (_q *MediaFileQuery) Clone() *MediaFileQuery

Clone returns a duplicate of the MediaFileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MediaFileQuery) Count

func (_q *MediaFileQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MediaFileQuery) CountX

func (_q *MediaFileQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MediaFileQuery) Exist

func (_q *MediaFileQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MediaFileQuery) ExistX

func (_q *MediaFileQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MediaFileQuery) First

func (_q *MediaFileQuery) First(ctx context.Context) (*MediaFile, error)

First returns the first MediaFile entity from the query. Returns a *NotFoundError when no MediaFile was found.

func (*MediaFileQuery) FirstID

func (_q *MediaFileQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first MediaFile ID from the query. Returns a *NotFoundError when no MediaFile ID was found.

func (*MediaFileQuery) FirstIDX

func (_q *MediaFileQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*MediaFileQuery) FirstX

func (_q *MediaFileQuery) FirstX(ctx context.Context) *MediaFile

FirstX is like First, but panics if an error occurs.

func (*MediaFileQuery) GroupBy

func (_q *MediaFileQuery) GroupBy(field string, fields ...string) *MediaFileGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MediaFile.Query().
	GroupBy(mediafile.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MediaFileQuery) IDs

func (_q *MediaFileQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of MediaFile IDs.

func (*MediaFileQuery) IDsX

func (_q *MediaFileQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*MediaFileQuery) Limit

func (_q *MediaFileQuery) Limit(limit int) *MediaFileQuery

Limit the number of records to be returned by this query.

func (*MediaFileQuery) Offset

func (_q *MediaFileQuery) Offset(offset int) *MediaFileQuery

Offset to start from.

func (*MediaFileQuery) Only

func (_q *MediaFileQuery) Only(ctx context.Context) (*MediaFile, error)

Only returns a single MediaFile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MediaFile entity is found. Returns a *NotFoundError when no MediaFile entities are found.

func (*MediaFileQuery) OnlyID

func (_q *MediaFileQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only MediaFile ID in the query. Returns a *NotSingularError when more than one MediaFile ID is found. Returns a *NotFoundError when no entities are found.

func (*MediaFileQuery) OnlyIDX

func (_q *MediaFileQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MediaFileQuery) OnlyX

func (_q *MediaFileQuery) OnlyX(ctx context.Context) *MediaFile

OnlyX is like Only, but panics if an error occurs.

func (*MediaFileQuery) Order

Order specifies how the records should be ordered.

func (*MediaFileQuery) QueryEpisode

func (_q *MediaFileQuery) QueryEpisode() *EpisodeQuery

QueryEpisode chains the current query on the "episode" edge.

func (*MediaFileQuery) QueryMovie

func (_q *MediaFileQuery) QueryMovie() *MovieQuery

QueryMovie chains the current query on the "movie" edge.

func (*MediaFileQuery) Select

func (_q *MediaFileQuery) Select(fields ...string) *MediaFileSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.MediaFile.Query().
	Select(mediafile.FieldCreateTime).
	Scan(ctx, &v)

func (*MediaFileQuery) Unique

func (_q *MediaFileQuery) Unique(unique bool) *MediaFileQuery

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 (*MediaFileQuery) Where

Where adds a new predicate for the MediaFileQuery builder.

func (*MediaFileQuery) WithEpisode

func (_q *MediaFileQuery) WithEpisode(opts ...func(*EpisodeQuery)) *MediaFileQuery

WithEpisode tells the query-builder to eager-load the nodes that are connected to the "episode" edge. The optional arguments are used to configure the query builder of the edge.

func (*MediaFileQuery) WithMovie

func (_q *MediaFileQuery) WithMovie(opts ...func(*MovieQuery)) *MediaFileQuery

WithMovie tells the query-builder to eager-load the nodes that are connected to the "movie" edge. The optional arguments are used to configure the query builder of the edge.

type MediaFileSelect

type MediaFileSelect struct {
	*MediaFileQuery
	// contains filtered or unexported fields
}

MediaFileSelect is the builder for selecting fields of MediaFile entities.

func (*MediaFileSelect) Aggregate

func (_s *MediaFileSelect) Aggregate(fns ...AggregateFunc) *MediaFileSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MediaFileSelect) Bool

func (s *MediaFileSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MediaFileSelect) BoolX

func (s *MediaFileSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MediaFileSelect) Bools

func (s *MediaFileSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MediaFileSelect) BoolsX

func (s *MediaFileSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MediaFileSelect) Float64

func (s *MediaFileSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MediaFileSelect) Float64X

func (s *MediaFileSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MediaFileSelect) Float64s

func (s *MediaFileSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MediaFileSelect) Float64sX

func (s *MediaFileSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MediaFileSelect) Int

func (s *MediaFileSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MediaFileSelect) IntX

func (s *MediaFileSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MediaFileSelect) Ints

func (s *MediaFileSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MediaFileSelect) IntsX

func (s *MediaFileSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MediaFileSelect) Scan

func (_s *MediaFileSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MediaFileSelect) ScanX

func (s *MediaFileSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MediaFileSelect) String

func (s *MediaFileSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MediaFileSelect) StringX

func (s *MediaFileSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MediaFileSelect) Strings

func (s *MediaFileSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MediaFileSelect) StringsX

func (s *MediaFileSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MediaFileUpdate

type MediaFileUpdate struct {
	// contains filtered or unexported fields
}

MediaFileUpdate is the builder for updating MediaFile entities.

func (*MediaFileUpdate) AddSize

func (_u *MediaFileUpdate) AddSize(v int64) *MediaFileUpdate

AddSize adds value to the "size" field.

func (*MediaFileUpdate) ClearEpisode

func (_u *MediaFileUpdate) ClearEpisode() *MediaFileUpdate

ClearEpisode clears the "episode" edge to the Episode entity.

func (*MediaFileUpdate) ClearFormat

func (_u *MediaFileUpdate) ClearFormat() *MediaFileUpdate

ClearFormat clears the value of the "format" field.

func (*MediaFileUpdate) ClearLastSeenAt

func (_u *MediaFileUpdate) ClearLastSeenAt() *MediaFileUpdate

ClearLastSeenAt clears the value of the "last_seen_at" field.

func (*MediaFileUpdate) ClearMovie

func (_u *MediaFileUpdate) ClearMovie() *MediaFileUpdate

ClearMovie clears the "movie" edge to the Movie entity.

func (*MediaFileUpdate) ClearQuality

func (_u *MediaFileUpdate) ClearQuality() *MediaFileUpdate

ClearQuality clears the value of the "quality" field.

func (*MediaFileUpdate) ClearReleaseGroup

func (_u *MediaFileUpdate) ClearReleaseGroup() *MediaFileUpdate

ClearReleaseGroup clears the value of the "release_group" field.

func (*MediaFileUpdate) Exec

func (_u *MediaFileUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MediaFileUpdate) ExecX

func (_u *MediaFileUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MediaFileUpdate) Mutation

func (_u *MediaFileUpdate) Mutation() *MediaFileMutation

Mutation returns the MediaFileMutation object of the builder.

func (*MediaFileUpdate) Save

func (_u *MediaFileUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MediaFileUpdate) SaveX

func (_u *MediaFileUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MediaFileUpdate) SetEpisode

func (_u *MediaFileUpdate) SetEpisode(v *Episode) *MediaFileUpdate

SetEpisode sets the "episode" edge to the Episode entity.

func (*MediaFileUpdate) SetEpisodeID

func (_u *MediaFileUpdate) SetEpisodeID(id uint32) *MediaFileUpdate

SetEpisodeID sets the "episode" edge to the Episode entity by ID.

func (*MediaFileUpdate) SetFormat

func (_u *MediaFileUpdate) SetFormat(v string) *MediaFileUpdate

SetFormat sets the "format" field.

func (*MediaFileUpdate) SetLastSeenAt

func (_u *MediaFileUpdate) SetLastSeenAt(v time.Time) *MediaFileUpdate

SetLastSeenAt sets the "last_seen_at" field.

func (*MediaFileUpdate) SetMovie

func (_u *MediaFileUpdate) SetMovie(v *Movie) *MediaFileUpdate

SetMovie sets the "movie" edge to the Movie entity.

func (*MediaFileUpdate) SetMovieID

func (_u *MediaFileUpdate) SetMovieID(id uint32) *MediaFileUpdate

SetMovieID sets the "movie" edge to the Movie entity by ID.

func (*MediaFileUpdate) SetNillableEpisodeID

func (_u *MediaFileUpdate) SetNillableEpisodeID(id *uint32) *MediaFileUpdate

SetNillableEpisodeID sets the "episode" edge to the Episode entity by ID if the given value is not nil.

func (*MediaFileUpdate) SetNillableFormat

func (_u *MediaFileUpdate) SetNillableFormat(v *string) *MediaFileUpdate

SetNillableFormat sets the "format" field if the given value is not nil.

func (*MediaFileUpdate) SetNillableLastSeenAt

func (_u *MediaFileUpdate) SetNillableLastSeenAt(v *time.Time) *MediaFileUpdate

SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.

func (*MediaFileUpdate) SetNillableMovieID

func (_u *MediaFileUpdate) SetNillableMovieID(id *uint32) *MediaFileUpdate

SetNillableMovieID sets the "movie" edge to the Movie entity by ID if the given value is not nil.

func (*MediaFileUpdate) SetNillablePath

func (_u *MediaFileUpdate) SetNillablePath(v *string) *MediaFileUpdate

SetNillablePath sets the "path" field if the given value is not nil.

func (*MediaFileUpdate) SetNillableQuality

func (_u *MediaFileUpdate) SetNillableQuality(v *string) *MediaFileUpdate

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*MediaFileUpdate) SetNillableReleaseGroup

func (_u *MediaFileUpdate) SetNillableReleaseGroup(v *string) *MediaFileUpdate

SetNillableReleaseGroup sets the "release_group" field if the given value is not nil.

func (*MediaFileUpdate) SetNillableSize

func (_u *MediaFileUpdate) SetNillableSize(v *int64) *MediaFileUpdate

SetNillableSize sets the "size" field if the given value is not nil.

func (*MediaFileUpdate) SetNillableSource

func (_u *MediaFileUpdate) SetNillableSource(v *mediafile.Source) *MediaFileUpdate

SetNillableSource sets the "source" field if the given value is not nil.

func (*MediaFileUpdate) SetPath

func (_u *MediaFileUpdate) SetPath(v string) *MediaFileUpdate

SetPath sets the "path" field.

func (*MediaFileUpdate) SetQuality

func (_u *MediaFileUpdate) SetQuality(v string) *MediaFileUpdate

SetQuality sets the "quality" field.

func (*MediaFileUpdate) SetReleaseGroup

func (_u *MediaFileUpdate) SetReleaseGroup(v string) *MediaFileUpdate

SetReleaseGroup sets the "release_group" field.

func (*MediaFileUpdate) SetSize

func (_u *MediaFileUpdate) SetSize(v int64) *MediaFileUpdate

SetSize sets the "size" field.

func (*MediaFileUpdate) SetSource

func (_u *MediaFileUpdate) SetSource(v mediafile.Source) *MediaFileUpdate

SetSource sets the "source" field.

func (*MediaFileUpdate) SetUpdateTime

func (_u *MediaFileUpdate) SetUpdateTime(v time.Time) *MediaFileUpdate

SetUpdateTime sets the "update_time" field.

func (*MediaFileUpdate) Where

Where appends a list predicates to the MediaFileUpdate builder.

type MediaFileUpdateOne

type MediaFileUpdateOne struct {
	// contains filtered or unexported fields
}

MediaFileUpdateOne is the builder for updating a single MediaFile entity.

func (*MediaFileUpdateOne) AddSize

AddSize adds value to the "size" field.

func (*MediaFileUpdateOne) ClearEpisode

func (_u *MediaFileUpdateOne) ClearEpisode() *MediaFileUpdateOne

ClearEpisode clears the "episode" edge to the Episode entity.

func (*MediaFileUpdateOne) ClearFormat

func (_u *MediaFileUpdateOne) ClearFormat() *MediaFileUpdateOne

ClearFormat clears the value of the "format" field.

func (*MediaFileUpdateOne) ClearLastSeenAt

func (_u *MediaFileUpdateOne) ClearLastSeenAt() *MediaFileUpdateOne

ClearLastSeenAt clears the value of the "last_seen_at" field.

func (*MediaFileUpdateOne) ClearMovie

func (_u *MediaFileUpdateOne) ClearMovie() *MediaFileUpdateOne

ClearMovie clears the "movie" edge to the Movie entity.

func (*MediaFileUpdateOne) ClearQuality

func (_u *MediaFileUpdateOne) ClearQuality() *MediaFileUpdateOne

ClearQuality clears the value of the "quality" field.

func (*MediaFileUpdateOne) ClearReleaseGroup

func (_u *MediaFileUpdateOne) ClearReleaseGroup() *MediaFileUpdateOne

ClearReleaseGroup clears the value of the "release_group" field.

func (*MediaFileUpdateOne) Exec

func (_u *MediaFileUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MediaFileUpdateOne) ExecX

func (_u *MediaFileUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MediaFileUpdateOne) Mutation

func (_u *MediaFileUpdateOne) Mutation() *MediaFileMutation

Mutation returns the MediaFileMutation object of the builder.

func (*MediaFileUpdateOne) Save

func (_u *MediaFileUpdateOne) Save(ctx context.Context) (*MediaFile, error)

Save executes the query and returns the updated MediaFile entity.

func (*MediaFileUpdateOne) SaveX

func (_u *MediaFileUpdateOne) SaveX(ctx context.Context) *MediaFile

SaveX is like Save, but panics if an error occurs.

func (*MediaFileUpdateOne) Select

func (_u *MediaFileUpdateOne) Select(field string, fields ...string) *MediaFileUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MediaFileUpdateOne) SetEpisode

func (_u *MediaFileUpdateOne) SetEpisode(v *Episode) *MediaFileUpdateOne

SetEpisode sets the "episode" edge to the Episode entity.

func (*MediaFileUpdateOne) SetEpisodeID

func (_u *MediaFileUpdateOne) SetEpisodeID(id uint32) *MediaFileUpdateOne

SetEpisodeID sets the "episode" edge to the Episode entity by ID.

func (*MediaFileUpdateOne) SetFormat

func (_u *MediaFileUpdateOne) SetFormat(v string) *MediaFileUpdateOne

SetFormat sets the "format" field.

func (*MediaFileUpdateOne) SetLastSeenAt

func (_u *MediaFileUpdateOne) SetLastSeenAt(v time.Time) *MediaFileUpdateOne

SetLastSeenAt sets the "last_seen_at" field.

func (*MediaFileUpdateOne) SetMovie

func (_u *MediaFileUpdateOne) SetMovie(v *Movie) *MediaFileUpdateOne

SetMovie sets the "movie" edge to the Movie entity.

func (*MediaFileUpdateOne) SetMovieID

func (_u *MediaFileUpdateOne) SetMovieID(id uint32) *MediaFileUpdateOne

SetMovieID sets the "movie" edge to the Movie entity by ID.

func (*MediaFileUpdateOne) SetNillableEpisodeID

func (_u *MediaFileUpdateOne) SetNillableEpisodeID(id *uint32) *MediaFileUpdateOne

SetNillableEpisodeID sets the "episode" edge to the Episode entity by ID if the given value is not nil.

func (*MediaFileUpdateOne) SetNillableFormat

func (_u *MediaFileUpdateOne) SetNillableFormat(v *string) *MediaFileUpdateOne

SetNillableFormat sets the "format" field if the given value is not nil.

func (*MediaFileUpdateOne) SetNillableLastSeenAt

func (_u *MediaFileUpdateOne) SetNillableLastSeenAt(v *time.Time) *MediaFileUpdateOne

SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.

func (*MediaFileUpdateOne) SetNillableMovieID

func (_u *MediaFileUpdateOne) SetNillableMovieID(id *uint32) *MediaFileUpdateOne

SetNillableMovieID sets the "movie" edge to the Movie entity by ID if the given value is not nil.

func (*MediaFileUpdateOne) SetNillablePath

func (_u *MediaFileUpdateOne) SetNillablePath(v *string) *MediaFileUpdateOne

SetNillablePath sets the "path" field if the given value is not nil.

func (*MediaFileUpdateOne) SetNillableQuality

func (_u *MediaFileUpdateOne) SetNillableQuality(v *string) *MediaFileUpdateOne

SetNillableQuality sets the "quality" field if the given value is not nil.

func (*MediaFileUpdateOne) SetNillableReleaseGroup

func (_u *MediaFileUpdateOne) SetNillableReleaseGroup(v *string) *MediaFileUpdateOne

SetNillableReleaseGroup sets the "release_group" field if the given value is not nil.

func (*MediaFileUpdateOne) SetNillableSize

func (_u *MediaFileUpdateOne) SetNillableSize(v *int64) *MediaFileUpdateOne

SetNillableSize sets the "size" field if the given value is not nil.

func (*MediaFileUpdateOne) SetNillableSource

func (_u *MediaFileUpdateOne) SetNillableSource(v *mediafile.Source) *MediaFileUpdateOne

SetNillableSource sets the "source" field if the given value is not nil.

func (*MediaFileUpdateOne) SetPath

SetPath sets the "path" field.

func (*MediaFileUpdateOne) SetQuality

func (_u *MediaFileUpdateOne) SetQuality(v string) *MediaFileUpdateOne

SetQuality sets the "quality" field.

func (*MediaFileUpdateOne) SetReleaseGroup

func (_u *MediaFileUpdateOne) SetReleaseGroup(v string) *MediaFileUpdateOne

SetReleaseGroup sets the "release_group" field.

func (*MediaFileUpdateOne) SetSize

SetSize sets the "size" field.

func (*MediaFileUpdateOne) SetSource

SetSource sets the "source" field.

func (*MediaFileUpdateOne) SetUpdateTime

func (_u *MediaFileUpdateOne) SetUpdateTime(v time.Time) *MediaFileUpdateOne

SetUpdateTime sets the "update_time" field.

func (*MediaFileUpdateOne) Where

Where appends a list predicates to the MediaFileUpdate builder.

type MediaFiles

type MediaFiles []*MediaFile

MediaFiles is a parsable slice of MediaFile.

type Movie

type Movie struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// OriginalTitle holds the value of the "original_title" field.
	OriginalTitle string `json:"original_title,omitempty"`
	// Year holds the value of the "year" field.
	Year uint16 `json:"year,omitempty"`
	// Overview holds the value of the "overview" field.
	Overview string `json:"overview,omitempty"`
	// Runtime holds the value of the "runtime" field.
	Runtime uint16 `json:"runtime,omitempty"`
	// Status holds the value of the "status" field.
	Status movie.Status `json:"status,omitempty"`
	// Monitored holds the value of the "monitored" field.
	Monitored bool `json:"monitored,omitempty"`
	// TmdbID holds the value of the "tmdb_id" field.
	TmdbID uint32 `json:"tmdb_id,omitempty"`
	// LastSearchAt holds the value of the "last_search_at" field.
	LastSearchAt *time.Time `json:"last_search_at,omitempty"`
	// DigitalReleaseDate holds the value of the "digital_release_date" field.
	DigitalReleaseDate *time.Time `json:"digital_release_date,omitempty"`
	// GrabFailures holds the value of the "grab_failures" field.
	GrabFailures uint8 `json:"grab_failures,omitempty"`
	// FailureReason holds the value of the "failure_reason" field.
	FailureReason string `json:"failure_reason,omitempty"`
	// QualityProfile holds the value of the "quality_profile" field.
	QualityProfile string `json:"quality_profile,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MovieQuery when eager-loading is set.
	Edges MovieEdges `json:"edges"`
	// contains filtered or unexported fields
}

Movie is the model entity for the Movie schema.

func (*Movie) QueryDownloadRecords

func (_m *Movie) QueryDownloadRecords() *DownloadRecordQuery

QueryDownloadRecords queries the "download_records" edge of the Movie entity.

func (*Movie) QueryEvents

func (_m *Movie) QueryEvents() *MovieEventQuery

QueryEvents queries the "events" edge of the Movie entity.

func (*Movie) QueryMediaFiles

func (_m *Movie) QueryMediaFiles() *MediaFileQuery

QueryMediaFiles queries the "media_files" edge of the Movie entity.

func (*Movie) String

func (_m *Movie) String() string

String implements the fmt.Stringer.

func (*Movie) Unwrap

func (_m *Movie) Unwrap() *Movie

Unwrap unwraps the Movie 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 (*Movie) Update

func (_m *Movie) Update() *MovieUpdateOne

Update returns a builder for updating this Movie. Note that you need to call Movie.Unwrap() before calling this method if this Movie was returned from a transaction, and the transaction was committed or rolled back.

func (*Movie) Value

func (_m *Movie) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Movie. This includes values selected through modifiers, order, etc.

type MovieClient

type MovieClient struct {
	// contains filtered or unexported fields
}

MovieClient is a client for the Movie schema.

func NewMovieClient

func NewMovieClient(c config) *MovieClient

NewMovieClient returns a client for the Movie from the given config.

func (*MovieClient) Create

func (c *MovieClient) Create() *MovieCreate

Create returns a builder for creating a Movie entity.

func (*MovieClient) CreateBulk

func (c *MovieClient) CreateBulk(builders ...*MovieCreate) *MovieCreateBulk

CreateBulk returns a builder for creating a bulk of Movie entities.

func (*MovieClient) Delete

func (c *MovieClient) Delete() *MovieDelete

Delete returns a delete builder for Movie.

func (*MovieClient) DeleteOne

func (c *MovieClient) DeleteOne(_m *Movie) *MovieDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MovieClient) DeleteOneID

func (c *MovieClient) DeleteOneID(id uint32) *MovieDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MovieClient) Get

func (c *MovieClient) Get(ctx context.Context, id uint32) (*Movie, error)

Get returns a Movie entity by its id.

func (*MovieClient) GetX

func (c *MovieClient) GetX(ctx context.Context, id uint32) *Movie

GetX is like Get, but panics if an error occurs.

func (*MovieClient) Hooks

func (c *MovieClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MovieClient) Intercept

func (c *MovieClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `movie.Intercept(f(g(h())))`.

func (*MovieClient) Interceptors

func (c *MovieClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MovieClient) MapCreateBulk

func (c *MovieClient) MapCreateBulk(slice any, setFunc func(*MovieCreate, int)) *MovieCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MovieClient) Query

func (c *MovieClient) Query() *MovieQuery

Query returns a query builder for Movie.

func (*MovieClient) QueryDownloadRecords

func (c *MovieClient) QueryDownloadRecords(_m *Movie) *DownloadRecordQuery

QueryDownloadRecords queries the download_records edge of a Movie.

func (*MovieClient) QueryEvents

func (c *MovieClient) QueryEvents(_m *Movie) *MovieEventQuery

QueryEvents queries the events edge of a Movie.

func (*MovieClient) QueryMediaFiles

func (c *MovieClient) QueryMediaFiles(_m *Movie) *MediaFileQuery

QueryMediaFiles queries the media_files edge of a Movie.

func (*MovieClient) Update

func (c *MovieClient) Update() *MovieUpdate

Update returns an update builder for Movie.

func (*MovieClient) UpdateOne

func (c *MovieClient) UpdateOne(_m *Movie) *MovieUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MovieClient) UpdateOneID

func (c *MovieClient) UpdateOneID(id uint32) *MovieUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MovieClient) Use

func (c *MovieClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `movie.Hooks(f(g(h())))`.

type MovieCreate

type MovieCreate struct {
	// contains filtered or unexported fields
}

MovieCreate is the builder for creating a Movie entity.

func (*MovieCreate) AddDownloadRecordIDs

func (_c *MovieCreate) AddDownloadRecordIDs(ids ...uint32) *MovieCreate

AddDownloadRecordIDs adds the "download_records" edge to the DownloadRecord entity by IDs.

func (*MovieCreate) AddDownloadRecords

func (_c *MovieCreate) AddDownloadRecords(v ...*DownloadRecord) *MovieCreate

AddDownloadRecords adds the "download_records" edges to the DownloadRecord entity.

func (*MovieCreate) AddEventIDs

func (_c *MovieCreate) AddEventIDs(ids ...uint32) *MovieCreate

AddEventIDs adds the "events" edge to the MovieEvent entity by IDs.

func (*MovieCreate) AddEvents

func (_c *MovieCreate) AddEvents(v ...*MovieEvent) *MovieCreate

AddEvents adds the "events" edges to the MovieEvent entity.

func (*MovieCreate) AddMediaFileIDs

func (_c *MovieCreate) AddMediaFileIDs(ids ...uint32) *MovieCreate

AddMediaFileIDs adds the "media_files" edge to the MediaFile entity by IDs.

func (*MovieCreate) AddMediaFiles

func (_c *MovieCreate) AddMediaFiles(v ...*MediaFile) *MovieCreate

AddMediaFiles adds the "media_files" edges to the MediaFile entity.

func (*MovieCreate) Exec

func (_c *MovieCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MovieCreate) ExecX

func (_c *MovieCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MovieCreate) Mutation

func (_c *MovieCreate) Mutation() *MovieMutation

Mutation returns the MovieMutation object of the builder.

func (*MovieCreate) Save

func (_c *MovieCreate) Save(ctx context.Context) (*Movie, error)

Save creates the Movie in the database.

func (*MovieCreate) SaveX

func (_c *MovieCreate) SaveX(ctx context.Context) *Movie

SaveX calls Save and panics if Save returns an error.

func (*MovieCreate) SetCreateTime

func (_c *MovieCreate) SetCreateTime(v time.Time) *MovieCreate

SetCreateTime sets the "create_time" field.

func (*MovieCreate) SetDigitalReleaseDate

func (_c *MovieCreate) SetDigitalReleaseDate(v time.Time) *MovieCreate

SetDigitalReleaseDate sets the "digital_release_date" field.

func (*MovieCreate) SetFailureReason

func (_c *MovieCreate) SetFailureReason(v string) *MovieCreate

SetFailureReason sets the "failure_reason" field.

func (*MovieCreate) SetGrabFailures

func (_c *MovieCreate) SetGrabFailures(v uint8) *MovieCreate

SetGrabFailures sets the "grab_failures" field.

func (*MovieCreate) SetID

func (_c *MovieCreate) SetID(v uint32) *MovieCreate

SetID sets the "id" field.

func (*MovieCreate) SetLastSearchAt

func (_c *MovieCreate) SetLastSearchAt(v time.Time) *MovieCreate

SetLastSearchAt sets the "last_search_at" field.

func (*MovieCreate) SetMonitored

func (_c *MovieCreate) SetMonitored(v bool) *MovieCreate

SetMonitored sets the "monitored" field.

func (*MovieCreate) SetNillableCreateTime

func (_c *MovieCreate) SetNillableCreateTime(v *time.Time) *MovieCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*MovieCreate) SetNillableDigitalReleaseDate

func (_c *MovieCreate) SetNillableDigitalReleaseDate(v *time.Time) *MovieCreate

SetNillableDigitalReleaseDate sets the "digital_release_date" field if the given value is not nil.

func (*MovieCreate) SetNillableFailureReason

func (_c *MovieCreate) SetNillableFailureReason(v *string) *MovieCreate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*MovieCreate) SetNillableGrabFailures

func (_c *MovieCreate) SetNillableGrabFailures(v *uint8) *MovieCreate

SetNillableGrabFailures sets the "grab_failures" field if the given value is not nil.

func (*MovieCreate) SetNillableLastSearchAt

func (_c *MovieCreate) SetNillableLastSearchAt(v *time.Time) *MovieCreate

SetNillableLastSearchAt sets the "last_search_at" field if the given value is not nil.

func (*MovieCreate) SetNillableMonitored

func (_c *MovieCreate) SetNillableMonitored(v *bool) *MovieCreate

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*MovieCreate) SetNillableOverview

func (_c *MovieCreate) SetNillableOverview(v *string) *MovieCreate

SetNillableOverview sets the "overview" field if the given value is not nil.

func (*MovieCreate) SetNillableQualityProfile

func (_c *MovieCreate) SetNillableQualityProfile(v *string) *MovieCreate

SetNillableQualityProfile sets the "quality_profile" field if the given value is not nil.

func (*MovieCreate) SetNillableRuntime

func (_c *MovieCreate) SetNillableRuntime(v *uint16) *MovieCreate

SetNillableRuntime sets the "runtime" field if the given value is not nil.

func (*MovieCreate) SetNillableStatus

func (_c *MovieCreate) SetNillableStatus(v *movie.Status) *MovieCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MovieCreate) SetNillableUpdateTime

func (_c *MovieCreate) SetNillableUpdateTime(v *time.Time) *MovieCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*MovieCreate) SetOriginalTitle

func (_c *MovieCreate) SetOriginalTitle(v string) *MovieCreate

SetOriginalTitle sets the "original_title" field.

func (*MovieCreate) SetOverview

func (_c *MovieCreate) SetOverview(v string) *MovieCreate

SetOverview sets the "overview" field.

func (*MovieCreate) SetQualityProfile

func (_c *MovieCreate) SetQualityProfile(v string) *MovieCreate

SetQualityProfile sets the "quality_profile" field.

func (*MovieCreate) SetRuntime

func (_c *MovieCreate) SetRuntime(v uint16) *MovieCreate

SetRuntime sets the "runtime" field.

func (*MovieCreate) SetStatus

func (_c *MovieCreate) SetStatus(v movie.Status) *MovieCreate

SetStatus sets the "status" field.

func (*MovieCreate) SetTitle

func (_c *MovieCreate) SetTitle(v string) *MovieCreate

SetTitle sets the "title" field.

func (*MovieCreate) SetTmdbID

func (_c *MovieCreate) SetTmdbID(v uint32) *MovieCreate

SetTmdbID sets the "tmdb_id" field.

func (*MovieCreate) SetUpdateTime

func (_c *MovieCreate) SetUpdateTime(v time.Time) *MovieCreate

SetUpdateTime sets the "update_time" field.

func (*MovieCreate) SetYear

func (_c *MovieCreate) SetYear(v uint16) *MovieCreate

SetYear sets the "year" field.

type MovieCreateBulk

type MovieCreateBulk struct {
	// contains filtered or unexported fields
}

MovieCreateBulk is the builder for creating many Movie entities in bulk.

func (*MovieCreateBulk) Exec

func (_c *MovieCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MovieCreateBulk) ExecX

func (_c *MovieCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MovieCreateBulk) Save

func (_c *MovieCreateBulk) Save(ctx context.Context) ([]*Movie, error)

Save creates the Movie entities in the database.

func (*MovieCreateBulk) SaveX

func (_c *MovieCreateBulk) SaveX(ctx context.Context) []*Movie

SaveX is like Save, but panics if an error occurs.

type MovieDelete

type MovieDelete struct {
	// contains filtered or unexported fields
}

MovieDelete is the builder for deleting a Movie entity.

func (*MovieDelete) Exec

func (_d *MovieDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MovieDelete) ExecX

func (_d *MovieDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MovieDelete) Where

func (_d *MovieDelete) Where(ps ...predicate.Movie) *MovieDelete

Where appends a list predicates to the MovieDelete builder.

type MovieDeleteOne

type MovieDeleteOne struct {
	// contains filtered or unexported fields
}

MovieDeleteOne is the builder for deleting a single Movie entity.

func (*MovieDeleteOne) Exec

func (_d *MovieDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MovieDeleteOne) ExecX

func (_d *MovieDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MovieDeleteOne) Where

func (_d *MovieDeleteOne) Where(ps ...predicate.Movie) *MovieDeleteOne

Where appends a list predicates to the MovieDelete builder.

type MovieEdges

type MovieEdges struct {
	// DownloadRecords holds the value of the download_records edge.
	DownloadRecords []*DownloadRecord `json:"download_records,omitempty"`
	// MediaFiles holds the value of the media_files edge.
	MediaFiles []*MediaFile `json:"media_files,omitempty"`
	// Events holds the value of the events edge.
	Events []*MovieEvent `json:"events,omitempty"`
	// contains filtered or unexported fields
}

MovieEdges holds the relations/edges for other nodes in the graph.

func (MovieEdges) DownloadRecordsOrErr

func (e MovieEdges) DownloadRecordsOrErr() ([]*DownloadRecord, error)

DownloadRecordsOrErr returns the DownloadRecords value or an error if the edge was not loaded in eager-loading.

func (MovieEdges) EventsOrErr

func (e MovieEdges) EventsOrErr() ([]*MovieEvent, error)

EventsOrErr returns the Events value or an error if the edge was not loaded in eager-loading.

func (MovieEdges) MediaFilesOrErr

func (e MovieEdges) MediaFilesOrErr() ([]*MediaFile, error)

MediaFilesOrErr returns the MediaFiles value or an error if the edge was not loaded in eager-loading.

type MovieEvent

type MovieEvent struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Type holds the value of the "type" field.
	Type movieevent.Type `json:"type,omitempty"`
	// Payload holds the value of the "payload" field.
	Payload map[string]interface{} `json:"payload,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MovieEventQuery when eager-loading is set.
	Edges MovieEventEdges `json:"edges"`
	// contains filtered or unexported fields
}

MovieEvent is the model entity for the MovieEvent schema.

func (*MovieEvent) QueryMovie

func (_m *MovieEvent) QueryMovie() *MovieQuery

QueryMovie queries the "movie" edge of the MovieEvent entity.

func (*MovieEvent) String

func (_m *MovieEvent) String() string

String implements the fmt.Stringer.

func (*MovieEvent) Unwrap

func (_m *MovieEvent) Unwrap() *MovieEvent

Unwrap unwraps the MovieEvent 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 (*MovieEvent) Update

func (_m *MovieEvent) Update() *MovieEventUpdateOne

Update returns a builder for updating this MovieEvent. Note that you need to call MovieEvent.Unwrap() before calling this method if this MovieEvent was returned from a transaction, and the transaction was committed or rolled back.

func (*MovieEvent) Value

func (_m *MovieEvent) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the MovieEvent. This includes values selected through modifiers, order, etc.

type MovieEventClient

type MovieEventClient struct {
	// contains filtered or unexported fields
}

MovieEventClient is a client for the MovieEvent schema.

func NewMovieEventClient

func NewMovieEventClient(c config) *MovieEventClient

NewMovieEventClient returns a client for the MovieEvent from the given config.

func (*MovieEventClient) Create

func (c *MovieEventClient) Create() *MovieEventCreate

Create returns a builder for creating a MovieEvent entity.

func (*MovieEventClient) CreateBulk

func (c *MovieEventClient) CreateBulk(builders ...*MovieEventCreate) *MovieEventCreateBulk

CreateBulk returns a builder for creating a bulk of MovieEvent entities.

func (*MovieEventClient) Delete

func (c *MovieEventClient) Delete() *MovieEventDelete

Delete returns a delete builder for MovieEvent.

func (*MovieEventClient) DeleteOne

func (c *MovieEventClient) DeleteOne(_m *MovieEvent) *MovieEventDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MovieEventClient) DeleteOneID

func (c *MovieEventClient) DeleteOneID(id uint32) *MovieEventDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MovieEventClient) Get

func (c *MovieEventClient) Get(ctx context.Context, id uint32) (*MovieEvent, error)

Get returns a MovieEvent entity by its id.

func (*MovieEventClient) GetX

func (c *MovieEventClient) GetX(ctx context.Context, id uint32) *MovieEvent

GetX is like Get, but panics if an error occurs.

func (*MovieEventClient) Hooks

func (c *MovieEventClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MovieEventClient) Intercept

func (c *MovieEventClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `movieevent.Intercept(f(g(h())))`.

func (*MovieEventClient) Interceptors

func (c *MovieEventClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MovieEventClient) MapCreateBulk

func (c *MovieEventClient) MapCreateBulk(slice any, setFunc func(*MovieEventCreate, int)) *MovieEventCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MovieEventClient) Query

func (c *MovieEventClient) Query() *MovieEventQuery

Query returns a query builder for MovieEvent.

func (*MovieEventClient) QueryMovie

func (c *MovieEventClient) QueryMovie(_m *MovieEvent) *MovieQuery

QueryMovie queries the movie edge of a MovieEvent.

func (*MovieEventClient) Update

func (c *MovieEventClient) Update() *MovieEventUpdate

Update returns an update builder for MovieEvent.

func (*MovieEventClient) UpdateOne

func (c *MovieEventClient) UpdateOne(_m *MovieEvent) *MovieEventUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MovieEventClient) UpdateOneID

func (c *MovieEventClient) UpdateOneID(id uint32) *MovieEventUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MovieEventClient) Use

func (c *MovieEventClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `movieevent.Hooks(f(g(h())))`.

type MovieEventCreate

type MovieEventCreate struct {
	// contains filtered or unexported fields
}

MovieEventCreate is the builder for creating a MovieEvent entity.

func (*MovieEventCreate) Exec

func (_c *MovieEventCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MovieEventCreate) ExecX

func (_c *MovieEventCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MovieEventCreate) Mutation

func (_c *MovieEventCreate) Mutation() *MovieEventMutation

Mutation returns the MovieEventMutation object of the builder.

func (*MovieEventCreate) Save

func (_c *MovieEventCreate) Save(ctx context.Context) (*MovieEvent, error)

Save creates the MovieEvent in the database.

func (*MovieEventCreate) SaveX

func (_c *MovieEventCreate) SaveX(ctx context.Context) *MovieEvent

SaveX calls Save and panics if Save returns an error.

func (*MovieEventCreate) SetCreateTime

func (_c *MovieEventCreate) SetCreateTime(v time.Time) *MovieEventCreate

SetCreateTime sets the "create_time" field.

func (*MovieEventCreate) SetID

SetID sets the "id" field.

func (*MovieEventCreate) SetMovie

func (_c *MovieEventCreate) SetMovie(v *Movie) *MovieEventCreate

SetMovie sets the "movie" edge to the Movie entity.

func (*MovieEventCreate) SetMovieID

func (_c *MovieEventCreate) SetMovieID(id uint32) *MovieEventCreate

SetMovieID sets the "movie" edge to the Movie entity by ID.

func (*MovieEventCreate) SetNillableCreateTime

func (_c *MovieEventCreate) SetNillableCreateTime(v *time.Time) *MovieEventCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*MovieEventCreate) SetNillableUpdateTime

func (_c *MovieEventCreate) SetNillableUpdateTime(v *time.Time) *MovieEventCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*MovieEventCreate) SetPayload

func (_c *MovieEventCreate) SetPayload(v map[string]interface{}) *MovieEventCreate

SetPayload sets the "payload" field.

func (*MovieEventCreate) SetType

SetType sets the "type" field.

func (*MovieEventCreate) SetUpdateTime

func (_c *MovieEventCreate) SetUpdateTime(v time.Time) *MovieEventCreate

SetUpdateTime sets the "update_time" field.

type MovieEventCreateBulk

type MovieEventCreateBulk struct {
	// contains filtered or unexported fields
}

MovieEventCreateBulk is the builder for creating many MovieEvent entities in bulk.

func (*MovieEventCreateBulk) Exec

func (_c *MovieEventCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MovieEventCreateBulk) ExecX

func (_c *MovieEventCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MovieEventCreateBulk) Save

func (_c *MovieEventCreateBulk) Save(ctx context.Context) ([]*MovieEvent, error)

Save creates the MovieEvent entities in the database.

func (*MovieEventCreateBulk) SaveX

func (_c *MovieEventCreateBulk) SaveX(ctx context.Context) []*MovieEvent

SaveX is like Save, but panics if an error occurs.

type MovieEventDelete

type MovieEventDelete struct {
	// contains filtered or unexported fields
}

MovieEventDelete is the builder for deleting a MovieEvent entity.

func (*MovieEventDelete) Exec

func (_d *MovieEventDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MovieEventDelete) ExecX

func (_d *MovieEventDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MovieEventDelete) Where

Where appends a list predicates to the MovieEventDelete builder.

type MovieEventDeleteOne

type MovieEventDeleteOne struct {
	// contains filtered or unexported fields
}

MovieEventDeleteOne is the builder for deleting a single MovieEvent entity.

func (*MovieEventDeleteOne) Exec

func (_d *MovieEventDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MovieEventDeleteOne) ExecX

func (_d *MovieEventDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MovieEventDeleteOne) Where

Where appends a list predicates to the MovieEventDelete builder.

type MovieEventEdges

type MovieEventEdges struct {
	// Movie holds the value of the movie edge.
	Movie *Movie `json:"movie,omitempty"`
	// contains filtered or unexported fields
}

MovieEventEdges holds the relations/edges for other nodes in the graph.

func (MovieEventEdges) MovieOrErr

func (e MovieEventEdges) MovieOrErr() (*Movie, error)

MovieOrErr returns the Movie value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MovieEventGroupBy

type MovieEventGroupBy struct {
	// contains filtered or unexported fields
}

MovieEventGroupBy is the group-by builder for MovieEvent entities.

func (*MovieEventGroupBy) Aggregate

func (_g *MovieEventGroupBy) Aggregate(fns ...AggregateFunc) *MovieEventGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MovieEventGroupBy) Bool

func (s *MovieEventGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MovieEventGroupBy) BoolX

func (s *MovieEventGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MovieEventGroupBy) Bools

func (s *MovieEventGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MovieEventGroupBy) BoolsX

func (s *MovieEventGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MovieEventGroupBy) Float64

func (s *MovieEventGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MovieEventGroupBy) Float64X

func (s *MovieEventGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MovieEventGroupBy) Float64s

func (s *MovieEventGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MovieEventGroupBy) Float64sX

func (s *MovieEventGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MovieEventGroupBy) Int

func (s *MovieEventGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MovieEventGroupBy) IntX

func (s *MovieEventGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MovieEventGroupBy) Ints

func (s *MovieEventGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MovieEventGroupBy) IntsX

func (s *MovieEventGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MovieEventGroupBy) Scan

func (_g *MovieEventGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MovieEventGroupBy) ScanX

func (s *MovieEventGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MovieEventGroupBy) String

func (s *MovieEventGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MovieEventGroupBy) StringX

func (s *MovieEventGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MovieEventGroupBy) Strings

func (s *MovieEventGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MovieEventGroupBy) StringsX

func (s *MovieEventGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MovieEventMutation

type MovieEventMutation struct {
	// contains filtered or unexported fields
}

MovieEventMutation represents an operation that mutates the MovieEvent nodes in the graph.

func (*MovieEventMutation) AddField

func (m *MovieEventMutation) 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 (*MovieEventMutation) AddedEdges

func (m *MovieEventMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MovieEventMutation) AddedField

func (m *MovieEventMutation) 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 (*MovieEventMutation) AddedFields

func (m *MovieEventMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MovieEventMutation) AddedIDs

func (m *MovieEventMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MovieEventMutation) ClearEdge

func (m *MovieEventMutation) 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 (*MovieEventMutation) ClearField

func (m *MovieEventMutation) 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 (*MovieEventMutation) ClearMovie

func (m *MovieEventMutation) ClearMovie()

ClearMovie clears the "movie" edge to the Movie entity.

func (*MovieEventMutation) ClearPayload

func (m *MovieEventMutation) ClearPayload()

ClearPayload clears the value of the "payload" field.

func (*MovieEventMutation) ClearedEdges

func (m *MovieEventMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MovieEventMutation) ClearedFields

func (m *MovieEventMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MovieEventMutation) Client

func (m MovieEventMutation) 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 (*MovieEventMutation) CreateTime

func (m *MovieEventMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*MovieEventMutation) EdgeCleared

func (m *MovieEventMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MovieEventMutation) Field

func (m *MovieEventMutation) 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 (*MovieEventMutation) FieldCleared

func (m *MovieEventMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MovieEventMutation) Fields

func (m *MovieEventMutation) 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 (*MovieEventMutation) GetType

func (m *MovieEventMutation) GetType() (r movieevent.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*MovieEventMutation) ID

func (m *MovieEventMutation) ID() (id uint32, 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 (*MovieEventMutation) IDs

func (m *MovieEventMutation) IDs(ctx context.Context) ([]uint32, 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 (*MovieEventMutation) MovieCleared

func (m *MovieEventMutation) MovieCleared() bool

MovieCleared reports if the "movie" edge to the Movie entity was cleared.

func (*MovieEventMutation) MovieID

func (m *MovieEventMutation) MovieID() (id uint32, exists bool)

MovieID returns the "movie" edge ID in the mutation.

func (*MovieEventMutation) MovieIDs

func (m *MovieEventMutation) MovieIDs() (ids []uint32)

MovieIDs returns the "movie" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MovieID instead. It exists only for internal usage by the builders.

func (*MovieEventMutation) OldCreateTime

func (m *MovieEventMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the MovieEvent entity. If the MovieEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieEventMutation) OldField

func (m *MovieEventMutation) 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 (*MovieEventMutation) OldPayload

func (m *MovieEventMutation) OldPayload(ctx context.Context) (v map[string]interface{}, err error)

OldPayload returns the old "payload" field's value of the MovieEvent entity. If the MovieEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieEventMutation) OldType

func (m *MovieEventMutation) OldType(ctx context.Context) (v movieevent.Type, err error)

OldType returns the old "type" field's value of the MovieEvent entity. If the MovieEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieEventMutation) OldUpdateTime

func (m *MovieEventMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the MovieEvent entity. If the MovieEvent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieEventMutation) Op

func (m *MovieEventMutation) Op() Op

Op returns the operation name.

func (*MovieEventMutation) Payload

func (m *MovieEventMutation) Payload() (r map[string]interface{}, exists bool)

Payload returns the value of the "payload" field in the mutation.

func (*MovieEventMutation) PayloadCleared

func (m *MovieEventMutation) PayloadCleared() bool

PayloadCleared returns if the "payload" field was cleared in this mutation.

func (*MovieEventMutation) RemovedEdges

func (m *MovieEventMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MovieEventMutation) RemovedIDs

func (m *MovieEventMutation) 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 (*MovieEventMutation) ResetCreateTime

func (m *MovieEventMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*MovieEventMutation) ResetEdge

func (m *MovieEventMutation) 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 (*MovieEventMutation) ResetField

func (m *MovieEventMutation) 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 (*MovieEventMutation) ResetMovie

func (m *MovieEventMutation) ResetMovie()

ResetMovie resets all changes to the "movie" edge.

func (*MovieEventMutation) ResetPayload

func (m *MovieEventMutation) ResetPayload()

ResetPayload resets all changes to the "payload" field.

func (*MovieEventMutation) ResetType

func (m *MovieEventMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*MovieEventMutation) ResetUpdateTime

func (m *MovieEventMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*MovieEventMutation) SetCreateTime

func (m *MovieEventMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*MovieEventMutation) SetField

func (m *MovieEventMutation) 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 (*MovieEventMutation) SetID

func (m *MovieEventMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of MovieEvent entities.

func (*MovieEventMutation) SetMovieID

func (m *MovieEventMutation) SetMovieID(id uint32)

SetMovieID sets the "movie" edge to the Movie entity by id.

func (*MovieEventMutation) SetOp

func (m *MovieEventMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MovieEventMutation) SetPayload

func (m *MovieEventMutation) SetPayload(value map[string]interface{})

SetPayload sets the "payload" field.

func (*MovieEventMutation) SetType

func (m *MovieEventMutation) SetType(value movieevent.Type)

SetType sets the "type" field.

func (*MovieEventMutation) SetUpdateTime

func (m *MovieEventMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (MovieEventMutation) Tx

func (m MovieEventMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MovieEventMutation) Type

func (m *MovieEventMutation) Type() string

Type returns the node type of this mutation (MovieEvent).

func (*MovieEventMutation) UpdateTime

func (m *MovieEventMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*MovieEventMutation) Where

func (m *MovieEventMutation) Where(ps ...predicate.MovieEvent)

Where appends a list predicates to the MovieEventMutation builder.

func (*MovieEventMutation) WhereP

func (m *MovieEventMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MovieEventMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MovieEventQuery

type MovieEventQuery struct {
	// contains filtered or unexported fields
}

MovieEventQuery is the builder for querying MovieEvent entities.

func (*MovieEventQuery) Aggregate

func (_q *MovieEventQuery) Aggregate(fns ...AggregateFunc) *MovieEventSelect

Aggregate returns a MovieEventSelect configured with the given aggregations.

func (*MovieEventQuery) All

func (_q *MovieEventQuery) All(ctx context.Context) ([]*MovieEvent, error)

All executes the query and returns a list of MovieEvents.

func (*MovieEventQuery) AllX

func (_q *MovieEventQuery) AllX(ctx context.Context) []*MovieEvent

AllX is like All, but panics if an error occurs.

func (*MovieEventQuery) Clone

func (_q *MovieEventQuery) Clone() *MovieEventQuery

Clone returns a duplicate of the MovieEventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MovieEventQuery) Count

func (_q *MovieEventQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MovieEventQuery) CountX

func (_q *MovieEventQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MovieEventQuery) Exist

func (_q *MovieEventQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MovieEventQuery) ExistX

func (_q *MovieEventQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MovieEventQuery) First

func (_q *MovieEventQuery) First(ctx context.Context) (*MovieEvent, error)

First returns the first MovieEvent entity from the query. Returns a *NotFoundError when no MovieEvent was found.

func (*MovieEventQuery) FirstID

func (_q *MovieEventQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first MovieEvent ID from the query. Returns a *NotFoundError when no MovieEvent ID was found.

func (*MovieEventQuery) FirstIDX

func (_q *MovieEventQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*MovieEventQuery) FirstX

func (_q *MovieEventQuery) FirstX(ctx context.Context) *MovieEvent

FirstX is like First, but panics if an error occurs.

func (*MovieEventQuery) GroupBy

func (_q *MovieEventQuery) GroupBy(field string, fields ...string) *MovieEventGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MovieEvent.Query().
	GroupBy(movieevent.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MovieEventQuery) IDs

func (_q *MovieEventQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of MovieEvent IDs.

func (*MovieEventQuery) IDsX

func (_q *MovieEventQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*MovieEventQuery) Limit

func (_q *MovieEventQuery) Limit(limit int) *MovieEventQuery

Limit the number of records to be returned by this query.

func (*MovieEventQuery) Offset

func (_q *MovieEventQuery) Offset(offset int) *MovieEventQuery

Offset to start from.

func (*MovieEventQuery) Only

func (_q *MovieEventQuery) Only(ctx context.Context) (*MovieEvent, error)

Only returns a single MovieEvent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MovieEvent entity is found. Returns a *NotFoundError when no MovieEvent entities are found.

func (*MovieEventQuery) OnlyID

func (_q *MovieEventQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only MovieEvent ID in the query. Returns a *NotSingularError when more than one MovieEvent ID is found. Returns a *NotFoundError when no entities are found.

func (*MovieEventQuery) OnlyIDX

func (_q *MovieEventQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MovieEventQuery) OnlyX

func (_q *MovieEventQuery) OnlyX(ctx context.Context) *MovieEvent

OnlyX is like Only, but panics if an error occurs.

func (*MovieEventQuery) Order

Order specifies how the records should be ordered.

func (*MovieEventQuery) QueryMovie

func (_q *MovieEventQuery) QueryMovie() *MovieQuery

QueryMovie chains the current query on the "movie" edge.

func (*MovieEventQuery) Select

func (_q *MovieEventQuery) Select(fields ...string) *MovieEventSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.MovieEvent.Query().
	Select(movieevent.FieldCreateTime).
	Scan(ctx, &v)

func (*MovieEventQuery) Unique

func (_q *MovieEventQuery) Unique(unique bool) *MovieEventQuery

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 (*MovieEventQuery) Where

Where adds a new predicate for the MovieEventQuery builder.

func (*MovieEventQuery) WithMovie

func (_q *MovieEventQuery) WithMovie(opts ...func(*MovieQuery)) *MovieEventQuery

WithMovie tells the query-builder to eager-load the nodes that are connected to the "movie" edge. The optional arguments are used to configure the query builder of the edge.

type MovieEventSelect

type MovieEventSelect struct {
	*MovieEventQuery
	// contains filtered or unexported fields
}

MovieEventSelect is the builder for selecting fields of MovieEvent entities.

func (*MovieEventSelect) Aggregate

func (_s *MovieEventSelect) Aggregate(fns ...AggregateFunc) *MovieEventSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MovieEventSelect) Bool

func (s *MovieEventSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MovieEventSelect) BoolX

func (s *MovieEventSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MovieEventSelect) Bools

func (s *MovieEventSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MovieEventSelect) BoolsX

func (s *MovieEventSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MovieEventSelect) Float64

func (s *MovieEventSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MovieEventSelect) Float64X

func (s *MovieEventSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MovieEventSelect) Float64s

func (s *MovieEventSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MovieEventSelect) Float64sX

func (s *MovieEventSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MovieEventSelect) Int

func (s *MovieEventSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MovieEventSelect) IntX

func (s *MovieEventSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MovieEventSelect) Ints

func (s *MovieEventSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MovieEventSelect) IntsX

func (s *MovieEventSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MovieEventSelect) Scan

func (_s *MovieEventSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MovieEventSelect) ScanX

func (s *MovieEventSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MovieEventSelect) String

func (s *MovieEventSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MovieEventSelect) StringX

func (s *MovieEventSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MovieEventSelect) Strings

func (s *MovieEventSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MovieEventSelect) StringsX

func (s *MovieEventSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MovieEventUpdate

type MovieEventUpdate struct {
	// contains filtered or unexported fields
}

MovieEventUpdate is the builder for updating MovieEvent entities.

func (*MovieEventUpdate) ClearMovie

func (_u *MovieEventUpdate) ClearMovie() *MovieEventUpdate

ClearMovie clears the "movie" edge to the Movie entity.

func (*MovieEventUpdate) ClearPayload

func (_u *MovieEventUpdate) ClearPayload() *MovieEventUpdate

ClearPayload clears the value of the "payload" field.

func (*MovieEventUpdate) Exec

func (_u *MovieEventUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MovieEventUpdate) ExecX

func (_u *MovieEventUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MovieEventUpdate) Mutation

func (_u *MovieEventUpdate) Mutation() *MovieEventMutation

Mutation returns the MovieEventMutation object of the builder.

func (*MovieEventUpdate) Save

func (_u *MovieEventUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MovieEventUpdate) SaveX

func (_u *MovieEventUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MovieEventUpdate) SetMovie

func (_u *MovieEventUpdate) SetMovie(v *Movie) *MovieEventUpdate

SetMovie sets the "movie" edge to the Movie entity.

func (*MovieEventUpdate) SetMovieID

func (_u *MovieEventUpdate) SetMovieID(id uint32) *MovieEventUpdate

SetMovieID sets the "movie" edge to the Movie entity by ID.

func (*MovieEventUpdate) SetNillableType

func (_u *MovieEventUpdate) SetNillableType(v *movieevent.Type) *MovieEventUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*MovieEventUpdate) SetPayload

func (_u *MovieEventUpdate) SetPayload(v map[string]interface{}) *MovieEventUpdate

SetPayload sets the "payload" field.

func (*MovieEventUpdate) SetType

SetType sets the "type" field.

func (*MovieEventUpdate) SetUpdateTime

func (_u *MovieEventUpdate) SetUpdateTime(v time.Time) *MovieEventUpdate

SetUpdateTime sets the "update_time" field.

func (*MovieEventUpdate) Where

Where appends a list predicates to the MovieEventUpdate builder.

type MovieEventUpdateOne

type MovieEventUpdateOne struct {
	// contains filtered or unexported fields
}

MovieEventUpdateOne is the builder for updating a single MovieEvent entity.

func (*MovieEventUpdateOne) ClearMovie

func (_u *MovieEventUpdateOne) ClearMovie() *MovieEventUpdateOne

ClearMovie clears the "movie" edge to the Movie entity.

func (*MovieEventUpdateOne) ClearPayload

func (_u *MovieEventUpdateOne) ClearPayload() *MovieEventUpdateOne

ClearPayload clears the value of the "payload" field.

func (*MovieEventUpdateOne) Exec

func (_u *MovieEventUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MovieEventUpdateOne) ExecX

func (_u *MovieEventUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MovieEventUpdateOne) Mutation

func (_u *MovieEventUpdateOne) Mutation() *MovieEventMutation

Mutation returns the MovieEventMutation object of the builder.

func (*MovieEventUpdateOne) Save

Save executes the query and returns the updated MovieEvent entity.

func (*MovieEventUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*MovieEventUpdateOne) Select

func (_u *MovieEventUpdateOne) Select(field string, fields ...string) *MovieEventUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MovieEventUpdateOne) SetMovie

func (_u *MovieEventUpdateOne) SetMovie(v *Movie) *MovieEventUpdateOne

SetMovie sets the "movie" edge to the Movie entity.

func (*MovieEventUpdateOne) SetMovieID

func (_u *MovieEventUpdateOne) SetMovieID(id uint32) *MovieEventUpdateOne

SetMovieID sets the "movie" edge to the Movie entity by ID.

func (*MovieEventUpdateOne) SetNillableType

func (_u *MovieEventUpdateOne) SetNillableType(v *movieevent.Type) *MovieEventUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*MovieEventUpdateOne) SetPayload

func (_u *MovieEventUpdateOne) SetPayload(v map[string]interface{}) *MovieEventUpdateOne

SetPayload sets the "payload" field.

func (*MovieEventUpdateOne) SetType

SetType sets the "type" field.

func (*MovieEventUpdateOne) SetUpdateTime

func (_u *MovieEventUpdateOne) SetUpdateTime(v time.Time) *MovieEventUpdateOne

SetUpdateTime sets the "update_time" field.

func (*MovieEventUpdateOne) Where

Where appends a list predicates to the MovieEventUpdate builder.

type MovieEvents

type MovieEvents []*MovieEvent

MovieEvents is a parsable slice of MovieEvent.

type MovieGroupBy

type MovieGroupBy struct {
	// contains filtered or unexported fields
}

MovieGroupBy is the group-by builder for Movie entities.

func (*MovieGroupBy) Aggregate

func (_g *MovieGroupBy) Aggregate(fns ...AggregateFunc) *MovieGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MovieGroupBy) Bool

func (s *MovieGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MovieGroupBy) BoolX

func (s *MovieGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MovieGroupBy) Bools

func (s *MovieGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MovieGroupBy) BoolsX

func (s *MovieGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MovieGroupBy) Float64

func (s *MovieGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MovieGroupBy) Float64X

func (s *MovieGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MovieGroupBy) Float64s

func (s *MovieGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MovieGroupBy) Float64sX

func (s *MovieGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MovieGroupBy) Int

func (s *MovieGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MovieGroupBy) IntX

func (s *MovieGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MovieGroupBy) Ints

func (s *MovieGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MovieGroupBy) IntsX

func (s *MovieGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MovieGroupBy) Scan

func (_g *MovieGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MovieGroupBy) ScanX

func (s *MovieGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MovieGroupBy) String

func (s *MovieGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MovieGroupBy) StringX

func (s *MovieGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MovieGroupBy) Strings

func (s *MovieGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MovieGroupBy) StringsX

func (s *MovieGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MovieMutation

type MovieMutation struct {
	// contains filtered or unexported fields
}

MovieMutation represents an operation that mutates the Movie nodes in the graph.

func (*MovieMutation) AddDownloadRecordIDs

func (m *MovieMutation) AddDownloadRecordIDs(ids ...uint32)

AddDownloadRecordIDs adds the "download_records" edge to the DownloadRecord entity by ids.

func (*MovieMutation) AddEventIDs

func (m *MovieMutation) AddEventIDs(ids ...uint32)

AddEventIDs adds the "events" edge to the MovieEvent entity by ids.

func (*MovieMutation) AddField

func (m *MovieMutation) 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 (*MovieMutation) AddGrabFailures

func (m *MovieMutation) AddGrabFailures(u int8)

AddGrabFailures adds u to the "grab_failures" field.

func (*MovieMutation) AddMediaFileIDs

func (m *MovieMutation) AddMediaFileIDs(ids ...uint32)

AddMediaFileIDs adds the "media_files" edge to the MediaFile entity by ids.

func (*MovieMutation) AddRuntime

func (m *MovieMutation) AddRuntime(u int16)

AddRuntime adds u to the "runtime" field.

func (*MovieMutation) AddTmdbID

func (m *MovieMutation) AddTmdbID(u int32)

AddTmdbID adds u to the "tmdb_id" field.

func (*MovieMutation) AddYear

func (m *MovieMutation) AddYear(u int16)

AddYear adds u to the "year" field.

func (*MovieMutation) AddedEdges

func (m *MovieMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MovieMutation) AddedField

func (m *MovieMutation) 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 (*MovieMutation) AddedFields

func (m *MovieMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MovieMutation) AddedGrabFailures

func (m *MovieMutation) AddedGrabFailures() (r int8, exists bool)

AddedGrabFailures returns the value that was added to the "grab_failures" field in this mutation.

func (*MovieMutation) AddedIDs

func (m *MovieMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MovieMutation) AddedRuntime

func (m *MovieMutation) AddedRuntime() (r int16, exists bool)

AddedRuntime returns the value that was added to the "runtime" field in this mutation.

func (*MovieMutation) AddedTmdbID

func (m *MovieMutation) AddedTmdbID() (r int32, exists bool)

AddedTmdbID returns the value that was added to the "tmdb_id" field in this mutation.

func (*MovieMutation) AddedYear

func (m *MovieMutation) AddedYear() (r int16, exists bool)

AddedYear returns the value that was added to the "year" field in this mutation.

func (*MovieMutation) ClearDigitalReleaseDate

func (m *MovieMutation) ClearDigitalReleaseDate()

ClearDigitalReleaseDate clears the value of the "digital_release_date" field.

func (*MovieMutation) ClearDownloadRecords

func (m *MovieMutation) ClearDownloadRecords()

ClearDownloadRecords clears the "download_records" edge to the DownloadRecord entity.

func (*MovieMutation) ClearEdge

func (m *MovieMutation) 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 (*MovieMutation) ClearEvents

func (m *MovieMutation) ClearEvents()

ClearEvents clears the "events" edge to the MovieEvent entity.

func (*MovieMutation) ClearFailureReason

func (m *MovieMutation) ClearFailureReason()

ClearFailureReason clears the value of the "failure_reason" field.

func (*MovieMutation) ClearField

func (m *MovieMutation) 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 (*MovieMutation) ClearLastSearchAt

func (m *MovieMutation) ClearLastSearchAt()

ClearLastSearchAt clears the value of the "last_search_at" field.

func (*MovieMutation) ClearMediaFiles

func (m *MovieMutation) ClearMediaFiles()

ClearMediaFiles clears the "media_files" edge to the MediaFile entity.

func (*MovieMutation) ClearOverview

func (m *MovieMutation) ClearOverview()

ClearOverview clears the value of the "overview" field.

func (*MovieMutation) ClearQualityProfile

func (m *MovieMutation) ClearQualityProfile()

ClearQualityProfile clears the value of the "quality_profile" field.

func (*MovieMutation) ClearRuntime

func (m *MovieMutation) ClearRuntime()

ClearRuntime clears the value of the "runtime" field.

func (*MovieMutation) ClearedEdges

func (m *MovieMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MovieMutation) ClearedFields

func (m *MovieMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MovieMutation) Client

func (m MovieMutation) 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 (*MovieMutation) CreateTime

func (m *MovieMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*MovieMutation) DigitalReleaseDate

func (m *MovieMutation) DigitalReleaseDate() (r time.Time, exists bool)

DigitalReleaseDate returns the value of the "digital_release_date" field in the mutation.

func (*MovieMutation) DigitalReleaseDateCleared

func (m *MovieMutation) DigitalReleaseDateCleared() bool

DigitalReleaseDateCleared returns if the "digital_release_date" field was cleared in this mutation.

func (*MovieMutation) DownloadRecordsCleared

func (m *MovieMutation) DownloadRecordsCleared() bool

DownloadRecordsCleared reports if the "download_records" edge to the DownloadRecord entity was cleared.

func (*MovieMutation) DownloadRecordsIDs

func (m *MovieMutation) DownloadRecordsIDs() (ids []uint32)

DownloadRecordsIDs returns the "download_records" edge IDs in the mutation.

func (*MovieMutation) EdgeCleared

func (m *MovieMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MovieMutation) EventsCleared

func (m *MovieMutation) EventsCleared() bool

EventsCleared reports if the "events" edge to the MovieEvent entity was cleared.

func (*MovieMutation) EventsIDs

func (m *MovieMutation) EventsIDs() (ids []uint32)

EventsIDs returns the "events" edge IDs in the mutation.

func (*MovieMutation) FailureReason

func (m *MovieMutation) FailureReason() (r string, exists bool)

FailureReason returns the value of the "failure_reason" field in the mutation.

func (*MovieMutation) FailureReasonCleared

func (m *MovieMutation) FailureReasonCleared() bool

FailureReasonCleared returns if the "failure_reason" field was cleared in this mutation.

func (*MovieMutation) Field

func (m *MovieMutation) 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 (*MovieMutation) FieldCleared

func (m *MovieMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MovieMutation) Fields

func (m *MovieMutation) 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 (*MovieMutation) GrabFailures

func (m *MovieMutation) GrabFailures() (r uint8, exists bool)

GrabFailures returns the value of the "grab_failures" field in the mutation.

func (*MovieMutation) ID

func (m *MovieMutation) ID() (id uint32, 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 (*MovieMutation) IDs

func (m *MovieMutation) IDs(ctx context.Context) ([]uint32, 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 (*MovieMutation) LastSearchAt

func (m *MovieMutation) LastSearchAt() (r time.Time, exists bool)

LastSearchAt returns the value of the "last_search_at" field in the mutation.

func (*MovieMutation) LastSearchAtCleared

func (m *MovieMutation) LastSearchAtCleared() bool

LastSearchAtCleared returns if the "last_search_at" field was cleared in this mutation.

func (*MovieMutation) MediaFilesCleared

func (m *MovieMutation) MediaFilesCleared() bool

MediaFilesCleared reports if the "media_files" edge to the MediaFile entity was cleared.

func (*MovieMutation) MediaFilesIDs

func (m *MovieMutation) MediaFilesIDs() (ids []uint32)

MediaFilesIDs returns the "media_files" edge IDs in the mutation.

func (*MovieMutation) Monitored

func (m *MovieMutation) Monitored() (r bool, exists bool)

Monitored returns the value of the "monitored" field in the mutation.

func (*MovieMutation) OldCreateTime

func (m *MovieMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldDigitalReleaseDate

func (m *MovieMutation) OldDigitalReleaseDate(ctx context.Context) (v *time.Time, err error)

OldDigitalReleaseDate returns the old "digital_release_date" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldFailureReason

func (m *MovieMutation) OldFailureReason(ctx context.Context) (v string, err error)

OldFailureReason returns the old "failure_reason" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldField

func (m *MovieMutation) 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 (*MovieMutation) OldGrabFailures

func (m *MovieMutation) OldGrabFailures(ctx context.Context) (v uint8, err error)

OldGrabFailures returns the old "grab_failures" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldLastSearchAt

func (m *MovieMutation) OldLastSearchAt(ctx context.Context) (v *time.Time, err error)

OldLastSearchAt returns the old "last_search_at" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldMonitored

func (m *MovieMutation) OldMonitored(ctx context.Context) (v bool, err error)

OldMonitored returns the old "monitored" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldOriginalTitle

func (m *MovieMutation) OldOriginalTitle(ctx context.Context) (v string, err error)

OldOriginalTitle returns the old "original_title" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldOverview

func (m *MovieMutation) OldOverview(ctx context.Context) (v string, err error)

OldOverview returns the old "overview" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldQualityProfile

func (m *MovieMutation) OldQualityProfile(ctx context.Context) (v string, err error)

OldQualityProfile returns the old "quality_profile" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldRuntime

func (m *MovieMutation) OldRuntime(ctx context.Context) (v uint16, err error)

OldRuntime returns the old "runtime" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldStatus

func (m *MovieMutation) OldStatus(ctx context.Context) (v movie.Status, err error)

OldStatus returns the old "status" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldTitle

func (m *MovieMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldTmdbID

func (m *MovieMutation) OldTmdbID(ctx context.Context) (v uint32, err error)

OldTmdbID returns the old "tmdb_id" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldUpdateTime

func (m *MovieMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) OldYear

func (m *MovieMutation) OldYear(ctx context.Context) (v uint16, err error)

OldYear returns the old "year" field's value of the Movie entity. If the Movie object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MovieMutation) Op

func (m *MovieMutation) Op() Op

Op returns the operation name.

func (*MovieMutation) OriginalTitle

func (m *MovieMutation) OriginalTitle() (r string, exists bool)

OriginalTitle returns the value of the "original_title" field in the mutation.

func (*MovieMutation) Overview

func (m *MovieMutation) Overview() (r string, exists bool)

Overview returns the value of the "overview" field in the mutation.

func (*MovieMutation) OverviewCleared

func (m *MovieMutation) OverviewCleared() bool

OverviewCleared returns if the "overview" field was cleared in this mutation.

func (*MovieMutation) QualityProfile

func (m *MovieMutation) QualityProfile() (r string, exists bool)

QualityProfile returns the value of the "quality_profile" field in the mutation.

func (*MovieMutation) QualityProfileCleared

func (m *MovieMutation) QualityProfileCleared() bool

QualityProfileCleared returns if the "quality_profile" field was cleared in this mutation.

func (*MovieMutation) RemoveDownloadRecordIDs

func (m *MovieMutation) RemoveDownloadRecordIDs(ids ...uint32)

RemoveDownloadRecordIDs removes the "download_records" edge to the DownloadRecord entity by IDs.

func (*MovieMutation) RemoveEventIDs

func (m *MovieMutation) RemoveEventIDs(ids ...uint32)

RemoveEventIDs removes the "events" edge to the MovieEvent entity by IDs.

func (*MovieMutation) RemoveMediaFileIDs

func (m *MovieMutation) RemoveMediaFileIDs(ids ...uint32)

RemoveMediaFileIDs removes the "media_files" edge to the MediaFile entity by IDs.

func (*MovieMutation) RemovedDownloadRecordsIDs

func (m *MovieMutation) RemovedDownloadRecordsIDs() (ids []uint32)

RemovedDownloadRecords returns the removed IDs of the "download_records" edge to the DownloadRecord entity.

func (*MovieMutation) RemovedEdges

func (m *MovieMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MovieMutation) RemovedEventsIDs

func (m *MovieMutation) RemovedEventsIDs() (ids []uint32)

RemovedEvents returns the removed IDs of the "events" edge to the MovieEvent entity.

func (*MovieMutation) RemovedIDs

func (m *MovieMutation) 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 (*MovieMutation) RemovedMediaFilesIDs

func (m *MovieMutation) RemovedMediaFilesIDs() (ids []uint32)

RemovedMediaFiles returns the removed IDs of the "media_files" edge to the MediaFile entity.

func (*MovieMutation) ResetCreateTime

func (m *MovieMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*MovieMutation) ResetDigitalReleaseDate

func (m *MovieMutation) ResetDigitalReleaseDate()

ResetDigitalReleaseDate resets all changes to the "digital_release_date" field.

func (*MovieMutation) ResetDownloadRecords

func (m *MovieMutation) ResetDownloadRecords()

ResetDownloadRecords resets all changes to the "download_records" edge.

func (*MovieMutation) ResetEdge

func (m *MovieMutation) 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 (*MovieMutation) ResetEvents

func (m *MovieMutation) ResetEvents()

ResetEvents resets all changes to the "events" edge.

func (*MovieMutation) ResetFailureReason

func (m *MovieMutation) ResetFailureReason()

ResetFailureReason resets all changes to the "failure_reason" field.

func (*MovieMutation) ResetField

func (m *MovieMutation) 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 (*MovieMutation) ResetGrabFailures

func (m *MovieMutation) ResetGrabFailures()

ResetGrabFailures resets all changes to the "grab_failures" field.

func (*MovieMutation) ResetLastSearchAt

func (m *MovieMutation) ResetLastSearchAt()

ResetLastSearchAt resets all changes to the "last_search_at" field.

func (*MovieMutation) ResetMediaFiles

func (m *MovieMutation) ResetMediaFiles()

ResetMediaFiles resets all changes to the "media_files" edge.

func (*MovieMutation) ResetMonitored

func (m *MovieMutation) ResetMonitored()

ResetMonitored resets all changes to the "monitored" field.

func (*MovieMutation) ResetOriginalTitle

func (m *MovieMutation) ResetOriginalTitle()

ResetOriginalTitle resets all changes to the "original_title" field.

func (*MovieMutation) ResetOverview

func (m *MovieMutation) ResetOverview()

ResetOverview resets all changes to the "overview" field.

func (*MovieMutation) ResetQualityProfile

func (m *MovieMutation) ResetQualityProfile()

ResetQualityProfile resets all changes to the "quality_profile" field.

func (*MovieMutation) ResetRuntime

func (m *MovieMutation) ResetRuntime()

ResetRuntime resets all changes to the "runtime" field.

func (*MovieMutation) ResetStatus

func (m *MovieMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*MovieMutation) ResetTitle

func (m *MovieMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*MovieMutation) ResetTmdbID

func (m *MovieMutation) ResetTmdbID()

ResetTmdbID resets all changes to the "tmdb_id" field.

func (*MovieMutation) ResetUpdateTime

func (m *MovieMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*MovieMutation) ResetYear

func (m *MovieMutation) ResetYear()

ResetYear resets all changes to the "year" field.

func (*MovieMutation) Runtime

func (m *MovieMutation) Runtime() (r uint16, exists bool)

Runtime returns the value of the "runtime" field in the mutation.

func (*MovieMutation) RuntimeCleared

func (m *MovieMutation) RuntimeCleared() bool

RuntimeCleared returns if the "runtime" field was cleared in this mutation.

func (*MovieMutation) SetCreateTime

func (m *MovieMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*MovieMutation) SetDigitalReleaseDate

func (m *MovieMutation) SetDigitalReleaseDate(t time.Time)

SetDigitalReleaseDate sets the "digital_release_date" field.

func (*MovieMutation) SetFailureReason

func (m *MovieMutation) SetFailureReason(s string)

SetFailureReason sets the "failure_reason" field.

func (*MovieMutation) SetField

func (m *MovieMutation) 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 (*MovieMutation) SetGrabFailures

func (m *MovieMutation) SetGrabFailures(u uint8)

SetGrabFailures sets the "grab_failures" field.

func (*MovieMutation) SetID

func (m *MovieMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Movie entities.

func (*MovieMutation) SetLastSearchAt

func (m *MovieMutation) SetLastSearchAt(t time.Time)

SetLastSearchAt sets the "last_search_at" field.

func (*MovieMutation) SetMonitored

func (m *MovieMutation) SetMonitored(b bool)

SetMonitored sets the "monitored" field.

func (*MovieMutation) SetOp

func (m *MovieMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MovieMutation) SetOriginalTitle

func (m *MovieMutation) SetOriginalTitle(s string)

SetOriginalTitle sets the "original_title" field.

func (*MovieMutation) SetOverview

func (m *MovieMutation) SetOverview(s string)

SetOverview sets the "overview" field.

func (*MovieMutation) SetQualityProfile

func (m *MovieMutation) SetQualityProfile(s string)

SetQualityProfile sets the "quality_profile" field.

func (*MovieMutation) SetRuntime

func (m *MovieMutation) SetRuntime(u uint16)

SetRuntime sets the "runtime" field.

func (*MovieMutation) SetStatus

func (m *MovieMutation) SetStatus(value movie.Status)

SetStatus sets the "status" field.

func (*MovieMutation) SetTitle

func (m *MovieMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*MovieMutation) SetTmdbID

func (m *MovieMutation) SetTmdbID(u uint32)

SetTmdbID sets the "tmdb_id" field.

func (*MovieMutation) SetUpdateTime

func (m *MovieMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*MovieMutation) SetYear

func (m *MovieMutation) SetYear(u uint16)

SetYear sets the "year" field.

func (*MovieMutation) Status

func (m *MovieMutation) Status() (r movie.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*MovieMutation) Title

func (m *MovieMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (*MovieMutation) TmdbID

func (m *MovieMutation) TmdbID() (r uint32, exists bool)

TmdbID returns the value of the "tmdb_id" field in the mutation.

func (MovieMutation) Tx

func (m MovieMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MovieMutation) Type

func (m *MovieMutation) Type() string

Type returns the node type of this mutation (Movie).

func (*MovieMutation) UpdateTime

func (m *MovieMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*MovieMutation) Where

func (m *MovieMutation) Where(ps ...predicate.Movie)

Where appends a list predicates to the MovieMutation builder.

func (*MovieMutation) WhereP

func (m *MovieMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MovieMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*MovieMutation) Year

func (m *MovieMutation) Year() (r uint16, exists bool)

Year returns the value of the "year" field in the mutation.

type MovieQuery

type MovieQuery struct {
	// contains filtered or unexported fields
}

MovieQuery is the builder for querying Movie entities.

func (*MovieQuery) Aggregate

func (_q *MovieQuery) Aggregate(fns ...AggregateFunc) *MovieSelect

Aggregate returns a MovieSelect configured with the given aggregations.

func (*MovieQuery) All

func (_q *MovieQuery) All(ctx context.Context) ([]*Movie, error)

All executes the query and returns a list of Movies.

func (*MovieQuery) AllX

func (_q *MovieQuery) AllX(ctx context.Context) []*Movie

AllX is like All, but panics if an error occurs.

func (*MovieQuery) Clone

func (_q *MovieQuery) Clone() *MovieQuery

Clone returns a duplicate of the MovieQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MovieQuery) Count

func (_q *MovieQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MovieQuery) CountX

func (_q *MovieQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MovieQuery) Exist

func (_q *MovieQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MovieQuery) ExistX

func (_q *MovieQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MovieQuery) First

func (_q *MovieQuery) First(ctx context.Context) (*Movie, error)

First returns the first Movie entity from the query. Returns a *NotFoundError when no Movie was found.

func (*MovieQuery) FirstID

func (_q *MovieQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first Movie ID from the query. Returns a *NotFoundError when no Movie ID was found.

func (*MovieQuery) FirstIDX

func (_q *MovieQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*MovieQuery) FirstX

func (_q *MovieQuery) FirstX(ctx context.Context) *Movie

FirstX is like First, but panics if an error occurs.

func (*MovieQuery) GroupBy

func (_q *MovieQuery) GroupBy(field string, fields ...string) *MovieGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Movie.Query().
	GroupBy(movie.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MovieQuery) IDs

func (_q *MovieQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of Movie IDs.

func (*MovieQuery) IDsX

func (_q *MovieQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*MovieQuery) Limit

func (_q *MovieQuery) Limit(limit int) *MovieQuery

Limit the number of records to be returned by this query.

func (*MovieQuery) Offset

func (_q *MovieQuery) Offset(offset int) *MovieQuery

Offset to start from.

func (*MovieQuery) Only

func (_q *MovieQuery) Only(ctx context.Context) (*Movie, error)

Only returns a single Movie entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Movie entity is found. Returns a *NotFoundError when no Movie entities are found.

func (*MovieQuery) OnlyID

func (_q *MovieQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only Movie ID in the query. Returns a *NotSingularError when more than one Movie ID is found. Returns a *NotFoundError when no entities are found.

func (*MovieQuery) OnlyIDX

func (_q *MovieQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MovieQuery) OnlyX

func (_q *MovieQuery) OnlyX(ctx context.Context) *Movie

OnlyX is like Only, but panics if an error occurs.

func (*MovieQuery) Order

func (_q *MovieQuery) Order(o ...movie.OrderOption) *MovieQuery

Order specifies how the records should be ordered.

func (*MovieQuery) QueryDownloadRecords

func (_q *MovieQuery) QueryDownloadRecords() *DownloadRecordQuery

QueryDownloadRecords chains the current query on the "download_records" edge.

func (*MovieQuery) QueryEvents

func (_q *MovieQuery) QueryEvents() *MovieEventQuery

QueryEvents chains the current query on the "events" edge.

func (*MovieQuery) QueryMediaFiles

func (_q *MovieQuery) QueryMediaFiles() *MediaFileQuery

QueryMediaFiles chains the current query on the "media_files" edge.

func (*MovieQuery) Select

func (_q *MovieQuery) Select(fields ...string) *MovieSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Movie.Query().
	Select(movie.FieldCreateTime).
	Scan(ctx, &v)

func (*MovieQuery) Unique

func (_q *MovieQuery) Unique(unique bool) *MovieQuery

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 (*MovieQuery) Where

func (_q *MovieQuery) Where(ps ...predicate.Movie) *MovieQuery

Where adds a new predicate for the MovieQuery builder.

func (*MovieQuery) WithDownloadRecords

func (_q *MovieQuery) WithDownloadRecords(opts ...func(*DownloadRecordQuery)) *MovieQuery

WithDownloadRecords tells the query-builder to eager-load the nodes that are connected to the "download_records" edge. The optional arguments are used to configure the query builder of the edge.

func (*MovieQuery) WithEvents

func (_q *MovieQuery) WithEvents(opts ...func(*MovieEventQuery)) *MovieQuery

WithEvents tells the query-builder to eager-load the nodes that are connected to the "events" edge. The optional arguments are used to configure the query builder of the edge.

func (*MovieQuery) WithMediaFiles

func (_q *MovieQuery) WithMediaFiles(opts ...func(*MediaFileQuery)) *MovieQuery

WithMediaFiles tells the query-builder to eager-load the nodes that are connected to the "media_files" edge. The optional arguments are used to configure the query builder of the edge.

type MovieSelect

type MovieSelect struct {
	*MovieQuery
	// contains filtered or unexported fields
}

MovieSelect is the builder for selecting fields of Movie entities.

func (*MovieSelect) Aggregate

func (_s *MovieSelect) Aggregate(fns ...AggregateFunc) *MovieSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MovieSelect) Bool

func (s *MovieSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MovieSelect) BoolX

func (s *MovieSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MovieSelect) Bools

func (s *MovieSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MovieSelect) BoolsX

func (s *MovieSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MovieSelect) Float64

func (s *MovieSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MovieSelect) Float64X

func (s *MovieSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MovieSelect) Float64s

func (s *MovieSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MovieSelect) Float64sX

func (s *MovieSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MovieSelect) Int

func (s *MovieSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MovieSelect) IntX

func (s *MovieSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MovieSelect) Ints

func (s *MovieSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MovieSelect) IntsX

func (s *MovieSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MovieSelect) Scan

func (_s *MovieSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MovieSelect) ScanX

func (s *MovieSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MovieSelect) String

func (s *MovieSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MovieSelect) StringX

func (s *MovieSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MovieSelect) Strings

func (s *MovieSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MovieSelect) StringsX

func (s *MovieSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MovieUpdate

type MovieUpdate struct {
	// contains filtered or unexported fields
}

MovieUpdate is the builder for updating Movie entities.

func (*MovieUpdate) AddDownloadRecordIDs

func (_u *MovieUpdate) AddDownloadRecordIDs(ids ...uint32) *MovieUpdate

AddDownloadRecordIDs adds the "download_records" edge to the DownloadRecord entity by IDs.

func (*MovieUpdate) AddDownloadRecords

func (_u *MovieUpdate) AddDownloadRecords(v ...*DownloadRecord) *MovieUpdate

AddDownloadRecords adds the "download_records" edges to the DownloadRecord entity.

func (*MovieUpdate) AddEventIDs

func (_u *MovieUpdate) AddEventIDs(ids ...uint32) *MovieUpdate

AddEventIDs adds the "events" edge to the MovieEvent entity by IDs.

func (*MovieUpdate) AddEvents

func (_u *MovieUpdate) AddEvents(v ...*MovieEvent) *MovieUpdate

AddEvents adds the "events" edges to the MovieEvent entity.

func (*MovieUpdate) AddGrabFailures

func (_u *MovieUpdate) AddGrabFailures(v int8) *MovieUpdate

AddGrabFailures adds value to the "grab_failures" field.

func (*MovieUpdate) AddMediaFileIDs

func (_u *MovieUpdate) AddMediaFileIDs(ids ...uint32) *MovieUpdate

AddMediaFileIDs adds the "media_files" edge to the MediaFile entity by IDs.

func (*MovieUpdate) AddMediaFiles

func (_u *MovieUpdate) AddMediaFiles(v ...*MediaFile) *MovieUpdate

AddMediaFiles adds the "media_files" edges to the MediaFile entity.

func (*MovieUpdate) AddRuntime

func (_u *MovieUpdate) AddRuntime(v int16) *MovieUpdate

AddRuntime adds value to the "runtime" field.

func (*MovieUpdate) AddTmdbID

func (_u *MovieUpdate) AddTmdbID(v int32) *MovieUpdate

AddTmdbID adds value to the "tmdb_id" field.

func (*MovieUpdate) AddYear

func (_u *MovieUpdate) AddYear(v int16) *MovieUpdate

AddYear adds value to the "year" field.

func (*MovieUpdate) ClearDigitalReleaseDate

func (_u *MovieUpdate) ClearDigitalReleaseDate() *MovieUpdate

ClearDigitalReleaseDate clears the value of the "digital_release_date" field.

func (*MovieUpdate) ClearDownloadRecords

func (_u *MovieUpdate) ClearDownloadRecords() *MovieUpdate

ClearDownloadRecords clears all "download_records" edges to the DownloadRecord entity.

func (*MovieUpdate) ClearEvents

func (_u *MovieUpdate) ClearEvents() *MovieUpdate

ClearEvents clears all "events" edges to the MovieEvent entity.

func (*MovieUpdate) ClearFailureReason

func (_u *MovieUpdate) ClearFailureReason() *MovieUpdate

ClearFailureReason clears the value of the "failure_reason" field.

func (*MovieUpdate) ClearLastSearchAt

func (_u *MovieUpdate) ClearLastSearchAt() *MovieUpdate

ClearLastSearchAt clears the value of the "last_search_at" field.

func (*MovieUpdate) ClearMediaFiles

func (_u *MovieUpdate) ClearMediaFiles() *MovieUpdate

ClearMediaFiles clears all "media_files" edges to the MediaFile entity.

func (*MovieUpdate) ClearOverview

func (_u *MovieUpdate) ClearOverview() *MovieUpdate

ClearOverview clears the value of the "overview" field.

func (*MovieUpdate) ClearQualityProfile

func (_u *MovieUpdate) ClearQualityProfile() *MovieUpdate

ClearQualityProfile clears the value of the "quality_profile" field.

func (*MovieUpdate) ClearRuntime

func (_u *MovieUpdate) ClearRuntime() *MovieUpdate

ClearRuntime clears the value of the "runtime" field.

func (*MovieUpdate) Exec

func (_u *MovieUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MovieUpdate) ExecX

func (_u *MovieUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MovieUpdate) Mutation

func (_u *MovieUpdate) Mutation() *MovieMutation

Mutation returns the MovieMutation object of the builder.

func (*MovieUpdate) RemoveDownloadRecordIDs

func (_u *MovieUpdate) RemoveDownloadRecordIDs(ids ...uint32) *MovieUpdate

RemoveDownloadRecordIDs removes the "download_records" edge to DownloadRecord entities by IDs.

func (*MovieUpdate) RemoveDownloadRecords

func (_u *MovieUpdate) RemoveDownloadRecords(v ...*DownloadRecord) *MovieUpdate

RemoveDownloadRecords removes "download_records" edges to DownloadRecord entities.

func (*MovieUpdate) RemoveEventIDs

func (_u *MovieUpdate) RemoveEventIDs(ids ...uint32) *MovieUpdate

RemoveEventIDs removes the "events" edge to MovieEvent entities by IDs.

func (*MovieUpdate) RemoveEvents

func (_u *MovieUpdate) RemoveEvents(v ...*MovieEvent) *MovieUpdate

RemoveEvents removes "events" edges to MovieEvent entities.

func (*MovieUpdate) RemoveMediaFileIDs

func (_u *MovieUpdate) RemoveMediaFileIDs(ids ...uint32) *MovieUpdate

RemoveMediaFileIDs removes the "media_files" edge to MediaFile entities by IDs.

func (*MovieUpdate) RemoveMediaFiles

func (_u *MovieUpdate) RemoveMediaFiles(v ...*MediaFile) *MovieUpdate

RemoveMediaFiles removes "media_files" edges to MediaFile entities.

func (*MovieUpdate) Save

func (_u *MovieUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MovieUpdate) SaveX

func (_u *MovieUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MovieUpdate) SetDigitalReleaseDate

func (_u *MovieUpdate) SetDigitalReleaseDate(v time.Time) *MovieUpdate

SetDigitalReleaseDate sets the "digital_release_date" field.

func (*MovieUpdate) SetFailureReason

func (_u *MovieUpdate) SetFailureReason(v string) *MovieUpdate

SetFailureReason sets the "failure_reason" field.

func (*MovieUpdate) SetGrabFailures

func (_u *MovieUpdate) SetGrabFailures(v uint8) *MovieUpdate

SetGrabFailures sets the "grab_failures" field.

func (*MovieUpdate) SetLastSearchAt

func (_u *MovieUpdate) SetLastSearchAt(v time.Time) *MovieUpdate

SetLastSearchAt sets the "last_search_at" field.

func (*MovieUpdate) SetMonitored

func (_u *MovieUpdate) SetMonitored(v bool) *MovieUpdate

SetMonitored sets the "monitored" field.

func (*MovieUpdate) SetNillableDigitalReleaseDate

func (_u *MovieUpdate) SetNillableDigitalReleaseDate(v *time.Time) *MovieUpdate

SetNillableDigitalReleaseDate sets the "digital_release_date" field if the given value is not nil.

func (*MovieUpdate) SetNillableFailureReason

func (_u *MovieUpdate) SetNillableFailureReason(v *string) *MovieUpdate

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*MovieUpdate) SetNillableGrabFailures

func (_u *MovieUpdate) SetNillableGrabFailures(v *uint8) *MovieUpdate

SetNillableGrabFailures sets the "grab_failures" field if the given value is not nil.

func (*MovieUpdate) SetNillableLastSearchAt

func (_u *MovieUpdate) SetNillableLastSearchAt(v *time.Time) *MovieUpdate

SetNillableLastSearchAt sets the "last_search_at" field if the given value is not nil.

func (*MovieUpdate) SetNillableMonitored

func (_u *MovieUpdate) SetNillableMonitored(v *bool) *MovieUpdate

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*MovieUpdate) SetNillableOriginalTitle

func (_u *MovieUpdate) SetNillableOriginalTitle(v *string) *MovieUpdate

SetNillableOriginalTitle sets the "original_title" field if the given value is not nil.

func (*MovieUpdate) SetNillableOverview

func (_u *MovieUpdate) SetNillableOverview(v *string) *MovieUpdate

SetNillableOverview sets the "overview" field if the given value is not nil.

func (*MovieUpdate) SetNillableQualityProfile

func (_u *MovieUpdate) SetNillableQualityProfile(v *string) *MovieUpdate

SetNillableQualityProfile sets the "quality_profile" field if the given value is not nil.

func (*MovieUpdate) SetNillableRuntime

func (_u *MovieUpdate) SetNillableRuntime(v *uint16) *MovieUpdate

SetNillableRuntime sets the "runtime" field if the given value is not nil.

func (*MovieUpdate) SetNillableStatus

func (_u *MovieUpdate) SetNillableStatus(v *movie.Status) *MovieUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MovieUpdate) SetNillableTitle

func (_u *MovieUpdate) SetNillableTitle(v *string) *MovieUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*MovieUpdate) SetNillableTmdbID

func (_u *MovieUpdate) SetNillableTmdbID(v *uint32) *MovieUpdate

SetNillableTmdbID sets the "tmdb_id" field if the given value is not nil.

func (*MovieUpdate) SetNillableYear

func (_u *MovieUpdate) SetNillableYear(v *uint16) *MovieUpdate

SetNillableYear sets the "year" field if the given value is not nil.

func (*MovieUpdate) SetOriginalTitle

func (_u *MovieUpdate) SetOriginalTitle(v string) *MovieUpdate

SetOriginalTitle sets the "original_title" field.

func (*MovieUpdate) SetOverview

func (_u *MovieUpdate) SetOverview(v string) *MovieUpdate

SetOverview sets the "overview" field.

func (*MovieUpdate) SetQualityProfile

func (_u *MovieUpdate) SetQualityProfile(v string) *MovieUpdate

SetQualityProfile sets the "quality_profile" field.

func (*MovieUpdate) SetRuntime

func (_u *MovieUpdate) SetRuntime(v uint16) *MovieUpdate

SetRuntime sets the "runtime" field.

func (*MovieUpdate) SetStatus

func (_u *MovieUpdate) SetStatus(v movie.Status) *MovieUpdate

SetStatus sets the "status" field.

func (*MovieUpdate) SetTitle

func (_u *MovieUpdate) SetTitle(v string) *MovieUpdate

SetTitle sets the "title" field.

func (*MovieUpdate) SetTmdbID

func (_u *MovieUpdate) SetTmdbID(v uint32) *MovieUpdate

SetTmdbID sets the "tmdb_id" field.

func (*MovieUpdate) SetUpdateTime

func (_u *MovieUpdate) SetUpdateTime(v time.Time) *MovieUpdate

SetUpdateTime sets the "update_time" field.

func (*MovieUpdate) SetYear

func (_u *MovieUpdate) SetYear(v uint16) *MovieUpdate

SetYear sets the "year" field.

func (*MovieUpdate) Where

func (_u *MovieUpdate) Where(ps ...predicate.Movie) *MovieUpdate

Where appends a list predicates to the MovieUpdate builder.

type MovieUpdateOne

type MovieUpdateOne struct {
	// contains filtered or unexported fields
}

MovieUpdateOne is the builder for updating a single Movie entity.

func (*MovieUpdateOne) AddDownloadRecordIDs

func (_u *MovieUpdateOne) AddDownloadRecordIDs(ids ...uint32) *MovieUpdateOne

AddDownloadRecordIDs adds the "download_records" edge to the DownloadRecord entity by IDs.

func (*MovieUpdateOne) AddDownloadRecords

func (_u *MovieUpdateOne) AddDownloadRecords(v ...*DownloadRecord) *MovieUpdateOne

AddDownloadRecords adds the "download_records" edges to the DownloadRecord entity.

func (*MovieUpdateOne) AddEventIDs

func (_u *MovieUpdateOne) AddEventIDs(ids ...uint32) *MovieUpdateOne

AddEventIDs adds the "events" edge to the MovieEvent entity by IDs.

func (*MovieUpdateOne) AddEvents

func (_u *MovieUpdateOne) AddEvents(v ...*MovieEvent) *MovieUpdateOne

AddEvents adds the "events" edges to the MovieEvent entity.

func (*MovieUpdateOne) AddGrabFailures

func (_u *MovieUpdateOne) AddGrabFailures(v int8) *MovieUpdateOne

AddGrabFailures adds value to the "grab_failures" field.

func (*MovieUpdateOne) AddMediaFileIDs

func (_u *MovieUpdateOne) AddMediaFileIDs(ids ...uint32) *MovieUpdateOne

AddMediaFileIDs adds the "media_files" edge to the MediaFile entity by IDs.

func (*MovieUpdateOne) AddMediaFiles

func (_u *MovieUpdateOne) AddMediaFiles(v ...*MediaFile) *MovieUpdateOne

AddMediaFiles adds the "media_files" edges to the MediaFile entity.

func (*MovieUpdateOne) AddRuntime

func (_u *MovieUpdateOne) AddRuntime(v int16) *MovieUpdateOne

AddRuntime adds value to the "runtime" field.

func (*MovieUpdateOne) AddTmdbID

func (_u *MovieUpdateOne) AddTmdbID(v int32) *MovieUpdateOne

AddTmdbID adds value to the "tmdb_id" field.

func (*MovieUpdateOne) AddYear

func (_u *MovieUpdateOne) AddYear(v int16) *MovieUpdateOne

AddYear adds value to the "year" field.

func (*MovieUpdateOne) ClearDigitalReleaseDate

func (_u *MovieUpdateOne) ClearDigitalReleaseDate() *MovieUpdateOne

ClearDigitalReleaseDate clears the value of the "digital_release_date" field.

func (*MovieUpdateOne) ClearDownloadRecords

func (_u *MovieUpdateOne) ClearDownloadRecords() *MovieUpdateOne

ClearDownloadRecords clears all "download_records" edges to the DownloadRecord entity.

func (*MovieUpdateOne) ClearEvents

func (_u *MovieUpdateOne) ClearEvents() *MovieUpdateOne

ClearEvents clears all "events" edges to the MovieEvent entity.

func (*MovieUpdateOne) ClearFailureReason

func (_u *MovieUpdateOne) ClearFailureReason() *MovieUpdateOne

ClearFailureReason clears the value of the "failure_reason" field.

func (*MovieUpdateOne) ClearLastSearchAt

func (_u *MovieUpdateOne) ClearLastSearchAt() *MovieUpdateOne

ClearLastSearchAt clears the value of the "last_search_at" field.

func (*MovieUpdateOne) ClearMediaFiles

func (_u *MovieUpdateOne) ClearMediaFiles() *MovieUpdateOne

ClearMediaFiles clears all "media_files" edges to the MediaFile entity.

func (*MovieUpdateOne) ClearOverview

func (_u *MovieUpdateOne) ClearOverview() *MovieUpdateOne

ClearOverview clears the value of the "overview" field.

func (*MovieUpdateOne) ClearQualityProfile

func (_u *MovieUpdateOne) ClearQualityProfile() *MovieUpdateOne

ClearQualityProfile clears the value of the "quality_profile" field.

func (*MovieUpdateOne) ClearRuntime

func (_u *MovieUpdateOne) ClearRuntime() *MovieUpdateOne

ClearRuntime clears the value of the "runtime" field.

func (*MovieUpdateOne) Exec

func (_u *MovieUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MovieUpdateOne) ExecX

func (_u *MovieUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MovieUpdateOne) Mutation

func (_u *MovieUpdateOne) Mutation() *MovieMutation

Mutation returns the MovieMutation object of the builder.

func (*MovieUpdateOne) RemoveDownloadRecordIDs

func (_u *MovieUpdateOne) RemoveDownloadRecordIDs(ids ...uint32) *MovieUpdateOne

RemoveDownloadRecordIDs removes the "download_records" edge to DownloadRecord entities by IDs.

func (*MovieUpdateOne) RemoveDownloadRecords

func (_u *MovieUpdateOne) RemoveDownloadRecords(v ...*DownloadRecord) *MovieUpdateOne

RemoveDownloadRecords removes "download_records" edges to DownloadRecord entities.

func (*MovieUpdateOne) RemoveEventIDs

func (_u *MovieUpdateOne) RemoveEventIDs(ids ...uint32) *MovieUpdateOne

RemoveEventIDs removes the "events" edge to MovieEvent entities by IDs.

func (*MovieUpdateOne) RemoveEvents

func (_u *MovieUpdateOne) RemoveEvents(v ...*MovieEvent) *MovieUpdateOne

RemoveEvents removes "events" edges to MovieEvent entities.

func (*MovieUpdateOne) RemoveMediaFileIDs

func (_u *MovieUpdateOne) RemoveMediaFileIDs(ids ...uint32) *MovieUpdateOne

RemoveMediaFileIDs removes the "media_files" edge to MediaFile entities by IDs.

func (*MovieUpdateOne) RemoveMediaFiles

func (_u *MovieUpdateOne) RemoveMediaFiles(v ...*MediaFile) *MovieUpdateOne

RemoveMediaFiles removes "media_files" edges to MediaFile entities.

func (*MovieUpdateOne) Save

func (_u *MovieUpdateOne) Save(ctx context.Context) (*Movie, error)

Save executes the query and returns the updated Movie entity.

func (*MovieUpdateOne) SaveX

func (_u *MovieUpdateOne) SaveX(ctx context.Context) *Movie

SaveX is like Save, but panics if an error occurs.

func (*MovieUpdateOne) Select

func (_u *MovieUpdateOne) Select(field string, fields ...string) *MovieUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MovieUpdateOne) SetDigitalReleaseDate

func (_u *MovieUpdateOne) SetDigitalReleaseDate(v time.Time) *MovieUpdateOne

SetDigitalReleaseDate sets the "digital_release_date" field.

func (*MovieUpdateOne) SetFailureReason

func (_u *MovieUpdateOne) SetFailureReason(v string) *MovieUpdateOne

SetFailureReason sets the "failure_reason" field.

func (*MovieUpdateOne) SetGrabFailures

func (_u *MovieUpdateOne) SetGrabFailures(v uint8) *MovieUpdateOne

SetGrabFailures sets the "grab_failures" field.

func (*MovieUpdateOne) SetLastSearchAt

func (_u *MovieUpdateOne) SetLastSearchAt(v time.Time) *MovieUpdateOne

SetLastSearchAt sets the "last_search_at" field.

func (*MovieUpdateOne) SetMonitored

func (_u *MovieUpdateOne) SetMonitored(v bool) *MovieUpdateOne

SetMonitored sets the "monitored" field.

func (*MovieUpdateOne) SetNillableDigitalReleaseDate

func (_u *MovieUpdateOne) SetNillableDigitalReleaseDate(v *time.Time) *MovieUpdateOne

SetNillableDigitalReleaseDate sets the "digital_release_date" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableFailureReason

func (_u *MovieUpdateOne) SetNillableFailureReason(v *string) *MovieUpdateOne

SetNillableFailureReason sets the "failure_reason" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableGrabFailures

func (_u *MovieUpdateOne) SetNillableGrabFailures(v *uint8) *MovieUpdateOne

SetNillableGrabFailures sets the "grab_failures" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableLastSearchAt

func (_u *MovieUpdateOne) SetNillableLastSearchAt(v *time.Time) *MovieUpdateOne

SetNillableLastSearchAt sets the "last_search_at" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableMonitored

func (_u *MovieUpdateOne) SetNillableMonitored(v *bool) *MovieUpdateOne

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableOriginalTitle

func (_u *MovieUpdateOne) SetNillableOriginalTitle(v *string) *MovieUpdateOne

SetNillableOriginalTitle sets the "original_title" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableOverview

func (_u *MovieUpdateOne) SetNillableOverview(v *string) *MovieUpdateOne

SetNillableOverview sets the "overview" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableQualityProfile

func (_u *MovieUpdateOne) SetNillableQualityProfile(v *string) *MovieUpdateOne

SetNillableQualityProfile sets the "quality_profile" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableRuntime

func (_u *MovieUpdateOne) SetNillableRuntime(v *uint16) *MovieUpdateOne

SetNillableRuntime sets the "runtime" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableStatus

func (_u *MovieUpdateOne) SetNillableStatus(v *movie.Status) *MovieUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableTitle

func (_u *MovieUpdateOne) SetNillableTitle(v *string) *MovieUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableTmdbID

func (_u *MovieUpdateOne) SetNillableTmdbID(v *uint32) *MovieUpdateOne

SetNillableTmdbID sets the "tmdb_id" field if the given value is not nil.

func (*MovieUpdateOne) SetNillableYear

func (_u *MovieUpdateOne) SetNillableYear(v *uint16) *MovieUpdateOne

SetNillableYear sets the "year" field if the given value is not nil.

func (*MovieUpdateOne) SetOriginalTitle

func (_u *MovieUpdateOne) SetOriginalTitle(v string) *MovieUpdateOne

SetOriginalTitle sets the "original_title" field.

func (*MovieUpdateOne) SetOverview

func (_u *MovieUpdateOne) SetOverview(v string) *MovieUpdateOne

SetOverview sets the "overview" field.

func (*MovieUpdateOne) SetQualityProfile

func (_u *MovieUpdateOne) SetQualityProfile(v string) *MovieUpdateOne

SetQualityProfile sets the "quality_profile" field.

func (*MovieUpdateOne) SetRuntime

func (_u *MovieUpdateOne) SetRuntime(v uint16) *MovieUpdateOne

SetRuntime sets the "runtime" field.

func (*MovieUpdateOne) SetStatus

func (_u *MovieUpdateOne) SetStatus(v movie.Status) *MovieUpdateOne

SetStatus sets the "status" field.

func (*MovieUpdateOne) SetTitle

func (_u *MovieUpdateOne) SetTitle(v string) *MovieUpdateOne

SetTitle sets the "title" field.

func (*MovieUpdateOne) SetTmdbID

func (_u *MovieUpdateOne) SetTmdbID(v uint32) *MovieUpdateOne

SetTmdbID sets the "tmdb_id" field.

func (*MovieUpdateOne) SetUpdateTime

func (_u *MovieUpdateOne) SetUpdateTime(v time.Time) *MovieUpdateOne

SetUpdateTime sets the "update_time" field.

func (*MovieUpdateOne) SetYear

func (_u *MovieUpdateOne) SetYear(v uint16) *MovieUpdateOne

SetYear sets the "year" field.

func (*MovieUpdateOne) Where

func (_u *MovieUpdateOne) Where(ps ...predicate.Movie) *MovieUpdateOne

Where appends a list predicates to the MovieUpdate builder.

type Movies

type Movies []*Movie

Movies is a parsable slice of Movie.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

type NotLoadedError struct {
	// contains filtered or unexported fields
}

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

type NotSingularError struct {
	// contains filtered or unexported fields
}

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type OIDCIdentities

type OIDCIdentities []*OIDCIdentity

OIDCIdentities is a parsable slice of OIDCIdentity.

type OIDCIdentity

type OIDCIdentity struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Provider holds the value of the "provider" field.
	Provider string `json:"provider,omitempty"`
	// Subject holds the value of the "subject" field.
	Subject string `json:"subject,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the OIDCIdentityQuery when eager-loading is set.
	Edges OIDCIdentityEdges `json:"edges"`
	// contains filtered or unexported fields
}

OIDCIdentity is the model entity for the OIDCIdentity schema.

func (*OIDCIdentity) QueryOwner

func (_m *OIDCIdentity) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the OIDCIdentity entity.

func (*OIDCIdentity) String

func (_m *OIDCIdentity) String() string

String implements the fmt.Stringer.

func (*OIDCIdentity) Unwrap

func (_m *OIDCIdentity) Unwrap() *OIDCIdentity

Unwrap unwraps the OIDCIdentity 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 (*OIDCIdentity) Update

func (_m *OIDCIdentity) Update() *OIDCIdentityUpdateOne

Update returns a builder for updating this OIDCIdentity. Note that you need to call OIDCIdentity.Unwrap() before calling this method if this OIDCIdentity was returned from a transaction, and the transaction was committed or rolled back.

func (*OIDCIdentity) Value

func (_m *OIDCIdentity) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OIDCIdentity. This includes values selected through modifiers, order, etc.

type OIDCIdentityClient

type OIDCIdentityClient struct {
	// contains filtered or unexported fields
}

OIDCIdentityClient is a client for the OIDCIdentity schema.

func NewOIDCIdentityClient

func NewOIDCIdentityClient(c config) *OIDCIdentityClient

NewOIDCIdentityClient returns a client for the OIDCIdentity from the given config.

func (*OIDCIdentityClient) Create

Create returns a builder for creating a OIDCIdentity entity.

func (*OIDCIdentityClient) CreateBulk

func (c *OIDCIdentityClient) CreateBulk(builders ...*OIDCIdentityCreate) *OIDCIdentityCreateBulk

CreateBulk returns a builder for creating a bulk of OIDCIdentity entities.

func (*OIDCIdentityClient) Delete

Delete returns a delete builder for OIDCIdentity.

func (*OIDCIdentityClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OIDCIdentityClient) DeleteOneID

func (c *OIDCIdentityClient) DeleteOneID(id uint32) *OIDCIdentityDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OIDCIdentityClient) Get

Get returns a OIDCIdentity entity by its id.

func (*OIDCIdentityClient) GetX

GetX is like Get, but panics if an error occurs.

func (*OIDCIdentityClient) Hooks

func (c *OIDCIdentityClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OIDCIdentityClient) Intercept

func (c *OIDCIdentityClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oidcidentity.Intercept(f(g(h())))`.

func (*OIDCIdentityClient) Interceptors

func (c *OIDCIdentityClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OIDCIdentityClient) MapCreateBulk

func (c *OIDCIdentityClient) MapCreateBulk(slice any, setFunc func(*OIDCIdentityCreate, int)) *OIDCIdentityCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OIDCIdentityClient) Query

Query returns a query builder for OIDCIdentity.

func (*OIDCIdentityClient) QueryOwner

func (c *OIDCIdentityClient) QueryOwner(_m *OIDCIdentity) *UserQuery

QueryOwner queries the owner edge of a OIDCIdentity.

func (*OIDCIdentityClient) Update

Update returns an update builder for OIDCIdentity.

func (*OIDCIdentityClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OIDCIdentityClient) UpdateOneID

func (c *OIDCIdentityClient) UpdateOneID(id uint32) *OIDCIdentityUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OIDCIdentityClient) Use

func (c *OIDCIdentityClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oidcidentity.Hooks(f(g(h())))`.

type OIDCIdentityCreate

type OIDCIdentityCreate struct {
	// contains filtered or unexported fields
}

OIDCIdentityCreate is the builder for creating a OIDCIdentity entity.

func (*OIDCIdentityCreate) Exec

func (_c *OIDCIdentityCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OIDCIdentityCreate) ExecX

func (_c *OIDCIdentityCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OIDCIdentityCreate) Mutation

func (_c *OIDCIdentityCreate) Mutation() *OIDCIdentityMutation

Mutation returns the OIDCIdentityMutation object of the builder.

func (*OIDCIdentityCreate) Save

Save creates the OIDCIdentity in the database.

func (*OIDCIdentityCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*OIDCIdentityCreate) SetCreateTime

func (_c *OIDCIdentityCreate) SetCreateTime(v time.Time) *OIDCIdentityCreate

SetCreateTime sets the "create_time" field.

func (*OIDCIdentityCreate) SetEmail

func (_c *OIDCIdentityCreate) SetEmail(v string) *OIDCIdentityCreate

SetEmail sets the "email" field.

func (*OIDCIdentityCreate) SetID

SetID sets the "id" field.

func (*OIDCIdentityCreate) SetNillableCreateTime

func (_c *OIDCIdentityCreate) SetNillableCreateTime(v *time.Time) *OIDCIdentityCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*OIDCIdentityCreate) SetNillableEmail

func (_c *OIDCIdentityCreate) SetNillableEmail(v *string) *OIDCIdentityCreate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*OIDCIdentityCreate) SetNillableUpdateTime

func (_c *OIDCIdentityCreate) SetNillableUpdateTime(v *time.Time) *OIDCIdentityCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*OIDCIdentityCreate) SetOwner

func (_c *OIDCIdentityCreate) SetOwner(v *User) *OIDCIdentityCreate

SetOwner sets the "owner" edge to the User entity.

func (*OIDCIdentityCreate) SetOwnerID

func (_c *OIDCIdentityCreate) SetOwnerID(id uint32) *OIDCIdentityCreate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*OIDCIdentityCreate) SetProvider

func (_c *OIDCIdentityCreate) SetProvider(v string) *OIDCIdentityCreate

SetProvider sets the "provider" field.

func (*OIDCIdentityCreate) SetSubject

func (_c *OIDCIdentityCreate) SetSubject(v string) *OIDCIdentityCreate

SetSubject sets the "subject" field.

func (*OIDCIdentityCreate) SetUpdateTime

func (_c *OIDCIdentityCreate) SetUpdateTime(v time.Time) *OIDCIdentityCreate

SetUpdateTime sets the "update_time" field.

type OIDCIdentityCreateBulk

type OIDCIdentityCreateBulk struct {
	// contains filtered or unexported fields
}

OIDCIdentityCreateBulk is the builder for creating many OIDCIdentity entities in bulk.

func (*OIDCIdentityCreateBulk) Exec

Exec executes the query.

func (*OIDCIdentityCreateBulk) ExecX

func (_c *OIDCIdentityCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OIDCIdentityCreateBulk) Save

Save creates the OIDCIdentity entities in the database.

func (*OIDCIdentityCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type OIDCIdentityDelete

type OIDCIdentityDelete struct {
	// contains filtered or unexported fields
}

OIDCIdentityDelete is the builder for deleting a OIDCIdentity entity.

func (*OIDCIdentityDelete) Exec

func (_d *OIDCIdentityDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OIDCIdentityDelete) ExecX

func (_d *OIDCIdentityDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OIDCIdentityDelete) Where

Where appends a list predicates to the OIDCIdentityDelete builder.

type OIDCIdentityDeleteOne

type OIDCIdentityDeleteOne struct {
	// contains filtered or unexported fields
}

OIDCIdentityDeleteOne is the builder for deleting a single OIDCIdentity entity.

func (*OIDCIdentityDeleteOne) Exec

Exec executes the deletion query.

func (*OIDCIdentityDeleteOne) ExecX

func (_d *OIDCIdentityDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OIDCIdentityDeleteOne) Where

Where appends a list predicates to the OIDCIdentityDelete builder.

type OIDCIdentityEdges

type OIDCIdentityEdges struct {
	// Owner holds the value of the owner edge.
	Owner *User `json:"owner,omitempty"`
	// contains filtered or unexported fields
}

OIDCIdentityEdges holds the relations/edges for other nodes in the graph.

func (OIDCIdentityEdges) OwnerOrErr

func (e OIDCIdentityEdges) OwnerOrErr() (*User, error)

OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type OIDCIdentityGroupBy

type OIDCIdentityGroupBy struct {
	// contains filtered or unexported fields
}

OIDCIdentityGroupBy is the group-by builder for OIDCIdentity entities.

func (*OIDCIdentityGroupBy) Aggregate

func (_g *OIDCIdentityGroupBy) Aggregate(fns ...AggregateFunc) *OIDCIdentityGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OIDCIdentityGroupBy) Bool

func (s *OIDCIdentityGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OIDCIdentityGroupBy) BoolX

func (s *OIDCIdentityGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OIDCIdentityGroupBy) Bools

func (s *OIDCIdentityGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OIDCIdentityGroupBy) BoolsX

func (s *OIDCIdentityGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OIDCIdentityGroupBy) Float64

func (s *OIDCIdentityGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OIDCIdentityGroupBy) Float64X

func (s *OIDCIdentityGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OIDCIdentityGroupBy) Float64s

func (s *OIDCIdentityGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OIDCIdentityGroupBy) Float64sX

func (s *OIDCIdentityGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OIDCIdentityGroupBy) Int

func (s *OIDCIdentityGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OIDCIdentityGroupBy) IntX

func (s *OIDCIdentityGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OIDCIdentityGroupBy) Ints

func (s *OIDCIdentityGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OIDCIdentityGroupBy) IntsX

func (s *OIDCIdentityGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OIDCIdentityGroupBy) Scan

func (_g *OIDCIdentityGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OIDCIdentityGroupBy) ScanX

func (s *OIDCIdentityGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OIDCIdentityGroupBy) String

func (s *OIDCIdentityGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OIDCIdentityGroupBy) StringX

func (s *OIDCIdentityGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OIDCIdentityGroupBy) Strings

func (s *OIDCIdentityGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OIDCIdentityGroupBy) StringsX

func (s *OIDCIdentityGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OIDCIdentityMutation

type OIDCIdentityMutation struct {
	// contains filtered or unexported fields
}

OIDCIdentityMutation represents an operation that mutates the OIDCIdentity nodes in the graph.

func (*OIDCIdentityMutation) AddField

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) AddedEdges

func (m *OIDCIdentityMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OIDCIdentityMutation) AddedField

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) AddedFields

func (m *OIDCIdentityMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OIDCIdentityMutation) AddedIDs

func (m *OIDCIdentityMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OIDCIdentityMutation) ClearEdge

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) ClearEmail

func (m *OIDCIdentityMutation) ClearEmail()

ClearEmail clears the value of the "email" field.

func (*OIDCIdentityMutation) ClearField

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) ClearOwner

func (m *OIDCIdentityMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*OIDCIdentityMutation) ClearedEdges

func (m *OIDCIdentityMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OIDCIdentityMutation) ClearedFields

func (m *OIDCIdentityMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OIDCIdentityMutation) Client

func (m OIDCIdentityMutation) 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 (*OIDCIdentityMutation) CreateTime

func (m *OIDCIdentityMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*OIDCIdentityMutation) EdgeCleared

func (m *OIDCIdentityMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OIDCIdentityMutation) Email

func (m *OIDCIdentityMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*OIDCIdentityMutation) EmailCleared

func (m *OIDCIdentityMutation) EmailCleared() bool

EmailCleared returns if the "email" field was cleared in this mutation.

func (*OIDCIdentityMutation) Field

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) FieldCleared

func (m *OIDCIdentityMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OIDCIdentityMutation) Fields

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) ID

func (m *OIDCIdentityMutation) ID() (id uint32, 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 (*OIDCIdentityMutation) IDs

func (m *OIDCIdentityMutation) IDs(ctx context.Context) ([]uint32, 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 (*OIDCIdentityMutation) OldCreateTime

func (m *OIDCIdentityMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the OIDCIdentity entity. If the OIDCIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OIDCIdentityMutation) OldEmail

func (m *OIDCIdentityMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the OIDCIdentity entity. If the OIDCIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OIDCIdentityMutation) OldField

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) OldProvider

func (m *OIDCIdentityMutation) OldProvider(ctx context.Context) (v string, err error)

OldProvider returns the old "provider" field's value of the OIDCIdentity entity. If the OIDCIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OIDCIdentityMutation) OldSubject

func (m *OIDCIdentityMutation) OldSubject(ctx context.Context) (v string, err error)

OldSubject returns the old "subject" field's value of the OIDCIdentity entity. If the OIDCIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OIDCIdentityMutation) OldUpdateTime

func (m *OIDCIdentityMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the OIDCIdentity entity. If the OIDCIdentity object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OIDCIdentityMutation) Op

func (m *OIDCIdentityMutation) Op() Op

Op returns the operation name.

func (*OIDCIdentityMutation) OwnerCleared

func (m *OIDCIdentityMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*OIDCIdentityMutation) OwnerID

func (m *OIDCIdentityMutation) OwnerID() (id uint32, exists bool)

OwnerID returns the "owner" edge ID in the mutation.

func (*OIDCIdentityMutation) OwnerIDs

func (m *OIDCIdentityMutation) OwnerIDs() (ids []uint32)

OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.

func (*OIDCIdentityMutation) Provider

func (m *OIDCIdentityMutation) Provider() (r string, exists bool)

Provider returns the value of the "provider" field in the mutation.

func (*OIDCIdentityMutation) RemovedEdges

func (m *OIDCIdentityMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OIDCIdentityMutation) RemovedIDs

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) ResetCreateTime

func (m *OIDCIdentityMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*OIDCIdentityMutation) ResetEdge

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) ResetEmail

func (m *OIDCIdentityMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*OIDCIdentityMutation) ResetField

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) ResetOwner

func (m *OIDCIdentityMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*OIDCIdentityMutation) ResetProvider

func (m *OIDCIdentityMutation) ResetProvider()

ResetProvider resets all changes to the "provider" field.

func (*OIDCIdentityMutation) ResetSubject

func (m *OIDCIdentityMutation) ResetSubject()

ResetSubject resets all changes to the "subject" field.

func (*OIDCIdentityMutation) ResetUpdateTime

func (m *OIDCIdentityMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*OIDCIdentityMutation) SetCreateTime

func (m *OIDCIdentityMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*OIDCIdentityMutation) SetEmail

func (m *OIDCIdentityMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*OIDCIdentityMutation) SetField

func (m *OIDCIdentityMutation) 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 (*OIDCIdentityMutation) SetID

func (m *OIDCIdentityMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OIDCIdentity entities.

func (*OIDCIdentityMutation) SetOp

func (m *OIDCIdentityMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OIDCIdentityMutation) SetOwnerID

func (m *OIDCIdentityMutation) SetOwnerID(id uint32)

SetOwnerID sets the "owner" edge to the User entity by id.

func (*OIDCIdentityMutation) SetProvider

func (m *OIDCIdentityMutation) SetProvider(s string)

SetProvider sets the "provider" field.

func (*OIDCIdentityMutation) SetSubject

func (m *OIDCIdentityMutation) SetSubject(s string)

SetSubject sets the "subject" field.

func (*OIDCIdentityMutation) SetUpdateTime

func (m *OIDCIdentityMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*OIDCIdentityMutation) Subject

func (m *OIDCIdentityMutation) Subject() (r string, exists bool)

Subject returns the value of the "subject" field in the mutation.

func (OIDCIdentityMutation) Tx

func (m OIDCIdentityMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OIDCIdentityMutation) Type

func (m *OIDCIdentityMutation) Type() string

Type returns the node type of this mutation (OIDCIdentity).

func (*OIDCIdentityMutation) UpdateTime

func (m *OIDCIdentityMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*OIDCIdentityMutation) Where

Where appends a list predicates to the OIDCIdentityMutation builder.

func (*OIDCIdentityMutation) WhereP

func (m *OIDCIdentityMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OIDCIdentityMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OIDCIdentityQuery

type OIDCIdentityQuery struct {
	// contains filtered or unexported fields
}

OIDCIdentityQuery is the builder for querying OIDCIdentity entities.

func (*OIDCIdentityQuery) Aggregate

func (_q *OIDCIdentityQuery) Aggregate(fns ...AggregateFunc) *OIDCIdentitySelect

Aggregate returns a OIDCIdentitySelect configured with the given aggregations.

func (*OIDCIdentityQuery) All

func (_q *OIDCIdentityQuery) All(ctx context.Context) ([]*OIDCIdentity, error)

All executes the query and returns a list of OIDCIdentities.

func (*OIDCIdentityQuery) AllX

func (_q *OIDCIdentityQuery) AllX(ctx context.Context) []*OIDCIdentity

AllX is like All, but panics if an error occurs.

func (*OIDCIdentityQuery) Clone

func (_q *OIDCIdentityQuery) Clone() *OIDCIdentityQuery

Clone returns a duplicate of the OIDCIdentityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OIDCIdentityQuery) Count

func (_q *OIDCIdentityQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OIDCIdentityQuery) CountX

func (_q *OIDCIdentityQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OIDCIdentityQuery) Exist

func (_q *OIDCIdentityQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OIDCIdentityQuery) ExistX

func (_q *OIDCIdentityQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OIDCIdentityQuery) First

func (_q *OIDCIdentityQuery) First(ctx context.Context) (*OIDCIdentity, error)

First returns the first OIDCIdentity entity from the query. Returns a *NotFoundError when no OIDCIdentity was found.

func (*OIDCIdentityQuery) FirstID

func (_q *OIDCIdentityQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first OIDCIdentity ID from the query. Returns a *NotFoundError when no OIDCIdentity ID was found.

func (*OIDCIdentityQuery) FirstIDX

func (_q *OIDCIdentityQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*OIDCIdentityQuery) FirstX

func (_q *OIDCIdentityQuery) FirstX(ctx context.Context) *OIDCIdentity

FirstX is like First, but panics if an error occurs.

func (*OIDCIdentityQuery) GroupBy

func (_q *OIDCIdentityQuery) GroupBy(field string, fields ...string) *OIDCIdentityGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OIDCIdentity.Query().
	GroupBy(oidcidentity.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OIDCIdentityQuery) IDs

func (_q *OIDCIdentityQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of OIDCIdentity IDs.

func (*OIDCIdentityQuery) IDsX

func (_q *OIDCIdentityQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*OIDCIdentityQuery) Limit

func (_q *OIDCIdentityQuery) Limit(limit int) *OIDCIdentityQuery

Limit the number of records to be returned by this query.

func (*OIDCIdentityQuery) Offset

func (_q *OIDCIdentityQuery) Offset(offset int) *OIDCIdentityQuery

Offset to start from.

func (*OIDCIdentityQuery) Only

Only returns a single OIDCIdentity entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OIDCIdentity entity is found. Returns a *NotFoundError when no OIDCIdentity entities are found.

func (*OIDCIdentityQuery) OnlyID

func (_q *OIDCIdentityQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only OIDCIdentity ID in the query. Returns a *NotSingularError when more than one OIDCIdentity ID is found. Returns a *NotFoundError when no entities are found.

func (*OIDCIdentityQuery) OnlyIDX

func (_q *OIDCIdentityQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OIDCIdentityQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*OIDCIdentityQuery) Order

Order specifies how the records should be ordered.

func (*OIDCIdentityQuery) QueryOwner

func (_q *OIDCIdentityQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*OIDCIdentityQuery) Select

func (_q *OIDCIdentityQuery) Select(fields ...string) *OIDCIdentitySelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.OIDCIdentity.Query().
	Select(oidcidentity.FieldCreateTime).
	Scan(ctx, &v)

func (*OIDCIdentityQuery) Unique

func (_q *OIDCIdentityQuery) Unique(unique bool) *OIDCIdentityQuery

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 (*OIDCIdentityQuery) Where

Where adds a new predicate for the OIDCIdentityQuery builder.

func (*OIDCIdentityQuery) WithOwner

func (_q *OIDCIdentityQuery) WithOwner(opts ...func(*UserQuery)) *OIDCIdentityQuery

WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.

type OIDCIdentitySelect

type OIDCIdentitySelect struct {
	*OIDCIdentityQuery
	// contains filtered or unexported fields
}

OIDCIdentitySelect is the builder for selecting fields of OIDCIdentity entities.

func (*OIDCIdentitySelect) Aggregate

func (_s *OIDCIdentitySelect) Aggregate(fns ...AggregateFunc) *OIDCIdentitySelect

Aggregate adds the given aggregation functions to the selector query.

func (*OIDCIdentitySelect) Bool

func (s *OIDCIdentitySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OIDCIdentitySelect) BoolX

func (s *OIDCIdentitySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OIDCIdentitySelect) Bools

func (s *OIDCIdentitySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OIDCIdentitySelect) BoolsX

func (s *OIDCIdentitySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OIDCIdentitySelect) Float64

func (s *OIDCIdentitySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OIDCIdentitySelect) Float64X

func (s *OIDCIdentitySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OIDCIdentitySelect) Float64s

func (s *OIDCIdentitySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OIDCIdentitySelect) Float64sX

func (s *OIDCIdentitySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OIDCIdentitySelect) Int

func (s *OIDCIdentitySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OIDCIdentitySelect) IntX

func (s *OIDCIdentitySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OIDCIdentitySelect) Ints

func (s *OIDCIdentitySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OIDCIdentitySelect) IntsX

func (s *OIDCIdentitySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OIDCIdentitySelect) Scan

func (_s *OIDCIdentitySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OIDCIdentitySelect) ScanX

func (s *OIDCIdentitySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OIDCIdentitySelect) String

func (s *OIDCIdentitySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OIDCIdentitySelect) StringX

func (s *OIDCIdentitySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OIDCIdentitySelect) Strings

func (s *OIDCIdentitySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OIDCIdentitySelect) StringsX

func (s *OIDCIdentitySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OIDCIdentityUpdate

type OIDCIdentityUpdate struct {
	// contains filtered or unexported fields
}

OIDCIdentityUpdate is the builder for updating OIDCIdentity entities.

func (*OIDCIdentityUpdate) ClearEmail

func (_u *OIDCIdentityUpdate) ClearEmail() *OIDCIdentityUpdate

ClearEmail clears the value of the "email" field.

func (*OIDCIdentityUpdate) ClearOwner

func (_u *OIDCIdentityUpdate) ClearOwner() *OIDCIdentityUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*OIDCIdentityUpdate) Exec

func (_u *OIDCIdentityUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OIDCIdentityUpdate) ExecX

func (_u *OIDCIdentityUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OIDCIdentityUpdate) Mutation

func (_u *OIDCIdentityUpdate) Mutation() *OIDCIdentityMutation

Mutation returns the OIDCIdentityMutation object of the builder.

func (*OIDCIdentityUpdate) Save

func (_u *OIDCIdentityUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OIDCIdentityUpdate) SaveX

func (_u *OIDCIdentityUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OIDCIdentityUpdate) SetEmail

func (_u *OIDCIdentityUpdate) SetEmail(v string) *OIDCIdentityUpdate

SetEmail sets the "email" field.

func (*OIDCIdentityUpdate) SetNillableEmail

func (_u *OIDCIdentityUpdate) SetNillableEmail(v *string) *OIDCIdentityUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*OIDCIdentityUpdate) SetNillableProvider

func (_u *OIDCIdentityUpdate) SetNillableProvider(v *string) *OIDCIdentityUpdate

SetNillableProvider sets the "provider" field if the given value is not nil.

func (*OIDCIdentityUpdate) SetNillableSubject

func (_u *OIDCIdentityUpdate) SetNillableSubject(v *string) *OIDCIdentityUpdate

SetNillableSubject sets the "subject" field if the given value is not nil.

func (*OIDCIdentityUpdate) SetOwner

func (_u *OIDCIdentityUpdate) SetOwner(v *User) *OIDCIdentityUpdate

SetOwner sets the "owner" edge to the User entity.

func (*OIDCIdentityUpdate) SetOwnerID

func (_u *OIDCIdentityUpdate) SetOwnerID(id uint32) *OIDCIdentityUpdate

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*OIDCIdentityUpdate) SetProvider

func (_u *OIDCIdentityUpdate) SetProvider(v string) *OIDCIdentityUpdate

SetProvider sets the "provider" field.

func (*OIDCIdentityUpdate) SetSubject

func (_u *OIDCIdentityUpdate) SetSubject(v string) *OIDCIdentityUpdate

SetSubject sets the "subject" field.

func (*OIDCIdentityUpdate) SetUpdateTime

func (_u *OIDCIdentityUpdate) SetUpdateTime(v time.Time) *OIDCIdentityUpdate

SetUpdateTime sets the "update_time" field.

func (*OIDCIdentityUpdate) Where

Where appends a list predicates to the OIDCIdentityUpdate builder.

type OIDCIdentityUpdateOne

type OIDCIdentityUpdateOne struct {
	// contains filtered or unexported fields
}

OIDCIdentityUpdateOne is the builder for updating a single OIDCIdentity entity.

func (*OIDCIdentityUpdateOne) ClearEmail

func (_u *OIDCIdentityUpdateOne) ClearEmail() *OIDCIdentityUpdateOne

ClearEmail clears the value of the "email" field.

func (*OIDCIdentityUpdateOne) ClearOwner

func (_u *OIDCIdentityUpdateOne) ClearOwner() *OIDCIdentityUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*OIDCIdentityUpdateOne) Exec

Exec executes the query on the entity.

func (*OIDCIdentityUpdateOne) ExecX

func (_u *OIDCIdentityUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OIDCIdentityUpdateOne) Mutation

Mutation returns the OIDCIdentityMutation object of the builder.

func (*OIDCIdentityUpdateOne) Save

Save executes the query and returns the updated OIDCIdentity entity.

func (*OIDCIdentityUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*OIDCIdentityUpdateOne) Select

func (_u *OIDCIdentityUpdateOne) Select(field string, fields ...string) *OIDCIdentityUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OIDCIdentityUpdateOne) SetEmail

SetEmail sets the "email" field.

func (*OIDCIdentityUpdateOne) SetNillableEmail

func (_u *OIDCIdentityUpdateOne) SetNillableEmail(v *string) *OIDCIdentityUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*OIDCIdentityUpdateOne) SetNillableProvider

func (_u *OIDCIdentityUpdateOne) SetNillableProvider(v *string) *OIDCIdentityUpdateOne

SetNillableProvider sets the "provider" field if the given value is not nil.

func (*OIDCIdentityUpdateOne) SetNillableSubject

func (_u *OIDCIdentityUpdateOne) SetNillableSubject(v *string) *OIDCIdentityUpdateOne

SetNillableSubject sets the "subject" field if the given value is not nil.

func (*OIDCIdentityUpdateOne) SetOwner

SetOwner sets the "owner" edge to the User entity.

func (*OIDCIdentityUpdateOne) SetOwnerID

SetOwnerID sets the "owner" edge to the User entity by ID.

func (*OIDCIdentityUpdateOne) SetProvider

SetProvider sets the "provider" field.

func (*OIDCIdentityUpdateOne) SetSubject

SetSubject sets the "subject" field.

func (*OIDCIdentityUpdateOne) SetUpdateTime

func (_u *OIDCIdentityUpdateOne) SetUpdateTime(v time.Time) *OIDCIdentityUpdateOne

SetUpdateTime sets the "update_time" field.

func (*OIDCIdentityUpdateOne) Where

Where appends a list predicates to the OIDCIdentityUpdate builder.

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. Deprecated: Use Asc/Desc functions or the package builders instead.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

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 Request

type Request struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// MediaType holds the value of the "media_type" field.
	MediaType request.MediaType `json:"media_type,omitempty"`
	// TMDB ID for movies, TVDB ID for TV shows
	MediaID uint32 `json:"media_id,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Status holds the value of the "status" field.
	Status request.Status `json:"status,omitempty"`
	// Admin-supplied reason, e.g. on denial.
	Reason string `json:"reason,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RequestQuery when eager-loading is set.
	Edges RequestEdges `json:"edges"`
	// contains filtered or unexported fields
}

Request is the model entity for the Request schema.

func (*Request) QueryApprovedBy

func (_m *Request) QueryApprovedBy() *UserQuery

QueryApprovedBy queries the "approved_by" edge of the Request entity.

func (*Request) QueryRequester

func (_m *Request) QueryRequester() *UserQuery

QueryRequester queries the "requester" edge of the Request entity.

func (*Request) String

func (_m *Request) String() string

String implements the fmt.Stringer.

func (*Request) Unwrap

func (_m *Request) Unwrap() *Request

Unwrap unwraps the Request 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 (*Request) Update

func (_m *Request) Update() *RequestUpdateOne

Update returns a builder for updating this Request. Note that you need to call Request.Unwrap() before calling this method if this Request was returned from a transaction, and the transaction was committed or rolled back.

func (*Request) Value

func (_m *Request) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Request. This includes values selected through modifiers, order, etc.

type RequestClient

type RequestClient struct {
	// contains filtered or unexported fields
}

RequestClient is a client for the Request schema.

func NewRequestClient

func NewRequestClient(c config) *RequestClient

NewRequestClient returns a client for the Request from the given config.

func (*RequestClient) Create

func (c *RequestClient) Create() *RequestCreate

Create returns a builder for creating a Request entity.

func (*RequestClient) CreateBulk

func (c *RequestClient) CreateBulk(builders ...*RequestCreate) *RequestCreateBulk

CreateBulk returns a builder for creating a bulk of Request entities.

func (*RequestClient) Delete

func (c *RequestClient) Delete() *RequestDelete

Delete returns a delete builder for Request.

func (*RequestClient) DeleteOne

func (c *RequestClient) DeleteOne(_m *Request) *RequestDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*RequestClient) DeleteOneID

func (c *RequestClient) DeleteOneID(id uint32) *RequestDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*RequestClient) Get

func (c *RequestClient) Get(ctx context.Context, id uint32) (*Request, error)

Get returns a Request entity by its id.

func (*RequestClient) GetX

func (c *RequestClient) GetX(ctx context.Context, id uint32) *Request

GetX is like Get, but panics if an error occurs.

func (*RequestClient) Hooks

func (c *RequestClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RequestClient) Intercept

func (c *RequestClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `request.Intercept(f(g(h())))`.

func (*RequestClient) Interceptors

func (c *RequestClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*RequestClient) MapCreateBulk

func (c *RequestClient) MapCreateBulk(slice any, setFunc func(*RequestCreate, int)) *RequestCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*RequestClient) Query

func (c *RequestClient) Query() *RequestQuery

Query returns a query builder for Request.

func (*RequestClient) QueryApprovedBy

func (c *RequestClient) QueryApprovedBy(_m *Request) *UserQuery

QueryApprovedBy queries the approved_by edge of a Request.

func (*RequestClient) QueryRequester

func (c *RequestClient) QueryRequester(_m *Request) *UserQuery

QueryRequester queries the requester edge of a Request.

func (*RequestClient) Update

func (c *RequestClient) Update() *RequestUpdate

Update returns an update builder for Request.

func (*RequestClient) UpdateOne

func (c *RequestClient) UpdateOne(_m *Request) *RequestUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RequestClient) UpdateOneID

func (c *RequestClient) UpdateOneID(id uint32) *RequestUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RequestClient) Use

func (c *RequestClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `request.Hooks(f(g(h())))`.

type RequestCreate

type RequestCreate struct {
	// contains filtered or unexported fields
}

RequestCreate is the builder for creating a Request entity.

func (*RequestCreate) Exec

func (_c *RequestCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RequestCreate) ExecX

func (_c *RequestCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequestCreate) Mutation

func (_c *RequestCreate) Mutation() *RequestMutation

Mutation returns the RequestMutation object of the builder.

func (*RequestCreate) Save

func (_c *RequestCreate) Save(ctx context.Context) (*Request, error)

Save creates the Request in the database.

func (*RequestCreate) SaveX

func (_c *RequestCreate) SaveX(ctx context.Context) *Request

SaveX calls Save and panics if Save returns an error.

func (*RequestCreate) SetApprovedBy

func (_c *RequestCreate) SetApprovedBy(v *User) *RequestCreate

SetApprovedBy sets the "approved_by" edge to the User entity.

func (*RequestCreate) SetApprovedByID

func (_c *RequestCreate) SetApprovedByID(id uint32) *RequestCreate

SetApprovedByID sets the "approved_by" edge to the User entity by ID.

func (*RequestCreate) SetCreateTime

func (_c *RequestCreate) SetCreateTime(v time.Time) *RequestCreate

SetCreateTime sets the "create_time" field.

func (*RequestCreate) SetID

func (_c *RequestCreate) SetID(v uint32) *RequestCreate

SetID sets the "id" field.

func (*RequestCreate) SetMediaID

func (_c *RequestCreate) SetMediaID(v uint32) *RequestCreate

SetMediaID sets the "media_id" field.

func (*RequestCreate) SetMediaType

func (_c *RequestCreate) SetMediaType(v request.MediaType) *RequestCreate

SetMediaType sets the "media_type" field.

func (*RequestCreate) SetNillableApprovedByID

func (_c *RequestCreate) SetNillableApprovedByID(id *uint32) *RequestCreate

SetNillableApprovedByID sets the "approved_by" edge to the User entity by ID if the given value is not nil.

func (*RequestCreate) SetNillableCreateTime

func (_c *RequestCreate) SetNillableCreateTime(v *time.Time) *RequestCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*RequestCreate) SetNillableReason

func (_c *RequestCreate) SetNillableReason(v *string) *RequestCreate

SetNillableReason sets the "reason" field if the given value is not nil.

func (*RequestCreate) SetNillableStatus

func (_c *RequestCreate) SetNillableStatus(v *request.Status) *RequestCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RequestCreate) SetNillableUpdateTime

func (_c *RequestCreate) SetNillableUpdateTime(v *time.Time) *RequestCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*RequestCreate) SetReason

func (_c *RequestCreate) SetReason(v string) *RequestCreate

SetReason sets the "reason" field.

func (*RequestCreate) SetRequester

func (_c *RequestCreate) SetRequester(v *User) *RequestCreate

SetRequester sets the "requester" edge to the User entity.

func (*RequestCreate) SetRequesterID

func (_c *RequestCreate) SetRequesterID(id uint32) *RequestCreate

SetRequesterID sets the "requester" edge to the User entity by ID.

func (*RequestCreate) SetStatus

func (_c *RequestCreate) SetStatus(v request.Status) *RequestCreate

SetStatus sets the "status" field.

func (*RequestCreate) SetTitle

func (_c *RequestCreate) SetTitle(v string) *RequestCreate

SetTitle sets the "title" field.

func (*RequestCreate) SetUpdateTime

func (_c *RequestCreate) SetUpdateTime(v time.Time) *RequestCreate

SetUpdateTime sets the "update_time" field.

type RequestCreateBulk

type RequestCreateBulk struct {
	// contains filtered or unexported fields
}

RequestCreateBulk is the builder for creating many Request entities in bulk.

func (*RequestCreateBulk) Exec

func (_c *RequestCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RequestCreateBulk) ExecX

func (_c *RequestCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequestCreateBulk) Save

func (_c *RequestCreateBulk) Save(ctx context.Context) ([]*Request, error)

Save creates the Request entities in the database.

func (*RequestCreateBulk) SaveX

func (_c *RequestCreateBulk) SaveX(ctx context.Context) []*Request

SaveX is like Save, but panics if an error occurs.

type RequestDelete

type RequestDelete struct {
	// contains filtered or unexported fields
}

RequestDelete is the builder for deleting a Request entity.

func (*RequestDelete) Exec

func (_d *RequestDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RequestDelete) ExecX

func (_d *RequestDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RequestDelete) Where

func (_d *RequestDelete) Where(ps ...predicate.Request) *RequestDelete

Where appends a list predicates to the RequestDelete builder.

type RequestDeleteOne

type RequestDeleteOne struct {
	// contains filtered or unexported fields
}

RequestDeleteOne is the builder for deleting a single Request entity.

func (*RequestDeleteOne) Exec

func (_d *RequestDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RequestDeleteOne) ExecX

func (_d *RequestDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequestDeleteOne) Where

Where appends a list predicates to the RequestDelete builder.

type RequestEdges

type RequestEdges struct {
	// Requester holds the value of the requester edge.
	Requester *User `json:"requester,omitempty"`
	// ApprovedBy holds the value of the approved_by edge.
	ApprovedBy *User `json:"approved_by,omitempty"`
	// contains filtered or unexported fields
}

RequestEdges holds the relations/edges for other nodes in the graph.

func (RequestEdges) ApprovedByOrErr

func (e RequestEdges) ApprovedByOrErr() (*User, error)

ApprovedByOrErr returns the ApprovedBy value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (RequestEdges) RequesterOrErr

func (e RequestEdges) RequesterOrErr() (*User, error)

RequesterOrErr returns the Requester value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type RequestGroupBy

type RequestGroupBy struct {
	// contains filtered or unexported fields
}

RequestGroupBy is the group-by builder for Request entities.

func (*RequestGroupBy) Aggregate

func (_g *RequestGroupBy) Aggregate(fns ...AggregateFunc) *RequestGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RequestGroupBy) Bool

func (s *RequestGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RequestGroupBy) BoolX

func (s *RequestGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RequestGroupBy) Bools

func (s *RequestGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RequestGroupBy) BoolsX

func (s *RequestGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RequestGroupBy) Float64

func (s *RequestGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RequestGroupBy) Float64X

func (s *RequestGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RequestGroupBy) Float64s

func (s *RequestGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RequestGroupBy) Float64sX

func (s *RequestGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RequestGroupBy) Int

func (s *RequestGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RequestGroupBy) IntX

func (s *RequestGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RequestGroupBy) Ints

func (s *RequestGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RequestGroupBy) IntsX

func (s *RequestGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RequestGroupBy) Scan

func (_g *RequestGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RequestGroupBy) ScanX

func (s *RequestGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RequestGroupBy) String

func (s *RequestGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RequestGroupBy) StringX

func (s *RequestGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RequestGroupBy) Strings

func (s *RequestGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RequestGroupBy) StringsX

func (s *RequestGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RequestMutation

type RequestMutation struct {
	// contains filtered or unexported fields
}

RequestMutation represents an operation that mutates the Request nodes in the graph.

func (*RequestMutation) AddField

func (m *RequestMutation) 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 (*RequestMutation) AddMediaID

func (m *RequestMutation) AddMediaID(u int32)

AddMediaID adds u to the "media_id" field.

func (*RequestMutation) AddedEdges

func (m *RequestMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RequestMutation) AddedField

func (m *RequestMutation) 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 (*RequestMutation) AddedFields

func (m *RequestMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RequestMutation) AddedIDs

func (m *RequestMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RequestMutation) AddedMediaID

func (m *RequestMutation) AddedMediaID() (r int32, exists bool)

AddedMediaID returns the value that was added to the "media_id" field in this mutation.

func (*RequestMutation) ApprovedByCleared

func (m *RequestMutation) ApprovedByCleared() bool

ApprovedByCleared reports if the "approved_by" edge to the User entity was cleared.

func (*RequestMutation) ApprovedByID

func (m *RequestMutation) ApprovedByID() (id uint32, exists bool)

ApprovedByID returns the "approved_by" edge ID in the mutation.

func (*RequestMutation) ApprovedByIDs

func (m *RequestMutation) ApprovedByIDs() (ids []uint32)

ApprovedByIDs returns the "approved_by" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ApprovedByID instead. It exists only for internal usage by the builders.

func (*RequestMutation) ClearApprovedBy

func (m *RequestMutation) ClearApprovedBy()

ClearApprovedBy clears the "approved_by" edge to the User entity.

func (*RequestMutation) ClearEdge

func (m *RequestMutation) 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 (*RequestMutation) ClearField

func (m *RequestMutation) 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 (*RequestMutation) ClearReason

func (m *RequestMutation) ClearReason()

ClearReason clears the value of the "reason" field.

func (*RequestMutation) ClearRequester

func (m *RequestMutation) ClearRequester()

ClearRequester clears the "requester" edge to the User entity.

func (*RequestMutation) ClearedEdges

func (m *RequestMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RequestMutation) ClearedFields

func (m *RequestMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RequestMutation) Client

func (m RequestMutation) 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 (*RequestMutation) CreateTime

func (m *RequestMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*RequestMutation) EdgeCleared

func (m *RequestMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RequestMutation) Field

func (m *RequestMutation) 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 (*RequestMutation) FieldCleared

func (m *RequestMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RequestMutation) Fields

func (m *RequestMutation) 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 (*RequestMutation) ID

func (m *RequestMutation) ID() (id uint32, 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 (*RequestMutation) IDs

func (m *RequestMutation) IDs(ctx context.Context) ([]uint32, 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 (*RequestMutation) MediaID

func (m *RequestMutation) MediaID() (r uint32, exists bool)

MediaID returns the value of the "media_id" field in the mutation.

func (*RequestMutation) MediaType

func (m *RequestMutation) MediaType() (r request.MediaType, exists bool)

MediaType returns the value of the "media_type" field in the mutation.

func (*RequestMutation) OldCreateTime

func (m *RequestMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RequestMutation) OldField

func (m *RequestMutation) 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 (*RequestMutation) OldMediaID

func (m *RequestMutation) OldMediaID(ctx context.Context) (v uint32, err error)

OldMediaID returns the old "media_id" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RequestMutation) OldMediaType

func (m *RequestMutation) OldMediaType(ctx context.Context) (v request.MediaType, err error)

OldMediaType returns the old "media_type" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RequestMutation) OldReason

func (m *RequestMutation) OldReason(ctx context.Context) (v string, err error)

OldReason returns the old "reason" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RequestMutation) OldStatus

func (m *RequestMutation) OldStatus(ctx context.Context) (v request.Status, err error)

OldStatus returns the old "status" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RequestMutation) OldTitle

func (m *RequestMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RequestMutation) OldUpdateTime

func (m *RequestMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Request entity. If the Request object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RequestMutation) Op

func (m *RequestMutation) Op() Op

Op returns the operation name.

func (*RequestMutation) Reason

func (m *RequestMutation) Reason() (r string, exists bool)

Reason returns the value of the "reason" field in the mutation.

func (*RequestMutation) ReasonCleared

func (m *RequestMutation) ReasonCleared() bool

ReasonCleared returns if the "reason" field was cleared in this mutation.

func (*RequestMutation) RemovedEdges

func (m *RequestMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RequestMutation) RemovedIDs

func (m *RequestMutation) 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 (*RequestMutation) RequesterCleared

func (m *RequestMutation) RequesterCleared() bool

RequesterCleared reports if the "requester" edge to the User entity was cleared.

func (*RequestMutation) RequesterID

func (m *RequestMutation) RequesterID() (id uint32, exists bool)

RequesterID returns the "requester" edge ID in the mutation.

func (*RequestMutation) RequesterIDs

func (m *RequestMutation) RequesterIDs() (ids []uint32)

RequesterIDs returns the "requester" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RequesterID instead. It exists only for internal usage by the builders.

func (*RequestMutation) ResetApprovedBy

func (m *RequestMutation) ResetApprovedBy()

ResetApprovedBy resets all changes to the "approved_by" edge.

func (*RequestMutation) ResetCreateTime

func (m *RequestMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*RequestMutation) ResetEdge

func (m *RequestMutation) 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 (*RequestMutation) ResetField

func (m *RequestMutation) 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 (*RequestMutation) ResetMediaID

func (m *RequestMutation) ResetMediaID()

ResetMediaID resets all changes to the "media_id" field.

func (*RequestMutation) ResetMediaType

func (m *RequestMutation) ResetMediaType()

ResetMediaType resets all changes to the "media_type" field.

func (*RequestMutation) ResetReason

func (m *RequestMutation) ResetReason()

ResetReason resets all changes to the "reason" field.

func (*RequestMutation) ResetRequester

func (m *RequestMutation) ResetRequester()

ResetRequester resets all changes to the "requester" edge.

func (*RequestMutation) ResetStatus

func (m *RequestMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*RequestMutation) ResetTitle

func (m *RequestMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*RequestMutation) ResetUpdateTime

func (m *RequestMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*RequestMutation) SetApprovedByID

func (m *RequestMutation) SetApprovedByID(id uint32)

SetApprovedByID sets the "approved_by" edge to the User entity by id.

func (*RequestMutation) SetCreateTime

func (m *RequestMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*RequestMutation) SetField

func (m *RequestMutation) 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 (*RequestMutation) SetID

func (m *RequestMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Request entities.

func (*RequestMutation) SetMediaID

func (m *RequestMutation) SetMediaID(u uint32)

SetMediaID sets the "media_id" field.

func (*RequestMutation) SetMediaType

func (m *RequestMutation) SetMediaType(rt request.MediaType)

SetMediaType sets the "media_type" field.

func (*RequestMutation) SetOp

func (m *RequestMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*RequestMutation) SetReason

func (m *RequestMutation) SetReason(s string)

SetReason sets the "reason" field.

func (*RequestMutation) SetRequesterID

func (m *RequestMutation) SetRequesterID(id uint32)

SetRequesterID sets the "requester" edge to the User entity by id.

func (*RequestMutation) SetStatus

func (m *RequestMutation) SetStatus(r request.Status)

SetStatus sets the "status" field.

func (*RequestMutation) SetTitle

func (m *RequestMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*RequestMutation) SetUpdateTime

func (m *RequestMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*RequestMutation) Status

func (m *RequestMutation) Status() (r request.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (*RequestMutation) Title

func (m *RequestMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (RequestMutation) Tx

func (m RequestMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RequestMutation) Type

func (m *RequestMutation) Type() string

Type returns the node type of this mutation (Request).

func (*RequestMutation) UpdateTime

func (m *RequestMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*RequestMutation) Where

func (m *RequestMutation) Where(ps ...predicate.Request)

Where appends a list predicates to the RequestMutation builder.

func (*RequestMutation) WhereP

func (m *RequestMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the RequestMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type RequestQuery

type RequestQuery struct {
	// contains filtered or unexported fields
}

RequestQuery is the builder for querying Request entities.

func (*RequestQuery) Aggregate

func (_q *RequestQuery) Aggregate(fns ...AggregateFunc) *RequestSelect

Aggregate returns a RequestSelect configured with the given aggregations.

func (*RequestQuery) All

func (_q *RequestQuery) All(ctx context.Context) ([]*Request, error)

All executes the query and returns a list of Requests.

func (*RequestQuery) AllX

func (_q *RequestQuery) AllX(ctx context.Context) []*Request

AllX is like All, but panics if an error occurs.

func (*RequestQuery) Clone

func (_q *RequestQuery) Clone() *RequestQuery

Clone returns a duplicate of the RequestQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RequestQuery) Count

func (_q *RequestQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RequestQuery) CountX

func (_q *RequestQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RequestQuery) Exist

func (_q *RequestQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RequestQuery) ExistX

func (_q *RequestQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RequestQuery) First

func (_q *RequestQuery) First(ctx context.Context) (*Request, error)

First returns the first Request entity from the query. Returns a *NotFoundError when no Request was found.

func (*RequestQuery) FirstID

func (_q *RequestQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first Request ID from the query. Returns a *NotFoundError when no Request ID was found.

func (*RequestQuery) FirstIDX

func (_q *RequestQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*RequestQuery) FirstX

func (_q *RequestQuery) FirstX(ctx context.Context) *Request

FirstX is like First, but panics if an error occurs.

func (*RequestQuery) GroupBy

func (_q *RequestQuery) GroupBy(field string, fields ...string) *RequestGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Request.Query().
	GroupBy(request.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RequestQuery) IDs

func (_q *RequestQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of Request IDs.

func (*RequestQuery) IDsX

func (_q *RequestQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*RequestQuery) Limit

func (_q *RequestQuery) Limit(limit int) *RequestQuery

Limit the number of records to be returned by this query.

func (*RequestQuery) Offset

func (_q *RequestQuery) Offset(offset int) *RequestQuery

Offset to start from.

func (*RequestQuery) Only

func (_q *RequestQuery) Only(ctx context.Context) (*Request, error)

Only returns a single Request entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Request entity is found. Returns a *NotFoundError when no Request entities are found.

func (*RequestQuery) OnlyID

func (_q *RequestQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only Request ID in the query. Returns a *NotSingularError when more than one Request ID is found. Returns a *NotFoundError when no entities are found.

func (*RequestQuery) OnlyIDX

func (_q *RequestQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RequestQuery) OnlyX

func (_q *RequestQuery) OnlyX(ctx context.Context) *Request

OnlyX is like Only, but panics if an error occurs.

func (*RequestQuery) Order

func (_q *RequestQuery) Order(o ...request.OrderOption) *RequestQuery

Order specifies how the records should be ordered.

func (*RequestQuery) QueryApprovedBy

func (_q *RequestQuery) QueryApprovedBy() *UserQuery

QueryApprovedBy chains the current query on the "approved_by" edge.

func (*RequestQuery) QueryRequester

func (_q *RequestQuery) QueryRequester() *UserQuery

QueryRequester chains the current query on the "requester" edge.

func (*RequestQuery) Select

func (_q *RequestQuery) Select(fields ...string) *RequestSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Request.Query().
	Select(request.FieldCreateTime).
	Scan(ctx, &v)

func (*RequestQuery) Unique

func (_q *RequestQuery) Unique(unique bool) *RequestQuery

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 (*RequestQuery) Where

func (_q *RequestQuery) Where(ps ...predicate.Request) *RequestQuery

Where adds a new predicate for the RequestQuery builder.

func (*RequestQuery) WithApprovedBy

func (_q *RequestQuery) WithApprovedBy(opts ...func(*UserQuery)) *RequestQuery

WithApprovedBy tells the query-builder to eager-load the nodes that are connected to the "approved_by" edge. The optional arguments are used to configure the query builder of the edge.

func (*RequestQuery) WithRequester

func (_q *RequestQuery) WithRequester(opts ...func(*UserQuery)) *RequestQuery

WithRequester tells the query-builder to eager-load the nodes that are connected to the "requester" edge. The optional arguments are used to configure the query builder of the edge.

type RequestSelect

type RequestSelect struct {
	*RequestQuery
	// contains filtered or unexported fields
}

RequestSelect is the builder for selecting fields of Request entities.

func (*RequestSelect) Aggregate

func (_s *RequestSelect) Aggregate(fns ...AggregateFunc) *RequestSelect

Aggregate adds the given aggregation functions to the selector query.

func (*RequestSelect) Bool

func (s *RequestSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RequestSelect) BoolX

func (s *RequestSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RequestSelect) Bools

func (s *RequestSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RequestSelect) BoolsX

func (s *RequestSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RequestSelect) Float64

func (s *RequestSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RequestSelect) Float64X

func (s *RequestSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RequestSelect) Float64s

func (s *RequestSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RequestSelect) Float64sX

func (s *RequestSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RequestSelect) Int

func (s *RequestSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RequestSelect) IntX

func (s *RequestSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RequestSelect) Ints

func (s *RequestSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RequestSelect) IntsX

func (s *RequestSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RequestSelect) Scan

func (_s *RequestSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*RequestSelect) ScanX

func (s *RequestSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RequestSelect) String

func (s *RequestSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RequestSelect) StringX

func (s *RequestSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RequestSelect) Strings

func (s *RequestSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RequestSelect) StringsX

func (s *RequestSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RequestUpdate

type RequestUpdate struct {
	// contains filtered or unexported fields
}

RequestUpdate is the builder for updating Request entities.

func (*RequestUpdate) AddMediaID

func (_u *RequestUpdate) AddMediaID(v int32) *RequestUpdate

AddMediaID adds value to the "media_id" field.

func (*RequestUpdate) ClearApprovedBy

func (_u *RequestUpdate) ClearApprovedBy() *RequestUpdate

ClearApprovedBy clears the "approved_by" edge to the User entity.

func (*RequestUpdate) ClearReason

func (_u *RequestUpdate) ClearReason() *RequestUpdate

ClearReason clears the value of the "reason" field.

func (*RequestUpdate) ClearRequester

func (_u *RequestUpdate) ClearRequester() *RequestUpdate

ClearRequester clears the "requester" edge to the User entity.

func (*RequestUpdate) Exec

func (_u *RequestUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RequestUpdate) ExecX

func (_u *RequestUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequestUpdate) Mutation

func (_u *RequestUpdate) Mutation() *RequestMutation

Mutation returns the RequestMutation object of the builder.

func (*RequestUpdate) Save

func (_u *RequestUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RequestUpdate) SaveX

func (_u *RequestUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RequestUpdate) SetApprovedBy

func (_u *RequestUpdate) SetApprovedBy(v *User) *RequestUpdate

SetApprovedBy sets the "approved_by" edge to the User entity.

func (*RequestUpdate) SetApprovedByID

func (_u *RequestUpdate) SetApprovedByID(id uint32) *RequestUpdate

SetApprovedByID sets the "approved_by" edge to the User entity by ID.

func (*RequestUpdate) SetMediaID

func (_u *RequestUpdate) SetMediaID(v uint32) *RequestUpdate

SetMediaID sets the "media_id" field.

func (*RequestUpdate) SetMediaType

func (_u *RequestUpdate) SetMediaType(v request.MediaType) *RequestUpdate

SetMediaType sets the "media_type" field.

func (*RequestUpdate) SetNillableApprovedByID

func (_u *RequestUpdate) SetNillableApprovedByID(id *uint32) *RequestUpdate

SetNillableApprovedByID sets the "approved_by" edge to the User entity by ID if the given value is not nil.

func (*RequestUpdate) SetNillableMediaID

func (_u *RequestUpdate) SetNillableMediaID(v *uint32) *RequestUpdate

SetNillableMediaID sets the "media_id" field if the given value is not nil.

func (*RequestUpdate) SetNillableMediaType

func (_u *RequestUpdate) SetNillableMediaType(v *request.MediaType) *RequestUpdate

SetNillableMediaType sets the "media_type" field if the given value is not nil.

func (*RequestUpdate) SetNillableReason

func (_u *RequestUpdate) SetNillableReason(v *string) *RequestUpdate

SetNillableReason sets the "reason" field if the given value is not nil.

func (*RequestUpdate) SetNillableStatus

func (_u *RequestUpdate) SetNillableStatus(v *request.Status) *RequestUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RequestUpdate) SetNillableTitle

func (_u *RequestUpdate) SetNillableTitle(v *string) *RequestUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*RequestUpdate) SetReason

func (_u *RequestUpdate) SetReason(v string) *RequestUpdate

SetReason sets the "reason" field.

func (*RequestUpdate) SetRequester

func (_u *RequestUpdate) SetRequester(v *User) *RequestUpdate

SetRequester sets the "requester" edge to the User entity.

func (*RequestUpdate) SetRequesterID

func (_u *RequestUpdate) SetRequesterID(id uint32) *RequestUpdate

SetRequesterID sets the "requester" edge to the User entity by ID.

func (*RequestUpdate) SetStatus

func (_u *RequestUpdate) SetStatus(v request.Status) *RequestUpdate

SetStatus sets the "status" field.

func (*RequestUpdate) SetTitle

func (_u *RequestUpdate) SetTitle(v string) *RequestUpdate

SetTitle sets the "title" field.

func (*RequestUpdate) SetUpdateTime

func (_u *RequestUpdate) SetUpdateTime(v time.Time) *RequestUpdate

SetUpdateTime sets the "update_time" field.

func (*RequestUpdate) Where

func (_u *RequestUpdate) Where(ps ...predicate.Request) *RequestUpdate

Where appends a list predicates to the RequestUpdate builder.

type RequestUpdateOne

type RequestUpdateOne struct {
	// contains filtered or unexported fields
}

RequestUpdateOne is the builder for updating a single Request entity.

func (*RequestUpdateOne) AddMediaID

func (_u *RequestUpdateOne) AddMediaID(v int32) *RequestUpdateOne

AddMediaID adds value to the "media_id" field.

func (*RequestUpdateOne) ClearApprovedBy

func (_u *RequestUpdateOne) ClearApprovedBy() *RequestUpdateOne

ClearApprovedBy clears the "approved_by" edge to the User entity.

func (*RequestUpdateOne) ClearReason

func (_u *RequestUpdateOne) ClearReason() *RequestUpdateOne

ClearReason clears the value of the "reason" field.

func (*RequestUpdateOne) ClearRequester

func (_u *RequestUpdateOne) ClearRequester() *RequestUpdateOne

ClearRequester clears the "requester" edge to the User entity.

func (*RequestUpdateOne) Exec

func (_u *RequestUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RequestUpdateOne) ExecX

func (_u *RequestUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RequestUpdateOne) Mutation

func (_u *RequestUpdateOne) Mutation() *RequestMutation

Mutation returns the RequestMutation object of the builder.

func (*RequestUpdateOne) Save

func (_u *RequestUpdateOne) Save(ctx context.Context) (*Request, error)

Save executes the query and returns the updated Request entity.

func (*RequestUpdateOne) SaveX

func (_u *RequestUpdateOne) SaveX(ctx context.Context) *Request

SaveX is like Save, but panics if an error occurs.

func (*RequestUpdateOne) Select

func (_u *RequestUpdateOne) Select(field string, fields ...string) *RequestUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RequestUpdateOne) SetApprovedBy

func (_u *RequestUpdateOne) SetApprovedBy(v *User) *RequestUpdateOne

SetApprovedBy sets the "approved_by" edge to the User entity.

func (*RequestUpdateOne) SetApprovedByID

func (_u *RequestUpdateOne) SetApprovedByID(id uint32) *RequestUpdateOne

SetApprovedByID sets the "approved_by" edge to the User entity by ID.

func (*RequestUpdateOne) SetMediaID

func (_u *RequestUpdateOne) SetMediaID(v uint32) *RequestUpdateOne

SetMediaID sets the "media_id" field.

func (*RequestUpdateOne) SetMediaType

func (_u *RequestUpdateOne) SetMediaType(v request.MediaType) *RequestUpdateOne

SetMediaType sets the "media_type" field.

func (*RequestUpdateOne) SetNillableApprovedByID

func (_u *RequestUpdateOne) SetNillableApprovedByID(id *uint32) *RequestUpdateOne

SetNillableApprovedByID sets the "approved_by" edge to the User entity by ID if the given value is not nil.

func (*RequestUpdateOne) SetNillableMediaID

func (_u *RequestUpdateOne) SetNillableMediaID(v *uint32) *RequestUpdateOne

SetNillableMediaID sets the "media_id" field if the given value is not nil.

func (*RequestUpdateOne) SetNillableMediaType

func (_u *RequestUpdateOne) SetNillableMediaType(v *request.MediaType) *RequestUpdateOne

SetNillableMediaType sets the "media_type" field if the given value is not nil.

func (*RequestUpdateOne) SetNillableReason

func (_u *RequestUpdateOne) SetNillableReason(v *string) *RequestUpdateOne

SetNillableReason sets the "reason" field if the given value is not nil.

func (*RequestUpdateOne) SetNillableStatus

func (_u *RequestUpdateOne) SetNillableStatus(v *request.Status) *RequestUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*RequestUpdateOne) SetNillableTitle

func (_u *RequestUpdateOne) SetNillableTitle(v *string) *RequestUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*RequestUpdateOne) SetReason

func (_u *RequestUpdateOne) SetReason(v string) *RequestUpdateOne

SetReason sets the "reason" field.

func (*RequestUpdateOne) SetRequester

func (_u *RequestUpdateOne) SetRequester(v *User) *RequestUpdateOne

SetRequester sets the "requester" edge to the User entity.

func (*RequestUpdateOne) SetRequesterID

func (_u *RequestUpdateOne) SetRequesterID(id uint32) *RequestUpdateOne

SetRequesterID sets the "requester" edge to the User entity by ID.

func (*RequestUpdateOne) SetStatus

func (_u *RequestUpdateOne) SetStatus(v request.Status) *RequestUpdateOne

SetStatus sets the "status" field.

func (*RequestUpdateOne) SetTitle

func (_u *RequestUpdateOne) SetTitle(v string) *RequestUpdateOne

SetTitle sets the "title" field.

func (*RequestUpdateOne) SetUpdateTime

func (_u *RequestUpdateOne) SetUpdateTime(v time.Time) *RequestUpdateOne

SetUpdateTime sets the "update_time" field.

func (*RequestUpdateOne) Where

Where appends a list predicates to the RequestUpdate builder.

type Requests

type Requests []*Request

Requests is a parsable slice of Request.

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 ScheduledJob

type ScheduledJob struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Paused holds the value of the "paused" field.
	Paused bool `json:"paused,omitempty"`
	// LastStartedAt holds the value of the "last_started_at" field.
	LastStartedAt *time.Time `json:"last_started_at,omitempty"`
	// LastFinishedAt holds the value of the "last_finished_at" field.
	LastFinishedAt *time.Time `json:"last_finished_at,omitempty"`
	// LastStatus holds the value of the "last_status" field.
	LastStatus scheduledjob.LastStatus `json:"last_status,omitempty"`
	// LastError holds the value of the "last_error" field.
	LastError string `json:"last_error,omitempty"`
	// LastDurationMs holds the value of the "last_duration_ms" field.
	LastDurationMs uint32 `json:"last_duration_ms,omitempty"`
	// contains filtered or unexported fields
}

ScheduledJob is the model entity for the ScheduledJob schema.

func (*ScheduledJob) String

func (_m *ScheduledJob) String() string

String implements the fmt.Stringer.

func (*ScheduledJob) Unwrap

func (_m *ScheduledJob) Unwrap() *ScheduledJob

Unwrap unwraps the ScheduledJob 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 (*ScheduledJob) Update

func (_m *ScheduledJob) Update() *ScheduledJobUpdateOne

Update returns a builder for updating this ScheduledJob. Note that you need to call ScheduledJob.Unwrap() before calling this method if this ScheduledJob was returned from a transaction, and the transaction was committed or rolled back.

func (*ScheduledJob) Value

func (_m *ScheduledJob) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the ScheduledJob. This includes values selected through modifiers, order, etc.

type ScheduledJobClient

type ScheduledJobClient struct {
	// contains filtered or unexported fields
}

ScheduledJobClient is a client for the ScheduledJob schema.

func NewScheduledJobClient

func NewScheduledJobClient(c config) *ScheduledJobClient

NewScheduledJobClient returns a client for the ScheduledJob from the given config.

func (*ScheduledJobClient) Create

Create returns a builder for creating a ScheduledJob entity.

func (*ScheduledJobClient) CreateBulk

func (c *ScheduledJobClient) CreateBulk(builders ...*ScheduledJobCreate) *ScheduledJobCreateBulk

CreateBulk returns a builder for creating a bulk of ScheduledJob entities.

func (*ScheduledJobClient) Delete

Delete returns a delete builder for ScheduledJob.

func (*ScheduledJobClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ScheduledJobClient) DeleteOneID

func (c *ScheduledJobClient) DeleteOneID(id uint32) *ScheduledJobDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ScheduledJobClient) Get

Get returns a ScheduledJob entity by its id.

func (*ScheduledJobClient) GetX

GetX is like Get, but panics if an error occurs.

func (*ScheduledJobClient) Hooks

func (c *ScheduledJobClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ScheduledJobClient) Intercept

func (c *ScheduledJobClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `scheduledjob.Intercept(f(g(h())))`.

func (*ScheduledJobClient) Interceptors

func (c *ScheduledJobClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ScheduledJobClient) MapCreateBulk

func (c *ScheduledJobClient) MapCreateBulk(slice any, setFunc func(*ScheduledJobCreate, int)) *ScheduledJobCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*ScheduledJobClient) Query

Query returns a query builder for ScheduledJob.

func (*ScheduledJobClient) Update

Update returns an update builder for ScheduledJob.

func (*ScheduledJobClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ScheduledJobClient) UpdateOneID

func (c *ScheduledJobClient) UpdateOneID(id uint32) *ScheduledJobUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ScheduledJobClient) Use

func (c *ScheduledJobClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `scheduledjob.Hooks(f(g(h())))`.

type ScheduledJobCreate

type ScheduledJobCreate struct {
	// contains filtered or unexported fields
}

ScheduledJobCreate is the builder for creating a ScheduledJob entity.

func (*ScheduledJobCreate) Exec

func (_c *ScheduledJobCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ScheduledJobCreate) ExecX

func (_c *ScheduledJobCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ScheduledJobCreate) Mutation

func (_c *ScheduledJobCreate) Mutation() *ScheduledJobMutation

Mutation returns the ScheduledJobMutation object of the builder.

func (*ScheduledJobCreate) Save

Save creates the ScheduledJob in the database.

func (*ScheduledJobCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ScheduledJobCreate) SetID

SetID sets the "id" field.

func (*ScheduledJobCreate) SetLastDurationMs

func (_c *ScheduledJobCreate) SetLastDurationMs(v uint32) *ScheduledJobCreate

SetLastDurationMs sets the "last_duration_ms" field.

func (*ScheduledJobCreate) SetLastError

func (_c *ScheduledJobCreate) SetLastError(v string) *ScheduledJobCreate

SetLastError sets the "last_error" field.

func (*ScheduledJobCreate) SetLastFinishedAt

func (_c *ScheduledJobCreate) SetLastFinishedAt(v time.Time) *ScheduledJobCreate

SetLastFinishedAt sets the "last_finished_at" field.

func (*ScheduledJobCreate) SetLastStartedAt

func (_c *ScheduledJobCreate) SetLastStartedAt(v time.Time) *ScheduledJobCreate

SetLastStartedAt sets the "last_started_at" field.

func (*ScheduledJobCreate) SetLastStatus

SetLastStatus sets the "last_status" field.

func (*ScheduledJobCreate) SetName

SetName sets the "name" field.

func (*ScheduledJobCreate) SetNillableLastDurationMs

func (_c *ScheduledJobCreate) SetNillableLastDurationMs(v *uint32) *ScheduledJobCreate

SetNillableLastDurationMs sets the "last_duration_ms" field if the given value is not nil.

func (*ScheduledJobCreate) SetNillableLastError

func (_c *ScheduledJobCreate) SetNillableLastError(v *string) *ScheduledJobCreate

SetNillableLastError sets the "last_error" field if the given value is not nil.

func (*ScheduledJobCreate) SetNillableLastFinishedAt

func (_c *ScheduledJobCreate) SetNillableLastFinishedAt(v *time.Time) *ScheduledJobCreate

SetNillableLastFinishedAt sets the "last_finished_at" field if the given value is not nil.

func (*ScheduledJobCreate) SetNillableLastStartedAt

func (_c *ScheduledJobCreate) SetNillableLastStartedAt(v *time.Time) *ScheduledJobCreate

SetNillableLastStartedAt sets the "last_started_at" field if the given value is not nil.

func (*ScheduledJobCreate) SetNillableLastStatus

func (_c *ScheduledJobCreate) SetNillableLastStatus(v *scheduledjob.LastStatus) *ScheduledJobCreate

SetNillableLastStatus sets the "last_status" field if the given value is not nil.

func (*ScheduledJobCreate) SetNillablePaused

func (_c *ScheduledJobCreate) SetNillablePaused(v *bool) *ScheduledJobCreate

SetNillablePaused sets the "paused" field if the given value is not nil.

func (*ScheduledJobCreate) SetPaused

func (_c *ScheduledJobCreate) SetPaused(v bool) *ScheduledJobCreate

SetPaused sets the "paused" field.

type ScheduledJobCreateBulk

type ScheduledJobCreateBulk struct {
	// contains filtered or unexported fields
}

ScheduledJobCreateBulk is the builder for creating many ScheduledJob entities in bulk.

func (*ScheduledJobCreateBulk) Exec

Exec executes the query.

func (*ScheduledJobCreateBulk) ExecX

func (_c *ScheduledJobCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ScheduledJobCreateBulk) Save

Save creates the ScheduledJob entities in the database.

func (*ScheduledJobCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type ScheduledJobDelete

type ScheduledJobDelete struct {
	// contains filtered or unexported fields
}

ScheduledJobDelete is the builder for deleting a ScheduledJob entity.

func (*ScheduledJobDelete) Exec

func (_d *ScheduledJobDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ScheduledJobDelete) ExecX

func (_d *ScheduledJobDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ScheduledJobDelete) Where

Where appends a list predicates to the ScheduledJobDelete builder.

type ScheduledJobDeleteOne

type ScheduledJobDeleteOne struct {
	// contains filtered or unexported fields
}

ScheduledJobDeleteOne is the builder for deleting a single ScheduledJob entity.

func (*ScheduledJobDeleteOne) Exec

Exec executes the deletion query.

func (*ScheduledJobDeleteOne) ExecX

func (_d *ScheduledJobDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ScheduledJobDeleteOne) Where

Where appends a list predicates to the ScheduledJobDelete builder.

type ScheduledJobGroupBy

type ScheduledJobGroupBy struct {
	// contains filtered or unexported fields
}

ScheduledJobGroupBy is the group-by builder for ScheduledJob entities.

func (*ScheduledJobGroupBy) Aggregate

func (_g *ScheduledJobGroupBy) Aggregate(fns ...AggregateFunc) *ScheduledJobGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ScheduledJobGroupBy) Bool

func (s *ScheduledJobGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ScheduledJobGroupBy) BoolX

func (s *ScheduledJobGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ScheduledJobGroupBy) Bools

func (s *ScheduledJobGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ScheduledJobGroupBy) BoolsX

func (s *ScheduledJobGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ScheduledJobGroupBy) Float64

func (s *ScheduledJobGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ScheduledJobGroupBy) Float64X

func (s *ScheduledJobGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ScheduledJobGroupBy) Float64s

func (s *ScheduledJobGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ScheduledJobGroupBy) Float64sX

func (s *ScheduledJobGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ScheduledJobGroupBy) Int

func (s *ScheduledJobGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ScheduledJobGroupBy) IntX

func (s *ScheduledJobGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ScheduledJobGroupBy) Ints

func (s *ScheduledJobGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ScheduledJobGroupBy) IntsX

func (s *ScheduledJobGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ScheduledJobGroupBy) Scan

func (_g *ScheduledJobGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ScheduledJobGroupBy) ScanX

func (s *ScheduledJobGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ScheduledJobGroupBy) String

func (s *ScheduledJobGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ScheduledJobGroupBy) StringX

func (s *ScheduledJobGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ScheduledJobGroupBy) Strings

func (s *ScheduledJobGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ScheduledJobGroupBy) StringsX

func (s *ScheduledJobGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ScheduledJobMutation

type ScheduledJobMutation struct {
	// contains filtered or unexported fields
}

ScheduledJobMutation represents an operation that mutates the ScheduledJob nodes in the graph.

func (*ScheduledJobMutation) AddField

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) AddLastDurationMs

func (m *ScheduledJobMutation) AddLastDurationMs(u int32)

AddLastDurationMs adds u to the "last_duration_ms" field.

func (*ScheduledJobMutation) AddedEdges

func (m *ScheduledJobMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ScheduledJobMutation) AddedField

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) AddedFields

func (m *ScheduledJobMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ScheduledJobMutation) AddedIDs

func (m *ScheduledJobMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ScheduledJobMutation) AddedLastDurationMs

func (m *ScheduledJobMutation) AddedLastDurationMs() (r int32, exists bool)

AddedLastDurationMs returns the value that was added to the "last_duration_ms" field in this mutation.

func (*ScheduledJobMutation) ClearEdge

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) ClearField

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) ClearLastError

func (m *ScheduledJobMutation) ClearLastError()

ClearLastError clears the value of the "last_error" field.

func (*ScheduledJobMutation) ClearLastFinishedAt

func (m *ScheduledJobMutation) ClearLastFinishedAt()

ClearLastFinishedAt clears the value of the "last_finished_at" field.

func (*ScheduledJobMutation) ClearLastStartedAt

func (m *ScheduledJobMutation) ClearLastStartedAt()

ClearLastStartedAt clears the value of the "last_started_at" field.

func (*ScheduledJobMutation) ClearedEdges

func (m *ScheduledJobMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ScheduledJobMutation) ClearedFields

func (m *ScheduledJobMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ScheduledJobMutation) Client

func (m ScheduledJobMutation) 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 (*ScheduledJobMutation) EdgeCleared

func (m *ScheduledJobMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ScheduledJobMutation) Field

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) FieldCleared

func (m *ScheduledJobMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ScheduledJobMutation) Fields

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) ID

func (m *ScheduledJobMutation) ID() (id uint32, 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 (*ScheduledJobMutation) IDs

func (m *ScheduledJobMutation) IDs(ctx context.Context) ([]uint32, 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 (*ScheduledJobMutation) LastDurationMs

func (m *ScheduledJobMutation) LastDurationMs() (r uint32, exists bool)

LastDurationMs returns the value of the "last_duration_ms" field in the mutation.

func (*ScheduledJobMutation) LastError

func (m *ScheduledJobMutation) LastError() (r string, exists bool)

LastError returns the value of the "last_error" field in the mutation.

func (*ScheduledJobMutation) LastErrorCleared

func (m *ScheduledJobMutation) LastErrorCleared() bool

LastErrorCleared returns if the "last_error" field was cleared in this mutation.

func (*ScheduledJobMutation) LastFinishedAt

func (m *ScheduledJobMutation) LastFinishedAt() (r time.Time, exists bool)

LastFinishedAt returns the value of the "last_finished_at" field in the mutation.

func (*ScheduledJobMutation) LastFinishedAtCleared

func (m *ScheduledJobMutation) LastFinishedAtCleared() bool

LastFinishedAtCleared returns if the "last_finished_at" field was cleared in this mutation.

func (*ScheduledJobMutation) LastStartedAt

func (m *ScheduledJobMutation) LastStartedAt() (r time.Time, exists bool)

LastStartedAt returns the value of the "last_started_at" field in the mutation.

func (*ScheduledJobMutation) LastStartedAtCleared

func (m *ScheduledJobMutation) LastStartedAtCleared() bool

LastStartedAtCleared returns if the "last_started_at" field was cleared in this mutation.

func (*ScheduledJobMutation) LastStatus

func (m *ScheduledJobMutation) LastStatus() (r scheduledjob.LastStatus, exists bool)

LastStatus returns the value of the "last_status" field in the mutation.

func (*ScheduledJobMutation) Name

func (m *ScheduledJobMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*ScheduledJobMutation) OldField

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) OldLastDurationMs

func (m *ScheduledJobMutation) OldLastDurationMs(ctx context.Context) (v uint32, err error)

OldLastDurationMs returns the old "last_duration_ms" field's value of the ScheduledJob entity. If the ScheduledJob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ScheduledJobMutation) OldLastError

func (m *ScheduledJobMutation) OldLastError(ctx context.Context) (v string, err error)

OldLastError returns the old "last_error" field's value of the ScheduledJob entity. If the ScheduledJob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ScheduledJobMutation) OldLastFinishedAt

func (m *ScheduledJobMutation) OldLastFinishedAt(ctx context.Context) (v *time.Time, err error)

OldLastFinishedAt returns the old "last_finished_at" field's value of the ScheduledJob entity. If the ScheduledJob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ScheduledJobMutation) OldLastStartedAt

func (m *ScheduledJobMutation) OldLastStartedAt(ctx context.Context) (v *time.Time, err error)

OldLastStartedAt returns the old "last_started_at" field's value of the ScheduledJob entity. If the ScheduledJob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ScheduledJobMutation) OldLastStatus

func (m *ScheduledJobMutation) OldLastStatus(ctx context.Context) (v scheduledjob.LastStatus, err error)

OldLastStatus returns the old "last_status" field's value of the ScheduledJob entity. If the ScheduledJob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ScheduledJobMutation) OldName

func (m *ScheduledJobMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the ScheduledJob entity. If the ScheduledJob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ScheduledJobMutation) OldPaused

func (m *ScheduledJobMutation) OldPaused(ctx context.Context) (v bool, err error)

OldPaused returns the old "paused" field's value of the ScheduledJob entity. If the ScheduledJob object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ScheduledJobMutation) Op

func (m *ScheduledJobMutation) Op() Op

Op returns the operation name.

func (*ScheduledJobMutation) Paused

func (m *ScheduledJobMutation) Paused() (r bool, exists bool)

Paused returns the value of the "paused" field in the mutation.

func (*ScheduledJobMutation) RemovedEdges

func (m *ScheduledJobMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ScheduledJobMutation) RemovedIDs

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) ResetEdge

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) ResetField

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) ResetLastDurationMs

func (m *ScheduledJobMutation) ResetLastDurationMs()

ResetLastDurationMs resets all changes to the "last_duration_ms" field.

func (*ScheduledJobMutation) ResetLastError

func (m *ScheduledJobMutation) ResetLastError()

ResetLastError resets all changes to the "last_error" field.

func (*ScheduledJobMutation) ResetLastFinishedAt

func (m *ScheduledJobMutation) ResetLastFinishedAt()

ResetLastFinishedAt resets all changes to the "last_finished_at" field.

func (*ScheduledJobMutation) ResetLastStartedAt

func (m *ScheduledJobMutation) ResetLastStartedAt()

ResetLastStartedAt resets all changes to the "last_started_at" field.

func (*ScheduledJobMutation) ResetLastStatus

func (m *ScheduledJobMutation) ResetLastStatus()

ResetLastStatus resets all changes to the "last_status" field.

func (*ScheduledJobMutation) ResetName

func (m *ScheduledJobMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ScheduledJobMutation) ResetPaused

func (m *ScheduledJobMutation) ResetPaused()

ResetPaused resets all changes to the "paused" field.

func (*ScheduledJobMutation) SetField

func (m *ScheduledJobMutation) 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 (*ScheduledJobMutation) SetID

func (m *ScheduledJobMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ScheduledJob entities.

func (*ScheduledJobMutation) SetLastDurationMs

func (m *ScheduledJobMutation) SetLastDurationMs(u uint32)

SetLastDurationMs sets the "last_duration_ms" field.

func (*ScheduledJobMutation) SetLastError

func (m *ScheduledJobMutation) SetLastError(s string)

SetLastError sets the "last_error" field.

func (*ScheduledJobMutation) SetLastFinishedAt

func (m *ScheduledJobMutation) SetLastFinishedAt(t time.Time)

SetLastFinishedAt sets the "last_finished_at" field.

func (*ScheduledJobMutation) SetLastStartedAt

func (m *ScheduledJobMutation) SetLastStartedAt(t time.Time)

SetLastStartedAt sets the "last_started_at" field.

func (*ScheduledJobMutation) SetLastStatus

func (m *ScheduledJobMutation) SetLastStatus(ss scheduledjob.LastStatus)

SetLastStatus sets the "last_status" field.

func (*ScheduledJobMutation) SetName

func (m *ScheduledJobMutation) SetName(s string)

SetName sets the "name" field.

func (*ScheduledJobMutation) SetOp

func (m *ScheduledJobMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ScheduledJobMutation) SetPaused

func (m *ScheduledJobMutation) SetPaused(b bool)

SetPaused sets the "paused" field.

func (ScheduledJobMutation) Tx

func (m ScheduledJobMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ScheduledJobMutation) Type

func (m *ScheduledJobMutation) Type() string

Type returns the node type of this mutation (ScheduledJob).

func (*ScheduledJobMutation) Where

Where appends a list predicates to the ScheduledJobMutation builder.

func (*ScheduledJobMutation) WhereP

func (m *ScheduledJobMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ScheduledJobMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ScheduledJobQuery

type ScheduledJobQuery struct {
	// contains filtered or unexported fields
}

ScheduledJobQuery is the builder for querying ScheduledJob entities.

func (*ScheduledJobQuery) Aggregate

func (_q *ScheduledJobQuery) Aggregate(fns ...AggregateFunc) *ScheduledJobSelect

Aggregate returns a ScheduledJobSelect configured with the given aggregations.

func (*ScheduledJobQuery) All

func (_q *ScheduledJobQuery) All(ctx context.Context) ([]*ScheduledJob, error)

All executes the query and returns a list of ScheduledJobs.

func (*ScheduledJobQuery) AllX

func (_q *ScheduledJobQuery) AllX(ctx context.Context) []*ScheduledJob

AllX is like All, but panics if an error occurs.

func (*ScheduledJobQuery) Clone

func (_q *ScheduledJobQuery) Clone() *ScheduledJobQuery

Clone returns a duplicate of the ScheduledJobQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ScheduledJobQuery) Count

func (_q *ScheduledJobQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ScheduledJobQuery) CountX

func (_q *ScheduledJobQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ScheduledJobQuery) Exist

func (_q *ScheduledJobQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ScheduledJobQuery) ExistX

func (_q *ScheduledJobQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ScheduledJobQuery) First

func (_q *ScheduledJobQuery) First(ctx context.Context) (*ScheduledJob, error)

First returns the first ScheduledJob entity from the query. Returns a *NotFoundError when no ScheduledJob was found.

func (*ScheduledJobQuery) FirstID

func (_q *ScheduledJobQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first ScheduledJob ID from the query. Returns a *NotFoundError when no ScheduledJob ID was found.

func (*ScheduledJobQuery) FirstIDX

func (_q *ScheduledJobQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*ScheduledJobQuery) FirstX

func (_q *ScheduledJobQuery) FirstX(ctx context.Context) *ScheduledJob

FirstX is like First, but panics if an error occurs.

func (*ScheduledJobQuery) GroupBy

func (_q *ScheduledJobQuery) GroupBy(field string, fields ...string) *ScheduledJobGroupBy

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.ScheduledJob.Query().
	GroupBy(scheduledjob.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ScheduledJobQuery) IDs

func (_q *ScheduledJobQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of ScheduledJob IDs.

func (*ScheduledJobQuery) IDsX

func (_q *ScheduledJobQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*ScheduledJobQuery) Limit

func (_q *ScheduledJobQuery) Limit(limit int) *ScheduledJobQuery

Limit the number of records to be returned by this query.

func (*ScheduledJobQuery) Offset

func (_q *ScheduledJobQuery) Offset(offset int) *ScheduledJobQuery

Offset to start from.

func (*ScheduledJobQuery) Only

Only returns a single ScheduledJob entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ScheduledJob entity is found. Returns a *NotFoundError when no ScheduledJob entities are found.

func (*ScheduledJobQuery) OnlyID

func (_q *ScheduledJobQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only ScheduledJob ID in the query. Returns a *NotSingularError when more than one ScheduledJob ID is found. Returns a *NotFoundError when no entities are found.

func (*ScheduledJobQuery) OnlyIDX

func (_q *ScheduledJobQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ScheduledJobQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*ScheduledJobQuery) Order

Order specifies how the records should be ordered.

func (*ScheduledJobQuery) Select

func (_q *ScheduledJobQuery) Select(fields ...string) *ScheduledJobSelect

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.ScheduledJob.Query().
	Select(scheduledjob.FieldName).
	Scan(ctx, &v)

func (*ScheduledJobQuery) Unique

func (_q *ScheduledJobQuery) Unique(unique bool) *ScheduledJobQuery

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 (*ScheduledJobQuery) Where

Where adds a new predicate for the ScheduledJobQuery builder.

type ScheduledJobSelect

type ScheduledJobSelect struct {
	*ScheduledJobQuery
	// contains filtered or unexported fields
}

ScheduledJobSelect is the builder for selecting fields of ScheduledJob entities.

func (*ScheduledJobSelect) Aggregate

func (_s *ScheduledJobSelect) Aggregate(fns ...AggregateFunc) *ScheduledJobSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ScheduledJobSelect) Bool

func (s *ScheduledJobSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ScheduledJobSelect) BoolX

func (s *ScheduledJobSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ScheduledJobSelect) Bools

func (s *ScheduledJobSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ScheduledJobSelect) BoolsX

func (s *ScheduledJobSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ScheduledJobSelect) Float64

func (s *ScheduledJobSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ScheduledJobSelect) Float64X

func (s *ScheduledJobSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ScheduledJobSelect) Float64s

func (s *ScheduledJobSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ScheduledJobSelect) Float64sX

func (s *ScheduledJobSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ScheduledJobSelect) Int

func (s *ScheduledJobSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ScheduledJobSelect) IntX

func (s *ScheduledJobSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ScheduledJobSelect) Ints

func (s *ScheduledJobSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ScheduledJobSelect) IntsX

func (s *ScheduledJobSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ScheduledJobSelect) Scan

func (_s *ScheduledJobSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ScheduledJobSelect) ScanX

func (s *ScheduledJobSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ScheduledJobSelect) String

func (s *ScheduledJobSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ScheduledJobSelect) StringX

func (s *ScheduledJobSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ScheduledJobSelect) Strings

func (s *ScheduledJobSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ScheduledJobSelect) StringsX

func (s *ScheduledJobSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ScheduledJobUpdate

type ScheduledJobUpdate struct {
	// contains filtered or unexported fields
}

ScheduledJobUpdate is the builder for updating ScheduledJob entities.

func (*ScheduledJobUpdate) AddLastDurationMs

func (_u *ScheduledJobUpdate) AddLastDurationMs(v int32) *ScheduledJobUpdate

AddLastDurationMs adds value to the "last_duration_ms" field.

func (*ScheduledJobUpdate) ClearLastError

func (_u *ScheduledJobUpdate) ClearLastError() *ScheduledJobUpdate

ClearLastError clears the value of the "last_error" field.

func (*ScheduledJobUpdate) ClearLastFinishedAt

func (_u *ScheduledJobUpdate) ClearLastFinishedAt() *ScheduledJobUpdate

ClearLastFinishedAt clears the value of the "last_finished_at" field.

func (*ScheduledJobUpdate) ClearLastStartedAt

func (_u *ScheduledJobUpdate) ClearLastStartedAt() *ScheduledJobUpdate

ClearLastStartedAt clears the value of the "last_started_at" field.

func (*ScheduledJobUpdate) Exec

func (_u *ScheduledJobUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ScheduledJobUpdate) ExecX

func (_u *ScheduledJobUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ScheduledJobUpdate) Mutation

func (_u *ScheduledJobUpdate) Mutation() *ScheduledJobMutation

Mutation returns the ScheduledJobMutation object of the builder.

func (*ScheduledJobUpdate) Save

func (_u *ScheduledJobUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ScheduledJobUpdate) SaveX

func (_u *ScheduledJobUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ScheduledJobUpdate) SetLastDurationMs

func (_u *ScheduledJobUpdate) SetLastDurationMs(v uint32) *ScheduledJobUpdate

SetLastDurationMs sets the "last_duration_ms" field.

func (*ScheduledJobUpdate) SetLastError

func (_u *ScheduledJobUpdate) SetLastError(v string) *ScheduledJobUpdate

SetLastError sets the "last_error" field.

func (*ScheduledJobUpdate) SetLastFinishedAt

func (_u *ScheduledJobUpdate) SetLastFinishedAt(v time.Time) *ScheduledJobUpdate

SetLastFinishedAt sets the "last_finished_at" field.

func (*ScheduledJobUpdate) SetLastStartedAt

func (_u *ScheduledJobUpdate) SetLastStartedAt(v time.Time) *ScheduledJobUpdate

SetLastStartedAt sets the "last_started_at" field.

func (*ScheduledJobUpdate) SetLastStatus

SetLastStatus sets the "last_status" field.

func (*ScheduledJobUpdate) SetNillableLastDurationMs

func (_u *ScheduledJobUpdate) SetNillableLastDurationMs(v *uint32) *ScheduledJobUpdate

SetNillableLastDurationMs sets the "last_duration_ms" field if the given value is not nil.

func (*ScheduledJobUpdate) SetNillableLastError

func (_u *ScheduledJobUpdate) SetNillableLastError(v *string) *ScheduledJobUpdate

SetNillableLastError sets the "last_error" field if the given value is not nil.

func (*ScheduledJobUpdate) SetNillableLastFinishedAt

func (_u *ScheduledJobUpdate) SetNillableLastFinishedAt(v *time.Time) *ScheduledJobUpdate

SetNillableLastFinishedAt sets the "last_finished_at" field if the given value is not nil.

func (*ScheduledJobUpdate) SetNillableLastStartedAt

func (_u *ScheduledJobUpdate) SetNillableLastStartedAt(v *time.Time) *ScheduledJobUpdate

SetNillableLastStartedAt sets the "last_started_at" field if the given value is not nil.

func (*ScheduledJobUpdate) SetNillableLastStatus

func (_u *ScheduledJobUpdate) SetNillableLastStatus(v *scheduledjob.LastStatus) *ScheduledJobUpdate

SetNillableLastStatus sets the "last_status" field if the given value is not nil.

func (*ScheduledJobUpdate) SetNillablePaused

func (_u *ScheduledJobUpdate) SetNillablePaused(v *bool) *ScheduledJobUpdate

SetNillablePaused sets the "paused" field if the given value is not nil.

func (*ScheduledJobUpdate) SetPaused

func (_u *ScheduledJobUpdate) SetPaused(v bool) *ScheduledJobUpdate

SetPaused sets the "paused" field.

func (*ScheduledJobUpdate) Where

Where appends a list predicates to the ScheduledJobUpdate builder.

type ScheduledJobUpdateOne

type ScheduledJobUpdateOne struct {
	// contains filtered or unexported fields
}

ScheduledJobUpdateOne is the builder for updating a single ScheduledJob entity.

func (*ScheduledJobUpdateOne) AddLastDurationMs

func (_u *ScheduledJobUpdateOne) AddLastDurationMs(v int32) *ScheduledJobUpdateOne

AddLastDurationMs adds value to the "last_duration_ms" field.

func (*ScheduledJobUpdateOne) ClearLastError

func (_u *ScheduledJobUpdateOne) ClearLastError() *ScheduledJobUpdateOne

ClearLastError clears the value of the "last_error" field.

func (*ScheduledJobUpdateOne) ClearLastFinishedAt

func (_u *ScheduledJobUpdateOne) ClearLastFinishedAt() *ScheduledJobUpdateOne

ClearLastFinishedAt clears the value of the "last_finished_at" field.

func (*ScheduledJobUpdateOne) ClearLastStartedAt

func (_u *ScheduledJobUpdateOne) ClearLastStartedAt() *ScheduledJobUpdateOne

ClearLastStartedAt clears the value of the "last_started_at" field.

func (*ScheduledJobUpdateOne) Exec

Exec executes the query on the entity.

func (*ScheduledJobUpdateOne) ExecX

func (_u *ScheduledJobUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ScheduledJobUpdateOne) Mutation

Mutation returns the ScheduledJobMutation object of the builder.

func (*ScheduledJobUpdateOne) Save

Save executes the query and returns the updated ScheduledJob entity.

func (*ScheduledJobUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*ScheduledJobUpdateOne) Select

func (_u *ScheduledJobUpdateOne) Select(field string, fields ...string) *ScheduledJobUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ScheduledJobUpdateOne) SetLastDurationMs

func (_u *ScheduledJobUpdateOne) SetLastDurationMs(v uint32) *ScheduledJobUpdateOne

SetLastDurationMs sets the "last_duration_ms" field.

func (*ScheduledJobUpdateOne) SetLastError

func (_u *ScheduledJobUpdateOne) SetLastError(v string) *ScheduledJobUpdateOne

SetLastError sets the "last_error" field.

func (*ScheduledJobUpdateOne) SetLastFinishedAt

func (_u *ScheduledJobUpdateOne) SetLastFinishedAt(v time.Time) *ScheduledJobUpdateOne

SetLastFinishedAt sets the "last_finished_at" field.

func (*ScheduledJobUpdateOne) SetLastStartedAt

func (_u *ScheduledJobUpdateOne) SetLastStartedAt(v time.Time) *ScheduledJobUpdateOne

SetLastStartedAt sets the "last_started_at" field.

func (*ScheduledJobUpdateOne) SetLastStatus

SetLastStatus sets the "last_status" field.

func (*ScheduledJobUpdateOne) SetNillableLastDurationMs

func (_u *ScheduledJobUpdateOne) SetNillableLastDurationMs(v *uint32) *ScheduledJobUpdateOne

SetNillableLastDurationMs sets the "last_duration_ms" field if the given value is not nil.

func (*ScheduledJobUpdateOne) SetNillableLastError

func (_u *ScheduledJobUpdateOne) SetNillableLastError(v *string) *ScheduledJobUpdateOne

SetNillableLastError sets the "last_error" field if the given value is not nil.

func (*ScheduledJobUpdateOne) SetNillableLastFinishedAt

func (_u *ScheduledJobUpdateOne) SetNillableLastFinishedAt(v *time.Time) *ScheduledJobUpdateOne

SetNillableLastFinishedAt sets the "last_finished_at" field if the given value is not nil.

func (*ScheduledJobUpdateOne) SetNillableLastStartedAt

func (_u *ScheduledJobUpdateOne) SetNillableLastStartedAt(v *time.Time) *ScheduledJobUpdateOne

SetNillableLastStartedAt sets the "last_started_at" field if the given value is not nil.

func (*ScheduledJobUpdateOne) SetNillableLastStatus

func (_u *ScheduledJobUpdateOne) SetNillableLastStatus(v *scheduledjob.LastStatus) *ScheduledJobUpdateOne

SetNillableLastStatus sets the "last_status" field if the given value is not nil.

func (*ScheduledJobUpdateOne) SetNillablePaused

func (_u *ScheduledJobUpdateOne) SetNillablePaused(v *bool) *ScheduledJobUpdateOne

SetNillablePaused sets the "paused" field if the given value is not nil.

func (*ScheduledJobUpdateOne) SetPaused

SetPaused sets the "paused" field.

func (*ScheduledJobUpdateOne) Where

Where appends a list predicates to the ScheduledJobUpdate builder.

type ScheduledJobs

type ScheduledJobs []*ScheduledJob

ScheduledJobs is a parsable slice of ScheduledJob.

type Season

type Season struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Number holds the value of the "number" field.
	Number uint16 `json:"number,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Monitored holds the value of the "monitored" field.
	Monitored bool `json:"monitored,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SeasonQuery when eager-loading is set.
	Edges SeasonEdges `json:"edges"`
	// contains filtered or unexported fields
}

Season is the model entity for the Season schema.

func (*Season) QueryEpisodes

func (_m *Season) QueryEpisodes() *EpisodeQuery

QueryEpisodes queries the "episodes" edge of the Season entity.

func (*Season) QueryTvShow

func (_m *Season) QueryTvShow() *TVShowQuery

QueryTvShow queries the "tv_show" edge of the Season entity.

func (*Season) String

func (_m *Season) String() string

String implements the fmt.Stringer.

func (*Season) Unwrap

func (_m *Season) Unwrap() *Season

Unwrap unwraps the Season 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 (*Season) Update

func (_m *Season) Update() *SeasonUpdateOne

Update returns a builder for updating this Season. Note that you need to call Season.Unwrap() before calling this method if this Season was returned from a transaction, and the transaction was committed or rolled back.

func (*Season) Value

func (_m *Season) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Season. This includes values selected through modifiers, order, etc.

type SeasonClient

type SeasonClient struct {
	// contains filtered or unexported fields
}

SeasonClient is a client for the Season schema.

func NewSeasonClient

func NewSeasonClient(c config) *SeasonClient

NewSeasonClient returns a client for the Season from the given config.

func (*SeasonClient) Create

func (c *SeasonClient) Create() *SeasonCreate

Create returns a builder for creating a Season entity.

func (*SeasonClient) CreateBulk

func (c *SeasonClient) CreateBulk(builders ...*SeasonCreate) *SeasonCreateBulk

CreateBulk returns a builder for creating a bulk of Season entities.

func (*SeasonClient) Delete

func (c *SeasonClient) Delete() *SeasonDelete

Delete returns a delete builder for Season.

func (*SeasonClient) DeleteOne

func (c *SeasonClient) DeleteOne(_m *Season) *SeasonDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SeasonClient) DeleteOneID

func (c *SeasonClient) DeleteOneID(id uint32) *SeasonDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SeasonClient) Get

func (c *SeasonClient) Get(ctx context.Context, id uint32) (*Season, error)

Get returns a Season entity by its id.

func (*SeasonClient) GetX

func (c *SeasonClient) GetX(ctx context.Context, id uint32) *Season

GetX is like Get, but panics if an error occurs.

func (*SeasonClient) Hooks

func (c *SeasonClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SeasonClient) Intercept

func (c *SeasonClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `season.Intercept(f(g(h())))`.

func (*SeasonClient) Interceptors

func (c *SeasonClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SeasonClient) MapCreateBulk

func (c *SeasonClient) MapCreateBulk(slice any, setFunc func(*SeasonCreate, int)) *SeasonCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SeasonClient) Query

func (c *SeasonClient) Query() *SeasonQuery

Query returns a query builder for Season.

func (*SeasonClient) QueryEpisodes

func (c *SeasonClient) QueryEpisodes(_m *Season) *EpisodeQuery

QueryEpisodes queries the episodes edge of a Season.

func (*SeasonClient) QueryTvShow

func (c *SeasonClient) QueryTvShow(_m *Season) *TVShowQuery

QueryTvShow queries the tv_show edge of a Season.

func (*SeasonClient) Update

func (c *SeasonClient) Update() *SeasonUpdate

Update returns an update builder for Season.

func (*SeasonClient) UpdateOne

func (c *SeasonClient) UpdateOne(_m *Season) *SeasonUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SeasonClient) UpdateOneID

func (c *SeasonClient) UpdateOneID(id uint32) *SeasonUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SeasonClient) Use

func (c *SeasonClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `season.Hooks(f(g(h())))`.

type SeasonCreate

type SeasonCreate struct {
	// contains filtered or unexported fields
}

SeasonCreate is the builder for creating a Season entity.

func (*SeasonCreate) AddEpisodeIDs

func (_c *SeasonCreate) AddEpisodeIDs(ids ...uint32) *SeasonCreate

AddEpisodeIDs adds the "episodes" edge to the Episode entity by IDs.

func (*SeasonCreate) AddEpisodes

func (_c *SeasonCreate) AddEpisodes(v ...*Episode) *SeasonCreate

AddEpisodes adds the "episodes" edges to the Episode entity.

func (*SeasonCreate) Exec

func (_c *SeasonCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SeasonCreate) ExecX

func (_c *SeasonCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SeasonCreate) Mutation

func (_c *SeasonCreate) Mutation() *SeasonMutation

Mutation returns the SeasonMutation object of the builder.

func (*SeasonCreate) Save

func (_c *SeasonCreate) Save(ctx context.Context) (*Season, error)

Save creates the Season in the database.

func (*SeasonCreate) SaveX

func (_c *SeasonCreate) SaveX(ctx context.Context) *Season

SaveX calls Save and panics if Save returns an error.

func (*SeasonCreate) SetCreateTime

func (_c *SeasonCreate) SetCreateTime(v time.Time) *SeasonCreate

SetCreateTime sets the "create_time" field.

func (*SeasonCreate) SetID

func (_c *SeasonCreate) SetID(v uint32) *SeasonCreate

SetID sets the "id" field.

func (*SeasonCreate) SetMonitored

func (_c *SeasonCreate) SetMonitored(v bool) *SeasonCreate

SetMonitored sets the "monitored" field.

func (*SeasonCreate) SetName

func (_c *SeasonCreate) SetName(v string) *SeasonCreate

SetName sets the "name" field.

func (*SeasonCreate) SetNillableCreateTime

func (_c *SeasonCreate) SetNillableCreateTime(v *time.Time) *SeasonCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*SeasonCreate) SetNillableMonitored

func (_c *SeasonCreate) SetNillableMonitored(v *bool) *SeasonCreate

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*SeasonCreate) SetNillableName

func (_c *SeasonCreate) SetNillableName(v *string) *SeasonCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*SeasonCreate) SetNillableUpdateTime

func (_c *SeasonCreate) SetNillableUpdateTime(v *time.Time) *SeasonCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*SeasonCreate) SetNumber

func (_c *SeasonCreate) SetNumber(v uint16) *SeasonCreate

SetNumber sets the "number" field.

func (*SeasonCreate) SetTvShow

func (_c *SeasonCreate) SetTvShow(v *TVShow) *SeasonCreate

SetTvShow sets the "tv_show" edge to the TVShow entity.

func (*SeasonCreate) SetTvShowID

func (_c *SeasonCreate) SetTvShowID(id uint32) *SeasonCreate

SetTvShowID sets the "tv_show" edge to the TVShow entity by ID.

func (*SeasonCreate) SetUpdateTime

func (_c *SeasonCreate) SetUpdateTime(v time.Time) *SeasonCreate

SetUpdateTime sets the "update_time" field.

type SeasonCreateBulk

type SeasonCreateBulk struct {
	// contains filtered or unexported fields
}

SeasonCreateBulk is the builder for creating many Season entities in bulk.

func (*SeasonCreateBulk) Exec

func (_c *SeasonCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SeasonCreateBulk) ExecX

func (_c *SeasonCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SeasonCreateBulk) Save

func (_c *SeasonCreateBulk) Save(ctx context.Context) ([]*Season, error)

Save creates the Season entities in the database.

func (*SeasonCreateBulk) SaveX

func (_c *SeasonCreateBulk) SaveX(ctx context.Context) []*Season

SaveX is like Save, but panics if an error occurs.

type SeasonDelete

type SeasonDelete struct {
	// contains filtered or unexported fields
}

SeasonDelete is the builder for deleting a Season entity.

func (*SeasonDelete) Exec

func (_d *SeasonDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SeasonDelete) ExecX

func (_d *SeasonDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SeasonDelete) Where

func (_d *SeasonDelete) Where(ps ...predicate.Season) *SeasonDelete

Where appends a list predicates to the SeasonDelete builder.

type SeasonDeleteOne

type SeasonDeleteOne struct {
	// contains filtered or unexported fields
}

SeasonDeleteOne is the builder for deleting a single Season entity.

func (*SeasonDeleteOne) Exec

func (_d *SeasonDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SeasonDeleteOne) ExecX

func (_d *SeasonDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SeasonDeleteOne) Where

func (_d *SeasonDeleteOne) Where(ps ...predicate.Season) *SeasonDeleteOne

Where appends a list predicates to the SeasonDelete builder.

type SeasonEdges

type SeasonEdges struct {
	// TvShow holds the value of the tv_show edge.
	TvShow *TVShow `json:"tv_show,omitempty"`
	// Episodes holds the value of the episodes edge.
	Episodes []*Episode `json:"episodes,omitempty"`
	// contains filtered or unexported fields
}

SeasonEdges holds the relations/edges for other nodes in the graph.

func (SeasonEdges) EpisodesOrErr

func (e SeasonEdges) EpisodesOrErr() ([]*Episode, error)

EpisodesOrErr returns the Episodes value or an error if the edge was not loaded in eager-loading.

func (SeasonEdges) TvShowOrErr

func (e SeasonEdges) TvShowOrErr() (*TVShow, error)

TvShowOrErr returns the TvShow value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SeasonGroupBy

type SeasonGroupBy struct {
	// contains filtered or unexported fields
}

SeasonGroupBy is the group-by builder for Season entities.

func (*SeasonGroupBy) Aggregate

func (_g *SeasonGroupBy) Aggregate(fns ...AggregateFunc) *SeasonGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SeasonGroupBy) Bool

func (s *SeasonGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SeasonGroupBy) BoolX

func (s *SeasonGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SeasonGroupBy) Bools

func (s *SeasonGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SeasonGroupBy) BoolsX

func (s *SeasonGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SeasonGroupBy) Float64

func (s *SeasonGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SeasonGroupBy) Float64X

func (s *SeasonGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SeasonGroupBy) Float64s

func (s *SeasonGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SeasonGroupBy) Float64sX

func (s *SeasonGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SeasonGroupBy) Int

func (s *SeasonGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SeasonGroupBy) IntX

func (s *SeasonGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SeasonGroupBy) Ints

func (s *SeasonGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SeasonGroupBy) IntsX

func (s *SeasonGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SeasonGroupBy) Scan

func (_g *SeasonGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SeasonGroupBy) ScanX

func (s *SeasonGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SeasonGroupBy) String

func (s *SeasonGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SeasonGroupBy) StringX

func (s *SeasonGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SeasonGroupBy) Strings

func (s *SeasonGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SeasonGroupBy) StringsX

func (s *SeasonGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SeasonMutation

type SeasonMutation struct {
	// contains filtered or unexported fields
}

SeasonMutation represents an operation that mutates the Season nodes in the graph.

func (*SeasonMutation) AddEpisodeIDs

func (m *SeasonMutation) AddEpisodeIDs(ids ...uint32)

AddEpisodeIDs adds the "episodes" edge to the Episode entity by ids.

func (*SeasonMutation) AddField

func (m *SeasonMutation) 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 (*SeasonMutation) AddNumber

func (m *SeasonMutation) AddNumber(u int16)

AddNumber adds u to the "number" field.

func (*SeasonMutation) AddedEdges

func (m *SeasonMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SeasonMutation) AddedField

func (m *SeasonMutation) 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 (*SeasonMutation) AddedFields

func (m *SeasonMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SeasonMutation) AddedIDs

func (m *SeasonMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SeasonMutation) AddedNumber

func (m *SeasonMutation) AddedNumber() (r int16, exists bool)

AddedNumber returns the value that was added to the "number" field in this mutation.

func (*SeasonMutation) ClearEdge

func (m *SeasonMutation) 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 (*SeasonMutation) ClearEpisodes

func (m *SeasonMutation) ClearEpisodes()

ClearEpisodes clears the "episodes" edge to the Episode entity.

func (*SeasonMutation) ClearField

func (m *SeasonMutation) 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 (*SeasonMutation) ClearName

func (m *SeasonMutation) ClearName()

ClearName clears the value of the "name" field.

func (*SeasonMutation) ClearTvShow

func (m *SeasonMutation) ClearTvShow()

ClearTvShow clears the "tv_show" edge to the TVShow entity.

func (*SeasonMutation) ClearedEdges

func (m *SeasonMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SeasonMutation) ClearedFields

func (m *SeasonMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SeasonMutation) Client

func (m SeasonMutation) 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 (*SeasonMutation) CreateTime

func (m *SeasonMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*SeasonMutation) EdgeCleared

func (m *SeasonMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SeasonMutation) EpisodesCleared

func (m *SeasonMutation) EpisodesCleared() bool

EpisodesCleared reports if the "episodes" edge to the Episode entity was cleared.

func (*SeasonMutation) EpisodesIDs

func (m *SeasonMutation) EpisodesIDs() (ids []uint32)

EpisodesIDs returns the "episodes" edge IDs in the mutation.

func (*SeasonMutation) Field

func (m *SeasonMutation) 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 (*SeasonMutation) FieldCleared

func (m *SeasonMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SeasonMutation) Fields

func (m *SeasonMutation) 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 (*SeasonMutation) ID

func (m *SeasonMutation) ID() (id uint32, 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 (*SeasonMutation) IDs

func (m *SeasonMutation) IDs(ctx context.Context) ([]uint32, 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 (*SeasonMutation) Monitored

func (m *SeasonMutation) Monitored() (r bool, exists bool)

Monitored returns the value of the "monitored" field in the mutation.

func (*SeasonMutation) Name

func (m *SeasonMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SeasonMutation) NameCleared

func (m *SeasonMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*SeasonMutation) Number

func (m *SeasonMutation) Number() (r uint16, exists bool)

Number returns the value of the "number" field in the mutation.

func (*SeasonMutation) OldCreateTime

func (m *SeasonMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Season entity. If the Season object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SeasonMutation) OldField

func (m *SeasonMutation) 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 (*SeasonMutation) OldMonitored

func (m *SeasonMutation) OldMonitored(ctx context.Context) (v bool, err error)

OldMonitored returns the old "monitored" field's value of the Season entity. If the Season object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SeasonMutation) OldName

func (m *SeasonMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Season entity. If the Season object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SeasonMutation) OldNumber

func (m *SeasonMutation) OldNumber(ctx context.Context) (v uint16, err error)

OldNumber returns the old "number" field's value of the Season entity. If the Season object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SeasonMutation) OldUpdateTime

func (m *SeasonMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Season entity. If the Season object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SeasonMutation) Op

func (m *SeasonMutation) Op() Op

Op returns the operation name.

func (*SeasonMutation) RemoveEpisodeIDs

func (m *SeasonMutation) RemoveEpisodeIDs(ids ...uint32)

RemoveEpisodeIDs removes the "episodes" edge to the Episode entity by IDs.

func (*SeasonMutation) RemovedEdges

func (m *SeasonMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SeasonMutation) RemovedEpisodesIDs

func (m *SeasonMutation) RemovedEpisodesIDs() (ids []uint32)

RemovedEpisodes returns the removed IDs of the "episodes" edge to the Episode entity.

func (*SeasonMutation) RemovedIDs

func (m *SeasonMutation) 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 (*SeasonMutation) ResetCreateTime

func (m *SeasonMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*SeasonMutation) ResetEdge

func (m *SeasonMutation) 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 (*SeasonMutation) ResetEpisodes

func (m *SeasonMutation) ResetEpisodes()

ResetEpisodes resets all changes to the "episodes" edge.

func (*SeasonMutation) ResetField

func (m *SeasonMutation) 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 (*SeasonMutation) ResetMonitored

func (m *SeasonMutation) ResetMonitored()

ResetMonitored resets all changes to the "monitored" field.

func (*SeasonMutation) ResetName

func (m *SeasonMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SeasonMutation) ResetNumber

func (m *SeasonMutation) ResetNumber()

ResetNumber resets all changes to the "number" field.

func (*SeasonMutation) ResetTvShow

func (m *SeasonMutation) ResetTvShow()

ResetTvShow resets all changes to the "tv_show" edge.

func (*SeasonMutation) ResetUpdateTime

func (m *SeasonMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*SeasonMutation) SetCreateTime

func (m *SeasonMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*SeasonMutation) SetField

func (m *SeasonMutation) 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 (*SeasonMutation) SetID

func (m *SeasonMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Season entities.

func (*SeasonMutation) SetMonitored

func (m *SeasonMutation) SetMonitored(b bool)

SetMonitored sets the "monitored" field.

func (*SeasonMutation) SetName

func (m *SeasonMutation) SetName(s string)

SetName sets the "name" field.

func (*SeasonMutation) SetNumber

func (m *SeasonMutation) SetNumber(u uint16)

SetNumber sets the "number" field.

func (*SeasonMutation) SetOp

func (m *SeasonMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SeasonMutation) SetTvShowID

func (m *SeasonMutation) SetTvShowID(id uint32)

SetTvShowID sets the "tv_show" edge to the TVShow entity by id.

func (*SeasonMutation) SetUpdateTime

func (m *SeasonMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*SeasonMutation) TvShowCleared

func (m *SeasonMutation) TvShowCleared() bool

TvShowCleared reports if the "tv_show" edge to the TVShow entity was cleared.

func (*SeasonMutation) TvShowID

func (m *SeasonMutation) TvShowID() (id uint32, exists bool)

TvShowID returns the "tv_show" edge ID in the mutation.

func (*SeasonMutation) TvShowIDs

func (m *SeasonMutation) TvShowIDs() (ids []uint32)

TvShowIDs returns the "tv_show" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TvShowID instead. It exists only for internal usage by the builders.

func (SeasonMutation) Tx

func (m SeasonMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SeasonMutation) Type

func (m *SeasonMutation) Type() string

Type returns the node type of this mutation (Season).

func (*SeasonMutation) UpdateTime

func (m *SeasonMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*SeasonMutation) Where

func (m *SeasonMutation) Where(ps ...predicate.Season)

Where appends a list predicates to the SeasonMutation builder.

func (*SeasonMutation) WhereP

func (m *SeasonMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SeasonMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SeasonQuery

type SeasonQuery struct {
	// contains filtered or unexported fields
}

SeasonQuery is the builder for querying Season entities.

func (*SeasonQuery) Aggregate

func (_q *SeasonQuery) Aggregate(fns ...AggregateFunc) *SeasonSelect

Aggregate returns a SeasonSelect configured with the given aggregations.

func (*SeasonQuery) All

func (_q *SeasonQuery) All(ctx context.Context) ([]*Season, error)

All executes the query and returns a list of Seasons.

func (*SeasonQuery) AllX

func (_q *SeasonQuery) AllX(ctx context.Context) []*Season

AllX is like All, but panics if an error occurs.

func (*SeasonQuery) Clone

func (_q *SeasonQuery) Clone() *SeasonQuery

Clone returns a duplicate of the SeasonQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SeasonQuery) Count

func (_q *SeasonQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SeasonQuery) CountX

func (_q *SeasonQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SeasonQuery) Exist

func (_q *SeasonQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SeasonQuery) ExistX

func (_q *SeasonQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SeasonQuery) First

func (_q *SeasonQuery) First(ctx context.Context) (*Season, error)

First returns the first Season entity from the query. Returns a *NotFoundError when no Season was found.

func (*SeasonQuery) FirstID

func (_q *SeasonQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first Season ID from the query. Returns a *NotFoundError when no Season ID was found.

func (*SeasonQuery) FirstIDX

func (_q *SeasonQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*SeasonQuery) FirstX

func (_q *SeasonQuery) FirstX(ctx context.Context) *Season

FirstX is like First, but panics if an error occurs.

func (*SeasonQuery) GroupBy

func (_q *SeasonQuery) GroupBy(field string, fields ...string) *SeasonGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Season.Query().
	GroupBy(season.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SeasonQuery) IDs

func (_q *SeasonQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of Season IDs.

func (*SeasonQuery) IDsX

func (_q *SeasonQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*SeasonQuery) Limit

func (_q *SeasonQuery) Limit(limit int) *SeasonQuery

Limit the number of records to be returned by this query.

func (*SeasonQuery) Offset

func (_q *SeasonQuery) Offset(offset int) *SeasonQuery

Offset to start from.

func (*SeasonQuery) Only

func (_q *SeasonQuery) Only(ctx context.Context) (*Season, error)

Only returns a single Season entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Season entity is found. Returns a *NotFoundError when no Season entities are found.

func (*SeasonQuery) OnlyID

func (_q *SeasonQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only Season ID in the query. Returns a *NotSingularError when more than one Season ID is found. Returns a *NotFoundError when no entities are found.

func (*SeasonQuery) OnlyIDX

func (_q *SeasonQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SeasonQuery) OnlyX

func (_q *SeasonQuery) OnlyX(ctx context.Context) *Season

OnlyX is like Only, but panics if an error occurs.

func (*SeasonQuery) Order

func (_q *SeasonQuery) Order(o ...season.OrderOption) *SeasonQuery

Order specifies how the records should be ordered.

func (*SeasonQuery) QueryEpisodes

func (_q *SeasonQuery) QueryEpisodes() *EpisodeQuery

QueryEpisodes chains the current query on the "episodes" edge.

func (*SeasonQuery) QueryTvShow

func (_q *SeasonQuery) QueryTvShow() *TVShowQuery

QueryTvShow chains the current query on the "tv_show" edge.

func (*SeasonQuery) Select

func (_q *SeasonQuery) Select(fields ...string) *SeasonSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Season.Query().
	Select(season.FieldCreateTime).
	Scan(ctx, &v)

func (*SeasonQuery) Unique

func (_q *SeasonQuery) Unique(unique bool) *SeasonQuery

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 (*SeasonQuery) Where

func (_q *SeasonQuery) Where(ps ...predicate.Season) *SeasonQuery

Where adds a new predicate for the SeasonQuery builder.

func (*SeasonQuery) WithEpisodes

func (_q *SeasonQuery) WithEpisodes(opts ...func(*EpisodeQuery)) *SeasonQuery

WithEpisodes tells the query-builder to eager-load the nodes that are connected to the "episodes" edge. The optional arguments are used to configure the query builder of the edge.

func (*SeasonQuery) WithTvShow

func (_q *SeasonQuery) WithTvShow(opts ...func(*TVShowQuery)) *SeasonQuery

WithTvShow tells the query-builder to eager-load the nodes that are connected to the "tv_show" edge. The optional arguments are used to configure the query builder of the edge.

type SeasonSelect

type SeasonSelect struct {
	*SeasonQuery
	// contains filtered or unexported fields
}

SeasonSelect is the builder for selecting fields of Season entities.

func (*SeasonSelect) Aggregate

func (_s *SeasonSelect) Aggregate(fns ...AggregateFunc) *SeasonSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SeasonSelect) Bool

func (s *SeasonSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SeasonSelect) BoolX

func (s *SeasonSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SeasonSelect) Bools

func (s *SeasonSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SeasonSelect) BoolsX

func (s *SeasonSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SeasonSelect) Float64

func (s *SeasonSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SeasonSelect) Float64X

func (s *SeasonSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SeasonSelect) Float64s

func (s *SeasonSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SeasonSelect) Float64sX

func (s *SeasonSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SeasonSelect) Int

func (s *SeasonSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SeasonSelect) IntX

func (s *SeasonSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SeasonSelect) Ints

func (s *SeasonSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SeasonSelect) IntsX

func (s *SeasonSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SeasonSelect) Scan

func (_s *SeasonSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SeasonSelect) ScanX

func (s *SeasonSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SeasonSelect) String

func (s *SeasonSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SeasonSelect) StringX

func (s *SeasonSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SeasonSelect) Strings

func (s *SeasonSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SeasonSelect) StringsX

func (s *SeasonSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SeasonUpdate

type SeasonUpdate struct {
	// contains filtered or unexported fields
}

SeasonUpdate is the builder for updating Season entities.

func (*SeasonUpdate) AddEpisodeIDs

func (_u *SeasonUpdate) AddEpisodeIDs(ids ...uint32) *SeasonUpdate

AddEpisodeIDs adds the "episodes" edge to the Episode entity by IDs.

func (*SeasonUpdate) AddEpisodes

func (_u *SeasonUpdate) AddEpisodes(v ...*Episode) *SeasonUpdate

AddEpisodes adds the "episodes" edges to the Episode entity.

func (*SeasonUpdate) AddNumber

func (_u *SeasonUpdate) AddNumber(v int16) *SeasonUpdate

AddNumber adds value to the "number" field.

func (*SeasonUpdate) ClearEpisodes

func (_u *SeasonUpdate) ClearEpisodes() *SeasonUpdate

ClearEpisodes clears all "episodes" edges to the Episode entity.

func (*SeasonUpdate) ClearName

func (_u *SeasonUpdate) ClearName() *SeasonUpdate

ClearName clears the value of the "name" field.

func (*SeasonUpdate) ClearTvShow

func (_u *SeasonUpdate) ClearTvShow() *SeasonUpdate

ClearTvShow clears the "tv_show" edge to the TVShow entity.

func (*SeasonUpdate) Exec

func (_u *SeasonUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SeasonUpdate) ExecX

func (_u *SeasonUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SeasonUpdate) Mutation

func (_u *SeasonUpdate) Mutation() *SeasonMutation

Mutation returns the SeasonMutation object of the builder.

func (*SeasonUpdate) RemoveEpisodeIDs

func (_u *SeasonUpdate) RemoveEpisodeIDs(ids ...uint32) *SeasonUpdate

RemoveEpisodeIDs removes the "episodes" edge to Episode entities by IDs.

func (*SeasonUpdate) RemoveEpisodes

func (_u *SeasonUpdate) RemoveEpisodes(v ...*Episode) *SeasonUpdate

RemoveEpisodes removes "episodes" edges to Episode entities.

func (*SeasonUpdate) Save

func (_u *SeasonUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SeasonUpdate) SaveX

func (_u *SeasonUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SeasonUpdate) SetMonitored

func (_u *SeasonUpdate) SetMonitored(v bool) *SeasonUpdate

SetMonitored sets the "monitored" field.

func (*SeasonUpdate) SetName

func (_u *SeasonUpdate) SetName(v string) *SeasonUpdate

SetName sets the "name" field.

func (*SeasonUpdate) SetNillableMonitored

func (_u *SeasonUpdate) SetNillableMonitored(v *bool) *SeasonUpdate

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*SeasonUpdate) SetNillableName

func (_u *SeasonUpdate) SetNillableName(v *string) *SeasonUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*SeasonUpdate) SetNillableNumber

func (_u *SeasonUpdate) SetNillableNumber(v *uint16) *SeasonUpdate

SetNillableNumber sets the "number" field if the given value is not nil.

func (*SeasonUpdate) SetNumber

func (_u *SeasonUpdate) SetNumber(v uint16) *SeasonUpdate

SetNumber sets the "number" field.

func (*SeasonUpdate) SetTvShow

func (_u *SeasonUpdate) SetTvShow(v *TVShow) *SeasonUpdate

SetTvShow sets the "tv_show" edge to the TVShow entity.

func (*SeasonUpdate) SetTvShowID

func (_u *SeasonUpdate) SetTvShowID(id uint32) *SeasonUpdate

SetTvShowID sets the "tv_show" edge to the TVShow entity by ID.

func (*SeasonUpdate) SetUpdateTime

func (_u *SeasonUpdate) SetUpdateTime(v time.Time) *SeasonUpdate

SetUpdateTime sets the "update_time" field.

func (*SeasonUpdate) Where

func (_u *SeasonUpdate) Where(ps ...predicate.Season) *SeasonUpdate

Where appends a list predicates to the SeasonUpdate builder.

type SeasonUpdateOne

type SeasonUpdateOne struct {
	// contains filtered or unexported fields
}

SeasonUpdateOne is the builder for updating a single Season entity.

func (*SeasonUpdateOne) AddEpisodeIDs

func (_u *SeasonUpdateOne) AddEpisodeIDs(ids ...uint32) *SeasonUpdateOne

AddEpisodeIDs adds the "episodes" edge to the Episode entity by IDs.

func (*SeasonUpdateOne) AddEpisodes

func (_u *SeasonUpdateOne) AddEpisodes(v ...*Episode) *SeasonUpdateOne

AddEpisodes adds the "episodes" edges to the Episode entity.

func (*SeasonUpdateOne) AddNumber

func (_u *SeasonUpdateOne) AddNumber(v int16) *SeasonUpdateOne

AddNumber adds value to the "number" field.

func (*SeasonUpdateOne) ClearEpisodes

func (_u *SeasonUpdateOne) ClearEpisodes() *SeasonUpdateOne

ClearEpisodes clears all "episodes" edges to the Episode entity.

func (*SeasonUpdateOne) ClearName

func (_u *SeasonUpdateOne) ClearName() *SeasonUpdateOne

ClearName clears the value of the "name" field.

func (*SeasonUpdateOne) ClearTvShow

func (_u *SeasonUpdateOne) ClearTvShow() *SeasonUpdateOne

ClearTvShow clears the "tv_show" edge to the TVShow entity.

func (*SeasonUpdateOne) Exec

func (_u *SeasonUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SeasonUpdateOne) ExecX

func (_u *SeasonUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SeasonUpdateOne) Mutation

func (_u *SeasonUpdateOne) Mutation() *SeasonMutation

Mutation returns the SeasonMutation object of the builder.

func (*SeasonUpdateOne) RemoveEpisodeIDs

func (_u *SeasonUpdateOne) RemoveEpisodeIDs(ids ...uint32) *SeasonUpdateOne

RemoveEpisodeIDs removes the "episodes" edge to Episode entities by IDs.

func (*SeasonUpdateOne) RemoveEpisodes

func (_u *SeasonUpdateOne) RemoveEpisodes(v ...*Episode) *SeasonUpdateOne

RemoveEpisodes removes "episodes" edges to Episode entities.

func (*SeasonUpdateOne) Save

func (_u *SeasonUpdateOne) Save(ctx context.Context) (*Season, error)

Save executes the query and returns the updated Season entity.

func (*SeasonUpdateOne) SaveX

func (_u *SeasonUpdateOne) SaveX(ctx context.Context) *Season

SaveX is like Save, but panics if an error occurs.

func (*SeasonUpdateOne) Select

func (_u *SeasonUpdateOne) Select(field string, fields ...string) *SeasonUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SeasonUpdateOne) SetMonitored

func (_u *SeasonUpdateOne) SetMonitored(v bool) *SeasonUpdateOne

SetMonitored sets the "monitored" field.

func (*SeasonUpdateOne) SetName

func (_u *SeasonUpdateOne) SetName(v string) *SeasonUpdateOne

SetName sets the "name" field.

func (*SeasonUpdateOne) SetNillableMonitored

func (_u *SeasonUpdateOne) SetNillableMonitored(v *bool) *SeasonUpdateOne

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*SeasonUpdateOne) SetNillableName

func (_u *SeasonUpdateOne) SetNillableName(v *string) *SeasonUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*SeasonUpdateOne) SetNillableNumber

func (_u *SeasonUpdateOne) SetNillableNumber(v *uint16) *SeasonUpdateOne

SetNillableNumber sets the "number" field if the given value is not nil.

func (*SeasonUpdateOne) SetNumber

func (_u *SeasonUpdateOne) SetNumber(v uint16) *SeasonUpdateOne

SetNumber sets the "number" field.

func (*SeasonUpdateOne) SetTvShow

func (_u *SeasonUpdateOne) SetTvShow(v *TVShow) *SeasonUpdateOne

SetTvShow sets the "tv_show" edge to the TVShow entity.

func (*SeasonUpdateOne) SetTvShowID

func (_u *SeasonUpdateOne) SetTvShowID(id uint32) *SeasonUpdateOne

SetTvShowID sets the "tv_show" edge to the TVShow entity by ID.

func (*SeasonUpdateOne) SetUpdateTime

func (_u *SeasonUpdateOne) SetUpdateTime(v time.Time) *SeasonUpdateOne

SetUpdateTime sets the "update_time" field.

func (*SeasonUpdateOne) Where

func (_u *SeasonUpdateOne) Where(ps ...predicate.Season) *SeasonUpdateOne

Where appends a list predicates to the SeasonUpdate builder.

type Seasons

type Seasons []*Season

Seasons is a parsable slice of Season.

type Session

type Session struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Jti holds the value of the "jti" field.
	Jti string `json:"jti,omitempty"`
	// ExpiresAt holds the value of the "expires_at" field.
	ExpiresAt time.Time `json:"expires_at,omitempty"`
	// RevokedAt holds the value of the "revoked_at" field.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
	// LastSeenAt holds the value of the "last_seen_at" field.
	LastSeenAt *time.Time `json:"last_seen_at,omitempty"`
	// IP holds the value of the "ip" field.
	IP string `json:"ip,omitempty"`
	// UserAgent holds the value of the "user_agent" field.
	UserAgent string `json:"user_agent,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SessionQuery when eager-loading is set.
	Edges SessionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Session is the model entity for the Session schema.

func (*Session) QueryUser

func (_m *Session) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Session entity.

func (*Session) String

func (_m *Session) String() string

String implements the fmt.Stringer.

func (*Session) Unwrap

func (_m *Session) Unwrap() *Session

Unwrap unwraps the Session 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 (*Session) Update

func (_m *Session) Update() *SessionUpdateOne

Update returns a builder for updating this Session. Note that you need to call Session.Unwrap() before calling this method if this Session was returned from a transaction, and the transaction was committed or rolled back.

func (*Session) Value

func (_m *Session) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Session. This includes values selected through modifiers, order, etc.

type SessionClient

type SessionClient struct {
	// contains filtered or unexported fields
}

SessionClient is a client for the Session schema.

func NewSessionClient

func NewSessionClient(c config) *SessionClient

NewSessionClient returns a client for the Session from the given config.

func (*SessionClient) Create

func (c *SessionClient) Create() *SessionCreate

Create returns a builder for creating a Session entity.

func (*SessionClient) CreateBulk

func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk

CreateBulk returns a builder for creating a bulk of Session entities.

func (*SessionClient) Delete

func (c *SessionClient) Delete() *SessionDelete

Delete returns a delete builder for Session.

func (*SessionClient) DeleteOne

func (c *SessionClient) DeleteOne(_m *Session) *SessionDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SessionClient) DeleteOneID

func (c *SessionClient) DeleteOneID(id uint32) *SessionDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SessionClient) Get

func (c *SessionClient) Get(ctx context.Context, id uint32) (*Session, error)

Get returns a Session entity by its id.

func (*SessionClient) GetX

func (c *SessionClient) GetX(ctx context.Context, id uint32) *Session

GetX is like Get, but panics if an error occurs.

func (*SessionClient) Hooks

func (c *SessionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SessionClient) Intercept

func (c *SessionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `session.Intercept(f(g(h())))`.

func (*SessionClient) Interceptors

func (c *SessionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SessionClient) MapCreateBulk

func (c *SessionClient) MapCreateBulk(slice any, setFunc func(*SessionCreate, int)) *SessionCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SessionClient) Query

func (c *SessionClient) Query() *SessionQuery

Query returns a query builder for Session.

func (*SessionClient) QueryUser

func (c *SessionClient) QueryUser(_m *Session) *UserQuery

QueryUser queries the user edge of a Session.

func (*SessionClient) Update

func (c *SessionClient) Update() *SessionUpdate

Update returns an update builder for Session.

func (*SessionClient) UpdateOne

func (c *SessionClient) UpdateOne(_m *Session) *SessionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SessionClient) UpdateOneID

func (c *SessionClient) UpdateOneID(id uint32) *SessionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SessionClient) Use

func (c *SessionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `session.Hooks(f(g(h())))`.

type SessionCreate

type SessionCreate struct {
	// contains filtered or unexported fields
}

SessionCreate is the builder for creating a Session entity.

func (*SessionCreate) Exec

func (_c *SessionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionCreate) ExecX

func (_c *SessionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionCreate) Mutation

func (_c *SessionCreate) Mutation() *SessionMutation

Mutation returns the SessionMutation object of the builder.

func (*SessionCreate) Save

func (_c *SessionCreate) Save(ctx context.Context) (*Session, error)

Save creates the Session in the database.

func (*SessionCreate) SaveX

func (_c *SessionCreate) SaveX(ctx context.Context) *Session

SaveX calls Save and panics if Save returns an error.

func (*SessionCreate) SetCreateTime

func (_c *SessionCreate) SetCreateTime(v time.Time) *SessionCreate

SetCreateTime sets the "create_time" field.

func (*SessionCreate) SetExpiresAt

func (_c *SessionCreate) SetExpiresAt(v time.Time) *SessionCreate

SetExpiresAt sets the "expires_at" field.

func (*SessionCreate) SetID

func (_c *SessionCreate) SetID(v uint32) *SessionCreate

SetID sets the "id" field.

func (*SessionCreate) SetIP

func (_c *SessionCreate) SetIP(v string) *SessionCreate

SetIP sets the "ip" field.

func (*SessionCreate) SetJti

func (_c *SessionCreate) SetJti(v string) *SessionCreate

SetJti sets the "jti" field.

func (*SessionCreate) SetLastSeenAt

func (_c *SessionCreate) SetLastSeenAt(v time.Time) *SessionCreate

SetLastSeenAt sets the "last_seen_at" field.

func (*SessionCreate) SetNillableCreateTime

func (_c *SessionCreate) SetNillableCreateTime(v *time.Time) *SessionCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*SessionCreate) SetNillableIP

func (_c *SessionCreate) SetNillableIP(v *string) *SessionCreate

SetNillableIP sets the "ip" field if the given value is not nil.

func (*SessionCreate) SetNillableLastSeenAt

func (_c *SessionCreate) SetNillableLastSeenAt(v *time.Time) *SessionCreate

SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.

func (*SessionCreate) SetNillableRevokedAt

func (_c *SessionCreate) SetNillableRevokedAt(v *time.Time) *SessionCreate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*SessionCreate) SetNillableUpdateTime

func (_c *SessionCreate) SetNillableUpdateTime(v *time.Time) *SessionCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*SessionCreate) SetNillableUserAgent

func (_c *SessionCreate) SetNillableUserAgent(v *string) *SessionCreate

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*SessionCreate) SetRevokedAt

func (_c *SessionCreate) SetRevokedAt(v time.Time) *SessionCreate

SetRevokedAt sets the "revoked_at" field.

func (*SessionCreate) SetUpdateTime

func (_c *SessionCreate) SetUpdateTime(v time.Time) *SessionCreate

SetUpdateTime sets the "update_time" field.

func (*SessionCreate) SetUser

func (_c *SessionCreate) SetUser(v *User) *SessionCreate

SetUser sets the "user" edge to the User entity.

func (*SessionCreate) SetUserAgent

func (_c *SessionCreate) SetUserAgent(v string) *SessionCreate

SetUserAgent sets the "user_agent" field.

func (*SessionCreate) SetUserID

func (_c *SessionCreate) SetUserID(id uint32) *SessionCreate

SetUserID sets the "user" edge to the User entity by ID.

type SessionCreateBulk

type SessionCreateBulk struct {
	// contains filtered or unexported fields
}

SessionCreateBulk is the builder for creating many Session entities in bulk.

func (*SessionCreateBulk) Exec

func (_c *SessionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionCreateBulk) ExecX

func (_c *SessionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionCreateBulk) Save

func (_c *SessionCreateBulk) Save(ctx context.Context) ([]*Session, error)

Save creates the Session entities in the database.

func (*SessionCreateBulk) SaveX

func (_c *SessionCreateBulk) SaveX(ctx context.Context) []*Session

SaveX is like Save, but panics if an error occurs.

type SessionDelete

type SessionDelete struct {
	// contains filtered or unexported fields
}

SessionDelete is the builder for deleting a Session entity.

func (*SessionDelete) Exec

func (_d *SessionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SessionDelete) ExecX

func (_d *SessionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SessionDelete) Where

func (_d *SessionDelete) Where(ps ...predicate.Session) *SessionDelete

Where appends a list predicates to the SessionDelete builder.

type SessionDeleteOne

type SessionDeleteOne struct {
	// contains filtered or unexported fields
}

SessionDeleteOne is the builder for deleting a single Session entity.

func (*SessionDeleteOne) Exec

func (_d *SessionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SessionDeleteOne) ExecX

func (_d *SessionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionDeleteOne) Where

Where appends a list predicates to the SessionDelete builder.

type SessionEdges

type SessionEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

SessionEdges holds the relations/edges for other nodes in the graph.

func (SessionEdges) UserOrErr

func (e SessionEdges) 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 SessionGroupBy

type SessionGroupBy struct {
	// contains filtered or unexported fields
}

SessionGroupBy is the group-by builder for Session entities.

func (*SessionGroupBy) Aggregate

func (_g *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SessionGroupBy) Bool

func (s *SessionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) BoolX

func (s *SessionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SessionGroupBy) Bools

func (s *SessionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) BoolsX

func (s *SessionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SessionGroupBy) Float64

func (s *SessionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) Float64X

func (s *SessionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SessionGroupBy) Float64s

func (s *SessionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) Float64sX

func (s *SessionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SessionGroupBy) Int

func (s *SessionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) IntX

func (s *SessionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SessionGroupBy) Ints

func (s *SessionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) IntsX

func (s *SessionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SessionGroupBy) Scan

func (_g *SessionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SessionGroupBy) ScanX

func (s *SessionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SessionGroupBy) String

func (s *SessionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) StringX

func (s *SessionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SessionGroupBy) Strings

func (s *SessionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SessionGroupBy) StringsX

func (s *SessionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SessionMutation

type SessionMutation struct {
	// contains filtered or unexported fields
}

SessionMutation represents an operation that mutates the Session nodes in the graph.

func (*SessionMutation) AddField

func (m *SessionMutation) 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 (*SessionMutation) AddedEdges

func (m *SessionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SessionMutation) AddedField

func (m *SessionMutation) 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 (*SessionMutation) AddedFields

func (m *SessionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SessionMutation) AddedIDs

func (m *SessionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SessionMutation) ClearEdge

func (m *SessionMutation) 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 (*SessionMutation) ClearField

func (m *SessionMutation) 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 (*SessionMutation) ClearIP

func (m *SessionMutation) ClearIP()

ClearIP clears the value of the "ip" field.

func (*SessionMutation) ClearLastSeenAt

func (m *SessionMutation) ClearLastSeenAt()

ClearLastSeenAt clears the value of the "last_seen_at" field.

func (*SessionMutation) ClearRevokedAt

func (m *SessionMutation) ClearRevokedAt()

ClearRevokedAt clears the value of the "revoked_at" field.

func (*SessionMutation) ClearUser

func (m *SessionMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*SessionMutation) ClearUserAgent

func (m *SessionMutation) ClearUserAgent()

ClearUserAgent clears the value of the "user_agent" field.

func (*SessionMutation) ClearedEdges

func (m *SessionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SessionMutation) ClearedFields

func (m *SessionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SessionMutation) Client

func (m SessionMutation) 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 (*SessionMutation) CreateTime

func (m *SessionMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*SessionMutation) EdgeCleared

func (m *SessionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SessionMutation) ExpiresAt

func (m *SessionMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*SessionMutation) Field

func (m *SessionMutation) 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 (*SessionMutation) FieldCleared

func (m *SessionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SessionMutation) Fields

func (m *SessionMutation) 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 (*SessionMutation) ID

func (m *SessionMutation) ID() (id uint32, 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 (*SessionMutation) IDs

func (m *SessionMutation) IDs(ctx context.Context) ([]uint32, 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 (*SessionMutation) IP

func (m *SessionMutation) IP() (r string, exists bool)

IP returns the value of the "ip" field in the mutation.

func (*SessionMutation) IPCleared

func (m *SessionMutation) IPCleared() bool

IPCleared returns if the "ip" field was cleared in this mutation.

func (*SessionMutation) Jti

func (m *SessionMutation) Jti() (r string, exists bool)

Jti returns the value of the "jti" field in the mutation.

func (*SessionMutation) LastSeenAt

func (m *SessionMutation) LastSeenAt() (r time.Time, exists bool)

LastSeenAt returns the value of the "last_seen_at" field in the mutation.

func (*SessionMutation) LastSeenAtCleared

func (m *SessionMutation) LastSeenAtCleared() bool

LastSeenAtCleared returns if the "last_seen_at" field was cleared in this mutation.

func (*SessionMutation) OldCreateTime

func (m *SessionMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SessionMutation) OldExpiresAt

func (m *SessionMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)

OldExpiresAt returns the old "expires_at" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SessionMutation) OldField

func (m *SessionMutation) 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 (*SessionMutation) OldIP

func (m *SessionMutation) OldIP(ctx context.Context) (v string, err error)

OldIP returns the old "ip" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SessionMutation) OldJti

func (m *SessionMutation) OldJti(ctx context.Context) (v string, err error)

OldJti returns the old "jti" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SessionMutation) OldLastSeenAt

func (m *SessionMutation) OldLastSeenAt(ctx context.Context) (v *time.Time, err error)

OldLastSeenAt returns the old "last_seen_at" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SessionMutation) OldRevokedAt

func (m *SessionMutation) OldRevokedAt(ctx context.Context) (v *time.Time, err error)

OldRevokedAt returns the old "revoked_at" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SessionMutation) OldUpdateTime

func (m *SessionMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SessionMutation) OldUserAgent

func (m *SessionMutation) OldUserAgent(ctx context.Context) (v string, err error)

OldUserAgent returns the old "user_agent" field's value of the Session entity. If the Session object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SessionMutation) Op

func (m *SessionMutation) Op() Op

Op returns the operation name.

func (*SessionMutation) RemovedEdges

func (m *SessionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SessionMutation) RemovedIDs

func (m *SessionMutation) 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 (*SessionMutation) ResetCreateTime

func (m *SessionMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*SessionMutation) ResetEdge

func (m *SessionMutation) 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 (*SessionMutation) ResetExpiresAt

func (m *SessionMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*SessionMutation) ResetField

func (m *SessionMutation) 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 (*SessionMutation) ResetIP

func (m *SessionMutation) ResetIP()

ResetIP resets all changes to the "ip" field.

func (*SessionMutation) ResetJti

func (m *SessionMutation) ResetJti()

ResetJti resets all changes to the "jti" field.

func (*SessionMutation) ResetLastSeenAt

func (m *SessionMutation) ResetLastSeenAt()

ResetLastSeenAt resets all changes to the "last_seen_at" field.

func (*SessionMutation) ResetRevokedAt

func (m *SessionMutation) ResetRevokedAt()

ResetRevokedAt resets all changes to the "revoked_at" field.

func (*SessionMutation) ResetUpdateTime

func (m *SessionMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*SessionMutation) ResetUser

func (m *SessionMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*SessionMutation) ResetUserAgent

func (m *SessionMutation) ResetUserAgent()

ResetUserAgent resets all changes to the "user_agent" field.

func (*SessionMutation) RevokedAt

func (m *SessionMutation) RevokedAt() (r time.Time, exists bool)

RevokedAt returns the value of the "revoked_at" field in the mutation.

func (*SessionMutation) RevokedAtCleared

func (m *SessionMutation) RevokedAtCleared() bool

RevokedAtCleared returns if the "revoked_at" field was cleared in this mutation.

func (*SessionMutation) SetCreateTime

func (m *SessionMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*SessionMutation) SetExpiresAt

func (m *SessionMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*SessionMutation) SetField

func (m *SessionMutation) 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 (*SessionMutation) SetID

func (m *SessionMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Session entities.

func (*SessionMutation) SetIP

func (m *SessionMutation) SetIP(s string)

SetIP sets the "ip" field.

func (*SessionMutation) SetJti

func (m *SessionMutation) SetJti(s string)

SetJti sets the "jti" field.

func (*SessionMutation) SetLastSeenAt

func (m *SessionMutation) SetLastSeenAt(t time.Time)

SetLastSeenAt sets the "last_seen_at" field.

func (*SessionMutation) SetOp

func (m *SessionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SessionMutation) SetRevokedAt

func (m *SessionMutation) SetRevokedAt(t time.Time)

SetRevokedAt sets the "revoked_at" field.

func (*SessionMutation) SetUpdateTime

func (m *SessionMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*SessionMutation) SetUserAgent

func (m *SessionMutation) SetUserAgent(s string)

SetUserAgent sets the "user_agent" field.

func (*SessionMutation) SetUserID

func (m *SessionMutation) SetUserID(id uint32)

SetUserID sets the "user" edge to the User entity by id.

func (SessionMutation) Tx

func (m SessionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SessionMutation) Type

func (m *SessionMutation) Type() string

Type returns the node type of this mutation (Session).

func (*SessionMutation) UpdateTime

func (m *SessionMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*SessionMutation) UserAgent

func (m *SessionMutation) UserAgent() (r string, exists bool)

UserAgent returns the value of the "user_agent" field in the mutation.

func (*SessionMutation) UserAgentCleared

func (m *SessionMutation) UserAgentCleared() bool

UserAgentCleared returns if the "user_agent" field was cleared in this mutation.

func (*SessionMutation) UserCleared

func (m *SessionMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*SessionMutation) UserID

func (m *SessionMutation) UserID() (id uint32, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*SessionMutation) UserIDs

func (m *SessionMutation) UserIDs() (ids []uint32)

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 (*SessionMutation) Where

func (m *SessionMutation) Where(ps ...predicate.Session)

Where appends a list predicates to the SessionMutation builder.

func (*SessionMutation) WhereP

func (m *SessionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SessionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SessionQuery

type SessionQuery struct {
	// contains filtered or unexported fields
}

SessionQuery is the builder for querying Session entities.

func (*SessionQuery) Aggregate

func (_q *SessionQuery) Aggregate(fns ...AggregateFunc) *SessionSelect

Aggregate returns a SessionSelect configured with the given aggregations.

func (*SessionQuery) All

func (_q *SessionQuery) All(ctx context.Context) ([]*Session, error)

All executes the query and returns a list of Sessions.

func (*SessionQuery) AllX

func (_q *SessionQuery) AllX(ctx context.Context) []*Session

AllX is like All, but panics if an error occurs.

func (*SessionQuery) Clone

func (_q *SessionQuery) Clone() *SessionQuery

Clone returns a duplicate of the SessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SessionQuery) Count

func (_q *SessionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SessionQuery) CountX

func (_q *SessionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SessionQuery) Exist

func (_q *SessionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SessionQuery) ExistX

func (_q *SessionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SessionQuery) First

func (_q *SessionQuery) First(ctx context.Context) (*Session, error)

First returns the first Session entity from the query. Returns a *NotFoundError when no Session was found.

func (*SessionQuery) FirstID

func (_q *SessionQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first Session ID from the query. Returns a *NotFoundError when no Session ID was found.

func (*SessionQuery) FirstIDX

func (_q *SessionQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*SessionQuery) FirstX

func (_q *SessionQuery) FirstX(ctx context.Context) *Session

FirstX is like First, but panics if an error occurs.

func (*SessionQuery) GroupBy

func (_q *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Session.Query().
	GroupBy(session.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SessionQuery) IDs

func (_q *SessionQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of Session IDs.

func (*SessionQuery) IDsX

func (_q *SessionQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*SessionQuery) Limit

func (_q *SessionQuery) Limit(limit int) *SessionQuery

Limit the number of records to be returned by this query.

func (*SessionQuery) Offset

func (_q *SessionQuery) Offset(offset int) *SessionQuery

Offset to start from.

func (*SessionQuery) Only

func (_q *SessionQuery) Only(ctx context.Context) (*Session, error)

Only returns a single Session entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Session entity is found. Returns a *NotFoundError when no Session entities are found.

func (*SessionQuery) OnlyID

func (_q *SessionQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only Session ID in the query. Returns a *NotSingularError when more than one Session ID is found. Returns a *NotFoundError when no entities are found.

func (*SessionQuery) OnlyIDX

func (_q *SessionQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SessionQuery) OnlyX

func (_q *SessionQuery) OnlyX(ctx context.Context) *Session

OnlyX is like Only, but panics if an error occurs.

func (*SessionQuery) Order

func (_q *SessionQuery) Order(o ...session.OrderOption) *SessionQuery

Order specifies how the records should be ordered.

func (*SessionQuery) QueryUser

func (_q *SessionQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*SessionQuery) Select

func (_q *SessionQuery) Select(fields ...string) *SessionSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.Session.Query().
	Select(session.FieldCreateTime).
	Scan(ctx, &v)

func (*SessionQuery) Unique

func (_q *SessionQuery) Unique(unique bool) *SessionQuery

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 (*SessionQuery) Where

func (_q *SessionQuery) Where(ps ...predicate.Session) *SessionQuery

Where adds a new predicate for the SessionQuery builder.

func (*SessionQuery) WithUser

func (_q *SessionQuery) WithUser(opts ...func(*UserQuery)) *SessionQuery

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 SessionSelect

type SessionSelect struct {
	*SessionQuery
	// contains filtered or unexported fields
}

SessionSelect is the builder for selecting fields of Session entities.

func (*SessionSelect) Aggregate

func (_s *SessionSelect) Aggregate(fns ...AggregateFunc) *SessionSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SessionSelect) Bool

func (s *SessionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SessionSelect) BoolX

func (s *SessionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SessionSelect) Bools

func (s *SessionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SessionSelect) BoolsX

func (s *SessionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SessionSelect) Float64

func (s *SessionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SessionSelect) Float64X

func (s *SessionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SessionSelect) Float64s

func (s *SessionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SessionSelect) Float64sX

func (s *SessionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SessionSelect) Int

func (s *SessionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SessionSelect) IntX

func (s *SessionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SessionSelect) Ints

func (s *SessionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SessionSelect) IntsX

func (s *SessionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SessionSelect) Scan

func (_s *SessionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SessionSelect) ScanX

func (s *SessionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SessionSelect) String

func (s *SessionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SessionSelect) StringX

func (s *SessionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SessionSelect) Strings

func (s *SessionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SessionSelect) StringsX

func (s *SessionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SessionUpdate

type SessionUpdate struct {
	// contains filtered or unexported fields
}

SessionUpdate is the builder for updating Session entities.

func (*SessionUpdate) ClearIP

func (_u *SessionUpdate) ClearIP() *SessionUpdate

ClearIP clears the value of the "ip" field.

func (*SessionUpdate) ClearLastSeenAt

func (_u *SessionUpdate) ClearLastSeenAt() *SessionUpdate

ClearLastSeenAt clears the value of the "last_seen_at" field.

func (*SessionUpdate) ClearRevokedAt

func (_u *SessionUpdate) ClearRevokedAt() *SessionUpdate

ClearRevokedAt clears the value of the "revoked_at" field.

func (*SessionUpdate) ClearUser

func (_u *SessionUpdate) ClearUser() *SessionUpdate

ClearUser clears the "user" edge to the User entity.

func (*SessionUpdate) ClearUserAgent

func (_u *SessionUpdate) ClearUserAgent() *SessionUpdate

ClearUserAgent clears the value of the "user_agent" field.

func (*SessionUpdate) Exec

func (_u *SessionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionUpdate) ExecX

func (_u *SessionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionUpdate) Mutation

func (_u *SessionUpdate) Mutation() *SessionMutation

Mutation returns the SessionMutation object of the builder.

func (*SessionUpdate) Save

func (_u *SessionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SessionUpdate) SaveX

func (_u *SessionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SessionUpdate) SetExpiresAt

func (_u *SessionUpdate) SetExpiresAt(v time.Time) *SessionUpdate

SetExpiresAt sets the "expires_at" field.

func (*SessionUpdate) SetIP

func (_u *SessionUpdate) SetIP(v string) *SessionUpdate

SetIP sets the "ip" field.

func (*SessionUpdate) SetJti

func (_u *SessionUpdate) SetJti(v string) *SessionUpdate

SetJti sets the "jti" field.

func (*SessionUpdate) SetLastSeenAt

func (_u *SessionUpdate) SetLastSeenAt(v time.Time) *SessionUpdate

SetLastSeenAt sets the "last_seen_at" field.

func (*SessionUpdate) SetNillableExpiresAt

func (_u *SessionUpdate) SetNillableExpiresAt(v *time.Time) *SessionUpdate

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*SessionUpdate) SetNillableIP

func (_u *SessionUpdate) SetNillableIP(v *string) *SessionUpdate

SetNillableIP sets the "ip" field if the given value is not nil.

func (*SessionUpdate) SetNillableJti

func (_u *SessionUpdate) SetNillableJti(v *string) *SessionUpdate

SetNillableJti sets the "jti" field if the given value is not nil.

func (*SessionUpdate) SetNillableLastSeenAt

func (_u *SessionUpdate) SetNillableLastSeenAt(v *time.Time) *SessionUpdate

SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.

func (*SessionUpdate) SetNillableRevokedAt

func (_u *SessionUpdate) SetNillableRevokedAt(v *time.Time) *SessionUpdate

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*SessionUpdate) SetNillableUserAgent

func (_u *SessionUpdate) SetNillableUserAgent(v *string) *SessionUpdate

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*SessionUpdate) SetRevokedAt

func (_u *SessionUpdate) SetRevokedAt(v time.Time) *SessionUpdate

SetRevokedAt sets the "revoked_at" field.

func (*SessionUpdate) SetUpdateTime

func (_u *SessionUpdate) SetUpdateTime(v time.Time) *SessionUpdate

SetUpdateTime sets the "update_time" field.

func (*SessionUpdate) SetUser

func (_u *SessionUpdate) SetUser(v *User) *SessionUpdate

SetUser sets the "user" edge to the User entity.

func (*SessionUpdate) SetUserAgent

func (_u *SessionUpdate) SetUserAgent(v string) *SessionUpdate

SetUserAgent sets the "user_agent" field.

func (*SessionUpdate) SetUserID

func (_u *SessionUpdate) SetUserID(id uint32) *SessionUpdate

SetUserID sets the "user" edge to the User entity by ID.

func (*SessionUpdate) Where

func (_u *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate

Where appends a list predicates to the SessionUpdate builder.

type SessionUpdateOne

type SessionUpdateOne struct {
	// contains filtered or unexported fields
}

SessionUpdateOne is the builder for updating a single Session entity.

func (*SessionUpdateOne) ClearIP

func (_u *SessionUpdateOne) ClearIP() *SessionUpdateOne

ClearIP clears the value of the "ip" field.

func (*SessionUpdateOne) ClearLastSeenAt

func (_u *SessionUpdateOne) ClearLastSeenAt() *SessionUpdateOne

ClearLastSeenAt clears the value of the "last_seen_at" field.

func (*SessionUpdateOne) ClearRevokedAt

func (_u *SessionUpdateOne) ClearRevokedAt() *SessionUpdateOne

ClearRevokedAt clears the value of the "revoked_at" field.

func (*SessionUpdateOne) ClearUser

func (_u *SessionUpdateOne) ClearUser() *SessionUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*SessionUpdateOne) ClearUserAgent

func (_u *SessionUpdateOne) ClearUserAgent() *SessionUpdateOne

ClearUserAgent clears the value of the "user_agent" field.

func (*SessionUpdateOne) Exec

func (_u *SessionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SessionUpdateOne) ExecX

func (_u *SessionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SessionUpdateOne) Mutation

func (_u *SessionUpdateOne) Mutation() *SessionMutation

Mutation returns the SessionMutation object of the builder.

func (*SessionUpdateOne) Save

func (_u *SessionUpdateOne) Save(ctx context.Context) (*Session, error)

Save executes the query and returns the updated Session entity.

func (*SessionUpdateOne) SaveX

func (_u *SessionUpdateOne) SaveX(ctx context.Context) *Session

SaveX is like Save, but panics if an error occurs.

func (*SessionUpdateOne) Select

func (_u *SessionUpdateOne) Select(field string, fields ...string) *SessionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SessionUpdateOne) SetExpiresAt

func (_u *SessionUpdateOne) SetExpiresAt(v time.Time) *SessionUpdateOne

SetExpiresAt sets the "expires_at" field.

func (*SessionUpdateOne) SetIP

SetIP sets the "ip" field.

func (*SessionUpdateOne) SetJti

func (_u *SessionUpdateOne) SetJti(v string) *SessionUpdateOne

SetJti sets the "jti" field.

func (*SessionUpdateOne) SetLastSeenAt

func (_u *SessionUpdateOne) SetLastSeenAt(v time.Time) *SessionUpdateOne

SetLastSeenAt sets the "last_seen_at" field.

func (*SessionUpdateOne) SetNillableExpiresAt

func (_u *SessionUpdateOne) SetNillableExpiresAt(v *time.Time) *SessionUpdateOne

SetNillableExpiresAt sets the "expires_at" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableIP

func (_u *SessionUpdateOne) SetNillableIP(v *string) *SessionUpdateOne

SetNillableIP sets the "ip" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableJti

func (_u *SessionUpdateOne) SetNillableJti(v *string) *SessionUpdateOne

SetNillableJti sets the "jti" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableLastSeenAt

func (_u *SessionUpdateOne) SetNillableLastSeenAt(v *time.Time) *SessionUpdateOne

SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableRevokedAt

func (_u *SessionUpdateOne) SetNillableRevokedAt(v *time.Time) *SessionUpdateOne

SetNillableRevokedAt sets the "revoked_at" field if the given value is not nil.

func (*SessionUpdateOne) SetNillableUserAgent

func (_u *SessionUpdateOne) SetNillableUserAgent(v *string) *SessionUpdateOne

SetNillableUserAgent sets the "user_agent" field if the given value is not nil.

func (*SessionUpdateOne) SetRevokedAt

func (_u *SessionUpdateOne) SetRevokedAt(v time.Time) *SessionUpdateOne

SetRevokedAt sets the "revoked_at" field.

func (*SessionUpdateOne) SetUpdateTime

func (_u *SessionUpdateOne) SetUpdateTime(v time.Time) *SessionUpdateOne

SetUpdateTime sets the "update_time" field.

func (*SessionUpdateOne) SetUser

func (_u *SessionUpdateOne) SetUser(v *User) *SessionUpdateOne

SetUser sets the "user" edge to the User entity.

func (*SessionUpdateOne) SetUserAgent

func (_u *SessionUpdateOne) SetUserAgent(v string) *SessionUpdateOne

SetUserAgent sets the "user_agent" field.

func (*SessionUpdateOne) SetUserID

func (_u *SessionUpdateOne) SetUserID(id uint32) *SessionUpdateOne

SetUserID sets the "user" edge to the User entity by ID.

func (*SessionUpdateOne) Where

Where appends a list predicates to the SessionUpdate builder.

type Sessions

type Sessions []*Session

Sessions is a parsable slice of Session.

type TVShow

type TVShow struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// OriginalTitle holds the value of the "original_title" field.
	OriginalTitle string `json:"original_title,omitempty"`
	// Year holds the value of the "year" field.
	Year uint16 `json:"year,omitempty"`
	// Overview holds the value of the "overview" field.
	Overview string `json:"overview,omitempty"`
	// SeriesStatus holds the value of the "series_status" field.
	SeriesStatus tvshow.SeriesStatus `json:"series_status,omitempty"`
	// Type holds the value of the "type" field.
	Type tvshow.Type `json:"type,omitempty"`
	// Monitored holds the value of the "monitored" field.
	Monitored bool `json:"monitored,omitempty"`
	// TvdbID holds the value of the "tvdb_id" field.
	TvdbID uint32 `json:"tvdb_id,omitempty"`
	// PosterPath holds the value of the "poster_path" field.
	PosterPath string `json:"poster_path,omitempty"`
	// Network holds the value of the "network" field.
	Network string `json:"network,omitempty"`
	// Creator holds the value of the "creator" field.
	Creator string `json:"creator,omitempty"`
	// Runtime holds the value of the "runtime" field.
	Runtime uint16 `json:"runtime,omitempty"`
	// Rating holds the value of the "rating" field.
	Rating float64 `json:"rating,omitempty"`
	// Genres holds the value of the "genres" field.
	Genres []string `json:"genres,omitempty"`
	// LastRefreshedAt holds the value of the "last_refreshed_at" field.
	LastRefreshedAt *time.Time `json:"last_refreshed_at,omitempty"`
	// QualityProfile holds the value of the "quality_profile" field.
	QualityProfile string `json:"quality_profile,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TVShowQuery when eager-loading is set.
	Edges TVShowEdges `json:"edges"`
	// contains filtered or unexported fields
}

TVShow is the model entity for the TVShow schema.

func (*TVShow) QuerySeasons

func (_m *TVShow) QuerySeasons() *SeasonQuery

QuerySeasons queries the "seasons" edge of the TVShow entity.

func (*TVShow) String

func (_m *TVShow) String() string

String implements the fmt.Stringer.

func (*TVShow) Unwrap

func (_m *TVShow) Unwrap() *TVShow

Unwrap unwraps the TVShow 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 (*TVShow) Update

func (_m *TVShow) Update() *TVShowUpdateOne

Update returns a builder for updating this TVShow. Note that you need to call TVShow.Unwrap() before calling this method if this TVShow was returned from a transaction, and the transaction was committed or rolled back.

func (*TVShow) Value

func (_m *TVShow) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TVShow. This includes values selected through modifiers, order, etc.

type TVShowClient

type TVShowClient struct {
	// contains filtered or unexported fields
}

TVShowClient is a client for the TVShow schema.

func NewTVShowClient

func NewTVShowClient(c config) *TVShowClient

NewTVShowClient returns a client for the TVShow from the given config.

func (*TVShowClient) Create

func (c *TVShowClient) Create() *TVShowCreate

Create returns a builder for creating a TVShow entity.

func (*TVShowClient) CreateBulk

func (c *TVShowClient) CreateBulk(builders ...*TVShowCreate) *TVShowCreateBulk

CreateBulk returns a builder for creating a bulk of TVShow entities.

func (*TVShowClient) Delete

func (c *TVShowClient) Delete() *TVShowDelete

Delete returns a delete builder for TVShow.

func (*TVShowClient) DeleteOne

func (c *TVShowClient) DeleteOne(_m *TVShow) *TVShowDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*TVShowClient) DeleteOneID

func (c *TVShowClient) DeleteOneID(id uint32) *TVShowDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TVShowClient) Get

func (c *TVShowClient) Get(ctx context.Context, id uint32) (*TVShow, error)

Get returns a TVShow entity by its id.

func (*TVShowClient) GetX

func (c *TVShowClient) GetX(ctx context.Context, id uint32) *TVShow

GetX is like Get, but panics if an error occurs.

func (*TVShowClient) Hooks

func (c *TVShowClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TVShowClient) Intercept

func (c *TVShowClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tvshow.Intercept(f(g(h())))`.

func (*TVShowClient) Interceptors

func (c *TVShowClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TVShowClient) MapCreateBulk

func (c *TVShowClient) MapCreateBulk(slice any, setFunc func(*TVShowCreate, int)) *TVShowCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*TVShowClient) Query

func (c *TVShowClient) Query() *TVShowQuery

Query returns a query builder for TVShow.

func (*TVShowClient) QuerySeasons

func (c *TVShowClient) QuerySeasons(_m *TVShow) *SeasonQuery

QuerySeasons queries the seasons edge of a TVShow.

func (*TVShowClient) Update

func (c *TVShowClient) Update() *TVShowUpdate

Update returns an update builder for TVShow.

func (*TVShowClient) UpdateOne

func (c *TVShowClient) UpdateOne(_m *TVShow) *TVShowUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TVShowClient) UpdateOneID

func (c *TVShowClient) UpdateOneID(id uint32) *TVShowUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TVShowClient) Use

func (c *TVShowClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tvshow.Hooks(f(g(h())))`.

type TVShowCreate

type TVShowCreate struct {
	// contains filtered or unexported fields
}

TVShowCreate is the builder for creating a TVShow entity.

func (*TVShowCreate) AddSeasonIDs

func (_c *TVShowCreate) AddSeasonIDs(ids ...uint32) *TVShowCreate

AddSeasonIDs adds the "seasons" edge to the Season entity by IDs.

func (*TVShowCreate) AddSeasons

func (_c *TVShowCreate) AddSeasons(v ...*Season) *TVShowCreate

AddSeasons adds the "seasons" edges to the Season entity.

func (*TVShowCreate) Exec

func (_c *TVShowCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TVShowCreate) ExecX

func (_c *TVShowCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TVShowCreate) Mutation

func (_c *TVShowCreate) Mutation() *TVShowMutation

Mutation returns the TVShowMutation object of the builder.

func (*TVShowCreate) Save

func (_c *TVShowCreate) Save(ctx context.Context) (*TVShow, error)

Save creates the TVShow in the database.

func (*TVShowCreate) SaveX

func (_c *TVShowCreate) SaveX(ctx context.Context) *TVShow

SaveX calls Save and panics if Save returns an error.

func (*TVShowCreate) SetCreateTime

func (_c *TVShowCreate) SetCreateTime(v time.Time) *TVShowCreate

SetCreateTime sets the "create_time" field.

func (*TVShowCreate) SetCreator

func (_c *TVShowCreate) SetCreator(v string) *TVShowCreate

SetCreator sets the "creator" field.

func (*TVShowCreate) SetGenres

func (_c *TVShowCreate) SetGenres(v []string) *TVShowCreate

SetGenres sets the "genres" field.

func (*TVShowCreate) SetID

func (_c *TVShowCreate) SetID(v uint32) *TVShowCreate

SetID sets the "id" field.

func (*TVShowCreate) SetLastRefreshedAt

func (_c *TVShowCreate) SetLastRefreshedAt(v time.Time) *TVShowCreate

SetLastRefreshedAt sets the "last_refreshed_at" field.

func (*TVShowCreate) SetMonitored

func (_c *TVShowCreate) SetMonitored(v bool) *TVShowCreate

SetMonitored sets the "monitored" field.

func (*TVShowCreate) SetNetwork

func (_c *TVShowCreate) SetNetwork(v string) *TVShowCreate

SetNetwork sets the "network" field.

func (*TVShowCreate) SetNillableCreateTime

func (_c *TVShowCreate) SetNillableCreateTime(v *time.Time) *TVShowCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*TVShowCreate) SetNillableCreator

func (_c *TVShowCreate) SetNillableCreator(v *string) *TVShowCreate

SetNillableCreator sets the "creator" field if the given value is not nil.

func (*TVShowCreate) SetNillableLastRefreshedAt

func (_c *TVShowCreate) SetNillableLastRefreshedAt(v *time.Time) *TVShowCreate

SetNillableLastRefreshedAt sets the "last_refreshed_at" field if the given value is not nil.

func (*TVShowCreate) SetNillableMonitored

func (_c *TVShowCreate) SetNillableMonitored(v *bool) *TVShowCreate

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*TVShowCreate) SetNillableNetwork

func (_c *TVShowCreate) SetNillableNetwork(v *string) *TVShowCreate

SetNillableNetwork sets the "network" field if the given value is not nil.

func (*TVShowCreate) SetNillableOriginalTitle

func (_c *TVShowCreate) SetNillableOriginalTitle(v *string) *TVShowCreate

SetNillableOriginalTitle sets the "original_title" field if the given value is not nil.

func (*TVShowCreate) SetNillableOverview

func (_c *TVShowCreate) SetNillableOverview(v *string) *TVShowCreate

SetNillableOverview sets the "overview" field if the given value is not nil.

func (*TVShowCreate) SetNillablePosterPath

func (_c *TVShowCreate) SetNillablePosterPath(v *string) *TVShowCreate

SetNillablePosterPath sets the "poster_path" field if the given value is not nil.

func (*TVShowCreate) SetNillableQualityProfile

func (_c *TVShowCreate) SetNillableQualityProfile(v *string) *TVShowCreate

SetNillableQualityProfile sets the "quality_profile" field if the given value is not nil.

func (*TVShowCreate) SetNillableRating

func (_c *TVShowCreate) SetNillableRating(v *float64) *TVShowCreate

SetNillableRating sets the "rating" field if the given value is not nil.

func (*TVShowCreate) SetNillableRuntime

func (_c *TVShowCreate) SetNillableRuntime(v *uint16) *TVShowCreate

SetNillableRuntime sets the "runtime" field if the given value is not nil.

func (*TVShowCreate) SetNillableSeriesStatus

func (_c *TVShowCreate) SetNillableSeriesStatus(v *tvshow.SeriesStatus) *TVShowCreate

SetNillableSeriesStatus sets the "series_status" field if the given value is not nil.

func (*TVShowCreate) SetNillableType

func (_c *TVShowCreate) SetNillableType(v *tvshow.Type) *TVShowCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*TVShowCreate) SetNillableUpdateTime

func (_c *TVShowCreate) SetNillableUpdateTime(v *time.Time) *TVShowCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*TVShowCreate) SetOriginalTitle

func (_c *TVShowCreate) SetOriginalTitle(v string) *TVShowCreate

SetOriginalTitle sets the "original_title" field.

func (*TVShowCreate) SetOverview

func (_c *TVShowCreate) SetOverview(v string) *TVShowCreate

SetOverview sets the "overview" field.

func (*TVShowCreate) SetPosterPath

func (_c *TVShowCreate) SetPosterPath(v string) *TVShowCreate

SetPosterPath sets the "poster_path" field.

func (*TVShowCreate) SetQualityProfile

func (_c *TVShowCreate) SetQualityProfile(v string) *TVShowCreate

SetQualityProfile sets the "quality_profile" field.

func (*TVShowCreate) SetRating

func (_c *TVShowCreate) SetRating(v float64) *TVShowCreate

SetRating sets the "rating" field.

func (*TVShowCreate) SetRuntime

func (_c *TVShowCreate) SetRuntime(v uint16) *TVShowCreate

SetRuntime sets the "runtime" field.

func (*TVShowCreate) SetSeriesStatus

func (_c *TVShowCreate) SetSeriesStatus(v tvshow.SeriesStatus) *TVShowCreate

SetSeriesStatus sets the "series_status" field.

func (*TVShowCreate) SetTitle

func (_c *TVShowCreate) SetTitle(v string) *TVShowCreate

SetTitle sets the "title" field.

func (*TVShowCreate) SetTvdbID

func (_c *TVShowCreate) SetTvdbID(v uint32) *TVShowCreate

SetTvdbID sets the "tvdb_id" field.

func (*TVShowCreate) SetType

func (_c *TVShowCreate) SetType(v tvshow.Type) *TVShowCreate

SetType sets the "type" field.

func (*TVShowCreate) SetUpdateTime

func (_c *TVShowCreate) SetUpdateTime(v time.Time) *TVShowCreate

SetUpdateTime sets the "update_time" field.

func (*TVShowCreate) SetYear

func (_c *TVShowCreate) SetYear(v uint16) *TVShowCreate

SetYear sets the "year" field.

type TVShowCreateBulk

type TVShowCreateBulk struct {
	// contains filtered or unexported fields
}

TVShowCreateBulk is the builder for creating many TVShow entities in bulk.

func (*TVShowCreateBulk) Exec

func (_c *TVShowCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TVShowCreateBulk) ExecX

func (_c *TVShowCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TVShowCreateBulk) Save

func (_c *TVShowCreateBulk) Save(ctx context.Context) ([]*TVShow, error)

Save creates the TVShow entities in the database.

func (*TVShowCreateBulk) SaveX

func (_c *TVShowCreateBulk) SaveX(ctx context.Context) []*TVShow

SaveX is like Save, but panics if an error occurs.

type TVShowDelete

type TVShowDelete struct {
	// contains filtered or unexported fields
}

TVShowDelete is the builder for deleting a TVShow entity.

func (*TVShowDelete) Exec

func (_d *TVShowDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TVShowDelete) ExecX

func (_d *TVShowDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TVShowDelete) Where

func (_d *TVShowDelete) Where(ps ...predicate.TVShow) *TVShowDelete

Where appends a list predicates to the TVShowDelete builder.

type TVShowDeleteOne

type TVShowDeleteOne struct {
	// contains filtered or unexported fields
}

TVShowDeleteOne is the builder for deleting a single TVShow entity.

func (*TVShowDeleteOne) Exec

func (_d *TVShowDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TVShowDeleteOne) ExecX

func (_d *TVShowDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TVShowDeleteOne) Where

func (_d *TVShowDeleteOne) Where(ps ...predicate.TVShow) *TVShowDeleteOne

Where appends a list predicates to the TVShowDelete builder.

type TVShowEdges

type TVShowEdges struct {
	// Seasons holds the value of the seasons edge.
	Seasons []*Season `json:"seasons,omitempty"`
	// contains filtered or unexported fields
}

TVShowEdges holds the relations/edges for other nodes in the graph.

func (TVShowEdges) SeasonsOrErr

func (e TVShowEdges) SeasonsOrErr() ([]*Season, error)

SeasonsOrErr returns the Seasons value or an error if the edge was not loaded in eager-loading.

type TVShowGroupBy

type TVShowGroupBy struct {
	// contains filtered or unexported fields
}

TVShowGroupBy is the group-by builder for TVShow entities.

func (*TVShowGroupBy) Aggregate

func (_g *TVShowGroupBy) Aggregate(fns ...AggregateFunc) *TVShowGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*TVShowGroupBy) Bool

func (s *TVShowGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TVShowGroupBy) BoolX

func (s *TVShowGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TVShowGroupBy) Bools

func (s *TVShowGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TVShowGroupBy) BoolsX

func (s *TVShowGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TVShowGroupBy) Float64

func (s *TVShowGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TVShowGroupBy) Float64X

func (s *TVShowGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TVShowGroupBy) Float64s

func (s *TVShowGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TVShowGroupBy) Float64sX

func (s *TVShowGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TVShowGroupBy) Int

func (s *TVShowGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TVShowGroupBy) IntX

func (s *TVShowGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TVShowGroupBy) Ints

func (s *TVShowGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TVShowGroupBy) IntsX

func (s *TVShowGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TVShowGroupBy) Scan

func (_g *TVShowGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TVShowGroupBy) ScanX

func (s *TVShowGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TVShowGroupBy) String

func (s *TVShowGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TVShowGroupBy) StringX

func (s *TVShowGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TVShowGroupBy) Strings

func (s *TVShowGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TVShowGroupBy) StringsX

func (s *TVShowGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TVShowMutation

type TVShowMutation struct {
	// contains filtered or unexported fields
}

TVShowMutation represents an operation that mutates the TVShow nodes in the graph.

func (*TVShowMutation) AddField

func (m *TVShowMutation) 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 (*TVShowMutation) AddRating

func (m *TVShowMutation) AddRating(f float64)

AddRating adds f to the "rating" field.

func (*TVShowMutation) AddRuntime

func (m *TVShowMutation) AddRuntime(u int16)

AddRuntime adds u to the "runtime" field.

func (*TVShowMutation) AddSeasonIDs

func (m *TVShowMutation) AddSeasonIDs(ids ...uint32)

AddSeasonIDs adds the "seasons" edge to the Season entity by ids.

func (*TVShowMutation) AddTvdbID

func (m *TVShowMutation) AddTvdbID(u int32)

AddTvdbID adds u to the "tvdb_id" field.

func (*TVShowMutation) AddYear

func (m *TVShowMutation) AddYear(u int16)

AddYear adds u to the "year" field.

func (*TVShowMutation) AddedEdges

func (m *TVShowMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TVShowMutation) AddedField

func (m *TVShowMutation) 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 (*TVShowMutation) AddedFields

func (m *TVShowMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TVShowMutation) AddedIDs

func (m *TVShowMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TVShowMutation) AddedRating

func (m *TVShowMutation) AddedRating() (r float64, exists bool)

AddedRating returns the value that was added to the "rating" field in this mutation.

func (*TVShowMutation) AddedRuntime

func (m *TVShowMutation) AddedRuntime() (r int16, exists bool)

AddedRuntime returns the value that was added to the "runtime" field in this mutation.

func (*TVShowMutation) AddedTvdbID

func (m *TVShowMutation) AddedTvdbID() (r int32, exists bool)

AddedTvdbID returns the value that was added to the "tvdb_id" field in this mutation.

func (*TVShowMutation) AddedYear

func (m *TVShowMutation) AddedYear() (r int16, exists bool)

AddedYear returns the value that was added to the "year" field in this mutation.

func (*TVShowMutation) AppendGenres

func (m *TVShowMutation) AppendGenres(s []string)

AppendGenres adds s to the "genres" field.

func (*TVShowMutation) AppendedGenres

func (m *TVShowMutation) AppendedGenres() ([]string, bool)

AppendedGenres returns the list of values that were appended to the "genres" field in this mutation.

func (*TVShowMutation) ClearCreator

func (m *TVShowMutation) ClearCreator()

ClearCreator clears the value of the "creator" field.

func (*TVShowMutation) ClearEdge

func (m *TVShowMutation) 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 (*TVShowMutation) ClearField

func (m *TVShowMutation) 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 (*TVShowMutation) ClearGenres

func (m *TVShowMutation) ClearGenres()

ClearGenres clears the value of the "genres" field.

func (*TVShowMutation) ClearLastRefreshedAt

func (m *TVShowMutation) ClearLastRefreshedAt()

ClearLastRefreshedAt clears the value of the "last_refreshed_at" field.

func (*TVShowMutation) ClearNetwork

func (m *TVShowMutation) ClearNetwork()

ClearNetwork clears the value of the "network" field.

func (*TVShowMutation) ClearOriginalTitle

func (m *TVShowMutation) ClearOriginalTitle()

ClearOriginalTitle clears the value of the "original_title" field.

func (*TVShowMutation) ClearOverview

func (m *TVShowMutation) ClearOverview()

ClearOverview clears the value of the "overview" field.

func (*TVShowMutation) ClearPosterPath

func (m *TVShowMutation) ClearPosterPath()

ClearPosterPath clears the value of the "poster_path" field.

func (*TVShowMutation) ClearQualityProfile

func (m *TVShowMutation) ClearQualityProfile()

ClearQualityProfile clears the value of the "quality_profile" field.

func (*TVShowMutation) ClearRating

func (m *TVShowMutation) ClearRating()

ClearRating clears the value of the "rating" field.

func (*TVShowMutation) ClearRuntime

func (m *TVShowMutation) ClearRuntime()

ClearRuntime clears the value of the "runtime" field.

func (*TVShowMutation) ClearSeasons

func (m *TVShowMutation) ClearSeasons()

ClearSeasons clears the "seasons" edge to the Season entity.

func (*TVShowMutation) ClearedEdges

func (m *TVShowMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TVShowMutation) ClearedFields

func (m *TVShowMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TVShowMutation) Client

func (m TVShowMutation) 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 (*TVShowMutation) CreateTime

func (m *TVShowMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*TVShowMutation) Creator

func (m *TVShowMutation) Creator() (r string, exists bool)

Creator returns the value of the "creator" field in the mutation.

func (*TVShowMutation) CreatorCleared

func (m *TVShowMutation) CreatorCleared() bool

CreatorCleared returns if the "creator" field was cleared in this mutation.

func (*TVShowMutation) EdgeCleared

func (m *TVShowMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TVShowMutation) Field

func (m *TVShowMutation) 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 (*TVShowMutation) FieldCleared

func (m *TVShowMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TVShowMutation) Fields

func (m *TVShowMutation) 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 (*TVShowMutation) Genres

func (m *TVShowMutation) Genres() (r []string, exists bool)

Genres returns the value of the "genres" field in the mutation.

func (*TVShowMutation) GenresCleared

func (m *TVShowMutation) GenresCleared() bool

GenresCleared returns if the "genres" field was cleared in this mutation.

func (*TVShowMutation) GetType

func (m *TVShowMutation) GetType() (r tvshow.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*TVShowMutation) ID

func (m *TVShowMutation) ID() (id uint32, 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 (*TVShowMutation) IDs

func (m *TVShowMutation) IDs(ctx context.Context) ([]uint32, 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 (*TVShowMutation) LastRefreshedAt

func (m *TVShowMutation) LastRefreshedAt() (r time.Time, exists bool)

LastRefreshedAt returns the value of the "last_refreshed_at" field in the mutation.

func (*TVShowMutation) LastRefreshedAtCleared

func (m *TVShowMutation) LastRefreshedAtCleared() bool

LastRefreshedAtCleared returns if the "last_refreshed_at" field was cleared in this mutation.

func (*TVShowMutation) Monitored

func (m *TVShowMutation) Monitored() (r bool, exists bool)

Monitored returns the value of the "monitored" field in the mutation.

func (*TVShowMutation) Network

func (m *TVShowMutation) Network() (r string, exists bool)

Network returns the value of the "network" field in the mutation.

func (*TVShowMutation) NetworkCleared

func (m *TVShowMutation) NetworkCleared() bool

NetworkCleared returns if the "network" field was cleared in this mutation.

func (*TVShowMutation) OldCreateTime

func (m *TVShowMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldCreator

func (m *TVShowMutation) OldCreator(ctx context.Context) (v string, err error)

OldCreator returns the old "creator" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldField

func (m *TVShowMutation) 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 (*TVShowMutation) OldGenres

func (m *TVShowMutation) OldGenres(ctx context.Context) (v []string, err error)

OldGenres returns the old "genres" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldLastRefreshedAt

func (m *TVShowMutation) OldLastRefreshedAt(ctx context.Context) (v *time.Time, err error)

OldLastRefreshedAt returns the old "last_refreshed_at" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldMonitored

func (m *TVShowMutation) OldMonitored(ctx context.Context) (v bool, err error)

OldMonitored returns the old "monitored" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldNetwork

func (m *TVShowMutation) OldNetwork(ctx context.Context) (v string, err error)

OldNetwork returns the old "network" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldOriginalTitle

func (m *TVShowMutation) OldOriginalTitle(ctx context.Context) (v string, err error)

OldOriginalTitle returns the old "original_title" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldOverview

func (m *TVShowMutation) OldOverview(ctx context.Context) (v string, err error)

OldOverview returns the old "overview" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldPosterPath

func (m *TVShowMutation) OldPosterPath(ctx context.Context) (v string, err error)

OldPosterPath returns the old "poster_path" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldQualityProfile

func (m *TVShowMutation) OldQualityProfile(ctx context.Context) (v string, err error)

OldQualityProfile returns the old "quality_profile" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldRating

func (m *TVShowMutation) OldRating(ctx context.Context) (v float64, err error)

OldRating returns the old "rating" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldRuntime

func (m *TVShowMutation) OldRuntime(ctx context.Context) (v uint16, err error)

OldRuntime returns the old "runtime" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldSeriesStatus

func (m *TVShowMutation) OldSeriesStatus(ctx context.Context) (v tvshow.SeriesStatus, err error)

OldSeriesStatus returns the old "series_status" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldTitle

func (m *TVShowMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldTvdbID

func (m *TVShowMutation) OldTvdbID(ctx context.Context) (v uint32, err error)

OldTvdbID returns the old "tvdb_id" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldType

func (m *TVShowMutation) OldType(ctx context.Context) (v tvshow.Type, err error)

OldType returns the old "type" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldUpdateTime

func (m *TVShowMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) OldYear

func (m *TVShowMutation) OldYear(ctx context.Context) (v uint16, err error)

OldYear returns the old "year" field's value of the TVShow entity. If the TVShow object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TVShowMutation) Op

func (m *TVShowMutation) Op() Op

Op returns the operation name.

func (*TVShowMutation) OriginalTitle

func (m *TVShowMutation) OriginalTitle() (r string, exists bool)

OriginalTitle returns the value of the "original_title" field in the mutation.

func (*TVShowMutation) OriginalTitleCleared

func (m *TVShowMutation) OriginalTitleCleared() bool

OriginalTitleCleared returns if the "original_title" field was cleared in this mutation.

func (*TVShowMutation) Overview

func (m *TVShowMutation) Overview() (r string, exists bool)

Overview returns the value of the "overview" field in the mutation.

func (*TVShowMutation) OverviewCleared

func (m *TVShowMutation) OverviewCleared() bool

OverviewCleared returns if the "overview" field was cleared in this mutation.

func (*TVShowMutation) PosterPath

func (m *TVShowMutation) PosterPath() (r string, exists bool)

PosterPath returns the value of the "poster_path" field in the mutation.

func (*TVShowMutation) PosterPathCleared

func (m *TVShowMutation) PosterPathCleared() bool

PosterPathCleared returns if the "poster_path" field was cleared in this mutation.

func (*TVShowMutation) QualityProfile

func (m *TVShowMutation) QualityProfile() (r string, exists bool)

QualityProfile returns the value of the "quality_profile" field in the mutation.

func (*TVShowMutation) QualityProfileCleared

func (m *TVShowMutation) QualityProfileCleared() bool

QualityProfileCleared returns if the "quality_profile" field was cleared in this mutation.

func (*TVShowMutation) Rating

func (m *TVShowMutation) Rating() (r float64, exists bool)

Rating returns the value of the "rating" field in the mutation.

func (*TVShowMutation) RatingCleared

func (m *TVShowMutation) RatingCleared() bool

RatingCleared returns if the "rating" field was cleared in this mutation.

func (*TVShowMutation) RemoveSeasonIDs

func (m *TVShowMutation) RemoveSeasonIDs(ids ...uint32)

RemoveSeasonIDs removes the "seasons" edge to the Season entity by IDs.

func (*TVShowMutation) RemovedEdges

func (m *TVShowMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TVShowMutation) RemovedIDs

func (m *TVShowMutation) 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 (*TVShowMutation) RemovedSeasonsIDs

func (m *TVShowMutation) RemovedSeasonsIDs() (ids []uint32)

RemovedSeasons returns the removed IDs of the "seasons" edge to the Season entity.

func (*TVShowMutation) ResetCreateTime

func (m *TVShowMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*TVShowMutation) ResetCreator

func (m *TVShowMutation) ResetCreator()

ResetCreator resets all changes to the "creator" field.

func (*TVShowMutation) ResetEdge

func (m *TVShowMutation) 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 (*TVShowMutation) ResetField

func (m *TVShowMutation) 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 (*TVShowMutation) ResetGenres

func (m *TVShowMutation) ResetGenres()

ResetGenres resets all changes to the "genres" field.

func (*TVShowMutation) ResetLastRefreshedAt

func (m *TVShowMutation) ResetLastRefreshedAt()

ResetLastRefreshedAt resets all changes to the "last_refreshed_at" field.

func (*TVShowMutation) ResetMonitored

func (m *TVShowMutation) ResetMonitored()

ResetMonitored resets all changes to the "monitored" field.

func (*TVShowMutation) ResetNetwork

func (m *TVShowMutation) ResetNetwork()

ResetNetwork resets all changes to the "network" field.

func (*TVShowMutation) ResetOriginalTitle

func (m *TVShowMutation) ResetOriginalTitle()

ResetOriginalTitle resets all changes to the "original_title" field.

func (*TVShowMutation) ResetOverview

func (m *TVShowMutation) ResetOverview()

ResetOverview resets all changes to the "overview" field.

func (*TVShowMutation) ResetPosterPath

func (m *TVShowMutation) ResetPosterPath()

ResetPosterPath resets all changes to the "poster_path" field.

func (*TVShowMutation) ResetQualityProfile

func (m *TVShowMutation) ResetQualityProfile()

ResetQualityProfile resets all changes to the "quality_profile" field.

func (*TVShowMutation) ResetRating

func (m *TVShowMutation) ResetRating()

ResetRating resets all changes to the "rating" field.

func (*TVShowMutation) ResetRuntime

func (m *TVShowMutation) ResetRuntime()

ResetRuntime resets all changes to the "runtime" field.

func (*TVShowMutation) ResetSeasons

func (m *TVShowMutation) ResetSeasons()

ResetSeasons resets all changes to the "seasons" edge.

func (*TVShowMutation) ResetSeriesStatus

func (m *TVShowMutation) ResetSeriesStatus()

ResetSeriesStatus resets all changes to the "series_status" field.

func (*TVShowMutation) ResetTitle

func (m *TVShowMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*TVShowMutation) ResetTvdbID

func (m *TVShowMutation) ResetTvdbID()

ResetTvdbID resets all changes to the "tvdb_id" field.

func (*TVShowMutation) ResetType

func (m *TVShowMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*TVShowMutation) ResetUpdateTime

func (m *TVShowMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*TVShowMutation) ResetYear

func (m *TVShowMutation) ResetYear()

ResetYear resets all changes to the "year" field.

func (*TVShowMutation) Runtime

func (m *TVShowMutation) Runtime() (r uint16, exists bool)

Runtime returns the value of the "runtime" field in the mutation.

func (*TVShowMutation) RuntimeCleared

func (m *TVShowMutation) RuntimeCleared() bool

RuntimeCleared returns if the "runtime" field was cleared in this mutation.

func (*TVShowMutation) SeasonsCleared

func (m *TVShowMutation) SeasonsCleared() bool

SeasonsCleared reports if the "seasons" edge to the Season entity was cleared.

func (*TVShowMutation) SeasonsIDs

func (m *TVShowMutation) SeasonsIDs() (ids []uint32)

SeasonsIDs returns the "seasons" edge IDs in the mutation.

func (*TVShowMutation) SeriesStatus

func (m *TVShowMutation) SeriesStatus() (r tvshow.SeriesStatus, exists bool)

SeriesStatus returns the value of the "series_status" field in the mutation.

func (*TVShowMutation) SetCreateTime

func (m *TVShowMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*TVShowMutation) SetCreator

func (m *TVShowMutation) SetCreator(s string)

SetCreator sets the "creator" field.

func (*TVShowMutation) SetField

func (m *TVShowMutation) 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 (*TVShowMutation) SetGenres

func (m *TVShowMutation) SetGenres(s []string)

SetGenres sets the "genres" field.

func (*TVShowMutation) SetID

func (m *TVShowMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of TVShow entities.

func (*TVShowMutation) SetLastRefreshedAt

func (m *TVShowMutation) SetLastRefreshedAt(t time.Time)

SetLastRefreshedAt sets the "last_refreshed_at" field.

func (*TVShowMutation) SetMonitored

func (m *TVShowMutation) SetMonitored(b bool)

SetMonitored sets the "monitored" field.

func (*TVShowMutation) SetNetwork

func (m *TVShowMutation) SetNetwork(s string)

SetNetwork sets the "network" field.

func (*TVShowMutation) SetOp

func (m *TVShowMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TVShowMutation) SetOriginalTitle

func (m *TVShowMutation) SetOriginalTitle(s string)

SetOriginalTitle sets the "original_title" field.

func (*TVShowMutation) SetOverview

func (m *TVShowMutation) SetOverview(s string)

SetOverview sets the "overview" field.

func (*TVShowMutation) SetPosterPath

func (m *TVShowMutation) SetPosterPath(s string)

SetPosterPath sets the "poster_path" field.

func (*TVShowMutation) SetQualityProfile

func (m *TVShowMutation) SetQualityProfile(s string)

SetQualityProfile sets the "quality_profile" field.

func (*TVShowMutation) SetRating

func (m *TVShowMutation) SetRating(f float64)

SetRating sets the "rating" field.

func (*TVShowMutation) SetRuntime

func (m *TVShowMutation) SetRuntime(u uint16)

SetRuntime sets the "runtime" field.

func (*TVShowMutation) SetSeriesStatus

func (m *TVShowMutation) SetSeriesStatus(ts tvshow.SeriesStatus)

SetSeriesStatus sets the "series_status" field.

func (*TVShowMutation) SetTitle

func (m *TVShowMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*TVShowMutation) SetTvdbID

func (m *TVShowMutation) SetTvdbID(u uint32)

SetTvdbID sets the "tvdb_id" field.

func (*TVShowMutation) SetType

func (m *TVShowMutation) SetType(t tvshow.Type)

SetType sets the "type" field.

func (*TVShowMutation) SetUpdateTime

func (m *TVShowMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*TVShowMutation) SetYear

func (m *TVShowMutation) SetYear(u uint16)

SetYear sets the "year" field.

func (*TVShowMutation) Title

func (m *TVShowMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (*TVShowMutation) TvdbID

func (m *TVShowMutation) TvdbID() (r uint32, exists bool)

TvdbID returns the value of the "tvdb_id" field in the mutation.

func (TVShowMutation) Tx

func (m TVShowMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TVShowMutation) Type

func (m *TVShowMutation) Type() string

Type returns the node type of this mutation (TVShow).

func (*TVShowMutation) UpdateTime

func (m *TVShowMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*TVShowMutation) Where

func (m *TVShowMutation) Where(ps ...predicate.TVShow)

Where appends a list predicates to the TVShowMutation builder.

func (*TVShowMutation) WhereP

func (m *TVShowMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TVShowMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

func (*TVShowMutation) Year

func (m *TVShowMutation) Year() (r uint16, exists bool)

Year returns the value of the "year" field in the mutation.

type TVShowQuery

type TVShowQuery struct {
	// contains filtered or unexported fields
}

TVShowQuery is the builder for querying TVShow entities.

func (*TVShowQuery) Aggregate

func (_q *TVShowQuery) Aggregate(fns ...AggregateFunc) *TVShowSelect

Aggregate returns a TVShowSelect configured with the given aggregations.

func (*TVShowQuery) All

func (_q *TVShowQuery) All(ctx context.Context) ([]*TVShow, error)

All executes the query and returns a list of TVShows.

func (*TVShowQuery) AllX

func (_q *TVShowQuery) AllX(ctx context.Context) []*TVShow

AllX is like All, but panics if an error occurs.

func (*TVShowQuery) Clone

func (_q *TVShowQuery) Clone() *TVShowQuery

Clone returns a duplicate of the TVShowQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TVShowQuery) Count

func (_q *TVShowQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TVShowQuery) CountX

func (_q *TVShowQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TVShowQuery) Exist

func (_q *TVShowQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TVShowQuery) ExistX

func (_q *TVShowQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TVShowQuery) First

func (_q *TVShowQuery) First(ctx context.Context) (*TVShow, error)

First returns the first TVShow entity from the query. Returns a *NotFoundError when no TVShow was found.

func (*TVShowQuery) FirstID

func (_q *TVShowQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first TVShow ID from the query. Returns a *NotFoundError when no TVShow ID was found.

func (*TVShowQuery) FirstIDX

func (_q *TVShowQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*TVShowQuery) FirstX

func (_q *TVShowQuery) FirstX(ctx context.Context) *TVShow

FirstX is like First, but panics if an error occurs.

func (*TVShowQuery) GroupBy

func (_q *TVShowQuery) GroupBy(field string, fields ...string) *TVShowGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TVShow.Query().
	GroupBy(tvshow.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TVShowQuery) IDs

func (_q *TVShowQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of TVShow IDs.

func (*TVShowQuery) IDsX

func (_q *TVShowQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*TVShowQuery) Limit

func (_q *TVShowQuery) Limit(limit int) *TVShowQuery

Limit the number of records to be returned by this query.

func (*TVShowQuery) Offset

func (_q *TVShowQuery) Offset(offset int) *TVShowQuery

Offset to start from.

func (*TVShowQuery) Only

func (_q *TVShowQuery) Only(ctx context.Context) (*TVShow, error)

Only returns a single TVShow entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TVShow entity is found. Returns a *NotFoundError when no TVShow entities are found.

func (*TVShowQuery) OnlyID

func (_q *TVShowQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only TVShow ID in the query. Returns a *NotSingularError when more than one TVShow ID is found. Returns a *NotFoundError when no entities are found.

func (*TVShowQuery) OnlyIDX

func (_q *TVShowQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TVShowQuery) OnlyX

func (_q *TVShowQuery) OnlyX(ctx context.Context) *TVShow

OnlyX is like Only, but panics if an error occurs.

func (*TVShowQuery) Order

func (_q *TVShowQuery) Order(o ...tvshow.OrderOption) *TVShowQuery

Order specifies how the records should be ordered.

func (*TVShowQuery) QuerySeasons

func (_q *TVShowQuery) QuerySeasons() *SeasonQuery

QuerySeasons chains the current query on the "seasons" edge.

func (*TVShowQuery) Select

func (_q *TVShowQuery) Select(fields ...string) *TVShowSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.TVShow.Query().
	Select(tvshow.FieldCreateTime).
	Scan(ctx, &v)

func (*TVShowQuery) Unique

func (_q *TVShowQuery) Unique(unique bool) *TVShowQuery

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 (*TVShowQuery) Where

func (_q *TVShowQuery) Where(ps ...predicate.TVShow) *TVShowQuery

Where adds a new predicate for the TVShowQuery builder.

func (*TVShowQuery) WithSeasons

func (_q *TVShowQuery) WithSeasons(opts ...func(*SeasonQuery)) *TVShowQuery

WithSeasons tells the query-builder to eager-load the nodes that are connected to the "seasons" edge. The optional arguments are used to configure the query builder of the edge.

type TVShowSelect

type TVShowSelect struct {
	*TVShowQuery
	// contains filtered or unexported fields
}

TVShowSelect is the builder for selecting fields of TVShow entities.

func (*TVShowSelect) Aggregate

func (_s *TVShowSelect) Aggregate(fns ...AggregateFunc) *TVShowSelect

Aggregate adds the given aggregation functions to the selector query.

func (*TVShowSelect) Bool

func (s *TVShowSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TVShowSelect) BoolX

func (s *TVShowSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TVShowSelect) Bools

func (s *TVShowSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TVShowSelect) BoolsX

func (s *TVShowSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TVShowSelect) Float64

func (s *TVShowSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TVShowSelect) Float64X

func (s *TVShowSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TVShowSelect) Float64s

func (s *TVShowSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TVShowSelect) Float64sX

func (s *TVShowSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TVShowSelect) Int

func (s *TVShowSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TVShowSelect) IntX

func (s *TVShowSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TVShowSelect) Ints

func (s *TVShowSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TVShowSelect) IntsX

func (s *TVShowSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TVShowSelect) Scan

func (_s *TVShowSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TVShowSelect) ScanX

func (s *TVShowSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TVShowSelect) String

func (s *TVShowSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TVShowSelect) StringX

func (s *TVShowSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TVShowSelect) Strings

func (s *TVShowSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TVShowSelect) StringsX

func (s *TVShowSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TVShowUpdate

type TVShowUpdate struct {
	// contains filtered or unexported fields
}

TVShowUpdate is the builder for updating TVShow entities.

func (*TVShowUpdate) AddRating

func (_u *TVShowUpdate) AddRating(v float64) *TVShowUpdate

AddRating adds value to the "rating" field.

func (*TVShowUpdate) AddRuntime

func (_u *TVShowUpdate) AddRuntime(v int16) *TVShowUpdate

AddRuntime adds value to the "runtime" field.

func (*TVShowUpdate) AddSeasonIDs

func (_u *TVShowUpdate) AddSeasonIDs(ids ...uint32) *TVShowUpdate

AddSeasonIDs adds the "seasons" edge to the Season entity by IDs.

func (*TVShowUpdate) AddSeasons

func (_u *TVShowUpdate) AddSeasons(v ...*Season) *TVShowUpdate

AddSeasons adds the "seasons" edges to the Season entity.

func (*TVShowUpdate) AddTvdbID

func (_u *TVShowUpdate) AddTvdbID(v int32) *TVShowUpdate

AddTvdbID adds value to the "tvdb_id" field.

func (*TVShowUpdate) AddYear

func (_u *TVShowUpdate) AddYear(v int16) *TVShowUpdate

AddYear adds value to the "year" field.

func (*TVShowUpdate) AppendGenres

func (_u *TVShowUpdate) AppendGenres(v []string) *TVShowUpdate

AppendGenres appends value to the "genres" field.

func (*TVShowUpdate) ClearCreator

func (_u *TVShowUpdate) ClearCreator() *TVShowUpdate

ClearCreator clears the value of the "creator" field.

func (*TVShowUpdate) ClearGenres

func (_u *TVShowUpdate) ClearGenres() *TVShowUpdate

ClearGenres clears the value of the "genres" field.

func (*TVShowUpdate) ClearLastRefreshedAt

func (_u *TVShowUpdate) ClearLastRefreshedAt() *TVShowUpdate

ClearLastRefreshedAt clears the value of the "last_refreshed_at" field.

func (*TVShowUpdate) ClearNetwork

func (_u *TVShowUpdate) ClearNetwork() *TVShowUpdate

ClearNetwork clears the value of the "network" field.

func (*TVShowUpdate) ClearOriginalTitle

func (_u *TVShowUpdate) ClearOriginalTitle() *TVShowUpdate

ClearOriginalTitle clears the value of the "original_title" field.

func (*TVShowUpdate) ClearOverview

func (_u *TVShowUpdate) ClearOverview() *TVShowUpdate

ClearOverview clears the value of the "overview" field.

func (*TVShowUpdate) ClearPosterPath

func (_u *TVShowUpdate) ClearPosterPath() *TVShowUpdate

ClearPosterPath clears the value of the "poster_path" field.

func (*TVShowUpdate) ClearQualityProfile

func (_u *TVShowUpdate) ClearQualityProfile() *TVShowUpdate

ClearQualityProfile clears the value of the "quality_profile" field.

func (*TVShowUpdate) ClearRating

func (_u *TVShowUpdate) ClearRating() *TVShowUpdate

ClearRating clears the value of the "rating" field.

func (*TVShowUpdate) ClearRuntime

func (_u *TVShowUpdate) ClearRuntime() *TVShowUpdate

ClearRuntime clears the value of the "runtime" field.

func (*TVShowUpdate) ClearSeasons

func (_u *TVShowUpdate) ClearSeasons() *TVShowUpdate

ClearSeasons clears all "seasons" edges to the Season entity.

func (*TVShowUpdate) Exec

func (_u *TVShowUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TVShowUpdate) ExecX

func (_u *TVShowUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TVShowUpdate) Mutation

func (_u *TVShowUpdate) Mutation() *TVShowMutation

Mutation returns the TVShowMutation object of the builder.

func (*TVShowUpdate) RemoveSeasonIDs

func (_u *TVShowUpdate) RemoveSeasonIDs(ids ...uint32) *TVShowUpdate

RemoveSeasonIDs removes the "seasons" edge to Season entities by IDs.

func (*TVShowUpdate) RemoveSeasons

func (_u *TVShowUpdate) RemoveSeasons(v ...*Season) *TVShowUpdate

RemoveSeasons removes "seasons" edges to Season entities.

func (*TVShowUpdate) Save

func (_u *TVShowUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TVShowUpdate) SaveX

func (_u *TVShowUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TVShowUpdate) SetCreator

func (_u *TVShowUpdate) SetCreator(v string) *TVShowUpdate

SetCreator sets the "creator" field.

func (*TVShowUpdate) SetGenres

func (_u *TVShowUpdate) SetGenres(v []string) *TVShowUpdate

SetGenres sets the "genres" field.

func (*TVShowUpdate) SetLastRefreshedAt

func (_u *TVShowUpdate) SetLastRefreshedAt(v time.Time) *TVShowUpdate

SetLastRefreshedAt sets the "last_refreshed_at" field.

func (*TVShowUpdate) SetMonitored

func (_u *TVShowUpdate) SetMonitored(v bool) *TVShowUpdate

SetMonitored sets the "monitored" field.

func (*TVShowUpdate) SetNetwork

func (_u *TVShowUpdate) SetNetwork(v string) *TVShowUpdate

SetNetwork sets the "network" field.

func (*TVShowUpdate) SetNillableCreator

func (_u *TVShowUpdate) SetNillableCreator(v *string) *TVShowUpdate

SetNillableCreator sets the "creator" field if the given value is not nil.

func (*TVShowUpdate) SetNillableLastRefreshedAt

func (_u *TVShowUpdate) SetNillableLastRefreshedAt(v *time.Time) *TVShowUpdate

SetNillableLastRefreshedAt sets the "last_refreshed_at" field if the given value is not nil.

func (*TVShowUpdate) SetNillableMonitored

func (_u *TVShowUpdate) SetNillableMonitored(v *bool) *TVShowUpdate

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*TVShowUpdate) SetNillableNetwork

func (_u *TVShowUpdate) SetNillableNetwork(v *string) *TVShowUpdate

SetNillableNetwork sets the "network" field if the given value is not nil.

func (*TVShowUpdate) SetNillableOriginalTitle

func (_u *TVShowUpdate) SetNillableOriginalTitle(v *string) *TVShowUpdate

SetNillableOriginalTitle sets the "original_title" field if the given value is not nil.

func (*TVShowUpdate) SetNillableOverview

func (_u *TVShowUpdate) SetNillableOverview(v *string) *TVShowUpdate

SetNillableOverview sets the "overview" field if the given value is not nil.

func (*TVShowUpdate) SetNillablePosterPath

func (_u *TVShowUpdate) SetNillablePosterPath(v *string) *TVShowUpdate

SetNillablePosterPath sets the "poster_path" field if the given value is not nil.

func (*TVShowUpdate) SetNillableQualityProfile

func (_u *TVShowUpdate) SetNillableQualityProfile(v *string) *TVShowUpdate

SetNillableQualityProfile sets the "quality_profile" field if the given value is not nil.

func (*TVShowUpdate) SetNillableRating

func (_u *TVShowUpdate) SetNillableRating(v *float64) *TVShowUpdate

SetNillableRating sets the "rating" field if the given value is not nil.

func (*TVShowUpdate) SetNillableRuntime

func (_u *TVShowUpdate) SetNillableRuntime(v *uint16) *TVShowUpdate

SetNillableRuntime sets the "runtime" field if the given value is not nil.

func (*TVShowUpdate) SetNillableSeriesStatus

func (_u *TVShowUpdate) SetNillableSeriesStatus(v *tvshow.SeriesStatus) *TVShowUpdate

SetNillableSeriesStatus sets the "series_status" field if the given value is not nil.

func (*TVShowUpdate) SetNillableTitle

func (_u *TVShowUpdate) SetNillableTitle(v *string) *TVShowUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*TVShowUpdate) SetNillableTvdbID

func (_u *TVShowUpdate) SetNillableTvdbID(v *uint32) *TVShowUpdate

SetNillableTvdbID sets the "tvdb_id" field if the given value is not nil.

func (*TVShowUpdate) SetNillableType

func (_u *TVShowUpdate) SetNillableType(v *tvshow.Type) *TVShowUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*TVShowUpdate) SetNillableYear

func (_u *TVShowUpdate) SetNillableYear(v *uint16) *TVShowUpdate

SetNillableYear sets the "year" field if the given value is not nil.

func (*TVShowUpdate) SetOriginalTitle

func (_u *TVShowUpdate) SetOriginalTitle(v string) *TVShowUpdate

SetOriginalTitle sets the "original_title" field.

func (*TVShowUpdate) SetOverview

func (_u *TVShowUpdate) SetOverview(v string) *TVShowUpdate

SetOverview sets the "overview" field.

func (*TVShowUpdate) SetPosterPath

func (_u *TVShowUpdate) SetPosterPath(v string) *TVShowUpdate

SetPosterPath sets the "poster_path" field.

func (*TVShowUpdate) SetQualityProfile

func (_u *TVShowUpdate) SetQualityProfile(v string) *TVShowUpdate

SetQualityProfile sets the "quality_profile" field.

func (*TVShowUpdate) SetRating

func (_u *TVShowUpdate) SetRating(v float64) *TVShowUpdate

SetRating sets the "rating" field.

func (*TVShowUpdate) SetRuntime

func (_u *TVShowUpdate) SetRuntime(v uint16) *TVShowUpdate

SetRuntime sets the "runtime" field.

func (*TVShowUpdate) SetSeriesStatus

func (_u *TVShowUpdate) SetSeriesStatus(v tvshow.SeriesStatus) *TVShowUpdate

SetSeriesStatus sets the "series_status" field.

func (*TVShowUpdate) SetTitle

func (_u *TVShowUpdate) SetTitle(v string) *TVShowUpdate

SetTitle sets the "title" field.

func (*TVShowUpdate) SetTvdbID

func (_u *TVShowUpdate) SetTvdbID(v uint32) *TVShowUpdate

SetTvdbID sets the "tvdb_id" field.

func (*TVShowUpdate) SetType

func (_u *TVShowUpdate) SetType(v tvshow.Type) *TVShowUpdate

SetType sets the "type" field.

func (*TVShowUpdate) SetUpdateTime

func (_u *TVShowUpdate) SetUpdateTime(v time.Time) *TVShowUpdate

SetUpdateTime sets the "update_time" field.

func (*TVShowUpdate) SetYear

func (_u *TVShowUpdate) SetYear(v uint16) *TVShowUpdate

SetYear sets the "year" field.

func (*TVShowUpdate) Where

func (_u *TVShowUpdate) Where(ps ...predicate.TVShow) *TVShowUpdate

Where appends a list predicates to the TVShowUpdate builder.

type TVShowUpdateOne

type TVShowUpdateOne struct {
	// contains filtered or unexported fields
}

TVShowUpdateOne is the builder for updating a single TVShow entity.

func (*TVShowUpdateOne) AddRating

func (_u *TVShowUpdateOne) AddRating(v float64) *TVShowUpdateOne

AddRating adds value to the "rating" field.

func (*TVShowUpdateOne) AddRuntime

func (_u *TVShowUpdateOne) AddRuntime(v int16) *TVShowUpdateOne

AddRuntime adds value to the "runtime" field.

func (*TVShowUpdateOne) AddSeasonIDs

func (_u *TVShowUpdateOne) AddSeasonIDs(ids ...uint32) *TVShowUpdateOne

AddSeasonIDs adds the "seasons" edge to the Season entity by IDs.

func (*TVShowUpdateOne) AddSeasons

func (_u *TVShowUpdateOne) AddSeasons(v ...*Season) *TVShowUpdateOne

AddSeasons adds the "seasons" edges to the Season entity.

func (*TVShowUpdateOne) AddTvdbID

func (_u *TVShowUpdateOne) AddTvdbID(v int32) *TVShowUpdateOne

AddTvdbID adds value to the "tvdb_id" field.

func (*TVShowUpdateOne) AddYear

func (_u *TVShowUpdateOne) AddYear(v int16) *TVShowUpdateOne

AddYear adds value to the "year" field.

func (*TVShowUpdateOne) AppendGenres

func (_u *TVShowUpdateOne) AppendGenres(v []string) *TVShowUpdateOne

AppendGenres appends value to the "genres" field.

func (*TVShowUpdateOne) ClearCreator

func (_u *TVShowUpdateOne) ClearCreator() *TVShowUpdateOne

ClearCreator clears the value of the "creator" field.

func (*TVShowUpdateOne) ClearGenres

func (_u *TVShowUpdateOne) ClearGenres() *TVShowUpdateOne

ClearGenres clears the value of the "genres" field.

func (*TVShowUpdateOne) ClearLastRefreshedAt

func (_u *TVShowUpdateOne) ClearLastRefreshedAt() *TVShowUpdateOne

ClearLastRefreshedAt clears the value of the "last_refreshed_at" field.

func (*TVShowUpdateOne) ClearNetwork

func (_u *TVShowUpdateOne) ClearNetwork() *TVShowUpdateOne

ClearNetwork clears the value of the "network" field.

func (*TVShowUpdateOne) ClearOriginalTitle

func (_u *TVShowUpdateOne) ClearOriginalTitle() *TVShowUpdateOne

ClearOriginalTitle clears the value of the "original_title" field.

func (*TVShowUpdateOne) ClearOverview

func (_u *TVShowUpdateOne) ClearOverview() *TVShowUpdateOne

ClearOverview clears the value of the "overview" field.

func (*TVShowUpdateOne) ClearPosterPath

func (_u *TVShowUpdateOne) ClearPosterPath() *TVShowUpdateOne

ClearPosterPath clears the value of the "poster_path" field.

func (*TVShowUpdateOne) ClearQualityProfile

func (_u *TVShowUpdateOne) ClearQualityProfile() *TVShowUpdateOne

ClearQualityProfile clears the value of the "quality_profile" field.

func (*TVShowUpdateOne) ClearRating

func (_u *TVShowUpdateOne) ClearRating() *TVShowUpdateOne

ClearRating clears the value of the "rating" field.

func (*TVShowUpdateOne) ClearRuntime

func (_u *TVShowUpdateOne) ClearRuntime() *TVShowUpdateOne

ClearRuntime clears the value of the "runtime" field.

func (*TVShowUpdateOne) ClearSeasons

func (_u *TVShowUpdateOne) ClearSeasons() *TVShowUpdateOne

ClearSeasons clears all "seasons" edges to the Season entity.

func (*TVShowUpdateOne) Exec

func (_u *TVShowUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TVShowUpdateOne) ExecX

func (_u *TVShowUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TVShowUpdateOne) Mutation

func (_u *TVShowUpdateOne) Mutation() *TVShowMutation

Mutation returns the TVShowMutation object of the builder.

func (*TVShowUpdateOne) RemoveSeasonIDs

func (_u *TVShowUpdateOne) RemoveSeasonIDs(ids ...uint32) *TVShowUpdateOne

RemoveSeasonIDs removes the "seasons" edge to Season entities by IDs.

func (*TVShowUpdateOne) RemoveSeasons

func (_u *TVShowUpdateOne) RemoveSeasons(v ...*Season) *TVShowUpdateOne

RemoveSeasons removes "seasons" edges to Season entities.

func (*TVShowUpdateOne) Save

func (_u *TVShowUpdateOne) Save(ctx context.Context) (*TVShow, error)

Save executes the query and returns the updated TVShow entity.

func (*TVShowUpdateOne) SaveX

func (_u *TVShowUpdateOne) SaveX(ctx context.Context) *TVShow

SaveX is like Save, but panics if an error occurs.

func (*TVShowUpdateOne) Select

func (_u *TVShowUpdateOne) Select(field string, fields ...string) *TVShowUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TVShowUpdateOne) SetCreator

func (_u *TVShowUpdateOne) SetCreator(v string) *TVShowUpdateOne

SetCreator sets the "creator" field.

func (*TVShowUpdateOne) SetGenres

func (_u *TVShowUpdateOne) SetGenres(v []string) *TVShowUpdateOne

SetGenres sets the "genres" field.

func (*TVShowUpdateOne) SetLastRefreshedAt

func (_u *TVShowUpdateOne) SetLastRefreshedAt(v time.Time) *TVShowUpdateOne

SetLastRefreshedAt sets the "last_refreshed_at" field.

func (*TVShowUpdateOne) SetMonitored

func (_u *TVShowUpdateOne) SetMonitored(v bool) *TVShowUpdateOne

SetMonitored sets the "monitored" field.

func (*TVShowUpdateOne) SetNetwork

func (_u *TVShowUpdateOne) SetNetwork(v string) *TVShowUpdateOne

SetNetwork sets the "network" field.

func (*TVShowUpdateOne) SetNillableCreator

func (_u *TVShowUpdateOne) SetNillableCreator(v *string) *TVShowUpdateOne

SetNillableCreator sets the "creator" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableLastRefreshedAt

func (_u *TVShowUpdateOne) SetNillableLastRefreshedAt(v *time.Time) *TVShowUpdateOne

SetNillableLastRefreshedAt sets the "last_refreshed_at" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableMonitored

func (_u *TVShowUpdateOne) SetNillableMonitored(v *bool) *TVShowUpdateOne

SetNillableMonitored sets the "monitored" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableNetwork

func (_u *TVShowUpdateOne) SetNillableNetwork(v *string) *TVShowUpdateOne

SetNillableNetwork sets the "network" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableOriginalTitle

func (_u *TVShowUpdateOne) SetNillableOriginalTitle(v *string) *TVShowUpdateOne

SetNillableOriginalTitle sets the "original_title" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableOverview

func (_u *TVShowUpdateOne) SetNillableOverview(v *string) *TVShowUpdateOne

SetNillableOverview sets the "overview" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillablePosterPath

func (_u *TVShowUpdateOne) SetNillablePosterPath(v *string) *TVShowUpdateOne

SetNillablePosterPath sets the "poster_path" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableQualityProfile

func (_u *TVShowUpdateOne) SetNillableQualityProfile(v *string) *TVShowUpdateOne

SetNillableQualityProfile sets the "quality_profile" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableRating

func (_u *TVShowUpdateOne) SetNillableRating(v *float64) *TVShowUpdateOne

SetNillableRating sets the "rating" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableRuntime

func (_u *TVShowUpdateOne) SetNillableRuntime(v *uint16) *TVShowUpdateOne

SetNillableRuntime sets the "runtime" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableSeriesStatus

func (_u *TVShowUpdateOne) SetNillableSeriesStatus(v *tvshow.SeriesStatus) *TVShowUpdateOne

SetNillableSeriesStatus sets the "series_status" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableTitle

func (_u *TVShowUpdateOne) SetNillableTitle(v *string) *TVShowUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableTvdbID

func (_u *TVShowUpdateOne) SetNillableTvdbID(v *uint32) *TVShowUpdateOne

SetNillableTvdbID sets the "tvdb_id" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableType

func (_u *TVShowUpdateOne) SetNillableType(v *tvshow.Type) *TVShowUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*TVShowUpdateOne) SetNillableYear

func (_u *TVShowUpdateOne) SetNillableYear(v *uint16) *TVShowUpdateOne

SetNillableYear sets the "year" field if the given value is not nil.

func (*TVShowUpdateOne) SetOriginalTitle

func (_u *TVShowUpdateOne) SetOriginalTitle(v string) *TVShowUpdateOne

SetOriginalTitle sets the "original_title" field.

func (*TVShowUpdateOne) SetOverview

func (_u *TVShowUpdateOne) SetOverview(v string) *TVShowUpdateOne

SetOverview sets the "overview" field.

func (*TVShowUpdateOne) SetPosterPath

func (_u *TVShowUpdateOne) SetPosterPath(v string) *TVShowUpdateOne

SetPosterPath sets the "poster_path" field.

func (*TVShowUpdateOne) SetQualityProfile

func (_u *TVShowUpdateOne) SetQualityProfile(v string) *TVShowUpdateOne

SetQualityProfile sets the "quality_profile" field.

func (*TVShowUpdateOne) SetRating

func (_u *TVShowUpdateOne) SetRating(v float64) *TVShowUpdateOne

SetRating sets the "rating" field.

func (*TVShowUpdateOne) SetRuntime

func (_u *TVShowUpdateOne) SetRuntime(v uint16) *TVShowUpdateOne

SetRuntime sets the "runtime" field.

func (*TVShowUpdateOne) SetSeriesStatus

func (_u *TVShowUpdateOne) SetSeriesStatus(v tvshow.SeriesStatus) *TVShowUpdateOne

SetSeriesStatus sets the "series_status" field.

func (*TVShowUpdateOne) SetTitle

func (_u *TVShowUpdateOne) SetTitle(v string) *TVShowUpdateOne

SetTitle sets the "title" field.

func (*TVShowUpdateOne) SetTvdbID

func (_u *TVShowUpdateOne) SetTvdbID(v uint32) *TVShowUpdateOne

SetTvdbID sets the "tvdb_id" field.

func (*TVShowUpdateOne) SetType

func (_u *TVShowUpdateOne) SetType(v tvshow.Type) *TVShowUpdateOne

SetType sets the "type" field.

func (*TVShowUpdateOne) SetUpdateTime

func (_u *TVShowUpdateOne) SetUpdateTime(v time.Time) *TVShowUpdateOne

SetUpdateTime sets the "update_time" field.

func (*TVShowUpdateOne) SetYear

func (_u *TVShowUpdateOne) SetYear(v uint16) *TVShowUpdateOne

SetYear sets the "year" field.

func (*TVShowUpdateOne) Where

func (_u *TVShowUpdateOne) Where(ps ...predicate.TVShow) *TVShowUpdateOne

Where appends a list predicates to the TVShowUpdate builder.

type TVShows

type TVShows []*TVShow

TVShows is a parsable slice of TVShow.

type TorrentSession added in v1.1.0

type TorrentSession struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// InfoHash holds the value of the "info_hash" field.
	InfoHash string `json:"info_hash,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// SavePath holds the value of the "save_path" field.
	SavePath string `json:"save_path,omitempty"`
	// SourceMagnet holds the value of the "source_magnet" field.
	SourceMagnet string `json:"source_magnet,omitempty"`
	// SourceTorrent holds the value of the "source_torrent" field.
	SourceTorrent []byte `json:"source_torrent,omitempty"`
	// Paused holds the value of the "paused" field.
	Paused bool `json:"paused,omitempty"`
	// CompletedAt holds the value of the "completed_at" field.
	CompletedAt *time.Time `json:"completed_at,omitempty"`
	// SeedStopped holds the value of the "seed_stopped" field.
	SeedStopped bool `json:"seed_stopped,omitempty"`
	// contains filtered or unexported fields
}

TorrentSession is the model entity for the TorrentSession schema.

func (*TorrentSession) String added in v1.1.0

func (_m *TorrentSession) String() string

String implements the fmt.Stringer.

func (*TorrentSession) Unwrap added in v1.1.0

func (_m *TorrentSession) Unwrap() *TorrentSession

Unwrap unwraps the TorrentSession 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 (*TorrentSession) Update added in v1.1.0

Update returns a builder for updating this TorrentSession. Note that you need to call TorrentSession.Unwrap() before calling this method if this TorrentSession was returned from a transaction, and the transaction was committed or rolled back.

func (*TorrentSession) Value added in v1.1.0

func (_m *TorrentSession) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TorrentSession. This includes values selected through modifiers, order, etc.

type TorrentSessionClient added in v1.1.0

type TorrentSessionClient struct {
	// contains filtered or unexported fields
}

TorrentSessionClient is a client for the TorrentSession schema.

func NewTorrentSessionClient added in v1.1.0

func NewTorrentSessionClient(c config) *TorrentSessionClient

NewTorrentSessionClient returns a client for the TorrentSession from the given config.

func (*TorrentSessionClient) Create added in v1.1.0

Create returns a builder for creating a TorrentSession entity.

func (*TorrentSessionClient) CreateBulk added in v1.1.0

CreateBulk returns a builder for creating a bulk of TorrentSession entities.

func (*TorrentSessionClient) Delete added in v1.1.0

Delete returns a delete builder for TorrentSession.

func (*TorrentSessionClient) DeleteOne added in v1.1.0

DeleteOne returns a builder for deleting the given entity.

func (*TorrentSessionClient) DeleteOneID added in v1.1.0

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TorrentSessionClient) Get added in v1.1.0

Get returns a TorrentSession entity by its id.

func (*TorrentSessionClient) GetX added in v1.1.0

GetX is like Get, but panics if an error occurs.

func (*TorrentSessionClient) Hooks added in v1.1.0

func (c *TorrentSessionClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TorrentSessionClient) Intercept added in v1.1.0

func (c *TorrentSessionClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `torrentsession.Intercept(f(g(h())))`.

func (*TorrentSessionClient) Interceptors added in v1.1.0

func (c *TorrentSessionClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TorrentSessionClient) MapCreateBulk added in v1.1.0

func (c *TorrentSessionClient) MapCreateBulk(slice any, setFunc func(*TorrentSessionCreate, int)) *TorrentSessionCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*TorrentSessionClient) Query added in v1.1.0

Query returns a query builder for TorrentSession.

func (*TorrentSessionClient) Update added in v1.1.0

Update returns an update builder for TorrentSession.

func (*TorrentSessionClient) UpdateOne added in v1.1.0

UpdateOne returns an update builder for the given entity.

func (*TorrentSessionClient) UpdateOneID added in v1.1.0

UpdateOneID returns an update builder for the given id.

func (*TorrentSessionClient) Use added in v1.1.0

func (c *TorrentSessionClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `torrentsession.Hooks(f(g(h())))`.

type TorrentSessionCreate added in v1.1.0

type TorrentSessionCreate struct {
	// contains filtered or unexported fields
}

TorrentSessionCreate is the builder for creating a TorrentSession entity.

func (*TorrentSessionCreate) Exec added in v1.1.0

func (_c *TorrentSessionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TorrentSessionCreate) ExecX added in v1.1.0

func (_c *TorrentSessionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TorrentSessionCreate) Mutation added in v1.1.0

Mutation returns the TorrentSessionMutation object of the builder.

func (*TorrentSessionCreate) Save added in v1.1.0

Save creates the TorrentSession in the database.

func (*TorrentSessionCreate) SaveX added in v1.1.0

SaveX calls Save and panics if Save returns an error.

func (*TorrentSessionCreate) SetCompletedAt added in v1.1.0

func (_c *TorrentSessionCreate) SetCompletedAt(v time.Time) *TorrentSessionCreate

SetCompletedAt sets the "completed_at" field.

func (*TorrentSessionCreate) SetCreateTime added in v1.1.0

func (_c *TorrentSessionCreate) SetCreateTime(v time.Time) *TorrentSessionCreate

SetCreateTime sets the "create_time" field.

func (*TorrentSessionCreate) SetID added in v1.1.0

SetID sets the "id" field.

func (*TorrentSessionCreate) SetInfoHash added in v1.1.0

func (_c *TorrentSessionCreate) SetInfoHash(v string) *TorrentSessionCreate

SetInfoHash sets the "info_hash" field.

func (*TorrentSessionCreate) SetName added in v1.1.0

SetName sets the "name" field.

func (*TorrentSessionCreate) SetNillableCompletedAt added in v1.1.0

func (_c *TorrentSessionCreate) SetNillableCompletedAt(v *time.Time) *TorrentSessionCreate

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*TorrentSessionCreate) SetNillableCreateTime added in v1.1.0

func (_c *TorrentSessionCreate) SetNillableCreateTime(v *time.Time) *TorrentSessionCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*TorrentSessionCreate) SetNillableName added in v1.1.0

func (_c *TorrentSessionCreate) SetNillableName(v *string) *TorrentSessionCreate

SetNillableName sets the "name" field if the given value is not nil.

func (*TorrentSessionCreate) SetNillablePaused added in v1.1.0

func (_c *TorrentSessionCreate) SetNillablePaused(v *bool) *TorrentSessionCreate

SetNillablePaused sets the "paused" field if the given value is not nil.

func (*TorrentSessionCreate) SetNillableSeedStopped added in v1.1.0

func (_c *TorrentSessionCreate) SetNillableSeedStopped(v *bool) *TorrentSessionCreate

SetNillableSeedStopped sets the "seed_stopped" field if the given value is not nil.

func (*TorrentSessionCreate) SetNillableSourceMagnet added in v1.1.0

func (_c *TorrentSessionCreate) SetNillableSourceMagnet(v *string) *TorrentSessionCreate

SetNillableSourceMagnet sets the "source_magnet" field if the given value is not nil.

func (*TorrentSessionCreate) SetNillableUpdateTime added in v1.1.0

func (_c *TorrentSessionCreate) SetNillableUpdateTime(v *time.Time) *TorrentSessionCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*TorrentSessionCreate) SetPaused added in v1.1.0

SetPaused sets the "paused" field.

func (*TorrentSessionCreate) SetSavePath added in v1.1.0

func (_c *TorrentSessionCreate) SetSavePath(v string) *TorrentSessionCreate

SetSavePath sets the "save_path" field.

func (*TorrentSessionCreate) SetSeedStopped added in v1.1.0

func (_c *TorrentSessionCreate) SetSeedStopped(v bool) *TorrentSessionCreate

SetSeedStopped sets the "seed_stopped" field.

func (*TorrentSessionCreate) SetSourceMagnet added in v1.1.0

func (_c *TorrentSessionCreate) SetSourceMagnet(v string) *TorrentSessionCreate

SetSourceMagnet sets the "source_magnet" field.

func (*TorrentSessionCreate) SetSourceTorrent added in v1.1.0

func (_c *TorrentSessionCreate) SetSourceTorrent(v []byte) *TorrentSessionCreate

SetSourceTorrent sets the "source_torrent" field.

func (*TorrentSessionCreate) SetUpdateTime added in v1.1.0

func (_c *TorrentSessionCreate) SetUpdateTime(v time.Time) *TorrentSessionCreate

SetUpdateTime sets the "update_time" field.

type TorrentSessionCreateBulk added in v1.1.0

type TorrentSessionCreateBulk struct {
	// contains filtered or unexported fields
}

TorrentSessionCreateBulk is the builder for creating many TorrentSession entities in bulk.

func (*TorrentSessionCreateBulk) Exec added in v1.1.0

Exec executes the query.

func (*TorrentSessionCreateBulk) ExecX added in v1.1.0

func (_c *TorrentSessionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TorrentSessionCreateBulk) Save added in v1.1.0

Save creates the TorrentSession entities in the database.

func (*TorrentSessionCreateBulk) SaveX added in v1.1.0

SaveX is like Save, but panics if an error occurs.

type TorrentSessionDelete added in v1.1.0

type TorrentSessionDelete struct {
	// contains filtered or unexported fields
}

TorrentSessionDelete is the builder for deleting a TorrentSession entity.

func (*TorrentSessionDelete) Exec added in v1.1.0

func (_d *TorrentSessionDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TorrentSessionDelete) ExecX added in v1.1.0

func (_d *TorrentSessionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TorrentSessionDelete) Where added in v1.1.0

Where appends a list predicates to the TorrentSessionDelete builder.

type TorrentSessionDeleteOne added in v1.1.0

type TorrentSessionDeleteOne struct {
	// contains filtered or unexported fields
}

TorrentSessionDeleteOne is the builder for deleting a single TorrentSession entity.

func (*TorrentSessionDeleteOne) Exec added in v1.1.0

Exec executes the deletion query.

func (*TorrentSessionDeleteOne) ExecX added in v1.1.0

func (_d *TorrentSessionDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TorrentSessionDeleteOne) Where added in v1.1.0

Where appends a list predicates to the TorrentSessionDelete builder.

type TorrentSessionGroupBy added in v1.1.0

type TorrentSessionGroupBy struct {
	// contains filtered or unexported fields
}

TorrentSessionGroupBy is the group-by builder for TorrentSession entities.

func (*TorrentSessionGroupBy) Aggregate added in v1.1.0

Aggregate adds the given aggregation functions to the group-by query.

func (*TorrentSessionGroupBy) Bool added in v1.1.0

func (s *TorrentSessionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TorrentSessionGroupBy) BoolX added in v1.1.0

func (s *TorrentSessionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TorrentSessionGroupBy) Bools added in v1.1.0

func (s *TorrentSessionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TorrentSessionGroupBy) BoolsX added in v1.1.0

func (s *TorrentSessionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TorrentSessionGroupBy) Float64 added in v1.1.0

func (s *TorrentSessionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TorrentSessionGroupBy) Float64X added in v1.1.0

func (s *TorrentSessionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TorrentSessionGroupBy) Float64s added in v1.1.0

func (s *TorrentSessionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TorrentSessionGroupBy) Float64sX added in v1.1.0

func (s *TorrentSessionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TorrentSessionGroupBy) Int added in v1.1.0

func (s *TorrentSessionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TorrentSessionGroupBy) IntX added in v1.1.0

func (s *TorrentSessionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TorrentSessionGroupBy) Ints added in v1.1.0

func (s *TorrentSessionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TorrentSessionGroupBy) IntsX added in v1.1.0

func (s *TorrentSessionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TorrentSessionGroupBy) Scan added in v1.1.0

func (_g *TorrentSessionGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TorrentSessionGroupBy) ScanX added in v1.1.0

func (s *TorrentSessionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TorrentSessionGroupBy) String added in v1.1.0

func (s *TorrentSessionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TorrentSessionGroupBy) StringX added in v1.1.0

func (s *TorrentSessionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TorrentSessionGroupBy) Strings added in v1.1.0

func (s *TorrentSessionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TorrentSessionGroupBy) StringsX added in v1.1.0

func (s *TorrentSessionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TorrentSessionMutation added in v1.1.0

type TorrentSessionMutation struct {
	// contains filtered or unexported fields
}

TorrentSessionMutation represents an operation that mutates the TorrentSession nodes in the graph.

func (*TorrentSessionMutation) AddField added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) AddedEdges added in v1.1.0

func (m *TorrentSessionMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TorrentSessionMutation) AddedField added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) AddedFields added in v1.1.0

func (m *TorrentSessionMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TorrentSessionMutation) AddedIDs added in v1.1.0

func (m *TorrentSessionMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TorrentSessionMutation) ClearCompletedAt added in v1.1.0

func (m *TorrentSessionMutation) ClearCompletedAt()

ClearCompletedAt clears the value of the "completed_at" field.

func (*TorrentSessionMutation) ClearEdge added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) ClearField added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) ClearName added in v1.1.0

func (m *TorrentSessionMutation) ClearName()

ClearName clears the value of the "name" field.

func (*TorrentSessionMutation) ClearSourceMagnet added in v1.1.0

func (m *TorrentSessionMutation) ClearSourceMagnet()

ClearSourceMagnet clears the value of the "source_magnet" field.

func (*TorrentSessionMutation) ClearSourceTorrent added in v1.1.0

func (m *TorrentSessionMutation) ClearSourceTorrent()

ClearSourceTorrent clears the value of the "source_torrent" field.

func (*TorrentSessionMutation) ClearedEdges added in v1.1.0

func (m *TorrentSessionMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TorrentSessionMutation) ClearedFields added in v1.1.0

func (m *TorrentSessionMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TorrentSessionMutation) Client added in v1.1.0

func (m TorrentSessionMutation) 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 (*TorrentSessionMutation) CompletedAt added in v1.1.0

func (m *TorrentSessionMutation) CompletedAt() (r time.Time, exists bool)

CompletedAt returns the value of the "completed_at" field in the mutation.

func (*TorrentSessionMutation) CompletedAtCleared added in v1.1.0

func (m *TorrentSessionMutation) CompletedAtCleared() bool

CompletedAtCleared returns if the "completed_at" field was cleared in this mutation.

func (*TorrentSessionMutation) CreateTime added in v1.1.0

func (m *TorrentSessionMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*TorrentSessionMutation) EdgeCleared added in v1.1.0

func (m *TorrentSessionMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TorrentSessionMutation) Field added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) FieldCleared added in v1.1.0

func (m *TorrentSessionMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TorrentSessionMutation) Fields added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) ID added in v1.1.0

func (m *TorrentSessionMutation) ID() (id uint32, 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 (*TorrentSessionMutation) IDs added in v1.1.0

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*TorrentSessionMutation) InfoHash added in v1.1.0

func (m *TorrentSessionMutation) InfoHash() (r string, exists bool)

InfoHash returns the value of the "info_hash" field in the mutation.

func (*TorrentSessionMutation) Name added in v1.1.0

func (m *TorrentSessionMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*TorrentSessionMutation) NameCleared added in v1.1.0

func (m *TorrentSessionMutation) NameCleared() bool

NameCleared returns if the "name" field was cleared in this mutation.

func (*TorrentSessionMutation) OldCompletedAt added in v1.1.0

func (m *TorrentSessionMutation) OldCompletedAt(ctx context.Context) (v *time.Time, err error)

OldCompletedAt returns the old "completed_at" field's value of the TorrentSession entity. If the TorrentSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TorrentSessionMutation) OldCreateTime added in v1.1.0

func (m *TorrentSessionMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" field's value of the TorrentSession entity. If the TorrentSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TorrentSessionMutation) OldField added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) OldInfoHash added in v1.1.0

func (m *TorrentSessionMutation) OldInfoHash(ctx context.Context) (v string, err error)

OldInfoHash returns the old "info_hash" field's value of the TorrentSession entity. If the TorrentSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TorrentSessionMutation) OldName added in v1.1.0

func (m *TorrentSessionMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the TorrentSession entity. If the TorrentSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TorrentSessionMutation) OldPaused added in v1.1.0

func (m *TorrentSessionMutation) OldPaused(ctx context.Context) (v bool, err error)

OldPaused returns the old "paused" field's value of the TorrentSession entity. If the TorrentSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TorrentSessionMutation) OldSavePath added in v1.1.0

func (m *TorrentSessionMutation) OldSavePath(ctx context.Context) (v string, err error)

OldSavePath returns the old "save_path" field's value of the TorrentSession entity. If the TorrentSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TorrentSessionMutation) OldSeedStopped added in v1.1.0

func (m *TorrentSessionMutation) OldSeedStopped(ctx context.Context) (v bool, err error)

OldSeedStopped returns the old "seed_stopped" field's value of the TorrentSession entity. If the TorrentSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TorrentSessionMutation) OldSourceMagnet added in v1.1.0

func (m *TorrentSessionMutation) OldSourceMagnet(ctx context.Context) (v string, err error)

OldSourceMagnet returns the old "source_magnet" field's value of the TorrentSession entity. If the TorrentSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TorrentSessionMutation) OldSourceTorrent added in v1.1.0

func (m *TorrentSessionMutation) OldSourceTorrent(ctx context.Context) (v []byte, err error)

OldSourceTorrent returns the old "source_torrent" field's value of the TorrentSession entity. If the TorrentSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TorrentSessionMutation) OldUpdateTime added in v1.1.0

func (m *TorrentSessionMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" field's value of the TorrentSession entity. If the TorrentSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TorrentSessionMutation) Op added in v1.1.0

func (m *TorrentSessionMutation) Op() Op

Op returns the operation name.

func (*TorrentSessionMutation) Paused added in v1.1.0

func (m *TorrentSessionMutation) Paused() (r bool, exists bool)

Paused returns the value of the "paused" field in the mutation.

func (*TorrentSessionMutation) RemovedEdges added in v1.1.0

func (m *TorrentSessionMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TorrentSessionMutation) RemovedIDs added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) ResetCompletedAt added in v1.1.0

func (m *TorrentSessionMutation) ResetCompletedAt()

ResetCompletedAt resets all changes to the "completed_at" field.

func (*TorrentSessionMutation) ResetCreateTime added in v1.1.0

func (m *TorrentSessionMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*TorrentSessionMutation) ResetEdge added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) ResetField added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) ResetInfoHash added in v1.1.0

func (m *TorrentSessionMutation) ResetInfoHash()

ResetInfoHash resets all changes to the "info_hash" field.

func (*TorrentSessionMutation) ResetName added in v1.1.0

func (m *TorrentSessionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*TorrentSessionMutation) ResetPaused added in v1.1.0

func (m *TorrentSessionMutation) ResetPaused()

ResetPaused resets all changes to the "paused" field.

func (*TorrentSessionMutation) ResetSavePath added in v1.1.0

func (m *TorrentSessionMutation) ResetSavePath()

ResetSavePath resets all changes to the "save_path" field.

func (*TorrentSessionMutation) ResetSeedStopped added in v1.1.0

func (m *TorrentSessionMutation) ResetSeedStopped()

ResetSeedStopped resets all changes to the "seed_stopped" field.

func (*TorrentSessionMutation) ResetSourceMagnet added in v1.1.0

func (m *TorrentSessionMutation) ResetSourceMagnet()

ResetSourceMagnet resets all changes to the "source_magnet" field.

func (*TorrentSessionMutation) ResetSourceTorrent added in v1.1.0

func (m *TorrentSessionMutation) ResetSourceTorrent()

ResetSourceTorrent resets all changes to the "source_torrent" field.

func (*TorrentSessionMutation) ResetUpdateTime added in v1.1.0

func (m *TorrentSessionMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*TorrentSessionMutation) SavePath added in v1.1.0

func (m *TorrentSessionMutation) SavePath() (r string, exists bool)

SavePath returns the value of the "save_path" field in the mutation.

func (*TorrentSessionMutation) SeedStopped added in v1.1.0

func (m *TorrentSessionMutation) SeedStopped() (r bool, exists bool)

SeedStopped returns the value of the "seed_stopped" field in the mutation.

func (*TorrentSessionMutation) SetCompletedAt added in v1.1.0

func (m *TorrentSessionMutation) SetCompletedAt(t time.Time)

SetCompletedAt sets the "completed_at" field.

func (*TorrentSessionMutation) SetCreateTime added in v1.1.0

func (m *TorrentSessionMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*TorrentSessionMutation) SetField added in v1.1.0

func (m *TorrentSessionMutation) 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 (*TorrentSessionMutation) SetID added in v1.1.0

func (m *TorrentSessionMutation) SetID(id uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of TorrentSession entities.

func (*TorrentSessionMutation) SetInfoHash added in v1.1.0

func (m *TorrentSessionMutation) SetInfoHash(s string)

SetInfoHash sets the "info_hash" field.

func (*TorrentSessionMutation) SetName added in v1.1.0

func (m *TorrentSessionMutation) SetName(s string)

SetName sets the "name" field.

func (*TorrentSessionMutation) SetOp added in v1.1.0

func (m *TorrentSessionMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TorrentSessionMutation) SetPaused added in v1.1.0

func (m *TorrentSessionMutation) SetPaused(b bool)

SetPaused sets the "paused" field.

func (*TorrentSessionMutation) SetSavePath added in v1.1.0

func (m *TorrentSessionMutation) SetSavePath(s string)

SetSavePath sets the "save_path" field.

func (*TorrentSessionMutation) SetSeedStopped added in v1.1.0

func (m *TorrentSessionMutation) SetSeedStopped(b bool)

SetSeedStopped sets the "seed_stopped" field.

func (*TorrentSessionMutation) SetSourceMagnet added in v1.1.0

func (m *TorrentSessionMutation) SetSourceMagnet(s string)

SetSourceMagnet sets the "source_magnet" field.

func (*TorrentSessionMutation) SetSourceTorrent added in v1.1.0

func (m *TorrentSessionMutation) SetSourceTorrent(b []byte)

SetSourceTorrent sets the "source_torrent" field.

func (*TorrentSessionMutation) SetUpdateTime added in v1.1.0

func (m *TorrentSessionMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

func (*TorrentSessionMutation) SourceMagnet added in v1.1.0

func (m *TorrentSessionMutation) SourceMagnet() (r string, exists bool)

SourceMagnet returns the value of the "source_magnet" field in the mutation.

func (*TorrentSessionMutation) SourceMagnetCleared added in v1.1.0

func (m *TorrentSessionMutation) SourceMagnetCleared() bool

SourceMagnetCleared returns if the "source_magnet" field was cleared in this mutation.

func (*TorrentSessionMutation) SourceTorrent added in v1.1.0

func (m *TorrentSessionMutation) SourceTorrent() (r []byte, exists bool)

SourceTorrent returns the value of the "source_torrent" field in the mutation.

func (*TorrentSessionMutation) SourceTorrentCleared added in v1.1.0

func (m *TorrentSessionMutation) SourceTorrentCleared() bool

SourceTorrentCleared returns if the "source_torrent" field was cleared in this mutation.

func (TorrentSessionMutation) Tx added in v1.1.0

func (m TorrentSessionMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TorrentSessionMutation) Type added in v1.1.0

func (m *TorrentSessionMutation) Type() string

Type returns the node type of this mutation (TorrentSession).

func (*TorrentSessionMutation) UpdateTime added in v1.1.0

func (m *TorrentSessionMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the mutation.

func (*TorrentSessionMutation) Where added in v1.1.0

Where appends a list predicates to the TorrentSessionMutation builder.

func (*TorrentSessionMutation) WhereP added in v1.1.0

func (m *TorrentSessionMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TorrentSessionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TorrentSessionQuery added in v1.1.0

type TorrentSessionQuery struct {
	// contains filtered or unexported fields
}

TorrentSessionQuery is the builder for querying TorrentSession entities.

func (*TorrentSessionQuery) Aggregate added in v1.1.0

Aggregate returns a TorrentSessionSelect configured with the given aggregations.

func (*TorrentSessionQuery) All added in v1.1.0

All executes the query and returns a list of TorrentSessions.

func (*TorrentSessionQuery) AllX added in v1.1.0

AllX is like All, but panics if an error occurs.

func (*TorrentSessionQuery) Clone added in v1.1.0

Clone returns a duplicate of the TorrentSessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TorrentSessionQuery) Count added in v1.1.0

func (_q *TorrentSessionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TorrentSessionQuery) CountX added in v1.1.0

func (_q *TorrentSessionQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TorrentSessionQuery) Exist added in v1.1.0

func (_q *TorrentSessionQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TorrentSessionQuery) ExistX added in v1.1.0

func (_q *TorrentSessionQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TorrentSessionQuery) First added in v1.1.0

First returns the first TorrentSession entity from the query. Returns a *NotFoundError when no TorrentSession was found.

func (*TorrentSessionQuery) FirstID added in v1.1.0

func (_q *TorrentSessionQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first TorrentSession ID from the query. Returns a *NotFoundError when no TorrentSession ID was found.

func (*TorrentSessionQuery) FirstIDX added in v1.1.0

func (_q *TorrentSessionQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*TorrentSessionQuery) FirstX added in v1.1.0

FirstX is like First, but panics if an error occurs.

func (*TorrentSessionQuery) GroupBy added in v1.1.0

func (_q *TorrentSessionQuery) GroupBy(field string, fields ...string) *TorrentSessionGroupBy

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.TorrentSession.Query().
	GroupBy(torrentsession.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TorrentSessionQuery) IDs added in v1.1.0

func (_q *TorrentSessionQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of TorrentSession IDs.

func (*TorrentSessionQuery) IDsX added in v1.1.0

func (_q *TorrentSessionQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*TorrentSessionQuery) Limit added in v1.1.0

func (_q *TorrentSessionQuery) Limit(limit int) *TorrentSessionQuery

Limit the number of records to be returned by this query.

func (*TorrentSessionQuery) Offset added in v1.1.0

func (_q *TorrentSessionQuery) Offset(offset int) *TorrentSessionQuery

Offset to start from.

func (*TorrentSessionQuery) Only added in v1.1.0

Only returns a single TorrentSession entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TorrentSession entity is found. Returns a *NotFoundError when no TorrentSession entities are found.

func (*TorrentSessionQuery) OnlyID added in v1.1.0

func (_q *TorrentSessionQuery) OnlyID(ctx context.Context) (id uint32, err error)

OnlyID is like Only, but returns the only TorrentSession ID in the query. Returns a *NotSingularError when more than one TorrentSession ID is found. Returns a *NotFoundError when no entities are found.

func (*TorrentSessionQuery) OnlyIDX added in v1.1.0

func (_q *TorrentSessionQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TorrentSessionQuery) OnlyX added in v1.1.0

OnlyX is like Only, but panics if an error occurs.

func (*TorrentSessionQuery) Order added in v1.1.0

Order specifies how the records should be ordered.

func (*TorrentSessionQuery) Select added in v1.1.0

func (_q *TorrentSessionQuery) Select(fields ...string) *TorrentSessionSelect

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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.TorrentSession.Query().
	Select(torrentsession.FieldCreateTime).
	Scan(ctx, &v)

func (*TorrentSessionQuery) Unique added in v1.1.0

func (_q *TorrentSessionQuery) Unique(unique bool) *TorrentSessionQuery

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 (*TorrentSessionQuery) Where added in v1.1.0

Where adds a new predicate for the TorrentSessionQuery builder.

type TorrentSessionSelect added in v1.1.0

type TorrentSessionSelect struct {
	*TorrentSessionQuery
	// contains filtered or unexported fields
}

TorrentSessionSelect is the builder for selecting fields of TorrentSession entities.

func (*TorrentSessionSelect) Aggregate added in v1.1.0

Aggregate adds the given aggregation functions to the selector query.

func (*TorrentSessionSelect) Bool added in v1.1.0

func (s *TorrentSessionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TorrentSessionSelect) BoolX added in v1.1.0

func (s *TorrentSessionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TorrentSessionSelect) Bools added in v1.1.0

func (s *TorrentSessionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TorrentSessionSelect) BoolsX added in v1.1.0

func (s *TorrentSessionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TorrentSessionSelect) Float64 added in v1.1.0

func (s *TorrentSessionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TorrentSessionSelect) Float64X added in v1.1.0

func (s *TorrentSessionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TorrentSessionSelect) Float64s added in v1.1.0

func (s *TorrentSessionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TorrentSessionSelect) Float64sX added in v1.1.0

func (s *TorrentSessionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TorrentSessionSelect) Int added in v1.1.0

func (s *TorrentSessionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TorrentSessionSelect) IntX added in v1.1.0

func (s *TorrentSessionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TorrentSessionSelect) Ints added in v1.1.0

func (s *TorrentSessionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TorrentSessionSelect) IntsX added in v1.1.0

func (s *TorrentSessionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TorrentSessionSelect) Scan added in v1.1.0

func (_s *TorrentSessionSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TorrentSessionSelect) ScanX added in v1.1.0

func (s *TorrentSessionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TorrentSessionSelect) String added in v1.1.0

func (s *TorrentSessionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TorrentSessionSelect) StringX added in v1.1.0

func (s *TorrentSessionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TorrentSessionSelect) Strings added in v1.1.0

func (s *TorrentSessionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TorrentSessionSelect) StringsX added in v1.1.0

func (s *TorrentSessionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TorrentSessionUpdate added in v1.1.0

type TorrentSessionUpdate struct {
	// contains filtered or unexported fields
}

TorrentSessionUpdate is the builder for updating TorrentSession entities.

func (*TorrentSessionUpdate) ClearCompletedAt added in v1.1.0

func (_u *TorrentSessionUpdate) ClearCompletedAt() *TorrentSessionUpdate

ClearCompletedAt clears the value of the "completed_at" field.

func (*TorrentSessionUpdate) ClearName added in v1.1.0

func (_u *TorrentSessionUpdate) ClearName() *TorrentSessionUpdate

ClearName clears the value of the "name" field.

func (*TorrentSessionUpdate) ClearSourceMagnet added in v1.1.0

func (_u *TorrentSessionUpdate) ClearSourceMagnet() *TorrentSessionUpdate

ClearSourceMagnet clears the value of the "source_magnet" field.

func (*TorrentSessionUpdate) ClearSourceTorrent added in v1.1.0

func (_u *TorrentSessionUpdate) ClearSourceTorrent() *TorrentSessionUpdate

ClearSourceTorrent clears the value of the "source_torrent" field.

func (*TorrentSessionUpdate) Exec added in v1.1.0

func (_u *TorrentSessionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TorrentSessionUpdate) ExecX added in v1.1.0

func (_u *TorrentSessionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TorrentSessionUpdate) Mutation added in v1.1.0

Mutation returns the TorrentSessionMutation object of the builder.

func (*TorrentSessionUpdate) Save added in v1.1.0

func (_u *TorrentSessionUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TorrentSessionUpdate) SaveX added in v1.1.0

func (_u *TorrentSessionUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TorrentSessionUpdate) SetCompletedAt added in v1.1.0

func (_u *TorrentSessionUpdate) SetCompletedAt(v time.Time) *TorrentSessionUpdate

SetCompletedAt sets the "completed_at" field.

func (*TorrentSessionUpdate) SetInfoHash added in v1.1.0

func (_u *TorrentSessionUpdate) SetInfoHash(v string) *TorrentSessionUpdate

SetInfoHash sets the "info_hash" field.

func (*TorrentSessionUpdate) SetName added in v1.1.0

SetName sets the "name" field.

func (*TorrentSessionUpdate) SetNillableCompletedAt added in v1.1.0

func (_u *TorrentSessionUpdate) SetNillableCompletedAt(v *time.Time) *TorrentSessionUpdate

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*TorrentSessionUpdate) SetNillableInfoHash added in v1.1.0

func (_u *TorrentSessionUpdate) SetNillableInfoHash(v *string) *TorrentSessionUpdate

SetNillableInfoHash sets the "info_hash" field if the given value is not nil.

func (*TorrentSessionUpdate) SetNillableName added in v1.1.0

func (_u *TorrentSessionUpdate) SetNillableName(v *string) *TorrentSessionUpdate

SetNillableName sets the "name" field if the given value is not nil.

func (*TorrentSessionUpdate) SetNillablePaused added in v1.1.0

func (_u *TorrentSessionUpdate) SetNillablePaused(v *bool) *TorrentSessionUpdate

SetNillablePaused sets the "paused" field if the given value is not nil.

func (*TorrentSessionUpdate) SetNillableSavePath added in v1.1.0

func (_u *TorrentSessionUpdate) SetNillableSavePath(v *string) *TorrentSessionUpdate

SetNillableSavePath sets the "save_path" field if the given value is not nil.

func (*TorrentSessionUpdate) SetNillableSeedStopped added in v1.1.0

func (_u *TorrentSessionUpdate) SetNillableSeedStopped(v *bool) *TorrentSessionUpdate

SetNillableSeedStopped sets the "seed_stopped" field if the given value is not nil.

func (*TorrentSessionUpdate) SetNillableSourceMagnet added in v1.1.0

func (_u *TorrentSessionUpdate) SetNillableSourceMagnet(v *string) *TorrentSessionUpdate

SetNillableSourceMagnet sets the "source_magnet" field if the given value is not nil.

func (*TorrentSessionUpdate) SetPaused added in v1.1.0

SetPaused sets the "paused" field.

func (*TorrentSessionUpdate) SetSavePath added in v1.1.0

func (_u *TorrentSessionUpdate) SetSavePath(v string) *TorrentSessionUpdate

SetSavePath sets the "save_path" field.

func (*TorrentSessionUpdate) SetSeedStopped added in v1.1.0

func (_u *TorrentSessionUpdate) SetSeedStopped(v bool) *TorrentSessionUpdate

SetSeedStopped sets the "seed_stopped" field.

func (*TorrentSessionUpdate) SetSourceMagnet added in v1.1.0

func (_u *TorrentSessionUpdate) SetSourceMagnet(v string) *TorrentSessionUpdate

SetSourceMagnet sets the "source_magnet" field.

func (*TorrentSessionUpdate) SetSourceTorrent added in v1.1.0

func (_u *TorrentSessionUpdate) SetSourceTorrent(v []byte) *TorrentSessionUpdate

SetSourceTorrent sets the "source_torrent" field.

func (*TorrentSessionUpdate) SetUpdateTime added in v1.1.0

func (_u *TorrentSessionUpdate) SetUpdateTime(v time.Time) *TorrentSessionUpdate

SetUpdateTime sets the "update_time" field.

func (*TorrentSessionUpdate) Where added in v1.1.0

Where appends a list predicates to the TorrentSessionUpdate builder.

type TorrentSessionUpdateOne added in v1.1.0

type TorrentSessionUpdateOne struct {
	// contains filtered or unexported fields
}

TorrentSessionUpdateOne is the builder for updating a single TorrentSession entity.

func (*TorrentSessionUpdateOne) ClearCompletedAt added in v1.1.0

func (_u *TorrentSessionUpdateOne) ClearCompletedAt() *TorrentSessionUpdateOne

ClearCompletedAt clears the value of the "completed_at" field.

func (*TorrentSessionUpdateOne) ClearName added in v1.1.0

ClearName clears the value of the "name" field.

func (*TorrentSessionUpdateOne) ClearSourceMagnet added in v1.1.0

func (_u *TorrentSessionUpdateOne) ClearSourceMagnet() *TorrentSessionUpdateOne

ClearSourceMagnet clears the value of the "source_magnet" field.

func (*TorrentSessionUpdateOne) ClearSourceTorrent added in v1.1.0

func (_u *TorrentSessionUpdateOne) ClearSourceTorrent() *TorrentSessionUpdateOne

ClearSourceTorrent clears the value of the "source_torrent" field.

func (*TorrentSessionUpdateOne) Exec added in v1.1.0

Exec executes the query on the entity.

func (*TorrentSessionUpdateOne) ExecX added in v1.1.0

func (_u *TorrentSessionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TorrentSessionUpdateOne) Mutation added in v1.1.0

Mutation returns the TorrentSessionMutation object of the builder.

func (*TorrentSessionUpdateOne) Save added in v1.1.0

Save executes the query and returns the updated TorrentSession entity.

func (*TorrentSessionUpdateOne) SaveX added in v1.1.0

SaveX is like Save, but panics if an error occurs.

func (*TorrentSessionUpdateOne) Select added in v1.1.0

func (_u *TorrentSessionUpdateOne) Select(field string, fields ...string) *TorrentSessionUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TorrentSessionUpdateOne) SetCompletedAt added in v1.1.0

SetCompletedAt sets the "completed_at" field.

func (*TorrentSessionUpdateOne) SetInfoHash added in v1.1.0

SetInfoHash sets the "info_hash" field.

func (*TorrentSessionUpdateOne) SetName added in v1.1.0

SetName sets the "name" field.

func (*TorrentSessionUpdateOne) SetNillableCompletedAt added in v1.1.0

func (_u *TorrentSessionUpdateOne) SetNillableCompletedAt(v *time.Time) *TorrentSessionUpdateOne

SetNillableCompletedAt sets the "completed_at" field if the given value is not nil.

func (*TorrentSessionUpdateOne) SetNillableInfoHash added in v1.1.0

func (_u *TorrentSessionUpdateOne) SetNillableInfoHash(v *string) *TorrentSessionUpdateOne

SetNillableInfoHash sets the "info_hash" field if the given value is not nil.

func (*TorrentSessionUpdateOne) SetNillableName added in v1.1.0

func (_u *TorrentSessionUpdateOne) SetNillableName(v *string) *TorrentSessionUpdateOne

SetNillableName sets the "name" field if the given value is not nil.

func (*TorrentSessionUpdateOne) SetNillablePaused added in v1.1.0

func (_u *TorrentSessionUpdateOne) SetNillablePaused(v *bool) *TorrentSessionUpdateOne

SetNillablePaused sets the "paused" field if the given value is not nil.

func (*TorrentSessionUpdateOne) SetNillableSavePath added in v1.1.0

func (_u *TorrentSessionUpdateOne) SetNillableSavePath(v *string) *TorrentSessionUpdateOne

SetNillableSavePath sets the "save_path" field if the given value is not nil.

func (*TorrentSessionUpdateOne) SetNillableSeedStopped added in v1.1.0

func (_u *TorrentSessionUpdateOne) SetNillableSeedStopped(v *bool) *TorrentSessionUpdateOne

SetNillableSeedStopped sets the "seed_stopped" field if the given value is not nil.

func (*TorrentSessionUpdateOne) SetNillableSourceMagnet added in v1.1.0

func (_u *TorrentSessionUpdateOne) SetNillableSourceMagnet(v *string) *TorrentSessionUpdateOne

SetNillableSourceMagnet sets the "source_magnet" field if the given value is not nil.

func (*TorrentSessionUpdateOne) SetPaused added in v1.1.0

SetPaused sets the "paused" field.

func (*TorrentSessionUpdateOne) SetSavePath added in v1.1.0

SetSavePath sets the "save_path" field.

func (*TorrentSessionUpdateOne) SetSeedStopped added in v1.1.0

func (_u *TorrentSessionUpdateOne) SetSeedStopped(v bool) *TorrentSessionUpdateOne

SetSeedStopped sets the "seed_stopped" field.

func (*TorrentSessionUpdateOne) SetSourceMagnet added in v1.1.0

func (_u *TorrentSessionUpdateOne) SetSourceMagnet(v string) *TorrentSessionUpdateOne

SetSourceMagnet sets the "source_magnet" field.

func (*TorrentSessionUpdateOne) SetSourceTorrent added in v1.1.0

func (_u *TorrentSessionUpdateOne) SetSourceTorrent(v []byte) *TorrentSessionUpdateOne

SetSourceTorrent sets the "source_torrent" field.

func (*TorrentSessionUpdateOne) SetUpdateTime added in v1.1.0

SetUpdateTime sets the "update_time" field.

func (*TorrentSessionUpdateOne) Where added in v1.1.0

Where appends a list predicates to the TorrentSessionUpdate builder.

type TorrentSessions added in v1.1.0

type TorrentSessions []*TorrentSession

TorrentSessions is a parsable slice of TorrentSession.

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 {

	// ApiKey is the client for interacting with the ApiKey builders.
	ApiKey *ApiKeyClient
	// DownloadRecord is the client for interacting with the DownloadRecord builders.
	DownloadRecord *DownloadRecordClient
	// Episode is the client for interacting with the Episode builders.
	Episode *EpisodeClient
	// ImportScan is the client for interacting with the ImportScan builders.
	ImportScan *ImportScanClient
	// ImportScanFile is the client for interacting with the ImportScanFile builders.
	ImportScanFile *ImportScanFileClient
	// ImportScanShow is the client for interacting with the ImportScanShow builders.
	ImportScanShow *ImportScanShowClient
	// Invite is the client for interacting with the Invite builders.
	Invite *InviteClient
	// MediaFile is the client for interacting with the MediaFile builders.
	MediaFile *MediaFileClient
	// Movie is the client for interacting with the Movie builders.
	Movie *MovieClient
	// MovieEvent is the client for interacting with the MovieEvent builders.
	MovieEvent *MovieEventClient
	// OIDCIdentity is the client for interacting with the OIDCIdentity builders.
	OIDCIdentity *OIDCIdentityClient
	// Request is the client for interacting with the Request builders.
	Request *RequestClient
	// ScheduledJob is the client for interacting with the ScheduledJob builders.
	ScheduledJob *ScheduledJobClient
	// Season is the client for interacting with the Season builders.
	Season *SeasonClient
	// Session is the client for interacting with the Session builders.
	Session *SessionClient
	// TVShow is the client for interacting with the TVShow builders.
	TVShow *TVShowClient
	// TorrentSession is the client for interacting with the TorrentSession builders.
	TorrentSession *TorrentSessionClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type User

type User struct {

	// ID of the ent.
	ID uint32 `json:"id,omitempty"`
	// CreateTime holds the value of the "create_time" field.
	CreateTime time.Time `json:"create_time,omitempty"`
	// UpdateTime holds the value of the "update_time" field.
	UpdateTime time.Time `json:"update_time,omitempty"`
	// Email holds the value of the "email" field.
	Email string `json:"email,omitempty"`
	// PasswordHash holds the value of the "password_hash" field.
	PasswordHash string `json:"password_hash,omitempty"`
	// Role holds the value of the "role" field.
	Role user.Role `json:"role,omitempty"`
	// AuthMethod holds the value of the "auth_method" field.
	AuthMethod user.AuthMethod `json:"auth_method,omitempty"`
	// DisplayName holds the value of the "display_name" field.
	DisplayName string `json:"display_name,omitempty"`
	// FailedLoginCount holds the value of the "failed_login_count" field.
	FailedLoginCount uint8 `json:"failed_login_count,omitempty"`
	// LastFailedLoginAt holds the value of the "last_failed_login_at" field.
	LastFailedLoginAt *time.Time `json:"last_failed_login_at,omitempty"`
	// LockedUntil holds the value of the "locked_until" field.
	LockedUntil *time.Time `json:"locked_until,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) QueryAPIKeys

func (_m *User) QueryAPIKeys() *ApiKeyQuery

QueryAPIKeys queries the "api_keys" edge of the User entity.

func (*User) QueryOidcIdentities

func (_m *User) QueryOidcIdentities() *OIDCIdentityQuery

QueryOidcIdentities queries the "oidc_identities" edge of the User entity.

func (*User) QueryRequests

func (_m *User) QueryRequests() *RequestQuery

QueryRequests queries the "requests" edge of the User entity.

func (*User) QuerySessions

func (_m *User) QuerySessions() *SessionQuery

QuerySessions queries the "sessions" edge of the User entity.

func (*User) String

func (_m *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (_m *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 (_m *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.

func (*User) Value

func (_m *User) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.

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(_m *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id uint32) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id uint32) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id uint32) *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)

Intercept 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) MapCreateBulk

func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryAPIKeys

func (c *UserClient) QueryAPIKeys(_m *User) *ApiKeyQuery

QueryAPIKeys queries the api_keys edge of a User.

func (*UserClient) QueryOidcIdentities

func (c *UserClient) QueryOidcIdentities(_m *User) *OIDCIdentityQuery

QueryOidcIdentities queries the oidc_identities edge of a User.

func (*UserClient) QueryRequests

func (c *UserClient) QueryRequests(_m *User) *RequestQuery

QueryRequests queries the requests edge of a User.

func (*UserClient) QuerySessions

func (c *UserClient) QuerySessions(_m *User) *SessionQuery

QuerySessions queries the sessions 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(_m *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id uint32) *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) AddAPIKeyIDs

func (_c *UserCreate) AddAPIKeyIDs(ids ...uint32) *UserCreate

AddAPIKeyIDs adds the "api_keys" edge to the ApiKey entity by IDs.

func (*UserCreate) AddAPIKeys

func (_c *UserCreate) AddAPIKeys(v ...*ApiKey) *UserCreate

AddAPIKeys adds the "api_keys" edges to the ApiKey entity.

func (*UserCreate) AddOidcIdentities

func (_c *UserCreate) AddOidcIdentities(v ...*OIDCIdentity) *UserCreate

AddOidcIdentities adds the "oidc_identities" edges to the OIDCIdentity entity.

func (*UserCreate) AddOidcIdentityIDs

func (_c *UserCreate) AddOidcIdentityIDs(ids ...uint32) *UserCreate

AddOidcIdentityIDs adds the "oidc_identities" edge to the OIDCIdentity entity by IDs.

func (*UserCreate) AddRequestIDs

func (_c *UserCreate) AddRequestIDs(ids ...uint32) *UserCreate

AddRequestIDs adds the "requests" edge to the Request entity by IDs.

func (*UserCreate) AddRequests

func (_c *UserCreate) AddRequests(v ...*Request) *UserCreate

AddRequests adds the "requests" edges to the Request entity.

func (*UserCreate) AddSessionIDs

func (_c *UserCreate) AddSessionIDs(ids ...uint32) *UserCreate

AddSessionIDs adds the "sessions" edge to the Session entity by IDs.

func (*UserCreate) AddSessions

func (_c *UserCreate) AddSessions(v ...*Session) *UserCreate

AddSessions adds the "sessions" edges to the Session entity.

func (*UserCreate) Exec

func (_c *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (_c *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (_c *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) Save

func (_c *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (_c *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetAuthMethod

func (_c *UserCreate) SetAuthMethod(v user.AuthMethod) *UserCreate

SetAuthMethod sets the "auth_method" field.

func (*UserCreate) SetCreateTime

func (_c *UserCreate) SetCreateTime(v time.Time) *UserCreate

SetCreateTime sets the "create_time" field.

func (*UserCreate) SetDisplayName

func (_c *UserCreate) SetDisplayName(v string) *UserCreate

SetDisplayName sets the "display_name" field.

func (*UserCreate) SetEmail

func (_c *UserCreate) SetEmail(v string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetFailedLoginCount

func (_c *UserCreate) SetFailedLoginCount(v uint8) *UserCreate

SetFailedLoginCount sets the "failed_login_count" field.

func (*UserCreate) SetID

func (_c *UserCreate) SetID(v uint32) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetLastFailedLoginAt

func (_c *UserCreate) SetLastFailedLoginAt(v time.Time) *UserCreate

SetLastFailedLoginAt sets the "last_failed_login_at" field.

func (*UserCreate) SetLockedUntil

func (_c *UserCreate) SetLockedUntil(v time.Time) *UserCreate

SetLockedUntil sets the "locked_until" field.

func (*UserCreate) SetNillableAuthMethod

func (_c *UserCreate) SetNillableAuthMethod(v *user.AuthMethod) *UserCreate

SetNillableAuthMethod sets the "auth_method" field if the given value is not nil.

func (*UserCreate) SetNillableCreateTime

func (_c *UserCreate) SetNillableCreateTime(v *time.Time) *UserCreate

SetNillableCreateTime sets the "create_time" field if the given value is not nil.

func (*UserCreate) SetNillableDisplayName

func (_c *UserCreate) SetNillableDisplayName(v *string) *UserCreate

SetNillableDisplayName sets the "display_name" field if the given value is not nil.

func (*UserCreate) SetNillableFailedLoginCount

func (_c *UserCreate) SetNillableFailedLoginCount(v *uint8) *UserCreate

SetNillableFailedLoginCount sets the "failed_login_count" field if the given value is not nil.

func (*UserCreate) SetNillableLastFailedLoginAt

func (_c *UserCreate) SetNillableLastFailedLoginAt(v *time.Time) *UserCreate

SetNillableLastFailedLoginAt sets the "last_failed_login_at" field if the given value is not nil.

func (*UserCreate) SetNillableLockedUntil

func (_c *UserCreate) SetNillableLockedUntil(v *time.Time) *UserCreate

SetNillableLockedUntil sets the "locked_until" field if the given value is not nil.

func (*UserCreate) SetNillablePasswordHash

func (_c *UserCreate) SetNillablePasswordHash(v *string) *UserCreate

SetNillablePasswordHash sets the "password_hash" field if the given value is not nil.

func (*UserCreate) SetNillableRole

func (_c *UserCreate) SetNillableRole(v *user.Role) *UserCreate

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserCreate) SetNillableUpdateTime

func (_c *UserCreate) SetNillableUpdateTime(v *time.Time) *UserCreate

SetNillableUpdateTime sets the "update_time" field if the given value is not nil.

func (*UserCreate) SetPasswordHash

func (_c *UserCreate) SetPasswordHash(v string) *UserCreate

SetPasswordHash sets the "password_hash" field.

func (*UserCreate) SetRole

func (_c *UserCreate) SetRole(v user.Role) *UserCreate

SetRole sets the "role" field.

func (*UserCreate) SetUpdateTime

func (_c *UserCreate) SetUpdateTime(v time.Time) *UserCreate

SetUpdateTime sets the "update_time" 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 (_c *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (_c *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) Save

func (_c *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (_c *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 (_d *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (_d *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (_d *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 (_d *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (_d *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where

func (_d *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserEdges

type UserEdges struct {
	// APIKeys holds the value of the api_keys edge.
	APIKeys []*ApiKey `json:"api_keys,omitempty"`
	// OidcIdentities holds the value of the oidc_identities edge.
	OidcIdentities []*OIDCIdentity `json:"oidc_identities,omitempty"`
	// Requests holds the value of the requests edge.
	Requests []*Request `json:"requests,omitempty"`
	// Sessions holds the value of the sessions edge.
	Sessions []*Session `json:"sessions,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) APIKeysOrErr

func (e UserEdges) APIKeysOrErr() ([]*ApiKey, error)

APIKeysOrErr returns the APIKeys value or an error if the edge was not loaded in eager-loading.

func (UserEdges) OidcIdentitiesOrErr

func (e UserEdges) OidcIdentitiesOrErr() ([]*OIDCIdentity, error)

OidcIdentitiesOrErr returns the OidcIdentities value or an error if the edge was not loaded in eager-loading.

func (UserEdges) RequestsOrErr

func (e UserEdges) RequestsOrErr() ([]*Request, error)

RequestsOrErr returns the Requests value or an error if the edge was not loaded in eager-loading.

func (UserEdges) SessionsOrErr

func (e UserEdges) SessionsOrErr() ([]*Session, error)

SessionsOrErr returns the Sessions 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 (_g *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 (_g *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) APIKeysCleared

func (m *UserMutation) APIKeysCleared() bool

APIKeysCleared reports if the "api_keys" edge to the ApiKey entity was cleared.

func (*UserMutation) APIKeysIDs

func (m *UserMutation) APIKeysIDs() (ids []uint32)

APIKeysIDs returns the "api_keys" edge IDs in the mutation.

func (*UserMutation) AddAPIKeyIDs

func (m *UserMutation) AddAPIKeyIDs(ids ...uint32)

AddAPIKeyIDs adds the "api_keys" edge to the ApiKey entity by ids.

func (*UserMutation) AddFailedLoginCount

func (m *UserMutation) AddFailedLoginCount(u int8)

AddFailedLoginCount adds u to the "failed_login_count" field.

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) AddOidcIdentityIDs

func (m *UserMutation) AddOidcIdentityIDs(ids ...uint32)

AddOidcIdentityIDs adds the "oidc_identities" edge to the OIDCIdentity entity by ids.

func (*UserMutation) AddRequestIDs

func (m *UserMutation) AddRequestIDs(ids ...uint32)

AddRequestIDs adds the "requests" edge to the Request entity by ids.

func (*UserMutation) AddSessionIDs

func (m *UserMutation) AddSessionIDs(ids ...uint32)

AddSessionIDs adds the "sessions" edge to the Session 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) AddedFailedLoginCount

func (m *UserMutation) AddedFailedLoginCount() (r int8, exists bool)

AddedFailedLoginCount returns the value that was added to the "failed_login_count" field 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) AuthMethod

func (m *UserMutation) AuthMethod() (r user.AuthMethod, exists bool)

AuthMethod returns the value of the "auth_method" field in the mutation.

func (*UserMutation) ClearAPIKeys

func (m *UserMutation) ClearAPIKeys()

ClearAPIKeys clears the "api_keys" edge to the ApiKey entity.

func (*UserMutation) ClearDisplayName

func (m *UserMutation) ClearDisplayName()

ClearDisplayName clears the value of the "display_name" 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) ClearLastFailedLoginAt

func (m *UserMutation) ClearLastFailedLoginAt()

ClearLastFailedLoginAt clears the value of the "last_failed_login_at" field.

func (*UserMutation) ClearLockedUntil

func (m *UserMutation) ClearLockedUntil()

ClearLockedUntil clears the value of the "locked_until" field.

func (*UserMutation) ClearOidcIdentities

func (m *UserMutation) ClearOidcIdentities()

ClearOidcIdentities clears the "oidc_identities" edge to the OIDCIdentity entity.

func (*UserMutation) ClearPasswordHash

func (m *UserMutation) ClearPasswordHash()

ClearPasswordHash clears the value of the "password_hash" field.

func (*UserMutation) ClearRequests

func (m *UserMutation) ClearRequests()

ClearRequests clears the "requests" edge to the Request entity.

func (*UserMutation) ClearSessions

func (m *UserMutation) ClearSessions()

ClearSessions clears the "sessions" edge to the Session entity.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreateTime

func (m *UserMutation) CreateTime() (r time.Time, exists bool)

CreateTime returns the value of the "create_time" field in the mutation.

func (*UserMutation) DisplayName

func (m *UserMutation) DisplayName() (r string, exists bool)

DisplayName returns the value of the "display_name" field in the mutation.

func (*UserMutation) DisplayNameCleared

func (m *UserMutation) DisplayNameCleared() bool

DisplayNameCleared returns if the "display_name" 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) FailedLoginCount

func (m *UserMutation) FailedLoginCount() (r uint8, exists bool)

FailedLoginCount returns the value of the "failed_login_count" field in the mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) ID

func (m *UserMutation) ID() (id uint32, 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) ([]uint32, 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) LastFailedLoginAt

func (m *UserMutation) LastFailedLoginAt() (r time.Time, exists bool)

LastFailedLoginAt returns the value of the "last_failed_login_at" field in the mutation.

func (*UserMutation) LastFailedLoginAtCleared

func (m *UserMutation) LastFailedLoginAtCleared() bool

LastFailedLoginAtCleared returns if the "last_failed_login_at" field was cleared in this mutation.

func (*UserMutation) LockedUntil

func (m *UserMutation) LockedUntil() (r time.Time, exists bool)

LockedUntil returns the value of the "locked_until" field in the mutation.

func (*UserMutation) LockedUntilCleared

func (m *UserMutation) LockedUntilCleared() bool

LockedUntilCleared returns if the "locked_until" field was cleared in this mutation.

func (*UserMutation) OidcIdentitiesCleared

func (m *UserMutation) OidcIdentitiesCleared() bool

OidcIdentitiesCleared reports if the "oidc_identities" edge to the OIDCIdentity entity was cleared.

func (*UserMutation) OidcIdentitiesIDs

func (m *UserMutation) OidcIdentitiesIDs() (ids []uint32)

OidcIdentitiesIDs returns the "oidc_identities" edge IDs in the mutation.

func (*UserMutation) OldAuthMethod

func (m *UserMutation) OldAuthMethod(ctx context.Context) (v user.AuthMethod, err error)

OldAuthMethod returns the old "auth_method" 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) OldCreateTime

func (m *UserMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)

OldCreateTime returns the old "create_time" 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) OldDisplayName

func (m *UserMutation) OldDisplayName(ctx context.Context) (v string, err error)

OldDisplayName returns the old "display_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) 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) OldFailedLoginCount

func (m *UserMutation) OldFailedLoginCount(ctx context.Context) (v uint8, err error)

OldFailedLoginCount returns the old "failed_login_count" 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) OldLastFailedLoginAt

func (m *UserMutation) OldLastFailedLoginAt(ctx context.Context) (v *time.Time, err error)

OldLastFailedLoginAt returns the old "last_failed_login_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) OldLockedUntil

func (m *UserMutation) OldLockedUntil(ctx context.Context) (v *time.Time, err error)

OldLockedUntil returns the old "locked_until" 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) OldPasswordHash

func (m *UserMutation) OldPasswordHash(ctx context.Context) (v string, err error)

OldPasswordHash returns the old "password_hash" 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) OldRole

func (m *UserMutation) OldRole(ctx context.Context) (v user.Role, err error)

OldRole returns the old "role" 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) OldUpdateTime

func (m *UserMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)

OldUpdateTime returns the old "update_time" 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) PasswordHash

func (m *UserMutation) PasswordHash() (r string, exists bool)

PasswordHash returns the value of the "password_hash" field in the mutation.

func (*UserMutation) PasswordHashCleared

func (m *UserMutation) PasswordHashCleared() bool

PasswordHashCleared returns if the "password_hash" field was cleared in this mutation.

func (*UserMutation) RemoveAPIKeyIDs

func (m *UserMutation) RemoveAPIKeyIDs(ids ...uint32)

RemoveAPIKeyIDs removes the "api_keys" edge to the ApiKey entity by IDs.

func (*UserMutation) RemoveOidcIdentityIDs

func (m *UserMutation) RemoveOidcIdentityIDs(ids ...uint32)

RemoveOidcIdentityIDs removes the "oidc_identities" edge to the OIDCIdentity entity by IDs.

func (*UserMutation) RemoveRequestIDs

func (m *UserMutation) RemoveRequestIDs(ids ...uint32)

RemoveRequestIDs removes the "requests" edge to the Request entity by IDs.

func (*UserMutation) RemoveSessionIDs

func (m *UserMutation) RemoveSessionIDs(ids ...uint32)

RemoveSessionIDs removes the "sessions" edge to the Session entity by IDs.

func (*UserMutation) RemovedAPIKeysIDs

func (m *UserMutation) RemovedAPIKeysIDs() (ids []uint32)

RemovedAPIKeys returns the removed IDs of the "api_keys" edge to the ApiKey entity.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) RemovedOidcIdentitiesIDs

func (m *UserMutation) RemovedOidcIdentitiesIDs() (ids []uint32)

RemovedOidcIdentities returns the removed IDs of the "oidc_identities" edge to the OIDCIdentity entity.

func (*UserMutation) RemovedRequestsIDs

func (m *UserMutation) RemovedRequestsIDs() (ids []uint32)

RemovedRequests returns the removed IDs of the "requests" edge to the Request entity.

func (*UserMutation) RemovedSessionsIDs

func (m *UserMutation) RemovedSessionsIDs() (ids []uint32)

RemovedSessions returns the removed IDs of the "sessions" edge to the Session entity.

func (*UserMutation) RequestsCleared

func (m *UserMutation) RequestsCleared() bool

RequestsCleared reports if the "requests" edge to the Request entity was cleared.

func (*UserMutation) RequestsIDs

func (m *UserMutation) RequestsIDs() (ids []uint32)

RequestsIDs returns the "requests" edge IDs in the mutation.

func (*UserMutation) ResetAPIKeys

func (m *UserMutation) ResetAPIKeys()

ResetAPIKeys resets all changes to the "api_keys" edge.

func (*UserMutation) ResetAuthMethod

func (m *UserMutation) ResetAuthMethod()

ResetAuthMethod resets all changes to the "auth_method" field.

func (*UserMutation) ResetCreateTime

func (m *UserMutation) ResetCreateTime()

ResetCreateTime resets all changes to the "create_time" field.

func (*UserMutation) ResetDisplayName

func (m *UserMutation) ResetDisplayName()

ResetDisplayName resets all changes to the "display_name" 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) ResetFailedLoginCount

func (m *UserMutation) ResetFailedLoginCount()

ResetFailedLoginCount resets all changes to the "failed_login_count" 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) ResetLastFailedLoginAt

func (m *UserMutation) ResetLastFailedLoginAt()

ResetLastFailedLoginAt resets all changes to the "last_failed_login_at" field.

func (*UserMutation) ResetLockedUntil

func (m *UserMutation) ResetLockedUntil()

ResetLockedUntil resets all changes to the "locked_until" field.

func (*UserMutation) ResetOidcIdentities

func (m *UserMutation) ResetOidcIdentities()

ResetOidcIdentities resets all changes to the "oidc_identities" edge.

func (*UserMutation) ResetPasswordHash

func (m *UserMutation) ResetPasswordHash()

ResetPasswordHash resets all changes to the "password_hash" field.

func (*UserMutation) ResetRequests

func (m *UserMutation) ResetRequests()

ResetRequests resets all changes to the "requests" edge.

func (*UserMutation) ResetRole

func (m *UserMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*UserMutation) ResetSessions

func (m *UserMutation) ResetSessions()

ResetSessions resets all changes to the "sessions" edge.

func (*UserMutation) ResetUpdateTime

func (m *UserMutation) ResetUpdateTime()

ResetUpdateTime resets all changes to the "update_time" field.

func (*UserMutation) Role

func (m *UserMutation) Role() (r user.Role, exists bool)

Role returns the value of the "role" field in the mutation.

func (*UserMutation) SessionsCleared

func (m *UserMutation) SessionsCleared() bool

SessionsCleared reports if the "sessions" edge to the Session entity was cleared.

func (*UserMutation) SessionsIDs

func (m *UserMutation) SessionsIDs() (ids []uint32)

SessionsIDs returns the "sessions" edge IDs in the mutation.

func (*UserMutation) SetAuthMethod

func (m *UserMutation) SetAuthMethod(um user.AuthMethod)

SetAuthMethod sets the "auth_method" field.

func (*UserMutation) SetCreateTime

func (m *UserMutation) SetCreateTime(t time.Time)

SetCreateTime sets the "create_time" field.

func (*UserMutation) SetDisplayName

func (m *UserMutation) SetDisplayName(s string)

SetDisplayName sets the "display_name" field.

func (*UserMutation) SetEmail

func (m *UserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserMutation) SetFailedLoginCount

func (m *UserMutation) SetFailedLoginCount(u uint8)

SetFailedLoginCount sets the "failed_login_count" 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 uint32)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetLastFailedLoginAt

func (m *UserMutation) SetLastFailedLoginAt(t time.Time)

SetLastFailedLoginAt sets the "last_failed_login_at" field.

func (*UserMutation) SetLockedUntil

func (m *UserMutation) SetLockedUntil(t time.Time)

SetLockedUntil sets the "locked_until" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetPasswordHash

func (m *UserMutation) SetPasswordHash(s string)

SetPasswordHash sets the "password_hash" field.

func (*UserMutation) SetRole

func (m *UserMutation) SetRole(u user.Role)

SetRole sets the "role" field.

func (*UserMutation) SetUpdateTime

func (m *UserMutation) SetUpdateTime(t time.Time)

SetUpdateTime sets the "update_time" field.

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) UpdateTime

func (m *UserMutation) UpdateTime() (r time.Time, exists bool)

UpdateTime returns the value of the "update_time" field in the 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 (_q *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (_q *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (_q *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (_q *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 (_q *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (_q *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (_q *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (_q *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (_q *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 (_q *UserQuery) FirstID(ctx context.Context) (id uint32, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (_q *UserQuery) FirstIDX(ctx context.Context) uint32

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (_q *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (_q *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 {
	CreateTime time.Time `json:"create_time,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldCreateTime).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (_q *UserQuery) IDs(ctx context.Context) (ids []uint32, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (_q *UserQuery) IDsX(ctx context.Context) []uint32

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (_q *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (_q *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (_q *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 (_q *UserQuery) OnlyID(ctx context.Context) (id uint32, 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 (_q *UserQuery) OnlyIDX(ctx context.Context) uint32

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (_q *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (_q *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) QueryAPIKeys

func (_q *UserQuery) QueryAPIKeys() *ApiKeyQuery

QueryAPIKeys chains the current query on the "api_keys" edge.

func (*UserQuery) QueryOidcIdentities

func (_q *UserQuery) QueryOidcIdentities() *OIDCIdentityQuery

QueryOidcIdentities chains the current query on the "oidc_identities" edge.

func (*UserQuery) QueryRequests

func (_q *UserQuery) QueryRequests() *RequestQuery

QueryRequests chains the current query on the "requests" edge.

func (*UserQuery) QuerySessions

func (_q *UserQuery) QuerySessions() *SessionQuery

QuerySessions chains the current query on the "sessions" edge.

func (*UserQuery) Select

func (_q *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 {
	CreateTime time.Time `json:"create_time,omitempty"`
}

client.User.Query().
	Select(user.FieldCreateTime).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (_q *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 (_q *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithAPIKeys

func (_q *UserQuery) WithAPIKeys(opts ...func(*ApiKeyQuery)) *UserQuery

WithAPIKeys tells the query-builder to eager-load the nodes that are connected to the "api_keys" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithOidcIdentities

func (_q *UserQuery) WithOidcIdentities(opts ...func(*OIDCIdentityQuery)) *UserQuery

WithOidcIdentities tells the query-builder to eager-load the nodes that are connected to the "oidc_identities" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithRequests

func (_q *UserQuery) WithRequests(opts ...func(*RequestQuery)) *UserQuery

WithRequests tells the query-builder to eager-load the nodes that are connected to the "requests" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithSessions

func (_q *UserQuery) WithSessions(opts ...func(*SessionQuery)) *UserQuery

WithSessions tells the query-builder to eager-load the nodes that are connected to the "sessions" 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 (_s *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (_s *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) AddAPIKeyIDs

func (_u *UserUpdate) AddAPIKeyIDs(ids ...uint32) *UserUpdate

AddAPIKeyIDs adds the "api_keys" edge to the ApiKey entity by IDs.

func (*UserUpdate) AddAPIKeys

func (_u *UserUpdate) AddAPIKeys(v ...*ApiKey) *UserUpdate

AddAPIKeys adds the "api_keys" edges to the ApiKey entity.

func (*UserUpdate) AddFailedLoginCount

func (_u *UserUpdate) AddFailedLoginCount(v int8) *UserUpdate

AddFailedLoginCount adds value to the "failed_login_count" field.

func (*UserUpdate) AddOidcIdentities

func (_u *UserUpdate) AddOidcIdentities(v ...*OIDCIdentity) *UserUpdate

AddOidcIdentities adds the "oidc_identities" edges to the OIDCIdentity entity.

func (*UserUpdate) AddOidcIdentityIDs

func (_u *UserUpdate) AddOidcIdentityIDs(ids ...uint32) *UserUpdate

AddOidcIdentityIDs adds the "oidc_identities" edge to the OIDCIdentity entity by IDs.

func (*UserUpdate) AddRequestIDs

func (_u *UserUpdate) AddRequestIDs(ids ...uint32) *UserUpdate

AddRequestIDs adds the "requests" edge to the Request entity by IDs.

func (*UserUpdate) AddRequests

func (_u *UserUpdate) AddRequests(v ...*Request) *UserUpdate

AddRequests adds the "requests" edges to the Request entity.

func (*UserUpdate) AddSessionIDs

func (_u *UserUpdate) AddSessionIDs(ids ...uint32) *UserUpdate

AddSessionIDs adds the "sessions" edge to the Session entity by IDs.

func (*UserUpdate) AddSessions

func (_u *UserUpdate) AddSessions(v ...*Session) *UserUpdate

AddSessions adds the "sessions" edges to the Session entity.

func (*UserUpdate) ClearAPIKeys

func (_u *UserUpdate) ClearAPIKeys() *UserUpdate

ClearAPIKeys clears all "api_keys" edges to the ApiKey entity.

func (*UserUpdate) ClearDisplayName

func (_u *UserUpdate) ClearDisplayName() *UserUpdate

ClearDisplayName clears the value of the "display_name" field.

func (*UserUpdate) ClearLastFailedLoginAt

func (_u *UserUpdate) ClearLastFailedLoginAt() *UserUpdate

ClearLastFailedLoginAt clears the value of the "last_failed_login_at" field.

func (*UserUpdate) ClearLockedUntil

func (_u *UserUpdate) ClearLockedUntil() *UserUpdate

ClearLockedUntil clears the value of the "locked_until" field.

func (*UserUpdate) ClearOidcIdentities

func (_u *UserUpdate) ClearOidcIdentities() *UserUpdate

ClearOidcIdentities clears all "oidc_identities" edges to the OIDCIdentity entity.

func (*UserUpdate) ClearPasswordHash

func (_u *UserUpdate) ClearPasswordHash() *UserUpdate

ClearPasswordHash clears the value of the "password_hash" field.

func (*UserUpdate) ClearRequests

func (_u *UserUpdate) ClearRequests() *UserUpdate

ClearRequests clears all "requests" edges to the Request entity.

func (*UserUpdate) ClearSessions

func (_u *UserUpdate) ClearSessions() *UserUpdate

ClearSessions clears all "sessions" edges to the Session entity.

func (*UserUpdate) Exec

func (_u *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (_u *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (_u *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveAPIKeyIDs

func (_u *UserUpdate) RemoveAPIKeyIDs(ids ...uint32) *UserUpdate

RemoveAPIKeyIDs removes the "api_keys" edge to ApiKey entities by IDs.

func (*UserUpdate) RemoveAPIKeys

func (_u *UserUpdate) RemoveAPIKeys(v ...*ApiKey) *UserUpdate

RemoveAPIKeys removes "api_keys" edges to ApiKey entities.

func (*UserUpdate) RemoveOidcIdentities

func (_u *UserUpdate) RemoveOidcIdentities(v ...*OIDCIdentity) *UserUpdate

RemoveOidcIdentities removes "oidc_identities" edges to OIDCIdentity entities.

func (*UserUpdate) RemoveOidcIdentityIDs

func (_u *UserUpdate) RemoveOidcIdentityIDs(ids ...uint32) *UserUpdate

RemoveOidcIdentityIDs removes the "oidc_identities" edge to OIDCIdentity entities by IDs.

func (*UserUpdate) RemoveRequestIDs

func (_u *UserUpdate) RemoveRequestIDs(ids ...uint32) *UserUpdate

RemoveRequestIDs removes the "requests" edge to Request entities by IDs.

func (*UserUpdate) RemoveRequests

func (_u *UserUpdate) RemoveRequests(v ...*Request) *UserUpdate

RemoveRequests removes "requests" edges to Request entities.

func (*UserUpdate) RemoveSessionIDs

func (_u *UserUpdate) RemoveSessionIDs(ids ...uint32) *UserUpdate

RemoveSessionIDs removes the "sessions" edge to Session entities by IDs.

func (*UserUpdate) RemoveSessions

func (_u *UserUpdate) RemoveSessions(v ...*Session) *UserUpdate

RemoveSessions removes "sessions" edges to Session entities.

func (*UserUpdate) Save

func (_u *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 (_u *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetAuthMethod

func (_u *UserUpdate) SetAuthMethod(v user.AuthMethod) *UserUpdate

SetAuthMethod sets the "auth_method" field.

func (*UserUpdate) SetDisplayName

func (_u *UserUpdate) SetDisplayName(v string) *UserUpdate

SetDisplayName sets the "display_name" field.

func (*UserUpdate) SetEmail

func (_u *UserUpdate) SetEmail(v string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetFailedLoginCount

func (_u *UserUpdate) SetFailedLoginCount(v uint8) *UserUpdate

SetFailedLoginCount sets the "failed_login_count" field.

func (*UserUpdate) SetLastFailedLoginAt

func (_u *UserUpdate) SetLastFailedLoginAt(v time.Time) *UserUpdate

SetLastFailedLoginAt sets the "last_failed_login_at" field.

func (*UserUpdate) SetLockedUntil

func (_u *UserUpdate) SetLockedUntil(v time.Time) *UserUpdate

SetLockedUntil sets the "locked_until" field.

func (*UserUpdate) SetNillableAuthMethod

func (_u *UserUpdate) SetNillableAuthMethod(v *user.AuthMethod) *UserUpdate

SetNillableAuthMethod sets the "auth_method" field if the given value is not nil.

func (*UserUpdate) SetNillableDisplayName

func (_u *UserUpdate) SetNillableDisplayName(v *string) *UserUpdate

SetNillableDisplayName sets the "display_name" field if the given value is not nil.

func (*UserUpdate) SetNillableEmail

func (_u *UserUpdate) SetNillableEmail(v *string) *UserUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdate) SetNillableFailedLoginCount

func (_u *UserUpdate) SetNillableFailedLoginCount(v *uint8) *UserUpdate

SetNillableFailedLoginCount sets the "failed_login_count" field if the given value is not nil.

func (*UserUpdate) SetNillableLastFailedLoginAt

func (_u *UserUpdate) SetNillableLastFailedLoginAt(v *time.Time) *UserUpdate

SetNillableLastFailedLoginAt sets the "last_failed_login_at" field if the given value is not nil.

func (*UserUpdate) SetNillableLockedUntil

func (_u *UserUpdate) SetNillableLockedUntil(v *time.Time) *UserUpdate

SetNillableLockedUntil sets the "locked_until" field if the given value is not nil.

func (*UserUpdate) SetNillablePasswordHash

func (_u *UserUpdate) SetNillablePasswordHash(v *string) *UserUpdate

SetNillablePasswordHash sets the "password_hash" field if the given value is not nil.

func (*UserUpdate) SetNillableRole

func (_u *UserUpdate) SetNillableRole(v *user.Role) *UserUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserUpdate) SetPasswordHash

func (_u *UserUpdate) SetPasswordHash(v string) *UserUpdate

SetPasswordHash sets the "password_hash" field.

func (*UserUpdate) SetRole

func (_u *UserUpdate) SetRole(v user.Role) *UserUpdate

SetRole sets the "role" field.

func (*UserUpdate) SetUpdateTime

func (_u *UserUpdate) SetUpdateTime(v time.Time) *UserUpdate

SetUpdateTime sets the "update_time" field.

func (*UserUpdate) Where

func (_u *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) AddAPIKeyIDs

func (_u *UserUpdateOne) AddAPIKeyIDs(ids ...uint32) *UserUpdateOne

AddAPIKeyIDs adds the "api_keys" edge to the ApiKey entity by IDs.

func (*UserUpdateOne) AddAPIKeys

func (_u *UserUpdateOne) AddAPIKeys(v ...*ApiKey) *UserUpdateOne

AddAPIKeys adds the "api_keys" edges to the ApiKey entity.

func (*UserUpdateOne) AddFailedLoginCount

func (_u *UserUpdateOne) AddFailedLoginCount(v int8) *UserUpdateOne

AddFailedLoginCount adds value to the "failed_login_count" field.

func (*UserUpdateOne) AddOidcIdentities

func (_u *UserUpdateOne) AddOidcIdentities(v ...*OIDCIdentity) *UserUpdateOne

AddOidcIdentities adds the "oidc_identities" edges to the OIDCIdentity entity.

func (*UserUpdateOne) AddOidcIdentityIDs

func (_u *UserUpdateOne) AddOidcIdentityIDs(ids ...uint32) *UserUpdateOne

AddOidcIdentityIDs adds the "oidc_identities" edge to the OIDCIdentity entity by IDs.

func (*UserUpdateOne) AddRequestIDs

func (_u *UserUpdateOne) AddRequestIDs(ids ...uint32) *UserUpdateOne

AddRequestIDs adds the "requests" edge to the Request entity by IDs.

func (*UserUpdateOne) AddRequests

func (_u *UserUpdateOne) AddRequests(v ...*Request) *UserUpdateOne

AddRequests adds the "requests" edges to the Request entity.

func (*UserUpdateOne) AddSessionIDs

func (_u *UserUpdateOne) AddSessionIDs(ids ...uint32) *UserUpdateOne

AddSessionIDs adds the "sessions" edge to the Session entity by IDs.

func (*UserUpdateOne) AddSessions

func (_u *UserUpdateOne) AddSessions(v ...*Session) *UserUpdateOne

AddSessions adds the "sessions" edges to the Session entity.

func (*UserUpdateOne) ClearAPIKeys

func (_u *UserUpdateOne) ClearAPIKeys() *UserUpdateOne

ClearAPIKeys clears all "api_keys" edges to the ApiKey entity.

func (*UserUpdateOne) ClearDisplayName

func (_u *UserUpdateOne) ClearDisplayName() *UserUpdateOne

ClearDisplayName clears the value of the "display_name" field.

func (*UserUpdateOne) ClearLastFailedLoginAt

func (_u *UserUpdateOne) ClearLastFailedLoginAt() *UserUpdateOne

ClearLastFailedLoginAt clears the value of the "last_failed_login_at" field.

func (*UserUpdateOne) ClearLockedUntil

func (_u *UserUpdateOne) ClearLockedUntil() *UserUpdateOne

ClearLockedUntil clears the value of the "locked_until" field.

func (*UserUpdateOne) ClearOidcIdentities

func (_u *UserUpdateOne) ClearOidcIdentities() *UserUpdateOne

ClearOidcIdentities clears all "oidc_identities" edges to the OIDCIdentity entity.

func (*UserUpdateOne) ClearPasswordHash

func (_u *UserUpdateOne) ClearPasswordHash() *UserUpdateOne

ClearPasswordHash clears the value of the "password_hash" field.

func (*UserUpdateOne) ClearRequests

func (_u *UserUpdateOne) ClearRequests() *UserUpdateOne

ClearRequests clears all "requests" edges to the Request entity.

func (*UserUpdateOne) ClearSessions

func (_u *UserUpdateOne) ClearSessions() *UserUpdateOne

ClearSessions clears all "sessions" edges to the Session entity.

func (*UserUpdateOne) Exec

func (_u *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (_u *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (_u *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveAPIKeyIDs

func (_u *UserUpdateOne) RemoveAPIKeyIDs(ids ...uint32) *UserUpdateOne

RemoveAPIKeyIDs removes the "api_keys" edge to ApiKey entities by IDs.

func (*UserUpdateOne) RemoveAPIKeys

func (_u *UserUpdateOne) RemoveAPIKeys(v ...*ApiKey) *UserUpdateOne

RemoveAPIKeys removes "api_keys" edges to ApiKey entities.

func (*UserUpdateOne) RemoveOidcIdentities

func (_u *UserUpdateOne) RemoveOidcIdentities(v ...*OIDCIdentity) *UserUpdateOne

RemoveOidcIdentities removes "oidc_identities" edges to OIDCIdentity entities.

func (*UserUpdateOne) RemoveOidcIdentityIDs

func (_u *UserUpdateOne) RemoveOidcIdentityIDs(ids ...uint32) *UserUpdateOne

RemoveOidcIdentityIDs removes the "oidc_identities" edge to OIDCIdentity entities by IDs.

func (*UserUpdateOne) RemoveRequestIDs

func (_u *UserUpdateOne) RemoveRequestIDs(ids ...uint32) *UserUpdateOne

RemoveRequestIDs removes the "requests" edge to Request entities by IDs.

func (*UserUpdateOne) RemoveRequests

func (_u *UserUpdateOne) RemoveRequests(v ...*Request) *UserUpdateOne

RemoveRequests removes "requests" edges to Request entities.

func (*UserUpdateOne) RemoveSessionIDs

func (_u *UserUpdateOne) RemoveSessionIDs(ids ...uint32) *UserUpdateOne

RemoveSessionIDs removes the "sessions" edge to Session entities by IDs.

func (*UserUpdateOne) RemoveSessions

func (_u *UserUpdateOne) RemoveSessions(v ...*Session) *UserUpdateOne

RemoveSessions removes "sessions" edges to Session entities.

func (*UserUpdateOne) Save

func (_u *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (_u *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (_u *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) SetAuthMethod

func (_u *UserUpdateOne) SetAuthMethod(v user.AuthMethod) *UserUpdateOne

SetAuthMethod sets the "auth_method" field.

func (*UserUpdateOne) SetDisplayName

func (_u *UserUpdateOne) SetDisplayName(v string) *UserUpdateOne

SetDisplayName sets the "display_name" field.

func (*UserUpdateOne) SetEmail

func (_u *UserUpdateOne) SetEmail(v string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetFailedLoginCount

func (_u *UserUpdateOne) SetFailedLoginCount(v uint8) *UserUpdateOne

SetFailedLoginCount sets the "failed_login_count" field.

func (*UserUpdateOne) SetLastFailedLoginAt

func (_u *UserUpdateOne) SetLastFailedLoginAt(v time.Time) *UserUpdateOne

SetLastFailedLoginAt sets the "last_failed_login_at" field.

func (*UserUpdateOne) SetLockedUntil

func (_u *UserUpdateOne) SetLockedUntil(v time.Time) *UserUpdateOne

SetLockedUntil sets the "locked_until" field.

func (*UserUpdateOne) SetNillableAuthMethod

func (_u *UserUpdateOne) SetNillableAuthMethod(v *user.AuthMethod) *UserUpdateOne

SetNillableAuthMethod sets the "auth_method" field if the given value is not nil.

func (*UserUpdateOne) SetNillableDisplayName

func (_u *UserUpdateOne) SetNillableDisplayName(v *string) *UserUpdateOne

SetNillableDisplayName sets the "display_name" field if the given value is not nil.

func (*UserUpdateOne) SetNillableEmail

func (_u *UserUpdateOne) SetNillableEmail(v *string) *UserUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdateOne) SetNillableFailedLoginCount

func (_u *UserUpdateOne) SetNillableFailedLoginCount(v *uint8) *UserUpdateOne

SetNillableFailedLoginCount sets the "failed_login_count" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLastFailedLoginAt

func (_u *UserUpdateOne) SetNillableLastFailedLoginAt(v *time.Time) *UserUpdateOne

SetNillableLastFailedLoginAt sets the "last_failed_login_at" field if the given value is not nil.

func (*UserUpdateOne) SetNillableLockedUntil

func (_u *UserUpdateOne) SetNillableLockedUntil(v *time.Time) *UserUpdateOne

SetNillableLockedUntil sets the "locked_until" field if the given value is not nil.

func (*UserUpdateOne) SetNillablePasswordHash

func (_u *UserUpdateOne) SetNillablePasswordHash(v *string) *UserUpdateOne

SetNillablePasswordHash sets the "password_hash" field if the given value is not nil.

func (*UserUpdateOne) SetNillableRole

func (_u *UserUpdateOne) SetNillableRole(v *user.Role) *UserUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserUpdateOne) SetPasswordHash

func (_u *UserUpdateOne) SetPasswordHash(v string) *UserUpdateOne

SetPasswordHash sets the "password_hash" field.

func (*UserUpdateOne) SetRole

func (_u *UserUpdateOne) SetRole(v user.Role) *UserUpdateOne

SetRole sets the "role" field.

func (*UserUpdateOne) SetUpdateTime

func (_u *UserUpdateOne) SetUpdateTime(v time.Time) *UserUpdateOne

SetUpdateTime sets the "update_time" field.

func (*UserUpdateOne) Where

func (_u *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL