ent

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: GPL-3.0 Imports: 29 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.
	TypeChannel        = "Channel"
	TypeLive           = "Live"
	TypeLiveCategory   = "LiveCategory"
	TypePlayback       = "Playback"
	TypePlaylist       = "Playlist"
	TypeQueue          = "Queue"
	TypeTwitchCategory = "TwitchCategory"
	TypeUser           = "User"
	TypeVod            = "Vod"
)

Variables

This section is empty.

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 Channel

type Channel struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// The external ID of the channel.
	ExtID string `json:"ext_id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// DisplayName holds the value of the "display_name" field.
	DisplayName string `json:"display_name,omitempty"`
	// ImagePath holds the value of the "image_path" field.
	ImagePath string `json:"image_path,omitempty"`
	// Retention holds the value of the "retention" field.
	Retention bool `json:"retention,omitempty"`
	// RetentionDays holds the value of the "retention_days" field.
	RetentionDays int64 `json:"retention_days,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ChannelQuery when eager-loading is set.
	Edges ChannelEdges `json:"edges"`
	// contains filtered or unexported fields
}

Channel is the model entity for the Channel schema.

func (*Channel) QueryLive

func (c *Channel) QueryLive() *LiveQuery

QueryLive queries the "live" edge of the Channel entity.

func (*Channel) QueryVods

func (c *Channel) QueryVods() *VodQuery

QueryVods queries the "vods" edge of the Channel entity.

func (*Channel) String

func (c *Channel) String() string

String implements the fmt.Stringer.

func (*Channel) Unwrap

func (c *Channel) Unwrap() *Channel

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

func (c *Channel) Update() *ChannelUpdateOne

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

func (*Channel) Value added in v1.2.12

func (c *Channel) Value(name string) (ent.Value, error)

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

type ChannelClient

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

ChannelClient is a client for the Channel schema.

func NewChannelClient

func NewChannelClient(c config) *ChannelClient

NewChannelClient returns a client for the Channel from the given config.

func (*ChannelClient) Create

func (c *ChannelClient) Create() *ChannelCreate

Create returns a builder for creating a Channel entity.

func (*ChannelClient) CreateBulk

func (c *ChannelClient) CreateBulk(builders ...*ChannelCreate) *ChannelCreateBulk

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

func (*ChannelClient) Delete

func (c *ChannelClient) Delete() *ChannelDelete

Delete returns a delete builder for Channel.

func (*ChannelClient) DeleteOne

func (c *ChannelClient) DeleteOne(ch *Channel) *ChannelDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ChannelClient) DeleteOneID

func (c *ChannelClient) DeleteOneID(id uuid.UUID) *ChannelDeleteOne

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

func (*ChannelClient) Get

func (c *ChannelClient) Get(ctx context.Context, id uuid.UUID) (*Channel, error)

Get returns a Channel entity by its id.

func (*ChannelClient) GetX

func (c *ChannelClient) GetX(ctx context.Context, id uuid.UUID) *Channel

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

func (*ChannelClient) Hooks

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

Hooks returns the client hooks.

func (*ChannelClient) Intercept added in v1.1.7

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

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

func (*ChannelClient) Interceptors added in v1.1.7

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

Interceptors returns the client interceptors.

func (*ChannelClient) Query

func (c *ChannelClient) Query() *ChannelQuery

Query returns a query builder for Channel.

func (*ChannelClient) QueryLive

func (c *ChannelClient) QueryLive(ch *Channel) *LiveQuery

QueryLive queries the live edge of a Channel.

func (*ChannelClient) QueryVods

func (c *ChannelClient) QueryVods(ch *Channel) *VodQuery

QueryVods queries the vods edge of a Channel.

func (*ChannelClient) Update

func (c *ChannelClient) Update() *ChannelUpdate

Update returns an update builder for Channel.

func (*ChannelClient) UpdateOne

func (c *ChannelClient) UpdateOne(ch *Channel) *ChannelUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ChannelClient) UpdateOneID

func (c *ChannelClient) UpdateOneID(id uuid.UUID) *ChannelUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ChannelClient) Use

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

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

type ChannelCreate

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

ChannelCreate is the builder for creating a Channel entity.

func (*ChannelCreate) AddLive

func (cc *ChannelCreate) AddLive(l ...*Live) *ChannelCreate

AddLive adds the "live" edges to the Live entity.

func (*ChannelCreate) AddLiveIDs

func (cc *ChannelCreate) AddLiveIDs(ids ...uuid.UUID) *ChannelCreate

AddLiveIDs adds the "live" edge to the Live entity by IDs.

func (*ChannelCreate) AddVodIDs

func (cc *ChannelCreate) AddVodIDs(ids ...uuid.UUID) *ChannelCreate

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*ChannelCreate) AddVods

func (cc *ChannelCreate) AddVods(v ...*Vod) *ChannelCreate

AddVods adds the "vods" edges to the Vod entity.

func (*ChannelCreate) Exec

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

Exec executes the query.

func (*ChannelCreate) ExecX

func (cc *ChannelCreate) ExecX(ctx context.Context)

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

func (*ChannelCreate) Mutation

func (cc *ChannelCreate) Mutation() *ChannelMutation

Mutation returns the ChannelMutation object of the builder.

func (*ChannelCreate) OnConflict added in v0.0.2

func (cc *ChannelCreate) OnConflict(opts ...sql.ConflictOption) *ChannelUpsertOne

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

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

func (*ChannelCreate) OnConflictColumns added in v0.0.2

func (cc *ChannelCreate) OnConflictColumns(columns ...string) *ChannelUpsertOne

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

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

func (*ChannelCreate) Save

func (cc *ChannelCreate) Save(ctx context.Context) (*Channel, error)

Save creates the Channel in the database.

func (*ChannelCreate) SaveX

func (cc *ChannelCreate) SaveX(ctx context.Context) *Channel

SaveX calls Save and panics if Save returns an error.

func (*ChannelCreate) SetCreatedAt

func (cc *ChannelCreate) SetCreatedAt(t time.Time) *ChannelCreate

SetCreatedAt sets the "created_at" field.

func (*ChannelCreate) SetDisplayName

func (cc *ChannelCreate) SetDisplayName(s string) *ChannelCreate

SetDisplayName sets the "display_name" field.

func (*ChannelCreate) SetExtID added in v1.1.0

func (cc *ChannelCreate) SetExtID(s string) *ChannelCreate

SetExtID sets the "ext_id" field.

func (*ChannelCreate) SetID

func (cc *ChannelCreate) SetID(u uuid.UUID) *ChannelCreate

SetID sets the "id" field.

func (*ChannelCreate) SetImagePath

func (cc *ChannelCreate) SetImagePath(s string) *ChannelCreate

SetImagePath sets the "image_path" field.

func (*ChannelCreate) SetName

func (cc *ChannelCreate) SetName(s string) *ChannelCreate

SetName sets the "name" field.

func (*ChannelCreate) SetNillableCreatedAt

func (cc *ChannelCreate) SetNillableCreatedAt(t *time.Time) *ChannelCreate

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

func (*ChannelCreate) SetNillableExtID added in v1.1.0

func (cc *ChannelCreate) SetNillableExtID(s *string) *ChannelCreate

SetNillableExtID sets the "ext_id" field if the given value is not nil.

func (*ChannelCreate) SetNillableID

func (cc *ChannelCreate) SetNillableID(u *uuid.UUID) *ChannelCreate

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

func (*ChannelCreate) SetNillableRetention added in v1.2.12

func (cc *ChannelCreate) SetNillableRetention(b *bool) *ChannelCreate

SetNillableRetention sets the "retention" field if the given value is not nil.

func (*ChannelCreate) SetNillableRetentionDays added in v1.2.12

func (cc *ChannelCreate) SetNillableRetentionDays(i *int64) *ChannelCreate

SetNillableRetentionDays sets the "retention_days" field if the given value is not nil.

func (*ChannelCreate) SetNillableUpdatedAt

func (cc *ChannelCreate) SetNillableUpdatedAt(t *time.Time) *ChannelCreate

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

func (*ChannelCreate) SetRetention added in v1.2.12

func (cc *ChannelCreate) SetRetention(b bool) *ChannelCreate

SetRetention sets the "retention" field.

func (*ChannelCreate) SetRetentionDays added in v1.2.12

func (cc *ChannelCreate) SetRetentionDays(i int64) *ChannelCreate

SetRetentionDays sets the "retention_days" field.

func (*ChannelCreate) SetUpdatedAt

func (cc *ChannelCreate) SetUpdatedAt(t time.Time) *ChannelCreate

SetUpdatedAt sets the "updated_at" field.

type ChannelCreateBulk

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

ChannelCreateBulk is the builder for creating many Channel entities in bulk.

func (*ChannelCreateBulk) Exec

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

Exec executes the query.

func (*ChannelCreateBulk) ExecX

func (ccb *ChannelCreateBulk) ExecX(ctx context.Context)

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

func (*ChannelCreateBulk) OnConflict added in v0.0.2

func (ccb *ChannelCreateBulk) OnConflict(opts ...sql.ConflictOption) *ChannelUpsertBulk

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

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

func (*ChannelCreateBulk) OnConflictColumns added in v0.0.2

func (ccb *ChannelCreateBulk) OnConflictColumns(columns ...string) *ChannelUpsertBulk

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

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

func (*ChannelCreateBulk) Save

func (ccb *ChannelCreateBulk) Save(ctx context.Context) ([]*Channel, error)

Save creates the Channel entities in the database.

func (*ChannelCreateBulk) SaveX

func (ccb *ChannelCreateBulk) SaveX(ctx context.Context) []*Channel

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

type ChannelDelete

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

ChannelDelete is the builder for deleting a Channel entity.

func (*ChannelDelete) Exec

func (cd *ChannelDelete) Exec(ctx context.Context) (int, error)

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

func (*ChannelDelete) ExecX

func (cd *ChannelDelete) ExecX(ctx context.Context) int

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

func (*ChannelDelete) Where

func (cd *ChannelDelete) Where(ps ...predicate.Channel) *ChannelDelete

Where appends a list predicates to the ChannelDelete builder.

type ChannelDeleteOne

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

ChannelDeleteOne is the builder for deleting a single Channel entity.

func (*ChannelDeleteOne) Exec

func (cdo *ChannelDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ChannelDeleteOne) ExecX

func (cdo *ChannelDeleteOne) ExecX(ctx context.Context)

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

func (*ChannelDeleteOne) Where added in v1.2.4

Where appends a list predicates to the ChannelDelete builder.

type ChannelEdges

type ChannelEdges struct {
	// Vods holds the value of the vods edge.
	Vods []*Vod `json:"vods,omitempty"`
	// Live holds the value of the live edge.
	Live []*Live `json:"live,omitempty"`
	// contains filtered or unexported fields
}

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

func (ChannelEdges) LiveOrErr

func (e ChannelEdges) LiveOrErr() ([]*Live, error)

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

func (ChannelEdges) VodsOrErr

func (e ChannelEdges) VodsOrErr() ([]*Vod, error)

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

type ChannelGroupBy

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

ChannelGroupBy is the group-by builder for Channel entities.

func (*ChannelGroupBy) Aggregate

func (cgb *ChannelGroupBy) Aggregate(fns ...AggregateFunc) *ChannelGroupBy

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

func (*ChannelGroupBy) Bool

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

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

func (*ChannelGroupBy) BoolX

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

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

func (*ChannelGroupBy) Bools

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

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

func (*ChannelGroupBy) BoolsX

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

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

func (*ChannelGroupBy) Float64

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

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

func (*ChannelGroupBy) Float64X

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

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

func (*ChannelGroupBy) Float64s

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

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

func (*ChannelGroupBy) Float64sX

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

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

func (*ChannelGroupBy) Int

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

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

func (*ChannelGroupBy) IntX

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

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

func (*ChannelGroupBy) Ints

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

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

func (*ChannelGroupBy) IntsX

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

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

func (*ChannelGroupBy) Scan

func (cgb *ChannelGroupBy) Scan(ctx context.Context, v any) error

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

func (*ChannelGroupBy) ScanX

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

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

func (*ChannelGroupBy) String

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

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

func (*ChannelGroupBy) StringX

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

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

func (*ChannelGroupBy) Strings

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

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

func (*ChannelGroupBy) StringsX

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

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

type ChannelMutation

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

ChannelMutation represents an operation that mutates the Channel nodes in the graph.

func (*ChannelMutation) AddField

func (m *ChannelMutation) 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 (*ChannelMutation) AddLiveIDs

func (m *ChannelMutation) AddLiveIDs(ids ...uuid.UUID)

AddLiveIDs adds the "live" edge to the Live entity by ids.

func (*ChannelMutation) AddRetentionDays added in v1.2.12

func (m *ChannelMutation) AddRetentionDays(i int64)

AddRetentionDays adds i to the "retention_days" field.

func (*ChannelMutation) AddVodIDs

func (m *ChannelMutation) AddVodIDs(ids ...uuid.UUID)

AddVodIDs adds the "vods" edge to the Vod entity by ids.

func (*ChannelMutation) AddedEdges

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

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

func (*ChannelMutation) AddedField

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

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

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

func (*ChannelMutation) AddedIDs

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

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

func (*ChannelMutation) AddedRetentionDays added in v1.2.12

func (m *ChannelMutation) AddedRetentionDays() (r int64, exists bool)

AddedRetentionDays returns the value that was added to the "retention_days" field in this mutation.

func (*ChannelMutation) ClearEdge

func (m *ChannelMutation) 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 (*ChannelMutation) ClearExtID added in v1.1.0

func (m *ChannelMutation) ClearExtID()

ClearExtID clears the value of the "ext_id" field.

func (*ChannelMutation) ClearField

func (m *ChannelMutation) 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 (*ChannelMutation) ClearLive

func (m *ChannelMutation) ClearLive()

ClearLive clears the "live" edge to the Live entity.

func (*ChannelMutation) ClearRetentionDays added in v1.2.12

func (m *ChannelMutation) ClearRetentionDays()

ClearRetentionDays clears the value of the "retention_days" field.

func (*ChannelMutation) ClearVods

func (m *ChannelMutation) ClearVods()

ClearVods clears the "vods" edge to the Vod entity.

func (*ChannelMutation) ClearedEdges

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

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

func (*ChannelMutation) ClearedFields

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

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

func (ChannelMutation) Client

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

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

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

func (*ChannelMutation) DisplayName

func (m *ChannelMutation) DisplayName() (r string, exists bool)

DisplayName returns the value of the "display_name" field in the mutation.

func (*ChannelMutation) EdgeCleared

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

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

func (*ChannelMutation) ExtID added in v1.1.0

func (m *ChannelMutation) ExtID() (r string, exists bool)

ExtID returns the value of the "ext_id" field in the mutation.

func (*ChannelMutation) ExtIDCleared added in v1.1.0

func (m *ChannelMutation) ExtIDCleared() bool

ExtIDCleared returns if the "ext_id" field was cleared in this mutation.

func (*ChannelMutation) Field

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

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

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

func (*ChannelMutation) Fields

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

func (m *ChannelMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ChannelMutation) IDs

func (m *ChannelMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*ChannelMutation) ImagePath

func (m *ChannelMutation) ImagePath() (r string, exists bool)

ImagePath returns the value of the "image_path" field in the mutation.

func (*ChannelMutation) LiveCleared

func (m *ChannelMutation) LiveCleared() bool

LiveCleared reports if the "live" edge to the Live entity was cleared.

func (*ChannelMutation) LiveIDs

func (m *ChannelMutation) LiveIDs() (ids []uuid.UUID)

LiveIDs returns the "live" edge IDs in the mutation.

func (*ChannelMutation) Name

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

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

func (*ChannelMutation) OldCreatedAt

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

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

func (*ChannelMutation) OldDisplayName

func (m *ChannelMutation) OldDisplayName(ctx context.Context) (v string, err error)

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

func (*ChannelMutation) OldExtID added in v1.1.0

func (m *ChannelMutation) OldExtID(ctx context.Context) (v string, err error)

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

func (*ChannelMutation) OldField

func (m *ChannelMutation) 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 (*ChannelMutation) OldImagePath

func (m *ChannelMutation) OldImagePath(ctx context.Context) (v string, err error)

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

func (*ChannelMutation) OldName

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

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

func (*ChannelMutation) OldRetention added in v1.2.12

func (m *ChannelMutation) OldRetention(ctx context.Context) (v bool, err error)

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

func (*ChannelMutation) OldRetentionDays added in v1.2.12

func (m *ChannelMutation) OldRetentionDays(ctx context.Context) (v int64, err error)

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

func (*ChannelMutation) OldUpdatedAt

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

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

func (*ChannelMutation) Op

func (m *ChannelMutation) Op() Op

Op returns the operation name.

func (*ChannelMutation) RemoveLiveIDs

func (m *ChannelMutation) RemoveLiveIDs(ids ...uuid.UUID)

RemoveLiveIDs removes the "live" edge to the Live entity by IDs.

func (*ChannelMutation) RemoveVodIDs

func (m *ChannelMutation) RemoveVodIDs(ids ...uuid.UUID)

RemoveVodIDs removes the "vods" edge to the Vod entity by IDs.

func (*ChannelMutation) RemovedEdges

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

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

func (*ChannelMutation) RemovedIDs

func (m *ChannelMutation) 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 (*ChannelMutation) RemovedLiveIDs

func (m *ChannelMutation) RemovedLiveIDs() (ids []uuid.UUID)

RemovedLive returns the removed IDs of the "live" edge to the Live entity.

func (*ChannelMutation) RemovedVodsIDs

func (m *ChannelMutation) RemovedVodsIDs() (ids []uuid.UUID)

RemovedVods returns the removed IDs of the "vods" edge to the Vod entity.

func (*ChannelMutation) ResetCreatedAt

func (m *ChannelMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ChannelMutation) ResetDisplayName

func (m *ChannelMutation) ResetDisplayName()

ResetDisplayName resets all changes to the "display_name" field.

func (*ChannelMutation) ResetEdge

func (m *ChannelMutation) 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 (*ChannelMutation) ResetExtID added in v1.1.0

func (m *ChannelMutation) ResetExtID()

ResetExtID resets all changes to the "ext_id" field.

func (*ChannelMutation) ResetField

func (m *ChannelMutation) 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 (*ChannelMutation) ResetImagePath

func (m *ChannelMutation) ResetImagePath()

ResetImagePath resets all changes to the "image_path" field.

func (*ChannelMutation) ResetLive

func (m *ChannelMutation) ResetLive()

ResetLive resets all changes to the "live" edge.

func (*ChannelMutation) ResetName

func (m *ChannelMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*ChannelMutation) ResetRetention added in v1.2.12

func (m *ChannelMutation) ResetRetention()

ResetRetention resets all changes to the "retention" field.

func (*ChannelMutation) ResetRetentionDays added in v1.2.12

func (m *ChannelMutation) ResetRetentionDays()

ResetRetentionDays resets all changes to the "retention_days" field.

func (*ChannelMutation) ResetUpdatedAt

func (m *ChannelMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ChannelMutation) ResetVods

func (m *ChannelMutation) ResetVods()

ResetVods resets all changes to the "vods" edge.

func (*ChannelMutation) Retention added in v1.2.12

func (m *ChannelMutation) Retention() (r bool, exists bool)

Retention returns the value of the "retention" field in the mutation.

func (*ChannelMutation) RetentionDays added in v1.2.12

func (m *ChannelMutation) RetentionDays() (r int64, exists bool)

RetentionDays returns the value of the "retention_days" field in the mutation.

func (*ChannelMutation) RetentionDaysCleared added in v1.2.12

func (m *ChannelMutation) RetentionDaysCleared() bool

RetentionDaysCleared returns if the "retention_days" field was cleared in this mutation.

func (*ChannelMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*ChannelMutation) SetDisplayName

func (m *ChannelMutation) SetDisplayName(s string)

SetDisplayName sets the "display_name" field.

func (*ChannelMutation) SetExtID added in v1.1.0

func (m *ChannelMutation) SetExtID(s string)

SetExtID sets the "ext_id" field.

func (*ChannelMutation) SetField

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

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

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

func (*ChannelMutation) SetImagePath

func (m *ChannelMutation) SetImagePath(s string)

SetImagePath sets the "image_path" field.

func (*ChannelMutation) SetName

func (m *ChannelMutation) SetName(s string)

SetName sets the "name" field.

func (*ChannelMutation) SetOp added in v1.1.7

func (m *ChannelMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ChannelMutation) SetRetention added in v1.2.12

func (m *ChannelMutation) SetRetention(b bool)

SetRetention sets the "retention" field.

func (*ChannelMutation) SetRetentionDays added in v1.2.12

func (m *ChannelMutation) SetRetentionDays(i int64)

SetRetentionDays sets the "retention_days" field.

func (*ChannelMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (ChannelMutation) Tx

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

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

func (*ChannelMutation) Type

func (m *ChannelMutation) Type() string

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

func (*ChannelMutation) UpdatedAt

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

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

func (*ChannelMutation) VodsCleared

func (m *ChannelMutation) VodsCleared() bool

VodsCleared reports if the "vods" edge to the Vod entity was cleared.

func (*ChannelMutation) VodsIDs

func (m *ChannelMutation) VodsIDs() (ids []uuid.UUID)

VodsIDs returns the "vods" edge IDs in the mutation.

func (*ChannelMutation) Where

func (m *ChannelMutation) Where(ps ...predicate.Channel)

Where appends a list predicates to the ChannelMutation builder.

func (*ChannelMutation) WhereP added in v1.1.7

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

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

type ChannelQuery

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

ChannelQuery is the builder for querying Channel entities.

func (*ChannelQuery) Aggregate added in v1.1.7

func (cq *ChannelQuery) Aggregate(fns ...AggregateFunc) *ChannelSelect

Aggregate returns a ChannelSelect configured with the given aggregations.

func (*ChannelQuery) All

func (cq *ChannelQuery) All(ctx context.Context) ([]*Channel, error)

All executes the query and returns a list of Channels.

func (*ChannelQuery) AllX

func (cq *ChannelQuery) AllX(ctx context.Context) []*Channel

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

func (*ChannelQuery) Clone

func (cq *ChannelQuery) Clone() *ChannelQuery

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

func (*ChannelQuery) Count

func (cq *ChannelQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ChannelQuery) CountX

func (cq *ChannelQuery) CountX(ctx context.Context) int

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

func (*ChannelQuery) Exist

func (cq *ChannelQuery) Exist(ctx context.Context) (bool, error)

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

func (*ChannelQuery) ExistX

func (cq *ChannelQuery) ExistX(ctx context.Context) bool

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

func (*ChannelQuery) First

func (cq *ChannelQuery) First(ctx context.Context) (*Channel, error)

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

func (*ChannelQuery) FirstID

func (cq *ChannelQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*ChannelQuery) FirstIDX

func (cq *ChannelQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*ChannelQuery) FirstX

func (cq *ChannelQuery) FirstX(ctx context.Context) *Channel

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

func (*ChannelQuery) GroupBy

func (cq *ChannelQuery) GroupBy(field string, fields ...string) *ChannelGroupBy

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

client.Channel.Query().
	GroupBy(channel.FieldExtID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ChannelQuery) IDs

func (cq *ChannelQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*ChannelQuery) IDsX

func (cq *ChannelQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*ChannelQuery) Limit

func (cq *ChannelQuery) Limit(limit int) *ChannelQuery

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

func (*ChannelQuery) Offset

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

Offset to start from.

func (*ChannelQuery) Only

func (cq *ChannelQuery) Only(ctx context.Context) (*Channel, error)

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

func (*ChannelQuery) OnlyID

func (cq *ChannelQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*ChannelQuery) OnlyIDX

func (cq *ChannelQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*ChannelQuery) OnlyX

func (cq *ChannelQuery) OnlyX(ctx context.Context) *Channel

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

func (*ChannelQuery) Order

func (cq *ChannelQuery) Order(o ...channel.OrderOption) *ChannelQuery

Order specifies how the records should be ordered.

func (*ChannelQuery) QueryLive

func (cq *ChannelQuery) QueryLive() *LiveQuery

QueryLive chains the current query on the "live" edge.

func (*ChannelQuery) QueryVods

func (cq *ChannelQuery) QueryVods() *VodQuery

QueryVods chains the current query on the "vods" edge.

func (*ChannelQuery) Select

func (cq *ChannelQuery) Select(fields ...string) *ChannelSelect

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

client.Channel.Query().
	Select(channel.FieldExtID).
	Scan(ctx, &v)

func (*ChannelQuery) Unique

func (cq *ChannelQuery) Unique(unique bool) *ChannelQuery

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

func (cq *ChannelQuery) Where(ps ...predicate.Channel) *ChannelQuery

Where adds a new predicate for the ChannelQuery builder.

func (*ChannelQuery) WithLive

func (cq *ChannelQuery) WithLive(opts ...func(*LiveQuery)) *ChannelQuery

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

func (*ChannelQuery) WithVods

func (cq *ChannelQuery) WithVods(opts ...func(*VodQuery)) *ChannelQuery

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

type ChannelSelect

type ChannelSelect struct {
	*ChannelQuery
	// contains filtered or unexported fields
}

ChannelSelect is the builder for selecting fields of Channel entities.

func (*ChannelSelect) Aggregate added in v1.1.7

func (cs *ChannelSelect) Aggregate(fns ...AggregateFunc) *ChannelSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ChannelSelect) Bool

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

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

func (*ChannelSelect) BoolX

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

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

func (*ChannelSelect) Bools

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

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

func (*ChannelSelect) BoolsX

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

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

func (*ChannelSelect) Float64

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

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

func (*ChannelSelect) Float64X

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

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

func (*ChannelSelect) Float64s

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

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

func (*ChannelSelect) Float64sX

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

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

func (*ChannelSelect) Int

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

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

func (*ChannelSelect) IntX

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

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

func (*ChannelSelect) Ints

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

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

func (*ChannelSelect) IntsX

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

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

func (*ChannelSelect) Scan

func (cs *ChannelSelect) Scan(ctx context.Context, v any) error

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

func (*ChannelSelect) ScanX

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

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

func (*ChannelSelect) String

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

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

func (*ChannelSelect) StringX

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

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

func (*ChannelSelect) Strings

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

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

func (*ChannelSelect) StringsX

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

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

type ChannelUpdate

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

ChannelUpdate is the builder for updating Channel entities.

func (*ChannelUpdate) AddLive

func (cu *ChannelUpdate) AddLive(l ...*Live) *ChannelUpdate

AddLive adds the "live" edges to the Live entity.

func (*ChannelUpdate) AddLiveIDs

func (cu *ChannelUpdate) AddLiveIDs(ids ...uuid.UUID) *ChannelUpdate

AddLiveIDs adds the "live" edge to the Live entity by IDs.

func (*ChannelUpdate) AddRetentionDays added in v1.2.12

func (cu *ChannelUpdate) AddRetentionDays(i int64) *ChannelUpdate

AddRetentionDays adds i to the "retention_days" field.

func (*ChannelUpdate) AddVodIDs

func (cu *ChannelUpdate) AddVodIDs(ids ...uuid.UUID) *ChannelUpdate

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*ChannelUpdate) AddVods

func (cu *ChannelUpdate) AddVods(v ...*Vod) *ChannelUpdate

AddVods adds the "vods" edges to the Vod entity.

func (*ChannelUpdate) ClearExtID added in v1.1.0

func (cu *ChannelUpdate) ClearExtID() *ChannelUpdate

ClearExtID clears the value of the "ext_id" field.

func (*ChannelUpdate) ClearLive

func (cu *ChannelUpdate) ClearLive() *ChannelUpdate

ClearLive clears all "live" edges to the Live entity.

func (*ChannelUpdate) ClearRetentionDays added in v1.2.12

func (cu *ChannelUpdate) ClearRetentionDays() *ChannelUpdate

ClearRetentionDays clears the value of the "retention_days" field.

func (*ChannelUpdate) ClearVods

func (cu *ChannelUpdate) ClearVods() *ChannelUpdate

ClearVods clears all "vods" edges to the Vod entity.

func (*ChannelUpdate) Exec

func (cu *ChannelUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ChannelUpdate) ExecX

func (cu *ChannelUpdate) ExecX(ctx context.Context)

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

func (*ChannelUpdate) Mutation

func (cu *ChannelUpdate) Mutation() *ChannelMutation

Mutation returns the ChannelMutation object of the builder.

func (*ChannelUpdate) RemoveLive

func (cu *ChannelUpdate) RemoveLive(l ...*Live) *ChannelUpdate

RemoveLive removes "live" edges to Live entities.

func (*ChannelUpdate) RemoveLiveIDs

func (cu *ChannelUpdate) RemoveLiveIDs(ids ...uuid.UUID) *ChannelUpdate

RemoveLiveIDs removes the "live" edge to Live entities by IDs.

func (*ChannelUpdate) RemoveVodIDs

func (cu *ChannelUpdate) RemoveVodIDs(ids ...uuid.UUID) *ChannelUpdate

RemoveVodIDs removes the "vods" edge to Vod entities by IDs.

func (*ChannelUpdate) RemoveVods

func (cu *ChannelUpdate) RemoveVods(v ...*Vod) *ChannelUpdate

RemoveVods removes "vods" edges to Vod entities.

func (*ChannelUpdate) Save

func (cu *ChannelUpdate) Save(ctx context.Context) (int, error)

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

func (*ChannelUpdate) SaveX

func (cu *ChannelUpdate) SaveX(ctx context.Context) int

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

func (*ChannelUpdate) SetDisplayName

func (cu *ChannelUpdate) SetDisplayName(s string) *ChannelUpdate

SetDisplayName sets the "display_name" field.

func (*ChannelUpdate) SetExtID added in v1.1.0

func (cu *ChannelUpdate) SetExtID(s string) *ChannelUpdate

SetExtID sets the "ext_id" field.

func (*ChannelUpdate) SetImagePath

func (cu *ChannelUpdate) SetImagePath(s string) *ChannelUpdate

SetImagePath sets the "image_path" field.

func (*ChannelUpdate) SetName

func (cu *ChannelUpdate) SetName(s string) *ChannelUpdate

SetName sets the "name" field.

func (*ChannelUpdate) SetNillableExtID added in v1.1.0

func (cu *ChannelUpdate) SetNillableExtID(s *string) *ChannelUpdate

SetNillableExtID sets the "ext_id" field if the given value is not nil.

func (*ChannelUpdate) SetNillableRetention added in v1.2.12

func (cu *ChannelUpdate) SetNillableRetention(b *bool) *ChannelUpdate

SetNillableRetention sets the "retention" field if the given value is not nil.

func (*ChannelUpdate) SetNillableRetentionDays added in v1.2.12

func (cu *ChannelUpdate) SetNillableRetentionDays(i *int64) *ChannelUpdate

SetNillableRetentionDays sets the "retention_days" field if the given value is not nil.

func (*ChannelUpdate) SetRetention added in v1.2.12

func (cu *ChannelUpdate) SetRetention(b bool) *ChannelUpdate

SetRetention sets the "retention" field.

func (*ChannelUpdate) SetRetentionDays added in v1.2.12

func (cu *ChannelUpdate) SetRetentionDays(i int64) *ChannelUpdate

SetRetentionDays sets the "retention_days" field.

func (*ChannelUpdate) SetUpdatedAt

func (cu *ChannelUpdate) SetUpdatedAt(t time.Time) *ChannelUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ChannelUpdate) Where

func (cu *ChannelUpdate) Where(ps ...predicate.Channel) *ChannelUpdate

Where appends a list predicates to the ChannelUpdate builder.

type ChannelUpdateOne

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

ChannelUpdateOne is the builder for updating a single Channel entity.

func (*ChannelUpdateOne) AddLive

func (cuo *ChannelUpdateOne) AddLive(l ...*Live) *ChannelUpdateOne

AddLive adds the "live" edges to the Live entity.

func (*ChannelUpdateOne) AddLiveIDs

func (cuo *ChannelUpdateOne) AddLiveIDs(ids ...uuid.UUID) *ChannelUpdateOne

AddLiveIDs adds the "live" edge to the Live entity by IDs.

func (*ChannelUpdateOne) AddRetentionDays added in v1.2.12

func (cuo *ChannelUpdateOne) AddRetentionDays(i int64) *ChannelUpdateOne

AddRetentionDays adds i to the "retention_days" field.

func (*ChannelUpdateOne) AddVodIDs

func (cuo *ChannelUpdateOne) AddVodIDs(ids ...uuid.UUID) *ChannelUpdateOne

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*ChannelUpdateOne) AddVods

func (cuo *ChannelUpdateOne) AddVods(v ...*Vod) *ChannelUpdateOne

AddVods adds the "vods" edges to the Vod entity.

func (*ChannelUpdateOne) ClearExtID added in v1.1.0

func (cuo *ChannelUpdateOne) ClearExtID() *ChannelUpdateOne

ClearExtID clears the value of the "ext_id" field.

func (*ChannelUpdateOne) ClearLive

func (cuo *ChannelUpdateOne) ClearLive() *ChannelUpdateOne

ClearLive clears all "live" edges to the Live entity.

func (*ChannelUpdateOne) ClearRetentionDays added in v1.2.12

func (cuo *ChannelUpdateOne) ClearRetentionDays() *ChannelUpdateOne

ClearRetentionDays clears the value of the "retention_days" field.

func (*ChannelUpdateOne) ClearVods

func (cuo *ChannelUpdateOne) ClearVods() *ChannelUpdateOne

ClearVods clears all "vods" edges to the Vod entity.

func (*ChannelUpdateOne) Exec

func (cuo *ChannelUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ChannelUpdateOne) ExecX

func (cuo *ChannelUpdateOne) ExecX(ctx context.Context)

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

func (*ChannelUpdateOne) Mutation

func (cuo *ChannelUpdateOne) Mutation() *ChannelMutation

Mutation returns the ChannelMutation object of the builder.

func (*ChannelUpdateOne) RemoveLive

func (cuo *ChannelUpdateOne) RemoveLive(l ...*Live) *ChannelUpdateOne

RemoveLive removes "live" edges to Live entities.

func (*ChannelUpdateOne) RemoveLiveIDs

func (cuo *ChannelUpdateOne) RemoveLiveIDs(ids ...uuid.UUID) *ChannelUpdateOne

RemoveLiveIDs removes the "live" edge to Live entities by IDs.

func (*ChannelUpdateOne) RemoveVodIDs

func (cuo *ChannelUpdateOne) RemoveVodIDs(ids ...uuid.UUID) *ChannelUpdateOne

RemoveVodIDs removes the "vods" edge to Vod entities by IDs.

func (*ChannelUpdateOne) RemoveVods

func (cuo *ChannelUpdateOne) RemoveVods(v ...*Vod) *ChannelUpdateOne

RemoveVods removes "vods" edges to Vod entities.

func (*ChannelUpdateOne) Save

func (cuo *ChannelUpdateOne) Save(ctx context.Context) (*Channel, error)

Save executes the query and returns the updated Channel entity.

func (*ChannelUpdateOne) SaveX

func (cuo *ChannelUpdateOne) SaveX(ctx context.Context) *Channel

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

func (*ChannelUpdateOne) Select

func (cuo *ChannelUpdateOne) Select(field string, fields ...string) *ChannelUpdateOne

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

func (*ChannelUpdateOne) SetDisplayName

func (cuo *ChannelUpdateOne) SetDisplayName(s string) *ChannelUpdateOne

SetDisplayName sets the "display_name" field.

func (*ChannelUpdateOne) SetExtID added in v1.1.0

func (cuo *ChannelUpdateOne) SetExtID(s string) *ChannelUpdateOne

SetExtID sets the "ext_id" field.

func (*ChannelUpdateOne) SetImagePath

func (cuo *ChannelUpdateOne) SetImagePath(s string) *ChannelUpdateOne

SetImagePath sets the "image_path" field.

func (*ChannelUpdateOne) SetName

func (cuo *ChannelUpdateOne) SetName(s string) *ChannelUpdateOne

SetName sets the "name" field.

func (*ChannelUpdateOne) SetNillableExtID added in v1.1.0

func (cuo *ChannelUpdateOne) SetNillableExtID(s *string) *ChannelUpdateOne

SetNillableExtID sets the "ext_id" field if the given value is not nil.

func (*ChannelUpdateOne) SetNillableRetention added in v1.2.12

func (cuo *ChannelUpdateOne) SetNillableRetention(b *bool) *ChannelUpdateOne

SetNillableRetention sets the "retention" field if the given value is not nil.

func (*ChannelUpdateOne) SetNillableRetentionDays added in v1.2.12

func (cuo *ChannelUpdateOne) SetNillableRetentionDays(i *int64) *ChannelUpdateOne

SetNillableRetentionDays sets the "retention_days" field if the given value is not nil.

func (*ChannelUpdateOne) SetRetention added in v1.2.12

func (cuo *ChannelUpdateOne) SetRetention(b bool) *ChannelUpdateOne

SetRetention sets the "retention" field.

func (*ChannelUpdateOne) SetRetentionDays added in v1.2.12

func (cuo *ChannelUpdateOne) SetRetentionDays(i int64) *ChannelUpdateOne

SetRetentionDays sets the "retention_days" field.

func (*ChannelUpdateOne) SetUpdatedAt

func (cuo *ChannelUpdateOne) SetUpdatedAt(t time.Time) *ChannelUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ChannelUpdateOne) Where added in v1.2.4

Where appends a list predicates to the ChannelUpdate builder.

type ChannelUpsert added in v0.0.2

type ChannelUpsert struct {
	*sql.UpdateSet
}

ChannelUpsert is the "OnConflict" setter.

func (*ChannelUpsert) AddRetentionDays added in v1.2.12

func (u *ChannelUpsert) AddRetentionDays(v int64) *ChannelUpsert

AddRetentionDays adds v to the "retention_days" field.

func (*ChannelUpsert) ClearExtID added in v1.2.4

func (u *ChannelUpsert) ClearExtID() *ChannelUpsert

ClearExtID clears the value of the "ext_id" field.

func (*ChannelUpsert) ClearRetentionDays added in v1.2.12

func (u *ChannelUpsert) ClearRetentionDays() *ChannelUpsert

ClearRetentionDays clears the value of the "retention_days" field.

func (*ChannelUpsert) SetDisplayName added in v0.0.2

func (u *ChannelUpsert) SetDisplayName(v string) *ChannelUpsert

SetDisplayName sets the "display_name" field.

func (*ChannelUpsert) SetExtID added in v1.2.4

func (u *ChannelUpsert) SetExtID(v string) *ChannelUpsert

SetExtID sets the "ext_id" field.

func (*ChannelUpsert) SetImagePath added in v0.0.2

func (u *ChannelUpsert) SetImagePath(v string) *ChannelUpsert

SetImagePath sets the "image_path" field.

func (*ChannelUpsert) SetName added in v0.0.2

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

SetName sets the "name" field.

func (*ChannelUpsert) SetRetention added in v1.2.12

func (u *ChannelUpsert) SetRetention(v bool) *ChannelUpsert

SetRetention sets the "retention" field.

func (*ChannelUpsert) SetRetentionDays added in v1.2.12

func (u *ChannelUpsert) SetRetentionDays(v int64) *ChannelUpsert

SetRetentionDays sets the "retention_days" field.

func (*ChannelUpsert) SetUpdatedAt added in v0.0.2

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

SetUpdatedAt sets the "updated_at" field.

func (*ChannelUpsert) UpdateDisplayName added in v0.0.2

func (u *ChannelUpsert) UpdateDisplayName() *ChannelUpsert

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*ChannelUpsert) UpdateExtID added in v1.2.4

func (u *ChannelUpsert) UpdateExtID() *ChannelUpsert

UpdateExtID sets the "ext_id" field to the value that was provided on create.

func (*ChannelUpsert) UpdateImagePath added in v0.0.2

func (u *ChannelUpsert) UpdateImagePath() *ChannelUpsert

UpdateImagePath sets the "image_path" field to the value that was provided on create.

func (*ChannelUpsert) UpdateName added in v0.0.2

func (u *ChannelUpsert) UpdateName() *ChannelUpsert

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

func (*ChannelUpsert) UpdateRetention added in v1.2.12

func (u *ChannelUpsert) UpdateRetention() *ChannelUpsert

UpdateRetention sets the "retention" field to the value that was provided on create.

func (*ChannelUpsert) UpdateRetentionDays added in v1.2.12

func (u *ChannelUpsert) UpdateRetentionDays() *ChannelUpsert

UpdateRetentionDays sets the "retention_days" field to the value that was provided on create.

func (*ChannelUpsert) UpdateUpdatedAt added in v0.0.2

func (u *ChannelUpsert) UpdateUpdatedAt() *ChannelUpsert

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

type ChannelUpsertBulk added in v0.0.2

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

ChannelUpsertBulk is the builder for "upsert"-ing a bulk of Channel nodes.

func (*ChannelUpsertBulk) AddRetentionDays added in v1.2.12

func (u *ChannelUpsertBulk) AddRetentionDays(v int64) *ChannelUpsertBulk

AddRetentionDays adds v to the "retention_days" field.

func (*ChannelUpsertBulk) ClearExtID added in v1.2.4

func (u *ChannelUpsertBulk) ClearExtID() *ChannelUpsertBulk

ClearExtID clears the value of the "ext_id" field.

func (*ChannelUpsertBulk) ClearRetentionDays added in v1.2.12

func (u *ChannelUpsertBulk) ClearRetentionDays() *ChannelUpsertBulk

ClearRetentionDays clears the value of the "retention_days" field.

func (*ChannelUpsertBulk) DoNothing added in v0.0.2

func (u *ChannelUpsertBulk) DoNothing() *ChannelUpsertBulk

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

func (*ChannelUpsertBulk) Exec added in v0.0.2

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

Exec executes the query.

func (*ChannelUpsertBulk) ExecX added in v0.0.2

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

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

func (*ChannelUpsertBulk) Ignore added in v0.0.2

func (u *ChannelUpsertBulk) Ignore() *ChannelUpsertBulk

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

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

func (*ChannelUpsertBulk) SetDisplayName added in v0.0.2

func (u *ChannelUpsertBulk) SetDisplayName(v string) *ChannelUpsertBulk

SetDisplayName sets the "display_name" field.

func (*ChannelUpsertBulk) SetExtID added in v1.2.4

func (u *ChannelUpsertBulk) SetExtID(v string) *ChannelUpsertBulk

SetExtID sets the "ext_id" field.

func (*ChannelUpsertBulk) SetImagePath added in v0.0.2

func (u *ChannelUpsertBulk) SetImagePath(v string) *ChannelUpsertBulk

SetImagePath sets the "image_path" field.

func (*ChannelUpsertBulk) SetName added in v0.0.2

SetName sets the "name" field.

func (*ChannelUpsertBulk) SetRetention added in v1.2.12

func (u *ChannelUpsertBulk) SetRetention(v bool) *ChannelUpsertBulk

SetRetention sets the "retention" field.

func (*ChannelUpsertBulk) SetRetentionDays added in v1.2.12

func (u *ChannelUpsertBulk) SetRetentionDays(v int64) *ChannelUpsertBulk

SetRetentionDays sets the "retention_days" field.

func (*ChannelUpsertBulk) SetUpdatedAt added in v0.0.2

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

SetUpdatedAt sets the "updated_at" field.

func (*ChannelUpsertBulk) Update added in v0.0.2

func (u *ChannelUpsertBulk) Update(set func(*ChannelUpsert)) *ChannelUpsertBulk

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

func (*ChannelUpsertBulk) UpdateDisplayName added in v0.0.2

func (u *ChannelUpsertBulk) UpdateDisplayName() *ChannelUpsertBulk

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*ChannelUpsertBulk) UpdateExtID added in v1.2.4

func (u *ChannelUpsertBulk) UpdateExtID() *ChannelUpsertBulk

UpdateExtID sets the "ext_id" field to the value that was provided on create.

func (*ChannelUpsertBulk) UpdateImagePath added in v0.0.2

func (u *ChannelUpsertBulk) UpdateImagePath() *ChannelUpsertBulk

UpdateImagePath sets the "image_path" field to the value that was provided on create.

func (*ChannelUpsertBulk) UpdateName added in v0.0.2

func (u *ChannelUpsertBulk) UpdateName() *ChannelUpsertBulk

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

func (*ChannelUpsertBulk) UpdateNewValues added in v0.0.2

func (u *ChannelUpsertBulk) UpdateNewValues() *ChannelUpsertBulk

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

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

func (*ChannelUpsertBulk) UpdateRetention added in v1.2.12

func (u *ChannelUpsertBulk) UpdateRetention() *ChannelUpsertBulk

UpdateRetention sets the "retention" field to the value that was provided on create.

func (*ChannelUpsertBulk) UpdateRetentionDays added in v1.2.12

func (u *ChannelUpsertBulk) UpdateRetentionDays() *ChannelUpsertBulk

UpdateRetentionDays sets the "retention_days" field to the value that was provided on create.

func (*ChannelUpsertBulk) UpdateUpdatedAt added in v0.0.2

func (u *ChannelUpsertBulk) UpdateUpdatedAt() *ChannelUpsertBulk

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

type ChannelUpsertOne added in v0.0.2

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

ChannelUpsertOne is the builder for "upsert"-ing

one Channel node.

func (*ChannelUpsertOne) AddRetentionDays added in v1.2.12

func (u *ChannelUpsertOne) AddRetentionDays(v int64) *ChannelUpsertOne

AddRetentionDays adds v to the "retention_days" field.

func (*ChannelUpsertOne) ClearExtID added in v1.2.4

func (u *ChannelUpsertOne) ClearExtID() *ChannelUpsertOne

ClearExtID clears the value of the "ext_id" field.

func (*ChannelUpsertOne) ClearRetentionDays added in v1.2.12

func (u *ChannelUpsertOne) ClearRetentionDays() *ChannelUpsertOne

ClearRetentionDays clears the value of the "retention_days" field.

func (*ChannelUpsertOne) DoNothing added in v0.0.2

func (u *ChannelUpsertOne) DoNothing() *ChannelUpsertOne

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

func (*ChannelUpsertOne) Exec added in v0.0.2

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

Exec executes the query.

func (*ChannelUpsertOne) ExecX added in v0.0.2

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

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

func (*ChannelUpsertOne) ID added in v0.0.2

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

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

func (*ChannelUpsertOne) IDX added in v0.0.2

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

func (*ChannelUpsertOne) Ignore added in v0.0.2

func (u *ChannelUpsertOne) Ignore() *ChannelUpsertOne

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

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

func (*ChannelUpsertOne) SetDisplayName added in v0.0.2

func (u *ChannelUpsertOne) SetDisplayName(v string) *ChannelUpsertOne

SetDisplayName sets the "display_name" field.

func (*ChannelUpsertOne) SetExtID added in v1.2.4

func (u *ChannelUpsertOne) SetExtID(v string) *ChannelUpsertOne

SetExtID sets the "ext_id" field.

func (*ChannelUpsertOne) SetImagePath added in v0.0.2

func (u *ChannelUpsertOne) SetImagePath(v string) *ChannelUpsertOne

SetImagePath sets the "image_path" field.

func (*ChannelUpsertOne) SetName added in v0.0.2

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

SetName sets the "name" field.

func (*ChannelUpsertOne) SetRetention added in v1.2.12

func (u *ChannelUpsertOne) SetRetention(v bool) *ChannelUpsertOne

SetRetention sets the "retention" field.

func (*ChannelUpsertOne) SetRetentionDays added in v1.2.12

func (u *ChannelUpsertOne) SetRetentionDays(v int64) *ChannelUpsertOne

SetRetentionDays sets the "retention_days" field.

func (*ChannelUpsertOne) SetUpdatedAt added in v0.0.2

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

SetUpdatedAt sets the "updated_at" field.

func (*ChannelUpsertOne) Update added in v0.0.2

func (u *ChannelUpsertOne) Update(set func(*ChannelUpsert)) *ChannelUpsertOne

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

func (*ChannelUpsertOne) UpdateDisplayName added in v0.0.2

func (u *ChannelUpsertOne) UpdateDisplayName() *ChannelUpsertOne

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*ChannelUpsertOne) UpdateExtID added in v1.2.4

func (u *ChannelUpsertOne) UpdateExtID() *ChannelUpsertOne

UpdateExtID sets the "ext_id" field to the value that was provided on create.

func (*ChannelUpsertOne) UpdateImagePath added in v0.0.2

func (u *ChannelUpsertOne) UpdateImagePath() *ChannelUpsertOne

UpdateImagePath sets the "image_path" field to the value that was provided on create.

func (*ChannelUpsertOne) UpdateName added in v0.0.2

func (u *ChannelUpsertOne) UpdateName() *ChannelUpsertOne

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

func (*ChannelUpsertOne) UpdateNewValues added in v0.0.2

func (u *ChannelUpsertOne) UpdateNewValues() *ChannelUpsertOne

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

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

func (*ChannelUpsertOne) UpdateRetention added in v1.2.12

func (u *ChannelUpsertOne) UpdateRetention() *ChannelUpsertOne

UpdateRetention sets the "retention" field to the value that was provided on create.

func (*ChannelUpsertOne) UpdateRetentionDays added in v1.2.12

func (u *ChannelUpsertOne) UpdateRetentionDays() *ChannelUpsertOne

UpdateRetentionDays sets the "retention_days" field to the value that was provided on create.

func (*ChannelUpsertOne) UpdateUpdatedAt added in v0.0.2

func (u *ChannelUpsertOne) UpdateUpdatedAt() *ChannelUpsertOne

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

type Channels

type Channels []*Channel

Channels is a parsable slice of Channel.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Channel is the client for interacting with the Channel builders.
	Channel *ChannelClient
	// Live is the client for interacting with the Live builders.
	Live *LiveClient
	// LiveCategory is the client for interacting with the LiveCategory builders.
	LiveCategory *LiveCategoryClient
	// Playback is the client for interacting with the Playback builders.
	Playback *PlaybackClient
	// Playlist is the client for interacting with the Playlist builders.
	Playlist *PlaylistClient
	// Queue is the client for interacting with the Queue builders.
	Queue *QueueClient
	// TwitchCategory is the client for interacting with the TwitchCategory builders.
	TwitchCategory *TwitchCategoryClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// Vod is the client for interacting with the Vod builders.
	Vod *VodClient
	// 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().
	Channel.
	Query().
	Count(ctx)

func (*Client) Intercept added in v1.1.7

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 added in v1.1.7

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 Hook

type Hook = ent.Hook

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

type InterceptFunc added in v1.1.7

type InterceptFunc = ent.InterceptFunc

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

type Interceptor added in v1.1.7

type Interceptor = ent.Interceptor

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

type Live

type Live struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Watch live streams
	WatchLive bool `json:"watch_live,omitempty"`
	// Watch new VODs
	WatchVod bool `json:"watch_vod,omitempty"`
	// Download archives
	DownloadArchives bool `json:"download_archives,omitempty"`
	// Download highlights
	DownloadHighlights bool `json:"download_highlights,omitempty"`
	// Download uploads
	DownloadUploads bool `json:"download_uploads,omitempty"`
	// Download sub only VODs
	DownloadSubOnly bool `json:"download_sub_only,omitempty"`
	// Whether the channel is currently live.
	IsLive bool `json:"is_live,omitempty"`
	// Whether the chat archive is enabled.
	ArchiveChat bool `json:"archive_chat,omitempty"`
	// Resolution holds the value of the "resolution" field.
	Resolution string `json:"resolution,omitempty"`
	// The time the channel last went live.
	LastLive time.Time `json:"last_live,omitempty"`
	// Whether the chat should be rendered.
	RenderChat bool `json:"render_chat,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the LiveQuery when eager-loading is set.
	Edges LiveEdges `json:"edges"`
	// contains filtered or unexported fields
}

Live is the model entity for the Live schema.

func (*Live) QueryCategories added in v1.2.4

func (l *Live) QueryCategories() *LiveCategoryQuery

QueryCategories queries the "categories" edge of the Live entity.

func (*Live) QueryChannel

func (l *Live) QueryChannel() *ChannelQuery

QueryChannel queries the "channel" edge of the Live entity.

func (*Live) String

func (l *Live) String() string

String implements the fmt.Stringer.

func (*Live) Unwrap

func (l *Live) Unwrap() *Live

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

func (l *Live) Update() *LiveUpdateOne

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

func (*Live) Value added in v1.2.12

func (l *Live) Value(name string) (ent.Value, error)

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

type LiveCategories added in v1.2.4

type LiveCategories []*LiveCategory

LiveCategories is a parsable slice of LiveCategory.

type LiveCategory added in v1.2.4

type LiveCategory struct {

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

LiveCategory is the model entity for the LiveCategory schema.

func (*LiveCategory) QueryLive added in v1.2.4

func (lc *LiveCategory) QueryLive() *LiveQuery

QueryLive queries the "live" edge of the LiveCategory entity.

func (*LiveCategory) String added in v1.2.4

func (lc *LiveCategory) String() string

String implements the fmt.Stringer.

func (*LiveCategory) Unwrap added in v1.2.4

func (lc *LiveCategory) Unwrap() *LiveCategory

Unwrap unwraps the LiveCategory 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 (*LiveCategory) Update added in v1.2.4

func (lc *LiveCategory) Update() *LiveCategoryUpdateOne

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

func (*LiveCategory) Value added in v1.2.12

func (lc *LiveCategory) Value(name string) (ent.Value, error)

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

type LiveCategoryClient added in v1.2.4

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

LiveCategoryClient is a client for the LiveCategory schema.

func NewLiveCategoryClient added in v1.2.4

func NewLiveCategoryClient(c config) *LiveCategoryClient

NewLiveCategoryClient returns a client for the LiveCategory from the given config.

func (*LiveCategoryClient) Create added in v1.2.4

Create returns a builder for creating a LiveCategory entity.

func (*LiveCategoryClient) CreateBulk added in v1.2.4

func (c *LiveCategoryClient) CreateBulk(builders ...*LiveCategoryCreate) *LiveCategoryCreateBulk

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

func (*LiveCategoryClient) Delete added in v1.2.4

Delete returns a delete builder for LiveCategory.

func (*LiveCategoryClient) DeleteOne added in v1.2.4

DeleteOne returns a builder for deleting the given entity.

func (*LiveCategoryClient) DeleteOneID added in v1.2.4

func (c *LiveCategoryClient) DeleteOneID(id uuid.UUID) *LiveCategoryDeleteOne

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

func (*LiveCategoryClient) Get added in v1.2.4

Get returns a LiveCategory entity by its id.

func (*LiveCategoryClient) GetX added in v1.2.4

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

func (*LiveCategoryClient) Hooks added in v1.2.4

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

Hooks returns the client hooks.

func (*LiveCategoryClient) Intercept added in v1.2.4

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

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

func (*LiveCategoryClient) Interceptors added in v1.2.4

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

Interceptors returns the client interceptors.

func (*LiveCategoryClient) Query added in v1.2.4

Query returns a query builder for LiveCategory.

func (*LiveCategoryClient) QueryLive added in v1.2.4

func (c *LiveCategoryClient) QueryLive(lc *LiveCategory) *LiveQuery

QueryLive queries the live edge of a LiveCategory.

func (*LiveCategoryClient) Update added in v1.2.4

Update returns an update builder for LiveCategory.

func (*LiveCategoryClient) UpdateOne added in v1.2.4

UpdateOne returns an update builder for the given entity.

func (*LiveCategoryClient) UpdateOneID added in v1.2.4

func (c *LiveCategoryClient) UpdateOneID(id uuid.UUID) *LiveCategoryUpdateOne

UpdateOneID returns an update builder for the given id.

func (*LiveCategoryClient) Use added in v1.2.4

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

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

type LiveCategoryCreate added in v1.2.4

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

LiveCategoryCreate is the builder for creating a LiveCategory entity.

func (*LiveCategoryCreate) Exec added in v1.2.4

func (lcc *LiveCategoryCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*LiveCategoryCreate) ExecX added in v1.2.4

func (lcc *LiveCategoryCreate) ExecX(ctx context.Context)

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

func (*LiveCategoryCreate) Mutation added in v1.2.4

func (lcc *LiveCategoryCreate) Mutation() *LiveCategoryMutation

Mutation returns the LiveCategoryMutation object of the builder.

func (*LiveCategoryCreate) OnConflict added in v1.2.4

func (lcc *LiveCategoryCreate) OnConflict(opts ...sql.ConflictOption) *LiveCategoryUpsertOne

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

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

func (*LiveCategoryCreate) OnConflictColumns added in v1.2.4

func (lcc *LiveCategoryCreate) OnConflictColumns(columns ...string) *LiveCategoryUpsertOne

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

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

func (*LiveCategoryCreate) Save added in v1.2.4

Save creates the LiveCategory in the database.

func (*LiveCategoryCreate) SaveX added in v1.2.4

SaveX calls Save and panics if Save returns an error.

func (*LiveCategoryCreate) SetID added in v1.2.4

SetID sets the "id" field.

func (*LiveCategoryCreate) SetLive added in v1.2.4

func (lcc *LiveCategoryCreate) SetLive(l *Live) *LiveCategoryCreate

SetLive sets the "live" edge to the Live entity.

func (*LiveCategoryCreate) SetLiveID added in v1.2.4

func (lcc *LiveCategoryCreate) SetLiveID(id uuid.UUID) *LiveCategoryCreate

SetLiveID sets the "live" edge to the Live entity by ID.

func (*LiveCategoryCreate) SetName added in v1.2.4

func (lcc *LiveCategoryCreate) SetName(s string) *LiveCategoryCreate

SetName sets the "name" field.

func (*LiveCategoryCreate) SetNillableID added in v1.2.4

func (lcc *LiveCategoryCreate) SetNillableID(u *uuid.UUID) *LiveCategoryCreate

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

type LiveCategoryCreateBulk added in v1.2.4

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

LiveCategoryCreateBulk is the builder for creating many LiveCategory entities in bulk.

func (*LiveCategoryCreateBulk) Exec added in v1.2.4

func (lccb *LiveCategoryCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*LiveCategoryCreateBulk) ExecX added in v1.2.4

func (lccb *LiveCategoryCreateBulk) ExecX(ctx context.Context)

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

func (*LiveCategoryCreateBulk) OnConflict added in v1.2.4

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

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

func (*LiveCategoryCreateBulk) OnConflictColumns added in v1.2.4

func (lccb *LiveCategoryCreateBulk) OnConflictColumns(columns ...string) *LiveCategoryUpsertBulk

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

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

func (*LiveCategoryCreateBulk) Save added in v1.2.4

Save creates the LiveCategory entities in the database.

func (*LiveCategoryCreateBulk) SaveX added in v1.2.4

func (lccb *LiveCategoryCreateBulk) SaveX(ctx context.Context) []*LiveCategory

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

type LiveCategoryDelete added in v1.2.4

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

LiveCategoryDelete is the builder for deleting a LiveCategory entity.

func (*LiveCategoryDelete) Exec added in v1.2.4

func (lcd *LiveCategoryDelete) Exec(ctx context.Context) (int, error)

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

func (*LiveCategoryDelete) ExecX added in v1.2.4

func (lcd *LiveCategoryDelete) ExecX(ctx context.Context) int

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

func (*LiveCategoryDelete) Where added in v1.2.4

Where appends a list predicates to the LiveCategoryDelete builder.

type LiveCategoryDeleteOne added in v1.2.4

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

LiveCategoryDeleteOne is the builder for deleting a single LiveCategory entity.

func (*LiveCategoryDeleteOne) Exec added in v1.2.4

func (lcdo *LiveCategoryDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*LiveCategoryDeleteOne) ExecX added in v1.2.4

func (lcdo *LiveCategoryDeleteOne) ExecX(ctx context.Context)

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

func (*LiveCategoryDeleteOne) Where added in v1.2.4

Where appends a list predicates to the LiveCategoryDelete builder.

type LiveCategoryEdges added in v1.2.4

type LiveCategoryEdges struct {
	// Live holds the value of the live edge.
	Live *Live `json:"live,omitempty"`
	// contains filtered or unexported fields
}

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

func (LiveCategoryEdges) LiveOrErr added in v1.2.4

func (e LiveCategoryEdges) LiveOrErr() (*Live, error)

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

type LiveCategoryGroupBy added in v1.2.4

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

LiveCategoryGroupBy is the group-by builder for LiveCategory entities.

func (*LiveCategoryGroupBy) Aggregate added in v1.2.4

func (lcgb *LiveCategoryGroupBy) Aggregate(fns ...AggregateFunc) *LiveCategoryGroupBy

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

func (*LiveCategoryGroupBy) Bool added in v1.2.4

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

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

func (*LiveCategoryGroupBy) BoolX added in v1.2.4

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

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

func (*LiveCategoryGroupBy) Bools added in v1.2.4

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

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

func (*LiveCategoryGroupBy) BoolsX added in v1.2.4

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

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

func (*LiveCategoryGroupBy) Float64 added in v1.2.4

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

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

func (*LiveCategoryGroupBy) Float64X added in v1.2.4

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

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

func (*LiveCategoryGroupBy) Float64s added in v1.2.4

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

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

func (*LiveCategoryGroupBy) Float64sX added in v1.2.4

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

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

func (*LiveCategoryGroupBy) Int added in v1.2.4

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

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

func (*LiveCategoryGroupBy) IntX added in v1.2.4

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

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

func (*LiveCategoryGroupBy) Ints added in v1.2.4

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

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

func (*LiveCategoryGroupBy) IntsX added in v1.2.4

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

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

func (*LiveCategoryGroupBy) Scan added in v1.2.4

func (lcgb *LiveCategoryGroupBy) Scan(ctx context.Context, v any) error

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

func (*LiveCategoryGroupBy) ScanX added in v1.2.4

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

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

func (*LiveCategoryGroupBy) String added in v1.2.4

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

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

func (*LiveCategoryGroupBy) StringX added in v1.2.4

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

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

func (*LiveCategoryGroupBy) Strings added in v1.2.4

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

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

func (*LiveCategoryGroupBy) StringsX added in v1.2.4

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

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

type LiveCategoryMutation added in v1.2.4

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

LiveCategoryMutation represents an operation that mutates the LiveCategory nodes in the graph.

func (*LiveCategoryMutation) AddField added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) AddedEdges added in v1.2.4

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

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

func (*LiveCategoryMutation) AddedField added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) AddedFields added in v1.2.4

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

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

func (*LiveCategoryMutation) AddedIDs added in v1.2.4

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

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

func (*LiveCategoryMutation) ClearEdge added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) ClearField added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) ClearLive added in v1.2.4

func (m *LiveCategoryMutation) ClearLive()

ClearLive clears the "live" edge to the Live entity.

func (*LiveCategoryMutation) ClearedEdges added in v1.2.4

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

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

func (*LiveCategoryMutation) ClearedFields added in v1.2.4

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

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

func (LiveCategoryMutation) Client added in v1.2.4

func (m LiveCategoryMutation) 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 (*LiveCategoryMutation) EdgeCleared added in v1.2.4

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

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

func (*LiveCategoryMutation) Field added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) FieldCleared added in v1.2.4

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

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

func (*LiveCategoryMutation) Fields added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) ID added in v1.2.4

func (m *LiveCategoryMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*LiveCategoryMutation) IDs added in v1.2.4

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 (*LiveCategoryMutation) LiveCleared added in v1.2.4

func (m *LiveCategoryMutation) LiveCleared() bool

LiveCleared reports if the "live" edge to the Live entity was cleared.

func (*LiveCategoryMutation) LiveID added in v1.2.4

func (m *LiveCategoryMutation) LiveID() (id uuid.UUID, exists bool)

LiveID returns the "live" edge ID in the mutation.

func (*LiveCategoryMutation) LiveIDs added in v1.2.4

func (m *LiveCategoryMutation) LiveIDs() (ids []uuid.UUID)

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

func (*LiveCategoryMutation) Name added in v1.2.4

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

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

func (*LiveCategoryMutation) OldField added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) OldName added in v1.2.4

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

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

func (*LiveCategoryMutation) Op added in v1.2.4

func (m *LiveCategoryMutation) Op() Op

Op returns the operation name.

func (*LiveCategoryMutation) RemovedEdges added in v1.2.4

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

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

func (*LiveCategoryMutation) RemovedIDs added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) ResetEdge added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) ResetField added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) ResetLive added in v1.2.4

func (m *LiveCategoryMutation) ResetLive()

ResetLive resets all changes to the "live" edge.

func (*LiveCategoryMutation) ResetName added in v1.2.4

func (m *LiveCategoryMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*LiveCategoryMutation) SetField added in v1.2.4

func (m *LiveCategoryMutation) 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 (*LiveCategoryMutation) SetID added in v1.2.4

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

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

func (*LiveCategoryMutation) SetLiveID added in v1.2.4

func (m *LiveCategoryMutation) SetLiveID(id uuid.UUID)

SetLiveID sets the "live" edge to the Live entity by id.

func (*LiveCategoryMutation) SetName added in v1.2.4

func (m *LiveCategoryMutation) SetName(s string)

SetName sets the "name" field.

func (*LiveCategoryMutation) SetOp added in v1.2.4

func (m *LiveCategoryMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (LiveCategoryMutation) Tx added in v1.2.4

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

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

func (*LiveCategoryMutation) Type added in v1.2.4

func (m *LiveCategoryMutation) Type() string

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

func (*LiveCategoryMutation) Where added in v1.2.4

Where appends a list predicates to the LiveCategoryMutation builder.

func (*LiveCategoryMutation) WhereP added in v1.2.4

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

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

type LiveCategoryQuery added in v1.2.4

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

LiveCategoryQuery is the builder for querying LiveCategory entities.

func (*LiveCategoryQuery) Aggregate added in v1.2.4

func (lcq *LiveCategoryQuery) Aggregate(fns ...AggregateFunc) *LiveCategorySelect

Aggregate returns a LiveCategorySelect configured with the given aggregations.

func (*LiveCategoryQuery) All added in v1.2.4

func (lcq *LiveCategoryQuery) All(ctx context.Context) ([]*LiveCategory, error)

All executes the query and returns a list of LiveCategories.

func (*LiveCategoryQuery) AllX added in v1.2.4

func (lcq *LiveCategoryQuery) AllX(ctx context.Context) []*LiveCategory

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

func (*LiveCategoryQuery) Clone added in v1.2.4

func (lcq *LiveCategoryQuery) Clone() *LiveCategoryQuery

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

func (*LiveCategoryQuery) Count added in v1.2.4

func (lcq *LiveCategoryQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*LiveCategoryQuery) CountX added in v1.2.4

func (lcq *LiveCategoryQuery) CountX(ctx context.Context) int

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

func (*LiveCategoryQuery) Exist added in v1.2.4

func (lcq *LiveCategoryQuery) Exist(ctx context.Context) (bool, error)

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

func (*LiveCategoryQuery) ExistX added in v1.2.4

func (lcq *LiveCategoryQuery) ExistX(ctx context.Context) bool

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

func (*LiveCategoryQuery) First added in v1.2.4

func (lcq *LiveCategoryQuery) First(ctx context.Context) (*LiveCategory, error)

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

func (*LiveCategoryQuery) FirstID added in v1.2.4

func (lcq *LiveCategoryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*LiveCategoryQuery) FirstIDX added in v1.2.4

func (lcq *LiveCategoryQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*LiveCategoryQuery) FirstX added in v1.2.4

func (lcq *LiveCategoryQuery) FirstX(ctx context.Context) *LiveCategory

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

func (*LiveCategoryQuery) GroupBy added in v1.2.4

func (lcq *LiveCategoryQuery) GroupBy(field string, fields ...string) *LiveCategoryGroupBy

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.LiveCategory.Query().
	GroupBy(livecategory.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*LiveCategoryQuery) IDs added in v1.2.4

func (lcq *LiveCategoryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*LiveCategoryQuery) IDsX added in v1.2.4

func (lcq *LiveCategoryQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*LiveCategoryQuery) Limit added in v1.2.4

func (lcq *LiveCategoryQuery) Limit(limit int) *LiveCategoryQuery

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

func (*LiveCategoryQuery) Offset added in v1.2.4

func (lcq *LiveCategoryQuery) Offset(offset int) *LiveCategoryQuery

Offset to start from.

func (*LiveCategoryQuery) Only added in v1.2.4

func (lcq *LiveCategoryQuery) Only(ctx context.Context) (*LiveCategory, error)

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

func (*LiveCategoryQuery) OnlyID added in v1.2.4

func (lcq *LiveCategoryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*LiveCategoryQuery) OnlyIDX added in v1.2.4

func (lcq *LiveCategoryQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*LiveCategoryQuery) OnlyX added in v1.2.4

func (lcq *LiveCategoryQuery) OnlyX(ctx context.Context) *LiveCategory

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

func (*LiveCategoryQuery) Order added in v1.2.4

Order specifies how the records should be ordered.

func (*LiveCategoryQuery) QueryLive added in v1.2.4

func (lcq *LiveCategoryQuery) QueryLive() *LiveQuery

QueryLive chains the current query on the "live" edge.

func (*LiveCategoryQuery) Select added in v1.2.4

func (lcq *LiveCategoryQuery) Select(fields ...string) *LiveCategorySelect

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.LiveCategory.Query().
	Select(livecategory.FieldName).
	Scan(ctx, &v)

func (*LiveCategoryQuery) Unique added in v1.2.4

func (lcq *LiveCategoryQuery) Unique(unique bool) *LiveCategoryQuery

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 (*LiveCategoryQuery) Where added in v1.2.4

Where adds a new predicate for the LiveCategoryQuery builder.

func (*LiveCategoryQuery) WithLive added in v1.2.4

func (lcq *LiveCategoryQuery) WithLive(opts ...func(*LiveQuery)) *LiveCategoryQuery

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

type LiveCategorySelect added in v1.2.4

type LiveCategorySelect struct {
	*LiveCategoryQuery
	// contains filtered or unexported fields
}

LiveCategorySelect is the builder for selecting fields of LiveCategory entities.

func (*LiveCategorySelect) Aggregate added in v1.2.4

func (lcs *LiveCategorySelect) Aggregate(fns ...AggregateFunc) *LiveCategorySelect

Aggregate adds the given aggregation functions to the selector query.

func (*LiveCategorySelect) Bool added in v1.2.4

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

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

func (*LiveCategorySelect) BoolX added in v1.2.4

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

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

func (*LiveCategorySelect) Bools added in v1.2.4

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

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

func (*LiveCategorySelect) BoolsX added in v1.2.4

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

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

func (*LiveCategorySelect) Float64 added in v1.2.4

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

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

func (*LiveCategorySelect) Float64X added in v1.2.4

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

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

func (*LiveCategorySelect) Float64s added in v1.2.4

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

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

func (*LiveCategorySelect) Float64sX added in v1.2.4

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

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

func (*LiveCategorySelect) Int added in v1.2.4

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

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

func (*LiveCategorySelect) IntX added in v1.2.4

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

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

func (*LiveCategorySelect) Ints added in v1.2.4

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

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

func (*LiveCategorySelect) IntsX added in v1.2.4

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

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

func (*LiveCategorySelect) Scan added in v1.2.4

func (lcs *LiveCategorySelect) Scan(ctx context.Context, v any) error

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

func (*LiveCategorySelect) ScanX added in v1.2.4

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

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

func (*LiveCategorySelect) String added in v1.2.4

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

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

func (*LiveCategorySelect) StringX added in v1.2.4

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

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

func (*LiveCategorySelect) Strings added in v1.2.4

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

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

func (*LiveCategorySelect) StringsX added in v1.2.4

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

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

type LiveCategoryUpdate added in v1.2.4

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

LiveCategoryUpdate is the builder for updating LiveCategory entities.

func (*LiveCategoryUpdate) ClearLive added in v1.2.4

func (lcu *LiveCategoryUpdate) ClearLive() *LiveCategoryUpdate

ClearLive clears the "live" edge to the Live entity.

func (*LiveCategoryUpdate) Exec added in v1.2.4

func (lcu *LiveCategoryUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*LiveCategoryUpdate) ExecX added in v1.2.4

func (lcu *LiveCategoryUpdate) ExecX(ctx context.Context)

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

func (*LiveCategoryUpdate) Mutation added in v1.2.4

func (lcu *LiveCategoryUpdate) Mutation() *LiveCategoryMutation

Mutation returns the LiveCategoryMutation object of the builder.

func (*LiveCategoryUpdate) Save added in v1.2.4

func (lcu *LiveCategoryUpdate) Save(ctx context.Context) (int, error)

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

func (*LiveCategoryUpdate) SaveX added in v1.2.4

func (lcu *LiveCategoryUpdate) SaveX(ctx context.Context) int

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

func (*LiveCategoryUpdate) SetLive added in v1.2.4

func (lcu *LiveCategoryUpdate) SetLive(l *Live) *LiveCategoryUpdate

SetLive sets the "live" edge to the Live entity.

func (*LiveCategoryUpdate) SetLiveID added in v1.2.4

func (lcu *LiveCategoryUpdate) SetLiveID(id uuid.UUID) *LiveCategoryUpdate

SetLiveID sets the "live" edge to the Live entity by ID.

func (*LiveCategoryUpdate) SetName added in v1.2.4

func (lcu *LiveCategoryUpdate) SetName(s string) *LiveCategoryUpdate

SetName sets the "name" field.

func (*LiveCategoryUpdate) Where added in v1.2.4

Where appends a list predicates to the LiveCategoryUpdate builder.

type LiveCategoryUpdateOne added in v1.2.4

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

LiveCategoryUpdateOne is the builder for updating a single LiveCategory entity.

func (*LiveCategoryUpdateOne) ClearLive added in v1.2.4

func (lcuo *LiveCategoryUpdateOne) ClearLive() *LiveCategoryUpdateOne

ClearLive clears the "live" edge to the Live entity.

func (*LiveCategoryUpdateOne) Exec added in v1.2.4

func (lcuo *LiveCategoryUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*LiveCategoryUpdateOne) ExecX added in v1.2.4

func (lcuo *LiveCategoryUpdateOne) ExecX(ctx context.Context)

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

func (*LiveCategoryUpdateOne) Mutation added in v1.2.4

func (lcuo *LiveCategoryUpdateOne) Mutation() *LiveCategoryMutation

Mutation returns the LiveCategoryMutation object of the builder.

func (*LiveCategoryUpdateOne) Save added in v1.2.4

Save executes the query and returns the updated LiveCategory entity.

func (*LiveCategoryUpdateOne) SaveX added in v1.2.4

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

func (*LiveCategoryUpdateOne) Select added in v1.2.4

func (lcuo *LiveCategoryUpdateOne) Select(field string, fields ...string) *LiveCategoryUpdateOne

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

func (*LiveCategoryUpdateOne) SetLive added in v1.2.4

SetLive sets the "live" edge to the Live entity.

func (*LiveCategoryUpdateOne) SetLiveID added in v1.2.4

SetLiveID sets the "live" edge to the Live entity by ID.

func (*LiveCategoryUpdateOne) SetName added in v1.2.4

SetName sets the "name" field.

func (*LiveCategoryUpdateOne) Where added in v1.2.4

Where appends a list predicates to the LiveCategoryUpdate builder.

type LiveCategoryUpsert added in v1.2.4

type LiveCategoryUpsert struct {
	*sql.UpdateSet
}

LiveCategoryUpsert is the "OnConflict" setter.

func (*LiveCategoryUpsert) SetName added in v1.2.4

SetName sets the "name" field.

func (*LiveCategoryUpsert) UpdateName added in v1.2.4

func (u *LiveCategoryUpsert) UpdateName() *LiveCategoryUpsert

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

type LiveCategoryUpsertBulk added in v1.2.4

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

LiveCategoryUpsertBulk is the builder for "upsert"-ing a bulk of LiveCategory nodes.

func (*LiveCategoryUpsertBulk) DoNothing added in v1.2.4

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

func (*LiveCategoryUpsertBulk) Exec added in v1.2.4

Exec executes the query.

func (*LiveCategoryUpsertBulk) ExecX added in v1.2.4

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

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

func (*LiveCategoryUpsertBulk) Ignore added in v1.2.4

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

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

func (*LiveCategoryUpsertBulk) SetName added in v1.2.4

SetName sets the "name" field.

func (*LiveCategoryUpsertBulk) Update added in v1.2.4

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

func (*LiveCategoryUpsertBulk) UpdateName added in v1.2.4

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

func (*LiveCategoryUpsertBulk) UpdateNewValues added in v1.2.4

func (u *LiveCategoryUpsertBulk) UpdateNewValues() *LiveCategoryUpsertBulk

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

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

type LiveCategoryUpsertOne added in v1.2.4

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

LiveCategoryUpsertOne is the builder for "upsert"-ing

one LiveCategory node.

func (*LiveCategoryUpsertOne) DoNothing added in v1.2.4

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

func (*LiveCategoryUpsertOne) Exec added in v1.2.4

Exec executes the query.

func (*LiveCategoryUpsertOne) ExecX added in v1.2.4

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

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

func (*LiveCategoryUpsertOne) ID added in v1.2.4

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

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

func (*LiveCategoryUpsertOne) IDX added in v1.2.4

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

func (*LiveCategoryUpsertOne) Ignore added in v1.2.4

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

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

func (*LiveCategoryUpsertOne) SetName added in v1.2.4

SetName sets the "name" field.

func (*LiveCategoryUpsertOne) Update added in v1.2.4

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

func (*LiveCategoryUpsertOne) UpdateName added in v1.2.4

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

func (*LiveCategoryUpsertOne) UpdateNewValues added in v1.2.4

func (u *LiveCategoryUpsertOne) UpdateNewValues() *LiveCategoryUpsertOne

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

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

type LiveClient

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

LiveClient is a client for the Live schema.

func NewLiveClient

func NewLiveClient(c config) *LiveClient

NewLiveClient returns a client for the Live from the given config.

func (*LiveClient) Create

func (c *LiveClient) Create() *LiveCreate

Create returns a builder for creating a Live entity.

func (*LiveClient) CreateBulk

func (c *LiveClient) CreateBulk(builders ...*LiveCreate) *LiveCreateBulk

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

func (*LiveClient) Delete

func (c *LiveClient) Delete() *LiveDelete

Delete returns a delete builder for Live.

func (*LiveClient) DeleteOne

func (c *LiveClient) DeleteOne(l *Live) *LiveDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*LiveClient) DeleteOneID

func (c *LiveClient) DeleteOneID(id uuid.UUID) *LiveDeleteOne

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

func (*LiveClient) Get

func (c *LiveClient) Get(ctx context.Context, id uuid.UUID) (*Live, error)

Get returns a Live entity by its id.

func (*LiveClient) GetX

func (c *LiveClient) GetX(ctx context.Context, id uuid.UUID) *Live

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

func (*LiveClient) Hooks

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

Hooks returns the client hooks.

func (*LiveClient) Intercept added in v1.1.7

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

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

func (*LiveClient) Interceptors added in v1.1.7

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

Interceptors returns the client interceptors.

func (*LiveClient) Query

func (c *LiveClient) Query() *LiveQuery

Query returns a query builder for Live.

func (*LiveClient) QueryCategories added in v1.2.4

func (c *LiveClient) QueryCategories(l *Live) *LiveCategoryQuery

QueryCategories queries the categories edge of a Live.

func (*LiveClient) QueryChannel

func (c *LiveClient) QueryChannel(l *Live) *ChannelQuery

QueryChannel queries the channel edge of a Live.

func (*LiveClient) Update

func (c *LiveClient) Update() *LiveUpdate

Update returns an update builder for Live.

func (*LiveClient) UpdateOne

func (c *LiveClient) UpdateOne(l *Live) *LiveUpdateOne

UpdateOne returns an update builder for the given entity.

func (*LiveClient) UpdateOneID

func (c *LiveClient) UpdateOneID(id uuid.UUID) *LiveUpdateOne

UpdateOneID returns an update builder for the given id.

func (*LiveClient) Use

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

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

type LiveCreate

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

LiveCreate is the builder for creating a Live entity.

func (*LiveCreate) AddCategories added in v1.2.4

func (lc *LiveCreate) AddCategories(l ...*LiveCategory) *LiveCreate

AddCategories adds the "categories" edges to the LiveCategory entity.

func (*LiveCreate) AddCategoryIDs added in v1.2.4

func (lc *LiveCreate) AddCategoryIDs(ids ...uuid.UUID) *LiveCreate

AddCategoryIDs adds the "categories" edge to the LiveCategory entity by IDs.

func (*LiveCreate) Exec

func (lc *LiveCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*LiveCreate) ExecX

func (lc *LiveCreate) ExecX(ctx context.Context)

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

func (*LiveCreate) Mutation

func (lc *LiveCreate) Mutation() *LiveMutation

Mutation returns the LiveMutation object of the builder.

func (*LiveCreate) OnConflict added in v0.0.2

func (lc *LiveCreate) OnConflict(opts ...sql.ConflictOption) *LiveUpsertOne

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

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

func (*LiveCreate) OnConflictColumns added in v0.0.2

func (lc *LiveCreate) OnConflictColumns(columns ...string) *LiveUpsertOne

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

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

func (*LiveCreate) Save

func (lc *LiveCreate) Save(ctx context.Context) (*Live, error)

Save creates the Live in the database.

func (*LiveCreate) SaveX

func (lc *LiveCreate) SaveX(ctx context.Context) *Live

SaveX calls Save and panics if Save returns an error.

func (*LiveCreate) SetArchiveChat

func (lc *LiveCreate) SetArchiveChat(b bool) *LiveCreate

SetArchiveChat sets the "archive_chat" field.

func (*LiveCreate) SetChannel

func (lc *LiveCreate) SetChannel(c *Channel) *LiveCreate

SetChannel sets the "channel" edge to the Channel entity.

func (*LiveCreate) SetChannelID

func (lc *LiveCreate) SetChannelID(id uuid.UUID) *LiveCreate

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*LiveCreate) SetCreatedAt

func (lc *LiveCreate) SetCreatedAt(t time.Time) *LiveCreate

SetCreatedAt sets the "created_at" field.

func (*LiveCreate) SetDownloadArchives added in v1.1.0

func (lc *LiveCreate) SetDownloadArchives(b bool) *LiveCreate

SetDownloadArchives sets the "download_archives" field.

func (*LiveCreate) SetDownloadHighlights added in v1.1.0

func (lc *LiveCreate) SetDownloadHighlights(b bool) *LiveCreate

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveCreate) SetDownloadSubOnly added in v1.2.0

func (lc *LiveCreate) SetDownloadSubOnly(b bool) *LiveCreate

SetDownloadSubOnly sets the "download_sub_only" field.

func (*LiveCreate) SetDownloadUploads added in v1.1.0

func (lc *LiveCreate) SetDownloadUploads(b bool) *LiveCreate

SetDownloadUploads sets the "download_uploads" field.

func (*LiveCreate) SetID

func (lc *LiveCreate) SetID(u uuid.UUID) *LiveCreate

SetID sets the "id" field.

func (*LiveCreate) SetIsLive

func (lc *LiveCreate) SetIsLive(b bool) *LiveCreate

SetIsLive sets the "is_live" field.

func (*LiveCreate) SetLastLive

func (lc *LiveCreate) SetLastLive(t time.Time) *LiveCreate

SetLastLive sets the "last_live" field.

func (*LiveCreate) SetNillableArchiveChat

func (lc *LiveCreate) SetNillableArchiveChat(b *bool) *LiveCreate

SetNillableArchiveChat sets the "archive_chat" field if the given value is not nil.

func (*LiveCreate) SetNillableCreatedAt

func (lc *LiveCreate) SetNillableCreatedAt(t *time.Time) *LiveCreate

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

func (*LiveCreate) SetNillableDownloadArchives added in v1.1.0

func (lc *LiveCreate) SetNillableDownloadArchives(b *bool) *LiveCreate

SetNillableDownloadArchives sets the "download_archives" field if the given value is not nil.

func (*LiveCreate) SetNillableDownloadHighlights added in v1.1.0

func (lc *LiveCreate) SetNillableDownloadHighlights(b *bool) *LiveCreate

SetNillableDownloadHighlights sets the "download_highlights" field if the given value is not nil.

func (*LiveCreate) SetNillableDownloadSubOnly added in v1.2.0

func (lc *LiveCreate) SetNillableDownloadSubOnly(b *bool) *LiveCreate

SetNillableDownloadSubOnly sets the "download_sub_only" field if the given value is not nil.

func (*LiveCreate) SetNillableDownloadUploads added in v1.1.0

func (lc *LiveCreate) SetNillableDownloadUploads(b *bool) *LiveCreate

SetNillableDownloadUploads sets the "download_uploads" field if the given value is not nil.

func (*LiveCreate) SetNillableID

func (lc *LiveCreate) SetNillableID(u *uuid.UUID) *LiveCreate

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

func (*LiveCreate) SetNillableIsLive

func (lc *LiveCreate) SetNillableIsLive(b *bool) *LiveCreate

SetNillableIsLive sets the "is_live" field if the given value is not nil.

func (*LiveCreate) SetNillableLastLive

func (lc *LiveCreate) SetNillableLastLive(t *time.Time) *LiveCreate

SetNillableLastLive sets the "last_live" field if the given value is not nil.

func (*LiveCreate) SetNillableRenderChat added in v1.1.7

func (lc *LiveCreate) SetNillableRenderChat(b *bool) *LiveCreate

SetNillableRenderChat sets the "render_chat" field if the given value is not nil.

func (*LiveCreate) SetNillableResolution

func (lc *LiveCreate) SetNillableResolution(s *string) *LiveCreate

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*LiveCreate) SetNillableUpdatedAt

func (lc *LiveCreate) SetNillableUpdatedAt(t *time.Time) *LiveCreate

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

func (*LiveCreate) SetNillableWatchLive added in v1.1.0

func (lc *LiveCreate) SetNillableWatchLive(b *bool) *LiveCreate

SetNillableWatchLive sets the "watch_live" field if the given value is not nil.

func (*LiveCreate) SetNillableWatchVod added in v1.1.0

func (lc *LiveCreate) SetNillableWatchVod(b *bool) *LiveCreate

SetNillableWatchVod sets the "watch_vod" field if the given value is not nil.

func (*LiveCreate) SetRenderChat added in v1.1.7

func (lc *LiveCreate) SetRenderChat(b bool) *LiveCreate

SetRenderChat sets the "render_chat" field.

func (*LiveCreate) SetResolution

func (lc *LiveCreate) SetResolution(s string) *LiveCreate

SetResolution sets the "resolution" field.

func (*LiveCreate) SetUpdatedAt

func (lc *LiveCreate) SetUpdatedAt(t time.Time) *LiveCreate

SetUpdatedAt sets the "updated_at" field.

func (*LiveCreate) SetWatchLive added in v1.1.0

func (lc *LiveCreate) SetWatchLive(b bool) *LiveCreate

SetWatchLive sets the "watch_live" field.

func (*LiveCreate) SetWatchVod added in v1.1.0

func (lc *LiveCreate) SetWatchVod(b bool) *LiveCreate

SetWatchVod sets the "watch_vod" field.

type LiveCreateBulk

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

LiveCreateBulk is the builder for creating many Live entities in bulk.

func (*LiveCreateBulk) Exec

func (lcb *LiveCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*LiveCreateBulk) ExecX

func (lcb *LiveCreateBulk) ExecX(ctx context.Context)

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

func (*LiveCreateBulk) OnConflict added in v0.0.2

func (lcb *LiveCreateBulk) OnConflict(opts ...sql.ConflictOption) *LiveUpsertBulk

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

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

func (*LiveCreateBulk) OnConflictColumns added in v0.0.2

func (lcb *LiveCreateBulk) OnConflictColumns(columns ...string) *LiveUpsertBulk

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

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

func (*LiveCreateBulk) Save

func (lcb *LiveCreateBulk) Save(ctx context.Context) ([]*Live, error)

Save creates the Live entities in the database.

func (*LiveCreateBulk) SaveX

func (lcb *LiveCreateBulk) SaveX(ctx context.Context) []*Live

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

type LiveDelete

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

LiveDelete is the builder for deleting a Live entity.

func (*LiveDelete) Exec

func (ld *LiveDelete) Exec(ctx context.Context) (int, error)

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

func (*LiveDelete) ExecX

func (ld *LiveDelete) ExecX(ctx context.Context) int

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

func (*LiveDelete) Where

func (ld *LiveDelete) Where(ps ...predicate.Live) *LiveDelete

Where appends a list predicates to the LiveDelete builder.

type LiveDeleteOne

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

LiveDeleteOne is the builder for deleting a single Live entity.

func (*LiveDeleteOne) Exec

func (ldo *LiveDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*LiveDeleteOne) ExecX

func (ldo *LiveDeleteOne) ExecX(ctx context.Context)

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

func (*LiveDeleteOne) Where added in v1.2.4

func (ldo *LiveDeleteOne) Where(ps ...predicate.Live) *LiveDeleteOne

Where appends a list predicates to the LiveDelete builder.

type LiveEdges

type LiveEdges struct {
	// Channel holds the value of the channel edge.
	Channel *Channel `json:"channel,omitempty"`
	// Categories holds the value of the categories edge.
	Categories []*LiveCategory `json:"categories,omitempty"`
	// contains filtered or unexported fields
}

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

func (LiveEdges) CategoriesOrErr added in v1.2.4

func (e LiveEdges) CategoriesOrErr() ([]*LiveCategory, error)

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

func (LiveEdges) ChannelOrErr

func (e LiveEdges) ChannelOrErr() (*Channel, error)

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

type LiveGroupBy

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

LiveGroupBy is the group-by builder for Live entities.

func (*LiveGroupBy) Aggregate

func (lgb *LiveGroupBy) Aggregate(fns ...AggregateFunc) *LiveGroupBy

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

func (*LiveGroupBy) Bool

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

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

func (*LiveGroupBy) BoolX

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

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

func (*LiveGroupBy) Bools

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

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

func (*LiveGroupBy) BoolsX

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

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

func (*LiveGroupBy) Float64

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

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

func (*LiveGroupBy) Float64X

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

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

func (*LiveGroupBy) Float64s

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

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

func (*LiveGroupBy) Float64sX

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

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

func (*LiveGroupBy) Int

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

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

func (*LiveGroupBy) IntX

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

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

func (*LiveGroupBy) Ints

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

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

func (*LiveGroupBy) IntsX

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

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

func (*LiveGroupBy) Scan

func (lgb *LiveGroupBy) Scan(ctx context.Context, v any) error

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

func (*LiveGroupBy) ScanX

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

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

func (*LiveGroupBy) String

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

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

func (*LiveGroupBy) StringX

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

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

func (*LiveGroupBy) Strings

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

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

func (*LiveGroupBy) StringsX

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

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

type LiveMutation

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

LiveMutation represents an operation that mutates the Live nodes in the graph.

func (*LiveMutation) AddCategoryIDs added in v1.2.4

func (m *LiveMutation) AddCategoryIDs(ids ...uuid.UUID)

AddCategoryIDs adds the "categories" edge to the LiveCategory entity by ids.

func (*LiveMutation) AddField

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

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

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

func (*LiveMutation) AddedField

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

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

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

func (*LiveMutation) AddedIDs

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

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

func (*LiveMutation) ArchiveChat

func (m *LiveMutation) ArchiveChat() (r bool, exists bool)

ArchiveChat returns the value of the "archive_chat" field in the mutation.

func (*LiveMutation) CategoriesCleared added in v1.2.4

func (m *LiveMutation) CategoriesCleared() bool

CategoriesCleared reports if the "categories" edge to the LiveCategory entity was cleared.

func (*LiveMutation) CategoriesIDs added in v1.2.4

func (m *LiveMutation) CategoriesIDs() (ids []uuid.UUID)

CategoriesIDs returns the "categories" edge IDs in the mutation.

func (*LiveMutation) ChannelCleared

func (m *LiveMutation) ChannelCleared() bool

ChannelCleared reports if the "channel" edge to the Channel entity was cleared.

func (*LiveMutation) ChannelID

func (m *LiveMutation) ChannelID() (id uuid.UUID, exists bool)

ChannelID returns the "channel" edge ID in the mutation.

func (*LiveMutation) ChannelIDs

func (m *LiveMutation) ChannelIDs() (ids []uuid.UUID)

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

func (*LiveMutation) ClearCategories added in v1.2.4

func (m *LiveMutation) ClearCategories()

ClearCategories clears the "categories" edge to the LiveCategory entity.

func (*LiveMutation) ClearChannel

func (m *LiveMutation) ClearChannel()

ClearChannel clears the "channel" edge to the Channel entity.

func (*LiveMutation) ClearEdge

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

func (m *LiveMutation) 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 (*LiveMutation) ClearResolution

func (m *LiveMutation) ClearResolution()

ClearResolution clears the value of the "resolution" field.

func (*LiveMutation) ClearedEdges

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

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

func (*LiveMutation) ClearedFields

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

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

func (LiveMutation) Client

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

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

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

func (*LiveMutation) DownloadArchives added in v1.1.0

func (m *LiveMutation) DownloadArchives() (r bool, exists bool)

DownloadArchives returns the value of the "download_archives" field in the mutation.

func (*LiveMutation) DownloadHighlights added in v1.1.0

func (m *LiveMutation) DownloadHighlights() (r bool, exists bool)

DownloadHighlights returns the value of the "download_highlights" field in the mutation.

func (*LiveMutation) DownloadSubOnly added in v1.2.0

func (m *LiveMutation) DownloadSubOnly() (r bool, exists bool)

DownloadSubOnly returns the value of the "download_sub_only" field in the mutation.

func (*LiveMutation) DownloadUploads added in v1.1.0

func (m *LiveMutation) DownloadUploads() (r bool, exists bool)

DownloadUploads returns the value of the "download_uploads" field in the mutation.

func (*LiveMutation) EdgeCleared

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

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

func (*LiveMutation) Field

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

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

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

func (*LiveMutation) Fields

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

func (m *LiveMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*LiveMutation) IDs

func (m *LiveMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*LiveMutation) IsLive

func (m *LiveMutation) IsLive() (r bool, exists bool)

IsLive returns the value of the "is_live" field in the mutation.

func (*LiveMutation) LastLive

func (m *LiveMutation) LastLive() (r time.Time, exists bool)

LastLive returns the value of the "last_live" field in the mutation.

func (*LiveMutation) OldArchiveChat

func (m *LiveMutation) OldArchiveChat(ctx context.Context) (v bool, err error)

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

func (*LiveMutation) OldCreatedAt

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

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

func (*LiveMutation) OldDownloadArchives added in v1.1.0

func (m *LiveMutation) OldDownloadArchives(ctx context.Context) (v bool, err error)

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

func (*LiveMutation) OldDownloadHighlights added in v1.1.0

func (m *LiveMutation) OldDownloadHighlights(ctx context.Context) (v bool, err error)

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

func (*LiveMutation) OldDownloadSubOnly added in v1.2.0

func (m *LiveMutation) OldDownloadSubOnly(ctx context.Context) (v bool, err error)

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

func (*LiveMutation) OldDownloadUploads added in v1.1.0

func (m *LiveMutation) OldDownloadUploads(ctx context.Context) (v bool, err error)

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

func (*LiveMutation) OldField

func (m *LiveMutation) 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 (*LiveMutation) OldIsLive

func (m *LiveMutation) OldIsLive(ctx context.Context) (v bool, err error)

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

func (*LiveMutation) OldLastLive

func (m *LiveMutation) OldLastLive(ctx context.Context) (v time.Time, err error)

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

func (*LiveMutation) OldRenderChat added in v1.1.7

func (m *LiveMutation) OldRenderChat(ctx context.Context) (v bool, err error)

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

func (*LiveMutation) OldResolution

func (m *LiveMutation) OldResolution(ctx context.Context) (v string, err error)

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

func (*LiveMutation) OldUpdatedAt

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

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

func (*LiveMutation) OldWatchLive added in v1.1.0

func (m *LiveMutation) OldWatchLive(ctx context.Context) (v bool, err error)

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

func (*LiveMutation) OldWatchVod added in v1.1.0

func (m *LiveMutation) OldWatchVod(ctx context.Context) (v bool, err error)

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

func (*LiveMutation) Op

func (m *LiveMutation) Op() Op

Op returns the operation name.

func (*LiveMutation) RemoveCategoryIDs added in v1.2.4

func (m *LiveMutation) RemoveCategoryIDs(ids ...uuid.UUID)

RemoveCategoryIDs removes the "categories" edge to the LiveCategory entity by IDs.

func (*LiveMutation) RemovedCategoriesIDs added in v1.2.4

func (m *LiveMutation) RemovedCategoriesIDs() (ids []uuid.UUID)

RemovedCategories returns the removed IDs of the "categories" edge to the LiveCategory entity.

func (*LiveMutation) RemovedEdges

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

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

func (*LiveMutation) RemovedIDs

func (m *LiveMutation) 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 (*LiveMutation) RenderChat added in v1.1.7

func (m *LiveMutation) RenderChat() (r bool, exists bool)

RenderChat returns the value of the "render_chat" field in the mutation.

func (*LiveMutation) ResetArchiveChat

func (m *LiveMutation) ResetArchiveChat()

ResetArchiveChat resets all changes to the "archive_chat" field.

func (*LiveMutation) ResetCategories added in v1.2.4

func (m *LiveMutation) ResetCategories()

ResetCategories resets all changes to the "categories" edge.

func (*LiveMutation) ResetChannel

func (m *LiveMutation) ResetChannel()

ResetChannel resets all changes to the "channel" edge.

func (*LiveMutation) ResetCreatedAt

func (m *LiveMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*LiveMutation) ResetDownloadArchives added in v1.1.0

func (m *LiveMutation) ResetDownloadArchives()

ResetDownloadArchives resets all changes to the "download_archives" field.

func (*LiveMutation) ResetDownloadHighlights added in v1.1.0

func (m *LiveMutation) ResetDownloadHighlights()

ResetDownloadHighlights resets all changes to the "download_highlights" field.

func (*LiveMutation) ResetDownloadSubOnly added in v1.2.0

func (m *LiveMutation) ResetDownloadSubOnly()

ResetDownloadSubOnly resets all changes to the "download_sub_only" field.

func (*LiveMutation) ResetDownloadUploads added in v1.1.0

func (m *LiveMutation) ResetDownloadUploads()

ResetDownloadUploads resets all changes to the "download_uploads" field.

func (*LiveMutation) ResetEdge

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

func (m *LiveMutation) 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 (*LiveMutation) ResetIsLive

func (m *LiveMutation) ResetIsLive()

ResetIsLive resets all changes to the "is_live" field.

func (*LiveMutation) ResetLastLive

func (m *LiveMutation) ResetLastLive()

ResetLastLive resets all changes to the "last_live" field.

func (*LiveMutation) ResetRenderChat added in v1.1.7

func (m *LiveMutation) ResetRenderChat()

ResetRenderChat resets all changes to the "render_chat" field.

func (*LiveMutation) ResetResolution

func (m *LiveMutation) ResetResolution()

ResetResolution resets all changes to the "resolution" field.

func (*LiveMutation) ResetUpdatedAt

func (m *LiveMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*LiveMutation) ResetWatchLive added in v1.1.0

func (m *LiveMutation) ResetWatchLive()

ResetWatchLive resets all changes to the "watch_live" field.

func (*LiveMutation) ResetWatchVod added in v1.1.0

func (m *LiveMutation) ResetWatchVod()

ResetWatchVod resets all changes to the "watch_vod" field.

func (*LiveMutation) Resolution

func (m *LiveMutation) Resolution() (r string, exists bool)

Resolution returns the value of the "resolution" field in the mutation.

func (*LiveMutation) ResolutionCleared

func (m *LiveMutation) ResolutionCleared() bool

ResolutionCleared returns if the "resolution" field was cleared in this mutation.

func (*LiveMutation) SetArchiveChat

func (m *LiveMutation) SetArchiveChat(b bool)

SetArchiveChat sets the "archive_chat" field.

func (*LiveMutation) SetChannelID

func (m *LiveMutation) SetChannelID(id uuid.UUID)

SetChannelID sets the "channel" edge to the Channel entity by id.

func (*LiveMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*LiveMutation) SetDownloadArchives added in v1.1.0

func (m *LiveMutation) SetDownloadArchives(b bool)

SetDownloadArchives sets the "download_archives" field.

func (*LiveMutation) SetDownloadHighlights added in v1.1.0

func (m *LiveMutation) SetDownloadHighlights(b bool)

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveMutation) SetDownloadSubOnly added in v1.2.0

func (m *LiveMutation) SetDownloadSubOnly(b bool)

SetDownloadSubOnly sets the "download_sub_only" field.

func (*LiveMutation) SetDownloadUploads added in v1.1.0

func (m *LiveMutation) SetDownloadUploads(b bool)

SetDownloadUploads sets the "download_uploads" field.

func (*LiveMutation) SetField

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

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

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

func (*LiveMutation) SetIsLive

func (m *LiveMutation) SetIsLive(b bool)

SetIsLive sets the "is_live" field.

func (*LiveMutation) SetLastLive

func (m *LiveMutation) SetLastLive(t time.Time)

SetLastLive sets the "last_live" field.

func (*LiveMutation) SetOp added in v1.1.7

func (m *LiveMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*LiveMutation) SetRenderChat added in v1.1.7

func (m *LiveMutation) SetRenderChat(b bool)

SetRenderChat sets the "render_chat" field.

func (*LiveMutation) SetResolution

func (m *LiveMutation) SetResolution(s string)

SetResolution sets the "resolution" field.

func (*LiveMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*LiveMutation) SetWatchLive added in v1.1.0

func (m *LiveMutation) SetWatchLive(b bool)

SetWatchLive sets the "watch_live" field.

func (*LiveMutation) SetWatchVod added in v1.1.0

func (m *LiveMutation) SetWatchVod(b bool)

SetWatchVod sets the "watch_vod" field.

func (LiveMutation) Tx

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

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

func (*LiveMutation) Type

func (m *LiveMutation) Type() string

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

func (*LiveMutation) UpdatedAt

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

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

func (*LiveMutation) WatchLive added in v1.1.0

func (m *LiveMutation) WatchLive() (r bool, exists bool)

WatchLive returns the value of the "watch_live" field in the mutation.

func (*LiveMutation) WatchVod added in v1.1.0

func (m *LiveMutation) WatchVod() (r bool, exists bool)

WatchVod returns the value of the "watch_vod" field in the mutation.

func (*LiveMutation) Where

func (m *LiveMutation) Where(ps ...predicate.Live)

Where appends a list predicates to the LiveMutation builder.

func (*LiveMutation) WhereP added in v1.1.7

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

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

type LiveQuery

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

LiveQuery is the builder for querying Live entities.

func (*LiveQuery) Aggregate added in v1.1.7

func (lq *LiveQuery) Aggregate(fns ...AggregateFunc) *LiveSelect

Aggregate returns a LiveSelect configured with the given aggregations.

func (*LiveQuery) All

func (lq *LiveQuery) All(ctx context.Context) ([]*Live, error)

All executes the query and returns a list of Lives.

func (*LiveQuery) AllX

func (lq *LiveQuery) AllX(ctx context.Context) []*Live

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

func (*LiveQuery) Clone

func (lq *LiveQuery) Clone() *LiveQuery

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

func (*LiveQuery) Count

func (lq *LiveQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*LiveQuery) CountX

func (lq *LiveQuery) CountX(ctx context.Context) int

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

func (*LiveQuery) Exist

func (lq *LiveQuery) Exist(ctx context.Context) (bool, error)

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

func (*LiveQuery) ExistX

func (lq *LiveQuery) ExistX(ctx context.Context) bool

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

func (*LiveQuery) First

func (lq *LiveQuery) First(ctx context.Context) (*Live, error)

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

func (*LiveQuery) FirstID

func (lq *LiveQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*LiveQuery) FirstIDX

func (lq *LiveQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*LiveQuery) FirstX

func (lq *LiveQuery) FirstX(ctx context.Context) *Live

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

func (*LiveQuery) GroupBy

func (lq *LiveQuery) GroupBy(field string, fields ...string) *LiveGroupBy

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 {
	WatchLive bool `json:"watch_live,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Live.Query().
	GroupBy(live.FieldWatchLive).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*LiveQuery) IDs

func (lq *LiveQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*LiveQuery) IDsX

func (lq *LiveQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*LiveQuery) Limit

func (lq *LiveQuery) Limit(limit int) *LiveQuery

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

func (*LiveQuery) Offset

func (lq *LiveQuery) Offset(offset int) *LiveQuery

Offset to start from.

func (*LiveQuery) Only

func (lq *LiveQuery) Only(ctx context.Context) (*Live, error)

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

func (*LiveQuery) OnlyID

func (lq *LiveQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*LiveQuery) OnlyIDX

func (lq *LiveQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*LiveQuery) OnlyX

func (lq *LiveQuery) OnlyX(ctx context.Context) *Live

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

func (*LiveQuery) Order

func (lq *LiveQuery) Order(o ...live.OrderOption) *LiveQuery

Order specifies how the records should be ordered.

func (*LiveQuery) QueryCategories added in v1.2.4

func (lq *LiveQuery) QueryCategories() *LiveCategoryQuery

QueryCategories chains the current query on the "categories" edge.

func (*LiveQuery) QueryChannel

func (lq *LiveQuery) QueryChannel() *ChannelQuery

QueryChannel chains the current query on the "channel" edge.

func (*LiveQuery) Select

func (lq *LiveQuery) Select(fields ...string) *LiveSelect

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 {
	WatchLive bool `json:"watch_live,omitempty"`
}

client.Live.Query().
	Select(live.FieldWatchLive).
	Scan(ctx, &v)

func (*LiveQuery) Unique

func (lq *LiveQuery) Unique(unique bool) *LiveQuery

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

func (lq *LiveQuery) Where(ps ...predicate.Live) *LiveQuery

Where adds a new predicate for the LiveQuery builder.

func (*LiveQuery) WithCategories added in v1.2.4

func (lq *LiveQuery) WithCategories(opts ...func(*LiveCategoryQuery)) *LiveQuery

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

func (*LiveQuery) WithChannel

func (lq *LiveQuery) WithChannel(opts ...func(*ChannelQuery)) *LiveQuery

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

type LiveSelect

type LiveSelect struct {
	*LiveQuery
	// contains filtered or unexported fields
}

LiveSelect is the builder for selecting fields of Live entities.

func (*LiveSelect) Aggregate added in v1.1.7

func (ls *LiveSelect) Aggregate(fns ...AggregateFunc) *LiveSelect

Aggregate adds the given aggregation functions to the selector query.

func (*LiveSelect) Bool

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

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

func (*LiveSelect) BoolX

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

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

func (*LiveSelect) Bools

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

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

func (*LiveSelect) BoolsX

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

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

func (*LiveSelect) Float64

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

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

func (*LiveSelect) Float64X

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

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

func (*LiveSelect) Float64s

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

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

func (*LiveSelect) Float64sX

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

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

func (*LiveSelect) Int

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

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

func (*LiveSelect) IntX

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

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

func (*LiveSelect) Ints

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

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

func (*LiveSelect) IntsX

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

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

func (*LiveSelect) Scan

func (ls *LiveSelect) Scan(ctx context.Context, v any) error

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

func (*LiveSelect) ScanX

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

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

func (*LiveSelect) String

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

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

func (*LiveSelect) StringX

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

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

func (*LiveSelect) Strings

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

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

func (*LiveSelect) StringsX

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

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

type LiveUpdate

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

LiveUpdate is the builder for updating Live entities.

func (*LiveUpdate) AddCategories added in v1.2.4

func (lu *LiveUpdate) AddCategories(l ...*LiveCategory) *LiveUpdate

AddCategories adds the "categories" edges to the LiveCategory entity.

func (*LiveUpdate) AddCategoryIDs added in v1.2.4

func (lu *LiveUpdate) AddCategoryIDs(ids ...uuid.UUID) *LiveUpdate

AddCategoryIDs adds the "categories" edge to the LiveCategory entity by IDs.

func (*LiveUpdate) ClearCategories added in v1.2.4

func (lu *LiveUpdate) ClearCategories() *LiveUpdate

ClearCategories clears all "categories" edges to the LiveCategory entity.

func (*LiveUpdate) ClearChannel

func (lu *LiveUpdate) ClearChannel() *LiveUpdate

ClearChannel clears the "channel" edge to the Channel entity.

func (*LiveUpdate) ClearResolution

func (lu *LiveUpdate) ClearResolution() *LiveUpdate

ClearResolution clears the value of the "resolution" field.

func (*LiveUpdate) Exec

func (lu *LiveUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*LiveUpdate) ExecX

func (lu *LiveUpdate) ExecX(ctx context.Context)

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

func (*LiveUpdate) Mutation

func (lu *LiveUpdate) Mutation() *LiveMutation

Mutation returns the LiveMutation object of the builder.

func (*LiveUpdate) RemoveCategories added in v1.2.4

func (lu *LiveUpdate) RemoveCategories(l ...*LiveCategory) *LiveUpdate

RemoveCategories removes "categories" edges to LiveCategory entities.

func (*LiveUpdate) RemoveCategoryIDs added in v1.2.4

func (lu *LiveUpdate) RemoveCategoryIDs(ids ...uuid.UUID) *LiveUpdate

RemoveCategoryIDs removes the "categories" edge to LiveCategory entities by IDs.

func (*LiveUpdate) Save

func (lu *LiveUpdate) Save(ctx context.Context) (int, error)

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

func (*LiveUpdate) SaveX

func (lu *LiveUpdate) SaveX(ctx context.Context) int

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

func (*LiveUpdate) SetArchiveChat

func (lu *LiveUpdate) SetArchiveChat(b bool) *LiveUpdate

SetArchiveChat sets the "archive_chat" field.

func (*LiveUpdate) SetChannel

func (lu *LiveUpdate) SetChannel(c *Channel) *LiveUpdate

SetChannel sets the "channel" edge to the Channel entity.

func (*LiveUpdate) SetChannelID

func (lu *LiveUpdate) SetChannelID(id uuid.UUID) *LiveUpdate

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*LiveUpdate) SetDownloadArchives added in v1.1.0

func (lu *LiveUpdate) SetDownloadArchives(b bool) *LiveUpdate

SetDownloadArchives sets the "download_archives" field.

func (*LiveUpdate) SetDownloadHighlights added in v1.1.0

func (lu *LiveUpdate) SetDownloadHighlights(b bool) *LiveUpdate

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveUpdate) SetDownloadSubOnly added in v1.2.0

func (lu *LiveUpdate) SetDownloadSubOnly(b bool) *LiveUpdate

SetDownloadSubOnly sets the "download_sub_only" field.

func (*LiveUpdate) SetDownloadUploads added in v1.1.0

func (lu *LiveUpdate) SetDownloadUploads(b bool) *LiveUpdate

SetDownloadUploads sets the "download_uploads" field.

func (*LiveUpdate) SetIsLive

func (lu *LiveUpdate) SetIsLive(b bool) *LiveUpdate

SetIsLive sets the "is_live" field.

func (*LiveUpdate) SetLastLive

func (lu *LiveUpdate) SetLastLive(t time.Time) *LiveUpdate

SetLastLive sets the "last_live" field.

func (*LiveUpdate) SetNillableArchiveChat

func (lu *LiveUpdate) SetNillableArchiveChat(b *bool) *LiveUpdate

SetNillableArchiveChat sets the "archive_chat" field if the given value is not nil.

func (*LiveUpdate) SetNillableDownloadArchives added in v1.1.0

func (lu *LiveUpdate) SetNillableDownloadArchives(b *bool) *LiveUpdate

SetNillableDownloadArchives sets the "download_archives" field if the given value is not nil.

func (*LiveUpdate) SetNillableDownloadHighlights added in v1.1.0

func (lu *LiveUpdate) SetNillableDownloadHighlights(b *bool) *LiveUpdate

SetNillableDownloadHighlights sets the "download_highlights" field if the given value is not nil.

func (*LiveUpdate) SetNillableDownloadSubOnly added in v1.2.0

func (lu *LiveUpdate) SetNillableDownloadSubOnly(b *bool) *LiveUpdate

SetNillableDownloadSubOnly sets the "download_sub_only" field if the given value is not nil.

func (*LiveUpdate) SetNillableDownloadUploads added in v1.1.0

func (lu *LiveUpdate) SetNillableDownloadUploads(b *bool) *LiveUpdate

SetNillableDownloadUploads sets the "download_uploads" field if the given value is not nil.

func (*LiveUpdate) SetNillableIsLive

func (lu *LiveUpdate) SetNillableIsLive(b *bool) *LiveUpdate

SetNillableIsLive sets the "is_live" field if the given value is not nil.

func (*LiveUpdate) SetNillableLastLive

func (lu *LiveUpdate) SetNillableLastLive(t *time.Time) *LiveUpdate

SetNillableLastLive sets the "last_live" field if the given value is not nil.

func (*LiveUpdate) SetNillableRenderChat added in v1.1.7

func (lu *LiveUpdate) SetNillableRenderChat(b *bool) *LiveUpdate

SetNillableRenderChat sets the "render_chat" field if the given value is not nil.

func (*LiveUpdate) SetNillableResolution

func (lu *LiveUpdate) SetNillableResolution(s *string) *LiveUpdate

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*LiveUpdate) SetNillableWatchLive added in v1.1.0

func (lu *LiveUpdate) SetNillableWatchLive(b *bool) *LiveUpdate

SetNillableWatchLive sets the "watch_live" field if the given value is not nil.

func (*LiveUpdate) SetNillableWatchVod added in v1.1.0

func (lu *LiveUpdate) SetNillableWatchVod(b *bool) *LiveUpdate

SetNillableWatchVod sets the "watch_vod" field if the given value is not nil.

func (*LiveUpdate) SetRenderChat added in v1.1.7

func (lu *LiveUpdate) SetRenderChat(b bool) *LiveUpdate

SetRenderChat sets the "render_chat" field.

func (*LiveUpdate) SetResolution

func (lu *LiveUpdate) SetResolution(s string) *LiveUpdate

SetResolution sets the "resolution" field.

func (*LiveUpdate) SetUpdatedAt

func (lu *LiveUpdate) SetUpdatedAt(t time.Time) *LiveUpdate

SetUpdatedAt sets the "updated_at" field.

func (*LiveUpdate) SetWatchLive added in v1.1.0

func (lu *LiveUpdate) SetWatchLive(b bool) *LiveUpdate

SetWatchLive sets the "watch_live" field.

func (*LiveUpdate) SetWatchVod added in v1.1.0

func (lu *LiveUpdate) SetWatchVod(b bool) *LiveUpdate

SetWatchVod sets the "watch_vod" field.

func (*LiveUpdate) Where

func (lu *LiveUpdate) Where(ps ...predicate.Live) *LiveUpdate

Where appends a list predicates to the LiveUpdate builder.

type LiveUpdateOne

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

LiveUpdateOne is the builder for updating a single Live entity.

func (*LiveUpdateOne) AddCategories added in v1.2.4

func (luo *LiveUpdateOne) AddCategories(l ...*LiveCategory) *LiveUpdateOne

AddCategories adds the "categories" edges to the LiveCategory entity.

func (*LiveUpdateOne) AddCategoryIDs added in v1.2.4

func (luo *LiveUpdateOne) AddCategoryIDs(ids ...uuid.UUID) *LiveUpdateOne

AddCategoryIDs adds the "categories" edge to the LiveCategory entity by IDs.

func (*LiveUpdateOne) ClearCategories added in v1.2.4

func (luo *LiveUpdateOne) ClearCategories() *LiveUpdateOne

ClearCategories clears all "categories" edges to the LiveCategory entity.

func (*LiveUpdateOne) ClearChannel

func (luo *LiveUpdateOne) ClearChannel() *LiveUpdateOne

ClearChannel clears the "channel" edge to the Channel entity.

func (*LiveUpdateOne) ClearResolution

func (luo *LiveUpdateOne) ClearResolution() *LiveUpdateOne

ClearResolution clears the value of the "resolution" field.

func (*LiveUpdateOne) Exec

func (luo *LiveUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*LiveUpdateOne) ExecX

func (luo *LiveUpdateOne) ExecX(ctx context.Context)

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

func (*LiveUpdateOne) Mutation

func (luo *LiveUpdateOne) Mutation() *LiveMutation

Mutation returns the LiveMutation object of the builder.

func (*LiveUpdateOne) RemoveCategories added in v1.2.4

func (luo *LiveUpdateOne) RemoveCategories(l ...*LiveCategory) *LiveUpdateOne

RemoveCategories removes "categories" edges to LiveCategory entities.

func (*LiveUpdateOne) RemoveCategoryIDs added in v1.2.4

func (luo *LiveUpdateOne) RemoveCategoryIDs(ids ...uuid.UUID) *LiveUpdateOne

RemoveCategoryIDs removes the "categories" edge to LiveCategory entities by IDs.

func (*LiveUpdateOne) Save

func (luo *LiveUpdateOne) Save(ctx context.Context) (*Live, error)

Save executes the query and returns the updated Live entity.

func (*LiveUpdateOne) SaveX

func (luo *LiveUpdateOne) SaveX(ctx context.Context) *Live

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

func (*LiveUpdateOne) Select

func (luo *LiveUpdateOne) Select(field string, fields ...string) *LiveUpdateOne

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

func (*LiveUpdateOne) SetArchiveChat

func (luo *LiveUpdateOne) SetArchiveChat(b bool) *LiveUpdateOne

SetArchiveChat sets the "archive_chat" field.

func (*LiveUpdateOne) SetChannel

func (luo *LiveUpdateOne) SetChannel(c *Channel) *LiveUpdateOne

SetChannel sets the "channel" edge to the Channel entity.

func (*LiveUpdateOne) SetChannelID

func (luo *LiveUpdateOne) SetChannelID(id uuid.UUID) *LiveUpdateOne

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*LiveUpdateOne) SetDownloadArchives added in v1.1.0

func (luo *LiveUpdateOne) SetDownloadArchives(b bool) *LiveUpdateOne

SetDownloadArchives sets the "download_archives" field.

func (*LiveUpdateOne) SetDownloadHighlights added in v1.1.0

func (luo *LiveUpdateOne) SetDownloadHighlights(b bool) *LiveUpdateOne

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveUpdateOne) SetDownloadSubOnly added in v1.2.0

func (luo *LiveUpdateOne) SetDownloadSubOnly(b bool) *LiveUpdateOne

SetDownloadSubOnly sets the "download_sub_only" field.

func (*LiveUpdateOne) SetDownloadUploads added in v1.1.0

func (luo *LiveUpdateOne) SetDownloadUploads(b bool) *LiveUpdateOne

SetDownloadUploads sets the "download_uploads" field.

func (*LiveUpdateOne) SetIsLive

func (luo *LiveUpdateOne) SetIsLive(b bool) *LiveUpdateOne

SetIsLive sets the "is_live" field.

func (*LiveUpdateOne) SetLastLive

func (luo *LiveUpdateOne) SetLastLive(t time.Time) *LiveUpdateOne

SetLastLive sets the "last_live" field.

func (*LiveUpdateOne) SetNillableArchiveChat

func (luo *LiveUpdateOne) SetNillableArchiveChat(b *bool) *LiveUpdateOne

SetNillableArchiveChat sets the "archive_chat" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableDownloadArchives added in v1.1.0

func (luo *LiveUpdateOne) SetNillableDownloadArchives(b *bool) *LiveUpdateOne

SetNillableDownloadArchives sets the "download_archives" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableDownloadHighlights added in v1.1.0

func (luo *LiveUpdateOne) SetNillableDownloadHighlights(b *bool) *LiveUpdateOne

SetNillableDownloadHighlights sets the "download_highlights" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableDownloadSubOnly added in v1.2.0

func (luo *LiveUpdateOne) SetNillableDownloadSubOnly(b *bool) *LiveUpdateOne

SetNillableDownloadSubOnly sets the "download_sub_only" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableDownloadUploads added in v1.1.0

func (luo *LiveUpdateOne) SetNillableDownloadUploads(b *bool) *LiveUpdateOne

SetNillableDownloadUploads sets the "download_uploads" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableIsLive

func (luo *LiveUpdateOne) SetNillableIsLive(b *bool) *LiveUpdateOne

SetNillableIsLive sets the "is_live" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableLastLive

func (luo *LiveUpdateOne) SetNillableLastLive(t *time.Time) *LiveUpdateOne

SetNillableLastLive sets the "last_live" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableRenderChat added in v1.1.7

func (luo *LiveUpdateOne) SetNillableRenderChat(b *bool) *LiveUpdateOne

SetNillableRenderChat sets the "render_chat" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableResolution

func (luo *LiveUpdateOne) SetNillableResolution(s *string) *LiveUpdateOne

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableWatchLive added in v1.1.0

func (luo *LiveUpdateOne) SetNillableWatchLive(b *bool) *LiveUpdateOne

SetNillableWatchLive sets the "watch_live" field if the given value is not nil.

func (*LiveUpdateOne) SetNillableWatchVod added in v1.1.0

func (luo *LiveUpdateOne) SetNillableWatchVod(b *bool) *LiveUpdateOne

SetNillableWatchVod sets the "watch_vod" field if the given value is not nil.

func (*LiveUpdateOne) SetRenderChat added in v1.1.7

func (luo *LiveUpdateOne) SetRenderChat(b bool) *LiveUpdateOne

SetRenderChat sets the "render_chat" field.

func (*LiveUpdateOne) SetResolution

func (luo *LiveUpdateOne) SetResolution(s string) *LiveUpdateOne

SetResolution sets the "resolution" field.

func (*LiveUpdateOne) SetUpdatedAt

func (luo *LiveUpdateOne) SetUpdatedAt(t time.Time) *LiveUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*LiveUpdateOne) SetWatchLive added in v1.1.0

func (luo *LiveUpdateOne) SetWatchLive(b bool) *LiveUpdateOne

SetWatchLive sets the "watch_live" field.

func (*LiveUpdateOne) SetWatchVod added in v1.1.0

func (luo *LiveUpdateOne) SetWatchVod(b bool) *LiveUpdateOne

SetWatchVod sets the "watch_vod" field.

func (*LiveUpdateOne) Where added in v1.2.4

func (luo *LiveUpdateOne) Where(ps ...predicate.Live) *LiveUpdateOne

Where appends a list predicates to the LiveUpdate builder.

type LiveUpsert added in v0.0.2

type LiveUpsert struct {
	*sql.UpdateSet
}

LiveUpsert is the "OnConflict" setter.

func (*LiveUpsert) ClearResolution added in v0.0.2

func (u *LiveUpsert) ClearResolution() *LiveUpsert

ClearResolution clears the value of the "resolution" field.

func (*LiveUpsert) SetArchiveChat added in v0.0.2

func (u *LiveUpsert) SetArchiveChat(v bool) *LiveUpsert

SetArchiveChat sets the "archive_chat" field.

func (*LiveUpsert) SetDownloadArchives added in v1.2.4

func (u *LiveUpsert) SetDownloadArchives(v bool) *LiveUpsert

SetDownloadArchives sets the "download_archives" field.

func (*LiveUpsert) SetDownloadHighlights added in v1.2.4

func (u *LiveUpsert) SetDownloadHighlights(v bool) *LiveUpsert

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveUpsert) SetDownloadSubOnly added in v1.2.4

func (u *LiveUpsert) SetDownloadSubOnly(v bool) *LiveUpsert

SetDownloadSubOnly sets the "download_sub_only" field.

func (*LiveUpsert) SetDownloadUploads added in v1.2.4

func (u *LiveUpsert) SetDownloadUploads(v bool) *LiveUpsert

SetDownloadUploads sets the "download_uploads" field.

func (*LiveUpsert) SetIsLive added in v0.0.2

func (u *LiveUpsert) SetIsLive(v bool) *LiveUpsert

SetIsLive sets the "is_live" field.

func (*LiveUpsert) SetLastLive added in v0.0.2

func (u *LiveUpsert) SetLastLive(v time.Time) *LiveUpsert

SetLastLive sets the "last_live" field.

func (*LiveUpsert) SetRenderChat added in v1.2.4

func (u *LiveUpsert) SetRenderChat(v bool) *LiveUpsert

SetRenderChat sets the "render_chat" field.

func (*LiveUpsert) SetResolution added in v0.0.2

func (u *LiveUpsert) SetResolution(v string) *LiveUpsert

SetResolution sets the "resolution" field.

func (*LiveUpsert) SetUpdatedAt added in v0.0.2

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

SetUpdatedAt sets the "updated_at" field.

func (*LiveUpsert) SetWatchLive added in v1.2.4

func (u *LiveUpsert) SetWatchLive(v bool) *LiveUpsert

SetWatchLive sets the "watch_live" field.

func (*LiveUpsert) SetWatchVod added in v1.2.4

func (u *LiveUpsert) SetWatchVod(v bool) *LiveUpsert

SetWatchVod sets the "watch_vod" field.

func (*LiveUpsert) UpdateArchiveChat added in v0.0.2

func (u *LiveUpsert) UpdateArchiveChat() *LiveUpsert

UpdateArchiveChat sets the "archive_chat" field to the value that was provided on create.

func (*LiveUpsert) UpdateDownloadArchives added in v1.2.4

func (u *LiveUpsert) UpdateDownloadArchives() *LiveUpsert

UpdateDownloadArchives sets the "download_archives" field to the value that was provided on create.

func (*LiveUpsert) UpdateDownloadHighlights added in v1.2.4

func (u *LiveUpsert) UpdateDownloadHighlights() *LiveUpsert

UpdateDownloadHighlights sets the "download_highlights" field to the value that was provided on create.

func (*LiveUpsert) UpdateDownloadSubOnly added in v1.2.4

func (u *LiveUpsert) UpdateDownloadSubOnly() *LiveUpsert

UpdateDownloadSubOnly sets the "download_sub_only" field to the value that was provided on create.

func (*LiveUpsert) UpdateDownloadUploads added in v1.2.4

func (u *LiveUpsert) UpdateDownloadUploads() *LiveUpsert

UpdateDownloadUploads sets the "download_uploads" field to the value that was provided on create.

func (*LiveUpsert) UpdateIsLive added in v0.0.2

func (u *LiveUpsert) UpdateIsLive() *LiveUpsert

UpdateIsLive sets the "is_live" field to the value that was provided on create.

func (*LiveUpsert) UpdateLastLive added in v0.0.2

func (u *LiveUpsert) UpdateLastLive() *LiveUpsert

UpdateLastLive sets the "last_live" field to the value that was provided on create.

func (*LiveUpsert) UpdateRenderChat added in v1.2.4

func (u *LiveUpsert) UpdateRenderChat() *LiveUpsert

UpdateRenderChat sets the "render_chat" field to the value that was provided on create.

func (*LiveUpsert) UpdateResolution added in v0.0.2

func (u *LiveUpsert) UpdateResolution() *LiveUpsert

UpdateResolution sets the "resolution" field to the value that was provided on create.

func (*LiveUpsert) UpdateUpdatedAt added in v0.0.2

func (u *LiveUpsert) UpdateUpdatedAt() *LiveUpsert

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

func (*LiveUpsert) UpdateWatchLive added in v1.2.4

func (u *LiveUpsert) UpdateWatchLive() *LiveUpsert

UpdateWatchLive sets the "watch_live" field to the value that was provided on create.

func (*LiveUpsert) UpdateWatchVod added in v1.2.4

func (u *LiveUpsert) UpdateWatchVod() *LiveUpsert

UpdateWatchVod sets the "watch_vod" field to the value that was provided on create.

type LiveUpsertBulk added in v0.0.2

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

LiveUpsertBulk is the builder for "upsert"-ing a bulk of Live nodes.

func (*LiveUpsertBulk) ClearResolution added in v0.0.2

func (u *LiveUpsertBulk) ClearResolution() *LiveUpsertBulk

ClearResolution clears the value of the "resolution" field.

func (*LiveUpsertBulk) DoNothing added in v0.0.2

func (u *LiveUpsertBulk) DoNothing() *LiveUpsertBulk

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

func (*LiveUpsertBulk) Exec added in v0.0.2

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

Exec executes the query.

func (*LiveUpsertBulk) ExecX added in v0.0.2

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

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

func (*LiveUpsertBulk) Ignore added in v0.0.2

func (u *LiveUpsertBulk) Ignore() *LiveUpsertBulk

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

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

func (*LiveUpsertBulk) SetArchiveChat added in v0.0.2

func (u *LiveUpsertBulk) SetArchiveChat(v bool) *LiveUpsertBulk

SetArchiveChat sets the "archive_chat" field.

func (*LiveUpsertBulk) SetDownloadArchives added in v1.2.4

func (u *LiveUpsertBulk) SetDownloadArchives(v bool) *LiveUpsertBulk

SetDownloadArchives sets the "download_archives" field.

func (*LiveUpsertBulk) SetDownloadHighlights added in v1.2.4

func (u *LiveUpsertBulk) SetDownloadHighlights(v bool) *LiveUpsertBulk

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveUpsertBulk) SetDownloadSubOnly added in v1.2.4

func (u *LiveUpsertBulk) SetDownloadSubOnly(v bool) *LiveUpsertBulk

SetDownloadSubOnly sets the "download_sub_only" field.

func (*LiveUpsertBulk) SetDownloadUploads added in v1.2.4

func (u *LiveUpsertBulk) SetDownloadUploads(v bool) *LiveUpsertBulk

SetDownloadUploads sets the "download_uploads" field.

func (*LiveUpsertBulk) SetIsLive added in v0.0.2

func (u *LiveUpsertBulk) SetIsLive(v bool) *LiveUpsertBulk

SetIsLive sets the "is_live" field.

func (*LiveUpsertBulk) SetLastLive added in v0.0.2

func (u *LiveUpsertBulk) SetLastLive(v time.Time) *LiveUpsertBulk

SetLastLive sets the "last_live" field.

func (*LiveUpsertBulk) SetRenderChat added in v1.2.4

func (u *LiveUpsertBulk) SetRenderChat(v bool) *LiveUpsertBulk

SetRenderChat sets the "render_chat" field.

func (*LiveUpsertBulk) SetResolution added in v0.0.2

func (u *LiveUpsertBulk) SetResolution(v string) *LiveUpsertBulk

SetResolution sets the "resolution" field.

func (*LiveUpsertBulk) SetUpdatedAt added in v0.0.2

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

SetUpdatedAt sets the "updated_at" field.

func (*LiveUpsertBulk) SetWatchLive added in v1.2.4

func (u *LiveUpsertBulk) SetWatchLive(v bool) *LiveUpsertBulk

SetWatchLive sets the "watch_live" field.

func (*LiveUpsertBulk) SetWatchVod added in v1.2.4

func (u *LiveUpsertBulk) SetWatchVod(v bool) *LiveUpsertBulk

SetWatchVod sets the "watch_vod" field.

func (*LiveUpsertBulk) Update added in v0.0.2

func (u *LiveUpsertBulk) Update(set func(*LiveUpsert)) *LiveUpsertBulk

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

func (*LiveUpsertBulk) UpdateArchiveChat added in v0.0.2

func (u *LiveUpsertBulk) UpdateArchiveChat() *LiveUpsertBulk

UpdateArchiveChat sets the "archive_chat" field to the value that was provided on create.

func (*LiveUpsertBulk) UpdateDownloadArchives added in v1.2.4

func (u *LiveUpsertBulk) UpdateDownloadArchives() *LiveUpsertBulk

UpdateDownloadArchives sets the "download_archives" field to the value that was provided on create.

func (*LiveUpsertBulk) UpdateDownloadHighlights added in v1.2.4

func (u *LiveUpsertBulk) UpdateDownloadHighlights() *LiveUpsertBulk

UpdateDownloadHighlights sets the "download_highlights" field to the value that was provided on create.

func (*LiveUpsertBulk) UpdateDownloadSubOnly added in v1.2.4

func (u *LiveUpsertBulk) UpdateDownloadSubOnly() *LiveUpsertBulk

UpdateDownloadSubOnly sets the "download_sub_only" field to the value that was provided on create.

func (*LiveUpsertBulk) UpdateDownloadUploads added in v1.2.4

func (u *LiveUpsertBulk) UpdateDownloadUploads() *LiveUpsertBulk

UpdateDownloadUploads sets the "download_uploads" field to the value that was provided on create.

func (*LiveUpsertBulk) UpdateIsLive added in v0.0.2

func (u *LiveUpsertBulk) UpdateIsLive() *LiveUpsertBulk

UpdateIsLive sets the "is_live" field to the value that was provided on create.

func (*LiveUpsertBulk) UpdateLastLive added in v0.0.2

func (u *LiveUpsertBulk) UpdateLastLive() *LiveUpsertBulk

UpdateLastLive sets the "last_live" field to the value that was provided on create.

func (*LiveUpsertBulk) UpdateNewValues added in v0.0.2

func (u *LiveUpsertBulk) UpdateNewValues() *LiveUpsertBulk

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

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

func (*LiveUpsertBulk) UpdateRenderChat added in v1.2.4

func (u *LiveUpsertBulk) UpdateRenderChat() *LiveUpsertBulk

UpdateRenderChat sets the "render_chat" field to the value that was provided on create.

func (*LiveUpsertBulk) UpdateResolution added in v0.0.2

func (u *LiveUpsertBulk) UpdateResolution() *LiveUpsertBulk

UpdateResolution sets the "resolution" field to the value that was provided on create.

func (*LiveUpsertBulk) UpdateUpdatedAt added in v0.0.2

func (u *LiveUpsertBulk) UpdateUpdatedAt() *LiveUpsertBulk

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

func (*LiveUpsertBulk) UpdateWatchLive added in v1.2.4

func (u *LiveUpsertBulk) UpdateWatchLive() *LiveUpsertBulk

UpdateWatchLive sets the "watch_live" field to the value that was provided on create.

func (*LiveUpsertBulk) UpdateWatchVod added in v1.2.4

func (u *LiveUpsertBulk) UpdateWatchVod() *LiveUpsertBulk

UpdateWatchVod sets the "watch_vod" field to the value that was provided on create.

type LiveUpsertOne added in v0.0.2

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

LiveUpsertOne is the builder for "upsert"-ing

one Live node.

func (*LiveUpsertOne) ClearResolution added in v0.0.2

func (u *LiveUpsertOne) ClearResolution() *LiveUpsertOne

ClearResolution clears the value of the "resolution" field.

func (*LiveUpsertOne) DoNothing added in v0.0.2

func (u *LiveUpsertOne) DoNothing() *LiveUpsertOne

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

func (*LiveUpsertOne) Exec added in v0.0.2

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

Exec executes the query.

func (*LiveUpsertOne) ExecX added in v0.0.2

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

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

func (*LiveUpsertOne) ID added in v0.0.2

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

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

func (*LiveUpsertOne) IDX added in v0.0.2

func (u *LiveUpsertOne) IDX(ctx context.Context) uuid.UUID

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

func (*LiveUpsertOne) Ignore added in v0.0.2

func (u *LiveUpsertOne) Ignore() *LiveUpsertOne

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

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

func (*LiveUpsertOne) SetArchiveChat added in v0.0.2

func (u *LiveUpsertOne) SetArchiveChat(v bool) *LiveUpsertOne

SetArchiveChat sets the "archive_chat" field.

func (*LiveUpsertOne) SetDownloadArchives added in v1.2.4

func (u *LiveUpsertOne) SetDownloadArchives(v bool) *LiveUpsertOne

SetDownloadArchives sets the "download_archives" field.

func (*LiveUpsertOne) SetDownloadHighlights added in v1.2.4

func (u *LiveUpsertOne) SetDownloadHighlights(v bool) *LiveUpsertOne

SetDownloadHighlights sets the "download_highlights" field.

func (*LiveUpsertOne) SetDownloadSubOnly added in v1.2.4

func (u *LiveUpsertOne) SetDownloadSubOnly(v bool) *LiveUpsertOne

SetDownloadSubOnly sets the "download_sub_only" field.

func (*LiveUpsertOne) SetDownloadUploads added in v1.2.4

func (u *LiveUpsertOne) SetDownloadUploads(v bool) *LiveUpsertOne

SetDownloadUploads sets the "download_uploads" field.

func (*LiveUpsertOne) SetIsLive added in v0.0.2

func (u *LiveUpsertOne) SetIsLive(v bool) *LiveUpsertOne

SetIsLive sets the "is_live" field.

func (*LiveUpsertOne) SetLastLive added in v0.0.2

func (u *LiveUpsertOne) SetLastLive(v time.Time) *LiveUpsertOne

SetLastLive sets the "last_live" field.

func (*LiveUpsertOne) SetRenderChat added in v1.2.4

func (u *LiveUpsertOne) SetRenderChat(v bool) *LiveUpsertOne

SetRenderChat sets the "render_chat" field.

func (*LiveUpsertOne) SetResolution added in v0.0.2

func (u *LiveUpsertOne) SetResolution(v string) *LiveUpsertOne

SetResolution sets the "resolution" field.

func (*LiveUpsertOne) SetUpdatedAt added in v0.0.2

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

SetUpdatedAt sets the "updated_at" field.

func (*LiveUpsertOne) SetWatchLive added in v1.2.4

func (u *LiveUpsertOne) SetWatchLive(v bool) *LiveUpsertOne

SetWatchLive sets the "watch_live" field.

func (*LiveUpsertOne) SetWatchVod added in v1.2.4

func (u *LiveUpsertOne) SetWatchVod(v bool) *LiveUpsertOne

SetWatchVod sets the "watch_vod" field.

func (*LiveUpsertOne) Update added in v0.0.2

func (u *LiveUpsertOne) Update(set func(*LiveUpsert)) *LiveUpsertOne

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

func (*LiveUpsertOne) UpdateArchiveChat added in v0.0.2

func (u *LiveUpsertOne) UpdateArchiveChat() *LiveUpsertOne

UpdateArchiveChat sets the "archive_chat" field to the value that was provided on create.

func (*LiveUpsertOne) UpdateDownloadArchives added in v1.2.4

func (u *LiveUpsertOne) UpdateDownloadArchives() *LiveUpsertOne

UpdateDownloadArchives sets the "download_archives" field to the value that was provided on create.

func (*LiveUpsertOne) UpdateDownloadHighlights added in v1.2.4

func (u *LiveUpsertOne) UpdateDownloadHighlights() *LiveUpsertOne

UpdateDownloadHighlights sets the "download_highlights" field to the value that was provided on create.

func (*LiveUpsertOne) UpdateDownloadSubOnly added in v1.2.4

func (u *LiveUpsertOne) UpdateDownloadSubOnly() *LiveUpsertOne

UpdateDownloadSubOnly sets the "download_sub_only" field to the value that was provided on create.

func (*LiveUpsertOne) UpdateDownloadUploads added in v1.2.4

func (u *LiveUpsertOne) UpdateDownloadUploads() *LiveUpsertOne

UpdateDownloadUploads sets the "download_uploads" field to the value that was provided on create.

func (*LiveUpsertOne) UpdateIsLive added in v0.0.2

func (u *LiveUpsertOne) UpdateIsLive() *LiveUpsertOne

UpdateIsLive sets the "is_live" field to the value that was provided on create.

func (*LiveUpsertOne) UpdateLastLive added in v0.0.2

func (u *LiveUpsertOne) UpdateLastLive() *LiveUpsertOne

UpdateLastLive sets the "last_live" field to the value that was provided on create.

func (*LiveUpsertOne) UpdateNewValues added in v0.0.2

func (u *LiveUpsertOne) UpdateNewValues() *LiveUpsertOne

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

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

func (*LiveUpsertOne) UpdateRenderChat added in v1.2.4

func (u *LiveUpsertOne) UpdateRenderChat() *LiveUpsertOne

UpdateRenderChat sets the "render_chat" field to the value that was provided on create.

func (*LiveUpsertOne) UpdateResolution added in v0.0.2

func (u *LiveUpsertOne) UpdateResolution() *LiveUpsertOne

UpdateResolution sets the "resolution" field to the value that was provided on create.

func (*LiveUpsertOne) UpdateUpdatedAt added in v0.0.2

func (u *LiveUpsertOne) UpdateUpdatedAt() *LiveUpsertOne

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

func (*LiveUpsertOne) UpdateWatchLive added in v1.2.4

func (u *LiveUpsertOne) UpdateWatchLive() *LiveUpsertOne

UpdateWatchLive sets the "watch_live" field to the value that was provided on create.

func (*LiveUpsertOne) UpdateWatchVod added in v1.2.4

func (u *LiveUpsertOne) UpdateWatchVod() *LiveUpsertOne

UpdateWatchVod sets the "watch_vod" field to the value that was provided on create.

type Lives

type Lives []*Live

Lives is a parsable slice of Live.

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

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

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

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

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

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

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type Playback added in v0.0.2

type Playback struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// VodID holds the value of the "vod_id" field.
	VodID uuid.UUID `json:"vod_id,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID uuid.UUID `json:"user_id,omitempty"`
	// Time holds the value of the "time" field.
	Time int `json:"time,omitempty"`
	// Status holds the value of the "status" field.
	Status utils.PlaybackStatus `json:"status,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Playback is the model entity for the Playback schema.

func (*Playback) String added in v0.0.2

func (pl *Playback) String() string

String implements the fmt.Stringer.

func (*Playback) Unwrap added in v0.0.2

func (pl *Playback) Unwrap() *Playback

Unwrap unwraps the Playback 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 (*Playback) Update added in v0.0.2

func (pl *Playback) Update() *PlaybackUpdateOne

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

func (*Playback) Value added in v1.2.12

func (pl *Playback) Value(name string) (ent.Value, error)

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

type PlaybackClient added in v0.0.2

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

PlaybackClient is a client for the Playback schema.

func NewPlaybackClient added in v0.0.2

func NewPlaybackClient(c config) *PlaybackClient

NewPlaybackClient returns a client for the Playback from the given config.

func (*PlaybackClient) Create added in v0.0.2

func (c *PlaybackClient) Create() *PlaybackCreate

Create returns a builder for creating a Playback entity.

func (*PlaybackClient) CreateBulk added in v0.0.2

func (c *PlaybackClient) CreateBulk(builders ...*PlaybackCreate) *PlaybackCreateBulk

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

func (*PlaybackClient) Delete added in v0.0.2

func (c *PlaybackClient) Delete() *PlaybackDelete

Delete returns a delete builder for Playback.

func (*PlaybackClient) DeleteOne added in v0.0.2

func (c *PlaybackClient) DeleteOne(pl *Playback) *PlaybackDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PlaybackClient) DeleteOneID added in v0.0.2

func (c *PlaybackClient) DeleteOneID(id uuid.UUID) *PlaybackDeleteOne

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

func (*PlaybackClient) Get added in v0.0.2

func (c *PlaybackClient) Get(ctx context.Context, id uuid.UUID) (*Playback, error)

Get returns a Playback entity by its id.

func (*PlaybackClient) GetX added in v0.0.2

func (c *PlaybackClient) GetX(ctx context.Context, id uuid.UUID) *Playback

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

func (*PlaybackClient) Hooks added in v0.0.2

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

Hooks returns the client hooks.

func (*PlaybackClient) Intercept added in v1.1.7

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

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

func (*PlaybackClient) Interceptors added in v1.1.7

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

Interceptors returns the client interceptors.

func (*PlaybackClient) Query added in v0.0.2

func (c *PlaybackClient) Query() *PlaybackQuery

Query returns a query builder for Playback.

func (*PlaybackClient) Update added in v0.0.2

func (c *PlaybackClient) Update() *PlaybackUpdate

Update returns an update builder for Playback.

func (*PlaybackClient) UpdateOne added in v0.0.2

func (c *PlaybackClient) UpdateOne(pl *Playback) *PlaybackUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PlaybackClient) UpdateOneID added in v0.0.2

func (c *PlaybackClient) UpdateOneID(id uuid.UUID) *PlaybackUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PlaybackClient) Use added in v0.0.2

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

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

type PlaybackCreate added in v0.0.2

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

PlaybackCreate is the builder for creating a Playback entity.

func (*PlaybackCreate) Exec added in v0.0.2

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

Exec executes the query.

func (*PlaybackCreate) ExecX added in v0.0.2

func (pc *PlaybackCreate) ExecX(ctx context.Context)

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

func (*PlaybackCreate) Mutation added in v0.0.2

func (pc *PlaybackCreate) Mutation() *PlaybackMutation

Mutation returns the PlaybackMutation object of the builder.

func (*PlaybackCreate) OnConflict added in v0.0.2

func (pc *PlaybackCreate) OnConflict(opts ...sql.ConflictOption) *PlaybackUpsertOne

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

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

func (*PlaybackCreate) OnConflictColumns added in v0.0.2

func (pc *PlaybackCreate) OnConflictColumns(columns ...string) *PlaybackUpsertOne

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

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

func (*PlaybackCreate) Save added in v0.0.2

func (pc *PlaybackCreate) Save(ctx context.Context) (*Playback, error)

Save creates the Playback in the database.

func (*PlaybackCreate) SaveX added in v0.0.2

func (pc *PlaybackCreate) SaveX(ctx context.Context) *Playback

SaveX calls Save and panics if Save returns an error.

func (*PlaybackCreate) SetCreatedAt added in v0.0.2

func (pc *PlaybackCreate) SetCreatedAt(t time.Time) *PlaybackCreate

SetCreatedAt sets the "created_at" field.

func (*PlaybackCreate) SetID added in v0.0.2

func (pc *PlaybackCreate) SetID(u uuid.UUID) *PlaybackCreate

SetID sets the "id" field.

func (*PlaybackCreate) SetNillableCreatedAt added in v0.0.2

func (pc *PlaybackCreate) SetNillableCreatedAt(t *time.Time) *PlaybackCreate

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

func (*PlaybackCreate) SetNillableID added in v0.0.2

func (pc *PlaybackCreate) SetNillableID(u *uuid.UUID) *PlaybackCreate

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

func (*PlaybackCreate) SetNillableStatus added in v0.0.2

func (pc *PlaybackCreate) SetNillableStatus(us *utils.PlaybackStatus) *PlaybackCreate

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

func (*PlaybackCreate) SetNillableTime added in v0.0.2

func (pc *PlaybackCreate) SetNillableTime(i *int) *PlaybackCreate

SetNillableTime sets the "time" field if the given value is not nil.

func (*PlaybackCreate) SetNillableUpdatedAt added in v0.0.2

func (pc *PlaybackCreate) SetNillableUpdatedAt(t *time.Time) *PlaybackCreate

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

func (*PlaybackCreate) SetStatus added in v0.0.2

SetStatus sets the "status" field.

func (*PlaybackCreate) SetTime added in v0.0.2

func (pc *PlaybackCreate) SetTime(i int) *PlaybackCreate

SetTime sets the "time" field.

func (*PlaybackCreate) SetUpdatedAt added in v0.0.2

func (pc *PlaybackCreate) SetUpdatedAt(t time.Time) *PlaybackCreate

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackCreate) SetUserID added in v0.0.2

func (pc *PlaybackCreate) SetUserID(u uuid.UUID) *PlaybackCreate

SetUserID sets the "user_id" field.

func (*PlaybackCreate) SetVodID added in v0.0.2

func (pc *PlaybackCreate) SetVodID(u uuid.UUID) *PlaybackCreate

SetVodID sets the "vod_id" field.

type PlaybackCreateBulk added in v0.0.2

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

PlaybackCreateBulk is the builder for creating many Playback entities in bulk.

func (*PlaybackCreateBulk) Exec added in v0.0.2

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

Exec executes the query.

func (*PlaybackCreateBulk) ExecX added in v0.0.2

func (pcb *PlaybackCreateBulk) ExecX(ctx context.Context)

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

func (*PlaybackCreateBulk) OnConflict added in v0.0.2

func (pcb *PlaybackCreateBulk) OnConflict(opts ...sql.ConflictOption) *PlaybackUpsertBulk

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

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

func (*PlaybackCreateBulk) OnConflictColumns added in v0.0.2

func (pcb *PlaybackCreateBulk) OnConflictColumns(columns ...string) *PlaybackUpsertBulk

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

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

func (*PlaybackCreateBulk) Save added in v0.0.2

func (pcb *PlaybackCreateBulk) Save(ctx context.Context) ([]*Playback, error)

Save creates the Playback entities in the database.

func (*PlaybackCreateBulk) SaveX added in v0.0.2

func (pcb *PlaybackCreateBulk) SaveX(ctx context.Context) []*Playback

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

type PlaybackDelete added in v0.0.2

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

PlaybackDelete is the builder for deleting a Playback entity.

func (*PlaybackDelete) Exec added in v0.0.2

func (pd *PlaybackDelete) Exec(ctx context.Context) (int, error)

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

func (*PlaybackDelete) ExecX added in v0.0.2

func (pd *PlaybackDelete) ExecX(ctx context.Context) int

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

func (*PlaybackDelete) Where added in v0.0.2

func (pd *PlaybackDelete) Where(ps ...predicate.Playback) *PlaybackDelete

Where appends a list predicates to the PlaybackDelete builder.

type PlaybackDeleteOne added in v0.0.2

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

PlaybackDeleteOne is the builder for deleting a single Playback entity.

func (*PlaybackDeleteOne) Exec added in v0.0.2

func (pdo *PlaybackDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PlaybackDeleteOne) ExecX added in v0.0.2

func (pdo *PlaybackDeleteOne) ExecX(ctx context.Context)

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

func (*PlaybackDeleteOne) Where added in v1.2.4

Where appends a list predicates to the PlaybackDelete builder.

type PlaybackGroupBy added in v0.0.2

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

PlaybackGroupBy is the group-by builder for Playback entities.

func (*PlaybackGroupBy) Aggregate added in v0.0.2

func (pgb *PlaybackGroupBy) Aggregate(fns ...AggregateFunc) *PlaybackGroupBy

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

func (*PlaybackGroupBy) Bool added in v0.0.2

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

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

func (*PlaybackGroupBy) BoolX added in v0.0.2

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

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

func (*PlaybackGroupBy) Bools added in v0.0.2

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

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

func (*PlaybackGroupBy) BoolsX added in v0.0.2

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

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

func (*PlaybackGroupBy) Float64 added in v0.0.2

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

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

func (*PlaybackGroupBy) Float64X added in v0.0.2

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

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

func (*PlaybackGroupBy) Float64s added in v0.0.2

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

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

func (*PlaybackGroupBy) Float64sX added in v0.0.2

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

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

func (*PlaybackGroupBy) Int added in v0.0.2

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

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

func (*PlaybackGroupBy) IntX added in v0.0.2

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

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

func (*PlaybackGroupBy) Ints added in v0.0.2

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

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

func (*PlaybackGroupBy) IntsX added in v0.0.2

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

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

func (*PlaybackGroupBy) Scan added in v0.0.2

func (pgb *PlaybackGroupBy) Scan(ctx context.Context, v any) error

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

func (*PlaybackGroupBy) ScanX added in v0.0.2

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

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

func (*PlaybackGroupBy) String added in v0.0.2

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

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

func (*PlaybackGroupBy) StringX added in v0.0.2

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

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

func (*PlaybackGroupBy) Strings added in v0.0.2

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

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

func (*PlaybackGroupBy) StringsX added in v0.0.2

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

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

type PlaybackMutation added in v0.0.2

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

PlaybackMutation represents an operation that mutates the Playback nodes in the graph.

func (*PlaybackMutation) AddField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) AddTime added in v0.0.2

func (m *PlaybackMutation) AddTime(i int)

AddTime adds i to the "time" field.

func (*PlaybackMutation) AddedEdges added in v0.0.2

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

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

func (*PlaybackMutation) AddedField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) AddedFields added in v0.0.2

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

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

func (*PlaybackMutation) AddedIDs added in v0.0.2

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

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

func (*PlaybackMutation) AddedTime added in v0.0.2

func (m *PlaybackMutation) AddedTime() (r int, exists bool)

AddedTime returns the value that was added to the "time" field in this mutation.

func (*PlaybackMutation) ClearEdge added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ClearField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ClearStatus added in v0.0.2

func (m *PlaybackMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*PlaybackMutation) ClearedEdges added in v0.0.2

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

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

func (*PlaybackMutation) ClearedFields added in v0.0.2

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

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

func (PlaybackMutation) Client added in v0.0.2

func (m PlaybackMutation) 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 (*PlaybackMutation) CreatedAt added in v0.0.2

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

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

func (*PlaybackMutation) EdgeCleared added in v0.0.2

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

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

func (*PlaybackMutation) Field added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) FieldCleared added in v0.0.2

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

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

func (*PlaybackMutation) Fields added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ID added in v0.0.2

func (m *PlaybackMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PlaybackMutation) IDs added in v0.0.2

func (m *PlaybackMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*PlaybackMutation) OldCreatedAt added in v0.0.2

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

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

func (*PlaybackMutation) OldField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) OldStatus added in v0.0.2

func (m *PlaybackMutation) OldStatus(ctx context.Context) (v utils.PlaybackStatus, err error)

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

func (*PlaybackMutation) OldTime added in v0.0.2

func (m *PlaybackMutation) OldTime(ctx context.Context) (v int, err error)

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

func (*PlaybackMutation) OldUpdatedAt added in v0.0.2

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

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

func (*PlaybackMutation) OldUserID added in v0.0.2

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

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

func (*PlaybackMutation) OldVodID added in v0.0.2

func (m *PlaybackMutation) OldVodID(ctx context.Context) (v uuid.UUID, err error)

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

func (*PlaybackMutation) Op added in v0.0.2

func (m *PlaybackMutation) Op() Op

Op returns the operation name.

func (*PlaybackMutation) RemovedEdges added in v0.0.2

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

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

func (*PlaybackMutation) RemovedIDs added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ResetCreatedAt added in v0.0.2

func (m *PlaybackMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PlaybackMutation) ResetEdge added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ResetField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) ResetStatus added in v0.0.2

func (m *PlaybackMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*PlaybackMutation) ResetTime added in v0.0.2

func (m *PlaybackMutation) ResetTime()

ResetTime resets all changes to the "time" field.

func (*PlaybackMutation) ResetUpdatedAt added in v0.0.2

func (m *PlaybackMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PlaybackMutation) ResetUserID added in v0.0.2

func (m *PlaybackMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*PlaybackMutation) ResetVodID added in v0.0.2

func (m *PlaybackMutation) ResetVodID()

ResetVodID resets all changes to the "vod_id" field.

func (*PlaybackMutation) SetCreatedAt added in v0.0.2

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

SetCreatedAt sets the "created_at" field.

func (*PlaybackMutation) SetField added in v0.0.2

func (m *PlaybackMutation) 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 (*PlaybackMutation) SetID added in v0.0.2

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

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

func (*PlaybackMutation) SetOp added in v1.1.7

func (m *PlaybackMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PlaybackMutation) SetStatus added in v0.0.2

func (m *PlaybackMutation) SetStatus(us utils.PlaybackStatus)

SetStatus sets the "status" field.

func (*PlaybackMutation) SetTime added in v0.0.2

func (m *PlaybackMutation) SetTime(i int)

SetTime sets the "time" field.

func (*PlaybackMutation) SetUpdatedAt added in v0.0.2

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

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackMutation) SetUserID added in v0.0.2

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

SetUserID sets the "user_id" field.

func (*PlaybackMutation) SetVodID added in v0.0.2

func (m *PlaybackMutation) SetVodID(u uuid.UUID)

SetVodID sets the "vod_id" field.

func (*PlaybackMutation) Status added in v0.0.2

func (m *PlaybackMutation) Status() (r utils.PlaybackStatus, exists bool)

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

func (*PlaybackMutation) StatusCleared added in v0.0.2

func (m *PlaybackMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*PlaybackMutation) Time added in v0.0.2

func (m *PlaybackMutation) Time() (r int, exists bool)

Time returns the value of the "time" field in the mutation.

func (PlaybackMutation) Tx added in v0.0.2

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

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

func (*PlaybackMutation) Type added in v0.0.2

func (m *PlaybackMutation) Type() string

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

func (*PlaybackMutation) UpdatedAt added in v0.0.2

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

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

func (*PlaybackMutation) UserID added in v0.0.2

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

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

func (*PlaybackMutation) VodID added in v0.0.2

func (m *PlaybackMutation) VodID() (r uuid.UUID, exists bool)

VodID returns the value of the "vod_id" field in the mutation.

func (*PlaybackMutation) Where added in v0.0.2

func (m *PlaybackMutation) Where(ps ...predicate.Playback)

Where appends a list predicates to the PlaybackMutation builder.

func (*PlaybackMutation) WhereP added in v1.1.7

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

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

type PlaybackQuery added in v0.0.2

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

PlaybackQuery is the builder for querying Playback entities.

func (*PlaybackQuery) Aggregate added in v1.1.7

func (pq *PlaybackQuery) Aggregate(fns ...AggregateFunc) *PlaybackSelect

Aggregate returns a PlaybackSelect configured with the given aggregations.

func (*PlaybackQuery) All added in v0.0.2

func (pq *PlaybackQuery) All(ctx context.Context) ([]*Playback, error)

All executes the query and returns a list of Playbacks.

func (*PlaybackQuery) AllX added in v0.0.2

func (pq *PlaybackQuery) AllX(ctx context.Context) []*Playback

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

func (*PlaybackQuery) Clone added in v0.0.2

func (pq *PlaybackQuery) Clone() *PlaybackQuery

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

func (*PlaybackQuery) Count added in v0.0.2

func (pq *PlaybackQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PlaybackQuery) CountX added in v0.0.2

func (pq *PlaybackQuery) CountX(ctx context.Context) int

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

func (*PlaybackQuery) Exist added in v0.0.2

func (pq *PlaybackQuery) Exist(ctx context.Context) (bool, error)

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

func (*PlaybackQuery) ExistX added in v0.0.2

func (pq *PlaybackQuery) ExistX(ctx context.Context) bool

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

func (*PlaybackQuery) First added in v0.0.2

func (pq *PlaybackQuery) First(ctx context.Context) (*Playback, error)

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

func (*PlaybackQuery) FirstID added in v0.0.2

func (pq *PlaybackQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*PlaybackQuery) FirstIDX added in v0.0.2

func (pq *PlaybackQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*PlaybackQuery) FirstX added in v0.0.2

func (pq *PlaybackQuery) FirstX(ctx context.Context) *Playback

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

func (*PlaybackQuery) GroupBy added in v0.0.2

func (pq *PlaybackQuery) GroupBy(field string, fields ...string) *PlaybackGroupBy

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 {
	VodID uuid.UUID `json:"vod_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Playback.Query().
	GroupBy(playback.FieldVodID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PlaybackQuery) IDs added in v0.0.2

func (pq *PlaybackQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

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

func (*PlaybackQuery) IDsX added in v0.0.2

func (pq *PlaybackQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*PlaybackQuery) Limit added in v0.0.2

func (pq *PlaybackQuery) Limit(limit int) *PlaybackQuery

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

func (*PlaybackQuery) Offset added in v0.0.2

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

Offset to start from.

func (*PlaybackQuery) Only added in v0.0.2

func (pq *PlaybackQuery) Only(ctx context.Context) (*Playback, error)

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

func (*PlaybackQuery) OnlyID added in v0.0.2

func (pq *PlaybackQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*PlaybackQuery) OnlyIDX added in v0.0.2

func (pq *PlaybackQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*PlaybackQuery) OnlyX added in v0.0.2

func (pq *PlaybackQuery) OnlyX(ctx context.Context) *Playback

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

func (*PlaybackQuery) Order added in v0.0.2

Order specifies how the records should be ordered.

func (*PlaybackQuery) Select added in v0.0.2

func (pq *PlaybackQuery) Select(fields ...string) *PlaybackSelect

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 {
	VodID uuid.UUID `json:"vod_id,omitempty"`
}

client.Playback.Query().
	Select(playback.FieldVodID).
	Scan(ctx, &v)

func (*PlaybackQuery) Unique added in v0.0.2

func (pq *PlaybackQuery) Unique(unique bool) *PlaybackQuery

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 (*PlaybackQuery) Where added in v0.0.2

func (pq *PlaybackQuery) Where(ps ...predicate.Playback) *PlaybackQuery

Where adds a new predicate for the PlaybackQuery builder.

type PlaybackSelect added in v0.0.2

type PlaybackSelect struct {
	*PlaybackQuery
	// contains filtered or unexported fields
}

PlaybackSelect is the builder for selecting fields of Playback entities.

func (*PlaybackSelect) Aggregate added in v1.1.7

func (ps *PlaybackSelect) Aggregate(fns ...AggregateFunc) *PlaybackSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PlaybackSelect) Bool added in v0.0.2

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

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

func (*PlaybackSelect) BoolX added in v0.0.2

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

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

func (*PlaybackSelect) Bools added in v0.0.2

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

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

func (*PlaybackSelect) BoolsX added in v0.0.2

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

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

func (*PlaybackSelect) Float64 added in v0.0.2

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

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

func (*PlaybackSelect) Float64X added in v0.0.2

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

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

func (*PlaybackSelect) Float64s added in v0.0.2

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

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

func (*PlaybackSelect) Float64sX added in v0.0.2

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

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

func (*PlaybackSelect) Int added in v0.0.2

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

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

func (*PlaybackSelect) IntX added in v0.0.2

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

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

func (*PlaybackSelect) Ints added in v0.0.2

func (s *PlaybackSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PlaybackSelect) IntsX added in v0.0.2

func (s *PlaybackSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PlaybackSelect) Scan added in v0.0.2

func (ps *PlaybackSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PlaybackSelect) ScanX added in v0.0.2

func (s *PlaybackSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PlaybackSelect) String added in v0.0.2

func (s *PlaybackSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PlaybackSelect) StringX added in v0.0.2

func (s *PlaybackSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PlaybackSelect) Strings added in v0.0.2

func (s *PlaybackSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PlaybackSelect) StringsX added in v0.0.2

func (s *PlaybackSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PlaybackUpdate added in v0.0.2

type PlaybackUpdate struct {
	// contains filtered or unexported fields
}

PlaybackUpdate is the builder for updating Playback entities.

func (*PlaybackUpdate) AddTime added in v0.0.2

func (pu *PlaybackUpdate) AddTime(i int) *PlaybackUpdate

AddTime adds i to the "time" field.

func (*PlaybackUpdate) ClearStatus added in v0.0.2

func (pu *PlaybackUpdate) ClearStatus() *PlaybackUpdate

ClearStatus clears the value of the "status" field.

func (*PlaybackUpdate) Exec added in v0.0.2

func (pu *PlaybackUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaybackUpdate) ExecX added in v0.0.2

func (pu *PlaybackUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaybackUpdate) Mutation added in v0.0.2

func (pu *PlaybackUpdate) Mutation() *PlaybackMutation

Mutation returns the PlaybackMutation object of the builder.

func (*PlaybackUpdate) Save added in v0.0.2

func (pu *PlaybackUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PlaybackUpdate) SaveX added in v0.0.2

func (pu *PlaybackUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PlaybackUpdate) SetNillableStatus added in v0.0.2

func (pu *PlaybackUpdate) SetNillableStatus(us *utils.PlaybackStatus) *PlaybackUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*PlaybackUpdate) SetNillableTime added in v0.0.2

func (pu *PlaybackUpdate) SetNillableTime(i *int) *PlaybackUpdate

SetNillableTime sets the "time" field if the given value is not nil.

func (*PlaybackUpdate) SetStatus added in v0.0.2

SetStatus sets the "status" field.

func (*PlaybackUpdate) SetTime added in v0.0.2

func (pu *PlaybackUpdate) SetTime(i int) *PlaybackUpdate

SetTime sets the "time" field.

func (*PlaybackUpdate) SetUpdatedAt added in v0.0.2

func (pu *PlaybackUpdate) SetUpdatedAt(t time.Time) *PlaybackUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackUpdate) SetUserID added in v0.0.2

func (pu *PlaybackUpdate) SetUserID(u uuid.UUID) *PlaybackUpdate

SetUserID sets the "user_id" field.

func (*PlaybackUpdate) SetVodID added in v0.0.2

func (pu *PlaybackUpdate) SetVodID(u uuid.UUID) *PlaybackUpdate

SetVodID sets the "vod_id" field.

func (*PlaybackUpdate) Where added in v0.0.2

func (pu *PlaybackUpdate) Where(ps ...predicate.Playback) *PlaybackUpdate

Where appends a list predicates to the PlaybackUpdate builder.

type PlaybackUpdateOne added in v0.0.2

type PlaybackUpdateOne struct {
	// contains filtered or unexported fields
}

PlaybackUpdateOne is the builder for updating a single Playback entity.

func (*PlaybackUpdateOne) AddTime added in v0.0.2

func (puo *PlaybackUpdateOne) AddTime(i int) *PlaybackUpdateOne

AddTime adds i to the "time" field.

func (*PlaybackUpdateOne) ClearStatus added in v0.0.2

func (puo *PlaybackUpdateOne) ClearStatus() *PlaybackUpdateOne

ClearStatus clears the value of the "status" field.

func (*PlaybackUpdateOne) Exec added in v0.0.2

func (puo *PlaybackUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PlaybackUpdateOne) ExecX added in v0.0.2

func (puo *PlaybackUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaybackUpdateOne) Mutation added in v0.0.2

func (puo *PlaybackUpdateOne) Mutation() *PlaybackMutation

Mutation returns the PlaybackMutation object of the builder.

func (*PlaybackUpdateOne) Save added in v0.0.2

func (puo *PlaybackUpdateOne) Save(ctx context.Context) (*Playback, error)

Save executes the query and returns the updated Playback entity.

func (*PlaybackUpdateOne) SaveX added in v0.0.2

func (puo *PlaybackUpdateOne) SaveX(ctx context.Context) *Playback

SaveX is like Save, but panics if an error occurs.

func (*PlaybackUpdateOne) Select added in v0.0.2

func (puo *PlaybackUpdateOne) Select(field string, fields ...string) *PlaybackUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PlaybackUpdateOne) SetNillableStatus added in v0.0.2

func (puo *PlaybackUpdateOne) SetNillableStatus(us *utils.PlaybackStatus) *PlaybackUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*PlaybackUpdateOne) SetNillableTime added in v0.0.2

func (puo *PlaybackUpdateOne) SetNillableTime(i *int) *PlaybackUpdateOne

SetNillableTime sets the "time" field if the given value is not nil.

func (*PlaybackUpdateOne) SetStatus added in v0.0.2

SetStatus sets the "status" field.

func (*PlaybackUpdateOne) SetTime added in v0.0.2

func (puo *PlaybackUpdateOne) SetTime(i int) *PlaybackUpdateOne

SetTime sets the "time" field.

func (*PlaybackUpdateOne) SetUpdatedAt added in v0.0.2

func (puo *PlaybackUpdateOne) SetUpdatedAt(t time.Time) *PlaybackUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackUpdateOne) SetUserID added in v0.0.2

func (puo *PlaybackUpdateOne) SetUserID(u uuid.UUID) *PlaybackUpdateOne

SetUserID sets the "user_id" field.

func (*PlaybackUpdateOne) SetVodID added in v0.0.2

func (puo *PlaybackUpdateOne) SetVodID(u uuid.UUID) *PlaybackUpdateOne

SetVodID sets the "vod_id" field.

func (*PlaybackUpdateOne) Where added in v1.2.4

Where appends a list predicates to the PlaybackUpdate builder.

type PlaybackUpsert added in v0.0.2

type PlaybackUpsert struct {
	*sql.UpdateSet
}

PlaybackUpsert is the "OnConflict" setter.

func (*PlaybackUpsert) AddTime added in v0.0.2

func (u *PlaybackUpsert) AddTime(v int) *PlaybackUpsert

AddTime adds v to the "time" field.

func (*PlaybackUpsert) ClearStatus added in v0.0.2

func (u *PlaybackUpsert) ClearStatus() *PlaybackUpsert

ClearStatus clears the value of the "status" field.

func (*PlaybackUpsert) SetStatus added in v0.0.2

SetStatus sets the "status" field.

func (*PlaybackUpsert) SetTime added in v0.0.2

func (u *PlaybackUpsert) SetTime(v int) *PlaybackUpsert

SetTime sets the "time" field.

func (*PlaybackUpsert) SetUpdatedAt added in v0.0.2

func (u *PlaybackUpsert) SetUpdatedAt(v time.Time) *PlaybackUpsert

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackUpsert) SetUserID added in v0.0.2

func (u *PlaybackUpsert) SetUserID(v uuid.UUID) *PlaybackUpsert

SetUserID sets the "user_id" field.

func (*PlaybackUpsert) SetVodID added in v0.0.2

func (u *PlaybackUpsert) SetVodID(v uuid.UUID) *PlaybackUpsert

SetVodID sets the "vod_id" field.

func (*PlaybackUpsert) UpdateStatus added in v0.0.2

func (u *PlaybackUpsert) UpdateStatus() *PlaybackUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*PlaybackUpsert) UpdateTime added in v0.0.2

func (u *PlaybackUpsert) UpdateTime() *PlaybackUpsert

UpdateTime sets the "time" field to the value that was provided on create.

func (*PlaybackUpsert) UpdateUpdatedAt added in v0.0.2

func (u *PlaybackUpsert) UpdateUpdatedAt() *PlaybackUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*PlaybackUpsert) UpdateUserID added in v0.0.2

func (u *PlaybackUpsert) UpdateUserID() *PlaybackUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*PlaybackUpsert) UpdateVodID added in v0.0.2

func (u *PlaybackUpsert) UpdateVodID() *PlaybackUpsert

UpdateVodID sets the "vod_id" field to the value that was provided on create.

type PlaybackUpsertBulk added in v0.0.2

type PlaybackUpsertBulk struct {
	// contains filtered or unexported fields
}

PlaybackUpsertBulk is the builder for "upsert"-ing a bulk of Playback nodes.

func (*PlaybackUpsertBulk) AddTime added in v0.0.2

func (u *PlaybackUpsertBulk) AddTime(v int) *PlaybackUpsertBulk

AddTime adds v to the "time" field.

func (*PlaybackUpsertBulk) ClearStatus added in v0.0.2

func (u *PlaybackUpsertBulk) ClearStatus() *PlaybackUpsertBulk

ClearStatus clears the value of the "status" field.

func (*PlaybackUpsertBulk) DoNothing added in v0.0.2

func (u *PlaybackUpsertBulk) DoNothing() *PlaybackUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PlaybackUpsertBulk) Exec added in v0.0.2

func (u *PlaybackUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaybackUpsertBulk) ExecX added in v0.0.2

func (u *PlaybackUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaybackUpsertBulk) Ignore added in v0.0.2

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Playback.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PlaybackUpsertBulk) SetStatus added in v0.0.2

SetStatus sets the "status" field.

func (*PlaybackUpsertBulk) SetTime added in v0.0.2

func (u *PlaybackUpsertBulk) SetTime(v int) *PlaybackUpsertBulk

SetTime sets the "time" field.

func (*PlaybackUpsertBulk) SetUpdatedAt added in v0.0.2

func (u *PlaybackUpsertBulk) SetUpdatedAt(v time.Time) *PlaybackUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackUpsertBulk) SetUserID added in v0.0.2

SetUserID sets the "user_id" field.

func (*PlaybackUpsertBulk) SetVodID added in v0.0.2

SetVodID sets the "vod_id" field.

func (*PlaybackUpsertBulk) Update added in v0.0.2

func (u *PlaybackUpsertBulk) Update(set func(*PlaybackUpsert)) *PlaybackUpsertBulk

Update allows overriding fields `UPDATE` values. See the PlaybackCreateBulk.OnConflict documentation for more info.

func (*PlaybackUpsertBulk) UpdateNewValues added in v0.0.2

func (u *PlaybackUpsertBulk) UpdateNewValues() *PlaybackUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Playback.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(playback.FieldID)
		}),
	).
	Exec(ctx)

func (*PlaybackUpsertBulk) UpdateStatus added in v0.0.2

func (u *PlaybackUpsertBulk) UpdateStatus() *PlaybackUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*PlaybackUpsertBulk) UpdateTime added in v0.0.2

func (u *PlaybackUpsertBulk) UpdateTime() *PlaybackUpsertBulk

UpdateTime sets the "time" field to the value that was provided on create.

func (*PlaybackUpsertBulk) UpdateUpdatedAt added in v0.0.2

func (u *PlaybackUpsertBulk) UpdateUpdatedAt() *PlaybackUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*PlaybackUpsertBulk) UpdateUserID added in v0.0.2

func (u *PlaybackUpsertBulk) UpdateUserID() *PlaybackUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*PlaybackUpsertBulk) UpdateVodID added in v0.0.2

func (u *PlaybackUpsertBulk) UpdateVodID() *PlaybackUpsertBulk

UpdateVodID sets the "vod_id" field to the value that was provided on create.

type PlaybackUpsertOne added in v0.0.2

type PlaybackUpsertOne struct {
	// contains filtered or unexported fields
}

PlaybackUpsertOne is the builder for "upsert"-ing

one Playback node.

func (*PlaybackUpsertOne) AddTime added in v0.0.2

func (u *PlaybackUpsertOne) AddTime(v int) *PlaybackUpsertOne

AddTime adds v to the "time" field.

func (*PlaybackUpsertOne) ClearStatus added in v0.0.2

func (u *PlaybackUpsertOne) ClearStatus() *PlaybackUpsertOne

ClearStatus clears the value of the "status" field.

func (*PlaybackUpsertOne) DoNothing added in v0.0.2

func (u *PlaybackUpsertOne) DoNothing() *PlaybackUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PlaybackUpsertOne) Exec added in v0.0.2

func (u *PlaybackUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaybackUpsertOne) ExecX added in v0.0.2

func (u *PlaybackUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaybackUpsertOne) ID added in v0.0.2

func (u *PlaybackUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PlaybackUpsertOne) IDX added in v0.0.2

IDX is like ID, but panics if an error occurs.

func (*PlaybackUpsertOne) Ignore added in v0.0.2

func (u *PlaybackUpsertOne) Ignore() *PlaybackUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Playback.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PlaybackUpsertOne) SetStatus added in v0.0.2

SetStatus sets the "status" field.

func (*PlaybackUpsertOne) SetTime added in v0.0.2

func (u *PlaybackUpsertOne) SetTime(v int) *PlaybackUpsertOne

SetTime sets the "time" field.

func (*PlaybackUpsertOne) SetUpdatedAt added in v0.0.2

func (u *PlaybackUpsertOne) SetUpdatedAt(v time.Time) *PlaybackUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*PlaybackUpsertOne) SetUserID added in v0.0.2

func (u *PlaybackUpsertOne) SetUserID(v uuid.UUID) *PlaybackUpsertOne

SetUserID sets the "user_id" field.

func (*PlaybackUpsertOne) SetVodID added in v0.0.2

func (u *PlaybackUpsertOne) SetVodID(v uuid.UUID) *PlaybackUpsertOne

SetVodID sets the "vod_id" field.

func (*PlaybackUpsertOne) Update added in v0.0.2

func (u *PlaybackUpsertOne) Update(set func(*PlaybackUpsert)) *PlaybackUpsertOne

Update allows overriding fields `UPDATE` values. See the PlaybackCreate.OnConflict documentation for more info.

func (*PlaybackUpsertOne) UpdateNewValues added in v0.0.2

func (u *PlaybackUpsertOne) UpdateNewValues() *PlaybackUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Playback.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(playback.FieldID)
		}),
	).
	Exec(ctx)

func (*PlaybackUpsertOne) UpdateStatus added in v0.0.2

func (u *PlaybackUpsertOne) UpdateStatus() *PlaybackUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*PlaybackUpsertOne) UpdateTime added in v0.0.2

func (u *PlaybackUpsertOne) UpdateTime() *PlaybackUpsertOne

UpdateTime sets the "time" field to the value that was provided on create.

func (*PlaybackUpsertOne) UpdateUpdatedAt added in v0.0.2

func (u *PlaybackUpsertOne) UpdateUpdatedAt() *PlaybackUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*PlaybackUpsertOne) UpdateUserID added in v0.0.2

func (u *PlaybackUpsertOne) UpdateUserID() *PlaybackUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

func (*PlaybackUpsertOne) UpdateVodID added in v0.0.2

func (u *PlaybackUpsertOne) UpdateVodID() *PlaybackUpsertOne

UpdateVodID sets the "vod_id" field to the value that was provided on create.

type Playbacks added in v0.0.2

type Playbacks []*Playback

Playbacks is a parsable slice of Playback.

type Playlist added in v1.0.0

type Playlist struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// ThumbnailPath holds the value of the "thumbnail_path" field.
	ThumbnailPath string `json:"thumbnail_path,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PlaylistQuery when eager-loading is set.
	Edges PlaylistEdges `json:"edges"`
	// contains filtered or unexported fields
}

Playlist is the model entity for the Playlist schema.

func (*Playlist) QueryVods added in v1.0.0

func (pl *Playlist) QueryVods() *VodQuery

QueryVods queries the "vods" edge of the Playlist entity.

func (*Playlist) String added in v1.0.0

func (pl *Playlist) String() string

String implements the fmt.Stringer.

func (*Playlist) Unwrap added in v1.0.0

func (pl *Playlist) Unwrap() *Playlist

Unwrap unwraps the Playlist 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 (*Playlist) Update added in v1.0.0

func (pl *Playlist) Update() *PlaylistUpdateOne

Update returns a builder for updating this Playlist. Note that you need to call Playlist.Unwrap() before calling this method if this Playlist was returned from a transaction, and the transaction was committed or rolled back.

func (*Playlist) Value added in v1.2.12

func (pl *Playlist) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Playlist. This includes values selected through modifiers, order, etc.

type PlaylistClient added in v1.0.0

type PlaylistClient struct {
	// contains filtered or unexported fields
}

PlaylistClient is a client for the Playlist schema.

func NewPlaylistClient added in v1.0.0

func NewPlaylistClient(c config) *PlaylistClient

NewPlaylistClient returns a client for the Playlist from the given config.

func (*PlaylistClient) Create added in v1.0.0

func (c *PlaylistClient) Create() *PlaylistCreate

Create returns a builder for creating a Playlist entity.

func (*PlaylistClient) CreateBulk added in v1.0.0

func (c *PlaylistClient) CreateBulk(builders ...*PlaylistCreate) *PlaylistCreateBulk

CreateBulk returns a builder for creating a bulk of Playlist entities.

func (*PlaylistClient) Delete added in v1.0.0

func (c *PlaylistClient) Delete() *PlaylistDelete

Delete returns a delete builder for Playlist.

func (*PlaylistClient) DeleteOne added in v1.0.0

func (c *PlaylistClient) DeleteOne(pl *Playlist) *PlaylistDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*PlaylistClient) DeleteOneID added in v1.0.0

func (c *PlaylistClient) DeleteOneID(id uuid.UUID) *PlaylistDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*PlaylistClient) Get added in v1.0.0

func (c *PlaylistClient) Get(ctx context.Context, id uuid.UUID) (*Playlist, error)

Get returns a Playlist entity by its id.

func (*PlaylistClient) GetX added in v1.0.0

func (c *PlaylistClient) GetX(ctx context.Context, id uuid.UUID) *Playlist

GetX is like Get, but panics if an error occurs.

func (*PlaylistClient) Hooks added in v1.0.0

func (c *PlaylistClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PlaylistClient) Intercept added in v1.1.7

func (c *PlaylistClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `playlist.Intercept(f(g(h())))`.

func (*PlaylistClient) Interceptors added in v1.1.7

func (c *PlaylistClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*PlaylistClient) Query added in v1.0.0

func (c *PlaylistClient) Query() *PlaylistQuery

Query returns a query builder for Playlist.

func (*PlaylistClient) QueryVods added in v1.0.0

func (c *PlaylistClient) QueryVods(pl *Playlist) *VodQuery

QueryVods queries the vods edge of a Playlist.

func (*PlaylistClient) Update added in v1.0.0

func (c *PlaylistClient) Update() *PlaylistUpdate

Update returns an update builder for Playlist.

func (*PlaylistClient) UpdateOne added in v1.0.0

func (c *PlaylistClient) UpdateOne(pl *Playlist) *PlaylistUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PlaylistClient) UpdateOneID added in v1.0.0

func (c *PlaylistClient) UpdateOneID(id uuid.UUID) *PlaylistUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PlaylistClient) Use added in v1.0.0

func (c *PlaylistClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `playlist.Hooks(f(g(h())))`.

type PlaylistCreate added in v1.0.0

type PlaylistCreate struct {
	// contains filtered or unexported fields
}

PlaylistCreate is the builder for creating a Playlist entity.

func (*PlaylistCreate) AddVodIDs added in v1.0.0

func (pc *PlaylistCreate) AddVodIDs(ids ...uuid.UUID) *PlaylistCreate

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*PlaylistCreate) AddVods added in v1.0.0

func (pc *PlaylistCreate) AddVods(v ...*Vod) *PlaylistCreate

AddVods adds the "vods" edges to the Vod entity.

func (*PlaylistCreate) Exec added in v1.0.0

func (pc *PlaylistCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaylistCreate) ExecX added in v1.0.0

func (pc *PlaylistCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaylistCreate) Mutation added in v1.0.0

func (pc *PlaylistCreate) Mutation() *PlaylistMutation

Mutation returns the PlaylistMutation object of the builder.

func (*PlaylistCreate) OnConflict added in v1.2.4

func (pc *PlaylistCreate) OnConflict(opts ...sql.ConflictOption) *PlaylistUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Playlist.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PlaylistUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*PlaylistCreate) OnConflictColumns added in v1.2.4

func (pc *PlaylistCreate) OnConflictColumns(columns ...string) *PlaylistUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Playlist.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PlaylistCreate) Save added in v1.0.0

func (pc *PlaylistCreate) Save(ctx context.Context) (*Playlist, error)

Save creates the Playlist in the database.

func (*PlaylistCreate) SaveX added in v1.0.0

func (pc *PlaylistCreate) SaveX(ctx context.Context) *Playlist

SaveX calls Save and panics if Save returns an error.

func (*PlaylistCreate) SetCreatedAt added in v1.0.0

func (pc *PlaylistCreate) SetCreatedAt(t time.Time) *PlaylistCreate

SetCreatedAt sets the "created_at" field.

func (*PlaylistCreate) SetDescription added in v1.0.0

func (pc *PlaylistCreate) SetDescription(s string) *PlaylistCreate

SetDescription sets the "description" field.

func (*PlaylistCreate) SetID added in v1.0.0

func (pc *PlaylistCreate) SetID(u uuid.UUID) *PlaylistCreate

SetID sets the "id" field.

func (*PlaylistCreate) SetName added in v1.0.0

func (pc *PlaylistCreate) SetName(s string) *PlaylistCreate

SetName sets the "name" field.

func (*PlaylistCreate) SetNillableCreatedAt added in v1.0.0

func (pc *PlaylistCreate) SetNillableCreatedAt(t *time.Time) *PlaylistCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PlaylistCreate) SetNillableDescription added in v1.0.0

func (pc *PlaylistCreate) SetNillableDescription(s *string) *PlaylistCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*PlaylistCreate) SetNillableID added in v1.0.0

func (pc *PlaylistCreate) SetNillableID(u *uuid.UUID) *PlaylistCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*PlaylistCreate) SetNillableThumbnailPath added in v1.0.0

func (pc *PlaylistCreate) SetNillableThumbnailPath(s *string) *PlaylistCreate

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*PlaylistCreate) SetNillableUpdatedAt added in v1.0.0

func (pc *PlaylistCreate) SetNillableUpdatedAt(t *time.Time) *PlaylistCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PlaylistCreate) SetThumbnailPath added in v1.0.0

func (pc *PlaylistCreate) SetThumbnailPath(s string) *PlaylistCreate

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistCreate) SetUpdatedAt added in v1.0.0

func (pc *PlaylistCreate) SetUpdatedAt(t time.Time) *PlaylistCreate

SetUpdatedAt sets the "updated_at" field.

type PlaylistCreateBulk added in v1.0.0

type PlaylistCreateBulk struct {
	// contains filtered or unexported fields
}

PlaylistCreateBulk is the builder for creating many Playlist entities in bulk.

func (*PlaylistCreateBulk) Exec added in v1.0.0

func (pcb *PlaylistCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaylistCreateBulk) ExecX added in v1.0.0

func (pcb *PlaylistCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaylistCreateBulk) OnConflict added in v1.2.4

func (pcb *PlaylistCreateBulk) OnConflict(opts ...sql.ConflictOption) *PlaylistUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Playlist.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PlaylistUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*PlaylistCreateBulk) OnConflictColumns added in v1.2.4

func (pcb *PlaylistCreateBulk) OnConflictColumns(columns ...string) *PlaylistUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Playlist.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*PlaylistCreateBulk) Save added in v1.0.0

func (pcb *PlaylistCreateBulk) Save(ctx context.Context) ([]*Playlist, error)

Save creates the Playlist entities in the database.

func (*PlaylistCreateBulk) SaveX added in v1.0.0

func (pcb *PlaylistCreateBulk) SaveX(ctx context.Context) []*Playlist

SaveX is like Save, but panics if an error occurs.

type PlaylistDelete added in v1.0.0

type PlaylistDelete struct {
	// contains filtered or unexported fields
}

PlaylistDelete is the builder for deleting a Playlist entity.

func (*PlaylistDelete) Exec added in v1.0.0

func (pd *PlaylistDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PlaylistDelete) ExecX added in v1.0.0

func (pd *PlaylistDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PlaylistDelete) Where added in v1.0.0

func (pd *PlaylistDelete) Where(ps ...predicate.Playlist) *PlaylistDelete

Where appends a list predicates to the PlaylistDelete builder.

type PlaylistDeleteOne added in v1.0.0

type PlaylistDeleteOne struct {
	// contains filtered or unexported fields
}

PlaylistDeleteOne is the builder for deleting a single Playlist entity.

func (*PlaylistDeleteOne) Exec added in v1.0.0

func (pdo *PlaylistDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PlaylistDeleteOne) ExecX added in v1.0.0

func (pdo *PlaylistDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaylistDeleteOne) Where added in v1.2.4

Where appends a list predicates to the PlaylistDelete builder.

type PlaylistEdges added in v1.0.0

type PlaylistEdges struct {
	// Vods holds the value of the vods edge.
	Vods []*Vod `json:"vods,omitempty"`
	// contains filtered or unexported fields
}

PlaylistEdges holds the relations/edges for other nodes in the graph.

func (PlaylistEdges) VodsOrErr added in v1.0.0

func (e PlaylistEdges) VodsOrErr() ([]*Vod, error)

VodsOrErr returns the Vods value or an error if the edge was not loaded in eager-loading.

type PlaylistGroupBy added in v1.0.0

type PlaylistGroupBy struct {
	// contains filtered or unexported fields
}

PlaylistGroupBy is the group-by builder for Playlist entities.

func (*PlaylistGroupBy) Aggregate added in v1.0.0

func (pgb *PlaylistGroupBy) Aggregate(fns ...AggregateFunc) *PlaylistGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PlaylistGroupBy) Bool added in v1.0.0

func (s *PlaylistGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PlaylistGroupBy) BoolX added in v1.0.0

func (s *PlaylistGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PlaylistGroupBy) Bools added in v1.0.0

func (s *PlaylistGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PlaylistGroupBy) BoolsX added in v1.0.0

func (s *PlaylistGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PlaylistGroupBy) Float64 added in v1.0.0

func (s *PlaylistGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PlaylistGroupBy) Float64X added in v1.0.0

func (s *PlaylistGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PlaylistGroupBy) Float64s added in v1.0.0

func (s *PlaylistGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PlaylistGroupBy) Float64sX added in v1.0.0

func (s *PlaylistGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PlaylistGroupBy) Int added in v1.0.0

func (s *PlaylistGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PlaylistGroupBy) IntX added in v1.0.0

func (s *PlaylistGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PlaylistGroupBy) Ints added in v1.0.0

func (s *PlaylistGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PlaylistGroupBy) IntsX added in v1.0.0

func (s *PlaylistGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PlaylistGroupBy) Scan added in v1.0.0

func (pgb *PlaylistGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PlaylistGroupBy) ScanX added in v1.0.0

func (s *PlaylistGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PlaylistGroupBy) String added in v1.0.0

func (s *PlaylistGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PlaylistGroupBy) StringX added in v1.0.0

func (s *PlaylistGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PlaylistGroupBy) Strings added in v1.0.0

func (s *PlaylistGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PlaylistGroupBy) StringsX added in v1.0.0

func (s *PlaylistGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PlaylistMutation added in v1.0.0

type PlaylistMutation struct {
	// contains filtered or unexported fields
}

PlaylistMutation represents an operation that mutates the Playlist nodes in the graph.

func (*PlaylistMutation) AddField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) AddVodIDs added in v1.0.0

func (m *PlaylistMutation) AddVodIDs(ids ...uuid.UUID)

AddVodIDs adds the "vods" edge to the Vod entity by ids.

func (*PlaylistMutation) AddedEdges added in v1.0.0

func (m *PlaylistMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PlaylistMutation) AddedField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) AddedFields added in v1.0.0

func (m *PlaylistMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PlaylistMutation) AddedIDs added in v1.0.0

func (m *PlaylistMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PlaylistMutation) ClearDescription added in v1.0.0

func (m *PlaylistMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*PlaylistMutation) ClearEdge added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) ClearField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) ClearThumbnailPath added in v1.0.0

func (m *PlaylistMutation) ClearThumbnailPath()

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*PlaylistMutation) ClearVods added in v1.0.0

func (m *PlaylistMutation) ClearVods()

ClearVods clears the "vods" edge to the Vod entity.

func (*PlaylistMutation) ClearedEdges added in v1.0.0

func (m *PlaylistMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PlaylistMutation) ClearedFields added in v1.0.0

func (m *PlaylistMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PlaylistMutation) Client added in v1.0.0

func (m PlaylistMutation) 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 (*PlaylistMutation) CreatedAt added in v1.0.0

func (m *PlaylistMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PlaylistMutation) Description added in v1.0.0

func (m *PlaylistMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*PlaylistMutation) DescriptionCleared added in v1.0.0

func (m *PlaylistMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*PlaylistMutation) EdgeCleared added in v1.0.0

func (m *PlaylistMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PlaylistMutation) Field added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) FieldCleared added in v1.0.0

func (m *PlaylistMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PlaylistMutation) Fields added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) ID added in v1.0.0

func (m *PlaylistMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PlaylistMutation) IDs added in v1.0.0

func (m *PlaylistMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PlaylistMutation) Name added in v1.0.0

func (m *PlaylistMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*PlaylistMutation) OldCreatedAt added in v1.0.0

func (m *PlaylistMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Playlist entity. If the Playlist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlaylistMutation) OldDescription added in v1.0.0

func (m *PlaylistMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Playlist entity. If the Playlist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlaylistMutation) OldField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) OldName added in v1.0.0

func (m *PlaylistMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Playlist entity. If the Playlist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlaylistMutation) OldThumbnailPath added in v1.0.0

func (m *PlaylistMutation) OldThumbnailPath(ctx context.Context) (v string, err error)

OldThumbnailPath returns the old "thumbnail_path" field's value of the Playlist entity. If the Playlist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlaylistMutation) OldUpdatedAt added in v1.0.0

func (m *PlaylistMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Playlist entity. If the Playlist object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PlaylistMutation) Op added in v1.0.0

func (m *PlaylistMutation) Op() Op

Op returns the operation name.

func (*PlaylistMutation) RemoveVodIDs added in v1.0.0

func (m *PlaylistMutation) RemoveVodIDs(ids ...uuid.UUID)

RemoveVodIDs removes the "vods" edge to the Vod entity by IDs.

func (*PlaylistMutation) RemovedEdges added in v1.0.0

func (m *PlaylistMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PlaylistMutation) RemovedIDs added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) RemovedVodsIDs added in v1.0.0

func (m *PlaylistMutation) RemovedVodsIDs() (ids []uuid.UUID)

RemovedVods returns the removed IDs of the "vods" edge to the Vod entity.

func (*PlaylistMutation) ResetCreatedAt added in v1.0.0

func (m *PlaylistMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PlaylistMutation) ResetDescription added in v1.0.0

func (m *PlaylistMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*PlaylistMutation) ResetEdge added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) ResetField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) ResetName added in v1.0.0

func (m *PlaylistMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PlaylistMutation) ResetThumbnailPath added in v1.0.0

func (m *PlaylistMutation) ResetThumbnailPath()

ResetThumbnailPath resets all changes to the "thumbnail_path" field.

func (*PlaylistMutation) ResetUpdatedAt added in v1.0.0

func (m *PlaylistMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PlaylistMutation) ResetVods added in v1.0.0

func (m *PlaylistMutation) ResetVods()

ResetVods resets all changes to the "vods" edge.

func (*PlaylistMutation) SetCreatedAt added in v1.0.0

func (m *PlaylistMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PlaylistMutation) SetDescription added in v1.0.0

func (m *PlaylistMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*PlaylistMutation) SetField added in v1.0.0

func (m *PlaylistMutation) 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 (*PlaylistMutation) SetID added in v1.0.0

func (m *PlaylistMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Playlist entities.

func (*PlaylistMutation) SetName added in v1.0.0

func (m *PlaylistMutation) SetName(s string)

SetName sets the "name" field.

func (*PlaylistMutation) SetOp added in v1.1.7

func (m *PlaylistMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*PlaylistMutation) SetThumbnailPath added in v1.0.0

func (m *PlaylistMutation) SetThumbnailPath(s string)

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistMutation) SetUpdatedAt added in v1.0.0

func (m *PlaylistMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*PlaylistMutation) ThumbnailPath added in v1.0.0

func (m *PlaylistMutation) ThumbnailPath() (r string, exists bool)

ThumbnailPath returns the value of the "thumbnail_path" field in the mutation.

func (*PlaylistMutation) ThumbnailPathCleared added in v1.0.0

func (m *PlaylistMutation) ThumbnailPathCleared() bool

ThumbnailPathCleared returns if the "thumbnail_path" field was cleared in this mutation.

func (PlaylistMutation) Tx added in v1.0.0

func (m PlaylistMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PlaylistMutation) Type added in v1.0.0

func (m *PlaylistMutation) Type() string

Type returns the node type of this mutation (Playlist).

func (*PlaylistMutation) UpdatedAt added in v1.0.0

func (m *PlaylistMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PlaylistMutation) VodsCleared added in v1.0.0

func (m *PlaylistMutation) VodsCleared() bool

VodsCleared reports if the "vods" edge to the Vod entity was cleared.

func (*PlaylistMutation) VodsIDs added in v1.0.0

func (m *PlaylistMutation) VodsIDs() (ids []uuid.UUID)

VodsIDs returns the "vods" edge IDs in the mutation.

func (*PlaylistMutation) Where added in v1.0.0

func (m *PlaylistMutation) Where(ps ...predicate.Playlist)

Where appends a list predicates to the PlaylistMutation builder.

func (*PlaylistMutation) WhereP added in v1.1.7

func (m *PlaylistMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the PlaylistMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type PlaylistQuery added in v1.0.0

type PlaylistQuery struct {
	// contains filtered or unexported fields
}

PlaylistQuery is the builder for querying Playlist entities.

func (*PlaylistQuery) Aggregate added in v1.1.7

func (pq *PlaylistQuery) Aggregate(fns ...AggregateFunc) *PlaylistSelect

Aggregate returns a PlaylistSelect configured with the given aggregations.

func (*PlaylistQuery) All added in v1.0.0

func (pq *PlaylistQuery) All(ctx context.Context) ([]*Playlist, error)

All executes the query and returns a list of Playlists.

func (*PlaylistQuery) AllX added in v1.0.0

func (pq *PlaylistQuery) AllX(ctx context.Context) []*Playlist

AllX is like All, but panics if an error occurs.

func (*PlaylistQuery) Clone added in v1.0.0

func (pq *PlaylistQuery) Clone() *PlaylistQuery

Clone returns a duplicate of the PlaylistQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PlaylistQuery) Count added in v1.0.0

func (pq *PlaylistQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PlaylistQuery) CountX added in v1.0.0

func (pq *PlaylistQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PlaylistQuery) Exist added in v1.0.0

func (pq *PlaylistQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PlaylistQuery) ExistX added in v1.0.0

func (pq *PlaylistQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PlaylistQuery) First added in v1.0.0

func (pq *PlaylistQuery) First(ctx context.Context) (*Playlist, error)

First returns the first Playlist entity from the query. Returns a *NotFoundError when no Playlist was found.

func (*PlaylistQuery) FirstID added in v1.0.0

func (pq *PlaylistQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Playlist ID from the query. Returns a *NotFoundError when no Playlist ID was found.

func (*PlaylistQuery) FirstIDX added in v1.0.0

func (pq *PlaylistQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*PlaylistQuery) FirstX added in v1.0.0

func (pq *PlaylistQuery) FirstX(ctx context.Context) *Playlist

FirstX is like First, but panics if an error occurs.

func (*PlaylistQuery) GroupBy added in v1.0.0

func (pq *PlaylistQuery) GroupBy(field string, fields ...string) *PlaylistGroupBy

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.Playlist.Query().
	GroupBy(playlist.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PlaylistQuery) IDs added in v1.0.0

func (pq *PlaylistQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Playlist IDs.

func (*PlaylistQuery) IDsX added in v1.0.0

func (pq *PlaylistQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*PlaylistQuery) Limit added in v1.0.0

func (pq *PlaylistQuery) Limit(limit int) *PlaylistQuery

Limit the number of records to be returned by this query.

func (*PlaylistQuery) Offset added in v1.0.0

func (pq *PlaylistQuery) Offset(offset int) *PlaylistQuery

Offset to start from.

func (*PlaylistQuery) Only added in v1.0.0

func (pq *PlaylistQuery) Only(ctx context.Context) (*Playlist, error)

Only returns a single Playlist entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Playlist entity is found. Returns a *NotFoundError when no Playlist entities are found.

func (*PlaylistQuery) OnlyID added in v1.0.0

func (pq *PlaylistQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Playlist ID in the query. Returns a *NotSingularError when more than one Playlist ID is found. Returns a *NotFoundError when no entities are found.

func (*PlaylistQuery) OnlyIDX added in v1.0.0

func (pq *PlaylistQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PlaylistQuery) OnlyX added in v1.0.0

func (pq *PlaylistQuery) OnlyX(ctx context.Context) *Playlist

OnlyX is like Only, but panics if an error occurs.

func (*PlaylistQuery) Order added in v1.0.0

Order specifies how the records should be ordered.

func (*PlaylistQuery) QueryVods added in v1.0.0

func (pq *PlaylistQuery) QueryVods() *VodQuery

QueryVods chains the current query on the "vods" edge.

func (*PlaylistQuery) Select added in v1.0.0

func (pq *PlaylistQuery) Select(fields ...string) *PlaylistSelect

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.Playlist.Query().
	Select(playlist.FieldName).
	Scan(ctx, &v)

func (*PlaylistQuery) Unique added in v1.0.0

func (pq *PlaylistQuery) Unique(unique bool) *PlaylistQuery

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 (*PlaylistQuery) Where added in v1.0.0

func (pq *PlaylistQuery) Where(ps ...predicate.Playlist) *PlaylistQuery

Where adds a new predicate for the PlaylistQuery builder.

func (*PlaylistQuery) WithVods added in v1.0.0

func (pq *PlaylistQuery) WithVods(opts ...func(*VodQuery)) *PlaylistQuery

WithVods tells the query-builder to eager-load the nodes that are connected to the "vods" edge. The optional arguments are used to configure the query builder of the edge.

type PlaylistSelect added in v1.0.0

type PlaylistSelect struct {
	*PlaylistQuery
	// contains filtered or unexported fields
}

PlaylistSelect is the builder for selecting fields of Playlist entities.

func (*PlaylistSelect) Aggregate added in v1.1.7

func (ps *PlaylistSelect) Aggregate(fns ...AggregateFunc) *PlaylistSelect

Aggregate adds the given aggregation functions to the selector query.

func (*PlaylistSelect) Bool added in v1.0.0

func (s *PlaylistSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PlaylistSelect) BoolX added in v1.0.0

func (s *PlaylistSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PlaylistSelect) Bools added in v1.0.0

func (s *PlaylistSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PlaylistSelect) BoolsX added in v1.0.0

func (s *PlaylistSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PlaylistSelect) Float64 added in v1.0.0

func (s *PlaylistSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PlaylistSelect) Float64X added in v1.0.0

func (s *PlaylistSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PlaylistSelect) Float64s added in v1.0.0

func (s *PlaylistSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PlaylistSelect) Float64sX added in v1.0.0

func (s *PlaylistSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PlaylistSelect) Int added in v1.0.0

func (s *PlaylistSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PlaylistSelect) IntX added in v1.0.0

func (s *PlaylistSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PlaylistSelect) Ints added in v1.0.0

func (s *PlaylistSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PlaylistSelect) IntsX added in v1.0.0

func (s *PlaylistSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PlaylistSelect) Scan added in v1.0.0

func (ps *PlaylistSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*PlaylistSelect) ScanX added in v1.0.0

func (s *PlaylistSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*PlaylistSelect) String added in v1.0.0

func (s *PlaylistSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PlaylistSelect) StringX added in v1.0.0

func (s *PlaylistSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PlaylistSelect) Strings added in v1.0.0

func (s *PlaylistSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PlaylistSelect) StringsX added in v1.0.0

func (s *PlaylistSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PlaylistUpdate added in v1.0.0

type PlaylistUpdate struct {
	// contains filtered or unexported fields
}

PlaylistUpdate is the builder for updating Playlist entities.

func (*PlaylistUpdate) AddVodIDs added in v1.0.0

func (pu *PlaylistUpdate) AddVodIDs(ids ...uuid.UUID) *PlaylistUpdate

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*PlaylistUpdate) AddVods added in v1.0.0

func (pu *PlaylistUpdate) AddVods(v ...*Vod) *PlaylistUpdate

AddVods adds the "vods" edges to the Vod entity.

func (*PlaylistUpdate) ClearDescription added in v1.0.0

func (pu *PlaylistUpdate) ClearDescription() *PlaylistUpdate

ClearDescription clears the value of the "description" field.

func (*PlaylistUpdate) ClearThumbnailPath added in v1.0.0

func (pu *PlaylistUpdate) ClearThumbnailPath() *PlaylistUpdate

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*PlaylistUpdate) ClearVods added in v1.0.0

func (pu *PlaylistUpdate) ClearVods() *PlaylistUpdate

ClearVods clears all "vods" edges to the Vod entity.

func (*PlaylistUpdate) Exec added in v1.0.0

func (pu *PlaylistUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaylistUpdate) ExecX added in v1.0.0

func (pu *PlaylistUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaylistUpdate) Mutation added in v1.0.0

func (pu *PlaylistUpdate) Mutation() *PlaylistMutation

Mutation returns the PlaylistMutation object of the builder.

func (*PlaylistUpdate) RemoveVodIDs added in v1.0.0

func (pu *PlaylistUpdate) RemoveVodIDs(ids ...uuid.UUID) *PlaylistUpdate

RemoveVodIDs removes the "vods" edge to Vod entities by IDs.

func (*PlaylistUpdate) RemoveVods added in v1.0.0

func (pu *PlaylistUpdate) RemoveVods(v ...*Vod) *PlaylistUpdate

RemoveVods removes "vods" edges to Vod entities.

func (*PlaylistUpdate) Save added in v1.0.0

func (pu *PlaylistUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PlaylistUpdate) SaveX added in v1.0.0

func (pu *PlaylistUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PlaylistUpdate) SetDescription added in v1.0.0

func (pu *PlaylistUpdate) SetDescription(s string) *PlaylistUpdate

SetDescription sets the "description" field.

func (*PlaylistUpdate) SetName added in v1.0.0

func (pu *PlaylistUpdate) SetName(s string) *PlaylistUpdate

SetName sets the "name" field.

func (*PlaylistUpdate) SetNillableDescription added in v1.0.0

func (pu *PlaylistUpdate) SetNillableDescription(s *string) *PlaylistUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*PlaylistUpdate) SetNillableThumbnailPath added in v1.0.0

func (pu *PlaylistUpdate) SetNillableThumbnailPath(s *string) *PlaylistUpdate

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*PlaylistUpdate) SetThumbnailPath added in v1.0.0

func (pu *PlaylistUpdate) SetThumbnailPath(s string) *PlaylistUpdate

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistUpdate) SetUpdatedAt added in v1.0.0

func (pu *PlaylistUpdate) SetUpdatedAt(t time.Time) *PlaylistUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PlaylistUpdate) Where added in v1.0.0

func (pu *PlaylistUpdate) Where(ps ...predicate.Playlist) *PlaylistUpdate

Where appends a list predicates to the PlaylistUpdate builder.

type PlaylistUpdateOne added in v1.0.0

type PlaylistUpdateOne struct {
	// contains filtered or unexported fields
}

PlaylistUpdateOne is the builder for updating a single Playlist entity.

func (*PlaylistUpdateOne) AddVodIDs added in v1.0.0

func (puo *PlaylistUpdateOne) AddVodIDs(ids ...uuid.UUID) *PlaylistUpdateOne

AddVodIDs adds the "vods" edge to the Vod entity by IDs.

func (*PlaylistUpdateOne) AddVods added in v1.0.0

func (puo *PlaylistUpdateOne) AddVods(v ...*Vod) *PlaylistUpdateOne

AddVods adds the "vods" edges to the Vod entity.

func (*PlaylistUpdateOne) ClearDescription added in v1.0.0

func (puo *PlaylistUpdateOne) ClearDescription() *PlaylistUpdateOne

ClearDescription clears the value of the "description" field.

func (*PlaylistUpdateOne) ClearThumbnailPath added in v1.0.0

func (puo *PlaylistUpdateOne) ClearThumbnailPath() *PlaylistUpdateOne

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*PlaylistUpdateOne) ClearVods added in v1.0.0

func (puo *PlaylistUpdateOne) ClearVods() *PlaylistUpdateOne

ClearVods clears all "vods" edges to the Vod entity.

func (*PlaylistUpdateOne) Exec added in v1.0.0

func (puo *PlaylistUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PlaylistUpdateOne) ExecX added in v1.0.0

func (puo *PlaylistUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaylistUpdateOne) Mutation added in v1.0.0

func (puo *PlaylistUpdateOne) Mutation() *PlaylistMutation

Mutation returns the PlaylistMutation object of the builder.

func (*PlaylistUpdateOne) RemoveVodIDs added in v1.0.0

func (puo *PlaylistUpdateOne) RemoveVodIDs(ids ...uuid.UUID) *PlaylistUpdateOne

RemoveVodIDs removes the "vods" edge to Vod entities by IDs.

func (*PlaylistUpdateOne) RemoveVods added in v1.0.0

func (puo *PlaylistUpdateOne) RemoveVods(v ...*Vod) *PlaylistUpdateOne

RemoveVods removes "vods" edges to Vod entities.

func (*PlaylistUpdateOne) Save added in v1.0.0

func (puo *PlaylistUpdateOne) Save(ctx context.Context) (*Playlist, error)

Save executes the query and returns the updated Playlist entity.

func (*PlaylistUpdateOne) SaveX added in v1.0.0

func (puo *PlaylistUpdateOne) SaveX(ctx context.Context) *Playlist

SaveX is like Save, but panics if an error occurs.

func (*PlaylistUpdateOne) Select added in v1.0.0

func (puo *PlaylistUpdateOne) Select(field string, fields ...string) *PlaylistUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PlaylistUpdateOne) SetDescription added in v1.0.0

func (puo *PlaylistUpdateOne) SetDescription(s string) *PlaylistUpdateOne

SetDescription sets the "description" field.

func (*PlaylistUpdateOne) SetName added in v1.0.0

func (puo *PlaylistUpdateOne) SetName(s string) *PlaylistUpdateOne

SetName sets the "name" field.

func (*PlaylistUpdateOne) SetNillableDescription added in v1.0.0

func (puo *PlaylistUpdateOne) SetNillableDescription(s *string) *PlaylistUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*PlaylistUpdateOne) SetNillableThumbnailPath added in v1.0.0

func (puo *PlaylistUpdateOne) SetNillableThumbnailPath(s *string) *PlaylistUpdateOne

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*PlaylistUpdateOne) SetThumbnailPath added in v1.0.0

func (puo *PlaylistUpdateOne) SetThumbnailPath(s string) *PlaylistUpdateOne

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistUpdateOne) SetUpdatedAt added in v1.0.0

func (puo *PlaylistUpdateOne) SetUpdatedAt(t time.Time) *PlaylistUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*PlaylistUpdateOne) Where added in v1.2.4

Where appends a list predicates to the PlaylistUpdate builder.

type PlaylistUpsert added in v1.2.4

type PlaylistUpsert struct {
	*sql.UpdateSet
}

PlaylistUpsert is the "OnConflict" setter.

func (*PlaylistUpsert) ClearDescription added in v1.2.4

func (u *PlaylistUpsert) ClearDescription() *PlaylistUpsert

ClearDescription clears the value of the "description" field.

func (*PlaylistUpsert) ClearThumbnailPath added in v1.2.4

func (u *PlaylistUpsert) ClearThumbnailPath() *PlaylistUpsert

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*PlaylistUpsert) SetDescription added in v1.2.4

func (u *PlaylistUpsert) SetDescription(v string) *PlaylistUpsert

SetDescription sets the "description" field.

func (*PlaylistUpsert) SetName added in v1.2.4

func (u *PlaylistUpsert) SetName(v string) *PlaylistUpsert

SetName sets the "name" field.

func (*PlaylistUpsert) SetThumbnailPath added in v1.2.4

func (u *PlaylistUpsert) SetThumbnailPath(v string) *PlaylistUpsert

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistUpsert) SetUpdatedAt added in v1.2.4

func (u *PlaylistUpsert) SetUpdatedAt(v time.Time) *PlaylistUpsert

SetUpdatedAt sets the "updated_at" field.

func (*PlaylistUpsert) UpdateDescription added in v1.2.4

func (u *PlaylistUpsert) UpdateDescription() *PlaylistUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*PlaylistUpsert) UpdateName added in v1.2.4

func (u *PlaylistUpsert) UpdateName() *PlaylistUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*PlaylistUpsert) UpdateThumbnailPath added in v1.2.4

func (u *PlaylistUpsert) UpdateThumbnailPath() *PlaylistUpsert

UpdateThumbnailPath sets the "thumbnail_path" field to the value that was provided on create.

func (*PlaylistUpsert) UpdateUpdatedAt added in v1.2.4

func (u *PlaylistUpsert) UpdateUpdatedAt() *PlaylistUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PlaylistUpsertBulk added in v1.2.4

type PlaylistUpsertBulk struct {
	// contains filtered or unexported fields
}

PlaylistUpsertBulk is the builder for "upsert"-ing a bulk of Playlist nodes.

func (*PlaylistUpsertBulk) ClearDescription added in v1.2.4

func (u *PlaylistUpsertBulk) ClearDescription() *PlaylistUpsertBulk

ClearDescription clears the value of the "description" field.

func (*PlaylistUpsertBulk) ClearThumbnailPath added in v1.2.4

func (u *PlaylistUpsertBulk) ClearThumbnailPath() *PlaylistUpsertBulk

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*PlaylistUpsertBulk) DoNothing added in v1.2.4

func (u *PlaylistUpsertBulk) DoNothing() *PlaylistUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PlaylistUpsertBulk) Exec added in v1.2.4

func (u *PlaylistUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaylistUpsertBulk) ExecX added in v1.2.4

func (u *PlaylistUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaylistUpsertBulk) Ignore added in v1.2.4

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Playlist.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*PlaylistUpsertBulk) SetDescription added in v1.2.4

func (u *PlaylistUpsertBulk) SetDescription(v string) *PlaylistUpsertBulk

SetDescription sets the "description" field.

func (*PlaylistUpsertBulk) SetName added in v1.2.4

SetName sets the "name" field.

func (*PlaylistUpsertBulk) SetThumbnailPath added in v1.2.4

func (u *PlaylistUpsertBulk) SetThumbnailPath(v string) *PlaylistUpsertBulk

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistUpsertBulk) SetUpdatedAt added in v1.2.4

func (u *PlaylistUpsertBulk) SetUpdatedAt(v time.Time) *PlaylistUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*PlaylistUpsertBulk) Update added in v1.2.4

func (u *PlaylistUpsertBulk) Update(set func(*PlaylistUpsert)) *PlaylistUpsertBulk

Update allows overriding fields `UPDATE` values. See the PlaylistCreateBulk.OnConflict documentation for more info.

func (*PlaylistUpsertBulk) UpdateDescription added in v1.2.4

func (u *PlaylistUpsertBulk) UpdateDescription() *PlaylistUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*PlaylistUpsertBulk) UpdateName added in v1.2.4

func (u *PlaylistUpsertBulk) UpdateName() *PlaylistUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*PlaylistUpsertBulk) UpdateNewValues added in v1.2.4

func (u *PlaylistUpsertBulk) UpdateNewValues() *PlaylistUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Playlist.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(playlist.FieldID)
		}),
	).
	Exec(ctx)

func (*PlaylistUpsertBulk) UpdateThumbnailPath added in v1.2.4

func (u *PlaylistUpsertBulk) UpdateThumbnailPath() *PlaylistUpsertBulk

UpdateThumbnailPath sets the "thumbnail_path" field to the value that was provided on create.

func (*PlaylistUpsertBulk) UpdateUpdatedAt added in v1.2.4

func (u *PlaylistUpsertBulk) UpdateUpdatedAt() *PlaylistUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type PlaylistUpsertOne added in v1.2.4

type PlaylistUpsertOne struct {
	// contains filtered or unexported fields
}

PlaylistUpsertOne is the builder for "upsert"-ing

one Playlist node.

func (*PlaylistUpsertOne) ClearDescription added in v1.2.4

func (u *PlaylistUpsertOne) ClearDescription() *PlaylistUpsertOne

ClearDescription clears the value of the "description" field.

func (*PlaylistUpsertOne) ClearThumbnailPath added in v1.2.4

func (u *PlaylistUpsertOne) ClearThumbnailPath() *PlaylistUpsertOne

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*PlaylistUpsertOne) DoNothing added in v1.2.4

func (u *PlaylistUpsertOne) DoNothing() *PlaylistUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PlaylistUpsertOne) Exec added in v1.2.4

func (u *PlaylistUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*PlaylistUpsertOne) ExecX added in v1.2.4

func (u *PlaylistUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PlaylistUpsertOne) ID added in v1.2.4

func (u *PlaylistUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PlaylistUpsertOne) IDX added in v1.2.4

IDX is like ID, but panics if an error occurs.

func (*PlaylistUpsertOne) Ignore added in v1.2.4

func (u *PlaylistUpsertOne) Ignore() *PlaylistUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Playlist.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PlaylistUpsertOne) SetDescription added in v1.2.4

func (u *PlaylistUpsertOne) SetDescription(v string) *PlaylistUpsertOne

SetDescription sets the "description" field.

func (*PlaylistUpsertOne) SetName added in v1.2.4

SetName sets the "name" field.

func (*PlaylistUpsertOne) SetThumbnailPath added in v1.2.4

func (u *PlaylistUpsertOne) SetThumbnailPath(v string) *PlaylistUpsertOne

SetThumbnailPath sets the "thumbnail_path" field.

func (*PlaylistUpsertOne) SetUpdatedAt added in v1.2.4

func (u *PlaylistUpsertOne) SetUpdatedAt(v time.Time) *PlaylistUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*PlaylistUpsertOne) Update added in v1.2.4

func (u *PlaylistUpsertOne) Update(set func(*PlaylistUpsert)) *PlaylistUpsertOne

Update allows overriding fields `UPDATE` values. See the PlaylistCreate.OnConflict documentation for more info.

func (*PlaylistUpsertOne) UpdateDescription added in v1.2.4

func (u *PlaylistUpsertOne) UpdateDescription() *PlaylistUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*PlaylistUpsertOne) UpdateName added in v1.2.4

func (u *PlaylistUpsertOne) UpdateName() *PlaylistUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*PlaylistUpsertOne) UpdateNewValues added in v1.2.4

func (u *PlaylistUpsertOne) UpdateNewValues() *PlaylistUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Playlist.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(playlist.FieldID)
		}),
	).
	Exec(ctx)

func (*PlaylistUpsertOne) UpdateThumbnailPath added in v1.2.4

func (u *PlaylistUpsertOne) UpdateThumbnailPath() *PlaylistUpsertOne

UpdateThumbnailPath sets the "thumbnail_path" field to the value that was provided on create.

func (*PlaylistUpsertOne) UpdateUpdatedAt added in v1.2.4

func (u *PlaylistUpsertOne) UpdateUpdatedAt() *PlaylistUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Playlists added in v1.0.0

type Playlists []*Playlist

Playlists is a parsable slice of Playlist.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier added in v1.1.7

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc added in v1.1.7

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 added in v1.2.4

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type Queue

type Queue struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// LiveArchive holds the value of the "live_archive" field.
	LiveArchive bool `json:"live_archive,omitempty"`
	// OnHold holds the value of the "on_hold" field.
	OnHold bool `json:"on_hold,omitempty"`
	// VideoProcessing holds the value of the "video_processing" field.
	VideoProcessing bool `json:"video_processing,omitempty"`
	// ChatProcessing holds the value of the "chat_processing" field.
	ChatProcessing bool `json:"chat_processing,omitempty"`
	// Processing holds the value of the "processing" field.
	Processing bool `json:"processing,omitempty"`
	// TaskVodCreateFolder holds the value of the "task_vod_create_folder" field.
	TaskVodCreateFolder utils.TaskStatus `json:"task_vod_create_folder,omitempty"`
	// TaskVodDownloadThumbnail holds the value of the "task_vod_download_thumbnail" field.
	TaskVodDownloadThumbnail utils.TaskStatus `json:"task_vod_download_thumbnail,omitempty"`
	// TaskVodSaveInfo holds the value of the "task_vod_save_info" field.
	TaskVodSaveInfo utils.TaskStatus `json:"task_vod_save_info,omitempty"`
	// TaskVideoDownload holds the value of the "task_video_download" field.
	TaskVideoDownload utils.TaskStatus `json:"task_video_download,omitempty"`
	// TaskVideoConvert holds the value of the "task_video_convert" field.
	TaskVideoConvert utils.TaskStatus `json:"task_video_convert,omitempty"`
	// TaskVideoMove holds the value of the "task_video_move" field.
	TaskVideoMove utils.TaskStatus `json:"task_video_move,omitempty"`
	// TaskChatDownload holds the value of the "task_chat_download" field.
	TaskChatDownload utils.TaskStatus `json:"task_chat_download,omitempty"`
	// TaskChatConvert holds the value of the "task_chat_convert" field.
	TaskChatConvert utils.TaskStatus `json:"task_chat_convert,omitempty"`
	// TaskChatRender holds the value of the "task_chat_render" field.
	TaskChatRender utils.TaskStatus `json:"task_chat_render,omitempty"`
	// TaskChatMove holds the value of the "task_chat_move" field.
	TaskChatMove utils.TaskStatus `json:"task_chat_move,omitempty"`
	// ChatStart holds the value of the "chat_start" field.
	ChatStart time.Time `json:"chat_start,omitempty"`
	// RenderChat holds the value of the "render_chat" field.
	RenderChat bool `json:"render_chat,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the QueueQuery when eager-loading is set.
	Edges QueueEdges `json:"edges"`
	// contains filtered or unexported fields
}

Queue is the model entity for the Queue schema.

func (*Queue) QueryVod

func (q *Queue) QueryVod() *VodQuery

QueryVod queries the "vod" edge of the Queue entity.

func (*Queue) String

func (q *Queue) String() string

String implements the fmt.Stringer.

func (*Queue) Unwrap

func (q *Queue) Unwrap() *Queue

Unwrap unwraps the Queue 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 (*Queue) Update

func (q *Queue) Update() *QueueUpdateOne

Update returns a builder for updating this Queue. Note that you need to call Queue.Unwrap() before calling this method if this Queue was returned from a transaction, and the transaction was committed or rolled back.

func (*Queue) Value added in v1.2.12

func (q *Queue) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Queue. This includes values selected through modifiers, order, etc.

type QueueClient

type QueueClient struct {
	// contains filtered or unexported fields
}

QueueClient is a client for the Queue schema.

func NewQueueClient

func NewQueueClient(c config) *QueueClient

NewQueueClient returns a client for the Queue from the given config.

func (*QueueClient) Create

func (c *QueueClient) Create() *QueueCreate

Create returns a builder for creating a Queue entity.

func (*QueueClient) CreateBulk

func (c *QueueClient) CreateBulk(builders ...*QueueCreate) *QueueCreateBulk

CreateBulk returns a builder for creating a bulk of Queue entities.

func (*QueueClient) Delete

func (c *QueueClient) Delete() *QueueDelete

Delete returns a delete builder for Queue.

func (*QueueClient) DeleteOne

func (c *QueueClient) DeleteOne(q *Queue) *QueueDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*QueueClient) DeleteOneID

func (c *QueueClient) DeleteOneID(id uuid.UUID) *QueueDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*QueueClient) Get

func (c *QueueClient) Get(ctx context.Context, id uuid.UUID) (*Queue, error)

Get returns a Queue entity by its id.

func (*QueueClient) GetX

func (c *QueueClient) GetX(ctx context.Context, id uuid.UUID) *Queue

GetX is like Get, but panics if an error occurs.

func (*QueueClient) Hooks

func (c *QueueClient) Hooks() []Hook

Hooks returns the client hooks.

func (*QueueClient) Intercept added in v1.1.7

func (c *QueueClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `queue.Intercept(f(g(h())))`.

func (*QueueClient) Interceptors added in v1.1.7

func (c *QueueClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*QueueClient) Query

func (c *QueueClient) Query() *QueueQuery

Query returns a query builder for Queue.

func (*QueueClient) QueryVod

func (c *QueueClient) QueryVod(q *Queue) *VodQuery

QueryVod queries the vod edge of a Queue.

func (*QueueClient) Update

func (c *QueueClient) Update() *QueueUpdate

Update returns an update builder for Queue.

func (*QueueClient) UpdateOne

func (c *QueueClient) UpdateOne(q *Queue) *QueueUpdateOne

UpdateOne returns an update builder for the given entity.

func (*QueueClient) UpdateOneID

func (c *QueueClient) UpdateOneID(id uuid.UUID) *QueueUpdateOne

UpdateOneID returns an update builder for the given id.

func (*QueueClient) Use

func (c *QueueClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `queue.Hooks(f(g(h())))`.

type QueueCreate

type QueueCreate struct {
	// contains filtered or unexported fields
}

QueueCreate is the builder for creating a Queue entity.

func (*QueueCreate) Exec

func (qc *QueueCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*QueueCreate) ExecX

func (qc *QueueCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QueueCreate) Mutation

func (qc *QueueCreate) Mutation() *QueueMutation

Mutation returns the QueueMutation object of the builder.

func (*QueueCreate) OnConflict added in v0.0.2

func (qc *QueueCreate) OnConflict(opts ...sql.ConflictOption) *QueueUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Queue.Create().
	SetLiveArchive(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.QueueUpsert) {
		SetLiveArchive(v+v).
	}).
	Exec(ctx)

func (*QueueCreate) OnConflictColumns added in v0.0.2

func (qc *QueueCreate) OnConflictColumns(columns ...string) *QueueUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Queue.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*QueueCreate) Save

func (qc *QueueCreate) Save(ctx context.Context) (*Queue, error)

Save creates the Queue in the database.

func (*QueueCreate) SaveX

func (qc *QueueCreate) SaveX(ctx context.Context) *Queue

SaveX calls Save and panics if Save returns an error.

func (*QueueCreate) SetChatProcessing

func (qc *QueueCreate) SetChatProcessing(b bool) *QueueCreate

SetChatProcessing sets the "chat_processing" field.

func (*QueueCreate) SetChatStart

func (qc *QueueCreate) SetChatStart(t time.Time) *QueueCreate

SetChatStart sets the "chat_start" field.

func (*QueueCreate) SetCreatedAt

func (qc *QueueCreate) SetCreatedAt(t time.Time) *QueueCreate

SetCreatedAt sets the "created_at" field.

func (*QueueCreate) SetID

func (qc *QueueCreate) SetID(u uuid.UUID) *QueueCreate

SetID sets the "id" field.

func (*QueueCreate) SetLiveArchive

func (qc *QueueCreate) SetLiveArchive(b bool) *QueueCreate

SetLiveArchive sets the "live_archive" field.

func (*QueueCreate) SetNillableChatProcessing

func (qc *QueueCreate) SetNillableChatProcessing(b *bool) *QueueCreate

SetNillableChatProcessing sets the "chat_processing" field if the given value is not nil.

func (*QueueCreate) SetNillableChatStart

func (qc *QueueCreate) SetNillableChatStart(t *time.Time) *QueueCreate

SetNillableChatStart sets the "chat_start" field if the given value is not nil.

func (*QueueCreate) SetNillableCreatedAt

func (qc *QueueCreate) SetNillableCreatedAt(t *time.Time) *QueueCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*QueueCreate) SetNillableID

func (qc *QueueCreate) SetNillableID(u *uuid.UUID) *QueueCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*QueueCreate) SetNillableLiveArchive

func (qc *QueueCreate) SetNillableLiveArchive(b *bool) *QueueCreate

SetNillableLiveArchive sets the "live_archive" field if the given value is not nil.

func (*QueueCreate) SetNillableOnHold

func (qc *QueueCreate) SetNillableOnHold(b *bool) *QueueCreate

SetNillableOnHold sets the "on_hold" field if the given value is not nil.

func (*QueueCreate) SetNillableProcessing

func (qc *QueueCreate) SetNillableProcessing(b *bool) *QueueCreate

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*QueueCreate) SetNillableRenderChat added in v1.1.7

func (qc *QueueCreate) SetNillableRenderChat(b *bool) *QueueCreate

SetNillableRenderChat sets the "render_chat" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskChatConvert

func (qc *QueueCreate) SetNillableTaskChatConvert(us *utils.TaskStatus) *QueueCreate

SetNillableTaskChatConvert sets the "task_chat_convert" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskChatDownload

func (qc *QueueCreate) SetNillableTaskChatDownload(us *utils.TaskStatus) *QueueCreate

SetNillableTaskChatDownload sets the "task_chat_download" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskChatMove

func (qc *QueueCreate) SetNillableTaskChatMove(us *utils.TaskStatus) *QueueCreate

SetNillableTaskChatMove sets the "task_chat_move" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskChatRender

func (qc *QueueCreate) SetNillableTaskChatRender(us *utils.TaskStatus) *QueueCreate

SetNillableTaskChatRender sets the "task_chat_render" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVideoConvert

func (qc *QueueCreate) SetNillableTaskVideoConvert(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVideoConvert sets the "task_video_convert" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVideoDownload

func (qc *QueueCreate) SetNillableTaskVideoDownload(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVideoDownload sets the "task_video_download" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVideoMove

func (qc *QueueCreate) SetNillableTaskVideoMove(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVideoMove sets the "task_video_move" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVodCreateFolder

func (qc *QueueCreate) SetNillableTaskVodCreateFolder(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVodCreateFolder sets the "task_vod_create_folder" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVodDownloadThumbnail

func (qc *QueueCreate) SetNillableTaskVodDownloadThumbnail(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field if the given value is not nil.

func (*QueueCreate) SetNillableTaskVodSaveInfo

func (qc *QueueCreate) SetNillableTaskVodSaveInfo(us *utils.TaskStatus) *QueueCreate

SetNillableTaskVodSaveInfo sets the "task_vod_save_info" field if the given value is not nil.

func (*QueueCreate) SetNillableUpdatedAt

func (qc *QueueCreate) SetNillableUpdatedAt(t *time.Time) *QueueCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*QueueCreate) SetNillableVideoProcessing

func (qc *QueueCreate) SetNillableVideoProcessing(b *bool) *QueueCreate

SetNillableVideoProcessing sets the "video_processing" field if the given value is not nil.

func (*QueueCreate) SetOnHold

func (qc *QueueCreate) SetOnHold(b bool) *QueueCreate

SetOnHold sets the "on_hold" field.

func (*QueueCreate) SetProcessing

func (qc *QueueCreate) SetProcessing(b bool) *QueueCreate

SetProcessing sets the "processing" field.

func (*QueueCreate) SetRenderChat added in v1.1.7

func (qc *QueueCreate) SetRenderChat(b bool) *QueueCreate

SetRenderChat sets the "render_chat" field.

func (*QueueCreate) SetTaskChatConvert

func (qc *QueueCreate) SetTaskChatConvert(us utils.TaskStatus) *QueueCreate

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueCreate) SetTaskChatDownload

func (qc *QueueCreate) SetTaskChatDownload(us utils.TaskStatus) *QueueCreate

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueCreate) SetTaskChatMove

func (qc *QueueCreate) SetTaskChatMove(us utils.TaskStatus) *QueueCreate

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueCreate) SetTaskChatRender

func (qc *QueueCreate) SetTaskChatRender(us utils.TaskStatus) *QueueCreate

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueCreate) SetTaskVideoConvert

func (qc *QueueCreate) SetTaskVideoConvert(us utils.TaskStatus) *QueueCreate

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueCreate) SetTaskVideoDownload

func (qc *QueueCreate) SetTaskVideoDownload(us utils.TaskStatus) *QueueCreate

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueCreate) SetTaskVideoMove

func (qc *QueueCreate) SetTaskVideoMove(us utils.TaskStatus) *QueueCreate

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueCreate) SetTaskVodCreateFolder

func (qc *QueueCreate) SetTaskVodCreateFolder(us utils.TaskStatus) *QueueCreate

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueCreate) SetTaskVodDownloadThumbnail

func (qc *QueueCreate) SetTaskVodDownloadThumbnail(us utils.TaskStatus) *QueueCreate

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueCreate) SetTaskVodSaveInfo

func (qc *QueueCreate) SetTaskVodSaveInfo(us utils.TaskStatus) *QueueCreate

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueCreate) SetUpdatedAt

func (qc *QueueCreate) SetUpdatedAt(t time.Time) *QueueCreate

SetUpdatedAt sets the "updated_at" field.

func (*QueueCreate) SetVideoProcessing

func (qc *QueueCreate) SetVideoProcessing(b bool) *QueueCreate

SetVideoProcessing sets the "video_processing" field.

func (*QueueCreate) SetVod

func (qc *QueueCreate) SetVod(v *Vod) *QueueCreate

SetVod sets the "vod" edge to the Vod entity.

func (*QueueCreate) SetVodID

func (qc *QueueCreate) SetVodID(id uuid.UUID) *QueueCreate

SetVodID sets the "vod" edge to the Vod entity by ID.

type QueueCreateBulk

type QueueCreateBulk struct {
	// contains filtered or unexported fields
}

QueueCreateBulk is the builder for creating many Queue entities in bulk.

func (*QueueCreateBulk) Exec

func (qcb *QueueCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*QueueCreateBulk) ExecX

func (qcb *QueueCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QueueCreateBulk) OnConflict added in v0.0.2

func (qcb *QueueCreateBulk) OnConflict(opts ...sql.ConflictOption) *QueueUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Queue.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.QueueUpsert) {
		SetLiveArchive(v+v).
	}).
	Exec(ctx)

func (*QueueCreateBulk) OnConflictColumns added in v0.0.2

func (qcb *QueueCreateBulk) OnConflictColumns(columns ...string) *QueueUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Queue.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*QueueCreateBulk) Save

func (qcb *QueueCreateBulk) Save(ctx context.Context) ([]*Queue, error)

Save creates the Queue entities in the database.

func (*QueueCreateBulk) SaveX

func (qcb *QueueCreateBulk) SaveX(ctx context.Context) []*Queue

SaveX is like Save, but panics if an error occurs.

type QueueDelete

type QueueDelete struct {
	// contains filtered or unexported fields
}

QueueDelete is the builder for deleting a Queue entity.

func (*QueueDelete) Exec

func (qd *QueueDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*QueueDelete) ExecX

func (qd *QueueDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*QueueDelete) Where

func (qd *QueueDelete) Where(ps ...predicate.Queue) *QueueDelete

Where appends a list predicates to the QueueDelete builder.

type QueueDeleteOne

type QueueDeleteOne struct {
	// contains filtered or unexported fields
}

QueueDeleteOne is the builder for deleting a single Queue entity.

func (*QueueDeleteOne) Exec

func (qdo *QueueDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*QueueDeleteOne) ExecX

func (qdo *QueueDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QueueDeleteOne) Where added in v1.2.4

func (qdo *QueueDeleteOne) Where(ps ...predicate.Queue) *QueueDeleteOne

Where appends a list predicates to the QueueDelete builder.

type QueueEdges

type QueueEdges struct {
	// Vod holds the value of the vod edge.
	Vod *Vod `json:"vod,omitempty"`
	// contains filtered or unexported fields
}

QueueEdges holds the relations/edges for other nodes in the graph.

func (QueueEdges) VodOrErr

func (e QueueEdges) VodOrErr() (*Vod, error)

VodOrErr returns the Vod value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type QueueGroupBy

type QueueGroupBy struct {
	// contains filtered or unexported fields
}

QueueGroupBy is the group-by builder for Queue entities.

func (*QueueGroupBy) Aggregate

func (qgb *QueueGroupBy) Aggregate(fns ...AggregateFunc) *QueueGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*QueueGroupBy) Bool

func (s *QueueGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*QueueGroupBy) BoolX

func (s *QueueGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*QueueGroupBy) Bools

func (s *QueueGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*QueueGroupBy) BoolsX

func (s *QueueGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*QueueGroupBy) Float64

func (s *QueueGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*QueueGroupBy) Float64X

func (s *QueueGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*QueueGroupBy) Float64s

func (s *QueueGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*QueueGroupBy) Float64sX

func (s *QueueGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*QueueGroupBy) Int

func (s *QueueGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*QueueGroupBy) IntX

func (s *QueueGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*QueueGroupBy) Ints

func (s *QueueGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*QueueGroupBy) IntsX

func (s *QueueGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*QueueGroupBy) Scan

func (qgb *QueueGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*QueueGroupBy) ScanX

func (s *QueueGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*QueueGroupBy) String

func (s *QueueGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*QueueGroupBy) StringX

func (s *QueueGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*QueueGroupBy) Strings

func (s *QueueGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*QueueGroupBy) StringsX

func (s *QueueGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type QueueMutation

type QueueMutation struct {
	// contains filtered or unexported fields
}

QueueMutation represents an operation that mutates the Queue nodes in the graph.

func (*QueueMutation) AddField

func (m *QueueMutation) 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 (*QueueMutation) AddedEdges

func (m *QueueMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*QueueMutation) AddedField

func (m *QueueMutation) 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 (*QueueMutation) AddedFields

func (m *QueueMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*QueueMutation) AddedIDs

func (m *QueueMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*QueueMutation) ChatProcessing

func (m *QueueMutation) ChatProcessing() (r bool, exists bool)

ChatProcessing returns the value of the "chat_processing" field in the mutation.

func (*QueueMutation) ChatStart

func (m *QueueMutation) ChatStart() (r time.Time, exists bool)

ChatStart returns the value of the "chat_start" field in the mutation.

func (*QueueMutation) ChatStartCleared

func (m *QueueMutation) ChatStartCleared() bool

ChatStartCleared returns if the "chat_start" field was cleared in this mutation.

func (*QueueMutation) ClearChatStart

func (m *QueueMutation) ClearChatStart()

ClearChatStart clears the value of the "chat_start" field.

func (*QueueMutation) ClearEdge

func (m *QueueMutation) 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 (*QueueMutation) ClearField

func (m *QueueMutation) 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 (*QueueMutation) ClearRenderChat added in v1.1.7

func (m *QueueMutation) ClearRenderChat()

ClearRenderChat clears the value of the "render_chat" field.

func (*QueueMutation) ClearTaskChatConvert

func (m *QueueMutation) ClearTaskChatConvert()

ClearTaskChatConvert clears the value of the "task_chat_convert" field.

func (*QueueMutation) ClearTaskChatDownload

func (m *QueueMutation) ClearTaskChatDownload()

ClearTaskChatDownload clears the value of the "task_chat_download" field.

func (*QueueMutation) ClearTaskChatMove

func (m *QueueMutation) ClearTaskChatMove()

ClearTaskChatMove clears the value of the "task_chat_move" field.

func (*QueueMutation) ClearTaskChatRender

func (m *QueueMutation) ClearTaskChatRender()

ClearTaskChatRender clears the value of the "task_chat_render" field.

func (*QueueMutation) ClearTaskVideoConvert

func (m *QueueMutation) ClearTaskVideoConvert()

ClearTaskVideoConvert clears the value of the "task_video_convert" field.

func (*QueueMutation) ClearTaskVideoDownload

func (m *QueueMutation) ClearTaskVideoDownload()

ClearTaskVideoDownload clears the value of the "task_video_download" field.

func (*QueueMutation) ClearTaskVideoMove

func (m *QueueMutation) ClearTaskVideoMove()

ClearTaskVideoMove clears the value of the "task_video_move" field.

func (*QueueMutation) ClearTaskVodCreateFolder

func (m *QueueMutation) ClearTaskVodCreateFolder()

ClearTaskVodCreateFolder clears the value of the "task_vod_create_folder" field.

func (*QueueMutation) ClearTaskVodDownloadThumbnail

func (m *QueueMutation) ClearTaskVodDownloadThumbnail()

ClearTaskVodDownloadThumbnail clears the value of the "task_vod_download_thumbnail" field.

func (*QueueMutation) ClearTaskVodSaveInfo

func (m *QueueMutation) ClearTaskVodSaveInfo()

ClearTaskVodSaveInfo clears the value of the "task_vod_save_info" field.

func (*QueueMutation) ClearVod

func (m *QueueMutation) ClearVod()

ClearVod clears the "vod" edge to the Vod entity.

func (*QueueMutation) ClearedEdges

func (m *QueueMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*QueueMutation) ClearedFields

func (m *QueueMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (QueueMutation) Client

func (m QueueMutation) 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 (*QueueMutation) CreatedAt

func (m *QueueMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*QueueMutation) EdgeCleared

func (m *QueueMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*QueueMutation) Field

func (m *QueueMutation) 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 (*QueueMutation) FieldCleared

func (m *QueueMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*QueueMutation) Fields

func (m *QueueMutation) 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 (*QueueMutation) ID

func (m *QueueMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*QueueMutation) IDs

func (m *QueueMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*QueueMutation) LiveArchive

func (m *QueueMutation) LiveArchive() (r bool, exists bool)

LiveArchive returns the value of the "live_archive" field in the mutation.

func (*QueueMutation) OldChatProcessing

func (m *QueueMutation) OldChatProcessing(ctx context.Context) (v bool, err error)

OldChatProcessing returns the old "chat_processing" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldChatStart

func (m *QueueMutation) OldChatStart(ctx context.Context) (v time.Time, err error)

OldChatStart returns the old "chat_start" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldCreatedAt

func (m *QueueMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldField

func (m *QueueMutation) 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 (*QueueMutation) OldLiveArchive

func (m *QueueMutation) OldLiveArchive(ctx context.Context) (v bool, err error)

OldLiveArchive returns the old "live_archive" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldOnHold

func (m *QueueMutation) OldOnHold(ctx context.Context) (v bool, err error)

OldOnHold returns the old "on_hold" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldProcessing

func (m *QueueMutation) OldProcessing(ctx context.Context) (v bool, err error)

OldProcessing returns the old "processing" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldRenderChat added in v1.1.7

func (m *QueueMutation) OldRenderChat(ctx context.Context) (v bool, err error)

OldRenderChat returns the old "render_chat" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldTaskChatConvert

func (m *QueueMutation) OldTaskChatConvert(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskChatConvert returns the old "task_chat_convert" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldTaskChatDownload

func (m *QueueMutation) OldTaskChatDownload(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskChatDownload returns the old "task_chat_download" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldTaskChatMove

func (m *QueueMutation) OldTaskChatMove(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskChatMove returns the old "task_chat_move" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldTaskChatRender

func (m *QueueMutation) OldTaskChatRender(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskChatRender returns the old "task_chat_render" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldTaskVideoConvert

func (m *QueueMutation) OldTaskVideoConvert(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVideoConvert returns the old "task_video_convert" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldTaskVideoDownload

func (m *QueueMutation) OldTaskVideoDownload(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVideoDownload returns the old "task_video_download" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldTaskVideoMove

func (m *QueueMutation) OldTaskVideoMove(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVideoMove returns the old "task_video_move" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldTaskVodCreateFolder

func (m *QueueMutation) OldTaskVodCreateFolder(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVodCreateFolder returns the old "task_vod_create_folder" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldTaskVodDownloadThumbnail

func (m *QueueMutation) OldTaskVodDownloadThumbnail(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVodDownloadThumbnail returns the old "task_vod_download_thumbnail" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldTaskVodSaveInfo

func (m *QueueMutation) OldTaskVodSaveInfo(ctx context.Context) (v utils.TaskStatus, err error)

OldTaskVodSaveInfo returns the old "task_vod_save_info" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldUpdatedAt

func (m *QueueMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OldVideoProcessing

func (m *QueueMutation) OldVideoProcessing(ctx context.Context) (v bool, err error)

OldVideoProcessing returns the old "video_processing" field's value of the Queue entity. If the Queue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*QueueMutation) OnHold

func (m *QueueMutation) OnHold() (r bool, exists bool)

OnHold returns the value of the "on_hold" field in the mutation.

func (*QueueMutation) Op

func (m *QueueMutation) Op() Op

Op returns the operation name.

func (*QueueMutation) Processing

func (m *QueueMutation) Processing() (r bool, exists bool)

Processing returns the value of the "processing" field in the mutation.

func (*QueueMutation) RemovedEdges

func (m *QueueMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*QueueMutation) RemovedIDs

func (m *QueueMutation) 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 (*QueueMutation) RenderChat added in v1.1.7

func (m *QueueMutation) RenderChat() (r bool, exists bool)

RenderChat returns the value of the "render_chat" field in the mutation.

func (*QueueMutation) RenderChatCleared added in v1.1.7

func (m *QueueMutation) RenderChatCleared() bool

RenderChatCleared returns if the "render_chat" field was cleared in this mutation.

func (*QueueMutation) ResetChatProcessing

func (m *QueueMutation) ResetChatProcessing()

ResetChatProcessing resets all changes to the "chat_processing" field.

func (*QueueMutation) ResetChatStart

func (m *QueueMutation) ResetChatStart()

ResetChatStart resets all changes to the "chat_start" field.

func (*QueueMutation) ResetCreatedAt

func (m *QueueMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*QueueMutation) ResetEdge

func (m *QueueMutation) 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 (*QueueMutation) ResetField

func (m *QueueMutation) 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 (*QueueMutation) ResetLiveArchive

func (m *QueueMutation) ResetLiveArchive()

ResetLiveArchive resets all changes to the "live_archive" field.

func (*QueueMutation) ResetOnHold

func (m *QueueMutation) ResetOnHold()

ResetOnHold resets all changes to the "on_hold" field.

func (*QueueMutation) ResetProcessing

func (m *QueueMutation) ResetProcessing()

ResetProcessing resets all changes to the "processing" field.

func (*QueueMutation) ResetRenderChat added in v1.1.7

func (m *QueueMutation) ResetRenderChat()

ResetRenderChat resets all changes to the "render_chat" field.

func (*QueueMutation) ResetTaskChatConvert

func (m *QueueMutation) ResetTaskChatConvert()

ResetTaskChatConvert resets all changes to the "task_chat_convert" field.

func (*QueueMutation) ResetTaskChatDownload

func (m *QueueMutation) ResetTaskChatDownload()

ResetTaskChatDownload resets all changes to the "task_chat_download" field.

func (*QueueMutation) ResetTaskChatMove

func (m *QueueMutation) ResetTaskChatMove()

ResetTaskChatMove resets all changes to the "task_chat_move" field.

func (*QueueMutation) ResetTaskChatRender

func (m *QueueMutation) ResetTaskChatRender()

ResetTaskChatRender resets all changes to the "task_chat_render" field.

func (*QueueMutation) ResetTaskVideoConvert

func (m *QueueMutation) ResetTaskVideoConvert()

ResetTaskVideoConvert resets all changes to the "task_video_convert" field.

func (*QueueMutation) ResetTaskVideoDownload

func (m *QueueMutation) ResetTaskVideoDownload()

ResetTaskVideoDownload resets all changes to the "task_video_download" field.

func (*QueueMutation) ResetTaskVideoMove

func (m *QueueMutation) ResetTaskVideoMove()

ResetTaskVideoMove resets all changes to the "task_video_move" field.

func (*QueueMutation) ResetTaskVodCreateFolder

func (m *QueueMutation) ResetTaskVodCreateFolder()

ResetTaskVodCreateFolder resets all changes to the "task_vod_create_folder" field.

func (*QueueMutation) ResetTaskVodDownloadThumbnail

func (m *QueueMutation) ResetTaskVodDownloadThumbnail()

ResetTaskVodDownloadThumbnail resets all changes to the "task_vod_download_thumbnail" field.

func (*QueueMutation) ResetTaskVodSaveInfo

func (m *QueueMutation) ResetTaskVodSaveInfo()

ResetTaskVodSaveInfo resets all changes to the "task_vod_save_info" field.

func (*QueueMutation) ResetUpdatedAt

func (m *QueueMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*QueueMutation) ResetVideoProcessing

func (m *QueueMutation) ResetVideoProcessing()

ResetVideoProcessing resets all changes to the "video_processing" field.

func (*QueueMutation) ResetVod

func (m *QueueMutation) ResetVod()

ResetVod resets all changes to the "vod" edge.

func (*QueueMutation) SetChatProcessing

func (m *QueueMutation) SetChatProcessing(b bool)

SetChatProcessing sets the "chat_processing" field.

func (*QueueMutation) SetChatStart

func (m *QueueMutation) SetChatStart(t time.Time)

SetChatStart sets the "chat_start" field.

func (*QueueMutation) SetCreatedAt

func (m *QueueMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*QueueMutation) SetField

func (m *QueueMutation) 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 (*QueueMutation) SetID

func (m *QueueMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Queue entities.

func (*QueueMutation) SetLiveArchive

func (m *QueueMutation) SetLiveArchive(b bool)

SetLiveArchive sets the "live_archive" field.

func (*QueueMutation) SetOnHold

func (m *QueueMutation) SetOnHold(b bool)

SetOnHold sets the "on_hold" field.

func (*QueueMutation) SetOp added in v1.1.7

func (m *QueueMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*QueueMutation) SetProcessing

func (m *QueueMutation) SetProcessing(b bool)

SetProcessing sets the "processing" field.

func (*QueueMutation) SetRenderChat added in v1.1.7

func (m *QueueMutation) SetRenderChat(b bool)

SetRenderChat sets the "render_chat" field.

func (*QueueMutation) SetTaskChatConvert

func (m *QueueMutation) SetTaskChatConvert(us utils.TaskStatus)

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueMutation) SetTaskChatDownload

func (m *QueueMutation) SetTaskChatDownload(us utils.TaskStatus)

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueMutation) SetTaskChatMove

func (m *QueueMutation) SetTaskChatMove(us utils.TaskStatus)

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueMutation) SetTaskChatRender

func (m *QueueMutation) SetTaskChatRender(us utils.TaskStatus)

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueMutation) SetTaskVideoConvert

func (m *QueueMutation) SetTaskVideoConvert(us utils.TaskStatus)

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueMutation) SetTaskVideoDownload

func (m *QueueMutation) SetTaskVideoDownload(us utils.TaskStatus)

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueMutation) SetTaskVideoMove

func (m *QueueMutation) SetTaskVideoMove(us utils.TaskStatus)

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueMutation) SetTaskVodCreateFolder

func (m *QueueMutation) SetTaskVodCreateFolder(us utils.TaskStatus)

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueMutation) SetTaskVodDownloadThumbnail

func (m *QueueMutation) SetTaskVodDownloadThumbnail(us utils.TaskStatus)

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueMutation) SetTaskVodSaveInfo

func (m *QueueMutation) SetTaskVodSaveInfo(us utils.TaskStatus)

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueMutation) SetUpdatedAt

func (m *QueueMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*QueueMutation) SetVideoProcessing

func (m *QueueMutation) SetVideoProcessing(b bool)

SetVideoProcessing sets the "video_processing" field.

func (*QueueMutation) SetVodID

func (m *QueueMutation) SetVodID(id uuid.UUID)

SetVodID sets the "vod" edge to the Vod entity by id.

func (*QueueMutation) TaskChatConvert

func (m *QueueMutation) TaskChatConvert() (r utils.TaskStatus, exists bool)

TaskChatConvert returns the value of the "task_chat_convert" field in the mutation.

func (*QueueMutation) TaskChatConvertCleared

func (m *QueueMutation) TaskChatConvertCleared() bool

TaskChatConvertCleared returns if the "task_chat_convert" field was cleared in this mutation.

func (*QueueMutation) TaskChatDownload

func (m *QueueMutation) TaskChatDownload() (r utils.TaskStatus, exists bool)

TaskChatDownload returns the value of the "task_chat_download" field in the mutation.

func (*QueueMutation) TaskChatDownloadCleared

func (m *QueueMutation) TaskChatDownloadCleared() bool

TaskChatDownloadCleared returns if the "task_chat_download" field was cleared in this mutation.

func (*QueueMutation) TaskChatMove

func (m *QueueMutation) TaskChatMove() (r utils.TaskStatus, exists bool)

TaskChatMove returns the value of the "task_chat_move" field in the mutation.

func (*QueueMutation) TaskChatMoveCleared

func (m *QueueMutation) TaskChatMoveCleared() bool

TaskChatMoveCleared returns if the "task_chat_move" field was cleared in this mutation.

func (*QueueMutation) TaskChatRender

func (m *QueueMutation) TaskChatRender() (r utils.TaskStatus, exists bool)

TaskChatRender returns the value of the "task_chat_render" field in the mutation.

func (*QueueMutation) TaskChatRenderCleared

func (m *QueueMutation) TaskChatRenderCleared() bool

TaskChatRenderCleared returns if the "task_chat_render" field was cleared in this mutation.

func (*QueueMutation) TaskVideoConvert

func (m *QueueMutation) TaskVideoConvert() (r utils.TaskStatus, exists bool)

TaskVideoConvert returns the value of the "task_video_convert" field in the mutation.

func (*QueueMutation) TaskVideoConvertCleared

func (m *QueueMutation) TaskVideoConvertCleared() bool

TaskVideoConvertCleared returns if the "task_video_convert" field was cleared in this mutation.

func (*QueueMutation) TaskVideoDownload

func (m *QueueMutation) TaskVideoDownload() (r utils.TaskStatus, exists bool)

TaskVideoDownload returns the value of the "task_video_download" field in the mutation.

func (*QueueMutation) TaskVideoDownloadCleared

func (m *QueueMutation) TaskVideoDownloadCleared() bool

TaskVideoDownloadCleared returns if the "task_video_download" field was cleared in this mutation.

func (*QueueMutation) TaskVideoMove

func (m *QueueMutation) TaskVideoMove() (r utils.TaskStatus, exists bool)

TaskVideoMove returns the value of the "task_video_move" field in the mutation.

func (*QueueMutation) TaskVideoMoveCleared

func (m *QueueMutation) TaskVideoMoveCleared() bool

TaskVideoMoveCleared returns if the "task_video_move" field was cleared in this mutation.

func (*QueueMutation) TaskVodCreateFolder

func (m *QueueMutation) TaskVodCreateFolder() (r utils.TaskStatus, exists bool)

TaskVodCreateFolder returns the value of the "task_vod_create_folder" field in the mutation.

func (*QueueMutation) TaskVodCreateFolderCleared

func (m *QueueMutation) TaskVodCreateFolderCleared() bool

TaskVodCreateFolderCleared returns if the "task_vod_create_folder" field was cleared in this mutation.

func (*QueueMutation) TaskVodDownloadThumbnail

func (m *QueueMutation) TaskVodDownloadThumbnail() (r utils.TaskStatus, exists bool)

TaskVodDownloadThumbnail returns the value of the "task_vod_download_thumbnail" field in the mutation.

func (*QueueMutation) TaskVodDownloadThumbnailCleared

func (m *QueueMutation) TaskVodDownloadThumbnailCleared() bool

TaskVodDownloadThumbnailCleared returns if the "task_vod_download_thumbnail" field was cleared in this mutation.

func (*QueueMutation) TaskVodSaveInfo

func (m *QueueMutation) TaskVodSaveInfo() (r utils.TaskStatus, exists bool)

TaskVodSaveInfo returns the value of the "task_vod_save_info" field in the mutation.

func (*QueueMutation) TaskVodSaveInfoCleared

func (m *QueueMutation) TaskVodSaveInfoCleared() bool

TaskVodSaveInfoCleared returns if the "task_vod_save_info" field was cleared in this mutation.

func (QueueMutation) Tx

func (m QueueMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*QueueMutation) Type

func (m *QueueMutation) Type() string

Type returns the node type of this mutation (Queue).

func (*QueueMutation) UpdatedAt

func (m *QueueMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*QueueMutation) VideoProcessing

func (m *QueueMutation) VideoProcessing() (r bool, exists bool)

VideoProcessing returns the value of the "video_processing" field in the mutation.

func (*QueueMutation) VodCleared

func (m *QueueMutation) VodCleared() bool

VodCleared reports if the "vod" edge to the Vod entity was cleared.

func (*QueueMutation) VodID

func (m *QueueMutation) VodID() (id uuid.UUID, exists bool)

VodID returns the "vod" edge ID in the mutation.

func (*QueueMutation) VodIDs

func (m *QueueMutation) VodIDs() (ids []uuid.UUID)

VodIDs returns the "vod" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VodID instead. It exists only for internal usage by the builders.

func (*QueueMutation) Where

func (m *QueueMutation) Where(ps ...predicate.Queue)

Where appends a list predicates to the QueueMutation builder.

func (*QueueMutation) WhereP added in v1.1.7

func (m *QueueMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the QueueMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type QueueQuery

type QueueQuery struct {
	// contains filtered or unexported fields
}

QueueQuery is the builder for querying Queue entities.

func (*QueueQuery) Aggregate added in v1.1.7

func (qq *QueueQuery) Aggregate(fns ...AggregateFunc) *QueueSelect

Aggregate returns a QueueSelect configured with the given aggregations.

func (*QueueQuery) All

func (qq *QueueQuery) All(ctx context.Context) ([]*Queue, error)

All executes the query and returns a list of Queues.

func (*QueueQuery) AllX

func (qq *QueueQuery) AllX(ctx context.Context) []*Queue

AllX is like All, but panics if an error occurs.

func (*QueueQuery) Clone

func (qq *QueueQuery) Clone() *QueueQuery

Clone returns a duplicate of the QueueQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*QueueQuery) Count

func (qq *QueueQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*QueueQuery) CountX

func (qq *QueueQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*QueueQuery) Exist

func (qq *QueueQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*QueueQuery) ExistX

func (qq *QueueQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*QueueQuery) First

func (qq *QueueQuery) First(ctx context.Context) (*Queue, error)

First returns the first Queue entity from the query. Returns a *NotFoundError when no Queue was found.

func (*QueueQuery) FirstID

func (qq *QueueQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Queue ID from the query. Returns a *NotFoundError when no Queue ID was found.

func (*QueueQuery) FirstIDX

func (qq *QueueQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*QueueQuery) FirstX

func (qq *QueueQuery) FirstX(ctx context.Context) *Queue

FirstX is like First, but panics if an error occurs.

func (*QueueQuery) GroupBy

func (qq *QueueQuery) GroupBy(field string, fields ...string) *QueueGroupBy

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 {
	LiveArchive bool `json:"live_archive,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Queue.Query().
	GroupBy(queue.FieldLiveArchive).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*QueueQuery) IDs

func (qq *QueueQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Queue IDs.

func (*QueueQuery) IDsX

func (qq *QueueQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*QueueQuery) Limit

func (qq *QueueQuery) Limit(limit int) *QueueQuery

Limit the number of records to be returned by this query.

func (*QueueQuery) Offset

func (qq *QueueQuery) Offset(offset int) *QueueQuery

Offset to start from.

func (*QueueQuery) Only

func (qq *QueueQuery) Only(ctx context.Context) (*Queue, error)

Only returns a single Queue entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Queue entity is found. Returns a *NotFoundError when no Queue entities are found.

func (*QueueQuery) OnlyID

func (qq *QueueQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Queue ID in the query. Returns a *NotSingularError when more than one Queue ID is found. Returns a *NotFoundError when no entities are found.

func (*QueueQuery) OnlyIDX

func (qq *QueueQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*QueueQuery) OnlyX

func (qq *QueueQuery) OnlyX(ctx context.Context) *Queue

OnlyX is like Only, but panics if an error occurs.

func (*QueueQuery) Order

func (qq *QueueQuery) Order(o ...queue.OrderOption) *QueueQuery

Order specifies how the records should be ordered.

func (*QueueQuery) QueryVod

func (qq *QueueQuery) QueryVod() *VodQuery

QueryVod chains the current query on the "vod" edge.

func (*QueueQuery) Select

func (qq *QueueQuery) Select(fields ...string) *QueueSelect

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 {
	LiveArchive bool `json:"live_archive,omitempty"`
}

client.Queue.Query().
	Select(queue.FieldLiveArchive).
	Scan(ctx, &v)

func (*QueueQuery) Unique

func (qq *QueueQuery) Unique(unique bool) *QueueQuery

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 (*QueueQuery) Where

func (qq *QueueQuery) Where(ps ...predicate.Queue) *QueueQuery

Where adds a new predicate for the QueueQuery builder.

func (*QueueQuery) WithVod

func (qq *QueueQuery) WithVod(opts ...func(*VodQuery)) *QueueQuery

WithVod tells the query-builder to eager-load the nodes that are connected to the "vod" edge. The optional arguments are used to configure the query builder of the edge.

type QueueSelect

type QueueSelect struct {
	*QueueQuery
	// contains filtered or unexported fields
}

QueueSelect is the builder for selecting fields of Queue entities.

func (*QueueSelect) Aggregate added in v1.1.7

func (qs *QueueSelect) Aggregate(fns ...AggregateFunc) *QueueSelect

Aggregate adds the given aggregation functions to the selector query.

func (*QueueSelect) Bool

func (s *QueueSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*QueueSelect) BoolX

func (s *QueueSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*QueueSelect) Bools

func (s *QueueSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*QueueSelect) BoolsX

func (s *QueueSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*QueueSelect) Float64

func (s *QueueSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*QueueSelect) Float64X

func (s *QueueSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*QueueSelect) Float64s

func (s *QueueSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*QueueSelect) Float64sX

func (s *QueueSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*QueueSelect) Int

func (s *QueueSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*QueueSelect) IntX

func (s *QueueSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*QueueSelect) Ints

func (s *QueueSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*QueueSelect) IntsX

func (s *QueueSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*QueueSelect) Scan

func (qs *QueueSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*QueueSelect) ScanX

func (s *QueueSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*QueueSelect) String

func (s *QueueSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*QueueSelect) StringX

func (s *QueueSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*QueueSelect) Strings

func (s *QueueSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*QueueSelect) StringsX

func (s *QueueSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type QueueUpdate

type QueueUpdate struct {
	// contains filtered or unexported fields
}

QueueUpdate is the builder for updating Queue entities.

func (*QueueUpdate) ClearChatStart

func (qu *QueueUpdate) ClearChatStart() *QueueUpdate

ClearChatStart clears the value of the "chat_start" field.

func (*QueueUpdate) ClearRenderChat added in v1.1.7

func (qu *QueueUpdate) ClearRenderChat() *QueueUpdate

ClearRenderChat clears the value of the "render_chat" field.

func (*QueueUpdate) ClearTaskChatConvert

func (qu *QueueUpdate) ClearTaskChatConvert() *QueueUpdate

ClearTaskChatConvert clears the value of the "task_chat_convert" field.

func (*QueueUpdate) ClearTaskChatDownload

func (qu *QueueUpdate) ClearTaskChatDownload() *QueueUpdate

ClearTaskChatDownload clears the value of the "task_chat_download" field.

func (*QueueUpdate) ClearTaskChatMove

func (qu *QueueUpdate) ClearTaskChatMove() *QueueUpdate

ClearTaskChatMove clears the value of the "task_chat_move" field.

func (*QueueUpdate) ClearTaskChatRender

func (qu *QueueUpdate) ClearTaskChatRender() *QueueUpdate

ClearTaskChatRender clears the value of the "task_chat_render" field.

func (*QueueUpdate) ClearTaskVideoConvert

func (qu *QueueUpdate) ClearTaskVideoConvert() *QueueUpdate

ClearTaskVideoConvert clears the value of the "task_video_convert" field.

func (*QueueUpdate) ClearTaskVideoDownload

func (qu *QueueUpdate) ClearTaskVideoDownload() *QueueUpdate

ClearTaskVideoDownload clears the value of the "task_video_download" field.

func (*QueueUpdate) ClearTaskVideoMove

func (qu *QueueUpdate) ClearTaskVideoMove() *QueueUpdate

ClearTaskVideoMove clears the value of the "task_video_move" field.

func (*QueueUpdate) ClearTaskVodCreateFolder

func (qu *QueueUpdate) ClearTaskVodCreateFolder() *QueueUpdate

ClearTaskVodCreateFolder clears the value of the "task_vod_create_folder" field.

func (*QueueUpdate) ClearTaskVodDownloadThumbnail

func (qu *QueueUpdate) ClearTaskVodDownloadThumbnail() *QueueUpdate

ClearTaskVodDownloadThumbnail clears the value of the "task_vod_download_thumbnail" field.

func (*QueueUpdate) ClearTaskVodSaveInfo

func (qu *QueueUpdate) ClearTaskVodSaveInfo() *QueueUpdate

ClearTaskVodSaveInfo clears the value of the "task_vod_save_info" field.

func (*QueueUpdate) ClearVod

func (qu *QueueUpdate) ClearVod() *QueueUpdate

ClearVod clears the "vod" edge to the Vod entity.

func (*QueueUpdate) Exec

func (qu *QueueUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*QueueUpdate) ExecX

func (qu *QueueUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QueueUpdate) Mutation

func (qu *QueueUpdate) Mutation() *QueueMutation

Mutation returns the QueueMutation object of the builder.

func (*QueueUpdate) Save

func (qu *QueueUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*QueueUpdate) SaveX

func (qu *QueueUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*QueueUpdate) SetChatProcessing

func (qu *QueueUpdate) SetChatProcessing(b bool) *QueueUpdate

SetChatProcessing sets the "chat_processing" field.

func (*QueueUpdate) SetChatStart

func (qu *QueueUpdate) SetChatStart(t time.Time) *QueueUpdate

SetChatStart sets the "chat_start" field.

func (*QueueUpdate) SetLiveArchive

func (qu *QueueUpdate) SetLiveArchive(b bool) *QueueUpdate

SetLiveArchive sets the "live_archive" field.

func (*QueueUpdate) SetNillableChatProcessing

func (qu *QueueUpdate) SetNillableChatProcessing(b *bool) *QueueUpdate

SetNillableChatProcessing sets the "chat_processing" field if the given value is not nil.

func (*QueueUpdate) SetNillableChatStart

func (qu *QueueUpdate) SetNillableChatStart(t *time.Time) *QueueUpdate

SetNillableChatStart sets the "chat_start" field if the given value is not nil.

func (*QueueUpdate) SetNillableLiveArchive

func (qu *QueueUpdate) SetNillableLiveArchive(b *bool) *QueueUpdate

SetNillableLiveArchive sets the "live_archive" field if the given value is not nil.

func (*QueueUpdate) SetNillableOnHold

func (qu *QueueUpdate) SetNillableOnHold(b *bool) *QueueUpdate

SetNillableOnHold sets the "on_hold" field if the given value is not nil.

func (*QueueUpdate) SetNillableProcessing

func (qu *QueueUpdate) SetNillableProcessing(b *bool) *QueueUpdate

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*QueueUpdate) SetNillableRenderChat added in v1.1.7

func (qu *QueueUpdate) SetNillableRenderChat(b *bool) *QueueUpdate

SetNillableRenderChat sets the "render_chat" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskChatConvert

func (qu *QueueUpdate) SetNillableTaskChatConvert(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskChatConvert sets the "task_chat_convert" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskChatDownload

func (qu *QueueUpdate) SetNillableTaskChatDownload(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskChatDownload sets the "task_chat_download" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskChatMove

func (qu *QueueUpdate) SetNillableTaskChatMove(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskChatMove sets the "task_chat_move" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskChatRender

func (qu *QueueUpdate) SetNillableTaskChatRender(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskChatRender sets the "task_chat_render" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVideoConvert

func (qu *QueueUpdate) SetNillableTaskVideoConvert(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVideoConvert sets the "task_video_convert" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVideoDownload

func (qu *QueueUpdate) SetNillableTaskVideoDownload(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVideoDownload sets the "task_video_download" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVideoMove

func (qu *QueueUpdate) SetNillableTaskVideoMove(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVideoMove sets the "task_video_move" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVodCreateFolder

func (qu *QueueUpdate) SetNillableTaskVodCreateFolder(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVodCreateFolder sets the "task_vod_create_folder" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVodDownloadThumbnail

func (qu *QueueUpdate) SetNillableTaskVodDownloadThumbnail(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field if the given value is not nil.

func (*QueueUpdate) SetNillableTaskVodSaveInfo

func (qu *QueueUpdate) SetNillableTaskVodSaveInfo(us *utils.TaskStatus) *QueueUpdate

SetNillableTaskVodSaveInfo sets the "task_vod_save_info" field if the given value is not nil.

func (*QueueUpdate) SetNillableVideoProcessing

func (qu *QueueUpdate) SetNillableVideoProcessing(b *bool) *QueueUpdate

SetNillableVideoProcessing sets the "video_processing" field if the given value is not nil.

func (*QueueUpdate) SetOnHold

func (qu *QueueUpdate) SetOnHold(b bool) *QueueUpdate

SetOnHold sets the "on_hold" field.

func (*QueueUpdate) SetProcessing

func (qu *QueueUpdate) SetProcessing(b bool) *QueueUpdate

SetProcessing sets the "processing" field.

func (*QueueUpdate) SetRenderChat added in v1.1.7

func (qu *QueueUpdate) SetRenderChat(b bool) *QueueUpdate

SetRenderChat sets the "render_chat" field.

func (*QueueUpdate) SetTaskChatConvert

func (qu *QueueUpdate) SetTaskChatConvert(us utils.TaskStatus) *QueueUpdate

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueUpdate) SetTaskChatDownload

func (qu *QueueUpdate) SetTaskChatDownload(us utils.TaskStatus) *QueueUpdate

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueUpdate) SetTaskChatMove

func (qu *QueueUpdate) SetTaskChatMove(us utils.TaskStatus) *QueueUpdate

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueUpdate) SetTaskChatRender

func (qu *QueueUpdate) SetTaskChatRender(us utils.TaskStatus) *QueueUpdate

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueUpdate) SetTaskVideoConvert

func (qu *QueueUpdate) SetTaskVideoConvert(us utils.TaskStatus) *QueueUpdate

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueUpdate) SetTaskVideoDownload

func (qu *QueueUpdate) SetTaskVideoDownload(us utils.TaskStatus) *QueueUpdate

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueUpdate) SetTaskVideoMove

func (qu *QueueUpdate) SetTaskVideoMove(us utils.TaskStatus) *QueueUpdate

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueUpdate) SetTaskVodCreateFolder

func (qu *QueueUpdate) SetTaskVodCreateFolder(us utils.TaskStatus) *QueueUpdate

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueUpdate) SetTaskVodDownloadThumbnail

func (qu *QueueUpdate) SetTaskVodDownloadThumbnail(us utils.TaskStatus) *QueueUpdate

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueUpdate) SetTaskVodSaveInfo

func (qu *QueueUpdate) SetTaskVodSaveInfo(us utils.TaskStatus) *QueueUpdate

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueUpdate) SetUpdatedAt

func (qu *QueueUpdate) SetUpdatedAt(t time.Time) *QueueUpdate

SetUpdatedAt sets the "updated_at" field.

func (*QueueUpdate) SetVideoProcessing

func (qu *QueueUpdate) SetVideoProcessing(b bool) *QueueUpdate

SetVideoProcessing sets the "video_processing" field.

func (*QueueUpdate) SetVod

func (qu *QueueUpdate) SetVod(v *Vod) *QueueUpdate

SetVod sets the "vod" edge to the Vod entity.

func (*QueueUpdate) SetVodID

func (qu *QueueUpdate) SetVodID(id uuid.UUID) *QueueUpdate

SetVodID sets the "vod" edge to the Vod entity by ID.

func (*QueueUpdate) Where

func (qu *QueueUpdate) Where(ps ...predicate.Queue) *QueueUpdate

Where appends a list predicates to the QueueUpdate builder.

type QueueUpdateOne

type QueueUpdateOne struct {
	// contains filtered or unexported fields
}

QueueUpdateOne is the builder for updating a single Queue entity.

func (*QueueUpdateOne) ClearChatStart

func (quo *QueueUpdateOne) ClearChatStart() *QueueUpdateOne

ClearChatStart clears the value of the "chat_start" field.

func (*QueueUpdateOne) ClearRenderChat added in v1.1.7

func (quo *QueueUpdateOne) ClearRenderChat() *QueueUpdateOne

ClearRenderChat clears the value of the "render_chat" field.

func (*QueueUpdateOne) ClearTaskChatConvert

func (quo *QueueUpdateOne) ClearTaskChatConvert() *QueueUpdateOne

ClearTaskChatConvert clears the value of the "task_chat_convert" field.

func (*QueueUpdateOne) ClearTaskChatDownload

func (quo *QueueUpdateOne) ClearTaskChatDownload() *QueueUpdateOne

ClearTaskChatDownload clears the value of the "task_chat_download" field.

func (*QueueUpdateOne) ClearTaskChatMove

func (quo *QueueUpdateOne) ClearTaskChatMove() *QueueUpdateOne

ClearTaskChatMove clears the value of the "task_chat_move" field.

func (*QueueUpdateOne) ClearTaskChatRender

func (quo *QueueUpdateOne) ClearTaskChatRender() *QueueUpdateOne

ClearTaskChatRender clears the value of the "task_chat_render" field.

func (*QueueUpdateOne) ClearTaskVideoConvert

func (quo *QueueUpdateOne) ClearTaskVideoConvert() *QueueUpdateOne

ClearTaskVideoConvert clears the value of the "task_video_convert" field.

func (*QueueUpdateOne) ClearTaskVideoDownload

func (quo *QueueUpdateOne) ClearTaskVideoDownload() *QueueUpdateOne

ClearTaskVideoDownload clears the value of the "task_video_download" field.

func (*QueueUpdateOne) ClearTaskVideoMove

func (quo *QueueUpdateOne) ClearTaskVideoMove() *QueueUpdateOne

ClearTaskVideoMove clears the value of the "task_video_move" field.

func (*QueueUpdateOne) ClearTaskVodCreateFolder

func (quo *QueueUpdateOne) ClearTaskVodCreateFolder() *QueueUpdateOne

ClearTaskVodCreateFolder clears the value of the "task_vod_create_folder" field.

func (*QueueUpdateOne) ClearTaskVodDownloadThumbnail

func (quo *QueueUpdateOne) ClearTaskVodDownloadThumbnail() *QueueUpdateOne

ClearTaskVodDownloadThumbnail clears the value of the "task_vod_download_thumbnail" field.

func (*QueueUpdateOne) ClearTaskVodSaveInfo

func (quo *QueueUpdateOne) ClearTaskVodSaveInfo() *QueueUpdateOne

ClearTaskVodSaveInfo clears the value of the "task_vod_save_info" field.

func (*QueueUpdateOne) ClearVod

func (quo *QueueUpdateOne) ClearVod() *QueueUpdateOne

ClearVod clears the "vod" edge to the Vod entity.

func (*QueueUpdateOne) Exec

func (quo *QueueUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*QueueUpdateOne) ExecX

func (quo *QueueUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QueueUpdateOne) Mutation

func (quo *QueueUpdateOne) Mutation() *QueueMutation

Mutation returns the QueueMutation object of the builder.

func (*QueueUpdateOne) Save

func (quo *QueueUpdateOne) Save(ctx context.Context) (*Queue, error)

Save executes the query and returns the updated Queue entity.

func (*QueueUpdateOne) SaveX

func (quo *QueueUpdateOne) SaveX(ctx context.Context) *Queue

SaveX is like Save, but panics if an error occurs.

func (*QueueUpdateOne) Select

func (quo *QueueUpdateOne) Select(field string, fields ...string) *QueueUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*QueueUpdateOne) SetChatProcessing

func (quo *QueueUpdateOne) SetChatProcessing(b bool) *QueueUpdateOne

SetChatProcessing sets the "chat_processing" field.

func (*QueueUpdateOne) SetChatStart

func (quo *QueueUpdateOne) SetChatStart(t time.Time) *QueueUpdateOne

SetChatStart sets the "chat_start" field.

func (*QueueUpdateOne) SetLiveArchive

func (quo *QueueUpdateOne) SetLiveArchive(b bool) *QueueUpdateOne

SetLiveArchive sets the "live_archive" field.

func (*QueueUpdateOne) SetNillableChatProcessing

func (quo *QueueUpdateOne) SetNillableChatProcessing(b *bool) *QueueUpdateOne

SetNillableChatProcessing sets the "chat_processing" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableChatStart

func (quo *QueueUpdateOne) SetNillableChatStart(t *time.Time) *QueueUpdateOne

SetNillableChatStart sets the "chat_start" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableLiveArchive

func (quo *QueueUpdateOne) SetNillableLiveArchive(b *bool) *QueueUpdateOne

SetNillableLiveArchive sets the "live_archive" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableOnHold

func (quo *QueueUpdateOne) SetNillableOnHold(b *bool) *QueueUpdateOne

SetNillableOnHold sets the "on_hold" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableProcessing

func (quo *QueueUpdateOne) SetNillableProcessing(b *bool) *QueueUpdateOne

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableRenderChat added in v1.1.7

func (quo *QueueUpdateOne) SetNillableRenderChat(b *bool) *QueueUpdateOne

SetNillableRenderChat sets the "render_chat" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskChatConvert

func (quo *QueueUpdateOne) SetNillableTaskChatConvert(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskChatConvert sets the "task_chat_convert" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskChatDownload

func (quo *QueueUpdateOne) SetNillableTaskChatDownload(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskChatDownload sets the "task_chat_download" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskChatMove

func (quo *QueueUpdateOne) SetNillableTaskChatMove(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskChatMove sets the "task_chat_move" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskChatRender

func (quo *QueueUpdateOne) SetNillableTaskChatRender(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskChatRender sets the "task_chat_render" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVideoConvert

func (quo *QueueUpdateOne) SetNillableTaskVideoConvert(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVideoConvert sets the "task_video_convert" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVideoDownload

func (quo *QueueUpdateOne) SetNillableTaskVideoDownload(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVideoDownload sets the "task_video_download" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVideoMove

func (quo *QueueUpdateOne) SetNillableTaskVideoMove(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVideoMove sets the "task_video_move" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVodCreateFolder

func (quo *QueueUpdateOne) SetNillableTaskVodCreateFolder(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVodCreateFolder sets the "task_vod_create_folder" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVodDownloadThumbnail

func (quo *QueueUpdateOne) SetNillableTaskVodDownloadThumbnail(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableTaskVodSaveInfo

func (quo *QueueUpdateOne) SetNillableTaskVodSaveInfo(us *utils.TaskStatus) *QueueUpdateOne

SetNillableTaskVodSaveInfo sets the "task_vod_save_info" field if the given value is not nil.

func (*QueueUpdateOne) SetNillableVideoProcessing

func (quo *QueueUpdateOne) SetNillableVideoProcessing(b *bool) *QueueUpdateOne

SetNillableVideoProcessing sets the "video_processing" field if the given value is not nil.

func (*QueueUpdateOne) SetOnHold

func (quo *QueueUpdateOne) SetOnHold(b bool) *QueueUpdateOne

SetOnHold sets the "on_hold" field.

func (*QueueUpdateOne) SetProcessing

func (quo *QueueUpdateOne) SetProcessing(b bool) *QueueUpdateOne

SetProcessing sets the "processing" field.

func (*QueueUpdateOne) SetRenderChat added in v1.1.7

func (quo *QueueUpdateOne) SetRenderChat(b bool) *QueueUpdateOne

SetRenderChat sets the "render_chat" field.

func (*QueueUpdateOne) SetTaskChatConvert

func (quo *QueueUpdateOne) SetTaskChatConvert(us utils.TaskStatus) *QueueUpdateOne

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueUpdateOne) SetTaskChatDownload

func (quo *QueueUpdateOne) SetTaskChatDownload(us utils.TaskStatus) *QueueUpdateOne

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueUpdateOne) SetTaskChatMove

func (quo *QueueUpdateOne) SetTaskChatMove(us utils.TaskStatus) *QueueUpdateOne

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueUpdateOne) SetTaskChatRender

func (quo *QueueUpdateOne) SetTaskChatRender(us utils.TaskStatus) *QueueUpdateOne

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueUpdateOne) SetTaskVideoConvert

func (quo *QueueUpdateOne) SetTaskVideoConvert(us utils.TaskStatus) *QueueUpdateOne

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueUpdateOne) SetTaskVideoDownload

func (quo *QueueUpdateOne) SetTaskVideoDownload(us utils.TaskStatus) *QueueUpdateOne

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueUpdateOne) SetTaskVideoMove

func (quo *QueueUpdateOne) SetTaskVideoMove(us utils.TaskStatus) *QueueUpdateOne

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueUpdateOne) SetTaskVodCreateFolder

func (quo *QueueUpdateOne) SetTaskVodCreateFolder(us utils.TaskStatus) *QueueUpdateOne

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueUpdateOne) SetTaskVodDownloadThumbnail

func (quo *QueueUpdateOne) SetTaskVodDownloadThumbnail(us utils.TaskStatus) *QueueUpdateOne

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueUpdateOne) SetTaskVodSaveInfo

func (quo *QueueUpdateOne) SetTaskVodSaveInfo(us utils.TaskStatus) *QueueUpdateOne

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueUpdateOne) SetUpdatedAt

func (quo *QueueUpdateOne) SetUpdatedAt(t time.Time) *QueueUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*QueueUpdateOne) SetVideoProcessing

func (quo *QueueUpdateOne) SetVideoProcessing(b bool) *QueueUpdateOne

SetVideoProcessing sets the "video_processing" field.

func (*QueueUpdateOne) SetVod

func (quo *QueueUpdateOne) SetVod(v *Vod) *QueueUpdateOne

SetVod sets the "vod" edge to the Vod entity.

func (*QueueUpdateOne) SetVodID

func (quo *QueueUpdateOne) SetVodID(id uuid.UUID) *QueueUpdateOne

SetVodID sets the "vod" edge to the Vod entity by ID.

func (*QueueUpdateOne) Where added in v1.2.4

func (quo *QueueUpdateOne) Where(ps ...predicate.Queue) *QueueUpdateOne

Where appends a list predicates to the QueueUpdate builder.

type QueueUpsert added in v0.0.2

type QueueUpsert struct {
	*sql.UpdateSet
}

QueueUpsert is the "OnConflict" setter.

func (*QueueUpsert) ClearChatStart added in v0.0.2

func (u *QueueUpsert) ClearChatStart() *QueueUpsert

ClearChatStart clears the value of the "chat_start" field.

func (*QueueUpsert) ClearRenderChat added in v1.2.4

func (u *QueueUpsert) ClearRenderChat() *QueueUpsert

ClearRenderChat clears the value of the "render_chat" field.

func (*QueueUpsert) ClearTaskChatConvert added in v0.0.2

func (u *QueueUpsert) ClearTaskChatConvert() *QueueUpsert

ClearTaskChatConvert clears the value of the "task_chat_convert" field.

func (*QueueUpsert) ClearTaskChatDownload added in v0.0.2

func (u *QueueUpsert) ClearTaskChatDownload() *QueueUpsert

ClearTaskChatDownload clears the value of the "task_chat_download" field.

func (*QueueUpsert) ClearTaskChatMove added in v0.0.2

func (u *QueueUpsert) ClearTaskChatMove() *QueueUpsert

ClearTaskChatMove clears the value of the "task_chat_move" field.

func (*QueueUpsert) ClearTaskChatRender added in v0.0.2

func (u *QueueUpsert) ClearTaskChatRender() *QueueUpsert

ClearTaskChatRender clears the value of the "task_chat_render" field.

func (*QueueUpsert) ClearTaskVideoConvert added in v0.0.2

func (u *QueueUpsert) ClearTaskVideoConvert() *QueueUpsert

ClearTaskVideoConvert clears the value of the "task_video_convert" field.

func (*QueueUpsert) ClearTaskVideoDownload added in v0.0.2

func (u *QueueUpsert) ClearTaskVideoDownload() *QueueUpsert

ClearTaskVideoDownload clears the value of the "task_video_download" field.

func (*QueueUpsert) ClearTaskVideoMove added in v0.0.2

func (u *QueueUpsert) ClearTaskVideoMove() *QueueUpsert

ClearTaskVideoMove clears the value of the "task_video_move" field.

func (*QueueUpsert) ClearTaskVodCreateFolder added in v0.0.2

func (u *QueueUpsert) ClearTaskVodCreateFolder() *QueueUpsert

ClearTaskVodCreateFolder clears the value of the "task_vod_create_folder" field.

func (*QueueUpsert) ClearTaskVodDownloadThumbnail added in v0.0.2

func (u *QueueUpsert) ClearTaskVodDownloadThumbnail() *QueueUpsert

ClearTaskVodDownloadThumbnail clears the value of the "task_vod_download_thumbnail" field.

func (*QueueUpsert) ClearTaskVodSaveInfo added in v0.0.2

func (u *QueueUpsert) ClearTaskVodSaveInfo() *QueueUpsert

ClearTaskVodSaveInfo clears the value of the "task_vod_save_info" field.

func (*QueueUpsert) SetChatProcessing added in v0.0.2

func (u *QueueUpsert) SetChatProcessing(v bool) *QueueUpsert

SetChatProcessing sets the "chat_processing" field.

func (*QueueUpsert) SetChatStart added in v0.0.2

func (u *QueueUpsert) SetChatStart(v time.Time) *QueueUpsert

SetChatStart sets the "chat_start" field.

func (*QueueUpsert) SetLiveArchive added in v0.0.2

func (u *QueueUpsert) SetLiveArchive(v bool) *QueueUpsert

SetLiveArchive sets the "live_archive" field.

func (*QueueUpsert) SetOnHold added in v0.0.2

func (u *QueueUpsert) SetOnHold(v bool) *QueueUpsert

SetOnHold sets the "on_hold" field.

func (*QueueUpsert) SetProcessing added in v0.0.2

func (u *QueueUpsert) SetProcessing(v bool) *QueueUpsert

SetProcessing sets the "processing" field.

func (*QueueUpsert) SetRenderChat added in v1.2.4

func (u *QueueUpsert) SetRenderChat(v bool) *QueueUpsert

SetRenderChat sets the "render_chat" field.

func (*QueueUpsert) SetTaskChatConvert added in v0.0.2

func (u *QueueUpsert) SetTaskChatConvert(v utils.TaskStatus) *QueueUpsert

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueUpsert) SetTaskChatDownload added in v0.0.2

func (u *QueueUpsert) SetTaskChatDownload(v utils.TaskStatus) *QueueUpsert

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueUpsert) SetTaskChatMove added in v0.0.2

func (u *QueueUpsert) SetTaskChatMove(v utils.TaskStatus) *QueueUpsert

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueUpsert) SetTaskChatRender added in v0.0.2

func (u *QueueUpsert) SetTaskChatRender(v utils.TaskStatus) *QueueUpsert

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueUpsert) SetTaskVideoConvert added in v0.0.2

func (u *QueueUpsert) SetTaskVideoConvert(v utils.TaskStatus) *QueueUpsert

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueUpsert) SetTaskVideoDownload added in v0.0.2

func (u *QueueUpsert) SetTaskVideoDownload(v utils.TaskStatus) *QueueUpsert

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueUpsert) SetTaskVideoMove added in v0.0.2

func (u *QueueUpsert) SetTaskVideoMove(v utils.TaskStatus) *QueueUpsert

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueUpsert) SetTaskVodCreateFolder added in v0.0.2

func (u *QueueUpsert) SetTaskVodCreateFolder(v utils.TaskStatus) *QueueUpsert

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueUpsert) SetTaskVodDownloadThumbnail added in v0.0.2

func (u *QueueUpsert) SetTaskVodDownloadThumbnail(v utils.TaskStatus) *QueueUpsert

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueUpsert) SetTaskVodSaveInfo added in v0.0.2

func (u *QueueUpsert) SetTaskVodSaveInfo(v utils.TaskStatus) *QueueUpsert

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueUpsert) SetUpdatedAt added in v0.0.2

func (u *QueueUpsert) SetUpdatedAt(v time.Time) *QueueUpsert

SetUpdatedAt sets the "updated_at" field.

func (*QueueUpsert) SetVideoProcessing added in v0.0.2

func (u *QueueUpsert) SetVideoProcessing(v bool) *QueueUpsert

SetVideoProcessing sets the "video_processing" field.

func (*QueueUpsert) UpdateChatProcessing added in v0.0.2

func (u *QueueUpsert) UpdateChatProcessing() *QueueUpsert

UpdateChatProcessing sets the "chat_processing" field to the value that was provided on create.

func (*QueueUpsert) UpdateChatStart added in v0.0.2

func (u *QueueUpsert) UpdateChatStart() *QueueUpsert

UpdateChatStart sets the "chat_start" field to the value that was provided on create.

func (*QueueUpsert) UpdateLiveArchive added in v0.0.2

func (u *QueueUpsert) UpdateLiveArchive() *QueueUpsert

UpdateLiveArchive sets the "live_archive" field to the value that was provided on create.

func (*QueueUpsert) UpdateOnHold added in v0.0.2

func (u *QueueUpsert) UpdateOnHold() *QueueUpsert

UpdateOnHold sets the "on_hold" field to the value that was provided on create.

func (*QueueUpsert) UpdateProcessing added in v0.0.2

func (u *QueueUpsert) UpdateProcessing() *QueueUpsert

UpdateProcessing sets the "processing" field to the value that was provided on create.

func (*QueueUpsert) UpdateRenderChat added in v1.2.4

func (u *QueueUpsert) UpdateRenderChat() *QueueUpsert

UpdateRenderChat sets the "render_chat" field to the value that was provided on create.

func (*QueueUpsert) UpdateTaskChatConvert added in v0.0.2

func (u *QueueUpsert) UpdateTaskChatConvert() *QueueUpsert

UpdateTaskChatConvert sets the "task_chat_convert" field to the value that was provided on create.

func (*QueueUpsert) UpdateTaskChatDownload added in v0.0.2

func (u *QueueUpsert) UpdateTaskChatDownload() *QueueUpsert

UpdateTaskChatDownload sets the "task_chat_download" field to the value that was provided on create.

func (*QueueUpsert) UpdateTaskChatMove added in v0.0.2

func (u *QueueUpsert) UpdateTaskChatMove() *QueueUpsert

UpdateTaskChatMove sets the "task_chat_move" field to the value that was provided on create.

func (*QueueUpsert) UpdateTaskChatRender added in v0.0.2

func (u *QueueUpsert) UpdateTaskChatRender() *QueueUpsert

UpdateTaskChatRender sets the "task_chat_render" field to the value that was provided on create.

func (*QueueUpsert) UpdateTaskVideoConvert added in v0.0.2

func (u *QueueUpsert) UpdateTaskVideoConvert() *QueueUpsert

UpdateTaskVideoConvert sets the "task_video_convert" field to the value that was provided on create.

func (*QueueUpsert) UpdateTaskVideoDownload added in v0.0.2

func (u *QueueUpsert) UpdateTaskVideoDownload() *QueueUpsert

UpdateTaskVideoDownload sets the "task_video_download" field to the value that was provided on create.

func (*QueueUpsert) UpdateTaskVideoMove added in v0.0.2

func (u *QueueUpsert) UpdateTaskVideoMove() *QueueUpsert

UpdateTaskVideoMove sets the "task_video_move" field to the value that was provided on create.

func (*QueueUpsert) UpdateTaskVodCreateFolder added in v0.0.2

func (u *QueueUpsert) UpdateTaskVodCreateFolder() *QueueUpsert

UpdateTaskVodCreateFolder sets the "task_vod_create_folder" field to the value that was provided on create.

func (*QueueUpsert) UpdateTaskVodDownloadThumbnail added in v0.0.2

func (u *QueueUpsert) UpdateTaskVodDownloadThumbnail() *QueueUpsert

UpdateTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field to the value that was provided on create.

func (*QueueUpsert) UpdateTaskVodSaveInfo added in v0.0.2

func (u *QueueUpsert) UpdateTaskVodSaveInfo() *QueueUpsert

UpdateTaskVodSaveInfo sets the "task_vod_save_info" field to the value that was provided on create.

func (*QueueUpsert) UpdateUpdatedAt added in v0.0.2

func (u *QueueUpsert) UpdateUpdatedAt() *QueueUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*QueueUpsert) UpdateVideoProcessing added in v0.0.2

func (u *QueueUpsert) UpdateVideoProcessing() *QueueUpsert

UpdateVideoProcessing sets the "video_processing" field to the value that was provided on create.

type QueueUpsertBulk added in v0.0.2

type QueueUpsertBulk struct {
	// contains filtered or unexported fields
}

QueueUpsertBulk is the builder for "upsert"-ing a bulk of Queue nodes.

func (*QueueUpsertBulk) ClearChatStart added in v0.0.2

func (u *QueueUpsertBulk) ClearChatStart() *QueueUpsertBulk

ClearChatStart clears the value of the "chat_start" field.

func (*QueueUpsertBulk) ClearRenderChat added in v1.2.4

func (u *QueueUpsertBulk) ClearRenderChat() *QueueUpsertBulk

ClearRenderChat clears the value of the "render_chat" field.

func (*QueueUpsertBulk) ClearTaskChatConvert added in v0.0.2

func (u *QueueUpsertBulk) ClearTaskChatConvert() *QueueUpsertBulk

ClearTaskChatConvert clears the value of the "task_chat_convert" field.

func (*QueueUpsertBulk) ClearTaskChatDownload added in v0.0.2

func (u *QueueUpsertBulk) ClearTaskChatDownload() *QueueUpsertBulk

ClearTaskChatDownload clears the value of the "task_chat_download" field.

func (*QueueUpsertBulk) ClearTaskChatMove added in v0.0.2

func (u *QueueUpsertBulk) ClearTaskChatMove() *QueueUpsertBulk

ClearTaskChatMove clears the value of the "task_chat_move" field.

func (*QueueUpsertBulk) ClearTaskChatRender added in v0.0.2

func (u *QueueUpsertBulk) ClearTaskChatRender() *QueueUpsertBulk

ClearTaskChatRender clears the value of the "task_chat_render" field.

func (*QueueUpsertBulk) ClearTaskVideoConvert added in v0.0.2

func (u *QueueUpsertBulk) ClearTaskVideoConvert() *QueueUpsertBulk

ClearTaskVideoConvert clears the value of the "task_video_convert" field.

func (*QueueUpsertBulk) ClearTaskVideoDownload added in v0.0.2

func (u *QueueUpsertBulk) ClearTaskVideoDownload() *QueueUpsertBulk

ClearTaskVideoDownload clears the value of the "task_video_download" field.

func (*QueueUpsertBulk) ClearTaskVideoMove added in v0.0.2

func (u *QueueUpsertBulk) ClearTaskVideoMove() *QueueUpsertBulk

ClearTaskVideoMove clears the value of the "task_video_move" field.

func (*QueueUpsertBulk) ClearTaskVodCreateFolder added in v0.0.2

func (u *QueueUpsertBulk) ClearTaskVodCreateFolder() *QueueUpsertBulk

ClearTaskVodCreateFolder clears the value of the "task_vod_create_folder" field.

func (*QueueUpsertBulk) ClearTaskVodDownloadThumbnail added in v0.0.2

func (u *QueueUpsertBulk) ClearTaskVodDownloadThumbnail() *QueueUpsertBulk

ClearTaskVodDownloadThumbnail clears the value of the "task_vod_download_thumbnail" field.

func (*QueueUpsertBulk) ClearTaskVodSaveInfo added in v0.0.2

func (u *QueueUpsertBulk) ClearTaskVodSaveInfo() *QueueUpsertBulk

ClearTaskVodSaveInfo clears the value of the "task_vod_save_info" field.

func (*QueueUpsertBulk) DoNothing added in v0.0.2

func (u *QueueUpsertBulk) DoNothing() *QueueUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*QueueUpsertBulk) Exec added in v0.0.2

func (u *QueueUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*QueueUpsertBulk) ExecX added in v0.0.2

func (u *QueueUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QueueUpsertBulk) Ignore added in v0.0.2

func (u *QueueUpsertBulk) Ignore() *QueueUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Queue.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*QueueUpsertBulk) SetChatProcessing added in v0.0.2

func (u *QueueUpsertBulk) SetChatProcessing(v bool) *QueueUpsertBulk

SetChatProcessing sets the "chat_processing" field.

func (*QueueUpsertBulk) SetChatStart added in v0.0.2

func (u *QueueUpsertBulk) SetChatStart(v time.Time) *QueueUpsertBulk

SetChatStart sets the "chat_start" field.

func (*QueueUpsertBulk) SetLiveArchive added in v0.0.2

func (u *QueueUpsertBulk) SetLiveArchive(v bool) *QueueUpsertBulk

SetLiveArchive sets the "live_archive" field.

func (*QueueUpsertBulk) SetOnHold added in v0.0.2

func (u *QueueUpsertBulk) SetOnHold(v bool) *QueueUpsertBulk

SetOnHold sets the "on_hold" field.

func (*QueueUpsertBulk) SetProcessing added in v0.0.2

func (u *QueueUpsertBulk) SetProcessing(v bool) *QueueUpsertBulk

SetProcessing sets the "processing" field.

func (*QueueUpsertBulk) SetRenderChat added in v1.2.4

func (u *QueueUpsertBulk) SetRenderChat(v bool) *QueueUpsertBulk

SetRenderChat sets the "render_chat" field.

func (*QueueUpsertBulk) SetTaskChatConvert added in v0.0.2

func (u *QueueUpsertBulk) SetTaskChatConvert(v utils.TaskStatus) *QueueUpsertBulk

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueUpsertBulk) SetTaskChatDownload added in v0.0.2

func (u *QueueUpsertBulk) SetTaskChatDownload(v utils.TaskStatus) *QueueUpsertBulk

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueUpsertBulk) SetTaskChatMove added in v0.0.2

func (u *QueueUpsertBulk) SetTaskChatMove(v utils.TaskStatus) *QueueUpsertBulk

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueUpsertBulk) SetTaskChatRender added in v0.0.2

func (u *QueueUpsertBulk) SetTaskChatRender(v utils.TaskStatus) *QueueUpsertBulk

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueUpsertBulk) SetTaskVideoConvert added in v0.0.2

func (u *QueueUpsertBulk) SetTaskVideoConvert(v utils.TaskStatus) *QueueUpsertBulk

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueUpsertBulk) SetTaskVideoDownload added in v0.0.2

func (u *QueueUpsertBulk) SetTaskVideoDownload(v utils.TaskStatus) *QueueUpsertBulk

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueUpsertBulk) SetTaskVideoMove added in v0.0.2

func (u *QueueUpsertBulk) SetTaskVideoMove(v utils.TaskStatus) *QueueUpsertBulk

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueUpsertBulk) SetTaskVodCreateFolder added in v0.0.2

func (u *QueueUpsertBulk) SetTaskVodCreateFolder(v utils.TaskStatus) *QueueUpsertBulk

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueUpsertBulk) SetTaskVodDownloadThumbnail added in v0.0.2

func (u *QueueUpsertBulk) SetTaskVodDownloadThumbnail(v utils.TaskStatus) *QueueUpsertBulk

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueUpsertBulk) SetTaskVodSaveInfo added in v0.0.2

func (u *QueueUpsertBulk) SetTaskVodSaveInfo(v utils.TaskStatus) *QueueUpsertBulk

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueUpsertBulk) SetUpdatedAt added in v0.0.2

func (u *QueueUpsertBulk) SetUpdatedAt(v time.Time) *QueueUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*QueueUpsertBulk) SetVideoProcessing added in v0.0.2

func (u *QueueUpsertBulk) SetVideoProcessing(v bool) *QueueUpsertBulk

SetVideoProcessing sets the "video_processing" field.

func (*QueueUpsertBulk) Update added in v0.0.2

func (u *QueueUpsertBulk) Update(set func(*QueueUpsert)) *QueueUpsertBulk

Update allows overriding fields `UPDATE` values. See the QueueCreateBulk.OnConflict documentation for more info.

func (*QueueUpsertBulk) UpdateChatProcessing added in v0.0.2

func (u *QueueUpsertBulk) UpdateChatProcessing() *QueueUpsertBulk

UpdateChatProcessing sets the "chat_processing" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateChatStart added in v0.0.2

func (u *QueueUpsertBulk) UpdateChatStart() *QueueUpsertBulk

UpdateChatStart sets the "chat_start" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateLiveArchive added in v0.0.2

func (u *QueueUpsertBulk) UpdateLiveArchive() *QueueUpsertBulk

UpdateLiveArchive sets the "live_archive" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateNewValues added in v0.0.2

func (u *QueueUpsertBulk) UpdateNewValues() *QueueUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Queue.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(queue.FieldID)
		}),
	).
	Exec(ctx)

func (*QueueUpsertBulk) UpdateOnHold added in v0.0.2

func (u *QueueUpsertBulk) UpdateOnHold() *QueueUpsertBulk

UpdateOnHold sets the "on_hold" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateProcessing added in v0.0.2

func (u *QueueUpsertBulk) UpdateProcessing() *QueueUpsertBulk

UpdateProcessing sets the "processing" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateRenderChat added in v1.2.4

func (u *QueueUpsertBulk) UpdateRenderChat() *QueueUpsertBulk

UpdateRenderChat sets the "render_chat" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateTaskChatConvert added in v0.0.2

func (u *QueueUpsertBulk) UpdateTaskChatConvert() *QueueUpsertBulk

UpdateTaskChatConvert sets the "task_chat_convert" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateTaskChatDownload added in v0.0.2

func (u *QueueUpsertBulk) UpdateTaskChatDownload() *QueueUpsertBulk

UpdateTaskChatDownload sets the "task_chat_download" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateTaskChatMove added in v0.0.2

func (u *QueueUpsertBulk) UpdateTaskChatMove() *QueueUpsertBulk

UpdateTaskChatMove sets the "task_chat_move" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateTaskChatRender added in v0.0.2

func (u *QueueUpsertBulk) UpdateTaskChatRender() *QueueUpsertBulk

UpdateTaskChatRender sets the "task_chat_render" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateTaskVideoConvert added in v0.0.2

func (u *QueueUpsertBulk) UpdateTaskVideoConvert() *QueueUpsertBulk

UpdateTaskVideoConvert sets the "task_video_convert" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateTaskVideoDownload added in v0.0.2

func (u *QueueUpsertBulk) UpdateTaskVideoDownload() *QueueUpsertBulk

UpdateTaskVideoDownload sets the "task_video_download" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateTaskVideoMove added in v0.0.2

func (u *QueueUpsertBulk) UpdateTaskVideoMove() *QueueUpsertBulk

UpdateTaskVideoMove sets the "task_video_move" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateTaskVodCreateFolder added in v0.0.2

func (u *QueueUpsertBulk) UpdateTaskVodCreateFolder() *QueueUpsertBulk

UpdateTaskVodCreateFolder sets the "task_vod_create_folder" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateTaskVodDownloadThumbnail added in v0.0.2

func (u *QueueUpsertBulk) UpdateTaskVodDownloadThumbnail() *QueueUpsertBulk

UpdateTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateTaskVodSaveInfo added in v0.0.2

func (u *QueueUpsertBulk) UpdateTaskVodSaveInfo() *QueueUpsertBulk

UpdateTaskVodSaveInfo sets the "task_vod_save_info" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateUpdatedAt added in v0.0.2

func (u *QueueUpsertBulk) UpdateUpdatedAt() *QueueUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*QueueUpsertBulk) UpdateVideoProcessing added in v0.0.2

func (u *QueueUpsertBulk) UpdateVideoProcessing() *QueueUpsertBulk

UpdateVideoProcessing sets the "video_processing" field to the value that was provided on create.

type QueueUpsertOne added in v0.0.2

type QueueUpsertOne struct {
	// contains filtered or unexported fields
}

QueueUpsertOne is the builder for "upsert"-ing

one Queue node.

func (*QueueUpsertOne) ClearChatStart added in v0.0.2

func (u *QueueUpsertOne) ClearChatStart() *QueueUpsertOne

ClearChatStart clears the value of the "chat_start" field.

func (*QueueUpsertOne) ClearRenderChat added in v1.2.4

func (u *QueueUpsertOne) ClearRenderChat() *QueueUpsertOne

ClearRenderChat clears the value of the "render_chat" field.

func (*QueueUpsertOne) ClearTaskChatConvert added in v0.0.2

func (u *QueueUpsertOne) ClearTaskChatConvert() *QueueUpsertOne

ClearTaskChatConvert clears the value of the "task_chat_convert" field.

func (*QueueUpsertOne) ClearTaskChatDownload added in v0.0.2

func (u *QueueUpsertOne) ClearTaskChatDownload() *QueueUpsertOne

ClearTaskChatDownload clears the value of the "task_chat_download" field.

func (*QueueUpsertOne) ClearTaskChatMove added in v0.0.2

func (u *QueueUpsertOne) ClearTaskChatMove() *QueueUpsertOne

ClearTaskChatMove clears the value of the "task_chat_move" field.

func (*QueueUpsertOne) ClearTaskChatRender added in v0.0.2

func (u *QueueUpsertOne) ClearTaskChatRender() *QueueUpsertOne

ClearTaskChatRender clears the value of the "task_chat_render" field.

func (*QueueUpsertOne) ClearTaskVideoConvert added in v0.0.2

func (u *QueueUpsertOne) ClearTaskVideoConvert() *QueueUpsertOne

ClearTaskVideoConvert clears the value of the "task_video_convert" field.

func (*QueueUpsertOne) ClearTaskVideoDownload added in v0.0.2

func (u *QueueUpsertOne) ClearTaskVideoDownload() *QueueUpsertOne

ClearTaskVideoDownload clears the value of the "task_video_download" field.

func (*QueueUpsertOne) ClearTaskVideoMove added in v0.0.2

func (u *QueueUpsertOne) ClearTaskVideoMove() *QueueUpsertOne

ClearTaskVideoMove clears the value of the "task_video_move" field.

func (*QueueUpsertOne) ClearTaskVodCreateFolder added in v0.0.2

func (u *QueueUpsertOne) ClearTaskVodCreateFolder() *QueueUpsertOne

ClearTaskVodCreateFolder clears the value of the "task_vod_create_folder" field.

func (*QueueUpsertOne) ClearTaskVodDownloadThumbnail added in v0.0.2

func (u *QueueUpsertOne) ClearTaskVodDownloadThumbnail() *QueueUpsertOne

ClearTaskVodDownloadThumbnail clears the value of the "task_vod_download_thumbnail" field.

func (*QueueUpsertOne) ClearTaskVodSaveInfo added in v0.0.2

func (u *QueueUpsertOne) ClearTaskVodSaveInfo() *QueueUpsertOne

ClearTaskVodSaveInfo clears the value of the "task_vod_save_info" field.

func (*QueueUpsertOne) DoNothing added in v0.0.2

func (u *QueueUpsertOne) DoNothing() *QueueUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*QueueUpsertOne) Exec added in v0.0.2

func (u *QueueUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*QueueUpsertOne) ExecX added in v0.0.2

func (u *QueueUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*QueueUpsertOne) ID added in v0.0.2

func (u *QueueUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*QueueUpsertOne) IDX added in v0.0.2

func (u *QueueUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*QueueUpsertOne) Ignore added in v0.0.2

func (u *QueueUpsertOne) Ignore() *QueueUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Queue.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*QueueUpsertOne) SetChatProcessing added in v0.0.2

func (u *QueueUpsertOne) SetChatProcessing(v bool) *QueueUpsertOne

SetChatProcessing sets the "chat_processing" field.

func (*QueueUpsertOne) SetChatStart added in v0.0.2

func (u *QueueUpsertOne) SetChatStart(v time.Time) *QueueUpsertOne

SetChatStart sets the "chat_start" field.

func (*QueueUpsertOne) SetLiveArchive added in v0.0.2

func (u *QueueUpsertOne) SetLiveArchive(v bool) *QueueUpsertOne

SetLiveArchive sets the "live_archive" field.

func (*QueueUpsertOne) SetOnHold added in v0.0.2

func (u *QueueUpsertOne) SetOnHold(v bool) *QueueUpsertOne

SetOnHold sets the "on_hold" field.

func (*QueueUpsertOne) SetProcessing added in v0.0.2

func (u *QueueUpsertOne) SetProcessing(v bool) *QueueUpsertOne

SetProcessing sets the "processing" field.

func (*QueueUpsertOne) SetRenderChat added in v1.2.4

func (u *QueueUpsertOne) SetRenderChat(v bool) *QueueUpsertOne

SetRenderChat sets the "render_chat" field.

func (*QueueUpsertOne) SetTaskChatConvert added in v0.0.2

func (u *QueueUpsertOne) SetTaskChatConvert(v utils.TaskStatus) *QueueUpsertOne

SetTaskChatConvert sets the "task_chat_convert" field.

func (*QueueUpsertOne) SetTaskChatDownload added in v0.0.2

func (u *QueueUpsertOne) SetTaskChatDownload(v utils.TaskStatus) *QueueUpsertOne

SetTaskChatDownload sets the "task_chat_download" field.

func (*QueueUpsertOne) SetTaskChatMove added in v0.0.2

func (u *QueueUpsertOne) SetTaskChatMove(v utils.TaskStatus) *QueueUpsertOne

SetTaskChatMove sets the "task_chat_move" field.

func (*QueueUpsertOne) SetTaskChatRender added in v0.0.2

func (u *QueueUpsertOne) SetTaskChatRender(v utils.TaskStatus) *QueueUpsertOne

SetTaskChatRender sets the "task_chat_render" field.

func (*QueueUpsertOne) SetTaskVideoConvert added in v0.0.2

func (u *QueueUpsertOne) SetTaskVideoConvert(v utils.TaskStatus) *QueueUpsertOne

SetTaskVideoConvert sets the "task_video_convert" field.

func (*QueueUpsertOne) SetTaskVideoDownload added in v0.0.2

func (u *QueueUpsertOne) SetTaskVideoDownload(v utils.TaskStatus) *QueueUpsertOne

SetTaskVideoDownload sets the "task_video_download" field.

func (*QueueUpsertOne) SetTaskVideoMove added in v0.0.2

func (u *QueueUpsertOne) SetTaskVideoMove(v utils.TaskStatus) *QueueUpsertOne

SetTaskVideoMove sets the "task_video_move" field.

func (*QueueUpsertOne) SetTaskVodCreateFolder added in v0.0.2

func (u *QueueUpsertOne) SetTaskVodCreateFolder(v utils.TaskStatus) *QueueUpsertOne

SetTaskVodCreateFolder sets the "task_vod_create_folder" field.

func (*QueueUpsertOne) SetTaskVodDownloadThumbnail added in v0.0.2

func (u *QueueUpsertOne) SetTaskVodDownloadThumbnail(v utils.TaskStatus) *QueueUpsertOne

SetTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field.

func (*QueueUpsertOne) SetTaskVodSaveInfo added in v0.0.2

func (u *QueueUpsertOne) SetTaskVodSaveInfo(v utils.TaskStatus) *QueueUpsertOne

SetTaskVodSaveInfo sets the "task_vod_save_info" field.

func (*QueueUpsertOne) SetUpdatedAt added in v0.0.2

func (u *QueueUpsertOne) SetUpdatedAt(v time.Time) *QueueUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*QueueUpsertOne) SetVideoProcessing added in v0.0.2

func (u *QueueUpsertOne) SetVideoProcessing(v bool) *QueueUpsertOne

SetVideoProcessing sets the "video_processing" field.

func (*QueueUpsertOne) Update added in v0.0.2

func (u *QueueUpsertOne) Update(set func(*QueueUpsert)) *QueueUpsertOne

Update allows overriding fields `UPDATE` values. See the QueueCreate.OnConflict documentation for more info.

func (*QueueUpsertOne) UpdateChatProcessing added in v0.0.2

func (u *QueueUpsertOne) UpdateChatProcessing() *QueueUpsertOne

UpdateChatProcessing sets the "chat_processing" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateChatStart added in v0.0.2

func (u *QueueUpsertOne) UpdateChatStart() *QueueUpsertOne

UpdateChatStart sets the "chat_start" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateLiveArchive added in v0.0.2

func (u *QueueUpsertOne) UpdateLiveArchive() *QueueUpsertOne

UpdateLiveArchive sets the "live_archive" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateNewValues added in v0.0.2

func (u *QueueUpsertOne) UpdateNewValues() *QueueUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Queue.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(queue.FieldID)
		}),
	).
	Exec(ctx)

func (*QueueUpsertOne) UpdateOnHold added in v0.0.2

func (u *QueueUpsertOne) UpdateOnHold() *QueueUpsertOne

UpdateOnHold sets the "on_hold" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateProcessing added in v0.0.2

func (u *QueueUpsertOne) UpdateProcessing() *QueueUpsertOne

UpdateProcessing sets the "processing" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateRenderChat added in v1.2.4

func (u *QueueUpsertOne) UpdateRenderChat() *QueueUpsertOne

UpdateRenderChat sets the "render_chat" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateTaskChatConvert added in v0.0.2

func (u *QueueUpsertOne) UpdateTaskChatConvert() *QueueUpsertOne

UpdateTaskChatConvert sets the "task_chat_convert" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateTaskChatDownload added in v0.0.2

func (u *QueueUpsertOne) UpdateTaskChatDownload() *QueueUpsertOne

UpdateTaskChatDownload sets the "task_chat_download" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateTaskChatMove added in v0.0.2

func (u *QueueUpsertOne) UpdateTaskChatMove() *QueueUpsertOne

UpdateTaskChatMove sets the "task_chat_move" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateTaskChatRender added in v0.0.2

func (u *QueueUpsertOne) UpdateTaskChatRender() *QueueUpsertOne

UpdateTaskChatRender sets the "task_chat_render" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateTaskVideoConvert added in v0.0.2

func (u *QueueUpsertOne) UpdateTaskVideoConvert() *QueueUpsertOne

UpdateTaskVideoConvert sets the "task_video_convert" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateTaskVideoDownload added in v0.0.2

func (u *QueueUpsertOne) UpdateTaskVideoDownload() *QueueUpsertOne

UpdateTaskVideoDownload sets the "task_video_download" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateTaskVideoMove added in v0.0.2

func (u *QueueUpsertOne) UpdateTaskVideoMove() *QueueUpsertOne

UpdateTaskVideoMove sets the "task_video_move" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateTaskVodCreateFolder added in v0.0.2

func (u *QueueUpsertOne) UpdateTaskVodCreateFolder() *QueueUpsertOne

UpdateTaskVodCreateFolder sets the "task_vod_create_folder" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateTaskVodDownloadThumbnail added in v0.0.2

func (u *QueueUpsertOne) UpdateTaskVodDownloadThumbnail() *QueueUpsertOne

UpdateTaskVodDownloadThumbnail sets the "task_vod_download_thumbnail" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateTaskVodSaveInfo added in v0.0.2

func (u *QueueUpsertOne) UpdateTaskVodSaveInfo() *QueueUpsertOne

UpdateTaskVodSaveInfo sets the "task_vod_save_info" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateUpdatedAt added in v0.0.2

func (u *QueueUpsertOne) UpdateUpdatedAt() *QueueUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*QueueUpsertOne) UpdateVideoProcessing added in v0.0.2

func (u *QueueUpsertOne) UpdateVideoProcessing() *QueueUpsertOne

UpdateVideoProcessing sets the "video_processing" field to the value that was provided on create.

type Queues

type Queues []*Queue

Queues is a parsable slice of Queue.

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 TraverseFunc added in v1.1.7

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser added in v1.1.7

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type TwitchCategories added in v1.2.4

type TwitchCategories []*TwitchCategory

TwitchCategories is a parsable slice of TwitchCategory.

type TwitchCategory added in v1.2.4

type TwitchCategory struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// BoxArtURL holds the value of the "box_art_url" field.
	BoxArtURL string `json:"box_art_url,omitempty"`
	// IgdbID holds the value of the "igdb_id" field.
	IgdbID string `json:"igdb_id,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

TwitchCategory is the model entity for the TwitchCategory schema.

func (*TwitchCategory) String added in v1.2.4

func (tc *TwitchCategory) String() string

String implements the fmt.Stringer.

func (*TwitchCategory) Unwrap added in v1.2.4

func (tc *TwitchCategory) Unwrap() *TwitchCategory

Unwrap unwraps the TwitchCategory 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 (*TwitchCategory) Update added in v1.2.4

Update returns a builder for updating this TwitchCategory. Note that you need to call TwitchCategory.Unwrap() before calling this method if this TwitchCategory was returned from a transaction, and the transaction was committed or rolled back.

func (*TwitchCategory) Value added in v1.2.12

func (tc *TwitchCategory) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the TwitchCategory. This includes values selected through modifiers, order, etc.

type TwitchCategoryClient added in v1.2.4

type TwitchCategoryClient struct {
	// contains filtered or unexported fields
}

TwitchCategoryClient is a client for the TwitchCategory schema.

func NewTwitchCategoryClient added in v1.2.4

func NewTwitchCategoryClient(c config) *TwitchCategoryClient

NewTwitchCategoryClient returns a client for the TwitchCategory from the given config.

func (*TwitchCategoryClient) Create added in v1.2.4

Create returns a builder for creating a TwitchCategory entity.

func (*TwitchCategoryClient) CreateBulk added in v1.2.4

CreateBulk returns a builder for creating a bulk of TwitchCategory entities.

func (*TwitchCategoryClient) Delete added in v1.2.4

Delete returns a delete builder for TwitchCategory.

func (*TwitchCategoryClient) DeleteOne added in v1.2.4

DeleteOne returns a builder for deleting the given entity.

func (*TwitchCategoryClient) DeleteOneID added in v1.2.4

DeleteOneID returns a builder for deleting the given entity by its id.

func (*TwitchCategoryClient) Get added in v1.2.4

Get returns a TwitchCategory entity by its id.

func (*TwitchCategoryClient) GetX added in v1.2.4

GetX is like Get, but panics if an error occurs.

func (*TwitchCategoryClient) Hooks added in v1.2.4

func (c *TwitchCategoryClient) Hooks() []Hook

Hooks returns the client hooks.

func (*TwitchCategoryClient) Intercept added in v1.2.4

func (c *TwitchCategoryClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `twitchcategory.Intercept(f(g(h())))`.

func (*TwitchCategoryClient) Interceptors added in v1.2.4

func (c *TwitchCategoryClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*TwitchCategoryClient) Query added in v1.2.4

Query returns a query builder for TwitchCategory.

func (*TwitchCategoryClient) Update added in v1.2.4

Update returns an update builder for TwitchCategory.

func (*TwitchCategoryClient) UpdateOne added in v1.2.4

UpdateOne returns an update builder for the given entity.

func (*TwitchCategoryClient) UpdateOneID added in v1.2.4

UpdateOneID returns an update builder for the given id.

func (*TwitchCategoryClient) Use added in v1.2.4

func (c *TwitchCategoryClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `twitchcategory.Hooks(f(g(h())))`.

type TwitchCategoryCreate added in v1.2.4

type TwitchCategoryCreate struct {
	// contains filtered or unexported fields
}

TwitchCategoryCreate is the builder for creating a TwitchCategory entity.

func (*TwitchCategoryCreate) Exec added in v1.2.4

func (tcc *TwitchCategoryCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TwitchCategoryCreate) ExecX added in v1.2.4

func (tcc *TwitchCategoryCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TwitchCategoryCreate) Mutation added in v1.2.4

Mutation returns the TwitchCategoryMutation object of the builder.

func (*TwitchCategoryCreate) OnConflict added in v1.2.4

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TwitchCategory.Create().
	SetName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TwitchCategoryUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*TwitchCategoryCreate) OnConflictColumns added in v1.2.4

func (tcc *TwitchCategoryCreate) OnConflictColumns(columns ...string) *TwitchCategoryUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TwitchCategory.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TwitchCategoryCreate) Save added in v1.2.4

Save creates the TwitchCategory in the database.

func (*TwitchCategoryCreate) SaveX added in v1.2.4

SaveX calls Save and panics if Save returns an error.

func (*TwitchCategoryCreate) SetBoxArtURL added in v1.2.4

func (tcc *TwitchCategoryCreate) SetBoxArtURL(s string) *TwitchCategoryCreate

SetBoxArtURL sets the "box_art_url" field.

func (*TwitchCategoryCreate) SetCreatedAt added in v1.2.4

func (tcc *TwitchCategoryCreate) SetCreatedAt(t time.Time) *TwitchCategoryCreate

SetCreatedAt sets the "created_at" field.

func (*TwitchCategoryCreate) SetID added in v1.2.4

SetID sets the "id" field.

func (*TwitchCategoryCreate) SetIgdbID added in v1.2.4

SetIgdbID sets the "igdb_id" field.

func (*TwitchCategoryCreate) SetName added in v1.2.4

SetName sets the "name" field.

func (*TwitchCategoryCreate) SetNillableBoxArtURL added in v1.2.4

func (tcc *TwitchCategoryCreate) SetNillableBoxArtURL(s *string) *TwitchCategoryCreate

SetNillableBoxArtURL sets the "box_art_url" field if the given value is not nil.

func (*TwitchCategoryCreate) SetNillableCreatedAt added in v1.2.4

func (tcc *TwitchCategoryCreate) SetNillableCreatedAt(t *time.Time) *TwitchCategoryCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*TwitchCategoryCreate) SetNillableIgdbID added in v1.2.4

func (tcc *TwitchCategoryCreate) SetNillableIgdbID(s *string) *TwitchCategoryCreate

SetNillableIgdbID sets the "igdb_id" field if the given value is not nil.

func (*TwitchCategoryCreate) SetNillableUpdatedAt added in v1.2.4

func (tcc *TwitchCategoryCreate) SetNillableUpdatedAt(t *time.Time) *TwitchCategoryCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*TwitchCategoryCreate) SetUpdatedAt added in v1.2.4

func (tcc *TwitchCategoryCreate) SetUpdatedAt(t time.Time) *TwitchCategoryCreate

SetUpdatedAt sets the "updated_at" field.

type TwitchCategoryCreateBulk added in v1.2.4

type TwitchCategoryCreateBulk struct {
	// contains filtered or unexported fields
}

TwitchCategoryCreateBulk is the builder for creating many TwitchCategory entities in bulk.

func (*TwitchCategoryCreateBulk) Exec added in v1.2.4

Exec executes the query.

func (*TwitchCategoryCreateBulk) ExecX added in v1.2.4

func (tccb *TwitchCategoryCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TwitchCategoryCreateBulk) OnConflict added in v1.2.4

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.TwitchCategory.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.TwitchCategoryUpsert) {
		SetName(v+v).
	}).
	Exec(ctx)

func (*TwitchCategoryCreateBulk) OnConflictColumns added in v1.2.4

func (tccb *TwitchCategoryCreateBulk) OnConflictColumns(columns ...string) *TwitchCategoryUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.TwitchCategory.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*TwitchCategoryCreateBulk) Save added in v1.2.4

Save creates the TwitchCategory entities in the database.

func (*TwitchCategoryCreateBulk) SaveX added in v1.2.4

SaveX is like Save, but panics if an error occurs.

type TwitchCategoryDelete added in v1.2.4

type TwitchCategoryDelete struct {
	// contains filtered or unexported fields
}

TwitchCategoryDelete is the builder for deleting a TwitchCategory entity.

func (*TwitchCategoryDelete) Exec added in v1.2.4

func (tcd *TwitchCategoryDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*TwitchCategoryDelete) ExecX added in v1.2.4

func (tcd *TwitchCategoryDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*TwitchCategoryDelete) Where added in v1.2.4

Where appends a list predicates to the TwitchCategoryDelete builder.

type TwitchCategoryDeleteOne added in v1.2.4

type TwitchCategoryDeleteOne struct {
	// contains filtered or unexported fields
}

TwitchCategoryDeleteOne is the builder for deleting a single TwitchCategory entity.

func (*TwitchCategoryDeleteOne) Exec added in v1.2.4

func (tcdo *TwitchCategoryDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TwitchCategoryDeleteOne) ExecX added in v1.2.4

func (tcdo *TwitchCategoryDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TwitchCategoryDeleteOne) Where added in v1.2.4

Where appends a list predicates to the TwitchCategoryDelete builder.

type TwitchCategoryGroupBy added in v1.2.4

type TwitchCategoryGroupBy struct {
	// contains filtered or unexported fields
}

TwitchCategoryGroupBy is the group-by builder for TwitchCategory entities.

func (*TwitchCategoryGroupBy) Aggregate added in v1.2.4

Aggregate adds the given aggregation functions to the group-by query.

func (*TwitchCategoryGroupBy) Bool added in v1.2.4

func (s *TwitchCategoryGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TwitchCategoryGroupBy) BoolX added in v1.2.4

func (s *TwitchCategoryGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TwitchCategoryGroupBy) Bools added in v1.2.4

func (s *TwitchCategoryGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TwitchCategoryGroupBy) BoolsX added in v1.2.4

func (s *TwitchCategoryGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TwitchCategoryGroupBy) Float64 added in v1.2.4

func (s *TwitchCategoryGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TwitchCategoryGroupBy) Float64X added in v1.2.4

func (s *TwitchCategoryGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TwitchCategoryGroupBy) Float64s added in v1.2.4

func (s *TwitchCategoryGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TwitchCategoryGroupBy) Float64sX added in v1.2.4

func (s *TwitchCategoryGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TwitchCategoryGroupBy) Int added in v1.2.4

func (s *TwitchCategoryGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TwitchCategoryGroupBy) IntX added in v1.2.4

func (s *TwitchCategoryGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TwitchCategoryGroupBy) Ints added in v1.2.4

func (s *TwitchCategoryGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TwitchCategoryGroupBy) IntsX added in v1.2.4

func (s *TwitchCategoryGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TwitchCategoryGroupBy) Scan added in v1.2.4

func (tcgb *TwitchCategoryGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TwitchCategoryGroupBy) ScanX added in v1.2.4

func (s *TwitchCategoryGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TwitchCategoryGroupBy) String added in v1.2.4

func (s *TwitchCategoryGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TwitchCategoryGroupBy) StringX added in v1.2.4

func (s *TwitchCategoryGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TwitchCategoryGroupBy) Strings added in v1.2.4

func (s *TwitchCategoryGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TwitchCategoryGroupBy) StringsX added in v1.2.4

func (s *TwitchCategoryGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TwitchCategoryMutation added in v1.2.4

type TwitchCategoryMutation struct {
	// contains filtered or unexported fields
}

TwitchCategoryMutation represents an operation that mutates the TwitchCategory nodes in the graph.

func (*TwitchCategoryMutation) AddField added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) AddedEdges added in v1.2.4

func (m *TwitchCategoryMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*TwitchCategoryMutation) AddedField added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) AddedFields added in v1.2.4

func (m *TwitchCategoryMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*TwitchCategoryMutation) AddedIDs added in v1.2.4

func (m *TwitchCategoryMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*TwitchCategoryMutation) BoxArtURL added in v1.2.4

func (m *TwitchCategoryMutation) BoxArtURL() (r string, exists bool)

BoxArtURL returns the value of the "box_art_url" field in the mutation.

func (*TwitchCategoryMutation) BoxArtURLCleared added in v1.2.4

func (m *TwitchCategoryMutation) BoxArtURLCleared() bool

BoxArtURLCleared returns if the "box_art_url" field was cleared in this mutation.

func (*TwitchCategoryMutation) ClearBoxArtURL added in v1.2.4

func (m *TwitchCategoryMutation) ClearBoxArtURL()

ClearBoxArtURL clears the value of the "box_art_url" field.

func (*TwitchCategoryMutation) ClearEdge added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) ClearField added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) ClearIgdbID added in v1.2.4

func (m *TwitchCategoryMutation) ClearIgdbID()

ClearIgdbID clears the value of the "igdb_id" field.

func (*TwitchCategoryMutation) ClearedEdges added in v1.2.4

func (m *TwitchCategoryMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*TwitchCategoryMutation) ClearedFields added in v1.2.4

func (m *TwitchCategoryMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (TwitchCategoryMutation) Client added in v1.2.4

func (m TwitchCategoryMutation) 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 (*TwitchCategoryMutation) CreatedAt added in v1.2.4

func (m *TwitchCategoryMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*TwitchCategoryMutation) EdgeCleared added in v1.2.4

func (m *TwitchCategoryMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*TwitchCategoryMutation) Field added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) FieldCleared added in v1.2.4

func (m *TwitchCategoryMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*TwitchCategoryMutation) Fields added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) ID added in v1.2.4

func (m *TwitchCategoryMutation) ID() (id string, 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 (*TwitchCategoryMutation) IDs added in v1.2.4

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 (*TwitchCategoryMutation) IgdbID added in v1.2.4

func (m *TwitchCategoryMutation) IgdbID() (r string, exists bool)

IgdbID returns the value of the "igdb_id" field in the mutation.

func (*TwitchCategoryMutation) IgdbIDCleared added in v1.2.4

func (m *TwitchCategoryMutation) IgdbIDCleared() bool

IgdbIDCleared returns if the "igdb_id" field was cleared in this mutation.

func (*TwitchCategoryMutation) Name added in v1.2.4

func (m *TwitchCategoryMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*TwitchCategoryMutation) OldBoxArtURL added in v1.2.4

func (m *TwitchCategoryMutation) OldBoxArtURL(ctx context.Context) (v string, err error)

OldBoxArtURL returns the old "box_art_url" field's value of the TwitchCategory entity. If the TwitchCategory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TwitchCategoryMutation) OldCreatedAt added in v1.2.4

func (m *TwitchCategoryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the TwitchCategory entity. If the TwitchCategory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TwitchCategoryMutation) OldField added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) OldIgdbID added in v1.2.4

func (m *TwitchCategoryMutation) OldIgdbID(ctx context.Context) (v string, err error)

OldIgdbID returns the old "igdb_id" field's value of the TwitchCategory entity. If the TwitchCategory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TwitchCategoryMutation) OldName added in v1.2.4

func (m *TwitchCategoryMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the TwitchCategory entity. If the TwitchCategory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TwitchCategoryMutation) OldUpdatedAt added in v1.2.4

func (m *TwitchCategoryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the TwitchCategory entity. If the TwitchCategory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*TwitchCategoryMutation) Op added in v1.2.4

func (m *TwitchCategoryMutation) Op() Op

Op returns the operation name.

func (*TwitchCategoryMutation) RemovedEdges added in v1.2.4

func (m *TwitchCategoryMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*TwitchCategoryMutation) RemovedIDs added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) ResetBoxArtURL added in v1.2.4

func (m *TwitchCategoryMutation) ResetBoxArtURL()

ResetBoxArtURL resets all changes to the "box_art_url" field.

func (*TwitchCategoryMutation) ResetCreatedAt added in v1.2.4

func (m *TwitchCategoryMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*TwitchCategoryMutation) ResetEdge added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) ResetField added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) ResetIgdbID added in v1.2.4

func (m *TwitchCategoryMutation) ResetIgdbID()

ResetIgdbID resets all changes to the "igdb_id" field.

func (*TwitchCategoryMutation) ResetName added in v1.2.4

func (m *TwitchCategoryMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*TwitchCategoryMutation) ResetUpdatedAt added in v1.2.4

func (m *TwitchCategoryMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*TwitchCategoryMutation) SetBoxArtURL added in v1.2.4

func (m *TwitchCategoryMutation) SetBoxArtURL(s string)

SetBoxArtURL sets the "box_art_url" field.

func (*TwitchCategoryMutation) SetCreatedAt added in v1.2.4

func (m *TwitchCategoryMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*TwitchCategoryMutation) SetField added in v1.2.4

func (m *TwitchCategoryMutation) 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 (*TwitchCategoryMutation) SetID added in v1.2.4

func (m *TwitchCategoryMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of TwitchCategory entities.

func (*TwitchCategoryMutation) SetIgdbID added in v1.2.4

func (m *TwitchCategoryMutation) SetIgdbID(s string)

SetIgdbID sets the "igdb_id" field.

func (*TwitchCategoryMutation) SetName added in v1.2.4

func (m *TwitchCategoryMutation) SetName(s string)

SetName sets the "name" field.

func (*TwitchCategoryMutation) SetOp added in v1.2.4

func (m *TwitchCategoryMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*TwitchCategoryMutation) SetUpdatedAt added in v1.2.4

func (m *TwitchCategoryMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (TwitchCategoryMutation) Tx added in v1.2.4

func (m TwitchCategoryMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*TwitchCategoryMutation) Type added in v1.2.4

func (m *TwitchCategoryMutation) Type() string

Type returns the node type of this mutation (TwitchCategory).

func (*TwitchCategoryMutation) UpdatedAt added in v1.2.4

func (m *TwitchCategoryMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*TwitchCategoryMutation) Where added in v1.2.4

Where appends a list predicates to the TwitchCategoryMutation builder.

func (*TwitchCategoryMutation) WhereP added in v1.2.4

func (m *TwitchCategoryMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the TwitchCategoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type TwitchCategoryQuery added in v1.2.4

type TwitchCategoryQuery struct {
	// contains filtered or unexported fields
}

TwitchCategoryQuery is the builder for querying TwitchCategory entities.

func (*TwitchCategoryQuery) Aggregate added in v1.2.4

func (tcq *TwitchCategoryQuery) Aggregate(fns ...AggregateFunc) *TwitchCategorySelect

Aggregate returns a TwitchCategorySelect configured with the given aggregations.

func (*TwitchCategoryQuery) All added in v1.2.4

All executes the query and returns a list of TwitchCategories.

func (*TwitchCategoryQuery) AllX added in v1.2.4

AllX is like All, but panics if an error occurs.

func (*TwitchCategoryQuery) Clone added in v1.2.4

Clone returns a duplicate of the TwitchCategoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*TwitchCategoryQuery) Count added in v1.2.4

func (tcq *TwitchCategoryQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TwitchCategoryQuery) CountX added in v1.2.4

func (tcq *TwitchCategoryQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*TwitchCategoryQuery) Exist added in v1.2.4

func (tcq *TwitchCategoryQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*TwitchCategoryQuery) ExistX added in v1.2.4

func (tcq *TwitchCategoryQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*TwitchCategoryQuery) First added in v1.2.4

First returns the first TwitchCategory entity from the query. Returns a *NotFoundError when no TwitchCategory was found.

func (*TwitchCategoryQuery) FirstID added in v1.2.4

func (tcq *TwitchCategoryQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first TwitchCategory ID from the query. Returns a *NotFoundError when no TwitchCategory ID was found.

func (*TwitchCategoryQuery) FirstIDX added in v1.2.4

func (tcq *TwitchCategoryQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*TwitchCategoryQuery) FirstX added in v1.2.4

FirstX is like First, but panics if an error occurs.

func (*TwitchCategoryQuery) GroupBy added in v1.2.4

func (tcq *TwitchCategoryQuery) GroupBy(field string, fields ...string) *TwitchCategoryGroupBy

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.TwitchCategory.Query().
	GroupBy(twitchcategory.FieldName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TwitchCategoryQuery) IDs added in v1.2.4

func (tcq *TwitchCategoryQuery) IDs(ctx context.Context) (ids []string, err error)

IDs executes the query and returns a list of TwitchCategory IDs.

func (*TwitchCategoryQuery) IDsX added in v1.2.4

func (tcq *TwitchCategoryQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*TwitchCategoryQuery) Limit added in v1.2.4

func (tcq *TwitchCategoryQuery) Limit(limit int) *TwitchCategoryQuery

Limit the number of records to be returned by this query.

func (*TwitchCategoryQuery) Offset added in v1.2.4

func (tcq *TwitchCategoryQuery) Offset(offset int) *TwitchCategoryQuery

Offset to start from.

func (*TwitchCategoryQuery) Only added in v1.2.4

Only returns a single TwitchCategory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TwitchCategory entity is found. Returns a *NotFoundError when no TwitchCategory entities are found.

func (*TwitchCategoryQuery) OnlyID added in v1.2.4

func (tcq *TwitchCategoryQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only TwitchCategory ID in the query. Returns a *NotSingularError when more than one TwitchCategory ID is found. Returns a *NotFoundError when no entities are found.

func (*TwitchCategoryQuery) OnlyIDX added in v1.2.4

func (tcq *TwitchCategoryQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*TwitchCategoryQuery) OnlyX added in v1.2.4

OnlyX is like Only, but panics if an error occurs.

func (*TwitchCategoryQuery) Order added in v1.2.4

Order specifies how the records should be ordered.

func (*TwitchCategoryQuery) Select added in v1.2.4

func (tcq *TwitchCategoryQuery) Select(fields ...string) *TwitchCategorySelect

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.TwitchCategory.Query().
	Select(twitchcategory.FieldName).
	Scan(ctx, &v)

func (*TwitchCategoryQuery) Unique added in v1.2.4

func (tcq *TwitchCategoryQuery) Unique(unique bool) *TwitchCategoryQuery

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 (*TwitchCategoryQuery) Where added in v1.2.4

Where adds a new predicate for the TwitchCategoryQuery builder.

type TwitchCategorySelect added in v1.2.4

type TwitchCategorySelect struct {
	*TwitchCategoryQuery
	// contains filtered or unexported fields
}

TwitchCategorySelect is the builder for selecting fields of TwitchCategory entities.

func (*TwitchCategorySelect) Aggregate added in v1.2.4

Aggregate adds the given aggregation functions to the selector query.

func (*TwitchCategorySelect) Bool added in v1.2.4

func (s *TwitchCategorySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*TwitchCategorySelect) BoolX added in v1.2.4

func (s *TwitchCategorySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*TwitchCategorySelect) Bools added in v1.2.4

func (s *TwitchCategorySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*TwitchCategorySelect) BoolsX added in v1.2.4

func (s *TwitchCategorySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*TwitchCategorySelect) Float64 added in v1.2.4

func (s *TwitchCategorySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*TwitchCategorySelect) Float64X added in v1.2.4

func (s *TwitchCategorySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*TwitchCategorySelect) Float64s added in v1.2.4

func (s *TwitchCategorySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*TwitchCategorySelect) Float64sX added in v1.2.4

func (s *TwitchCategorySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*TwitchCategorySelect) Int added in v1.2.4

func (s *TwitchCategorySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*TwitchCategorySelect) IntX added in v1.2.4

func (s *TwitchCategorySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*TwitchCategorySelect) Ints added in v1.2.4

func (s *TwitchCategorySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*TwitchCategorySelect) IntsX added in v1.2.4

func (s *TwitchCategorySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*TwitchCategorySelect) Scan added in v1.2.4

func (tcs *TwitchCategorySelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*TwitchCategorySelect) ScanX added in v1.2.4

func (s *TwitchCategorySelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*TwitchCategorySelect) String added in v1.2.4

func (s *TwitchCategorySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*TwitchCategorySelect) StringX added in v1.2.4

func (s *TwitchCategorySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*TwitchCategorySelect) Strings added in v1.2.4

func (s *TwitchCategorySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*TwitchCategorySelect) StringsX added in v1.2.4

func (s *TwitchCategorySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type TwitchCategoryUpdate added in v1.2.4

type TwitchCategoryUpdate struct {
	// contains filtered or unexported fields
}

TwitchCategoryUpdate is the builder for updating TwitchCategory entities.

func (*TwitchCategoryUpdate) ClearBoxArtURL added in v1.2.4

func (tcu *TwitchCategoryUpdate) ClearBoxArtURL() *TwitchCategoryUpdate

ClearBoxArtURL clears the value of the "box_art_url" field.

func (*TwitchCategoryUpdate) ClearIgdbID added in v1.2.4

func (tcu *TwitchCategoryUpdate) ClearIgdbID() *TwitchCategoryUpdate

ClearIgdbID clears the value of the "igdb_id" field.

func (*TwitchCategoryUpdate) Exec added in v1.2.4

func (tcu *TwitchCategoryUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TwitchCategoryUpdate) ExecX added in v1.2.4

func (tcu *TwitchCategoryUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TwitchCategoryUpdate) Mutation added in v1.2.4

Mutation returns the TwitchCategoryMutation object of the builder.

func (*TwitchCategoryUpdate) Save added in v1.2.4

func (tcu *TwitchCategoryUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*TwitchCategoryUpdate) SaveX added in v1.2.4

func (tcu *TwitchCategoryUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*TwitchCategoryUpdate) SetBoxArtURL added in v1.2.4

func (tcu *TwitchCategoryUpdate) SetBoxArtURL(s string) *TwitchCategoryUpdate

SetBoxArtURL sets the "box_art_url" field.

func (*TwitchCategoryUpdate) SetIgdbID added in v1.2.4

SetIgdbID sets the "igdb_id" field.

func (*TwitchCategoryUpdate) SetName added in v1.2.4

SetName sets the "name" field.

func (*TwitchCategoryUpdate) SetNillableBoxArtURL added in v1.2.4

func (tcu *TwitchCategoryUpdate) SetNillableBoxArtURL(s *string) *TwitchCategoryUpdate

SetNillableBoxArtURL sets the "box_art_url" field if the given value is not nil.

func (*TwitchCategoryUpdate) SetNillableIgdbID added in v1.2.4

func (tcu *TwitchCategoryUpdate) SetNillableIgdbID(s *string) *TwitchCategoryUpdate

SetNillableIgdbID sets the "igdb_id" field if the given value is not nil.

func (*TwitchCategoryUpdate) SetUpdatedAt added in v1.2.4

func (tcu *TwitchCategoryUpdate) SetUpdatedAt(t time.Time) *TwitchCategoryUpdate

SetUpdatedAt sets the "updated_at" field.

func (*TwitchCategoryUpdate) Where added in v1.2.4

Where appends a list predicates to the TwitchCategoryUpdate builder.

type TwitchCategoryUpdateOne added in v1.2.4

type TwitchCategoryUpdateOne struct {
	// contains filtered or unexported fields
}

TwitchCategoryUpdateOne is the builder for updating a single TwitchCategory entity.

func (*TwitchCategoryUpdateOne) ClearBoxArtURL added in v1.2.4

func (tcuo *TwitchCategoryUpdateOne) ClearBoxArtURL() *TwitchCategoryUpdateOne

ClearBoxArtURL clears the value of the "box_art_url" field.

func (*TwitchCategoryUpdateOne) ClearIgdbID added in v1.2.4

func (tcuo *TwitchCategoryUpdateOne) ClearIgdbID() *TwitchCategoryUpdateOne

ClearIgdbID clears the value of the "igdb_id" field.

func (*TwitchCategoryUpdateOne) Exec added in v1.2.4

func (tcuo *TwitchCategoryUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TwitchCategoryUpdateOne) ExecX added in v1.2.4

func (tcuo *TwitchCategoryUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TwitchCategoryUpdateOne) Mutation added in v1.2.4

Mutation returns the TwitchCategoryMutation object of the builder.

func (*TwitchCategoryUpdateOne) Save added in v1.2.4

Save executes the query and returns the updated TwitchCategory entity.

func (*TwitchCategoryUpdateOne) SaveX added in v1.2.4

SaveX is like Save, but panics if an error occurs.

func (*TwitchCategoryUpdateOne) Select added in v1.2.4

func (tcuo *TwitchCategoryUpdateOne) Select(field string, fields ...string) *TwitchCategoryUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*TwitchCategoryUpdateOne) SetBoxArtURL added in v1.2.4

SetBoxArtURL sets the "box_art_url" field.

func (*TwitchCategoryUpdateOne) SetIgdbID added in v1.2.4

SetIgdbID sets the "igdb_id" field.

func (*TwitchCategoryUpdateOne) SetName added in v1.2.4

SetName sets the "name" field.

func (*TwitchCategoryUpdateOne) SetNillableBoxArtURL added in v1.2.4

func (tcuo *TwitchCategoryUpdateOne) SetNillableBoxArtURL(s *string) *TwitchCategoryUpdateOne

SetNillableBoxArtURL sets the "box_art_url" field if the given value is not nil.

func (*TwitchCategoryUpdateOne) SetNillableIgdbID added in v1.2.4

func (tcuo *TwitchCategoryUpdateOne) SetNillableIgdbID(s *string) *TwitchCategoryUpdateOne

SetNillableIgdbID sets the "igdb_id" field if the given value is not nil.

func (*TwitchCategoryUpdateOne) SetUpdatedAt added in v1.2.4

SetUpdatedAt sets the "updated_at" field.

func (*TwitchCategoryUpdateOne) Where added in v1.2.4

Where appends a list predicates to the TwitchCategoryUpdate builder.

type TwitchCategoryUpsert added in v1.2.4

type TwitchCategoryUpsert struct {
	*sql.UpdateSet
}

TwitchCategoryUpsert is the "OnConflict" setter.

func (*TwitchCategoryUpsert) ClearBoxArtURL added in v1.2.4

func (u *TwitchCategoryUpsert) ClearBoxArtURL() *TwitchCategoryUpsert

ClearBoxArtURL clears the value of the "box_art_url" field.

func (*TwitchCategoryUpsert) ClearIgdbID added in v1.2.4

func (u *TwitchCategoryUpsert) ClearIgdbID() *TwitchCategoryUpsert

ClearIgdbID clears the value of the "igdb_id" field.

func (*TwitchCategoryUpsert) SetBoxArtURL added in v1.2.4

func (u *TwitchCategoryUpsert) SetBoxArtURL(v string) *TwitchCategoryUpsert

SetBoxArtURL sets the "box_art_url" field.

func (*TwitchCategoryUpsert) SetIgdbID added in v1.2.4

SetIgdbID sets the "igdb_id" field.

func (*TwitchCategoryUpsert) SetName added in v1.2.4

SetName sets the "name" field.

func (*TwitchCategoryUpsert) SetUpdatedAt added in v1.2.4

func (u *TwitchCategoryUpsert) SetUpdatedAt(v time.Time) *TwitchCategoryUpsert

SetUpdatedAt sets the "updated_at" field.

func (*TwitchCategoryUpsert) UpdateBoxArtURL added in v1.2.4

func (u *TwitchCategoryUpsert) UpdateBoxArtURL() *TwitchCategoryUpsert

UpdateBoxArtURL sets the "box_art_url" field to the value that was provided on create.

func (*TwitchCategoryUpsert) UpdateIgdbID added in v1.2.4

func (u *TwitchCategoryUpsert) UpdateIgdbID() *TwitchCategoryUpsert

UpdateIgdbID sets the "igdb_id" field to the value that was provided on create.

func (*TwitchCategoryUpsert) UpdateName added in v1.2.4

func (u *TwitchCategoryUpsert) UpdateName() *TwitchCategoryUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*TwitchCategoryUpsert) UpdateUpdatedAt added in v1.2.4

func (u *TwitchCategoryUpsert) UpdateUpdatedAt() *TwitchCategoryUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type TwitchCategoryUpsertBulk added in v1.2.4

type TwitchCategoryUpsertBulk struct {
	// contains filtered or unexported fields
}

TwitchCategoryUpsertBulk is the builder for "upsert"-ing a bulk of TwitchCategory nodes.

func (*TwitchCategoryUpsertBulk) ClearBoxArtURL added in v1.2.4

ClearBoxArtURL clears the value of the "box_art_url" field.

func (*TwitchCategoryUpsertBulk) ClearIgdbID added in v1.2.4

ClearIgdbID clears the value of the "igdb_id" field.

func (*TwitchCategoryUpsertBulk) DoNothing added in v1.2.4

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TwitchCategoryUpsertBulk) Exec added in v1.2.4

Exec executes the query.

func (*TwitchCategoryUpsertBulk) ExecX added in v1.2.4

ExecX is like Exec, but panics if an error occurs.

func (*TwitchCategoryUpsertBulk) Ignore added in v1.2.4

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TwitchCategory.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*TwitchCategoryUpsertBulk) SetBoxArtURL added in v1.2.4

SetBoxArtURL sets the "box_art_url" field.

func (*TwitchCategoryUpsertBulk) SetIgdbID added in v1.2.4

SetIgdbID sets the "igdb_id" field.

func (*TwitchCategoryUpsertBulk) SetName added in v1.2.4

SetName sets the "name" field.

func (*TwitchCategoryUpsertBulk) SetUpdatedAt added in v1.2.4

SetUpdatedAt sets the "updated_at" field.

func (*TwitchCategoryUpsertBulk) Update added in v1.2.4

Update allows overriding fields `UPDATE` values. See the TwitchCategoryCreateBulk.OnConflict documentation for more info.

func (*TwitchCategoryUpsertBulk) UpdateBoxArtURL added in v1.2.4

func (u *TwitchCategoryUpsertBulk) UpdateBoxArtURL() *TwitchCategoryUpsertBulk

UpdateBoxArtURL sets the "box_art_url" field to the value that was provided on create.

func (*TwitchCategoryUpsertBulk) UpdateIgdbID added in v1.2.4

UpdateIgdbID sets the "igdb_id" field to the value that was provided on create.

func (*TwitchCategoryUpsertBulk) UpdateName added in v1.2.4

UpdateName sets the "name" field to the value that was provided on create.

func (*TwitchCategoryUpsertBulk) UpdateNewValues added in v1.2.4

func (u *TwitchCategoryUpsertBulk) UpdateNewValues() *TwitchCategoryUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.TwitchCategory.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(twitchcategory.FieldID)
		}),
	).
	Exec(ctx)

func (*TwitchCategoryUpsertBulk) UpdateUpdatedAt added in v1.2.4

func (u *TwitchCategoryUpsertBulk) UpdateUpdatedAt() *TwitchCategoryUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type TwitchCategoryUpsertOne added in v1.2.4

type TwitchCategoryUpsertOne struct {
	// contains filtered or unexported fields
}

TwitchCategoryUpsertOne is the builder for "upsert"-ing

one TwitchCategory node.

func (*TwitchCategoryUpsertOne) ClearBoxArtURL added in v1.2.4

func (u *TwitchCategoryUpsertOne) ClearBoxArtURL() *TwitchCategoryUpsertOne

ClearBoxArtURL clears the value of the "box_art_url" field.

func (*TwitchCategoryUpsertOne) ClearIgdbID added in v1.2.4

ClearIgdbID clears the value of the "igdb_id" field.

func (*TwitchCategoryUpsertOne) DoNothing added in v1.2.4

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*TwitchCategoryUpsertOne) Exec added in v1.2.4

Exec executes the query.

func (*TwitchCategoryUpsertOne) ExecX added in v1.2.4

func (u *TwitchCategoryUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*TwitchCategoryUpsertOne) ID added in v1.2.4

func (u *TwitchCategoryUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*TwitchCategoryUpsertOne) IDX added in v1.2.4

IDX is like ID, but panics if an error occurs.

func (*TwitchCategoryUpsertOne) Ignore added in v1.2.4

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.TwitchCategory.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*TwitchCategoryUpsertOne) SetBoxArtURL added in v1.2.4

SetBoxArtURL sets the "box_art_url" field.

func (*TwitchCategoryUpsertOne) SetIgdbID added in v1.2.4

SetIgdbID sets the "igdb_id" field.

func (*TwitchCategoryUpsertOne) SetName added in v1.2.4

SetName sets the "name" field.

func (*TwitchCategoryUpsertOne) SetUpdatedAt added in v1.2.4

SetUpdatedAt sets the "updated_at" field.

func (*TwitchCategoryUpsertOne) Update added in v1.2.4

Update allows overriding fields `UPDATE` values. See the TwitchCategoryCreate.OnConflict documentation for more info.

func (*TwitchCategoryUpsertOne) UpdateBoxArtURL added in v1.2.4

func (u *TwitchCategoryUpsertOne) UpdateBoxArtURL() *TwitchCategoryUpsertOne

UpdateBoxArtURL sets the "box_art_url" field to the value that was provided on create.

func (*TwitchCategoryUpsertOne) UpdateIgdbID added in v1.2.4

UpdateIgdbID sets the "igdb_id" field to the value that was provided on create.

func (*TwitchCategoryUpsertOne) UpdateName added in v1.2.4

UpdateName sets the "name" field to the value that was provided on create.

func (*TwitchCategoryUpsertOne) UpdateNewValues added in v1.2.4

func (u *TwitchCategoryUpsertOne) UpdateNewValues() *TwitchCategoryUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.TwitchCategory.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(twitchcategory.FieldID)
		}),
	).
	Exec(ctx)

func (*TwitchCategoryUpsertOne) UpdateUpdatedAt added in v1.2.4

func (u *TwitchCategoryUpsertOne) UpdateUpdatedAt() *TwitchCategoryUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type Tx

type Tx struct {

	// Channel is the client for interacting with the Channel builders.
	Channel *ChannelClient
	// Live is the client for interacting with the Live builders.
	Live *LiveClient
	// LiveCategory is the client for interacting with the LiveCategory builders.
	LiveCategory *LiveCategoryClient
	// Playback is the client for interacting with the Playback builders.
	Playback *PlaybackClient
	// Playlist is the client for interacting with the Playlist builders.
	Playlist *PlaylistClient
	// Queue is the client for interacting with the Queue builders.
	Queue *QueueClient
	// TwitchCategory is the client for interacting with the TwitchCategory builders.
	TwitchCategory *TwitchCategoryClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// Vod is the client for interacting with the Vod builders.
	Vod *VodClient
	// 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 uuid.UUID `json:"id,omitempty"`
	// Sub holds the value of the "sub" field.
	Sub string `json:"sub,omitempty"`
	// Username holds the value of the "username" field.
	Username string `json:"username,omitempty"`
	// Password holds the value of the "password" field.
	Password string `json:"-"`
	// Oauth holds the value of the "oauth" field.
	Oauth bool `json:"oauth,omitempty"`
	// Role holds the value of the "role" field.
	Role utils.Role `json:"role,omitempty"`
	// Webhook holds the value of the "webhook" field.
	Webhook string `json:"webhook,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

func (*User) Value added in v1.2.12

func (u *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(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept added in v1.1.7

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 added in v1.1.7

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) OnConflict added in v0.0.2

func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetSub(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetSub(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns added in v0.0.2

func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetCreatedAt

func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetNillableCreatedAt

func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetNillableID

func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*UserCreate) SetNillableOauth added in v1.0.8

func (uc *UserCreate) SetNillableOauth(b *bool) *UserCreate

SetNillableOauth sets the "oauth" field if the given value is not nil.

func (*UserCreate) SetNillablePassword added in v1.0.8

func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserCreate) SetNillableRole

func (uc *UserCreate) SetNillableRole(u *utils.Role) *UserCreate

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserCreate) SetNillableSub added in v1.0.8

func (uc *UserCreate) SetNillableSub(s *string) *UserCreate

SetNillableSub sets the "sub" field if the given value is not nil.

func (*UserCreate) SetNillableUpdatedAt

func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserCreate) SetNillableWebhook

func (uc *UserCreate) SetNillableWebhook(s *string) *UserCreate

SetNillableWebhook sets the "webhook" field if the given value is not nil.

func (*UserCreate) SetOauth added in v1.0.8

func (uc *UserCreate) SetOauth(b bool) *UserCreate

SetOauth sets the "oauth" field.

func (*UserCreate) SetPassword

func (uc *UserCreate) SetPassword(s string) *UserCreate

SetPassword sets the "password" field.

func (*UserCreate) SetRole

func (uc *UserCreate) SetRole(u utils.Role) *UserCreate

SetRole sets the "role" field.

func (*UserCreate) SetSub added in v1.0.8

func (uc *UserCreate) SetSub(s string) *UserCreate

SetSub sets the "sub" field.

func (*UserCreate) SetUpdatedAt

func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate

SetUpdatedAt sets the "updated_at" field.

func (*UserCreate) SetUsername

func (uc *UserCreate) SetUsername(s string) *UserCreate

SetUsername sets the "username" field.

func (*UserCreate) SetWebhook

func (uc *UserCreate) SetWebhook(s string) *UserCreate

SetWebhook sets the "webhook" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) OnConflict added in v0.0.2

func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetSub(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns added in v0.0.2

func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where added in v1.2.4

func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) 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) ClearPassword added in v1.0.8

func (m *UserMutation) ClearPassword()

ClearPassword clears the value of the "password" field.

func (*UserMutation) ClearSub added in v1.0.8

func (m *UserMutation) ClearSub()

ClearSub clears the value of the "sub" field.

func (*UserMutation) ClearWebhook

func (m *UserMutation) ClearWebhook()

ClearWebhook clears the value of the "webhook" field.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) ID

func (m *UserMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserMutation) Oauth added in v1.0.8

func (m *UserMutation) Oauth() (r bool, exists bool)

Oauth returns the value of the "oauth" field in the mutation.

func (*UserMutation) OldCreatedAt

func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) 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) OldOauth added in v1.0.8

func (m *UserMutation) OldOauth(ctx context.Context) (v bool, err error)

OldOauth returns the old "oauth" 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) OldPassword

func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)

OldPassword returns the old "password" 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 utils.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) OldSub added in v1.0.8

func (m *UserMutation) OldSub(ctx context.Context) (v string, err error)

OldSub returns the old "sub" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUpdatedAt

func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUsername

func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)

OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldWebhook

func (m *UserMutation) OldWebhook(ctx context.Context) (v string, err error)

OldWebhook returns the old "webhook" 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) Password

func (m *UserMutation) Password() (r string, exists bool)

Password returns the value of the "password" field in the mutation.

func (*UserMutation) PasswordCleared added in v1.0.8

func (m *UserMutation) PasswordCleared() bool

PasswordCleared returns if the "password" field was cleared in this mutation.

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) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" 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) 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) ResetOauth added in v1.0.8

func (m *UserMutation) ResetOauth()

ResetOauth resets all changes to the "oauth" field.

func (*UserMutation) ResetPassword

func (m *UserMutation) ResetPassword()

ResetPassword resets all changes to the "password" field.

func (*UserMutation) ResetRole

func (m *UserMutation) ResetRole()

ResetRole resets all changes to the "role" field.

func (*UserMutation) ResetSub added in v1.0.8

func (m *UserMutation) ResetSub()

ResetSub resets all changes to the "sub" field.

func (*UserMutation) ResetUpdatedAt

func (m *UserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserMutation) ResetUsername

func (m *UserMutation) ResetUsername()

ResetUsername resets all changes to the "username" field.

func (*UserMutation) ResetWebhook

func (m *UserMutation) ResetWebhook()

ResetWebhook resets all changes to the "webhook" field.

func (*UserMutation) Role

func (m *UserMutation) Role() (r utils.Role, exists bool)

Role returns the value of the "role" field in the mutation.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetOauth added in v1.0.8

func (m *UserMutation) SetOauth(b bool)

SetOauth sets the "oauth" field.

func (*UserMutation) SetOp added in v1.1.7

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetPassword

func (m *UserMutation) SetPassword(s string)

SetPassword sets the "password" field.

func (*UserMutation) SetRole

func (m *UserMutation) SetRole(u utils.Role)

SetRole sets the "role" field.

func (*UserMutation) SetSub added in v1.0.8

func (m *UserMutation) SetSub(s string)

SetSub sets the "sub" field.

func (*UserMutation) SetUpdatedAt

func (m *UserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserMutation) SetUsername

func (m *UserMutation) SetUsername(s string)

SetUsername sets the "username" field.

func (*UserMutation) SetWebhook

func (m *UserMutation) SetWebhook(s string)

SetWebhook sets the "webhook" field.

func (*UserMutation) Sub added in v1.0.8

func (m *UserMutation) Sub() (r string, exists bool)

Sub returns the value of the "sub" field in the mutation.

func (*UserMutation) SubCleared added in v1.0.8

func (m *UserMutation) SubCleared() bool

SubCleared returns if the "sub" field was cleared in this mutation.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) UpdatedAt

func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserMutation) Username

func (m *UserMutation) Username() (r string, exists bool)

Username returns the value of the "username" field in the mutation.

func (*UserMutation) Webhook

func (m *UserMutation) Webhook() (r string, exists bool)

Webhook returns the value of the "webhook" field in the mutation.

func (*UserMutation) WebhookCleared

func (m *UserMutation) WebhookCleared() bool

WebhookCleared returns if the "webhook" field was cleared in this mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP added in v1.1.7

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 added in v1.1.7

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Sub string `json:"sub,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldSub).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Sub string `json:"sub,omitempty"`
}

client.User.Query().
	Select(user.FieldSub).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate added in v1.1.7

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v 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) ClearPassword added in v1.0.8

func (uu *UserUpdate) ClearPassword() *UserUpdate

ClearPassword clears the value of the "password" field.

func (*UserUpdate) ClearSub added in v1.0.8

func (uu *UserUpdate) ClearSub() *UserUpdate

ClearSub clears the value of the "sub" field.

func (*UserUpdate) ClearWebhook

func (uu *UserUpdate) ClearWebhook() *UserUpdate

ClearWebhook clears the value of the "webhook" field.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetNillableOauth added in v1.0.8

func (uu *UserUpdate) SetNillableOauth(b *bool) *UserUpdate

SetNillableOauth sets the "oauth" field if the given value is not nil.

func (*UserUpdate) SetNillablePassword added in v1.0.8

func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserUpdate) SetNillableRole

func (uu *UserUpdate) SetNillableRole(u *utils.Role) *UserUpdate

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserUpdate) SetNillableSub added in v1.0.8

func (uu *UserUpdate) SetNillableSub(s *string) *UserUpdate

SetNillableSub sets the "sub" field if the given value is not nil.

func (*UserUpdate) SetNillableWebhook

func (uu *UserUpdate) SetNillableWebhook(s *string) *UserUpdate

SetNillableWebhook sets the "webhook" field if the given value is not nil.

func (*UserUpdate) SetOauth added in v1.0.8

func (uu *UserUpdate) SetOauth(b bool) *UserUpdate

SetOauth sets the "oauth" field.

func (*UserUpdate) SetPassword

func (uu *UserUpdate) SetPassword(s string) *UserUpdate

SetPassword sets the "password" field.

func (*UserUpdate) SetRole

func (uu *UserUpdate) SetRole(u utils.Role) *UserUpdate

SetRole sets the "role" field.

func (*UserUpdate) SetSub added in v1.0.8

func (uu *UserUpdate) SetSub(s string) *UserUpdate

SetSub sets the "sub" field.

func (*UserUpdate) SetUpdatedAt

func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdate) SetUsername

func (uu *UserUpdate) SetUsername(s string) *UserUpdate

SetUsername sets the "username" field.

func (*UserUpdate) SetWebhook

func (uu *UserUpdate) SetWebhook(s string) *UserUpdate

SetWebhook sets the "webhook" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) ClearPassword added in v1.0.8

func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne

ClearPassword clears the value of the "password" field.

func (*UserUpdateOne) ClearSub added in v1.0.8

func (uuo *UserUpdateOne) ClearSub() *UserUpdateOne

ClearSub clears the value of the "sub" field.

func (*UserUpdateOne) ClearWebhook

func (uuo *UserUpdateOne) ClearWebhook() *UserUpdateOne

ClearWebhook clears the value of the "webhook" field.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetNillableOauth added in v1.0.8

func (uuo *UserUpdateOne) SetNillableOauth(b *bool) *UserUpdateOne

SetNillableOauth sets the "oauth" field if the given value is not nil.

func (*UserUpdateOne) SetNillablePassword added in v1.0.8

func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne

SetNillablePassword sets the "password" field if the given value is not nil.

func (*UserUpdateOne) SetNillableRole

func (uuo *UserUpdateOne) SetNillableRole(u *utils.Role) *UserUpdateOne

SetNillableRole sets the "role" field if the given value is not nil.

func (*UserUpdateOne) SetNillableSub added in v1.0.8

func (uuo *UserUpdateOne) SetNillableSub(s *string) *UserUpdateOne

SetNillableSub sets the "sub" field if the given value is not nil.

func (*UserUpdateOne) SetNillableWebhook

func (uuo *UserUpdateOne) SetNillableWebhook(s *string) *UserUpdateOne

SetNillableWebhook sets the "webhook" field if the given value is not nil.

func (*UserUpdateOne) SetOauth added in v1.0.8

func (uuo *UserUpdateOne) SetOauth(b bool) *UserUpdateOne

SetOauth sets the "oauth" field.

func (*UserUpdateOne) SetPassword

func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne

SetPassword sets the "password" field.

func (*UserUpdateOne) SetRole

func (uuo *UserUpdateOne) SetRole(u utils.Role) *UserUpdateOne

SetRole sets the "role" field.

func (*UserUpdateOne) SetSub added in v1.0.8

func (uuo *UserUpdateOne) SetSub(s string) *UserUpdateOne

SetSub sets the "sub" field.

func (*UserUpdateOne) SetUpdatedAt

func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdateOne) SetUsername

func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne

SetUsername sets the "username" field.

func (*UserUpdateOne) SetWebhook

func (uuo *UserUpdateOne) SetWebhook(s string) *UserUpdateOne

SetWebhook sets the "webhook" field.

func (*UserUpdateOne) Where added in v1.2.4

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type UserUpsert added in v0.0.2

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) ClearPassword added in v1.2.4

func (u *UserUpsert) ClearPassword() *UserUpsert

ClearPassword clears the value of the "password" field.

func (*UserUpsert) ClearSub added in v1.2.4

func (u *UserUpsert) ClearSub() *UserUpsert

ClearSub clears the value of the "sub" field.

func (*UserUpsert) ClearWebhook added in v0.0.2

func (u *UserUpsert) ClearWebhook() *UserUpsert

ClearWebhook clears the value of the "webhook" field.

func (*UserUpsert) SetOauth added in v1.2.4

func (u *UserUpsert) SetOauth(v bool) *UserUpsert

SetOauth sets the "oauth" field.

func (*UserUpsert) SetPassword added in v0.0.2

func (u *UserUpsert) SetPassword(v string) *UserUpsert

SetPassword sets the "password" field.

func (*UserUpsert) SetRole added in v0.0.2

func (u *UserUpsert) SetRole(v utils.Role) *UserUpsert

SetRole sets the "role" field.

func (*UserUpsert) SetSub added in v1.2.4

func (u *UserUpsert) SetSub(v string) *UserUpsert

SetSub sets the "sub" field.

func (*UserUpsert) SetUpdatedAt added in v0.0.2

func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsert) SetUsername added in v0.0.2

func (u *UserUpsert) SetUsername(v string) *UserUpsert

SetUsername sets the "username" field.

func (*UserUpsert) SetWebhook added in v0.0.2

func (u *UserUpsert) SetWebhook(v string) *UserUpsert

SetWebhook sets the "webhook" field.

func (*UserUpsert) UpdateOauth added in v1.2.4

func (u *UserUpsert) UpdateOauth() *UserUpsert

UpdateOauth sets the "oauth" field to the value that was provided on create.

func (*UserUpsert) UpdatePassword added in v0.0.2

func (u *UserUpsert) UpdatePassword() *UserUpsert

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserUpsert) UpdateRole added in v0.0.2

func (u *UserUpsert) UpdateRole() *UserUpsert

UpdateRole sets the "role" field to the value that was provided on create.

func (*UserUpsert) UpdateSub added in v1.2.4

func (u *UserUpsert) UpdateSub() *UserUpsert

UpdateSub sets the "sub" field to the value that was provided on create.

func (*UserUpsert) UpdateUpdatedAt added in v0.0.2

func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserUpsert) UpdateUsername added in v0.0.2

func (u *UserUpsert) UpdateUsername() *UserUpsert

UpdateUsername sets the "username" field to the value that was provided on create.

func (*UserUpsert) UpdateWebhook added in v0.0.2

func (u *UserUpsert) UpdateWebhook() *UserUpsert

UpdateWebhook sets the "webhook" field to the value that was provided on create.

type UserUpsertBulk added in v0.0.2

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) ClearPassword added in v1.2.4

func (u *UserUpsertBulk) ClearPassword() *UserUpsertBulk

ClearPassword clears the value of the "password" field.

func (*UserUpsertBulk) ClearSub added in v1.2.4

func (u *UserUpsertBulk) ClearSub() *UserUpsertBulk

ClearSub clears the value of the "sub" field.

func (*UserUpsertBulk) ClearWebhook added in v0.0.2

func (u *UserUpsertBulk) ClearWebhook() *UserUpsertBulk

ClearWebhook clears the value of the "webhook" field.

func (*UserUpsertBulk) DoNothing added in v0.0.2

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec added in v0.0.2

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX added in v0.0.2

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore added in v0.0.2

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetOauth added in v1.2.4

func (u *UserUpsertBulk) SetOauth(v bool) *UserUpsertBulk

SetOauth sets the "oauth" field.

func (*UserUpsertBulk) SetPassword added in v0.0.2

func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk

SetPassword sets the "password" field.

func (*UserUpsertBulk) SetRole added in v0.0.2

func (u *UserUpsertBulk) SetRole(v utils.Role) *UserUpsertBulk

SetRole sets the "role" field.

func (*UserUpsertBulk) SetSub added in v1.2.4

func (u *UserUpsertBulk) SetSub(v string) *UserUpsertBulk

SetSub sets the "sub" field.

func (*UserUpsertBulk) SetUpdatedAt added in v0.0.2

func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsertBulk) SetUsername added in v0.0.2

func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk

SetUsername sets the "username" field.

func (*UserUpsertBulk) SetWebhook added in v0.0.2

func (u *UserUpsertBulk) SetWebhook(v string) *UserUpsertBulk

SetWebhook sets the "webhook" field.

func (*UserUpsertBulk) Update added in v0.0.2

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateNewValues added in v0.0.2

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertBulk) UpdateOauth added in v1.2.4

func (u *UserUpsertBulk) UpdateOauth() *UserUpsertBulk

UpdateOauth sets the "oauth" field to the value that was provided on create.

func (*UserUpsertBulk) UpdatePassword added in v0.0.2

func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateRole added in v0.0.2

func (u *UserUpsertBulk) UpdateRole() *UserUpsertBulk

UpdateRole sets the "role" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateSub added in v1.2.4

func (u *UserUpsertBulk) UpdateSub() *UserUpsertBulk

UpdateSub sets the "sub" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUpdatedAt added in v0.0.2

func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateUsername added in v0.0.2

func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk

UpdateUsername sets the "username" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateWebhook added in v0.0.2

func (u *UserUpsertBulk) UpdateWebhook() *UserUpsertBulk

UpdateWebhook sets the "webhook" field to the value that was provided on create.

type UserUpsertOne added in v0.0.2

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) ClearPassword added in v1.2.4

func (u *UserUpsertOne) ClearPassword() *UserUpsertOne

ClearPassword clears the value of the "password" field.

func (*UserUpsertOne) ClearSub added in v1.2.4

func (u *UserUpsertOne) ClearSub() *UserUpsertOne

ClearSub clears the value of the "sub" field.

func (*UserUpsertOne) ClearWebhook added in v0.0.2

func (u *UserUpsertOne) ClearWebhook() *UserUpsertOne

ClearWebhook clears the value of the "webhook" field.

func (*UserUpsertOne) DoNothing added in v0.0.2

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec added in v0.0.2

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX added in v0.0.2

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID added in v0.0.2

func (u *UserUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX added in v0.0.2

func (u *UserUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore added in v0.0.2

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetOauth added in v1.2.4

func (u *UserUpsertOne) SetOauth(v bool) *UserUpsertOne

SetOauth sets the "oauth" field.

func (*UserUpsertOne) SetPassword added in v0.0.2

func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne

SetPassword sets the "password" field.

func (*UserUpsertOne) SetRole added in v0.0.2

func (u *UserUpsertOne) SetRole(v utils.Role) *UserUpsertOne

SetRole sets the "role" field.

func (*UserUpsertOne) SetSub added in v1.2.4

func (u *UserUpsertOne) SetSub(v string) *UserUpsertOne

SetSub sets the "sub" field.

func (*UserUpsertOne) SetUpdatedAt added in v0.0.2

func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*UserUpsertOne) SetUsername added in v0.0.2

func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne

SetUsername sets the "username" field.

func (*UserUpsertOne) SetWebhook added in v0.0.2

func (u *UserUpsertOne) SetWebhook(v string) *UserUpsertOne

SetWebhook sets the "webhook" field.

func (*UserUpsertOne) Update added in v0.0.2

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateNewValues added in v0.0.2

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertOne) UpdateOauth added in v1.2.4

func (u *UserUpsertOne) UpdateOauth() *UserUpsertOne

UpdateOauth sets the "oauth" field to the value that was provided on create.

func (*UserUpsertOne) UpdatePassword added in v0.0.2

func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne

UpdatePassword sets the "password" field to the value that was provided on create.

func (*UserUpsertOne) UpdateRole added in v0.0.2

func (u *UserUpsertOne) UpdateRole() *UserUpsertOne

UpdateRole sets the "role" field to the value that was provided on create.

func (*UserUpsertOne) UpdateSub added in v1.2.4

func (u *UserUpsertOne) UpdateSub() *UserUpsertOne

UpdateSub sets the "sub" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUpdatedAt added in v0.0.2

func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*UserUpsertOne) UpdateUsername added in v0.0.2

func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne

UpdateUsername sets the "username" field to the value that was provided on create.

func (*UserUpsertOne) UpdateWebhook added in v0.0.2

func (u *UserUpsertOne) UpdateWebhook() *UserUpsertOne

UpdateWebhook sets the "webhook" field to the value that was provided on create.

type Users

type Users []*User

Users is a parsable slice of User.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

type Vod

type Vod struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// ExtID holds the value of the "ext_id" field.
	ExtID string `json:"ext_id,omitempty"`
	// The platform the VOD is from, takes an enum.
	Platform utils.VodPlatform `json:"platform,omitempty"`
	// The type of VOD, takes an enum.
	Type utils.VodType `json:"type,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Duration holds the value of the "duration" field.
	Duration int `json:"duration,omitempty"`
	// Views holds the value of the "views" field.
	Views int `json:"views,omitempty"`
	// Resolution holds the value of the "resolution" field.
	Resolution string `json:"resolution,omitempty"`
	// Whether the VOD is currently processing.
	Processing bool `json:"processing,omitempty"`
	// ThumbnailPath holds the value of the "thumbnail_path" field.
	ThumbnailPath string `json:"thumbnail_path,omitempty"`
	// WebThumbnailPath holds the value of the "web_thumbnail_path" field.
	WebThumbnailPath string `json:"web_thumbnail_path,omitempty"`
	// VideoPath holds the value of the "video_path" field.
	VideoPath string `json:"video_path,omitempty"`
	// ChatPath holds the value of the "chat_path" field.
	ChatPath string `json:"chat_path,omitempty"`
	// ChatVideoPath holds the value of the "chat_video_path" field.
	ChatVideoPath string `json:"chat_video_path,omitempty"`
	// InfoPath holds the value of the "info_path" field.
	InfoPath string `json:"info_path,omitempty"`
	// CaptionPath holds the value of the "caption_path" field.
	CaptionPath string `json:"caption_path,omitempty"`
	// FolderName holds the value of the "folder_name" field.
	FolderName string `json:"folder_name,omitempty"`
	// FileName holds the value of the "file_name" field.
	FileName string `json:"file_name,omitempty"`
	// Locked holds the value of the "locked" field.
	Locked bool `json:"locked,omitempty"`
	// LocalViews holds the value of the "local_views" field.
	LocalViews int `json:"local_views,omitempty"`
	// The time the VOD was streamed.
	StreamedAt time.Time `json:"streamed_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VodQuery when eager-loading is set.
	Edges VodEdges `json:"edges"`
	// contains filtered or unexported fields
}

Vod is the model entity for the Vod schema.

func (*Vod) QueryChannel

func (v *Vod) QueryChannel() *ChannelQuery

QueryChannel queries the "channel" edge of the Vod entity.

func (*Vod) QueryPlaylists added in v1.0.0

func (v *Vod) QueryPlaylists() *PlaylistQuery

QueryPlaylists queries the "playlists" edge of the Vod entity.

func (*Vod) QueryQueue

func (v *Vod) QueryQueue() *QueueQuery

QueryQueue queries the "queue" edge of the Vod entity.

func (*Vod) String

func (v *Vod) String() string

String implements the fmt.Stringer.

func (*Vod) Unwrap

func (v *Vod) Unwrap() *Vod

Unwrap unwraps the Vod 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 (*Vod) Update

func (v *Vod) Update() *VodUpdateOne

Update returns a builder for updating this Vod. Note that you need to call Vod.Unwrap() before calling this method if this Vod was returned from a transaction, and the transaction was committed or rolled back.

func (*Vod) Value added in v1.2.12

func (v *Vod) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Vod. This includes values selected through modifiers, order, etc.

type VodClient

type VodClient struct {
	// contains filtered or unexported fields
}

VodClient is a client for the Vod schema.

func NewVodClient

func NewVodClient(c config) *VodClient

NewVodClient returns a client for the Vod from the given config.

func (*VodClient) Create

func (c *VodClient) Create() *VodCreate

Create returns a builder for creating a Vod entity.

func (*VodClient) CreateBulk

func (c *VodClient) CreateBulk(builders ...*VodCreate) *VodCreateBulk

CreateBulk returns a builder for creating a bulk of Vod entities.

func (*VodClient) Delete

func (c *VodClient) Delete() *VodDelete

Delete returns a delete builder for Vod.

func (*VodClient) DeleteOne

func (c *VodClient) DeleteOne(v *Vod) *VodDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*VodClient) DeleteOneID

func (c *VodClient) DeleteOneID(id uuid.UUID) *VodDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*VodClient) Get

func (c *VodClient) Get(ctx context.Context, id uuid.UUID) (*Vod, error)

Get returns a Vod entity by its id.

func (*VodClient) GetX

func (c *VodClient) GetX(ctx context.Context, id uuid.UUID) *Vod

GetX is like Get, but panics if an error occurs.

func (*VodClient) Hooks

func (c *VodClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VodClient) Intercept added in v1.1.7

func (c *VodClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `vod.Intercept(f(g(h())))`.

func (*VodClient) Interceptors added in v1.1.7

func (c *VodClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*VodClient) Query

func (c *VodClient) Query() *VodQuery

Query returns a query builder for Vod.

func (*VodClient) QueryChannel

func (c *VodClient) QueryChannel(v *Vod) *ChannelQuery

QueryChannel queries the channel edge of a Vod.

func (*VodClient) QueryPlaylists added in v1.0.0

func (c *VodClient) QueryPlaylists(v *Vod) *PlaylistQuery

QueryPlaylists queries the playlists edge of a Vod.

func (*VodClient) QueryQueue

func (c *VodClient) QueryQueue(v *Vod) *QueueQuery

QueryQueue queries the queue edge of a Vod.

func (*VodClient) Update

func (c *VodClient) Update() *VodUpdate

Update returns an update builder for Vod.

func (*VodClient) UpdateOne

func (c *VodClient) UpdateOne(v *Vod) *VodUpdateOne

UpdateOne returns an update builder for the given entity.

func (*VodClient) UpdateOneID

func (c *VodClient) UpdateOneID(id uuid.UUID) *VodUpdateOne

UpdateOneID returns an update builder for the given id.

func (*VodClient) Use

func (c *VodClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vod.Hooks(f(g(h())))`.

type VodCreate

type VodCreate struct {
	// contains filtered or unexported fields
}

VodCreate is the builder for creating a Vod entity.

func (*VodCreate) AddPlaylistIDs added in v1.0.0

func (vc *VodCreate) AddPlaylistIDs(ids ...uuid.UUID) *VodCreate

AddPlaylistIDs adds the "playlists" edge to the Playlist entity by IDs.

func (*VodCreate) AddPlaylists added in v1.0.0

func (vc *VodCreate) AddPlaylists(p ...*Playlist) *VodCreate

AddPlaylists adds the "playlists" edges to the Playlist entity.

func (*VodCreate) Exec

func (vc *VodCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VodCreate) ExecX

func (vc *VodCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodCreate) Mutation

func (vc *VodCreate) Mutation() *VodMutation

Mutation returns the VodMutation object of the builder.

func (*VodCreate) OnConflict added in v0.0.2

func (vc *VodCreate) OnConflict(opts ...sql.ConflictOption) *VodUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Vod.Create().
	SetExtID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VodUpsert) {
		SetExtID(v+v).
	}).
	Exec(ctx)

func (*VodCreate) OnConflictColumns added in v0.0.2

func (vc *VodCreate) OnConflictColumns(columns ...string) *VodUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Vod.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VodCreate) Save

func (vc *VodCreate) Save(ctx context.Context) (*Vod, error)

Save creates the Vod in the database.

func (*VodCreate) SaveX

func (vc *VodCreate) SaveX(ctx context.Context) *Vod

SaveX calls Save and panics if Save returns an error.

func (*VodCreate) SetCaptionPath added in v1.1.9

func (vc *VodCreate) SetCaptionPath(s string) *VodCreate

SetCaptionPath sets the "caption_path" field.

func (*VodCreate) SetChannel

func (vc *VodCreate) SetChannel(c *Channel) *VodCreate

SetChannel sets the "channel" edge to the Channel entity.

func (*VodCreate) SetChannelID

func (vc *VodCreate) SetChannelID(id uuid.UUID) *VodCreate

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*VodCreate) SetChatPath

func (vc *VodCreate) SetChatPath(s string) *VodCreate

SetChatPath sets the "chat_path" field.

func (*VodCreate) SetChatVideoPath

func (vc *VodCreate) SetChatVideoPath(s string) *VodCreate

SetChatVideoPath sets the "chat_video_path" field.

func (*VodCreate) SetCreatedAt

func (vc *VodCreate) SetCreatedAt(t time.Time) *VodCreate

SetCreatedAt sets the "created_at" field.

func (*VodCreate) SetDuration

func (vc *VodCreate) SetDuration(i int) *VodCreate

SetDuration sets the "duration" field.

func (*VodCreate) SetExtID

func (vc *VodCreate) SetExtID(s string) *VodCreate

SetExtID sets the "ext_id" field.

func (*VodCreate) SetFileName added in v1.1.7

func (vc *VodCreate) SetFileName(s string) *VodCreate

SetFileName sets the "file_name" field.

func (*VodCreate) SetFolderName added in v1.1.7

func (vc *VodCreate) SetFolderName(s string) *VodCreate

SetFolderName sets the "folder_name" field.

func (*VodCreate) SetID

func (vc *VodCreate) SetID(u uuid.UUID) *VodCreate

SetID sets the "id" field.

func (*VodCreate) SetInfoPath

func (vc *VodCreate) SetInfoPath(s string) *VodCreate

SetInfoPath sets the "info_path" field.

func (*VodCreate) SetLocalViews added in v1.4.3

func (vc *VodCreate) SetLocalViews(i int) *VodCreate

SetLocalViews sets the "local_views" field.

func (*VodCreate) SetLocked added in v1.2.12

func (vc *VodCreate) SetLocked(b bool) *VodCreate

SetLocked sets the "locked" field.

func (*VodCreate) SetNillableCaptionPath added in v1.1.9

func (vc *VodCreate) SetNillableCaptionPath(s *string) *VodCreate

SetNillableCaptionPath sets the "caption_path" field if the given value is not nil.

func (*VodCreate) SetNillableChatPath

func (vc *VodCreate) SetNillableChatPath(s *string) *VodCreate

SetNillableChatPath sets the "chat_path" field if the given value is not nil.

func (*VodCreate) SetNillableChatVideoPath

func (vc *VodCreate) SetNillableChatVideoPath(s *string) *VodCreate

SetNillableChatVideoPath sets the "chat_video_path" field if the given value is not nil.

func (*VodCreate) SetNillableCreatedAt

func (vc *VodCreate) SetNillableCreatedAt(t *time.Time) *VodCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*VodCreate) SetNillableDuration

func (vc *VodCreate) SetNillableDuration(i *int) *VodCreate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*VodCreate) SetNillableFileName added in v1.1.7

func (vc *VodCreate) SetNillableFileName(s *string) *VodCreate

SetNillableFileName sets the "file_name" field if the given value is not nil.

func (*VodCreate) SetNillableFolderName added in v1.1.7

func (vc *VodCreate) SetNillableFolderName(s *string) *VodCreate

SetNillableFolderName sets the "folder_name" field if the given value is not nil.

func (*VodCreate) SetNillableID

func (vc *VodCreate) SetNillableID(u *uuid.UUID) *VodCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*VodCreate) SetNillableInfoPath

func (vc *VodCreate) SetNillableInfoPath(s *string) *VodCreate

SetNillableInfoPath sets the "info_path" field if the given value is not nil.

func (*VodCreate) SetNillableLocalViews added in v1.4.3

func (vc *VodCreate) SetNillableLocalViews(i *int) *VodCreate

SetNillableLocalViews sets the "local_views" field if the given value is not nil.

func (*VodCreate) SetNillableLocked added in v1.2.12

func (vc *VodCreate) SetNillableLocked(b *bool) *VodCreate

SetNillableLocked sets the "locked" field if the given value is not nil.

func (*VodCreate) SetNillablePlatform

func (vc *VodCreate) SetNillablePlatform(up *utils.VodPlatform) *VodCreate

SetNillablePlatform sets the "platform" field if the given value is not nil.

func (*VodCreate) SetNillableProcessing

func (vc *VodCreate) SetNillableProcessing(b *bool) *VodCreate

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*VodCreate) SetNillableQueueID

func (vc *VodCreate) SetNillableQueueID(id *uuid.UUID) *VodCreate

SetNillableQueueID sets the "queue" edge to the Queue entity by ID if the given value is not nil.

func (*VodCreate) SetNillableResolution

func (vc *VodCreate) SetNillableResolution(s *string) *VodCreate

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*VodCreate) SetNillableStreamedAt

func (vc *VodCreate) SetNillableStreamedAt(t *time.Time) *VodCreate

SetNillableStreamedAt sets the "streamed_at" field if the given value is not nil.

func (*VodCreate) SetNillableThumbnailPath

func (vc *VodCreate) SetNillableThumbnailPath(s *string) *VodCreate

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*VodCreate) SetNillableType

func (vc *VodCreate) SetNillableType(ut *utils.VodType) *VodCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*VodCreate) SetNillableUpdatedAt

func (vc *VodCreate) SetNillableUpdatedAt(t *time.Time) *VodCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*VodCreate) SetNillableViews

func (vc *VodCreate) SetNillableViews(i *int) *VodCreate

SetNillableViews sets the "views" field if the given value is not nil.

func (*VodCreate) SetPlatform

func (vc *VodCreate) SetPlatform(up utils.VodPlatform) *VodCreate

SetPlatform sets the "platform" field.

func (*VodCreate) SetProcessing

func (vc *VodCreate) SetProcessing(b bool) *VodCreate

SetProcessing sets the "processing" field.

func (*VodCreate) SetQueue

func (vc *VodCreate) SetQueue(q *Queue) *VodCreate

SetQueue sets the "queue" edge to the Queue entity.

func (*VodCreate) SetQueueID

func (vc *VodCreate) SetQueueID(id uuid.UUID) *VodCreate

SetQueueID sets the "queue" edge to the Queue entity by ID.

func (*VodCreate) SetResolution

func (vc *VodCreate) SetResolution(s string) *VodCreate

SetResolution sets the "resolution" field.

func (*VodCreate) SetStreamedAt

func (vc *VodCreate) SetStreamedAt(t time.Time) *VodCreate

SetStreamedAt sets the "streamed_at" field.

func (*VodCreate) SetThumbnailPath

func (vc *VodCreate) SetThumbnailPath(s string) *VodCreate

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodCreate) SetTitle

func (vc *VodCreate) SetTitle(s string) *VodCreate

SetTitle sets the "title" field.

func (*VodCreate) SetType

func (vc *VodCreate) SetType(ut utils.VodType) *VodCreate

SetType sets the "type" field.

func (*VodCreate) SetUpdatedAt

func (vc *VodCreate) SetUpdatedAt(t time.Time) *VodCreate

SetUpdatedAt sets the "updated_at" field.

func (*VodCreate) SetVideoPath

func (vc *VodCreate) SetVideoPath(s string) *VodCreate

SetVideoPath sets the "video_path" field.

func (*VodCreate) SetViews

func (vc *VodCreate) SetViews(i int) *VodCreate

SetViews sets the "views" field.

func (*VodCreate) SetWebThumbnailPath

func (vc *VodCreate) SetWebThumbnailPath(s string) *VodCreate

SetWebThumbnailPath sets the "web_thumbnail_path" field.

type VodCreateBulk

type VodCreateBulk struct {
	// contains filtered or unexported fields
}

VodCreateBulk is the builder for creating many Vod entities in bulk.

func (*VodCreateBulk) Exec

func (vcb *VodCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VodCreateBulk) ExecX

func (vcb *VodCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodCreateBulk) OnConflict added in v0.0.2

func (vcb *VodCreateBulk) OnConflict(opts ...sql.ConflictOption) *VodUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Vod.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VodUpsert) {
		SetExtID(v+v).
	}).
	Exec(ctx)

func (*VodCreateBulk) OnConflictColumns added in v0.0.2

func (vcb *VodCreateBulk) OnConflictColumns(columns ...string) *VodUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Vod.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*VodCreateBulk) Save

func (vcb *VodCreateBulk) Save(ctx context.Context) ([]*Vod, error)

Save creates the Vod entities in the database.

func (*VodCreateBulk) SaveX

func (vcb *VodCreateBulk) SaveX(ctx context.Context) []*Vod

SaveX is like Save, but panics if an error occurs.

type VodDelete

type VodDelete struct {
	// contains filtered or unexported fields
}

VodDelete is the builder for deleting a Vod entity.

func (*VodDelete) Exec

func (vd *VodDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VodDelete) ExecX

func (vd *VodDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VodDelete) Where

func (vd *VodDelete) Where(ps ...predicate.Vod) *VodDelete

Where appends a list predicates to the VodDelete builder.

type VodDeleteOne

type VodDeleteOne struct {
	// contains filtered or unexported fields
}

VodDeleteOne is the builder for deleting a single Vod entity.

func (*VodDeleteOne) Exec

func (vdo *VodDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*VodDeleteOne) ExecX

func (vdo *VodDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodDeleteOne) Where added in v1.2.4

func (vdo *VodDeleteOne) Where(ps ...predicate.Vod) *VodDeleteOne

Where appends a list predicates to the VodDelete builder.

type VodEdges

type VodEdges struct {
	// Channel holds the value of the channel edge.
	Channel *Channel `json:"channel,omitempty"`
	// Queue holds the value of the queue edge.
	Queue *Queue `json:"queue,omitempty"`
	// Playlists holds the value of the playlists edge.
	Playlists []*Playlist `json:"playlists,omitempty"`
	// contains filtered or unexported fields
}

VodEdges holds the relations/edges for other nodes in the graph.

func (VodEdges) ChannelOrErr

func (e VodEdges) ChannelOrErr() (*Channel, error)

ChannelOrErr returns the Channel value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VodEdges) PlaylistsOrErr added in v1.0.0

func (e VodEdges) PlaylistsOrErr() ([]*Playlist, error)

PlaylistsOrErr returns the Playlists value or an error if the edge was not loaded in eager-loading.

func (VodEdges) QueueOrErr

func (e VodEdges) QueueOrErr() (*Queue, error)

QueueOrErr returns the Queue value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type VodGroupBy

type VodGroupBy struct {
	// contains filtered or unexported fields
}

VodGroupBy is the group-by builder for Vod entities.

func (*VodGroupBy) Aggregate

func (vgb *VodGroupBy) Aggregate(fns ...AggregateFunc) *VodGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*VodGroupBy) Bool

func (s *VodGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) BoolX

func (s *VodGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VodGroupBy) Bools

func (s *VodGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) BoolsX

func (s *VodGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VodGroupBy) Float64

func (s *VodGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) Float64X

func (s *VodGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VodGroupBy) Float64s

func (s *VodGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) Float64sX

func (s *VodGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VodGroupBy) Int

func (s *VodGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) IntX

func (s *VodGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VodGroupBy) Ints

func (s *VodGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) IntsX

func (s *VodGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VodGroupBy) Scan

func (vgb *VodGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VodGroupBy) ScanX

func (s *VodGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VodGroupBy) String

func (s *VodGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) StringX

func (s *VodGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VodGroupBy) Strings

func (s *VodGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VodGroupBy) StringsX

func (s *VodGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VodMutation

type VodMutation struct {
	// contains filtered or unexported fields
}

VodMutation represents an operation that mutates the Vod nodes in the graph.

func (*VodMutation) AddDuration

func (m *VodMutation) AddDuration(i int)

AddDuration adds i to the "duration" field.

func (*VodMutation) AddField

func (m *VodMutation) 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 (*VodMutation) AddLocalViews added in v1.4.3

func (m *VodMutation) AddLocalViews(i int)

AddLocalViews adds i to the "local_views" field.

func (*VodMutation) AddPlaylistIDs added in v1.0.0

func (m *VodMutation) AddPlaylistIDs(ids ...uuid.UUID)

AddPlaylistIDs adds the "playlists" edge to the Playlist entity by ids.

func (*VodMutation) AddViews

func (m *VodMutation) AddViews(i int)

AddViews adds i to the "views" field.

func (*VodMutation) AddedDuration

func (m *VodMutation) AddedDuration() (r int, exists bool)

AddedDuration returns the value that was added to the "duration" field in this mutation.

func (*VodMutation) AddedEdges

func (m *VodMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VodMutation) AddedField

func (m *VodMutation) 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 (*VodMutation) AddedFields

func (m *VodMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VodMutation) AddedIDs

func (m *VodMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VodMutation) AddedLocalViews added in v1.4.3

func (m *VodMutation) AddedLocalViews() (r int, exists bool)

AddedLocalViews returns the value that was added to the "local_views" field in this mutation.

func (*VodMutation) AddedViews

func (m *VodMutation) AddedViews() (r int, exists bool)

AddedViews returns the value that was added to the "views" field in this mutation.

func (*VodMutation) CaptionPath added in v1.1.9

func (m *VodMutation) CaptionPath() (r string, exists bool)

CaptionPath returns the value of the "caption_path" field in the mutation.

func (*VodMutation) CaptionPathCleared added in v1.1.9

func (m *VodMutation) CaptionPathCleared() bool

CaptionPathCleared returns if the "caption_path" field was cleared in this mutation.

func (*VodMutation) ChannelCleared

func (m *VodMutation) ChannelCleared() bool

ChannelCleared reports if the "channel" edge to the Channel entity was cleared.

func (*VodMutation) ChannelID

func (m *VodMutation) ChannelID() (id uuid.UUID, exists bool)

ChannelID returns the "channel" edge ID in the mutation.

func (*VodMutation) ChannelIDs

func (m *VodMutation) ChannelIDs() (ids []uuid.UUID)

ChannelIDs returns the "channel" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ChannelID instead. It exists only for internal usage by the builders.

func (*VodMutation) ChatPath

func (m *VodMutation) ChatPath() (r string, exists bool)

ChatPath returns the value of the "chat_path" field in the mutation.

func (*VodMutation) ChatPathCleared

func (m *VodMutation) ChatPathCleared() bool

ChatPathCleared returns if the "chat_path" field was cleared in this mutation.

func (*VodMutation) ChatVideoPath

func (m *VodMutation) ChatVideoPath() (r string, exists bool)

ChatVideoPath returns the value of the "chat_video_path" field in the mutation.

func (*VodMutation) ChatVideoPathCleared

func (m *VodMutation) ChatVideoPathCleared() bool

ChatVideoPathCleared returns if the "chat_video_path" field was cleared in this mutation.

func (*VodMutation) ClearCaptionPath added in v1.1.9

func (m *VodMutation) ClearCaptionPath()

ClearCaptionPath clears the value of the "caption_path" field.

func (*VodMutation) ClearChannel

func (m *VodMutation) ClearChannel()

ClearChannel clears the "channel" edge to the Channel entity.

func (*VodMutation) ClearChatPath

func (m *VodMutation) ClearChatPath()

ClearChatPath clears the value of the "chat_path" field.

func (*VodMutation) ClearChatVideoPath

func (m *VodMutation) ClearChatVideoPath()

ClearChatVideoPath clears the value of the "chat_video_path" field.

func (*VodMutation) ClearEdge

func (m *VodMutation) 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 (*VodMutation) ClearField

func (m *VodMutation) 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 (*VodMutation) ClearFileName added in v1.1.7

func (m *VodMutation) ClearFileName()

ClearFileName clears the value of the "file_name" field.

func (*VodMutation) ClearFolderName added in v1.1.7

func (m *VodMutation) ClearFolderName()

ClearFolderName clears the value of the "folder_name" field.

func (*VodMutation) ClearInfoPath

func (m *VodMutation) ClearInfoPath()

ClearInfoPath clears the value of the "info_path" field.

func (*VodMutation) ClearPlaylists added in v1.0.0

func (m *VodMutation) ClearPlaylists()

ClearPlaylists clears the "playlists" edge to the Playlist entity.

func (*VodMutation) ClearQueue

func (m *VodMutation) ClearQueue()

ClearQueue clears the "queue" edge to the Queue entity.

func (*VodMutation) ClearResolution

func (m *VodMutation) ClearResolution()

ClearResolution clears the value of the "resolution" field.

func (*VodMutation) ClearThumbnailPath

func (m *VodMutation) ClearThumbnailPath()

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*VodMutation) ClearedEdges

func (m *VodMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VodMutation) ClearedFields

func (m *VodMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VodMutation) Client

func (m VodMutation) 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 (*VodMutation) CreatedAt

func (m *VodMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*VodMutation) Duration

func (m *VodMutation) Duration() (r int, exists bool)

Duration returns the value of the "duration" field in the mutation.

func (*VodMutation) EdgeCleared

func (m *VodMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VodMutation) ExtID

func (m *VodMutation) ExtID() (r string, exists bool)

ExtID returns the value of the "ext_id" field in the mutation.

func (*VodMutation) Field

func (m *VodMutation) 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 (*VodMutation) FieldCleared

func (m *VodMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VodMutation) Fields

func (m *VodMutation) 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 (*VodMutation) FileName added in v1.1.7

func (m *VodMutation) FileName() (r string, exists bool)

FileName returns the value of the "file_name" field in the mutation.

func (*VodMutation) FileNameCleared added in v1.1.7

func (m *VodMutation) FileNameCleared() bool

FileNameCleared returns if the "file_name" field was cleared in this mutation.

func (*VodMutation) FolderName added in v1.1.7

func (m *VodMutation) FolderName() (r string, exists bool)

FolderName returns the value of the "folder_name" field in the mutation.

func (*VodMutation) FolderNameCleared added in v1.1.7

func (m *VodMutation) FolderNameCleared() bool

FolderNameCleared returns if the "folder_name" field was cleared in this mutation.

func (*VodMutation) GetType

func (m *VodMutation) GetType() (r utils.VodType, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*VodMutation) ID

func (m *VodMutation) ID() (id uuid.UUID, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*VodMutation) IDs

func (m *VodMutation) IDs(ctx context.Context) ([]uuid.UUID, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*VodMutation) InfoPath

func (m *VodMutation) InfoPath() (r string, exists bool)

InfoPath returns the value of the "info_path" field in the mutation.

func (*VodMutation) InfoPathCleared

func (m *VodMutation) InfoPathCleared() bool

InfoPathCleared returns if the "info_path" field was cleared in this mutation.

func (*VodMutation) LocalViews added in v1.4.3

func (m *VodMutation) LocalViews() (r int, exists bool)

LocalViews returns the value of the "local_views" field in the mutation.

func (*VodMutation) Locked added in v1.2.12

func (m *VodMutation) Locked() (r bool, exists bool)

Locked returns the value of the "locked" field in the mutation.

func (*VodMutation) OldCaptionPath added in v1.1.9

func (m *VodMutation) OldCaptionPath(ctx context.Context) (v string, err error)

OldCaptionPath returns the old "caption_path" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldChatPath

func (m *VodMutation) OldChatPath(ctx context.Context) (v string, err error)

OldChatPath returns the old "chat_path" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldChatVideoPath

func (m *VodMutation) OldChatVideoPath(ctx context.Context) (v string, err error)

OldChatVideoPath returns the old "chat_video_path" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldCreatedAt

func (m *VodMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldDuration

func (m *VodMutation) OldDuration(ctx context.Context) (v int, err error)

OldDuration returns the old "duration" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldExtID

func (m *VodMutation) OldExtID(ctx context.Context) (v string, err error)

OldExtID returns the old "ext_id" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldField

func (m *VodMutation) 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 (*VodMutation) OldFileName added in v1.1.7

func (m *VodMutation) OldFileName(ctx context.Context) (v string, err error)

OldFileName returns the old "file_name" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldFolderName added in v1.1.7

func (m *VodMutation) OldFolderName(ctx context.Context) (v string, err error)

OldFolderName returns the old "folder_name" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldInfoPath

func (m *VodMutation) OldInfoPath(ctx context.Context) (v string, err error)

OldInfoPath returns the old "info_path" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldLocalViews added in v1.4.3

func (m *VodMutation) OldLocalViews(ctx context.Context) (v int, err error)

OldLocalViews returns the old "local_views" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldLocked added in v1.2.12

func (m *VodMutation) OldLocked(ctx context.Context) (v bool, err error)

OldLocked returns the old "locked" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldPlatform

func (m *VodMutation) OldPlatform(ctx context.Context) (v utils.VodPlatform, err error)

OldPlatform returns the old "platform" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldProcessing

func (m *VodMutation) OldProcessing(ctx context.Context) (v bool, err error)

OldProcessing returns the old "processing" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldResolution

func (m *VodMutation) OldResolution(ctx context.Context) (v string, err error)

OldResolution returns the old "resolution" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldStreamedAt

func (m *VodMutation) OldStreamedAt(ctx context.Context) (v time.Time, err error)

OldStreamedAt returns the old "streamed_at" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldThumbnailPath

func (m *VodMutation) OldThumbnailPath(ctx context.Context) (v string, err error)

OldThumbnailPath returns the old "thumbnail_path" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldTitle

func (m *VodMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldType

func (m *VodMutation) OldType(ctx context.Context) (v utils.VodType, err error)

OldType returns the old "type" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldUpdatedAt

func (m *VodMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldVideoPath

func (m *VodMutation) OldVideoPath(ctx context.Context) (v string, err error)

OldVideoPath returns the old "video_path" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldViews

func (m *VodMutation) OldViews(ctx context.Context) (v int, err error)

OldViews returns the old "views" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) OldWebThumbnailPath

func (m *VodMutation) OldWebThumbnailPath(ctx context.Context) (v string, err error)

OldWebThumbnailPath returns the old "web_thumbnail_path" field's value of the Vod entity. If the Vod object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*VodMutation) Op

func (m *VodMutation) Op() Op

Op returns the operation name.

func (*VodMutation) Platform

func (m *VodMutation) Platform() (r utils.VodPlatform, exists bool)

Platform returns the value of the "platform" field in the mutation.

func (*VodMutation) PlaylistsCleared added in v1.0.0

func (m *VodMutation) PlaylistsCleared() bool

PlaylistsCleared reports if the "playlists" edge to the Playlist entity was cleared.

func (*VodMutation) PlaylistsIDs added in v1.0.0

func (m *VodMutation) PlaylistsIDs() (ids []uuid.UUID)

PlaylistsIDs returns the "playlists" edge IDs in the mutation.

func (*VodMutation) Processing

func (m *VodMutation) Processing() (r bool, exists bool)

Processing returns the value of the "processing" field in the mutation.

func (*VodMutation) QueueCleared

func (m *VodMutation) QueueCleared() bool

QueueCleared reports if the "queue" edge to the Queue entity was cleared.

func (*VodMutation) QueueID

func (m *VodMutation) QueueID() (id uuid.UUID, exists bool)

QueueID returns the "queue" edge ID in the mutation.

func (*VodMutation) QueueIDs

func (m *VodMutation) QueueIDs() (ids []uuid.UUID)

QueueIDs returns the "queue" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use QueueID instead. It exists only for internal usage by the builders.

func (*VodMutation) RemovePlaylistIDs added in v1.0.0

func (m *VodMutation) RemovePlaylistIDs(ids ...uuid.UUID)

RemovePlaylistIDs removes the "playlists" edge to the Playlist entity by IDs.

func (*VodMutation) RemovedEdges

func (m *VodMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VodMutation) RemovedIDs

func (m *VodMutation) 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 (*VodMutation) RemovedPlaylistsIDs added in v1.0.0

func (m *VodMutation) RemovedPlaylistsIDs() (ids []uuid.UUID)

RemovedPlaylists returns the removed IDs of the "playlists" edge to the Playlist entity.

func (*VodMutation) ResetCaptionPath added in v1.1.9

func (m *VodMutation) ResetCaptionPath()

ResetCaptionPath resets all changes to the "caption_path" field.

func (*VodMutation) ResetChannel

func (m *VodMutation) ResetChannel()

ResetChannel resets all changes to the "channel" edge.

func (*VodMutation) ResetChatPath

func (m *VodMutation) ResetChatPath()

ResetChatPath resets all changes to the "chat_path" field.

func (*VodMutation) ResetChatVideoPath

func (m *VodMutation) ResetChatVideoPath()

ResetChatVideoPath resets all changes to the "chat_video_path" field.

func (*VodMutation) ResetCreatedAt

func (m *VodMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*VodMutation) ResetDuration

func (m *VodMutation) ResetDuration()

ResetDuration resets all changes to the "duration" field.

func (*VodMutation) ResetEdge

func (m *VodMutation) 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 (*VodMutation) ResetExtID

func (m *VodMutation) ResetExtID()

ResetExtID resets all changes to the "ext_id" field.

func (*VodMutation) ResetField

func (m *VodMutation) 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 (*VodMutation) ResetFileName added in v1.1.7

func (m *VodMutation) ResetFileName()

ResetFileName resets all changes to the "file_name" field.

func (*VodMutation) ResetFolderName added in v1.1.7

func (m *VodMutation) ResetFolderName()

ResetFolderName resets all changes to the "folder_name" field.

func (*VodMutation) ResetInfoPath

func (m *VodMutation) ResetInfoPath()

ResetInfoPath resets all changes to the "info_path" field.

func (*VodMutation) ResetLocalViews added in v1.4.3

func (m *VodMutation) ResetLocalViews()

ResetLocalViews resets all changes to the "local_views" field.

func (*VodMutation) ResetLocked added in v1.2.12

func (m *VodMutation) ResetLocked()

ResetLocked resets all changes to the "locked" field.

func (*VodMutation) ResetPlatform

func (m *VodMutation) ResetPlatform()

ResetPlatform resets all changes to the "platform" field.

func (*VodMutation) ResetPlaylists added in v1.0.0

func (m *VodMutation) ResetPlaylists()

ResetPlaylists resets all changes to the "playlists" edge.

func (*VodMutation) ResetProcessing

func (m *VodMutation) ResetProcessing()

ResetProcessing resets all changes to the "processing" field.

func (*VodMutation) ResetQueue

func (m *VodMutation) ResetQueue()

ResetQueue resets all changes to the "queue" edge.

func (*VodMutation) ResetResolution

func (m *VodMutation) ResetResolution()

ResetResolution resets all changes to the "resolution" field.

func (*VodMutation) ResetStreamedAt

func (m *VodMutation) ResetStreamedAt()

ResetStreamedAt resets all changes to the "streamed_at" field.

func (*VodMutation) ResetThumbnailPath

func (m *VodMutation) ResetThumbnailPath()

ResetThumbnailPath resets all changes to the "thumbnail_path" field.

func (*VodMutation) ResetTitle

func (m *VodMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*VodMutation) ResetType

func (m *VodMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*VodMutation) ResetUpdatedAt

func (m *VodMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*VodMutation) ResetVideoPath

func (m *VodMutation) ResetVideoPath()

ResetVideoPath resets all changes to the "video_path" field.

func (*VodMutation) ResetViews

func (m *VodMutation) ResetViews()

ResetViews resets all changes to the "views" field.

func (*VodMutation) ResetWebThumbnailPath

func (m *VodMutation) ResetWebThumbnailPath()

ResetWebThumbnailPath resets all changes to the "web_thumbnail_path" field.

func (*VodMutation) Resolution

func (m *VodMutation) Resolution() (r string, exists bool)

Resolution returns the value of the "resolution" field in the mutation.

func (*VodMutation) ResolutionCleared

func (m *VodMutation) ResolutionCleared() bool

ResolutionCleared returns if the "resolution" field was cleared in this mutation.

func (*VodMutation) SetCaptionPath added in v1.1.9

func (m *VodMutation) SetCaptionPath(s string)

SetCaptionPath sets the "caption_path" field.

func (*VodMutation) SetChannelID

func (m *VodMutation) SetChannelID(id uuid.UUID)

SetChannelID sets the "channel" edge to the Channel entity by id.

func (*VodMutation) SetChatPath

func (m *VodMutation) SetChatPath(s string)

SetChatPath sets the "chat_path" field.

func (*VodMutation) SetChatVideoPath

func (m *VodMutation) SetChatVideoPath(s string)

SetChatVideoPath sets the "chat_video_path" field.

func (*VodMutation) SetCreatedAt

func (m *VodMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*VodMutation) SetDuration

func (m *VodMutation) SetDuration(i int)

SetDuration sets the "duration" field.

func (*VodMutation) SetExtID

func (m *VodMutation) SetExtID(s string)

SetExtID sets the "ext_id" field.

func (*VodMutation) SetField

func (m *VodMutation) 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 (*VodMutation) SetFileName added in v1.1.7

func (m *VodMutation) SetFileName(s string)

SetFileName sets the "file_name" field.

func (*VodMutation) SetFolderName added in v1.1.7

func (m *VodMutation) SetFolderName(s string)

SetFolderName sets the "folder_name" field.

func (*VodMutation) SetID

func (m *VodMutation) SetID(id uuid.UUID)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Vod entities.

func (*VodMutation) SetInfoPath

func (m *VodMutation) SetInfoPath(s string)

SetInfoPath sets the "info_path" field.

func (*VodMutation) SetLocalViews added in v1.4.3

func (m *VodMutation) SetLocalViews(i int)

SetLocalViews sets the "local_views" field.

func (*VodMutation) SetLocked added in v1.2.12

func (m *VodMutation) SetLocked(b bool)

SetLocked sets the "locked" field.

func (*VodMutation) SetOp added in v1.1.7

func (m *VodMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*VodMutation) SetPlatform

func (m *VodMutation) SetPlatform(up utils.VodPlatform)

SetPlatform sets the "platform" field.

func (*VodMutation) SetProcessing

func (m *VodMutation) SetProcessing(b bool)

SetProcessing sets the "processing" field.

func (*VodMutation) SetQueueID

func (m *VodMutation) SetQueueID(id uuid.UUID)

SetQueueID sets the "queue" edge to the Queue entity by id.

func (*VodMutation) SetResolution

func (m *VodMutation) SetResolution(s string)

SetResolution sets the "resolution" field.

func (*VodMutation) SetStreamedAt

func (m *VodMutation) SetStreamedAt(t time.Time)

SetStreamedAt sets the "streamed_at" field.

func (*VodMutation) SetThumbnailPath

func (m *VodMutation) SetThumbnailPath(s string)

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodMutation) SetTitle

func (m *VodMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*VodMutation) SetType

func (m *VodMutation) SetType(ut utils.VodType)

SetType sets the "type" field.

func (*VodMutation) SetUpdatedAt

func (m *VodMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*VodMutation) SetVideoPath

func (m *VodMutation) SetVideoPath(s string)

SetVideoPath sets the "video_path" field.

func (*VodMutation) SetViews

func (m *VodMutation) SetViews(i int)

SetViews sets the "views" field.

func (*VodMutation) SetWebThumbnailPath

func (m *VodMutation) SetWebThumbnailPath(s string)

SetWebThumbnailPath sets the "web_thumbnail_path" field.

func (*VodMutation) StreamedAt

func (m *VodMutation) StreamedAt() (r time.Time, exists bool)

StreamedAt returns the value of the "streamed_at" field in the mutation.

func (*VodMutation) ThumbnailPath

func (m *VodMutation) ThumbnailPath() (r string, exists bool)

ThumbnailPath returns the value of the "thumbnail_path" field in the mutation.

func (*VodMutation) ThumbnailPathCleared

func (m *VodMutation) ThumbnailPathCleared() bool

ThumbnailPathCleared returns if the "thumbnail_path" field was cleared in this mutation.

func (*VodMutation) Title

func (m *VodMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (VodMutation) Tx

func (m VodMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VodMutation) Type

func (m *VodMutation) Type() string

Type returns the node type of this mutation (Vod).

func (*VodMutation) UpdatedAt

func (m *VodMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*VodMutation) VideoPath

func (m *VodMutation) VideoPath() (r string, exists bool)

VideoPath returns the value of the "video_path" field in the mutation.

func (*VodMutation) Views

func (m *VodMutation) Views() (r int, exists bool)

Views returns the value of the "views" field in the mutation.

func (*VodMutation) WebThumbnailPath

func (m *VodMutation) WebThumbnailPath() (r string, exists bool)

WebThumbnailPath returns the value of the "web_thumbnail_path" field in the mutation.

func (*VodMutation) Where

func (m *VodMutation) Where(ps ...predicate.Vod)

Where appends a list predicates to the VodMutation builder.

func (*VodMutation) WhereP added in v1.1.7

func (m *VodMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the VodMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type VodQuery

type VodQuery struct {
	// contains filtered or unexported fields
}

VodQuery is the builder for querying Vod entities.

func (*VodQuery) Aggregate added in v1.1.7

func (vq *VodQuery) Aggregate(fns ...AggregateFunc) *VodSelect

Aggregate returns a VodSelect configured with the given aggregations.

func (*VodQuery) All

func (vq *VodQuery) All(ctx context.Context) ([]*Vod, error)

All executes the query and returns a list of Vods.

func (*VodQuery) AllX

func (vq *VodQuery) AllX(ctx context.Context) []*Vod

AllX is like All, but panics if an error occurs.

func (*VodQuery) Clone

func (vq *VodQuery) Clone() *VodQuery

Clone returns a duplicate of the VodQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VodQuery) Count

func (vq *VodQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VodQuery) CountX

func (vq *VodQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VodQuery) Exist

func (vq *VodQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VodQuery) ExistX

func (vq *VodQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VodQuery) First

func (vq *VodQuery) First(ctx context.Context) (*Vod, error)

First returns the first Vod entity from the query. Returns a *NotFoundError when no Vod was found.

func (*VodQuery) FirstID

func (vq *VodQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

FirstID returns the first Vod ID from the query. Returns a *NotFoundError when no Vod ID was found.

func (*VodQuery) FirstIDX

func (vq *VodQuery) FirstIDX(ctx context.Context) uuid.UUID

FirstIDX is like FirstID, but panics if an error occurs.

func (*VodQuery) FirstX

func (vq *VodQuery) FirstX(ctx context.Context) *Vod

FirstX is like First, but panics if an error occurs.

func (*VodQuery) GroupBy

func (vq *VodQuery) GroupBy(field string, fields ...string) *VodGroupBy

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 {
	ExtID string `json:"ext_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Vod.Query().
	GroupBy(vod.FieldExtID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VodQuery) IDs

func (vq *VodQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)

IDs executes the query and returns a list of Vod IDs.

func (*VodQuery) IDsX

func (vq *VodQuery) IDsX(ctx context.Context) []uuid.UUID

IDsX is like IDs, but panics if an error occurs.

func (*VodQuery) Limit

func (vq *VodQuery) Limit(limit int) *VodQuery

Limit the number of records to be returned by this query.

func (*VodQuery) Offset

func (vq *VodQuery) Offset(offset int) *VodQuery

Offset to start from.

func (*VodQuery) Only

func (vq *VodQuery) Only(ctx context.Context) (*Vod, error)

Only returns a single Vod entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Vod entity is found. Returns a *NotFoundError when no Vod entities are found.

func (*VodQuery) OnlyID

func (vq *VodQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

OnlyID is like Only, but returns the only Vod ID in the query. Returns a *NotSingularError when more than one Vod ID is found. Returns a *NotFoundError when no entities are found.

func (*VodQuery) OnlyIDX

func (vq *VodQuery) OnlyIDX(ctx context.Context) uuid.UUID

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VodQuery) OnlyX

func (vq *VodQuery) OnlyX(ctx context.Context) *Vod

OnlyX is like Only, but panics if an error occurs.

func (*VodQuery) Order

func (vq *VodQuery) Order(o ...vod.OrderOption) *VodQuery

Order specifies how the records should be ordered.

func (*VodQuery) QueryChannel

func (vq *VodQuery) QueryChannel() *ChannelQuery

QueryChannel chains the current query on the "channel" edge.

func (*VodQuery) QueryPlaylists added in v1.0.0

func (vq *VodQuery) QueryPlaylists() *PlaylistQuery

QueryPlaylists chains the current query on the "playlists" edge.

func (*VodQuery) QueryQueue

func (vq *VodQuery) QueryQueue() *QueueQuery

QueryQueue chains the current query on the "queue" edge.

func (*VodQuery) Select

func (vq *VodQuery) Select(fields ...string) *VodSelect

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 {
	ExtID string `json:"ext_id,omitempty"`
}

client.Vod.Query().
	Select(vod.FieldExtID).
	Scan(ctx, &v)

func (*VodQuery) Unique

func (vq *VodQuery) Unique(unique bool) *VodQuery

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 (*VodQuery) Where

func (vq *VodQuery) Where(ps ...predicate.Vod) *VodQuery

Where adds a new predicate for the VodQuery builder.

func (*VodQuery) WithChannel

func (vq *VodQuery) WithChannel(opts ...func(*ChannelQuery)) *VodQuery

WithChannel tells the query-builder to eager-load the nodes that are connected to the "channel" edge. The optional arguments are used to configure the query builder of the edge.

func (*VodQuery) WithPlaylists added in v1.0.0

func (vq *VodQuery) WithPlaylists(opts ...func(*PlaylistQuery)) *VodQuery

WithPlaylists tells the query-builder to eager-load the nodes that are connected to the "playlists" edge. The optional arguments are used to configure the query builder of the edge.

func (*VodQuery) WithQueue

func (vq *VodQuery) WithQueue(opts ...func(*QueueQuery)) *VodQuery

WithQueue tells the query-builder to eager-load the nodes that are connected to the "queue" edge. The optional arguments are used to configure the query builder of the edge.

type VodSelect

type VodSelect struct {
	*VodQuery
	// contains filtered or unexported fields
}

VodSelect is the builder for selecting fields of Vod entities.

func (*VodSelect) Aggregate added in v1.1.7

func (vs *VodSelect) Aggregate(fns ...AggregateFunc) *VodSelect

Aggregate adds the given aggregation functions to the selector query.

func (*VodSelect) Bool

func (s *VodSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VodSelect) BoolX

func (s *VodSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VodSelect) Bools

func (s *VodSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VodSelect) BoolsX

func (s *VodSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VodSelect) Float64

func (s *VodSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VodSelect) Float64X

func (s *VodSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VodSelect) Float64s

func (s *VodSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VodSelect) Float64sX

func (s *VodSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VodSelect) Int

func (s *VodSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VodSelect) IntX

func (s *VodSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VodSelect) Ints

func (s *VodSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VodSelect) IntsX

func (s *VodSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VodSelect) Scan

func (vs *VodSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*VodSelect) ScanX

func (s *VodSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*VodSelect) String

func (s *VodSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VodSelect) StringX

func (s *VodSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VodSelect) Strings

func (s *VodSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VodSelect) StringsX

func (s *VodSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VodUpdate

type VodUpdate struct {
	// contains filtered or unexported fields
}

VodUpdate is the builder for updating Vod entities.

func (*VodUpdate) AddDuration

func (vu *VodUpdate) AddDuration(i int) *VodUpdate

AddDuration adds i to the "duration" field.

func (*VodUpdate) AddLocalViews added in v1.4.3

func (vu *VodUpdate) AddLocalViews(i int) *VodUpdate

AddLocalViews adds i to the "local_views" field.

func (*VodUpdate) AddPlaylistIDs added in v1.0.0

func (vu *VodUpdate) AddPlaylistIDs(ids ...uuid.UUID) *VodUpdate

AddPlaylistIDs adds the "playlists" edge to the Playlist entity by IDs.

func (*VodUpdate) AddPlaylists added in v1.0.0

func (vu *VodUpdate) AddPlaylists(p ...*Playlist) *VodUpdate

AddPlaylists adds the "playlists" edges to the Playlist entity.

func (*VodUpdate) AddViews

func (vu *VodUpdate) AddViews(i int) *VodUpdate

AddViews adds i to the "views" field.

func (*VodUpdate) ClearCaptionPath added in v1.1.9

func (vu *VodUpdate) ClearCaptionPath() *VodUpdate

ClearCaptionPath clears the value of the "caption_path" field.

func (*VodUpdate) ClearChannel

func (vu *VodUpdate) ClearChannel() *VodUpdate

ClearChannel clears the "channel" edge to the Channel entity.

func (*VodUpdate) ClearChatPath

func (vu *VodUpdate) ClearChatPath() *VodUpdate

ClearChatPath clears the value of the "chat_path" field.

func (*VodUpdate) ClearChatVideoPath

func (vu *VodUpdate) ClearChatVideoPath() *VodUpdate

ClearChatVideoPath clears the value of the "chat_video_path" field.

func (*VodUpdate) ClearFileName added in v1.1.7

func (vu *VodUpdate) ClearFileName() *VodUpdate

ClearFileName clears the value of the "file_name" field.

func (*VodUpdate) ClearFolderName added in v1.1.7

func (vu *VodUpdate) ClearFolderName() *VodUpdate

ClearFolderName clears the value of the "folder_name" field.

func (*VodUpdate) ClearInfoPath

func (vu *VodUpdate) ClearInfoPath() *VodUpdate

ClearInfoPath clears the value of the "info_path" field.

func (*VodUpdate) ClearPlaylists added in v1.0.0

func (vu *VodUpdate) ClearPlaylists() *VodUpdate

ClearPlaylists clears all "playlists" edges to the Playlist entity.

func (*VodUpdate) ClearQueue

func (vu *VodUpdate) ClearQueue() *VodUpdate

ClearQueue clears the "queue" edge to the Queue entity.

func (*VodUpdate) ClearResolution

func (vu *VodUpdate) ClearResolution() *VodUpdate

ClearResolution clears the value of the "resolution" field.

func (*VodUpdate) ClearThumbnailPath

func (vu *VodUpdate) ClearThumbnailPath() *VodUpdate

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*VodUpdate) Exec

func (vu *VodUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VodUpdate) ExecX

func (vu *VodUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodUpdate) Mutation

func (vu *VodUpdate) Mutation() *VodMutation

Mutation returns the VodMutation object of the builder.

func (*VodUpdate) RemovePlaylistIDs added in v1.0.0

func (vu *VodUpdate) RemovePlaylistIDs(ids ...uuid.UUID) *VodUpdate

RemovePlaylistIDs removes the "playlists" edge to Playlist entities by IDs.

func (*VodUpdate) RemovePlaylists added in v1.0.0

func (vu *VodUpdate) RemovePlaylists(p ...*Playlist) *VodUpdate

RemovePlaylists removes "playlists" edges to Playlist entities.

func (*VodUpdate) Save

func (vu *VodUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VodUpdate) SaveX

func (vu *VodUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VodUpdate) SetCaptionPath added in v1.1.9

func (vu *VodUpdate) SetCaptionPath(s string) *VodUpdate

SetCaptionPath sets the "caption_path" field.

func (*VodUpdate) SetChannel

func (vu *VodUpdate) SetChannel(c *Channel) *VodUpdate

SetChannel sets the "channel" edge to the Channel entity.

func (*VodUpdate) SetChannelID

func (vu *VodUpdate) SetChannelID(id uuid.UUID) *VodUpdate

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*VodUpdate) SetChatPath

func (vu *VodUpdate) SetChatPath(s string) *VodUpdate

SetChatPath sets the "chat_path" field.

func (*VodUpdate) SetChatVideoPath

func (vu *VodUpdate) SetChatVideoPath(s string) *VodUpdate

SetChatVideoPath sets the "chat_video_path" field.

func (*VodUpdate) SetDuration

func (vu *VodUpdate) SetDuration(i int) *VodUpdate

SetDuration sets the "duration" field.

func (*VodUpdate) SetExtID

func (vu *VodUpdate) SetExtID(s string) *VodUpdate

SetExtID sets the "ext_id" field.

func (*VodUpdate) SetFileName added in v1.1.7

func (vu *VodUpdate) SetFileName(s string) *VodUpdate

SetFileName sets the "file_name" field.

func (*VodUpdate) SetFolderName added in v1.1.7

func (vu *VodUpdate) SetFolderName(s string) *VodUpdate

SetFolderName sets the "folder_name" field.

func (*VodUpdate) SetInfoPath

func (vu *VodUpdate) SetInfoPath(s string) *VodUpdate

SetInfoPath sets the "info_path" field.

func (*VodUpdate) SetLocalViews added in v1.4.3

func (vu *VodUpdate) SetLocalViews(i int) *VodUpdate

SetLocalViews sets the "local_views" field.

func (*VodUpdate) SetLocked added in v1.2.12

func (vu *VodUpdate) SetLocked(b bool) *VodUpdate

SetLocked sets the "locked" field.

func (*VodUpdate) SetNillableCaptionPath added in v1.1.9

func (vu *VodUpdate) SetNillableCaptionPath(s *string) *VodUpdate

SetNillableCaptionPath sets the "caption_path" field if the given value is not nil.

func (*VodUpdate) SetNillableChatPath

func (vu *VodUpdate) SetNillableChatPath(s *string) *VodUpdate

SetNillableChatPath sets the "chat_path" field if the given value is not nil.

func (*VodUpdate) SetNillableChatVideoPath

func (vu *VodUpdate) SetNillableChatVideoPath(s *string) *VodUpdate

SetNillableChatVideoPath sets the "chat_video_path" field if the given value is not nil.

func (*VodUpdate) SetNillableDuration

func (vu *VodUpdate) SetNillableDuration(i *int) *VodUpdate

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*VodUpdate) SetNillableFileName added in v1.1.7

func (vu *VodUpdate) SetNillableFileName(s *string) *VodUpdate

SetNillableFileName sets the "file_name" field if the given value is not nil.

func (*VodUpdate) SetNillableFolderName added in v1.1.7

func (vu *VodUpdate) SetNillableFolderName(s *string) *VodUpdate

SetNillableFolderName sets the "folder_name" field if the given value is not nil.

func (*VodUpdate) SetNillableInfoPath

func (vu *VodUpdate) SetNillableInfoPath(s *string) *VodUpdate

SetNillableInfoPath sets the "info_path" field if the given value is not nil.

func (*VodUpdate) SetNillableLocalViews added in v1.4.3

func (vu *VodUpdate) SetNillableLocalViews(i *int) *VodUpdate

SetNillableLocalViews sets the "local_views" field if the given value is not nil.

func (*VodUpdate) SetNillableLocked added in v1.2.12

func (vu *VodUpdate) SetNillableLocked(b *bool) *VodUpdate

SetNillableLocked sets the "locked" field if the given value is not nil.

func (*VodUpdate) SetNillablePlatform

func (vu *VodUpdate) SetNillablePlatform(up *utils.VodPlatform) *VodUpdate

SetNillablePlatform sets the "platform" field if the given value is not nil.

func (*VodUpdate) SetNillableProcessing

func (vu *VodUpdate) SetNillableProcessing(b *bool) *VodUpdate

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*VodUpdate) SetNillableQueueID

func (vu *VodUpdate) SetNillableQueueID(id *uuid.UUID) *VodUpdate

SetNillableQueueID sets the "queue" edge to the Queue entity by ID if the given value is not nil.

func (*VodUpdate) SetNillableResolution

func (vu *VodUpdate) SetNillableResolution(s *string) *VodUpdate

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*VodUpdate) SetNillableStreamedAt

func (vu *VodUpdate) SetNillableStreamedAt(t *time.Time) *VodUpdate

SetNillableStreamedAt sets the "streamed_at" field if the given value is not nil.

func (*VodUpdate) SetNillableThumbnailPath

func (vu *VodUpdate) SetNillableThumbnailPath(s *string) *VodUpdate

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*VodUpdate) SetNillableType

func (vu *VodUpdate) SetNillableType(ut *utils.VodType) *VodUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*VodUpdate) SetNillableViews

func (vu *VodUpdate) SetNillableViews(i *int) *VodUpdate

SetNillableViews sets the "views" field if the given value is not nil.

func (*VodUpdate) SetPlatform

func (vu *VodUpdate) SetPlatform(up utils.VodPlatform) *VodUpdate

SetPlatform sets the "platform" field.

func (*VodUpdate) SetProcessing

func (vu *VodUpdate) SetProcessing(b bool) *VodUpdate

SetProcessing sets the "processing" field.

func (*VodUpdate) SetQueue

func (vu *VodUpdate) SetQueue(q *Queue) *VodUpdate

SetQueue sets the "queue" edge to the Queue entity.

func (*VodUpdate) SetQueueID

func (vu *VodUpdate) SetQueueID(id uuid.UUID) *VodUpdate

SetQueueID sets the "queue" edge to the Queue entity by ID.

func (*VodUpdate) SetResolution

func (vu *VodUpdate) SetResolution(s string) *VodUpdate

SetResolution sets the "resolution" field.

func (*VodUpdate) SetStreamedAt

func (vu *VodUpdate) SetStreamedAt(t time.Time) *VodUpdate

SetStreamedAt sets the "streamed_at" field.

func (*VodUpdate) SetThumbnailPath

func (vu *VodUpdate) SetThumbnailPath(s string) *VodUpdate

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodUpdate) SetTitle

func (vu *VodUpdate) SetTitle(s string) *VodUpdate

SetTitle sets the "title" field.

func (*VodUpdate) SetType

func (vu *VodUpdate) SetType(ut utils.VodType) *VodUpdate

SetType sets the "type" field.

func (*VodUpdate) SetUpdatedAt

func (vu *VodUpdate) SetUpdatedAt(t time.Time) *VodUpdate

SetUpdatedAt sets the "updated_at" field.

func (*VodUpdate) SetVideoPath

func (vu *VodUpdate) SetVideoPath(s string) *VodUpdate

SetVideoPath sets the "video_path" field.

func (*VodUpdate) SetViews

func (vu *VodUpdate) SetViews(i int) *VodUpdate

SetViews sets the "views" field.

func (*VodUpdate) SetWebThumbnailPath

func (vu *VodUpdate) SetWebThumbnailPath(s string) *VodUpdate

SetWebThumbnailPath sets the "web_thumbnail_path" field.

func (*VodUpdate) Where

func (vu *VodUpdate) Where(ps ...predicate.Vod) *VodUpdate

Where appends a list predicates to the VodUpdate builder.

type VodUpdateOne

type VodUpdateOne struct {
	// contains filtered or unexported fields
}

VodUpdateOne is the builder for updating a single Vod entity.

func (*VodUpdateOne) AddDuration

func (vuo *VodUpdateOne) AddDuration(i int) *VodUpdateOne

AddDuration adds i to the "duration" field.

func (*VodUpdateOne) AddLocalViews added in v1.4.3

func (vuo *VodUpdateOne) AddLocalViews(i int) *VodUpdateOne

AddLocalViews adds i to the "local_views" field.

func (*VodUpdateOne) AddPlaylistIDs added in v1.0.0

func (vuo *VodUpdateOne) AddPlaylistIDs(ids ...uuid.UUID) *VodUpdateOne

AddPlaylistIDs adds the "playlists" edge to the Playlist entity by IDs.

func (*VodUpdateOne) AddPlaylists added in v1.0.0

func (vuo *VodUpdateOne) AddPlaylists(p ...*Playlist) *VodUpdateOne

AddPlaylists adds the "playlists" edges to the Playlist entity.

func (*VodUpdateOne) AddViews

func (vuo *VodUpdateOne) AddViews(i int) *VodUpdateOne

AddViews adds i to the "views" field.

func (*VodUpdateOne) ClearCaptionPath added in v1.1.9

func (vuo *VodUpdateOne) ClearCaptionPath() *VodUpdateOne

ClearCaptionPath clears the value of the "caption_path" field.

func (*VodUpdateOne) ClearChannel

func (vuo *VodUpdateOne) ClearChannel() *VodUpdateOne

ClearChannel clears the "channel" edge to the Channel entity.

func (*VodUpdateOne) ClearChatPath

func (vuo *VodUpdateOne) ClearChatPath() *VodUpdateOne

ClearChatPath clears the value of the "chat_path" field.

func (*VodUpdateOne) ClearChatVideoPath

func (vuo *VodUpdateOne) ClearChatVideoPath() *VodUpdateOne

ClearChatVideoPath clears the value of the "chat_video_path" field.

func (*VodUpdateOne) ClearFileName added in v1.1.7

func (vuo *VodUpdateOne) ClearFileName() *VodUpdateOne

ClearFileName clears the value of the "file_name" field.

func (*VodUpdateOne) ClearFolderName added in v1.1.7

func (vuo *VodUpdateOne) ClearFolderName() *VodUpdateOne

ClearFolderName clears the value of the "folder_name" field.

func (*VodUpdateOne) ClearInfoPath

func (vuo *VodUpdateOne) ClearInfoPath() *VodUpdateOne

ClearInfoPath clears the value of the "info_path" field.

func (*VodUpdateOne) ClearPlaylists added in v1.0.0

func (vuo *VodUpdateOne) ClearPlaylists() *VodUpdateOne

ClearPlaylists clears all "playlists" edges to the Playlist entity.

func (*VodUpdateOne) ClearQueue

func (vuo *VodUpdateOne) ClearQueue() *VodUpdateOne

ClearQueue clears the "queue" edge to the Queue entity.

func (*VodUpdateOne) ClearResolution

func (vuo *VodUpdateOne) ClearResolution() *VodUpdateOne

ClearResolution clears the value of the "resolution" field.

func (*VodUpdateOne) ClearThumbnailPath

func (vuo *VodUpdateOne) ClearThumbnailPath() *VodUpdateOne

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*VodUpdateOne) Exec

func (vuo *VodUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*VodUpdateOne) ExecX

func (vuo *VodUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodUpdateOne) Mutation

func (vuo *VodUpdateOne) Mutation() *VodMutation

Mutation returns the VodMutation object of the builder.

func (*VodUpdateOne) RemovePlaylistIDs added in v1.0.0

func (vuo *VodUpdateOne) RemovePlaylistIDs(ids ...uuid.UUID) *VodUpdateOne

RemovePlaylistIDs removes the "playlists" edge to Playlist entities by IDs.

func (*VodUpdateOne) RemovePlaylists added in v1.0.0

func (vuo *VodUpdateOne) RemovePlaylists(p ...*Playlist) *VodUpdateOne

RemovePlaylists removes "playlists" edges to Playlist entities.

func (*VodUpdateOne) Save

func (vuo *VodUpdateOne) Save(ctx context.Context) (*Vod, error)

Save executes the query and returns the updated Vod entity.

func (*VodUpdateOne) SaveX

func (vuo *VodUpdateOne) SaveX(ctx context.Context) *Vod

SaveX is like Save, but panics if an error occurs.

func (*VodUpdateOne) Select

func (vuo *VodUpdateOne) Select(field string, fields ...string) *VodUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VodUpdateOne) SetCaptionPath added in v1.1.9

func (vuo *VodUpdateOne) SetCaptionPath(s string) *VodUpdateOne

SetCaptionPath sets the "caption_path" field.

func (*VodUpdateOne) SetChannel

func (vuo *VodUpdateOne) SetChannel(c *Channel) *VodUpdateOne

SetChannel sets the "channel" edge to the Channel entity.

func (*VodUpdateOne) SetChannelID

func (vuo *VodUpdateOne) SetChannelID(id uuid.UUID) *VodUpdateOne

SetChannelID sets the "channel" edge to the Channel entity by ID.

func (*VodUpdateOne) SetChatPath

func (vuo *VodUpdateOne) SetChatPath(s string) *VodUpdateOne

SetChatPath sets the "chat_path" field.

func (*VodUpdateOne) SetChatVideoPath

func (vuo *VodUpdateOne) SetChatVideoPath(s string) *VodUpdateOne

SetChatVideoPath sets the "chat_video_path" field.

func (*VodUpdateOne) SetDuration

func (vuo *VodUpdateOne) SetDuration(i int) *VodUpdateOne

SetDuration sets the "duration" field.

func (*VodUpdateOne) SetExtID

func (vuo *VodUpdateOne) SetExtID(s string) *VodUpdateOne

SetExtID sets the "ext_id" field.

func (*VodUpdateOne) SetFileName added in v1.1.7

func (vuo *VodUpdateOne) SetFileName(s string) *VodUpdateOne

SetFileName sets the "file_name" field.

func (*VodUpdateOne) SetFolderName added in v1.1.7

func (vuo *VodUpdateOne) SetFolderName(s string) *VodUpdateOne

SetFolderName sets the "folder_name" field.

func (*VodUpdateOne) SetInfoPath

func (vuo *VodUpdateOne) SetInfoPath(s string) *VodUpdateOne

SetInfoPath sets the "info_path" field.

func (*VodUpdateOne) SetLocalViews added in v1.4.3

func (vuo *VodUpdateOne) SetLocalViews(i int) *VodUpdateOne

SetLocalViews sets the "local_views" field.

func (*VodUpdateOne) SetLocked added in v1.2.12

func (vuo *VodUpdateOne) SetLocked(b bool) *VodUpdateOne

SetLocked sets the "locked" field.

func (*VodUpdateOne) SetNillableCaptionPath added in v1.1.9

func (vuo *VodUpdateOne) SetNillableCaptionPath(s *string) *VodUpdateOne

SetNillableCaptionPath sets the "caption_path" field if the given value is not nil.

func (*VodUpdateOne) SetNillableChatPath

func (vuo *VodUpdateOne) SetNillableChatPath(s *string) *VodUpdateOne

SetNillableChatPath sets the "chat_path" field if the given value is not nil.

func (*VodUpdateOne) SetNillableChatVideoPath

func (vuo *VodUpdateOne) SetNillableChatVideoPath(s *string) *VodUpdateOne

SetNillableChatVideoPath sets the "chat_video_path" field if the given value is not nil.

func (*VodUpdateOne) SetNillableDuration

func (vuo *VodUpdateOne) SetNillableDuration(i *int) *VodUpdateOne

SetNillableDuration sets the "duration" field if the given value is not nil.

func (*VodUpdateOne) SetNillableFileName added in v1.1.7

func (vuo *VodUpdateOne) SetNillableFileName(s *string) *VodUpdateOne

SetNillableFileName sets the "file_name" field if the given value is not nil.

func (*VodUpdateOne) SetNillableFolderName added in v1.1.7

func (vuo *VodUpdateOne) SetNillableFolderName(s *string) *VodUpdateOne

SetNillableFolderName sets the "folder_name" field if the given value is not nil.

func (*VodUpdateOne) SetNillableInfoPath

func (vuo *VodUpdateOne) SetNillableInfoPath(s *string) *VodUpdateOne

SetNillableInfoPath sets the "info_path" field if the given value is not nil.

func (*VodUpdateOne) SetNillableLocalViews added in v1.4.3

func (vuo *VodUpdateOne) SetNillableLocalViews(i *int) *VodUpdateOne

SetNillableLocalViews sets the "local_views" field if the given value is not nil.

func (*VodUpdateOne) SetNillableLocked added in v1.2.12

func (vuo *VodUpdateOne) SetNillableLocked(b *bool) *VodUpdateOne

SetNillableLocked sets the "locked" field if the given value is not nil.

func (*VodUpdateOne) SetNillablePlatform

func (vuo *VodUpdateOne) SetNillablePlatform(up *utils.VodPlatform) *VodUpdateOne

SetNillablePlatform sets the "platform" field if the given value is not nil.

func (*VodUpdateOne) SetNillableProcessing

func (vuo *VodUpdateOne) SetNillableProcessing(b *bool) *VodUpdateOne

SetNillableProcessing sets the "processing" field if the given value is not nil.

func (*VodUpdateOne) SetNillableQueueID

func (vuo *VodUpdateOne) SetNillableQueueID(id *uuid.UUID) *VodUpdateOne

SetNillableQueueID sets the "queue" edge to the Queue entity by ID if the given value is not nil.

func (*VodUpdateOne) SetNillableResolution

func (vuo *VodUpdateOne) SetNillableResolution(s *string) *VodUpdateOne

SetNillableResolution sets the "resolution" field if the given value is not nil.

func (*VodUpdateOne) SetNillableStreamedAt

func (vuo *VodUpdateOne) SetNillableStreamedAt(t *time.Time) *VodUpdateOne

SetNillableStreamedAt sets the "streamed_at" field if the given value is not nil.

func (*VodUpdateOne) SetNillableThumbnailPath

func (vuo *VodUpdateOne) SetNillableThumbnailPath(s *string) *VodUpdateOne

SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.

func (*VodUpdateOne) SetNillableType

func (vuo *VodUpdateOne) SetNillableType(ut *utils.VodType) *VodUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*VodUpdateOne) SetNillableViews

func (vuo *VodUpdateOne) SetNillableViews(i *int) *VodUpdateOne

SetNillableViews sets the "views" field if the given value is not nil.

func (*VodUpdateOne) SetPlatform

func (vuo *VodUpdateOne) SetPlatform(up utils.VodPlatform) *VodUpdateOne

SetPlatform sets the "platform" field.

func (*VodUpdateOne) SetProcessing

func (vuo *VodUpdateOne) SetProcessing(b bool) *VodUpdateOne

SetProcessing sets the "processing" field.

func (*VodUpdateOne) SetQueue

func (vuo *VodUpdateOne) SetQueue(q *Queue) *VodUpdateOne

SetQueue sets the "queue" edge to the Queue entity.

func (*VodUpdateOne) SetQueueID

func (vuo *VodUpdateOne) SetQueueID(id uuid.UUID) *VodUpdateOne

SetQueueID sets the "queue" edge to the Queue entity by ID.

func (*VodUpdateOne) SetResolution

func (vuo *VodUpdateOne) SetResolution(s string) *VodUpdateOne

SetResolution sets the "resolution" field.

func (*VodUpdateOne) SetStreamedAt

func (vuo *VodUpdateOne) SetStreamedAt(t time.Time) *VodUpdateOne

SetStreamedAt sets the "streamed_at" field.

func (*VodUpdateOne) SetThumbnailPath

func (vuo *VodUpdateOne) SetThumbnailPath(s string) *VodUpdateOne

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodUpdateOne) SetTitle

func (vuo *VodUpdateOne) SetTitle(s string) *VodUpdateOne

SetTitle sets the "title" field.

func (*VodUpdateOne) SetType

func (vuo *VodUpdateOne) SetType(ut utils.VodType) *VodUpdateOne

SetType sets the "type" field.

func (*VodUpdateOne) SetUpdatedAt

func (vuo *VodUpdateOne) SetUpdatedAt(t time.Time) *VodUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*VodUpdateOne) SetVideoPath

func (vuo *VodUpdateOne) SetVideoPath(s string) *VodUpdateOne

SetVideoPath sets the "video_path" field.

func (*VodUpdateOne) SetViews

func (vuo *VodUpdateOne) SetViews(i int) *VodUpdateOne

SetViews sets the "views" field.

func (*VodUpdateOne) SetWebThumbnailPath

func (vuo *VodUpdateOne) SetWebThumbnailPath(s string) *VodUpdateOne

SetWebThumbnailPath sets the "web_thumbnail_path" field.

func (*VodUpdateOne) Where added in v1.2.4

func (vuo *VodUpdateOne) Where(ps ...predicate.Vod) *VodUpdateOne

Where appends a list predicates to the VodUpdate builder.

type VodUpsert added in v0.0.2

type VodUpsert struct {
	*sql.UpdateSet
}

VodUpsert is the "OnConflict" setter.

func (*VodUpsert) AddDuration added in v0.0.2

func (u *VodUpsert) AddDuration(v int) *VodUpsert

AddDuration adds v to the "duration" field.

func (*VodUpsert) AddLocalViews added in v1.4.3

func (u *VodUpsert) AddLocalViews(v int) *VodUpsert

AddLocalViews adds v to the "local_views" field.

func (*VodUpsert) AddViews added in v0.0.2

func (u *VodUpsert) AddViews(v int) *VodUpsert

AddViews adds v to the "views" field.

func (*VodUpsert) ClearCaptionPath added in v1.2.4

func (u *VodUpsert) ClearCaptionPath() *VodUpsert

ClearCaptionPath clears the value of the "caption_path" field.

func (*VodUpsert) ClearChatPath added in v0.0.2

func (u *VodUpsert) ClearChatPath() *VodUpsert

ClearChatPath clears the value of the "chat_path" field.

func (*VodUpsert) ClearChatVideoPath added in v0.0.2

func (u *VodUpsert) ClearChatVideoPath() *VodUpsert

ClearChatVideoPath clears the value of the "chat_video_path" field.

func (*VodUpsert) ClearFileName added in v1.2.4

func (u *VodUpsert) ClearFileName() *VodUpsert

ClearFileName clears the value of the "file_name" field.

func (*VodUpsert) ClearFolderName added in v1.2.4

func (u *VodUpsert) ClearFolderName() *VodUpsert

ClearFolderName clears the value of the "folder_name" field.

func (*VodUpsert) ClearInfoPath added in v0.0.2

func (u *VodUpsert) ClearInfoPath() *VodUpsert

ClearInfoPath clears the value of the "info_path" field.

func (*VodUpsert) ClearResolution added in v0.0.2

func (u *VodUpsert) ClearResolution() *VodUpsert

ClearResolution clears the value of the "resolution" field.

func (*VodUpsert) ClearThumbnailPath added in v0.0.2

func (u *VodUpsert) ClearThumbnailPath() *VodUpsert

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*VodUpsert) SetCaptionPath added in v1.2.4

func (u *VodUpsert) SetCaptionPath(v string) *VodUpsert

SetCaptionPath sets the "caption_path" field.

func (*VodUpsert) SetChatPath added in v0.0.2

func (u *VodUpsert) SetChatPath(v string) *VodUpsert

SetChatPath sets the "chat_path" field.

func (*VodUpsert) SetChatVideoPath added in v0.0.2

func (u *VodUpsert) SetChatVideoPath(v string) *VodUpsert

SetChatVideoPath sets the "chat_video_path" field.

func (*VodUpsert) SetDuration added in v0.0.2

func (u *VodUpsert) SetDuration(v int) *VodUpsert

SetDuration sets the "duration" field.

func (*VodUpsert) SetExtID added in v0.0.2

func (u *VodUpsert) SetExtID(v string) *VodUpsert

SetExtID sets the "ext_id" field.

func (*VodUpsert) SetFileName added in v1.2.4

func (u *VodUpsert) SetFileName(v string) *VodUpsert

SetFileName sets the "file_name" field.

func (*VodUpsert) SetFolderName added in v1.2.4

func (u *VodUpsert) SetFolderName(v string) *VodUpsert

SetFolderName sets the "folder_name" field.

func (*VodUpsert) SetInfoPath added in v0.0.2

func (u *VodUpsert) SetInfoPath(v string) *VodUpsert

SetInfoPath sets the "info_path" field.

func (*VodUpsert) SetLocalViews added in v1.4.3

func (u *VodUpsert) SetLocalViews(v int) *VodUpsert

SetLocalViews sets the "local_views" field.

func (*VodUpsert) SetLocked added in v1.2.12

func (u *VodUpsert) SetLocked(v bool) *VodUpsert

SetLocked sets the "locked" field.

func (*VodUpsert) SetPlatform added in v0.0.2

func (u *VodUpsert) SetPlatform(v utils.VodPlatform) *VodUpsert

SetPlatform sets the "platform" field.

func (*VodUpsert) SetProcessing added in v0.0.2

func (u *VodUpsert) SetProcessing(v bool) *VodUpsert

SetProcessing sets the "processing" field.

func (*VodUpsert) SetResolution added in v0.0.2

func (u *VodUpsert) SetResolution(v string) *VodUpsert

SetResolution sets the "resolution" field.

func (*VodUpsert) SetStreamedAt added in v0.0.2

func (u *VodUpsert) SetStreamedAt(v time.Time) *VodUpsert

SetStreamedAt sets the "streamed_at" field.

func (*VodUpsert) SetThumbnailPath added in v0.0.2

func (u *VodUpsert) SetThumbnailPath(v string) *VodUpsert

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodUpsert) SetTitle added in v0.0.2

func (u *VodUpsert) SetTitle(v string) *VodUpsert

SetTitle sets the "title" field.

func (*VodUpsert) SetType added in v0.0.2

func (u *VodUpsert) SetType(v utils.VodType) *VodUpsert

SetType sets the "type" field.

func (*VodUpsert) SetUpdatedAt added in v0.0.2

func (u *VodUpsert) SetUpdatedAt(v time.Time) *VodUpsert

SetUpdatedAt sets the "updated_at" field.

func (*VodUpsert) SetVideoPath added in v0.0.2

func (u *VodUpsert) SetVideoPath(v string) *VodUpsert

SetVideoPath sets the "video_path" field.

func (*VodUpsert) SetViews added in v0.0.2

func (u *VodUpsert) SetViews(v int) *VodUpsert

SetViews sets the "views" field.

func (*VodUpsert) SetWebThumbnailPath added in v0.0.2

func (u *VodUpsert) SetWebThumbnailPath(v string) *VodUpsert

SetWebThumbnailPath sets the "web_thumbnail_path" field.

func (*VodUpsert) UpdateCaptionPath added in v1.2.4

func (u *VodUpsert) UpdateCaptionPath() *VodUpsert

UpdateCaptionPath sets the "caption_path" field to the value that was provided on create.

func (*VodUpsert) UpdateChatPath added in v0.0.2

func (u *VodUpsert) UpdateChatPath() *VodUpsert

UpdateChatPath sets the "chat_path" field to the value that was provided on create.

func (*VodUpsert) UpdateChatVideoPath added in v0.0.2

func (u *VodUpsert) UpdateChatVideoPath() *VodUpsert

UpdateChatVideoPath sets the "chat_video_path" field to the value that was provided on create.

func (*VodUpsert) UpdateDuration added in v0.0.2

func (u *VodUpsert) UpdateDuration() *VodUpsert

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*VodUpsert) UpdateExtID added in v0.0.2

func (u *VodUpsert) UpdateExtID() *VodUpsert

UpdateExtID sets the "ext_id" field to the value that was provided on create.

func (*VodUpsert) UpdateFileName added in v1.2.4

func (u *VodUpsert) UpdateFileName() *VodUpsert

UpdateFileName sets the "file_name" field to the value that was provided on create.

func (*VodUpsert) UpdateFolderName added in v1.2.4

func (u *VodUpsert) UpdateFolderName() *VodUpsert

UpdateFolderName sets the "folder_name" field to the value that was provided on create.

func (*VodUpsert) UpdateInfoPath added in v0.0.2

func (u *VodUpsert) UpdateInfoPath() *VodUpsert

UpdateInfoPath sets the "info_path" field to the value that was provided on create.

func (*VodUpsert) UpdateLocalViews added in v1.4.3

func (u *VodUpsert) UpdateLocalViews() *VodUpsert

UpdateLocalViews sets the "local_views" field to the value that was provided on create.

func (*VodUpsert) UpdateLocked added in v1.2.12

func (u *VodUpsert) UpdateLocked() *VodUpsert

UpdateLocked sets the "locked" field to the value that was provided on create.

func (*VodUpsert) UpdatePlatform added in v0.0.2

func (u *VodUpsert) UpdatePlatform() *VodUpsert

UpdatePlatform sets the "platform" field to the value that was provided on create.

func (*VodUpsert) UpdateProcessing added in v0.0.2

func (u *VodUpsert) UpdateProcessing() *VodUpsert

UpdateProcessing sets the "processing" field to the value that was provided on create.

func (*VodUpsert) UpdateResolution added in v0.0.2

func (u *VodUpsert) UpdateResolution() *VodUpsert

UpdateResolution sets the "resolution" field to the value that was provided on create.

func (*VodUpsert) UpdateStreamedAt added in v0.0.2

func (u *VodUpsert) UpdateStreamedAt() *VodUpsert

UpdateStreamedAt sets the "streamed_at" field to the value that was provided on create.

func (*VodUpsert) UpdateThumbnailPath added in v0.0.2

func (u *VodUpsert) UpdateThumbnailPath() *VodUpsert

UpdateThumbnailPath sets the "thumbnail_path" field to the value that was provided on create.

func (*VodUpsert) UpdateTitle added in v0.0.2

func (u *VodUpsert) UpdateTitle() *VodUpsert

UpdateTitle sets the "title" field to the value that was provided on create.

func (*VodUpsert) UpdateType added in v0.0.2

func (u *VodUpsert) UpdateType() *VodUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*VodUpsert) UpdateUpdatedAt added in v0.0.2

func (u *VodUpsert) UpdateUpdatedAt() *VodUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*VodUpsert) UpdateVideoPath added in v0.0.2

func (u *VodUpsert) UpdateVideoPath() *VodUpsert

UpdateVideoPath sets the "video_path" field to the value that was provided on create.

func (*VodUpsert) UpdateViews added in v0.0.2

func (u *VodUpsert) UpdateViews() *VodUpsert

UpdateViews sets the "views" field to the value that was provided on create.

func (*VodUpsert) UpdateWebThumbnailPath added in v0.0.2

func (u *VodUpsert) UpdateWebThumbnailPath() *VodUpsert

UpdateWebThumbnailPath sets the "web_thumbnail_path" field to the value that was provided on create.

type VodUpsertBulk added in v0.0.2

type VodUpsertBulk struct {
	// contains filtered or unexported fields
}

VodUpsertBulk is the builder for "upsert"-ing a bulk of Vod nodes.

func (*VodUpsertBulk) AddDuration added in v0.0.2

func (u *VodUpsertBulk) AddDuration(v int) *VodUpsertBulk

AddDuration adds v to the "duration" field.

func (*VodUpsertBulk) AddLocalViews added in v1.4.3

func (u *VodUpsertBulk) AddLocalViews(v int) *VodUpsertBulk

AddLocalViews adds v to the "local_views" field.

func (*VodUpsertBulk) AddViews added in v0.0.2

func (u *VodUpsertBulk) AddViews(v int) *VodUpsertBulk

AddViews adds v to the "views" field.

func (*VodUpsertBulk) ClearCaptionPath added in v1.2.4

func (u *VodUpsertBulk) ClearCaptionPath() *VodUpsertBulk

ClearCaptionPath clears the value of the "caption_path" field.

func (*VodUpsertBulk) ClearChatPath added in v0.0.2

func (u *VodUpsertBulk) ClearChatPath() *VodUpsertBulk

ClearChatPath clears the value of the "chat_path" field.

func (*VodUpsertBulk) ClearChatVideoPath added in v0.0.2

func (u *VodUpsertBulk) ClearChatVideoPath() *VodUpsertBulk

ClearChatVideoPath clears the value of the "chat_video_path" field.

func (*VodUpsertBulk) ClearFileName added in v1.2.4

func (u *VodUpsertBulk) ClearFileName() *VodUpsertBulk

ClearFileName clears the value of the "file_name" field.

func (*VodUpsertBulk) ClearFolderName added in v1.2.4

func (u *VodUpsertBulk) ClearFolderName() *VodUpsertBulk

ClearFolderName clears the value of the "folder_name" field.

func (*VodUpsertBulk) ClearInfoPath added in v0.0.2

func (u *VodUpsertBulk) ClearInfoPath() *VodUpsertBulk

ClearInfoPath clears the value of the "info_path" field.

func (*VodUpsertBulk) ClearResolution added in v0.0.2

func (u *VodUpsertBulk) ClearResolution() *VodUpsertBulk

ClearResolution clears the value of the "resolution" field.

func (*VodUpsertBulk) ClearThumbnailPath added in v0.0.2

func (u *VodUpsertBulk) ClearThumbnailPath() *VodUpsertBulk

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*VodUpsertBulk) DoNothing added in v0.0.2

func (u *VodUpsertBulk) DoNothing() *VodUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VodUpsertBulk) Exec added in v0.0.2

func (u *VodUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VodUpsertBulk) ExecX added in v0.0.2

func (u *VodUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodUpsertBulk) Ignore added in v0.0.2

func (u *VodUpsertBulk) Ignore() *VodUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Vod.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*VodUpsertBulk) SetCaptionPath added in v1.2.4

func (u *VodUpsertBulk) SetCaptionPath(v string) *VodUpsertBulk

SetCaptionPath sets the "caption_path" field.

func (*VodUpsertBulk) SetChatPath added in v0.0.2

func (u *VodUpsertBulk) SetChatPath(v string) *VodUpsertBulk

SetChatPath sets the "chat_path" field.

func (*VodUpsertBulk) SetChatVideoPath added in v0.0.2

func (u *VodUpsertBulk) SetChatVideoPath(v string) *VodUpsertBulk

SetChatVideoPath sets the "chat_video_path" field.

func (*VodUpsertBulk) SetDuration added in v0.0.2

func (u *VodUpsertBulk) SetDuration(v int) *VodUpsertBulk

SetDuration sets the "duration" field.

func (*VodUpsertBulk) SetExtID added in v0.0.2

func (u *VodUpsertBulk) SetExtID(v string) *VodUpsertBulk

SetExtID sets the "ext_id" field.

func (*VodUpsertBulk) SetFileName added in v1.2.4

func (u *VodUpsertBulk) SetFileName(v string) *VodUpsertBulk

SetFileName sets the "file_name" field.

func (*VodUpsertBulk) SetFolderName added in v1.2.4

func (u *VodUpsertBulk) SetFolderName(v string) *VodUpsertBulk

SetFolderName sets the "folder_name" field.

func (*VodUpsertBulk) SetInfoPath added in v0.0.2

func (u *VodUpsertBulk) SetInfoPath(v string) *VodUpsertBulk

SetInfoPath sets the "info_path" field.

func (*VodUpsertBulk) SetLocalViews added in v1.4.3

func (u *VodUpsertBulk) SetLocalViews(v int) *VodUpsertBulk

SetLocalViews sets the "local_views" field.

func (*VodUpsertBulk) SetLocked added in v1.2.12

func (u *VodUpsertBulk) SetLocked(v bool) *VodUpsertBulk

SetLocked sets the "locked" field.

func (*VodUpsertBulk) SetPlatform added in v0.0.2

func (u *VodUpsertBulk) SetPlatform(v utils.VodPlatform) *VodUpsertBulk

SetPlatform sets the "platform" field.

func (*VodUpsertBulk) SetProcessing added in v0.0.2

func (u *VodUpsertBulk) SetProcessing(v bool) *VodUpsertBulk

SetProcessing sets the "processing" field.

func (*VodUpsertBulk) SetResolution added in v0.0.2

func (u *VodUpsertBulk) SetResolution(v string) *VodUpsertBulk

SetResolution sets the "resolution" field.

func (*VodUpsertBulk) SetStreamedAt added in v0.0.2

func (u *VodUpsertBulk) SetStreamedAt(v time.Time) *VodUpsertBulk

SetStreamedAt sets the "streamed_at" field.

func (*VodUpsertBulk) SetThumbnailPath added in v0.0.2

func (u *VodUpsertBulk) SetThumbnailPath(v string) *VodUpsertBulk

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodUpsertBulk) SetTitle added in v0.0.2

func (u *VodUpsertBulk) SetTitle(v string) *VodUpsertBulk

SetTitle sets the "title" field.

func (*VodUpsertBulk) SetType added in v0.0.2

func (u *VodUpsertBulk) SetType(v utils.VodType) *VodUpsertBulk

SetType sets the "type" field.

func (*VodUpsertBulk) SetUpdatedAt added in v0.0.2

func (u *VodUpsertBulk) SetUpdatedAt(v time.Time) *VodUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*VodUpsertBulk) SetVideoPath added in v0.0.2

func (u *VodUpsertBulk) SetVideoPath(v string) *VodUpsertBulk

SetVideoPath sets the "video_path" field.

func (*VodUpsertBulk) SetViews added in v0.0.2

func (u *VodUpsertBulk) SetViews(v int) *VodUpsertBulk

SetViews sets the "views" field.

func (*VodUpsertBulk) SetWebThumbnailPath added in v0.0.2

func (u *VodUpsertBulk) SetWebThumbnailPath(v string) *VodUpsertBulk

SetWebThumbnailPath sets the "web_thumbnail_path" field.

func (*VodUpsertBulk) Update added in v0.0.2

func (u *VodUpsertBulk) Update(set func(*VodUpsert)) *VodUpsertBulk

Update allows overriding fields `UPDATE` values. See the VodCreateBulk.OnConflict documentation for more info.

func (*VodUpsertBulk) UpdateCaptionPath added in v1.2.4

func (u *VodUpsertBulk) UpdateCaptionPath() *VodUpsertBulk

UpdateCaptionPath sets the "caption_path" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateChatPath added in v0.0.2

func (u *VodUpsertBulk) UpdateChatPath() *VodUpsertBulk

UpdateChatPath sets the "chat_path" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateChatVideoPath added in v0.0.2

func (u *VodUpsertBulk) UpdateChatVideoPath() *VodUpsertBulk

UpdateChatVideoPath sets the "chat_video_path" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateDuration added in v0.0.2

func (u *VodUpsertBulk) UpdateDuration() *VodUpsertBulk

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateExtID added in v0.0.2

func (u *VodUpsertBulk) UpdateExtID() *VodUpsertBulk

UpdateExtID sets the "ext_id" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateFileName added in v1.2.4

func (u *VodUpsertBulk) UpdateFileName() *VodUpsertBulk

UpdateFileName sets the "file_name" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateFolderName added in v1.2.4

func (u *VodUpsertBulk) UpdateFolderName() *VodUpsertBulk

UpdateFolderName sets the "folder_name" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateInfoPath added in v0.0.2

func (u *VodUpsertBulk) UpdateInfoPath() *VodUpsertBulk

UpdateInfoPath sets the "info_path" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateLocalViews added in v1.4.3

func (u *VodUpsertBulk) UpdateLocalViews() *VodUpsertBulk

UpdateLocalViews sets the "local_views" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateLocked added in v1.2.12

func (u *VodUpsertBulk) UpdateLocked() *VodUpsertBulk

UpdateLocked sets the "locked" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateNewValues added in v0.0.2

func (u *VodUpsertBulk) UpdateNewValues() *VodUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Vod.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(vod.FieldID)
		}),
	).
	Exec(ctx)

func (*VodUpsertBulk) UpdatePlatform added in v0.0.2

func (u *VodUpsertBulk) UpdatePlatform() *VodUpsertBulk

UpdatePlatform sets the "platform" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateProcessing added in v0.0.2

func (u *VodUpsertBulk) UpdateProcessing() *VodUpsertBulk

UpdateProcessing sets the "processing" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateResolution added in v0.0.2

func (u *VodUpsertBulk) UpdateResolution() *VodUpsertBulk

UpdateResolution sets the "resolution" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateStreamedAt added in v0.0.2

func (u *VodUpsertBulk) UpdateStreamedAt() *VodUpsertBulk

UpdateStreamedAt sets the "streamed_at" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateThumbnailPath added in v0.0.2

func (u *VodUpsertBulk) UpdateThumbnailPath() *VodUpsertBulk

UpdateThumbnailPath sets the "thumbnail_path" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateTitle added in v0.0.2

func (u *VodUpsertBulk) UpdateTitle() *VodUpsertBulk

UpdateTitle sets the "title" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateType added in v0.0.2

func (u *VodUpsertBulk) UpdateType() *VodUpsertBulk

UpdateType sets the "type" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateUpdatedAt added in v0.0.2

func (u *VodUpsertBulk) UpdateUpdatedAt() *VodUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateVideoPath added in v0.0.2

func (u *VodUpsertBulk) UpdateVideoPath() *VodUpsertBulk

UpdateVideoPath sets the "video_path" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateViews added in v0.0.2

func (u *VodUpsertBulk) UpdateViews() *VodUpsertBulk

UpdateViews sets the "views" field to the value that was provided on create.

func (*VodUpsertBulk) UpdateWebThumbnailPath added in v0.0.2

func (u *VodUpsertBulk) UpdateWebThumbnailPath() *VodUpsertBulk

UpdateWebThumbnailPath sets the "web_thumbnail_path" field to the value that was provided on create.

type VodUpsertOne added in v0.0.2

type VodUpsertOne struct {
	// contains filtered or unexported fields
}

VodUpsertOne is the builder for "upsert"-ing

one Vod node.

func (*VodUpsertOne) AddDuration added in v0.0.2

func (u *VodUpsertOne) AddDuration(v int) *VodUpsertOne

AddDuration adds v to the "duration" field.

func (*VodUpsertOne) AddLocalViews added in v1.4.3

func (u *VodUpsertOne) AddLocalViews(v int) *VodUpsertOne

AddLocalViews adds v to the "local_views" field.

func (*VodUpsertOne) AddViews added in v0.0.2

func (u *VodUpsertOne) AddViews(v int) *VodUpsertOne

AddViews adds v to the "views" field.

func (*VodUpsertOne) ClearCaptionPath added in v1.2.4

func (u *VodUpsertOne) ClearCaptionPath() *VodUpsertOne

ClearCaptionPath clears the value of the "caption_path" field.

func (*VodUpsertOne) ClearChatPath added in v0.0.2

func (u *VodUpsertOne) ClearChatPath() *VodUpsertOne

ClearChatPath clears the value of the "chat_path" field.

func (*VodUpsertOne) ClearChatVideoPath added in v0.0.2

func (u *VodUpsertOne) ClearChatVideoPath() *VodUpsertOne

ClearChatVideoPath clears the value of the "chat_video_path" field.

func (*VodUpsertOne) ClearFileName added in v1.2.4

func (u *VodUpsertOne) ClearFileName() *VodUpsertOne

ClearFileName clears the value of the "file_name" field.

func (*VodUpsertOne) ClearFolderName added in v1.2.4

func (u *VodUpsertOne) ClearFolderName() *VodUpsertOne

ClearFolderName clears the value of the "folder_name" field.

func (*VodUpsertOne) ClearInfoPath added in v0.0.2

func (u *VodUpsertOne) ClearInfoPath() *VodUpsertOne

ClearInfoPath clears the value of the "info_path" field.

func (*VodUpsertOne) ClearResolution added in v0.0.2

func (u *VodUpsertOne) ClearResolution() *VodUpsertOne

ClearResolution clears the value of the "resolution" field.

func (*VodUpsertOne) ClearThumbnailPath added in v0.0.2

func (u *VodUpsertOne) ClearThumbnailPath() *VodUpsertOne

ClearThumbnailPath clears the value of the "thumbnail_path" field.

func (*VodUpsertOne) DoNothing added in v0.0.2

func (u *VodUpsertOne) DoNothing() *VodUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VodUpsertOne) Exec added in v0.0.2

func (u *VodUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*VodUpsertOne) ExecX added in v0.0.2

func (u *VodUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VodUpsertOne) ID added in v0.0.2

func (u *VodUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VodUpsertOne) IDX added in v0.0.2

func (u *VodUpsertOne) IDX(ctx context.Context) uuid.UUID

IDX is like ID, but panics if an error occurs.

func (*VodUpsertOne) Ignore added in v0.0.2

func (u *VodUpsertOne) Ignore() *VodUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Vod.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VodUpsertOne) SetCaptionPath added in v1.2.4

func (u *VodUpsertOne) SetCaptionPath(v string) *VodUpsertOne

SetCaptionPath sets the "caption_path" field.

func (*VodUpsertOne) SetChatPath added in v0.0.2

func (u *VodUpsertOne) SetChatPath(v string) *VodUpsertOne

SetChatPath sets the "chat_path" field.

func (*VodUpsertOne) SetChatVideoPath added in v0.0.2

func (u *VodUpsertOne) SetChatVideoPath(v string) *VodUpsertOne

SetChatVideoPath sets the "chat_video_path" field.

func (*VodUpsertOne) SetDuration added in v0.0.2

func (u *VodUpsertOne) SetDuration(v int) *VodUpsertOne

SetDuration sets the "duration" field.

func (*VodUpsertOne) SetExtID added in v0.0.2

func (u *VodUpsertOne) SetExtID(v string) *VodUpsertOne

SetExtID sets the "ext_id" field.

func (*VodUpsertOne) SetFileName added in v1.2.4

func (u *VodUpsertOne) SetFileName(v string) *VodUpsertOne

SetFileName sets the "file_name" field.

func (*VodUpsertOne) SetFolderName added in v1.2.4

func (u *VodUpsertOne) SetFolderName(v string) *VodUpsertOne

SetFolderName sets the "folder_name" field.

func (*VodUpsertOne) SetInfoPath added in v0.0.2

func (u *VodUpsertOne) SetInfoPath(v string) *VodUpsertOne

SetInfoPath sets the "info_path" field.

func (*VodUpsertOne) SetLocalViews added in v1.4.3

func (u *VodUpsertOne) SetLocalViews(v int) *VodUpsertOne

SetLocalViews sets the "local_views" field.

func (*VodUpsertOne) SetLocked added in v1.2.12

func (u *VodUpsertOne) SetLocked(v bool) *VodUpsertOne

SetLocked sets the "locked" field.

func (*VodUpsertOne) SetPlatform added in v0.0.2

func (u *VodUpsertOne) SetPlatform(v utils.VodPlatform) *VodUpsertOne

SetPlatform sets the "platform" field.

func (*VodUpsertOne) SetProcessing added in v0.0.2

func (u *VodUpsertOne) SetProcessing(v bool) *VodUpsertOne

SetProcessing sets the "processing" field.

func (*VodUpsertOne) SetResolution added in v0.0.2

func (u *VodUpsertOne) SetResolution(v string) *VodUpsertOne

SetResolution sets the "resolution" field.

func (*VodUpsertOne) SetStreamedAt added in v0.0.2

func (u *VodUpsertOne) SetStreamedAt(v time.Time) *VodUpsertOne

SetStreamedAt sets the "streamed_at" field.

func (*VodUpsertOne) SetThumbnailPath added in v0.0.2

func (u *VodUpsertOne) SetThumbnailPath(v string) *VodUpsertOne

SetThumbnailPath sets the "thumbnail_path" field.

func (*VodUpsertOne) SetTitle added in v0.0.2

func (u *VodUpsertOne) SetTitle(v string) *VodUpsertOne

SetTitle sets the "title" field.

func (*VodUpsertOne) SetType added in v0.0.2

func (u *VodUpsertOne) SetType(v utils.VodType) *VodUpsertOne

SetType sets the "type" field.

func (*VodUpsertOne) SetUpdatedAt added in v0.0.2

func (u *VodUpsertOne) SetUpdatedAt(v time.Time) *VodUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*VodUpsertOne) SetVideoPath added in v0.0.2

func (u *VodUpsertOne) SetVideoPath(v string) *VodUpsertOne

SetVideoPath sets the "video_path" field.

func (*VodUpsertOne) SetViews added in v0.0.2

func (u *VodUpsertOne) SetViews(v int) *VodUpsertOne

SetViews sets the "views" field.

func (*VodUpsertOne) SetWebThumbnailPath added in v0.0.2

func (u *VodUpsertOne) SetWebThumbnailPath(v string) *VodUpsertOne

SetWebThumbnailPath sets the "web_thumbnail_path" field.

func (*VodUpsertOne) Update added in v0.0.2

func (u *VodUpsertOne) Update(set func(*VodUpsert)) *VodUpsertOne

Update allows overriding fields `UPDATE` values. See the VodCreate.OnConflict documentation for more info.

func (*VodUpsertOne) UpdateCaptionPath added in v1.2.4

func (u *VodUpsertOne) UpdateCaptionPath() *VodUpsertOne

UpdateCaptionPath sets the "caption_path" field to the value that was provided on create.

func (*VodUpsertOne) UpdateChatPath added in v0.0.2

func (u *VodUpsertOne) UpdateChatPath() *VodUpsertOne

UpdateChatPath sets the "chat_path" field to the value that was provided on create.

func (*VodUpsertOne) UpdateChatVideoPath added in v0.0.2

func (u *VodUpsertOne) UpdateChatVideoPath() *VodUpsertOne

UpdateChatVideoPath sets the "chat_video_path" field to the value that was provided on create.

func (*VodUpsertOne) UpdateDuration added in v0.0.2

func (u *VodUpsertOne) UpdateDuration() *VodUpsertOne

UpdateDuration sets the "duration" field to the value that was provided on create.

func (*VodUpsertOne) UpdateExtID added in v0.0.2

func (u *VodUpsertOne) UpdateExtID() *VodUpsertOne

UpdateExtID sets the "ext_id" field to the value that was provided on create.

func (*VodUpsertOne) UpdateFileName added in v1.2.4

func (u *VodUpsertOne) UpdateFileName() *VodUpsertOne

UpdateFileName sets the "file_name" field to the value that was provided on create.

func (*VodUpsertOne) UpdateFolderName added in v1.2.4

func (u *VodUpsertOne) UpdateFolderName() *VodUpsertOne

UpdateFolderName sets the "folder_name" field to the value that was provided on create.

func (*VodUpsertOne) UpdateInfoPath added in v0.0.2

func (u *VodUpsertOne) UpdateInfoPath() *VodUpsertOne

UpdateInfoPath sets the "info_path" field to the value that was provided on create.

func (*VodUpsertOne) UpdateLocalViews added in v1.4.3

func (u *VodUpsertOne) UpdateLocalViews() *VodUpsertOne

UpdateLocalViews sets the "local_views" field to the value that was provided on create.

func (*VodUpsertOne) UpdateLocked added in v1.2.12

func (u *VodUpsertOne) UpdateLocked() *VodUpsertOne

UpdateLocked sets the "locked" field to the value that was provided on create.

func (*VodUpsertOne) UpdateNewValues added in v0.0.2

func (u *VodUpsertOne) UpdateNewValues() *VodUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Vod.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(vod.FieldID)
		}),
	).
	Exec(ctx)

func (*VodUpsertOne) UpdatePlatform added in v0.0.2

func (u *VodUpsertOne) UpdatePlatform() *VodUpsertOne

UpdatePlatform sets the "platform" field to the value that was provided on create.

func (*VodUpsertOne) UpdateProcessing added in v0.0.2

func (u *VodUpsertOne) UpdateProcessing() *VodUpsertOne

UpdateProcessing sets the "processing" field to the value that was provided on create.

func (*VodUpsertOne) UpdateResolution added in v0.0.2

func (u *VodUpsertOne) UpdateResolution() *VodUpsertOne

UpdateResolution sets the "resolution" field to the value that was provided on create.

func (*VodUpsertOne) UpdateStreamedAt added in v0.0.2

func (u *VodUpsertOne) UpdateStreamedAt() *VodUpsertOne

UpdateStreamedAt sets the "streamed_at" field to the value that was provided on create.

func (*VodUpsertOne) UpdateThumbnailPath added in v0.0.2

func (u *VodUpsertOne) UpdateThumbnailPath() *VodUpsertOne

UpdateThumbnailPath sets the "thumbnail_path" field to the value that was provided on create.

func (*VodUpsertOne) UpdateTitle added in v0.0.2

func (u *VodUpsertOne) UpdateTitle() *VodUpsertOne

UpdateTitle sets the "title" field to the value that was provided on create.

func (*VodUpsertOne) UpdateType added in v0.0.2

func (u *VodUpsertOne) UpdateType() *VodUpsertOne

UpdateType sets the "type" field to the value that was provided on create.

func (*VodUpsertOne) UpdateUpdatedAt added in v0.0.2

func (u *VodUpsertOne) UpdateUpdatedAt() *VodUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*VodUpsertOne) UpdateVideoPath added in v0.0.2

func (u *VodUpsertOne) UpdateVideoPath() *VodUpsertOne

UpdateVideoPath sets the "video_path" field to the value that was provided on create.

func (*VodUpsertOne) UpdateViews added in v0.0.2

func (u *VodUpsertOne) UpdateViews() *VodUpsertOne

UpdateViews sets the "views" field to the value that was provided on create.

func (*VodUpsertOne) UpdateWebThumbnailPath added in v0.0.2

func (u *VodUpsertOne) UpdateWebThumbnailPath() *VodUpsertOne

UpdateWebThumbnailPath sets the "web_thumbnail_path" field to the value that was provided on create.

type Vods

type Vods []*Vod

Vods is a parsable slice of Vod.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL