Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
- type VideoEmbed
- type VideoEmbedClient
- func (c *VideoEmbedClient) Create() *VideoEmbedCreate
- func (c *VideoEmbedClient) CreateBulk(builders ...*VideoEmbedCreate) *VideoEmbedCreateBulk
- func (c *VideoEmbedClient) Delete() *VideoEmbedDelete
- func (c *VideoEmbedClient) DeleteOne(_m *VideoEmbed) *VideoEmbedDeleteOne
- func (c *VideoEmbedClient) DeleteOneID(id int) *VideoEmbedDeleteOne
- func (c *VideoEmbedClient) Get(ctx context.Context, id int) (*VideoEmbed, error)
- func (c *VideoEmbedClient) GetX(ctx context.Context, id int) *VideoEmbed
- func (c *VideoEmbedClient) Hooks() []Hook
- func (c *VideoEmbedClient) Intercept(interceptors ...Interceptor)
- func (c *VideoEmbedClient) Interceptors() []Interceptor
- func (c *VideoEmbedClient) MapCreateBulk(slice any, setFunc func(*VideoEmbedCreate, int)) *VideoEmbedCreateBulk
- func (c *VideoEmbedClient) Query() *VideoEmbedQuery
- func (c *VideoEmbedClient) Update() *VideoEmbedUpdate
- func (c *VideoEmbedClient) UpdateOne(_m *VideoEmbed) *VideoEmbedUpdateOne
- func (c *VideoEmbedClient) UpdateOneID(id int) *VideoEmbedUpdateOne
- func (c *VideoEmbedClient) Use(hooks ...Hook)
- type VideoEmbedCreate
- func (_c *VideoEmbedCreate) Exec(ctx context.Context) error
- func (_c *VideoEmbedCreate) ExecX(ctx context.Context)
- func (_c *VideoEmbedCreate) Mutation() *VideoEmbedMutation
- func (_c *VideoEmbedCreate) Save(ctx context.Context) (*VideoEmbed, error)
- func (_c *VideoEmbedCreate) SaveX(ctx context.Context) *VideoEmbed
- func (_c *VideoEmbedCreate) SetFetchedAt(v time.Time) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetHeight(v int) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetID(v int) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetNillableHeight(v *int) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetNillableStatus(v *string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetNillableThumbnailFile(v *string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetNillableThumbnailURL(v *string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetNillableTitle(v *string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetNillableWidth(v *int) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetProvider(v string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetStatus(v string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetThumbnailFile(v string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetThumbnailURL(v string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetTitle(v string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetURL(v string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetURLHash(v string) *VideoEmbedCreate
- func (_c *VideoEmbedCreate) SetWidth(v int) *VideoEmbedCreate
- type VideoEmbedCreateBulk
- type VideoEmbedDelete
- type VideoEmbedDeleteOne
- type VideoEmbedGroupBy
- func (_g *VideoEmbedGroupBy) Aggregate(fns ...AggregateFunc) *VideoEmbedGroupBy
- func (s *VideoEmbedGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *VideoEmbedGroupBy) BoolX(ctx context.Context) bool
- func (s *VideoEmbedGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *VideoEmbedGroupBy) BoolsX(ctx context.Context) []bool
- func (s *VideoEmbedGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *VideoEmbedGroupBy) Float64X(ctx context.Context) float64
- func (s *VideoEmbedGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *VideoEmbedGroupBy) Float64sX(ctx context.Context) []float64
- func (s *VideoEmbedGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *VideoEmbedGroupBy) IntX(ctx context.Context) int
- func (s *VideoEmbedGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *VideoEmbedGroupBy) IntsX(ctx context.Context) []int
- func (_g *VideoEmbedGroupBy) Scan(ctx context.Context, v any) error
- func (s *VideoEmbedGroupBy) ScanX(ctx context.Context, v any)
- func (s *VideoEmbedGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *VideoEmbedGroupBy) StringX(ctx context.Context) string
- func (s *VideoEmbedGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *VideoEmbedGroupBy) StringsX(ctx context.Context) []string
- type VideoEmbedMutation
- func (m *VideoEmbedMutation) AddField(name string, value ent.Value) error
- func (m *VideoEmbedMutation) AddHeight(i int)
- func (m *VideoEmbedMutation) AddWidth(i int)
- func (m *VideoEmbedMutation) AddedEdges() []string
- func (m *VideoEmbedMutation) AddedField(name string) (ent.Value, bool)
- func (m *VideoEmbedMutation) AddedFields() []string
- func (m *VideoEmbedMutation) AddedHeight() (r int, exists bool)
- func (m *VideoEmbedMutation) AddedIDs(name string) []ent.Value
- func (m *VideoEmbedMutation) AddedWidth() (r int, exists bool)
- func (m *VideoEmbedMutation) ClearEdge(name string) error
- func (m *VideoEmbedMutation) ClearField(name string) error
- func (m *VideoEmbedMutation) ClearedEdges() []string
- func (m *VideoEmbedMutation) ClearedFields() []string
- func (m VideoEmbedMutation) Client() *Client
- func (m *VideoEmbedMutation) EdgeCleared(name string) bool
- func (m *VideoEmbedMutation) FetchedAt() (r time.Time, exists bool)
- func (m *VideoEmbedMutation) Field(name string) (ent.Value, bool)
- func (m *VideoEmbedMutation) FieldCleared(name string) bool
- func (m *VideoEmbedMutation) Fields() []string
- func (m *VideoEmbedMutation) Height() (r int, exists bool)
- func (m *VideoEmbedMutation) ID() (id int, exists bool)
- func (m *VideoEmbedMutation) IDs(ctx context.Context) ([]int, error)
- func (m *VideoEmbedMutation) OldFetchedAt(ctx context.Context) (v time.Time, err error)
- func (m *VideoEmbedMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *VideoEmbedMutation) OldHeight(ctx context.Context) (v int, err error)
- func (m *VideoEmbedMutation) OldProvider(ctx context.Context) (v string, err error)
- func (m *VideoEmbedMutation) OldStatus(ctx context.Context) (v string, err error)
- func (m *VideoEmbedMutation) OldThumbnailFile(ctx context.Context) (v string, err error)
- func (m *VideoEmbedMutation) OldThumbnailURL(ctx context.Context) (v string, err error)
- func (m *VideoEmbedMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *VideoEmbedMutation) OldURL(ctx context.Context) (v string, err error)
- func (m *VideoEmbedMutation) OldURLHash(ctx context.Context) (v string, err error)
- func (m *VideoEmbedMutation) OldWidth(ctx context.Context) (v int, err error)
- func (m *VideoEmbedMutation) Op() Op
- func (m *VideoEmbedMutation) Provider() (r string, exists bool)
- func (m *VideoEmbedMutation) RemovedEdges() []string
- func (m *VideoEmbedMutation) RemovedIDs(name string) []ent.Value
- func (m *VideoEmbedMutation) ResetEdge(name string) error
- func (m *VideoEmbedMutation) ResetFetchedAt()
- func (m *VideoEmbedMutation) ResetField(name string) error
- func (m *VideoEmbedMutation) ResetHeight()
- func (m *VideoEmbedMutation) ResetProvider()
- func (m *VideoEmbedMutation) ResetStatus()
- func (m *VideoEmbedMutation) ResetThumbnailFile()
- func (m *VideoEmbedMutation) ResetThumbnailURL()
- func (m *VideoEmbedMutation) ResetTitle()
- func (m *VideoEmbedMutation) ResetURL()
- func (m *VideoEmbedMutation) ResetURLHash()
- func (m *VideoEmbedMutation) ResetWidth()
- func (m *VideoEmbedMutation) SetFetchedAt(t time.Time)
- func (m *VideoEmbedMutation) SetField(name string, value ent.Value) error
- func (m *VideoEmbedMutation) SetHeight(i int)
- func (m *VideoEmbedMutation) SetID(id int)
- func (m *VideoEmbedMutation) SetOp(op Op)
- func (m *VideoEmbedMutation) SetProvider(s string)
- func (m *VideoEmbedMutation) SetStatus(s string)
- func (m *VideoEmbedMutation) SetThumbnailFile(s string)
- func (m *VideoEmbedMutation) SetThumbnailURL(s string)
- func (m *VideoEmbedMutation) SetTitle(s string)
- func (m *VideoEmbedMutation) SetURL(s string)
- func (m *VideoEmbedMutation) SetURLHash(s string)
- func (m *VideoEmbedMutation) SetWidth(i int)
- func (m *VideoEmbedMutation) Status() (r string, exists bool)
- func (m *VideoEmbedMutation) ThumbnailFile() (r string, exists bool)
- func (m *VideoEmbedMutation) ThumbnailURL() (r string, exists bool)
- func (m *VideoEmbedMutation) Title() (r string, exists bool)
- func (m VideoEmbedMutation) Tx() (*Tx, error)
- func (m *VideoEmbedMutation) Type() string
- func (m *VideoEmbedMutation) URL() (r string, exists bool)
- func (m *VideoEmbedMutation) URLHash() (r string, exists bool)
- func (m *VideoEmbedMutation) Where(ps ...predicate.VideoEmbed)
- func (m *VideoEmbedMutation) WhereP(ps ...func(*sql.Selector))
- func (m *VideoEmbedMutation) Width() (r int, exists bool)
- type VideoEmbedQuery
- func (_q *VideoEmbedQuery) Aggregate(fns ...AggregateFunc) *VideoEmbedSelect
- func (_q *VideoEmbedQuery) All(ctx context.Context) ([]*VideoEmbed, error)
- func (_q *VideoEmbedQuery) AllX(ctx context.Context) []*VideoEmbed
- func (_q *VideoEmbedQuery) Clone() *VideoEmbedQuery
- func (_q *VideoEmbedQuery) Count(ctx context.Context) (int, error)
- func (_q *VideoEmbedQuery) CountX(ctx context.Context) int
- func (_q *VideoEmbedQuery) Exist(ctx context.Context) (bool, error)
- func (_q *VideoEmbedQuery) ExistX(ctx context.Context) bool
- func (_q *VideoEmbedQuery) First(ctx context.Context) (*VideoEmbed, error)
- func (_q *VideoEmbedQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *VideoEmbedQuery) FirstIDX(ctx context.Context) int
- func (_q *VideoEmbedQuery) FirstX(ctx context.Context) *VideoEmbed
- func (_q *VideoEmbedQuery) GroupBy(field string, fields ...string) *VideoEmbedGroupBy
- func (_q *VideoEmbedQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *VideoEmbedQuery) IDsX(ctx context.Context) []int
- func (_q *VideoEmbedQuery) Limit(limit int) *VideoEmbedQuery
- func (_q *VideoEmbedQuery) Offset(offset int) *VideoEmbedQuery
- func (_q *VideoEmbedQuery) Only(ctx context.Context) (*VideoEmbed, error)
- func (_q *VideoEmbedQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *VideoEmbedQuery) OnlyIDX(ctx context.Context) int
- func (_q *VideoEmbedQuery) OnlyX(ctx context.Context) *VideoEmbed
- func (_q *VideoEmbedQuery) Order(o ...videoembed.OrderOption) *VideoEmbedQuery
- func (_q *VideoEmbedQuery) Select(fields ...string) *VideoEmbedSelect
- func (_q *VideoEmbedQuery) Unique(unique bool) *VideoEmbedQuery
- func (_q *VideoEmbedQuery) Where(ps ...predicate.VideoEmbed) *VideoEmbedQuery
- type VideoEmbedSelect
- func (_s *VideoEmbedSelect) Aggregate(fns ...AggregateFunc) *VideoEmbedSelect
- func (s *VideoEmbedSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *VideoEmbedSelect) BoolX(ctx context.Context) bool
- func (s *VideoEmbedSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *VideoEmbedSelect) BoolsX(ctx context.Context) []bool
- func (s *VideoEmbedSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *VideoEmbedSelect) Float64X(ctx context.Context) float64
- func (s *VideoEmbedSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *VideoEmbedSelect) Float64sX(ctx context.Context) []float64
- func (s *VideoEmbedSelect) Int(ctx context.Context) (_ int, err error)
- func (s *VideoEmbedSelect) IntX(ctx context.Context) int
- func (s *VideoEmbedSelect) Ints(ctx context.Context) ([]int, error)
- func (s *VideoEmbedSelect) IntsX(ctx context.Context) []int
- func (_s *VideoEmbedSelect) Scan(ctx context.Context, v any) error
- func (s *VideoEmbedSelect) ScanX(ctx context.Context, v any)
- func (s *VideoEmbedSelect) String(ctx context.Context) (_ string, err error)
- func (s *VideoEmbedSelect) StringX(ctx context.Context) string
- func (s *VideoEmbedSelect) Strings(ctx context.Context) ([]string, error)
- func (s *VideoEmbedSelect) StringsX(ctx context.Context) []string
- type VideoEmbedSettings
- type VideoEmbedSettingsClient
- func (c *VideoEmbedSettingsClient) Create() *VideoEmbedSettingsCreate
- func (c *VideoEmbedSettingsClient) CreateBulk(builders ...*VideoEmbedSettingsCreate) *VideoEmbedSettingsCreateBulk
- func (c *VideoEmbedSettingsClient) Delete() *VideoEmbedSettingsDelete
- func (c *VideoEmbedSettingsClient) DeleteOne(_m *VideoEmbedSettings) *VideoEmbedSettingsDeleteOne
- func (c *VideoEmbedSettingsClient) DeleteOneID(id int) *VideoEmbedSettingsDeleteOne
- func (c *VideoEmbedSettingsClient) Get(ctx context.Context, id int) (*VideoEmbedSettings, error)
- func (c *VideoEmbedSettingsClient) GetX(ctx context.Context, id int) *VideoEmbedSettings
- func (c *VideoEmbedSettingsClient) Hooks() []Hook
- func (c *VideoEmbedSettingsClient) Intercept(interceptors ...Interceptor)
- func (c *VideoEmbedSettingsClient) Interceptors() []Interceptor
- func (c *VideoEmbedSettingsClient) MapCreateBulk(slice any, setFunc func(*VideoEmbedSettingsCreate, int)) *VideoEmbedSettingsCreateBulk
- func (c *VideoEmbedSettingsClient) Query() *VideoEmbedSettingsQuery
- func (c *VideoEmbedSettingsClient) Update() *VideoEmbedSettingsUpdate
- func (c *VideoEmbedSettingsClient) UpdateOne(_m *VideoEmbedSettings) *VideoEmbedSettingsUpdateOne
- func (c *VideoEmbedSettingsClient) UpdateOneID(id int) *VideoEmbedSettingsUpdateOne
- func (c *VideoEmbedSettingsClient) Use(hooks ...Hook)
- type VideoEmbedSettingsCreate
- func (_c *VideoEmbedSettingsCreate) Exec(ctx context.Context) error
- func (_c *VideoEmbedSettingsCreate) ExecX(ctx context.Context)
- func (_c *VideoEmbedSettingsCreate) Mutation() *VideoEmbedSettingsMutation
- func (_c *VideoEmbedSettingsCreate) Save(ctx context.Context) (*VideoEmbedSettings, error)
- func (_c *VideoEmbedSettingsCreate) SaveX(ctx context.Context) *VideoEmbedSettings
- func (_c *VideoEmbedSettingsCreate) SetClickToPlay(v bool) *VideoEmbedSettingsCreate
- func (_c *VideoEmbedSettingsCreate) SetID(v int) *VideoEmbedSettingsCreate
- func (_c *VideoEmbedSettingsCreate) SetLocalPreviews(v bool) *VideoEmbedSettingsCreate
- func (_c *VideoEmbedSettingsCreate) SetNillableClickToPlay(v *bool) *VideoEmbedSettingsCreate
- func (_c *VideoEmbedSettingsCreate) SetNillableLocalPreviews(v *bool) *VideoEmbedSettingsCreate
- func (_c *VideoEmbedSettingsCreate) SetNillableProviders(v *string) *VideoEmbedSettingsCreate
- func (_c *VideoEmbedSettingsCreate) SetProviders(v string) *VideoEmbedSettingsCreate
- type VideoEmbedSettingsCreateBulk
- func (_c *VideoEmbedSettingsCreateBulk) Exec(ctx context.Context) error
- func (_c *VideoEmbedSettingsCreateBulk) ExecX(ctx context.Context)
- func (_c *VideoEmbedSettingsCreateBulk) Save(ctx context.Context) ([]*VideoEmbedSettings, error)
- func (_c *VideoEmbedSettingsCreateBulk) SaveX(ctx context.Context) []*VideoEmbedSettings
- type VideoEmbedSettingsDelete
- type VideoEmbedSettingsDeleteOne
- type VideoEmbedSettingsGroupBy
- func (_g *VideoEmbedSettingsGroupBy) Aggregate(fns ...AggregateFunc) *VideoEmbedSettingsGroupBy
- func (s *VideoEmbedSettingsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *VideoEmbedSettingsGroupBy) BoolX(ctx context.Context) bool
- func (s *VideoEmbedSettingsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *VideoEmbedSettingsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *VideoEmbedSettingsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *VideoEmbedSettingsGroupBy) Float64X(ctx context.Context) float64
- func (s *VideoEmbedSettingsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *VideoEmbedSettingsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *VideoEmbedSettingsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *VideoEmbedSettingsGroupBy) IntX(ctx context.Context) int
- func (s *VideoEmbedSettingsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *VideoEmbedSettingsGroupBy) IntsX(ctx context.Context) []int
- func (_g *VideoEmbedSettingsGroupBy) Scan(ctx context.Context, v any) error
- func (s *VideoEmbedSettingsGroupBy) ScanX(ctx context.Context, v any)
- func (s *VideoEmbedSettingsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *VideoEmbedSettingsGroupBy) StringX(ctx context.Context) string
- func (s *VideoEmbedSettingsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *VideoEmbedSettingsGroupBy) StringsX(ctx context.Context) []string
- type VideoEmbedSettingsMutation
- func (m *VideoEmbedSettingsMutation) AddField(name string, value ent.Value) error
- func (m *VideoEmbedSettingsMutation) AddedEdges() []string
- func (m *VideoEmbedSettingsMutation) AddedField(name string) (ent.Value, bool)
- func (m *VideoEmbedSettingsMutation) AddedFields() []string
- func (m *VideoEmbedSettingsMutation) AddedIDs(name string) []ent.Value
- func (m *VideoEmbedSettingsMutation) ClearEdge(name string) error
- func (m *VideoEmbedSettingsMutation) ClearField(name string) error
- func (m *VideoEmbedSettingsMutation) ClearedEdges() []string
- func (m *VideoEmbedSettingsMutation) ClearedFields() []string
- func (m *VideoEmbedSettingsMutation) ClickToPlay() (r bool, exists bool)
- func (m VideoEmbedSettingsMutation) Client() *Client
- func (m *VideoEmbedSettingsMutation) EdgeCleared(name string) bool
- func (m *VideoEmbedSettingsMutation) Field(name string) (ent.Value, bool)
- func (m *VideoEmbedSettingsMutation) FieldCleared(name string) bool
- func (m *VideoEmbedSettingsMutation) Fields() []string
- func (m *VideoEmbedSettingsMutation) ID() (id int, exists bool)
- func (m *VideoEmbedSettingsMutation) IDs(ctx context.Context) ([]int, error)
- func (m *VideoEmbedSettingsMutation) LocalPreviews() (r bool, exists bool)
- func (m *VideoEmbedSettingsMutation) OldClickToPlay(ctx context.Context) (v bool, err error)
- func (m *VideoEmbedSettingsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *VideoEmbedSettingsMutation) OldLocalPreviews(ctx context.Context) (v bool, err error)
- func (m *VideoEmbedSettingsMutation) OldProviders(ctx context.Context) (v string, err error)
- func (m *VideoEmbedSettingsMutation) Op() Op
- func (m *VideoEmbedSettingsMutation) Providers() (r string, exists bool)
- func (m *VideoEmbedSettingsMutation) RemovedEdges() []string
- func (m *VideoEmbedSettingsMutation) RemovedIDs(name string) []ent.Value
- func (m *VideoEmbedSettingsMutation) ResetClickToPlay()
- func (m *VideoEmbedSettingsMutation) ResetEdge(name string) error
- func (m *VideoEmbedSettingsMutation) ResetField(name string) error
- func (m *VideoEmbedSettingsMutation) ResetLocalPreviews()
- func (m *VideoEmbedSettingsMutation) ResetProviders()
- func (m *VideoEmbedSettingsMutation) SetClickToPlay(b bool)
- func (m *VideoEmbedSettingsMutation) SetField(name string, value ent.Value) error
- func (m *VideoEmbedSettingsMutation) SetID(id int)
- func (m *VideoEmbedSettingsMutation) SetLocalPreviews(b bool)
- func (m *VideoEmbedSettingsMutation) SetOp(op Op)
- func (m *VideoEmbedSettingsMutation) SetProviders(s string)
- func (m VideoEmbedSettingsMutation) Tx() (*Tx, error)
- func (m *VideoEmbedSettingsMutation) Type() string
- func (m *VideoEmbedSettingsMutation) Where(ps ...predicate.VideoEmbedSettings)
- func (m *VideoEmbedSettingsMutation) WhereP(ps ...func(*sql.Selector))
- type VideoEmbedSettingsQuery
- func (_q *VideoEmbedSettingsQuery) Aggregate(fns ...AggregateFunc) *VideoEmbedSettingsSelect
- func (_q *VideoEmbedSettingsQuery) All(ctx context.Context) ([]*VideoEmbedSettings, error)
- func (_q *VideoEmbedSettingsQuery) AllX(ctx context.Context) []*VideoEmbedSettings
- func (_q *VideoEmbedSettingsQuery) Clone() *VideoEmbedSettingsQuery
- func (_q *VideoEmbedSettingsQuery) Count(ctx context.Context) (int, error)
- func (_q *VideoEmbedSettingsQuery) CountX(ctx context.Context) int
- func (_q *VideoEmbedSettingsQuery) Exist(ctx context.Context) (bool, error)
- func (_q *VideoEmbedSettingsQuery) ExistX(ctx context.Context) bool
- func (_q *VideoEmbedSettingsQuery) First(ctx context.Context) (*VideoEmbedSettings, error)
- func (_q *VideoEmbedSettingsQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *VideoEmbedSettingsQuery) FirstIDX(ctx context.Context) int
- func (_q *VideoEmbedSettingsQuery) FirstX(ctx context.Context) *VideoEmbedSettings
- func (_q *VideoEmbedSettingsQuery) GroupBy(field string, fields ...string) *VideoEmbedSettingsGroupBy
- func (_q *VideoEmbedSettingsQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *VideoEmbedSettingsQuery) IDsX(ctx context.Context) []int
- func (_q *VideoEmbedSettingsQuery) Limit(limit int) *VideoEmbedSettingsQuery
- func (_q *VideoEmbedSettingsQuery) Offset(offset int) *VideoEmbedSettingsQuery
- func (_q *VideoEmbedSettingsQuery) Only(ctx context.Context) (*VideoEmbedSettings, error)
- func (_q *VideoEmbedSettingsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *VideoEmbedSettingsQuery) OnlyIDX(ctx context.Context) int
- func (_q *VideoEmbedSettingsQuery) OnlyX(ctx context.Context) *VideoEmbedSettings
- func (_q *VideoEmbedSettingsQuery) Order(o ...videoembedsettings.OrderOption) *VideoEmbedSettingsQuery
- func (_q *VideoEmbedSettingsQuery) Select(fields ...string) *VideoEmbedSettingsSelect
- func (_q *VideoEmbedSettingsQuery) Unique(unique bool) *VideoEmbedSettingsQuery
- func (_q *VideoEmbedSettingsQuery) Where(ps ...predicate.VideoEmbedSettings) *VideoEmbedSettingsQuery
- type VideoEmbedSettingsSelect
- func (_s *VideoEmbedSettingsSelect) Aggregate(fns ...AggregateFunc) *VideoEmbedSettingsSelect
- func (s *VideoEmbedSettingsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *VideoEmbedSettingsSelect) BoolX(ctx context.Context) bool
- func (s *VideoEmbedSettingsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *VideoEmbedSettingsSelect) BoolsX(ctx context.Context) []bool
- func (s *VideoEmbedSettingsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *VideoEmbedSettingsSelect) Float64X(ctx context.Context) float64
- func (s *VideoEmbedSettingsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *VideoEmbedSettingsSelect) Float64sX(ctx context.Context) []float64
- func (s *VideoEmbedSettingsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *VideoEmbedSettingsSelect) IntX(ctx context.Context) int
- func (s *VideoEmbedSettingsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *VideoEmbedSettingsSelect) IntsX(ctx context.Context) []int
- func (_s *VideoEmbedSettingsSelect) Scan(ctx context.Context, v any) error
- func (s *VideoEmbedSettingsSelect) ScanX(ctx context.Context, v any)
- func (s *VideoEmbedSettingsSelect) String(ctx context.Context) (_ string, err error)
- func (s *VideoEmbedSettingsSelect) StringX(ctx context.Context) string
- func (s *VideoEmbedSettingsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *VideoEmbedSettingsSelect) StringsX(ctx context.Context) []string
- type VideoEmbedSettingsSlice
- type VideoEmbedSettingsUpdate
- func (_u *VideoEmbedSettingsUpdate) Exec(ctx context.Context) error
- func (_u *VideoEmbedSettingsUpdate) ExecX(ctx context.Context)
- func (_u *VideoEmbedSettingsUpdate) Mutation() *VideoEmbedSettingsMutation
- func (_u *VideoEmbedSettingsUpdate) Save(ctx context.Context) (int, error)
- func (_u *VideoEmbedSettingsUpdate) SaveX(ctx context.Context) int
- func (_u *VideoEmbedSettingsUpdate) SetClickToPlay(v bool) *VideoEmbedSettingsUpdate
- func (_u *VideoEmbedSettingsUpdate) SetLocalPreviews(v bool) *VideoEmbedSettingsUpdate
- func (_u *VideoEmbedSettingsUpdate) SetNillableClickToPlay(v *bool) *VideoEmbedSettingsUpdate
- func (_u *VideoEmbedSettingsUpdate) SetNillableLocalPreviews(v *bool) *VideoEmbedSettingsUpdate
- func (_u *VideoEmbedSettingsUpdate) SetNillableProviders(v *string) *VideoEmbedSettingsUpdate
- func (_u *VideoEmbedSettingsUpdate) SetProviders(v string) *VideoEmbedSettingsUpdate
- func (_u *VideoEmbedSettingsUpdate) Where(ps ...predicate.VideoEmbedSettings) *VideoEmbedSettingsUpdate
- type VideoEmbedSettingsUpdateOne
- func (_u *VideoEmbedSettingsUpdateOne) Exec(ctx context.Context) error
- func (_u *VideoEmbedSettingsUpdateOne) ExecX(ctx context.Context)
- func (_u *VideoEmbedSettingsUpdateOne) Mutation() *VideoEmbedSettingsMutation
- func (_u *VideoEmbedSettingsUpdateOne) Save(ctx context.Context) (*VideoEmbedSettings, error)
- func (_u *VideoEmbedSettingsUpdateOne) SaveX(ctx context.Context) *VideoEmbedSettings
- func (_u *VideoEmbedSettingsUpdateOne) Select(field string, fields ...string) *VideoEmbedSettingsUpdateOne
- func (_u *VideoEmbedSettingsUpdateOne) SetClickToPlay(v bool) *VideoEmbedSettingsUpdateOne
- func (_u *VideoEmbedSettingsUpdateOne) SetLocalPreviews(v bool) *VideoEmbedSettingsUpdateOne
- func (_u *VideoEmbedSettingsUpdateOne) SetNillableClickToPlay(v *bool) *VideoEmbedSettingsUpdateOne
- func (_u *VideoEmbedSettingsUpdateOne) SetNillableLocalPreviews(v *bool) *VideoEmbedSettingsUpdateOne
- func (_u *VideoEmbedSettingsUpdateOne) SetNillableProviders(v *string) *VideoEmbedSettingsUpdateOne
- func (_u *VideoEmbedSettingsUpdateOne) SetProviders(v string) *VideoEmbedSettingsUpdateOne
- func (_u *VideoEmbedSettingsUpdateOne) Where(ps ...predicate.VideoEmbedSettings) *VideoEmbedSettingsUpdateOne
- type VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) AddHeight(v int) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) AddWidth(v int) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) Exec(ctx context.Context) error
- func (_u *VideoEmbedUpdate) ExecX(ctx context.Context)
- func (_u *VideoEmbedUpdate) Mutation() *VideoEmbedMutation
- func (_u *VideoEmbedUpdate) Save(ctx context.Context) (int, error)
- func (_u *VideoEmbedUpdate) SaveX(ctx context.Context) int
- func (_u *VideoEmbedUpdate) SetFetchedAt(v time.Time) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetHeight(v int) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetNillableFetchedAt(v *time.Time) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetNillableHeight(v *int) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetNillableProvider(v *string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetNillableStatus(v *string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetNillableThumbnailFile(v *string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetNillableThumbnailURL(v *string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetNillableTitle(v *string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetNillableURL(v *string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetNillableURLHash(v *string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetNillableWidth(v *int) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetProvider(v string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetStatus(v string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetThumbnailFile(v string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetThumbnailURL(v string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetTitle(v string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetURL(v string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetURLHash(v string) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) SetWidth(v int) *VideoEmbedUpdate
- func (_u *VideoEmbedUpdate) Where(ps ...predicate.VideoEmbed) *VideoEmbedUpdate
- type VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) AddHeight(v int) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) AddWidth(v int) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) Exec(ctx context.Context) error
- func (_u *VideoEmbedUpdateOne) ExecX(ctx context.Context)
- func (_u *VideoEmbedUpdateOne) Mutation() *VideoEmbedMutation
- func (_u *VideoEmbedUpdateOne) Save(ctx context.Context) (*VideoEmbed, error)
- func (_u *VideoEmbedUpdateOne) SaveX(ctx context.Context) *VideoEmbed
- func (_u *VideoEmbedUpdateOne) Select(field string, fields ...string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetFetchedAt(v time.Time) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetHeight(v int) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetNillableFetchedAt(v *time.Time) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetNillableHeight(v *int) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetNillableProvider(v *string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetNillableStatus(v *string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetNillableThumbnailFile(v *string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetNillableThumbnailURL(v *string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetNillableTitle(v *string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetNillableURL(v *string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetNillableURLHash(v *string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetNillableWidth(v *int) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetProvider(v string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetStatus(v string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetThumbnailFile(v string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetThumbnailURL(v string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetTitle(v string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetURL(v string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetURLHash(v string) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) SetWidth(v int) *VideoEmbedUpdateOne
- func (_u *VideoEmbedUpdateOne) Where(ps ...predicate.VideoEmbed) *VideoEmbedUpdateOne
- type VideoEmbeds
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeVideoEmbed = "VideoEmbed" TypeVideoEmbedSettings = "VideoEmbedSettings" )
Variables ¶
var ErrTxStarted = errors.New("generated: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(generated.As(generated.Sum(field1), "sum_field1"), (generated.As(generated.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// VideoEmbed is the client for interacting with the VideoEmbed builders.
VideoEmbed *VideoEmbedClient
// VideoEmbedSettings is the client for interacting with the VideoEmbedSettings builders.
VideoEmbedSettings *VideoEmbedSettingsClient
// contains filtered or unexported fields
}
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
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) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). VideoEmbed. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
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.
type CommitHook ¶
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 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 InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
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 OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
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.
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 ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// VideoEmbed is the client for interacting with the VideoEmbed builders.
VideoEmbed *VideoEmbedClient
// VideoEmbedSettings is the client for interacting with the VideoEmbedSettings builders.
VideoEmbedSettings *VideoEmbedSettingsClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
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 VideoEmbed ¶
type VideoEmbed struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// URLHash holds the value of the "url_hash" field.
URLHash string `json:"url_hash,omitempty"`
// URL holds the value of the "url" field.
URL string `json:"url,omitempty"`
// Provider holds the value of the "provider" field.
Provider string `json:"provider,omitempty"`
// Title holds the value of the "title" field.
Title string `json:"title,omitempty"`
// ThumbnailURL holds the value of the "thumbnail_url" field.
ThumbnailURL string `json:"thumbnail_url,omitempty"`
// ThumbnailFile holds the value of the "thumbnail_file" field.
ThumbnailFile string `json:"thumbnail_file,omitempty"`
// Width holds the value of the "width" field.
Width int `json:"width,omitempty"`
// Height holds the value of the "height" field.
Height int `json:"height,omitempty"`
// Status holds the value of the "status" field.
Status string `json:"status,omitempty"`
// FetchedAt holds the value of the "fetched_at" field.
FetchedAt time.Time `json:"fetched_at,omitempty"`
// contains filtered or unexported fields
}
VideoEmbed is the model entity for the VideoEmbed schema.
func (*VideoEmbed) String ¶
func (_m *VideoEmbed) String() string
String implements the fmt.Stringer.
func (*VideoEmbed) Unwrap ¶
func (_m *VideoEmbed) Unwrap() *VideoEmbed
Unwrap unwraps the VideoEmbed 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 (*VideoEmbed) Update ¶
func (_m *VideoEmbed) Update() *VideoEmbedUpdateOne
Update returns a builder for updating this VideoEmbed. Note that you need to call VideoEmbed.Unwrap() before calling this method if this VideoEmbed was returned from a transaction, and the transaction was committed or rolled back.
type VideoEmbedClient ¶
type VideoEmbedClient struct {
// contains filtered or unexported fields
}
VideoEmbedClient is a client for the VideoEmbed schema.
func NewVideoEmbedClient ¶
func NewVideoEmbedClient(c config) *VideoEmbedClient
NewVideoEmbedClient returns a client for the VideoEmbed from the given config.
func (*VideoEmbedClient) Create ¶
func (c *VideoEmbedClient) Create() *VideoEmbedCreate
Create returns a builder for creating a VideoEmbed entity.
func (*VideoEmbedClient) CreateBulk ¶
func (c *VideoEmbedClient) CreateBulk(builders ...*VideoEmbedCreate) *VideoEmbedCreateBulk
CreateBulk returns a builder for creating a bulk of VideoEmbed entities.
func (*VideoEmbedClient) Delete ¶
func (c *VideoEmbedClient) Delete() *VideoEmbedDelete
Delete returns a delete builder for VideoEmbed.
func (*VideoEmbedClient) DeleteOne ¶
func (c *VideoEmbedClient) DeleteOne(_m *VideoEmbed) *VideoEmbedDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*VideoEmbedClient) DeleteOneID ¶
func (c *VideoEmbedClient) DeleteOneID(id int) *VideoEmbedDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*VideoEmbedClient) Get ¶
func (c *VideoEmbedClient) Get(ctx context.Context, id int) (*VideoEmbed, error)
Get returns a VideoEmbed entity by its id.
func (*VideoEmbedClient) GetX ¶
func (c *VideoEmbedClient) GetX(ctx context.Context, id int) *VideoEmbed
GetX is like Get, but panics if an error occurs.
func (*VideoEmbedClient) Hooks ¶
func (c *VideoEmbedClient) Hooks() []Hook
Hooks returns the client hooks.
func (*VideoEmbedClient) Intercept ¶
func (c *VideoEmbedClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `videoembed.Intercept(f(g(h())))`.
func (*VideoEmbedClient) Interceptors ¶
func (c *VideoEmbedClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*VideoEmbedClient) MapCreateBulk ¶
func (c *VideoEmbedClient) MapCreateBulk(slice any, setFunc func(*VideoEmbedCreate, int)) *VideoEmbedCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*VideoEmbedClient) Query ¶
func (c *VideoEmbedClient) Query() *VideoEmbedQuery
Query returns a query builder for VideoEmbed.
func (*VideoEmbedClient) Update ¶
func (c *VideoEmbedClient) Update() *VideoEmbedUpdate
Update returns an update builder for VideoEmbed.
func (*VideoEmbedClient) UpdateOne ¶
func (c *VideoEmbedClient) UpdateOne(_m *VideoEmbed) *VideoEmbedUpdateOne
UpdateOne returns an update builder for the given entity.
func (*VideoEmbedClient) UpdateOneID ¶
func (c *VideoEmbedClient) UpdateOneID(id int) *VideoEmbedUpdateOne
UpdateOneID returns an update builder for the given id.
func (*VideoEmbedClient) Use ¶
func (c *VideoEmbedClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `videoembed.Hooks(f(g(h())))`.
type VideoEmbedCreate ¶
type VideoEmbedCreate struct {
// contains filtered or unexported fields
}
VideoEmbedCreate is the builder for creating a VideoEmbed entity.
func (*VideoEmbedCreate) Exec ¶
func (_c *VideoEmbedCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*VideoEmbedCreate) ExecX ¶
func (_c *VideoEmbedCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedCreate) Mutation ¶
func (_c *VideoEmbedCreate) Mutation() *VideoEmbedMutation
Mutation returns the VideoEmbedMutation object of the builder.
func (*VideoEmbedCreate) Save ¶
func (_c *VideoEmbedCreate) Save(ctx context.Context) (*VideoEmbed, error)
Save creates the VideoEmbed in the database.
func (*VideoEmbedCreate) SaveX ¶
func (_c *VideoEmbedCreate) SaveX(ctx context.Context) *VideoEmbed
SaveX calls Save and panics if Save returns an error.
func (*VideoEmbedCreate) SetFetchedAt ¶
func (_c *VideoEmbedCreate) SetFetchedAt(v time.Time) *VideoEmbedCreate
SetFetchedAt sets the "fetched_at" field.
func (*VideoEmbedCreate) SetHeight ¶
func (_c *VideoEmbedCreate) SetHeight(v int) *VideoEmbedCreate
SetHeight sets the "height" field.
func (*VideoEmbedCreate) SetID ¶
func (_c *VideoEmbedCreate) SetID(v int) *VideoEmbedCreate
SetID sets the "id" field.
func (*VideoEmbedCreate) SetNillableHeight ¶
func (_c *VideoEmbedCreate) SetNillableHeight(v *int) *VideoEmbedCreate
SetNillableHeight sets the "height" field if the given value is not nil.
func (*VideoEmbedCreate) SetNillableStatus ¶
func (_c *VideoEmbedCreate) SetNillableStatus(v *string) *VideoEmbedCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*VideoEmbedCreate) SetNillableThumbnailFile ¶
func (_c *VideoEmbedCreate) SetNillableThumbnailFile(v *string) *VideoEmbedCreate
SetNillableThumbnailFile sets the "thumbnail_file" field if the given value is not nil.
func (*VideoEmbedCreate) SetNillableThumbnailURL ¶
func (_c *VideoEmbedCreate) SetNillableThumbnailURL(v *string) *VideoEmbedCreate
SetNillableThumbnailURL sets the "thumbnail_url" field if the given value is not nil.
func (*VideoEmbedCreate) SetNillableTitle ¶
func (_c *VideoEmbedCreate) SetNillableTitle(v *string) *VideoEmbedCreate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*VideoEmbedCreate) SetNillableWidth ¶
func (_c *VideoEmbedCreate) SetNillableWidth(v *int) *VideoEmbedCreate
SetNillableWidth sets the "width" field if the given value is not nil.
func (*VideoEmbedCreate) SetProvider ¶
func (_c *VideoEmbedCreate) SetProvider(v string) *VideoEmbedCreate
SetProvider sets the "provider" field.
func (*VideoEmbedCreate) SetStatus ¶
func (_c *VideoEmbedCreate) SetStatus(v string) *VideoEmbedCreate
SetStatus sets the "status" field.
func (*VideoEmbedCreate) SetThumbnailFile ¶
func (_c *VideoEmbedCreate) SetThumbnailFile(v string) *VideoEmbedCreate
SetThumbnailFile sets the "thumbnail_file" field.
func (*VideoEmbedCreate) SetThumbnailURL ¶
func (_c *VideoEmbedCreate) SetThumbnailURL(v string) *VideoEmbedCreate
SetThumbnailURL sets the "thumbnail_url" field.
func (*VideoEmbedCreate) SetTitle ¶
func (_c *VideoEmbedCreate) SetTitle(v string) *VideoEmbedCreate
SetTitle sets the "title" field.
func (*VideoEmbedCreate) SetURL ¶
func (_c *VideoEmbedCreate) SetURL(v string) *VideoEmbedCreate
SetURL sets the "url" field.
func (*VideoEmbedCreate) SetURLHash ¶
func (_c *VideoEmbedCreate) SetURLHash(v string) *VideoEmbedCreate
SetURLHash sets the "url_hash" field.
func (*VideoEmbedCreate) SetWidth ¶
func (_c *VideoEmbedCreate) SetWidth(v int) *VideoEmbedCreate
SetWidth sets the "width" field.
type VideoEmbedCreateBulk ¶
type VideoEmbedCreateBulk struct {
// contains filtered or unexported fields
}
VideoEmbedCreateBulk is the builder for creating many VideoEmbed entities in bulk.
func (*VideoEmbedCreateBulk) Exec ¶
func (_c *VideoEmbedCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*VideoEmbedCreateBulk) ExecX ¶
func (_c *VideoEmbedCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedCreateBulk) Save ¶
func (_c *VideoEmbedCreateBulk) Save(ctx context.Context) ([]*VideoEmbed, error)
Save creates the VideoEmbed entities in the database.
func (*VideoEmbedCreateBulk) SaveX ¶
func (_c *VideoEmbedCreateBulk) SaveX(ctx context.Context) []*VideoEmbed
SaveX is like Save, but panics if an error occurs.
type VideoEmbedDelete ¶
type VideoEmbedDelete struct {
// contains filtered or unexported fields
}
VideoEmbedDelete is the builder for deleting a VideoEmbed entity.
func (*VideoEmbedDelete) Exec ¶
func (_d *VideoEmbedDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*VideoEmbedDelete) ExecX ¶
func (_d *VideoEmbedDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedDelete) Where ¶
func (_d *VideoEmbedDelete) Where(ps ...predicate.VideoEmbed) *VideoEmbedDelete
Where appends a list predicates to the VideoEmbedDelete builder.
type VideoEmbedDeleteOne ¶
type VideoEmbedDeleteOne struct {
// contains filtered or unexported fields
}
VideoEmbedDeleteOne is the builder for deleting a single VideoEmbed entity.
func (*VideoEmbedDeleteOne) Exec ¶
func (_d *VideoEmbedDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*VideoEmbedDeleteOne) ExecX ¶
func (_d *VideoEmbedDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedDeleteOne) Where ¶
func (_d *VideoEmbedDeleteOne) Where(ps ...predicate.VideoEmbed) *VideoEmbedDeleteOne
Where appends a list predicates to the VideoEmbedDelete builder.
type VideoEmbedGroupBy ¶
type VideoEmbedGroupBy struct {
// contains filtered or unexported fields
}
VideoEmbedGroupBy is the group-by builder for VideoEmbed entities.
func (*VideoEmbedGroupBy) Aggregate ¶
func (_g *VideoEmbedGroupBy) Aggregate(fns ...AggregateFunc) *VideoEmbedGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*VideoEmbedGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VideoEmbedGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VideoEmbedGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VideoEmbedGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VideoEmbedGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VideoEmbedGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VideoEmbedGroupBy) Scan ¶
func (_g *VideoEmbedGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VideoEmbedGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VideoEmbedMutation ¶
type VideoEmbedMutation struct {
// contains filtered or unexported fields
}
VideoEmbedMutation represents an operation that mutates the VideoEmbed nodes in the graph.
func (*VideoEmbedMutation) AddField ¶
func (m *VideoEmbedMutation) 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 (*VideoEmbedMutation) AddHeight ¶
func (m *VideoEmbedMutation) AddHeight(i int)
AddHeight adds i to the "height" field.
func (*VideoEmbedMutation) AddWidth ¶
func (m *VideoEmbedMutation) AddWidth(i int)
AddWidth adds i to the "width" field.
func (*VideoEmbedMutation) AddedEdges ¶
func (m *VideoEmbedMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*VideoEmbedMutation) AddedField ¶
func (m *VideoEmbedMutation) 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 (*VideoEmbedMutation) AddedFields ¶
func (m *VideoEmbedMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*VideoEmbedMutation) AddedHeight ¶
func (m *VideoEmbedMutation) AddedHeight() (r int, exists bool)
AddedHeight returns the value that was added to the "height" field in this mutation.
func (*VideoEmbedMutation) AddedIDs ¶
func (m *VideoEmbedMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*VideoEmbedMutation) AddedWidth ¶
func (m *VideoEmbedMutation) AddedWidth() (r int, exists bool)
AddedWidth returns the value that was added to the "width" field in this mutation.
func (*VideoEmbedMutation) ClearEdge ¶
func (m *VideoEmbedMutation) 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 (*VideoEmbedMutation) ClearField ¶
func (m *VideoEmbedMutation) 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 (*VideoEmbedMutation) ClearedEdges ¶
func (m *VideoEmbedMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*VideoEmbedMutation) ClearedFields ¶
func (m *VideoEmbedMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (VideoEmbedMutation) Client ¶
func (m VideoEmbedMutation) 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 (*VideoEmbedMutation) EdgeCleared ¶
func (m *VideoEmbedMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*VideoEmbedMutation) FetchedAt ¶
func (m *VideoEmbedMutation) FetchedAt() (r time.Time, exists bool)
FetchedAt returns the value of the "fetched_at" field in the mutation.
func (*VideoEmbedMutation) Field ¶
func (m *VideoEmbedMutation) 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 (*VideoEmbedMutation) FieldCleared ¶
func (m *VideoEmbedMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*VideoEmbedMutation) Fields ¶
func (m *VideoEmbedMutation) 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 (*VideoEmbedMutation) Height ¶
func (m *VideoEmbedMutation) Height() (r int, exists bool)
Height returns the value of the "height" field in the mutation.
func (*VideoEmbedMutation) ID ¶
func (m *VideoEmbedMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*VideoEmbedMutation) IDs ¶
func (m *VideoEmbedMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*VideoEmbedMutation) OldFetchedAt ¶
OldFetchedAt returns the old "fetched_at" field's value of the VideoEmbed entity. If the VideoEmbed object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*VideoEmbedMutation) OldHeight ¶
func (m *VideoEmbedMutation) OldHeight(ctx context.Context) (v int, err error)
OldHeight returns the old "height" field's value of the VideoEmbed entity. If the VideoEmbed object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedMutation) OldProvider ¶
func (m *VideoEmbedMutation) OldProvider(ctx context.Context) (v string, err error)
OldProvider returns the old "provider" field's value of the VideoEmbed entity. If the VideoEmbed object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedMutation) OldStatus ¶
func (m *VideoEmbedMutation) OldStatus(ctx context.Context) (v string, err error)
OldStatus returns the old "status" field's value of the VideoEmbed entity. If the VideoEmbed object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedMutation) OldThumbnailFile ¶
func (m *VideoEmbedMutation) OldThumbnailFile(ctx context.Context) (v string, err error)
OldThumbnailFile returns the old "thumbnail_file" field's value of the VideoEmbed entity. If the VideoEmbed object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedMutation) OldThumbnailURL ¶
func (m *VideoEmbedMutation) OldThumbnailURL(ctx context.Context) (v string, err error)
OldThumbnailURL returns the old "thumbnail_url" field's value of the VideoEmbed entity. If the VideoEmbed object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedMutation) OldTitle ¶
func (m *VideoEmbedMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the VideoEmbed entity. If the VideoEmbed object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedMutation) OldURL ¶
func (m *VideoEmbedMutation) OldURL(ctx context.Context) (v string, err error)
OldURL returns the old "url" field's value of the VideoEmbed entity. If the VideoEmbed object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedMutation) OldURLHash ¶
func (m *VideoEmbedMutation) OldURLHash(ctx context.Context) (v string, err error)
OldURLHash returns the old "url_hash" field's value of the VideoEmbed entity. If the VideoEmbed object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedMutation) OldWidth ¶
func (m *VideoEmbedMutation) OldWidth(ctx context.Context) (v int, err error)
OldWidth returns the old "width" field's value of the VideoEmbed entity. If the VideoEmbed object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedMutation) Provider ¶
func (m *VideoEmbedMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*VideoEmbedMutation) RemovedEdges ¶
func (m *VideoEmbedMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*VideoEmbedMutation) RemovedIDs ¶
func (m *VideoEmbedMutation) 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 (*VideoEmbedMutation) ResetEdge ¶
func (m *VideoEmbedMutation) 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 (*VideoEmbedMutation) ResetFetchedAt ¶
func (m *VideoEmbedMutation) ResetFetchedAt()
ResetFetchedAt resets all changes to the "fetched_at" field.
func (*VideoEmbedMutation) ResetField ¶
func (m *VideoEmbedMutation) 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 (*VideoEmbedMutation) ResetHeight ¶
func (m *VideoEmbedMutation) ResetHeight()
ResetHeight resets all changes to the "height" field.
func (*VideoEmbedMutation) ResetProvider ¶
func (m *VideoEmbedMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*VideoEmbedMutation) ResetStatus ¶
func (m *VideoEmbedMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*VideoEmbedMutation) ResetThumbnailFile ¶
func (m *VideoEmbedMutation) ResetThumbnailFile()
ResetThumbnailFile resets all changes to the "thumbnail_file" field.
func (*VideoEmbedMutation) ResetThumbnailURL ¶
func (m *VideoEmbedMutation) ResetThumbnailURL()
ResetThumbnailURL resets all changes to the "thumbnail_url" field.
func (*VideoEmbedMutation) ResetTitle ¶
func (m *VideoEmbedMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*VideoEmbedMutation) ResetURL ¶
func (m *VideoEmbedMutation) ResetURL()
ResetURL resets all changes to the "url" field.
func (*VideoEmbedMutation) ResetURLHash ¶
func (m *VideoEmbedMutation) ResetURLHash()
ResetURLHash resets all changes to the "url_hash" field.
func (*VideoEmbedMutation) ResetWidth ¶
func (m *VideoEmbedMutation) ResetWidth()
ResetWidth resets all changes to the "width" field.
func (*VideoEmbedMutation) SetFetchedAt ¶
func (m *VideoEmbedMutation) SetFetchedAt(t time.Time)
SetFetchedAt sets the "fetched_at" field.
func (*VideoEmbedMutation) SetField ¶
func (m *VideoEmbedMutation) 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 (*VideoEmbedMutation) SetHeight ¶
func (m *VideoEmbedMutation) SetHeight(i int)
SetHeight sets the "height" field.
func (*VideoEmbedMutation) SetID ¶
func (m *VideoEmbedMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of VideoEmbed entities.
func (*VideoEmbedMutation) SetOp ¶
func (m *VideoEmbedMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*VideoEmbedMutation) SetProvider ¶
func (m *VideoEmbedMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*VideoEmbedMutation) SetStatus ¶
func (m *VideoEmbedMutation) SetStatus(s string)
SetStatus sets the "status" field.
func (*VideoEmbedMutation) SetThumbnailFile ¶
func (m *VideoEmbedMutation) SetThumbnailFile(s string)
SetThumbnailFile sets the "thumbnail_file" field.
func (*VideoEmbedMutation) SetThumbnailURL ¶
func (m *VideoEmbedMutation) SetThumbnailURL(s string)
SetThumbnailURL sets the "thumbnail_url" field.
func (*VideoEmbedMutation) SetTitle ¶
func (m *VideoEmbedMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*VideoEmbedMutation) SetURL ¶
func (m *VideoEmbedMutation) SetURL(s string)
SetURL sets the "url" field.
func (*VideoEmbedMutation) SetURLHash ¶
func (m *VideoEmbedMutation) SetURLHash(s string)
SetURLHash sets the "url_hash" field.
func (*VideoEmbedMutation) SetWidth ¶
func (m *VideoEmbedMutation) SetWidth(i int)
SetWidth sets the "width" field.
func (*VideoEmbedMutation) Status ¶
func (m *VideoEmbedMutation) Status() (r string, exists bool)
Status returns the value of the "status" field in the mutation.
func (*VideoEmbedMutation) ThumbnailFile ¶
func (m *VideoEmbedMutation) ThumbnailFile() (r string, exists bool)
ThumbnailFile returns the value of the "thumbnail_file" field in the mutation.
func (*VideoEmbedMutation) ThumbnailURL ¶
func (m *VideoEmbedMutation) ThumbnailURL() (r string, exists bool)
ThumbnailURL returns the value of the "thumbnail_url" field in the mutation.
func (*VideoEmbedMutation) Title ¶
func (m *VideoEmbedMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (VideoEmbedMutation) Tx ¶
func (m VideoEmbedMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*VideoEmbedMutation) Type ¶
func (m *VideoEmbedMutation) Type() string
Type returns the node type of this mutation (VideoEmbed).
func (*VideoEmbedMutation) URL ¶
func (m *VideoEmbedMutation) URL() (r string, exists bool)
URL returns the value of the "url" field in the mutation.
func (*VideoEmbedMutation) URLHash ¶
func (m *VideoEmbedMutation) URLHash() (r string, exists bool)
URLHash returns the value of the "url_hash" field in the mutation.
func (*VideoEmbedMutation) Where ¶
func (m *VideoEmbedMutation) Where(ps ...predicate.VideoEmbed)
Where appends a list predicates to the VideoEmbedMutation builder.
func (*VideoEmbedMutation) WhereP ¶
func (m *VideoEmbedMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the VideoEmbedMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*VideoEmbedMutation) Width ¶
func (m *VideoEmbedMutation) Width() (r int, exists bool)
Width returns the value of the "width" field in the mutation.
type VideoEmbedQuery ¶
type VideoEmbedQuery struct {
// contains filtered or unexported fields
}
VideoEmbedQuery is the builder for querying VideoEmbed entities.
func (*VideoEmbedQuery) Aggregate ¶
func (_q *VideoEmbedQuery) Aggregate(fns ...AggregateFunc) *VideoEmbedSelect
Aggregate returns a VideoEmbedSelect configured with the given aggregations.
func (*VideoEmbedQuery) All ¶
func (_q *VideoEmbedQuery) All(ctx context.Context) ([]*VideoEmbed, error)
All executes the query and returns a list of VideoEmbeds.
func (*VideoEmbedQuery) AllX ¶
func (_q *VideoEmbedQuery) AllX(ctx context.Context) []*VideoEmbed
AllX is like All, but panics if an error occurs.
func (*VideoEmbedQuery) Clone ¶
func (_q *VideoEmbedQuery) Clone() *VideoEmbedQuery
Clone returns a duplicate of the VideoEmbedQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*VideoEmbedQuery) Count ¶
func (_q *VideoEmbedQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*VideoEmbedQuery) CountX ¶
func (_q *VideoEmbedQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*VideoEmbedQuery) Exist ¶
func (_q *VideoEmbedQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*VideoEmbedQuery) ExistX ¶
func (_q *VideoEmbedQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*VideoEmbedQuery) First ¶
func (_q *VideoEmbedQuery) First(ctx context.Context) (*VideoEmbed, error)
First returns the first VideoEmbed entity from the query. Returns a *NotFoundError when no VideoEmbed was found.
func (*VideoEmbedQuery) FirstID ¶
func (_q *VideoEmbedQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first VideoEmbed ID from the query. Returns a *NotFoundError when no VideoEmbed ID was found.
func (*VideoEmbedQuery) FirstIDX ¶
func (_q *VideoEmbedQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*VideoEmbedQuery) FirstX ¶
func (_q *VideoEmbedQuery) FirstX(ctx context.Context) *VideoEmbed
FirstX is like First, but panics if an error occurs.
func (*VideoEmbedQuery) GroupBy ¶
func (_q *VideoEmbedQuery) GroupBy(field string, fields ...string) *VideoEmbedGroupBy
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 {
URLHash string `json:"url_hash,omitempty"`
Count int `json:"count,omitempty"`
}
client.VideoEmbed.Query().
GroupBy(videoembed.FieldURLHash).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*VideoEmbedQuery) IDs ¶
func (_q *VideoEmbedQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of VideoEmbed IDs.
func (*VideoEmbedQuery) IDsX ¶
func (_q *VideoEmbedQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*VideoEmbedQuery) Limit ¶
func (_q *VideoEmbedQuery) Limit(limit int) *VideoEmbedQuery
Limit the number of records to be returned by this query.
func (*VideoEmbedQuery) Offset ¶
func (_q *VideoEmbedQuery) Offset(offset int) *VideoEmbedQuery
Offset to start from.
func (*VideoEmbedQuery) Only ¶
func (_q *VideoEmbedQuery) Only(ctx context.Context) (*VideoEmbed, error)
Only returns a single VideoEmbed entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VideoEmbed entity is found. Returns a *NotFoundError when no VideoEmbed entities are found.
func (*VideoEmbedQuery) OnlyID ¶
func (_q *VideoEmbedQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only VideoEmbed ID in the query. Returns a *NotSingularError when more than one VideoEmbed ID is found. Returns a *NotFoundError when no entities are found.
func (*VideoEmbedQuery) OnlyIDX ¶
func (_q *VideoEmbedQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*VideoEmbedQuery) OnlyX ¶
func (_q *VideoEmbedQuery) OnlyX(ctx context.Context) *VideoEmbed
OnlyX is like Only, but panics if an error occurs.
func (*VideoEmbedQuery) Order ¶
func (_q *VideoEmbedQuery) Order(o ...videoembed.OrderOption) *VideoEmbedQuery
Order specifies how the records should be ordered.
func (*VideoEmbedQuery) Select ¶
func (_q *VideoEmbedQuery) Select(fields ...string) *VideoEmbedSelect
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 {
URLHash string `json:"url_hash,omitempty"`
}
client.VideoEmbed.Query().
Select(videoembed.FieldURLHash).
Scan(ctx, &v)
func (*VideoEmbedQuery) Unique ¶
func (_q *VideoEmbedQuery) Unique(unique bool) *VideoEmbedQuery
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 (*VideoEmbedQuery) Where ¶
func (_q *VideoEmbedQuery) Where(ps ...predicate.VideoEmbed) *VideoEmbedQuery
Where adds a new predicate for the VideoEmbedQuery builder.
type VideoEmbedSelect ¶
type VideoEmbedSelect struct {
*VideoEmbedQuery
// contains filtered or unexported fields
}
VideoEmbedSelect is the builder for selecting fields of VideoEmbed entities.
func (*VideoEmbedSelect) Aggregate ¶
func (_s *VideoEmbedSelect) Aggregate(fns ...AggregateFunc) *VideoEmbedSelect
Aggregate adds the given aggregation functions to the selector query.
func (*VideoEmbedSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSelect) Scan ¶
func (_s *VideoEmbedSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VideoEmbedSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VideoEmbedSettings ¶
type VideoEmbedSettings struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Providers holds the value of the "providers" field.
Providers string `json:"providers,omitempty"`
// ClickToPlay holds the value of the "click_to_play" field.
ClickToPlay bool `json:"click_to_play,omitempty"`
// LocalPreviews holds the value of the "local_previews" field.
LocalPreviews bool `json:"local_previews,omitempty"`
// contains filtered or unexported fields
}
VideoEmbedSettings is the model entity for the VideoEmbedSettings schema.
func (*VideoEmbedSettings) String ¶
func (_m *VideoEmbedSettings) String() string
String implements the fmt.Stringer.
func (*VideoEmbedSettings) Unwrap ¶
func (_m *VideoEmbedSettings) Unwrap() *VideoEmbedSettings
Unwrap unwraps the VideoEmbedSettings 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 (*VideoEmbedSettings) Update ¶
func (_m *VideoEmbedSettings) Update() *VideoEmbedSettingsUpdateOne
Update returns a builder for updating this VideoEmbedSettings. Note that you need to call VideoEmbedSettings.Unwrap() before calling this method if this VideoEmbedSettings was returned from a transaction, and the transaction was committed or rolled back.
type VideoEmbedSettingsClient ¶
type VideoEmbedSettingsClient struct {
// contains filtered or unexported fields
}
VideoEmbedSettingsClient is a client for the VideoEmbedSettings schema.
func NewVideoEmbedSettingsClient ¶
func NewVideoEmbedSettingsClient(c config) *VideoEmbedSettingsClient
NewVideoEmbedSettingsClient returns a client for the VideoEmbedSettings from the given config.
func (*VideoEmbedSettingsClient) Create ¶
func (c *VideoEmbedSettingsClient) Create() *VideoEmbedSettingsCreate
Create returns a builder for creating a VideoEmbedSettings entity.
func (*VideoEmbedSettingsClient) CreateBulk ¶
func (c *VideoEmbedSettingsClient) CreateBulk(builders ...*VideoEmbedSettingsCreate) *VideoEmbedSettingsCreateBulk
CreateBulk returns a builder for creating a bulk of VideoEmbedSettings entities.
func (*VideoEmbedSettingsClient) Delete ¶
func (c *VideoEmbedSettingsClient) Delete() *VideoEmbedSettingsDelete
Delete returns a delete builder for VideoEmbedSettings.
func (*VideoEmbedSettingsClient) DeleteOne ¶
func (c *VideoEmbedSettingsClient) DeleteOne(_m *VideoEmbedSettings) *VideoEmbedSettingsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*VideoEmbedSettingsClient) DeleteOneID ¶
func (c *VideoEmbedSettingsClient) DeleteOneID(id int) *VideoEmbedSettingsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*VideoEmbedSettingsClient) Get ¶
func (c *VideoEmbedSettingsClient) Get(ctx context.Context, id int) (*VideoEmbedSettings, error)
Get returns a VideoEmbedSettings entity by its id.
func (*VideoEmbedSettingsClient) GetX ¶
func (c *VideoEmbedSettingsClient) GetX(ctx context.Context, id int) *VideoEmbedSettings
GetX is like Get, but panics if an error occurs.
func (*VideoEmbedSettingsClient) Hooks ¶
func (c *VideoEmbedSettingsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*VideoEmbedSettingsClient) Intercept ¶
func (c *VideoEmbedSettingsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `videoembedsettings.Intercept(f(g(h())))`.
func (*VideoEmbedSettingsClient) Interceptors ¶
func (c *VideoEmbedSettingsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*VideoEmbedSettingsClient) MapCreateBulk ¶
func (c *VideoEmbedSettingsClient) MapCreateBulk(slice any, setFunc func(*VideoEmbedSettingsCreate, int)) *VideoEmbedSettingsCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*VideoEmbedSettingsClient) Query ¶
func (c *VideoEmbedSettingsClient) Query() *VideoEmbedSettingsQuery
Query returns a query builder for VideoEmbedSettings.
func (*VideoEmbedSettingsClient) Update ¶
func (c *VideoEmbedSettingsClient) Update() *VideoEmbedSettingsUpdate
Update returns an update builder for VideoEmbedSettings.
func (*VideoEmbedSettingsClient) UpdateOne ¶
func (c *VideoEmbedSettingsClient) UpdateOne(_m *VideoEmbedSettings) *VideoEmbedSettingsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*VideoEmbedSettingsClient) UpdateOneID ¶
func (c *VideoEmbedSettingsClient) UpdateOneID(id int) *VideoEmbedSettingsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*VideoEmbedSettingsClient) Use ¶
func (c *VideoEmbedSettingsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `videoembedsettings.Hooks(f(g(h())))`.
type VideoEmbedSettingsCreate ¶
type VideoEmbedSettingsCreate struct {
// contains filtered or unexported fields
}
VideoEmbedSettingsCreate is the builder for creating a VideoEmbedSettings entity.
func (*VideoEmbedSettingsCreate) Exec ¶
func (_c *VideoEmbedSettingsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*VideoEmbedSettingsCreate) ExecX ¶
func (_c *VideoEmbedSettingsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedSettingsCreate) Mutation ¶
func (_c *VideoEmbedSettingsCreate) Mutation() *VideoEmbedSettingsMutation
Mutation returns the VideoEmbedSettingsMutation object of the builder.
func (*VideoEmbedSettingsCreate) Save ¶
func (_c *VideoEmbedSettingsCreate) Save(ctx context.Context) (*VideoEmbedSettings, error)
Save creates the VideoEmbedSettings in the database.
func (*VideoEmbedSettingsCreate) SaveX ¶
func (_c *VideoEmbedSettingsCreate) SaveX(ctx context.Context) *VideoEmbedSettings
SaveX calls Save and panics if Save returns an error.
func (*VideoEmbedSettingsCreate) SetClickToPlay ¶
func (_c *VideoEmbedSettingsCreate) SetClickToPlay(v bool) *VideoEmbedSettingsCreate
SetClickToPlay sets the "click_to_play" field.
func (*VideoEmbedSettingsCreate) SetID ¶
func (_c *VideoEmbedSettingsCreate) SetID(v int) *VideoEmbedSettingsCreate
SetID sets the "id" field.
func (*VideoEmbedSettingsCreate) SetLocalPreviews ¶
func (_c *VideoEmbedSettingsCreate) SetLocalPreviews(v bool) *VideoEmbedSettingsCreate
SetLocalPreviews sets the "local_previews" field.
func (*VideoEmbedSettingsCreate) SetNillableClickToPlay ¶
func (_c *VideoEmbedSettingsCreate) SetNillableClickToPlay(v *bool) *VideoEmbedSettingsCreate
SetNillableClickToPlay sets the "click_to_play" field if the given value is not nil.
func (*VideoEmbedSettingsCreate) SetNillableLocalPreviews ¶
func (_c *VideoEmbedSettingsCreate) SetNillableLocalPreviews(v *bool) *VideoEmbedSettingsCreate
SetNillableLocalPreviews sets the "local_previews" field if the given value is not nil.
func (*VideoEmbedSettingsCreate) SetNillableProviders ¶
func (_c *VideoEmbedSettingsCreate) SetNillableProviders(v *string) *VideoEmbedSettingsCreate
SetNillableProviders sets the "providers" field if the given value is not nil.
func (*VideoEmbedSettingsCreate) SetProviders ¶
func (_c *VideoEmbedSettingsCreate) SetProviders(v string) *VideoEmbedSettingsCreate
SetProviders sets the "providers" field.
type VideoEmbedSettingsCreateBulk ¶
type VideoEmbedSettingsCreateBulk struct {
// contains filtered or unexported fields
}
VideoEmbedSettingsCreateBulk is the builder for creating many VideoEmbedSettings entities in bulk.
func (*VideoEmbedSettingsCreateBulk) Exec ¶
func (_c *VideoEmbedSettingsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*VideoEmbedSettingsCreateBulk) ExecX ¶
func (_c *VideoEmbedSettingsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedSettingsCreateBulk) Save ¶
func (_c *VideoEmbedSettingsCreateBulk) Save(ctx context.Context) ([]*VideoEmbedSettings, error)
Save creates the VideoEmbedSettings entities in the database.
func (*VideoEmbedSettingsCreateBulk) SaveX ¶
func (_c *VideoEmbedSettingsCreateBulk) SaveX(ctx context.Context) []*VideoEmbedSettings
SaveX is like Save, but panics if an error occurs.
type VideoEmbedSettingsDelete ¶
type VideoEmbedSettingsDelete struct {
// contains filtered or unexported fields
}
VideoEmbedSettingsDelete is the builder for deleting a VideoEmbedSettings entity.
func (*VideoEmbedSettingsDelete) Exec ¶
func (_d *VideoEmbedSettingsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*VideoEmbedSettingsDelete) ExecX ¶
func (_d *VideoEmbedSettingsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedSettingsDelete) Where ¶
func (_d *VideoEmbedSettingsDelete) Where(ps ...predicate.VideoEmbedSettings) *VideoEmbedSettingsDelete
Where appends a list predicates to the VideoEmbedSettingsDelete builder.
type VideoEmbedSettingsDeleteOne ¶
type VideoEmbedSettingsDeleteOne struct {
// contains filtered or unexported fields
}
VideoEmbedSettingsDeleteOne is the builder for deleting a single VideoEmbedSettings entity.
func (*VideoEmbedSettingsDeleteOne) Exec ¶
func (_d *VideoEmbedSettingsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*VideoEmbedSettingsDeleteOne) ExecX ¶
func (_d *VideoEmbedSettingsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedSettingsDeleteOne) Where ¶
func (_d *VideoEmbedSettingsDeleteOne) Where(ps ...predicate.VideoEmbedSettings) *VideoEmbedSettingsDeleteOne
Where appends a list predicates to the VideoEmbedSettingsDelete builder.
type VideoEmbedSettingsGroupBy ¶
type VideoEmbedSettingsGroupBy struct {
// contains filtered or unexported fields
}
VideoEmbedSettingsGroupBy is the group-by builder for VideoEmbedSettings entities.
func (*VideoEmbedSettingsGroupBy) Aggregate ¶
func (_g *VideoEmbedSettingsGroupBy) Aggregate(fns ...AggregateFunc) *VideoEmbedSettingsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*VideoEmbedSettingsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*VideoEmbedSettingsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*VideoEmbedSettingsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsGroupBy) Scan ¶
func (_g *VideoEmbedSettingsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VideoEmbedSettingsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VideoEmbedSettingsMutation ¶
type VideoEmbedSettingsMutation struct {
// contains filtered or unexported fields
}
VideoEmbedSettingsMutation represents an operation that mutates the VideoEmbedSettings nodes in the graph.
func (*VideoEmbedSettingsMutation) AddField ¶
func (m *VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) AddedEdges ¶
func (m *VideoEmbedSettingsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*VideoEmbedSettingsMutation) AddedField ¶
func (m *VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) AddedFields ¶
func (m *VideoEmbedSettingsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*VideoEmbedSettingsMutation) AddedIDs ¶
func (m *VideoEmbedSettingsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*VideoEmbedSettingsMutation) ClearEdge ¶
func (m *VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) ClearField ¶
func (m *VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) ClearedEdges ¶
func (m *VideoEmbedSettingsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*VideoEmbedSettingsMutation) ClearedFields ¶
func (m *VideoEmbedSettingsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (*VideoEmbedSettingsMutation) ClickToPlay ¶
func (m *VideoEmbedSettingsMutation) ClickToPlay() (r bool, exists bool)
ClickToPlay returns the value of the "click_to_play" field in the mutation.
func (VideoEmbedSettingsMutation) Client ¶
func (m VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) EdgeCleared ¶
func (m *VideoEmbedSettingsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*VideoEmbedSettingsMutation) Field ¶
func (m *VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) FieldCleared ¶
func (m *VideoEmbedSettingsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*VideoEmbedSettingsMutation) Fields ¶
func (m *VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) ID ¶
func (m *VideoEmbedSettingsMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*VideoEmbedSettingsMutation) IDs ¶
func (m *VideoEmbedSettingsMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*VideoEmbedSettingsMutation) LocalPreviews ¶
func (m *VideoEmbedSettingsMutation) LocalPreviews() (r bool, exists bool)
LocalPreviews returns the value of the "local_previews" field in the mutation.
func (*VideoEmbedSettingsMutation) OldClickToPlay ¶
func (m *VideoEmbedSettingsMutation) OldClickToPlay(ctx context.Context) (v bool, err error)
OldClickToPlay returns the old "click_to_play" field's value of the VideoEmbedSettings entity. If the VideoEmbedSettings object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedSettingsMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*VideoEmbedSettingsMutation) OldLocalPreviews ¶
func (m *VideoEmbedSettingsMutation) OldLocalPreviews(ctx context.Context) (v bool, err error)
OldLocalPreviews returns the old "local_previews" field's value of the VideoEmbedSettings entity. If the VideoEmbedSettings object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedSettingsMutation) OldProviders ¶
func (m *VideoEmbedSettingsMutation) OldProviders(ctx context.Context) (v string, err error)
OldProviders returns the old "providers" field's value of the VideoEmbedSettings entity. If the VideoEmbedSettings object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VideoEmbedSettingsMutation) Op ¶
func (m *VideoEmbedSettingsMutation) Op() Op
Op returns the operation name.
func (*VideoEmbedSettingsMutation) Providers ¶
func (m *VideoEmbedSettingsMutation) Providers() (r string, exists bool)
Providers returns the value of the "providers" field in the mutation.
func (*VideoEmbedSettingsMutation) RemovedEdges ¶
func (m *VideoEmbedSettingsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*VideoEmbedSettingsMutation) RemovedIDs ¶
func (m *VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) ResetClickToPlay ¶
func (m *VideoEmbedSettingsMutation) ResetClickToPlay()
ResetClickToPlay resets all changes to the "click_to_play" field.
func (*VideoEmbedSettingsMutation) ResetEdge ¶
func (m *VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) ResetField ¶
func (m *VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) ResetLocalPreviews ¶
func (m *VideoEmbedSettingsMutation) ResetLocalPreviews()
ResetLocalPreviews resets all changes to the "local_previews" field.
func (*VideoEmbedSettingsMutation) ResetProviders ¶
func (m *VideoEmbedSettingsMutation) ResetProviders()
ResetProviders resets all changes to the "providers" field.
func (*VideoEmbedSettingsMutation) SetClickToPlay ¶
func (m *VideoEmbedSettingsMutation) SetClickToPlay(b bool)
SetClickToPlay sets the "click_to_play" field.
func (*VideoEmbedSettingsMutation) SetField ¶
func (m *VideoEmbedSettingsMutation) 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 (*VideoEmbedSettingsMutation) SetID ¶
func (m *VideoEmbedSettingsMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of VideoEmbedSettings entities.
func (*VideoEmbedSettingsMutation) SetLocalPreviews ¶
func (m *VideoEmbedSettingsMutation) SetLocalPreviews(b bool)
SetLocalPreviews sets the "local_previews" field.
func (*VideoEmbedSettingsMutation) SetOp ¶
func (m *VideoEmbedSettingsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*VideoEmbedSettingsMutation) SetProviders ¶
func (m *VideoEmbedSettingsMutation) SetProviders(s string)
SetProviders sets the "providers" field.
func (VideoEmbedSettingsMutation) Tx ¶
func (m VideoEmbedSettingsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*VideoEmbedSettingsMutation) Type ¶
func (m *VideoEmbedSettingsMutation) Type() string
Type returns the node type of this mutation (VideoEmbedSettings).
func (*VideoEmbedSettingsMutation) Where ¶
func (m *VideoEmbedSettingsMutation) Where(ps ...predicate.VideoEmbedSettings)
Where appends a list predicates to the VideoEmbedSettingsMutation builder.
func (*VideoEmbedSettingsMutation) WhereP ¶
func (m *VideoEmbedSettingsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the VideoEmbedSettingsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type VideoEmbedSettingsQuery ¶
type VideoEmbedSettingsQuery struct {
// contains filtered or unexported fields
}
VideoEmbedSettingsQuery is the builder for querying VideoEmbedSettings entities.
func (*VideoEmbedSettingsQuery) Aggregate ¶
func (_q *VideoEmbedSettingsQuery) Aggregate(fns ...AggregateFunc) *VideoEmbedSettingsSelect
Aggregate returns a VideoEmbedSettingsSelect configured with the given aggregations.
func (*VideoEmbedSettingsQuery) All ¶
func (_q *VideoEmbedSettingsQuery) All(ctx context.Context) ([]*VideoEmbedSettings, error)
All executes the query and returns a list of VideoEmbedSettingsSlice.
func (*VideoEmbedSettingsQuery) AllX ¶
func (_q *VideoEmbedSettingsQuery) AllX(ctx context.Context) []*VideoEmbedSettings
AllX is like All, but panics if an error occurs.
func (*VideoEmbedSettingsQuery) Clone ¶
func (_q *VideoEmbedSettingsQuery) Clone() *VideoEmbedSettingsQuery
Clone returns a duplicate of the VideoEmbedSettingsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*VideoEmbedSettingsQuery) Count ¶
func (_q *VideoEmbedSettingsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*VideoEmbedSettingsQuery) CountX ¶
func (_q *VideoEmbedSettingsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*VideoEmbedSettingsQuery) Exist ¶
func (_q *VideoEmbedSettingsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*VideoEmbedSettingsQuery) ExistX ¶
func (_q *VideoEmbedSettingsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*VideoEmbedSettingsQuery) First ¶
func (_q *VideoEmbedSettingsQuery) First(ctx context.Context) (*VideoEmbedSettings, error)
First returns the first VideoEmbedSettings entity from the query. Returns a *NotFoundError when no VideoEmbedSettings was found.
func (*VideoEmbedSettingsQuery) FirstID ¶
func (_q *VideoEmbedSettingsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first VideoEmbedSettings ID from the query. Returns a *NotFoundError when no VideoEmbedSettings ID was found.
func (*VideoEmbedSettingsQuery) FirstIDX ¶
func (_q *VideoEmbedSettingsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*VideoEmbedSettingsQuery) FirstX ¶
func (_q *VideoEmbedSettingsQuery) FirstX(ctx context.Context) *VideoEmbedSettings
FirstX is like First, but panics if an error occurs.
func (*VideoEmbedSettingsQuery) GroupBy ¶
func (_q *VideoEmbedSettingsQuery) GroupBy(field string, fields ...string) *VideoEmbedSettingsGroupBy
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 {
Providers string `json:"providers,omitempty"`
Count int `json:"count,omitempty"`
}
client.VideoEmbedSettings.Query().
GroupBy(videoembedsettings.FieldProviders).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*VideoEmbedSettingsQuery) IDs ¶
func (_q *VideoEmbedSettingsQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of VideoEmbedSettings IDs.
func (*VideoEmbedSettingsQuery) IDsX ¶
func (_q *VideoEmbedSettingsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*VideoEmbedSettingsQuery) Limit ¶
func (_q *VideoEmbedSettingsQuery) Limit(limit int) *VideoEmbedSettingsQuery
Limit the number of records to be returned by this query.
func (*VideoEmbedSettingsQuery) Offset ¶
func (_q *VideoEmbedSettingsQuery) Offset(offset int) *VideoEmbedSettingsQuery
Offset to start from.
func (*VideoEmbedSettingsQuery) Only ¶
func (_q *VideoEmbedSettingsQuery) Only(ctx context.Context) (*VideoEmbedSettings, error)
Only returns a single VideoEmbedSettings entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one VideoEmbedSettings entity is found. Returns a *NotFoundError when no VideoEmbedSettings entities are found.
func (*VideoEmbedSettingsQuery) OnlyID ¶
func (_q *VideoEmbedSettingsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only VideoEmbedSettings ID in the query. Returns a *NotSingularError when more than one VideoEmbedSettings ID is found. Returns a *NotFoundError when no entities are found.
func (*VideoEmbedSettingsQuery) OnlyIDX ¶
func (_q *VideoEmbedSettingsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*VideoEmbedSettingsQuery) OnlyX ¶
func (_q *VideoEmbedSettingsQuery) OnlyX(ctx context.Context) *VideoEmbedSettings
OnlyX is like Only, but panics if an error occurs.
func (*VideoEmbedSettingsQuery) Order ¶
func (_q *VideoEmbedSettingsQuery) Order(o ...videoembedsettings.OrderOption) *VideoEmbedSettingsQuery
Order specifies how the records should be ordered.
func (*VideoEmbedSettingsQuery) Select ¶
func (_q *VideoEmbedSettingsQuery) Select(fields ...string) *VideoEmbedSettingsSelect
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 {
Providers string `json:"providers,omitempty"`
}
client.VideoEmbedSettings.Query().
Select(videoembedsettings.FieldProviders).
Scan(ctx, &v)
func (*VideoEmbedSettingsQuery) Unique ¶
func (_q *VideoEmbedSettingsQuery) Unique(unique bool) *VideoEmbedSettingsQuery
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 (*VideoEmbedSettingsQuery) Where ¶
func (_q *VideoEmbedSettingsQuery) Where(ps ...predicate.VideoEmbedSettings) *VideoEmbedSettingsQuery
Where adds a new predicate for the VideoEmbedSettingsQuery builder.
type VideoEmbedSettingsSelect ¶
type VideoEmbedSettingsSelect struct {
*VideoEmbedSettingsQuery
// contains filtered or unexported fields
}
VideoEmbedSettingsSelect is the builder for selecting fields of VideoEmbedSettings entities.
func (*VideoEmbedSettingsSelect) Aggregate ¶
func (_s *VideoEmbedSettingsSelect) Aggregate(fns ...AggregateFunc) *VideoEmbedSettingsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*VideoEmbedSettingsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*VideoEmbedSettingsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*VideoEmbedSettingsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VideoEmbedSettingsSelect) Scan ¶
func (_s *VideoEmbedSettingsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VideoEmbedSettingsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VideoEmbedSettingsSlice ¶
type VideoEmbedSettingsSlice []*VideoEmbedSettings
VideoEmbedSettingsSlice is a parsable slice of VideoEmbedSettings.
type VideoEmbedSettingsUpdate ¶
type VideoEmbedSettingsUpdate struct {
// contains filtered or unexported fields
}
VideoEmbedSettingsUpdate is the builder for updating VideoEmbedSettings entities.
func (*VideoEmbedSettingsUpdate) Exec ¶
func (_u *VideoEmbedSettingsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*VideoEmbedSettingsUpdate) ExecX ¶
func (_u *VideoEmbedSettingsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedSettingsUpdate) Mutation ¶
func (_u *VideoEmbedSettingsUpdate) Mutation() *VideoEmbedSettingsMutation
Mutation returns the VideoEmbedSettingsMutation object of the builder.
func (*VideoEmbedSettingsUpdate) Save ¶
func (_u *VideoEmbedSettingsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*VideoEmbedSettingsUpdate) SaveX ¶
func (_u *VideoEmbedSettingsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*VideoEmbedSettingsUpdate) SetClickToPlay ¶
func (_u *VideoEmbedSettingsUpdate) SetClickToPlay(v bool) *VideoEmbedSettingsUpdate
SetClickToPlay sets the "click_to_play" field.
func (*VideoEmbedSettingsUpdate) SetLocalPreviews ¶
func (_u *VideoEmbedSettingsUpdate) SetLocalPreviews(v bool) *VideoEmbedSettingsUpdate
SetLocalPreviews sets the "local_previews" field.
func (*VideoEmbedSettingsUpdate) SetNillableClickToPlay ¶
func (_u *VideoEmbedSettingsUpdate) SetNillableClickToPlay(v *bool) *VideoEmbedSettingsUpdate
SetNillableClickToPlay sets the "click_to_play" field if the given value is not nil.
func (*VideoEmbedSettingsUpdate) SetNillableLocalPreviews ¶
func (_u *VideoEmbedSettingsUpdate) SetNillableLocalPreviews(v *bool) *VideoEmbedSettingsUpdate
SetNillableLocalPreviews sets the "local_previews" field if the given value is not nil.
func (*VideoEmbedSettingsUpdate) SetNillableProviders ¶
func (_u *VideoEmbedSettingsUpdate) SetNillableProviders(v *string) *VideoEmbedSettingsUpdate
SetNillableProviders sets the "providers" field if the given value is not nil.
func (*VideoEmbedSettingsUpdate) SetProviders ¶
func (_u *VideoEmbedSettingsUpdate) SetProviders(v string) *VideoEmbedSettingsUpdate
SetProviders sets the "providers" field.
func (*VideoEmbedSettingsUpdate) Where ¶
func (_u *VideoEmbedSettingsUpdate) Where(ps ...predicate.VideoEmbedSettings) *VideoEmbedSettingsUpdate
Where appends a list predicates to the VideoEmbedSettingsUpdate builder.
type VideoEmbedSettingsUpdateOne ¶
type VideoEmbedSettingsUpdateOne struct {
// contains filtered or unexported fields
}
VideoEmbedSettingsUpdateOne is the builder for updating a single VideoEmbedSettings entity.
func (*VideoEmbedSettingsUpdateOne) Exec ¶
func (_u *VideoEmbedSettingsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*VideoEmbedSettingsUpdateOne) ExecX ¶
func (_u *VideoEmbedSettingsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedSettingsUpdateOne) Mutation ¶
func (_u *VideoEmbedSettingsUpdateOne) Mutation() *VideoEmbedSettingsMutation
Mutation returns the VideoEmbedSettingsMutation object of the builder.
func (*VideoEmbedSettingsUpdateOne) Save ¶
func (_u *VideoEmbedSettingsUpdateOne) Save(ctx context.Context) (*VideoEmbedSettings, error)
Save executes the query and returns the updated VideoEmbedSettings entity.
func (*VideoEmbedSettingsUpdateOne) SaveX ¶
func (_u *VideoEmbedSettingsUpdateOne) SaveX(ctx context.Context) *VideoEmbedSettings
SaveX is like Save, but panics if an error occurs.
func (*VideoEmbedSettingsUpdateOne) Select ¶
func (_u *VideoEmbedSettingsUpdateOne) Select(field string, fields ...string) *VideoEmbedSettingsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*VideoEmbedSettingsUpdateOne) SetClickToPlay ¶
func (_u *VideoEmbedSettingsUpdateOne) SetClickToPlay(v bool) *VideoEmbedSettingsUpdateOne
SetClickToPlay sets the "click_to_play" field.
func (*VideoEmbedSettingsUpdateOne) SetLocalPreviews ¶
func (_u *VideoEmbedSettingsUpdateOne) SetLocalPreviews(v bool) *VideoEmbedSettingsUpdateOne
SetLocalPreviews sets the "local_previews" field.
func (*VideoEmbedSettingsUpdateOne) SetNillableClickToPlay ¶
func (_u *VideoEmbedSettingsUpdateOne) SetNillableClickToPlay(v *bool) *VideoEmbedSettingsUpdateOne
SetNillableClickToPlay sets the "click_to_play" field if the given value is not nil.
func (*VideoEmbedSettingsUpdateOne) SetNillableLocalPreviews ¶
func (_u *VideoEmbedSettingsUpdateOne) SetNillableLocalPreviews(v *bool) *VideoEmbedSettingsUpdateOne
SetNillableLocalPreviews sets the "local_previews" field if the given value is not nil.
func (*VideoEmbedSettingsUpdateOne) SetNillableProviders ¶
func (_u *VideoEmbedSettingsUpdateOne) SetNillableProviders(v *string) *VideoEmbedSettingsUpdateOne
SetNillableProviders sets the "providers" field if the given value is not nil.
func (*VideoEmbedSettingsUpdateOne) SetProviders ¶
func (_u *VideoEmbedSettingsUpdateOne) SetProviders(v string) *VideoEmbedSettingsUpdateOne
SetProviders sets the "providers" field.
func (*VideoEmbedSettingsUpdateOne) Where ¶
func (_u *VideoEmbedSettingsUpdateOne) Where(ps ...predicate.VideoEmbedSettings) *VideoEmbedSettingsUpdateOne
Where appends a list predicates to the VideoEmbedSettingsUpdate builder.
type VideoEmbedUpdate ¶
type VideoEmbedUpdate struct {
// contains filtered or unexported fields
}
VideoEmbedUpdate is the builder for updating VideoEmbed entities.
func (*VideoEmbedUpdate) AddHeight ¶
func (_u *VideoEmbedUpdate) AddHeight(v int) *VideoEmbedUpdate
AddHeight adds value to the "height" field.
func (*VideoEmbedUpdate) AddWidth ¶
func (_u *VideoEmbedUpdate) AddWidth(v int) *VideoEmbedUpdate
AddWidth adds value to the "width" field.
func (*VideoEmbedUpdate) Exec ¶
func (_u *VideoEmbedUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*VideoEmbedUpdate) ExecX ¶
func (_u *VideoEmbedUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedUpdate) Mutation ¶
func (_u *VideoEmbedUpdate) Mutation() *VideoEmbedMutation
Mutation returns the VideoEmbedMutation object of the builder.
func (*VideoEmbedUpdate) Save ¶
func (_u *VideoEmbedUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*VideoEmbedUpdate) SaveX ¶
func (_u *VideoEmbedUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*VideoEmbedUpdate) SetFetchedAt ¶
func (_u *VideoEmbedUpdate) SetFetchedAt(v time.Time) *VideoEmbedUpdate
SetFetchedAt sets the "fetched_at" field.
func (*VideoEmbedUpdate) SetHeight ¶
func (_u *VideoEmbedUpdate) SetHeight(v int) *VideoEmbedUpdate
SetHeight sets the "height" field.
func (*VideoEmbedUpdate) SetNillableFetchedAt ¶
func (_u *VideoEmbedUpdate) SetNillableFetchedAt(v *time.Time) *VideoEmbedUpdate
SetNillableFetchedAt sets the "fetched_at" field if the given value is not nil.
func (*VideoEmbedUpdate) SetNillableHeight ¶
func (_u *VideoEmbedUpdate) SetNillableHeight(v *int) *VideoEmbedUpdate
SetNillableHeight sets the "height" field if the given value is not nil.
func (*VideoEmbedUpdate) SetNillableProvider ¶
func (_u *VideoEmbedUpdate) SetNillableProvider(v *string) *VideoEmbedUpdate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*VideoEmbedUpdate) SetNillableStatus ¶
func (_u *VideoEmbedUpdate) SetNillableStatus(v *string) *VideoEmbedUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*VideoEmbedUpdate) SetNillableThumbnailFile ¶
func (_u *VideoEmbedUpdate) SetNillableThumbnailFile(v *string) *VideoEmbedUpdate
SetNillableThumbnailFile sets the "thumbnail_file" field if the given value is not nil.
func (*VideoEmbedUpdate) SetNillableThumbnailURL ¶
func (_u *VideoEmbedUpdate) SetNillableThumbnailURL(v *string) *VideoEmbedUpdate
SetNillableThumbnailURL sets the "thumbnail_url" field if the given value is not nil.
func (*VideoEmbedUpdate) SetNillableTitle ¶
func (_u *VideoEmbedUpdate) SetNillableTitle(v *string) *VideoEmbedUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*VideoEmbedUpdate) SetNillableURL ¶
func (_u *VideoEmbedUpdate) SetNillableURL(v *string) *VideoEmbedUpdate
SetNillableURL sets the "url" field if the given value is not nil.
func (*VideoEmbedUpdate) SetNillableURLHash ¶
func (_u *VideoEmbedUpdate) SetNillableURLHash(v *string) *VideoEmbedUpdate
SetNillableURLHash sets the "url_hash" field if the given value is not nil.
func (*VideoEmbedUpdate) SetNillableWidth ¶
func (_u *VideoEmbedUpdate) SetNillableWidth(v *int) *VideoEmbedUpdate
SetNillableWidth sets the "width" field if the given value is not nil.
func (*VideoEmbedUpdate) SetProvider ¶
func (_u *VideoEmbedUpdate) SetProvider(v string) *VideoEmbedUpdate
SetProvider sets the "provider" field.
func (*VideoEmbedUpdate) SetStatus ¶
func (_u *VideoEmbedUpdate) SetStatus(v string) *VideoEmbedUpdate
SetStatus sets the "status" field.
func (*VideoEmbedUpdate) SetThumbnailFile ¶
func (_u *VideoEmbedUpdate) SetThumbnailFile(v string) *VideoEmbedUpdate
SetThumbnailFile sets the "thumbnail_file" field.
func (*VideoEmbedUpdate) SetThumbnailURL ¶
func (_u *VideoEmbedUpdate) SetThumbnailURL(v string) *VideoEmbedUpdate
SetThumbnailURL sets the "thumbnail_url" field.
func (*VideoEmbedUpdate) SetTitle ¶
func (_u *VideoEmbedUpdate) SetTitle(v string) *VideoEmbedUpdate
SetTitle sets the "title" field.
func (*VideoEmbedUpdate) SetURL ¶
func (_u *VideoEmbedUpdate) SetURL(v string) *VideoEmbedUpdate
SetURL sets the "url" field.
func (*VideoEmbedUpdate) SetURLHash ¶
func (_u *VideoEmbedUpdate) SetURLHash(v string) *VideoEmbedUpdate
SetURLHash sets the "url_hash" field.
func (*VideoEmbedUpdate) SetWidth ¶
func (_u *VideoEmbedUpdate) SetWidth(v int) *VideoEmbedUpdate
SetWidth sets the "width" field.
func (*VideoEmbedUpdate) Where ¶
func (_u *VideoEmbedUpdate) Where(ps ...predicate.VideoEmbed) *VideoEmbedUpdate
Where appends a list predicates to the VideoEmbedUpdate builder.
type VideoEmbedUpdateOne ¶
type VideoEmbedUpdateOne struct {
// contains filtered or unexported fields
}
VideoEmbedUpdateOne is the builder for updating a single VideoEmbed entity.
func (*VideoEmbedUpdateOne) AddHeight ¶
func (_u *VideoEmbedUpdateOne) AddHeight(v int) *VideoEmbedUpdateOne
AddHeight adds value to the "height" field.
func (*VideoEmbedUpdateOne) AddWidth ¶
func (_u *VideoEmbedUpdateOne) AddWidth(v int) *VideoEmbedUpdateOne
AddWidth adds value to the "width" field.
func (*VideoEmbedUpdateOne) Exec ¶
func (_u *VideoEmbedUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*VideoEmbedUpdateOne) ExecX ¶
func (_u *VideoEmbedUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideoEmbedUpdateOne) Mutation ¶
func (_u *VideoEmbedUpdateOne) Mutation() *VideoEmbedMutation
Mutation returns the VideoEmbedMutation object of the builder.
func (*VideoEmbedUpdateOne) Save ¶
func (_u *VideoEmbedUpdateOne) Save(ctx context.Context) (*VideoEmbed, error)
Save executes the query and returns the updated VideoEmbed entity.
func (*VideoEmbedUpdateOne) SaveX ¶
func (_u *VideoEmbedUpdateOne) SaveX(ctx context.Context) *VideoEmbed
SaveX is like Save, but panics if an error occurs.
func (*VideoEmbedUpdateOne) Select ¶
func (_u *VideoEmbedUpdateOne) Select(field string, fields ...string) *VideoEmbedUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*VideoEmbedUpdateOne) SetFetchedAt ¶
func (_u *VideoEmbedUpdateOne) SetFetchedAt(v time.Time) *VideoEmbedUpdateOne
SetFetchedAt sets the "fetched_at" field.
func (*VideoEmbedUpdateOne) SetHeight ¶
func (_u *VideoEmbedUpdateOne) SetHeight(v int) *VideoEmbedUpdateOne
SetHeight sets the "height" field.
func (*VideoEmbedUpdateOne) SetNillableFetchedAt ¶
func (_u *VideoEmbedUpdateOne) SetNillableFetchedAt(v *time.Time) *VideoEmbedUpdateOne
SetNillableFetchedAt sets the "fetched_at" field if the given value is not nil.
func (*VideoEmbedUpdateOne) SetNillableHeight ¶
func (_u *VideoEmbedUpdateOne) SetNillableHeight(v *int) *VideoEmbedUpdateOne
SetNillableHeight sets the "height" field if the given value is not nil.
func (*VideoEmbedUpdateOne) SetNillableProvider ¶
func (_u *VideoEmbedUpdateOne) SetNillableProvider(v *string) *VideoEmbedUpdateOne
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*VideoEmbedUpdateOne) SetNillableStatus ¶
func (_u *VideoEmbedUpdateOne) SetNillableStatus(v *string) *VideoEmbedUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*VideoEmbedUpdateOne) SetNillableThumbnailFile ¶
func (_u *VideoEmbedUpdateOne) SetNillableThumbnailFile(v *string) *VideoEmbedUpdateOne
SetNillableThumbnailFile sets the "thumbnail_file" field if the given value is not nil.
func (*VideoEmbedUpdateOne) SetNillableThumbnailURL ¶
func (_u *VideoEmbedUpdateOne) SetNillableThumbnailURL(v *string) *VideoEmbedUpdateOne
SetNillableThumbnailURL sets the "thumbnail_url" field if the given value is not nil.
func (*VideoEmbedUpdateOne) SetNillableTitle ¶
func (_u *VideoEmbedUpdateOne) SetNillableTitle(v *string) *VideoEmbedUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*VideoEmbedUpdateOne) SetNillableURL ¶
func (_u *VideoEmbedUpdateOne) SetNillableURL(v *string) *VideoEmbedUpdateOne
SetNillableURL sets the "url" field if the given value is not nil.
func (*VideoEmbedUpdateOne) SetNillableURLHash ¶
func (_u *VideoEmbedUpdateOne) SetNillableURLHash(v *string) *VideoEmbedUpdateOne
SetNillableURLHash sets the "url_hash" field if the given value is not nil.
func (*VideoEmbedUpdateOne) SetNillableWidth ¶
func (_u *VideoEmbedUpdateOne) SetNillableWidth(v *int) *VideoEmbedUpdateOne
SetNillableWidth sets the "width" field if the given value is not nil.
func (*VideoEmbedUpdateOne) SetProvider ¶
func (_u *VideoEmbedUpdateOne) SetProvider(v string) *VideoEmbedUpdateOne
SetProvider sets the "provider" field.
func (*VideoEmbedUpdateOne) SetStatus ¶
func (_u *VideoEmbedUpdateOne) SetStatus(v string) *VideoEmbedUpdateOne
SetStatus sets the "status" field.
func (*VideoEmbedUpdateOne) SetThumbnailFile ¶
func (_u *VideoEmbedUpdateOne) SetThumbnailFile(v string) *VideoEmbedUpdateOne
SetThumbnailFile sets the "thumbnail_file" field.
func (*VideoEmbedUpdateOne) SetThumbnailURL ¶
func (_u *VideoEmbedUpdateOne) SetThumbnailURL(v string) *VideoEmbedUpdateOne
SetThumbnailURL sets the "thumbnail_url" field.
func (*VideoEmbedUpdateOne) SetTitle ¶
func (_u *VideoEmbedUpdateOne) SetTitle(v string) *VideoEmbedUpdateOne
SetTitle sets the "title" field.
func (*VideoEmbedUpdateOne) SetURL ¶
func (_u *VideoEmbedUpdateOne) SetURL(v string) *VideoEmbedUpdateOne
SetURL sets the "url" field.
func (*VideoEmbedUpdateOne) SetURLHash ¶
func (_u *VideoEmbedUpdateOne) SetURLHash(v string) *VideoEmbedUpdateOne
SetURLHash sets the "url_hash" field.
func (*VideoEmbedUpdateOne) SetWidth ¶
func (_u *VideoEmbedUpdateOne) SetWidth(v int) *VideoEmbedUpdateOne
SetWidth sets the "width" field.
func (*VideoEmbedUpdateOne) Where ¶
func (_u *VideoEmbedUpdateOne) Where(ps ...predicate.VideoEmbed) *VideoEmbedUpdateOne
Where appends a list predicates to the VideoEmbedUpdate builder.