Documentation ¶
Index ¶
- Constants
- 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 Guild
- func (gu *Guild) QueryAdmins() *UserQuery
- func (gu *Guild) QueryMembers() *UserQuery
- func (gu *Guild) QueryRoles() *GuildRoleQuery
- func (gu *Guild) QueryYoutubeTalents() *YouTubeTalentQuery
- func (gu *Guild) String() string
- func (gu *Guild) Unwrap() *Guild
- func (gu *Guild) Update() *GuildUpdateOne
- func (gu *Guild) Value(name string) (ent.Value, error)
- type GuildClient
- func (c *GuildClient) Create() *GuildCreate
- func (c *GuildClient) CreateBulk(builders ...*GuildCreate) *GuildCreateBulk
- func (c *GuildClient) Delete() *GuildDelete
- func (c *GuildClient) DeleteOne(gu *Guild) *GuildDeleteOne
- func (c *GuildClient) DeleteOneID(id uint64) *GuildDeleteOne
- func (c *GuildClient) Get(ctx context.Context, id uint64) (*Guild, error)
- func (c *GuildClient) GetX(ctx context.Context, id uint64) *Guild
- func (c *GuildClient) Hooks() []Hook
- func (c *GuildClient) Intercept(interceptors ...Interceptor)
- func (c *GuildClient) Interceptors() []Interceptor
- func (c *GuildClient) Query() *GuildQuery
- func (c *GuildClient) QueryAdmins(gu *Guild) *UserQuery
- func (c *GuildClient) QueryMembers(gu *Guild) *UserQuery
- func (c *GuildClient) QueryRoles(gu *Guild) *GuildRoleQuery
- func (c *GuildClient) QueryYoutubeTalents(gu *Guild) *YouTubeTalentQuery
- func (c *GuildClient) Update() *GuildUpdate
- func (c *GuildClient) UpdateOne(gu *Guild) *GuildUpdateOne
- func (c *GuildClient) UpdateOneID(id uint64) *GuildUpdateOne
- func (c *GuildClient) Use(hooks ...Hook)
- type GuildCreate
- func (gc *GuildCreate) AddAdminIDs(ids ...uint64) *GuildCreate
- func (gc *GuildCreate) AddAdmins(u ...*User) *GuildCreate
- func (gc *GuildCreate) AddMemberIDs(ids ...uint64) *GuildCreate
- func (gc *GuildCreate) AddMembers(u ...*User) *GuildCreate
- func (gc *GuildCreate) AddRoleIDs(ids ...uint64) *GuildCreate
- func (gc *GuildCreate) AddRoles(g ...*GuildRole) *GuildCreate
- func (gc *GuildCreate) AddYoutubeTalentIDs(ids ...string) *GuildCreate
- func (gc *GuildCreate) AddYoutubeTalents(y ...*YouTubeTalent) *GuildCreate
- func (gc *GuildCreate) Exec(ctx context.Context) error
- func (gc *GuildCreate) ExecX(ctx context.Context)
- func (gc *GuildCreate) Mutation() *GuildMutation
- func (gc *GuildCreate) OnConflict(opts ...sql.ConflictOption) *GuildUpsertOne
- func (gc *GuildCreate) OnConflictColumns(columns ...string) *GuildUpsertOne
- func (gc *GuildCreate) Save(ctx context.Context) (*Guild, error)
- func (gc *GuildCreate) SaveX(ctx context.Context) *Guild
- func (gc *GuildCreate) SetAdminSnowflakes(u []uint64) *GuildCreate
- func (gc *GuildCreate) SetAuditChannel(u uint64) *GuildCreate
- func (gc *GuildCreate) SetID(u uint64) *GuildCreate
- func (gc *GuildCreate) SetIconHash(s string) *GuildCreate
- func (gc *GuildCreate) SetLanguage(gu guild.Language) *GuildCreate
- func (gc *GuildCreate) SetModeratorSnowflakes(u []uint64) *GuildCreate
- func (gc *GuildCreate) SetName(s string) *GuildCreate
- func (gc *GuildCreate) SetNillableAuditChannel(u *uint64) *GuildCreate
- func (gc *GuildCreate) SetNillableIconHash(s *string) *GuildCreate
- func (gc *GuildCreate) SetNillableLanguage(gu *guild.Language) *GuildCreate
- func (gc *GuildCreate) SetSettings(ss *schema.GuildSettings) *GuildCreate
- type GuildCreateBulk
- func (gcb *GuildCreateBulk) Exec(ctx context.Context) error
- func (gcb *GuildCreateBulk) ExecX(ctx context.Context)
- func (gcb *GuildCreateBulk) OnConflict(opts ...sql.ConflictOption) *GuildUpsertBulk
- func (gcb *GuildCreateBulk) OnConflictColumns(columns ...string) *GuildUpsertBulk
- func (gcb *GuildCreateBulk) Save(ctx context.Context) ([]*Guild, error)
- func (gcb *GuildCreateBulk) SaveX(ctx context.Context) []*Guild
- type GuildDelete
- type GuildDeleteOne
- type GuildEdges
- type GuildGroupBy
- func (ggb *GuildGroupBy) Aggregate(fns ...AggregateFunc) *GuildGroupBy
- func (s *GuildGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GuildGroupBy) BoolX(ctx context.Context) bool
- func (s *GuildGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GuildGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GuildGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GuildGroupBy) Float64X(ctx context.Context) float64
- func (s *GuildGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GuildGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GuildGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GuildGroupBy) IntX(ctx context.Context) int
- func (s *GuildGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GuildGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GuildGroupBy) Scan(ctx context.Context, v any) error
- func (s *GuildGroupBy) ScanX(ctx context.Context, v any)
- func (s *GuildGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GuildGroupBy) StringX(ctx context.Context) string
- func (s *GuildGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GuildGroupBy) StringsX(ctx context.Context) []string
- type GuildMutation
- func (m *GuildMutation) AddAdminIDs(ids ...uint64)
- func (m *GuildMutation) AddAuditChannel(u int64)
- func (m *GuildMutation) AddField(name string, value ent.Value) error
- func (m *GuildMutation) AddMemberIDs(ids ...uint64)
- func (m *GuildMutation) AddRoleIDs(ids ...uint64)
- func (m *GuildMutation) AddYoutubeTalentIDs(ids ...string)
- func (m *GuildMutation) AddedAuditChannel() (r int64, exists bool)
- func (m *GuildMutation) AddedEdges() []string
- func (m *GuildMutation) AddedField(name string) (ent.Value, bool)
- func (m *GuildMutation) AddedFields() []string
- func (m *GuildMutation) AddedIDs(name string) []ent.Value
- func (m *GuildMutation) AdminSnowflakes() (r []uint64, exists bool)
- func (m *GuildMutation) AdminsCleared() bool
- func (m *GuildMutation) AdminsIDs() (ids []uint64)
- func (m *GuildMutation) AppendAdminSnowflakes(u []uint64)
- func (m *GuildMutation) AppendModeratorSnowflakes(u []uint64)
- func (m *GuildMutation) AppendedAdminSnowflakes() ([]uint64, bool)
- func (m *GuildMutation) AppendedModeratorSnowflakes() ([]uint64, bool)
- func (m *GuildMutation) AuditChannel() (r uint64, exists bool)
- func (m *GuildMutation) AuditChannelCleared() bool
- func (m *GuildMutation) ClearAdmins()
- func (m *GuildMutation) ClearAuditChannel()
- func (m *GuildMutation) ClearEdge(name string) error
- func (m *GuildMutation) ClearField(name string) error
- func (m *GuildMutation) ClearIconHash()
- func (m *GuildMutation) ClearMembers()
- func (m *GuildMutation) ClearModeratorSnowflakes()
- func (m *GuildMutation) ClearRoles()
- func (m *GuildMutation) ClearSettings()
- func (m *GuildMutation) ClearYoutubeTalents()
- func (m *GuildMutation) ClearedEdges() []string
- func (m *GuildMutation) ClearedFields() []string
- func (m GuildMutation) Client() *Client
- func (m *GuildMutation) EdgeCleared(name string) bool
- func (m *GuildMutation) Field(name string) (ent.Value, bool)
- func (m *GuildMutation) FieldCleared(name string) bool
- func (m *GuildMutation) Fields() []string
- func (m *GuildMutation) ID() (id uint64, exists bool)
- func (m *GuildMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *GuildMutation) IconHash() (r string, exists bool)
- func (m *GuildMutation) IconHashCleared() bool
- func (m *GuildMutation) Language() (r guild.Language, exists bool)
- func (m *GuildMutation) MembersCleared() bool
- func (m *GuildMutation) MembersIDs() (ids []uint64)
- func (m *GuildMutation) ModeratorSnowflakes() (r []uint64, exists bool)
- func (m *GuildMutation) ModeratorSnowflakesCleared() bool
- func (m *GuildMutation) Name() (r string, exists bool)
- func (m *GuildMutation) OldAdminSnowflakes(ctx context.Context) (v []uint64, err error)
- func (m *GuildMutation) OldAuditChannel(ctx context.Context) (v uint64, err error)
- func (m *GuildMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GuildMutation) OldIconHash(ctx context.Context) (v string, err error)
- func (m *GuildMutation) OldLanguage(ctx context.Context) (v guild.Language, err error)
- func (m *GuildMutation) OldModeratorSnowflakes(ctx context.Context) (v []uint64, err error)
- func (m *GuildMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GuildMutation) OldSettings(ctx context.Context) (v *schema.GuildSettings, err error)
- func (m *GuildMutation) Op() Op
- func (m *GuildMutation) RemoveAdminIDs(ids ...uint64)
- func (m *GuildMutation) RemoveMemberIDs(ids ...uint64)
- func (m *GuildMutation) RemoveRoleIDs(ids ...uint64)
- func (m *GuildMutation) RemoveYoutubeTalentIDs(ids ...string)
- func (m *GuildMutation) RemovedAdminsIDs() (ids []uint64)
- func (m *GuildMutation) RemovedEdges() []string
- func (m *GuildMutation) RemovedIDs(name string) []ent.Value
- func (m *GuildMutation) RemovedMembersIDs() (ids []uint64)
- func (m *GuildMutation) RemovedRolesIDs() (ids []uint64)
- func (m *GuildMutation) RemovedYoutubeTalentsIDs() (ids []string)
- func (m *GuildMutation) ResetAdminSnowflakes()
- func (m *GuildMutation) ResetAdmins()
- func (m *GuildMutation) ResetAuditChannel()
- func (m *GuildMutation) ResetEdge(name string) error
- func (m *GuildMutation) ResetField(name string) error
- func (m *GuildMutation) ResetIconHash()
- func (m *GuildMutation) ResetLanguage()
- func (m *GuildMutation) ResetMembers()
- func (m *GuildMutation) ResetModeratorSnowflakes()
- func (m *GuildMutation) ResetName()
- func (m *GuildMutation) ResetRoles()
- func (m *GuildMutation) ResetSettings()
- func (m *GuildMutation) ResetYoutubeTalents()
- func (m *GuildMutation) RolesCleared() bool
- func (m *GuildMutation) RolesIDs() (ids []uint64)
- func (m *GuildMutation) SetAdminSnowflakes(u []uint64)
- func (m *GuildMutation) SetAuditChannel(u uint64)
- func (m *GuildMutation) SetField(name string, value ent.Value) error
- func (m *GuildMutation) SetID(id uint64)
- func (m *GuildMutation) SetIconHash(s string)
- func (m *GuildMutation) SetLanguage(gu guild.Language)
- func (m *GuildMutation) SetModeratorSnowflakes(u []uint64)
- func (m *GuildMutation) SetName(s string)
- func (m *GuildMutation) SetOp(op Op)
- func (m *GuildMutation) SetSettings(ss *schema.GuildSettings)
- func (m *GuildMutation) Settings() (r *schema.GuildSettings, exists bool)
- func (m *GuildMutation) SettingsCleared() bool
- func (m GuildMutation) Tx() (*Tx, error)
- func (m *GuildMutation) Type() string
- func (m *GuildMutation) Where(ps ...predicate.Guild)
- func (m *GuildMutation) WhereP(ps ...func(*sql.Selector))
- func (m *GuildMutation) YoutubeTalentsCleared() bool
- func (m *GuildMutation) YoutubeTalentsIDs() (ids []string)
- type GuildQuery
- func (gq *GuildQuery) Aggregate(fns ...AggregateFunc) *GuildSelect
- func (gq *GuildQuery) All(ctx context.Context) ([]*Guild, error)
- func (gq *GuildQuery) AllX(ctx context.Context) []*Guild
- func (gq *GuildQuery) Clone() *GuildQuery
- func (gq *GuildQuery) Count(ctx context.Context) (int, error)
- func (gq *GuildQuery) CountX(ctx context.Context) int
- func (gq *GuildQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GuildQuery) ExistX(ctx context.Context) bool
- func (gq *GuildQuery) First(ctx context.Context) (*Guild, error)
- func (gq *GuildQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (gq *GuildQuery) FirstIDX(ctx context.Context) uint64
- func (gq *GuildQuery) FirstX(ctx context.Context) *Guild
- func (gq *GuildQuery) ForShare(opts ...sql.LockOption) *GuildQuery
- func (gq *GuildQuery) ForUpdate(opts ...sql.LockOption) *GuildQuery
- func (gq *GuildQuery) GroupBy(field string, fields ...string) *GuildGroupBy
- func (gq *GuildQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (gq *GuildQuery) IDsX(ctx context.Context) []uint64
- func (gq *GuildQuery) Limit(limit int) *GuildQuery
- func (gq *GuildQuery) Offset(offset int) *GuildQuery
- func (gq *GuildQuery) Only(ctx context.Context) (*Guild, error)
- func (gq *GuildQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (gq *GuildQuery) OnlyIDX(ctx context.Context) uint64
- func (gq *GuildQuery) OnlyX(ctx context.Context) *Guild
- func (gq *GuildQuery) Order(o ...guild.OrderOption) *GuildQuery
- func (gq *GuildQuery) QueryAdmins() *UserQuery
- func (gq *GuildQuery) QueryMembers() *UserQuery
- func (gq *GuildQuery) QueryRoles() *GuildRoleQuery
- func (gq *GuildQuery) QueryYoutubeTalents() *YouTubeTalentQuery
- func (gq *GuildQuery) Select(fields ...string) *GuildSelect
- func (gq *GuildQuery) Unique(unique bool) *GuildQuery
- func (gq *GuildQuery) Where(ps ...predicate.Guild) *GuildQuery
- func (gq *GuildQuery) WithAdmins(opts ...func(*UserQuery)) *GuildQuery
- func (gq *GuildQuery) WithMembers(opts ...func(*UserQuery)) *GuildQuery
- func (gq *GuildQuery) WithRoles(opts ...func(*GuildRoleQuery)) *GuildQuery
- func (gq *GuildQuery) WithYoutubeTalents(opts ...func(*YouTubeTalentQuery)) *GuildQuery
- type GuildRole
- func (gr *GuildRole) QueryGuild() *GuildQuery
- func (gr *GuildRole) QueryTalent() *YouTubeTalentQuery
- func (gr *GuildRole) QueryUserMemberships() *UserMembershipQuery
- func (gr *GuildRole) String() string
- func (gr *GuildRole) Unwrap() *GuildRole
- func (gr *GuildRole) Update() *GuildRoleUpdateOne
- func (gr *GuildRole) Value(name string) (ent.Value, error)
- type GuildRoleClient
- func (c *GuildRoleClient) Create() *GuildRoleCreate
- func (c *GuildRoleClient) CreateBulk(builders ...*GuildRoleCreate) *GuildRoleCreateBulk
- func (c *GuildRoleClient) Delete() *GuildRoleDelete
- func (c *GuildRoleClient) DeleteOne(gr *GuildRole) *GuildRoleDeleteOne
- func (c *GuildRoleClient) DeleteOneID(id uint64) *GuildRoleDeleteOne
- func (c *GuildRoleClient) Get(ctx context.Context, id uint64) (*GuildRole, error)
- func (c *GuildRoleClient) GetX(ctx context.Context, id uint64) *GuildRole
- func (c *GuildRoleClient) Hooks() []Hook
- func (c *GuildRoleClient) Intercept(interceptors ...Interceptor)
- func (c *GuildRoleClient) Interceptors() []Interceptor
- func (c *GuildRoleClient) Query() *GuildRoleQuery
- func (c *GuildRoleClient) QueryGuild(gr *GuildRole) *GuildQuery
- func (c *GuildRoleClient) QueryTalent(gr *GuildRole) *YouTubeTalentQuery
- func (c *GuildRoleClient) QueryUserMemberships(gr *GuildRole) *UserMembershipQuery
- func (c *GuildRoleClient) Update() *GuildRoleUpdate
- func (c *GuildRoleClient) UpdateOne(gr *GuildRole) *GuildRoleUpdateOne
- func (c *GuildRoleClient) UpdateOneID(id uint64) *GuildRoleUpdateOne
- func (c *GuildRoleClient) Use(hooks ...Hook)
- type GuildRoleCreate
- func (grc *GuildRoleCreate) AddUserMembershipIDs(ids ...int) *GuildRoleCreate
- func (grc *GuildRoleCreate) AddUserMemberships(u ...*UserMembership) *GuildRoleCreate
- func (grc *GuildRoleCreate) Exec(ctx context.Context) error
- func (grc *GuildRoleCreate) ExecX(ctx context.Context)
- func (grc *GuildRoleCreate) Mutation() *GuildRoleMutation
- func (grc *GuildRoleCreate) OnConflict(opts ...sql.ConflictOption) *GuildRoleUpsertOne
- func (grc *GuildRoleCreate) OnConflictColumns(columns ...string) *GuildRoleUpsertOne
- func (grc *GuildRoleCreate) Save(ctx context.Context) (*GuildRole, error)
- func (grc *GuildRoleCreate) SaveX(ctx context.Context) *GuildRole
- func (grc *GuildRoleCreate) SetGuild(g *Guild) *GuildRoleCreate
- func (grc *GuildRoleCreate) SetGuildID(id uint64) *GuildRoleCreate
- func (grc *GuildRoleCreate) SetID(u uint64) *GuildRoleCreate
- func (grc *GuildRoleCreate) SetLastUpdated(t time.Time) *GuildRoleCreate
- func (grc *GuildRoleCreate) SetName(s string) *GuildRoleCreate
- func (grc *GuildRoleCreate) SetNillableLastUpdated(t *time.Time) *GuildRoleCreate
- func (grc *GuildRoleCreate) SetNillableTalentID(id *string) *GuildRoleCreate
- func (grc *GuildRoleCreate) SetTalent(y *YouTubeTalent) *GuildRoleCreate
- func (grc *GuildRoleCreate) SetTalentID(id string) *GuildRoleCreate
- type GuildRoleCreateBulk
- func (grcb *GuildRoleCreateBulk) Exec(ctx context.Context) error
- func (grcb *GuildRoleCreateBulk) ExecX(ctx context.Context)
- func (grcb *GuildRoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *GuildRoleUpsertBulk
- func (grcb *GuildRoleCreateBulk) OnConflictColumns(columns ...string) *GuildRoleUpsertBulk
- func (grcb *GuildRoleCreateBulk) Save(ctx context.Context) ([]*GuildRole, error)
- func (grcb *GuildRoleCreateBulk) SaveX(ctx context.Context) []*GuildRole
- type GuildRoleDelete
- type GuildRoleDeleteOne
- type GuildRoleEdges
- type GuildRoleGroupBy
- func (grgb *GuildRoleGroupBy) Aggregate(fns ...AggregateFunc) *GuildRoleGroupBy
- func (s *GuildRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GuildRoleGroupBy) BoolX(ctx context.Context) bool
- func (s *GuildRoleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GuildRoleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GuildRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GuildRoleGroupBy) Float64X(ctx context.Context) float64
- func (s *GuildRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GuildRoleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GuildRoleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GuildRoleGroupBy) IntX(ctx context.Context) int
- func (s *GuildRoleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GuildRoleGroupBy) IntsX(ctx context.Context) []int
- func (grgb *GuildRoleGroupBy) Scan(ctx context.Context, v any) error
- func (s *GuildRoleGroupBy) ScanX(ctx context.Context, v any)
- func (s *GuildRoleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GuildRoleGroupBy) StringX(ctx context.Context) string
- func (s *GuildRoleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GuildRoleGroupBy) StringsX(ctx context.Context) []string
- type GuildRoleMutation
- func (m *GuildRoleMutation) AddField(name string, value ent.Value) error
- func (m *GuildRoleMutation) AddUserMembershipIDs(ids ...int)
- func (m *GuildRoleMutation) AddedEdges() []string
- func (m *GuildRoleMutation) AddedField(name string) (ent.Value, bool)
- func (m *GuildRoleMutation) AddedFields() []string
- func (m *GuildRoleMutation) AddedIDs(name string) []ent.Value
- func (m *GuildRoleMutation) ClearEdge(name string) error
- func (m *GuildRoleMutation) ClearField(name string) error
- func (m *GuildRoleMutation) ClearGuild()
- func (m *GuildRoleMutation) ClearTalent()
- func (m *GuildRoleMutation) ClearUserMemberships()
- func (m *GuildRoleMutation) ClearedEdges() []string
- func (m *GuildRoleMutation) ClearedFields() []string
- func (m GuildRoleMutation) Client() *Client
- func (m *GuildRoleMutation) EdgeCleared(name string) bool
- func (m *GuildRoleMutation) Field(name string) (ent.Value, bool)
- func (m *GuildRoleMutation) FieldCleared(name string) bool
- func (m *GuildRoleMutation) Fields() []string
- func (m *GuildRoleMutation) GuildCleared() bool
- func (m *GuildRoleMutation) GuildID() (id uint64, exists bool)
- func (m *GuildRoleMutation) GuildIDs() (ids []uint64)
- func (m *GuildRoleMutation) ID() (id uint64, exists bool)
- func (m *GuildRoleMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *GuildRoleMutation) LastUpdated() (r time.Time, exists bool)
- func (m *GuildRoleMutation) Name() (r string, exists bool)
- func (m *GuildRoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GuildRoleMutation) OldLastUpdated(ctx context.Context) (v time.Time, err error)
- func (m *GuildRoleMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GuildRoleMutation) Op() Op
- func (m *GuildRoleMutation) RemoveUserMembershipIDs(ids ...int)
- func (m *GuildRoleMutation) RemovedEdges() []string
- func (m *GuildRoleMutation) RemovedIDs(name string) []ent.Value
- func (m *GuildRoleMutation) RemovedUserMembershipsIDs() (ids []int)
- func (m *GuildRoleMutation) ResetEdge(name string) error
- func (m *GuildRoleMutation) ResetField(name string) error
- func (m *GuildRoleMutation) ResetGuild()
- func (m *GuildRoleMutation) ResetLastUpdated()
- func (m *GuildRoleMutation) ResetName()
- func (m *GuildRoleMutation) ResetTalent()
- func (m *GuildRoleMutation) ResetUserMemberships()
- func (m *GuildRoleMutation) SetField(name string, value ent.Value) error
- func (m *GuildRoleMutation) SetGuildID(id uint64)
- func (m *GuildRoleMutation) SetID(id uint64)
- func (m *GuildRoleMutation) SetLastUpdated(t time.Time)
- func (m *GuildRoleMutation) SetName(s string)
- func (m *GuildRoleMutation) SetOp(op Op)
- func (m *GuildRoleMutation) SetTalentID(id string)
- func (m *GuildRoleMutation) TalentCleared() bool
- func (m *GuildRoleMutation) TalentID() (id string, exists bool)
- func (m *GuildRoleMutation) TalentIDs() (ids []string)
- func (m GuildRoleMutation) Tx() (*Tx, error)
- func (m *GuildRoleMutation) Type() string
- func (m *GuildRoleMutation) UserMembershipsCleared() bool
- func (m *GuildRoleMutation) UserMembershipsIDs() (ids []int)
- func (m *GuildRoleMutation) Where(ps ...predicate.GuildRole)
- func (m *GuildRoleMutation) WhereP(ps ...func(*sql.Selector))
- type GuildRoleQuery
- func (grq *GuildRoleQuery) Aggregate(fns ...AggregateFunc) *GuildRoleSelect
- func (grq *GuildRoleQuery) All(ctx context.Context) ([]*GuildRole, error)
- func (grq *GuildRoleQuery) AllX(ctx context.Context) []*GuildRole
- func (grq *GuildRoleQuery) Clone() *GuildRoleQuery
- func (grq *GuildRoleQuery) Count(ctx context.Context) (int, error)
- func (grq *GuildRoleQuery) CountX(ctx context.Context) int
- func (grq *GuildRoleQuery) Exist(ctx context.Context) (bool, error)
- func (grq *GuildRoleQuery) ExistX(ctx context.Context) bool
- func (grq *GuildRoleQuery) First(ctx context.Context) (*GuildRole, error)
- func (grq *GuildRoleQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (grq *GuildRoleQuery) FirstIDX(ctx context.Context) uint64
- func (grq *GuildRoleQuery) FirstX(ctx context.Context) *GuildRole
- func (grq *GuildRoleQuery) ForShare(opts ...sql.LockOption) *GuildRoleQuery
- func (grq *GuildRoleQuery) ForUpdate(opts ...sql.LockOption) *GuildRoleQuery
- func (grq *GuildRoleQuery) GroupBy(field string, fields ...string) *GuildRoleGroupBy
- func (grq *GuildRoleQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (grq *GuildRoleQuery) IDsX(ctx context.Context) []uint64
- func (grq *GuildRoleQuery) Limit(limit int) *GuildRoleQuery
- func (grq *GuildRoleQuery) Offset(offset int) *GuildRoleQuery
- func (grq *GuildRoleQuery) Only(ctx context.Context) (*GuildRole, error)
- func (grq *GuildRoleQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (grq *GuildRoleQuery) OnlyIDX(ctx context.Context) uint64
- func (grq *GuildRoleQuery) OnlyX(ctx context.Context) *GuildRole
- func (grq *GuildRoleQuery) Order(o ...guildrole.OrderOption) *GuildRoleQuery
- func (grq *GuildRoleQuery) QueryGuild() *GuildQuery
- func (grq *GuildRoleQuery) QueryTalent() *YouTubeTalentQuery
- func (grq *GuildRoleQuery) QueryUserMemberships() *UserMembershipQuery
- func (grq *GuildRoleQuery) Select(fields ...string) *GuildRoleSelect
- func (grq *GuildRoleQuery) Unique(unique bool) *GuildRoleQuery
- func (grq *GuildRoleQuery) Where(ps ...predicate.GuildRole) *GuildRoleQuery
- func (grq *GuildRoleQuery) WithGuild(opts ...func(*GuildQuery)) *GuildRoleQuery
- func (grq *GuildRoleQuery) WithTalent(opts ...func(*YouTubeTalentQuery)) *GuildRoleQuery
- func (grq *GuildRoleQuery) WithUserMemberships(opts ...func(*UserMembershipQuery)) *GuildRoleQuery
- type GuildRoleSelect
- func (grs *GuildRoleSelect) Aggregate(fns ...AggregateFunc) *GuildRoleSelect
- func (s *GuildRoleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GuildRoleSelect) BoolX(ctx context.Context) bool
- func (s *GuildRoleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GuildRoleSelect) BoolsX(ctx context.Context) []bool
- func (s *GuildRoleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GuildRoleSelect) Float64X(ctx context.Context) float64
- func (s *GuildRoleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GuildRoleSelect) Float64sX(ctx context.Context) []float64
- func (s *GuildRoleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GuildRoleSelect) IntX(ctx context.Context) int
- func (s *GuildRoleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GuildRoleSelect) IntsX(ctx context.Context) []int
- func (grs *GuildRoleSelect) Scan(ctx context.Context, v any) error
- func (s *GuildRoleSelect) ScanX(ctx context.Context, v any)
- func (s *GuildRoleSelect) String(ctx context.Context) (_ string, err error)
- func (s *GuildRoleSelect) StringX(ctx context.Context) string
- func (s *GuildRoleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GuildRoleSelect) StringsX(ctx context.Context) []string
- type GuildRoleUpdate
- func (gru *GuildRoleUpdate) AddUserMembershipIDs(ids ...int) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) AddUserMemberships(u ...*UserMembership) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) ClearGuild() *GuildRoleUpdate
- func (gru *GuildRoleUpdate) ClearTalent() *GuildRoleUpdate
- func (gru *GuildRoleUpdate) ClearUserMemberships() *GuildRoleUpdate
- func (gru *GuildRoleUpdate) Exec(ctx context.Context) error
- func (gru *GuildRoleUpdate) ExecX(ctx context.Context)
- func (gru *GuildRoleUpdate) Mutation() *GuildRoleMutation
- func (gru *GuildRoleUpdate) RemoveUserMembershipIDs(ids ...int) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) RemoveUserMemberships(u ...*UserMembership) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) Save(ctx context.Context) (int, error)
- func (gru *GuildRoleUpdate) SaveX(ctx context.Context) int
- func (gru *GuildRoleUpdate) SetGuild(g *Guild) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) SetGuildID(id uint64) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) SetLastUpdated(t time.Time) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) SetName(s string) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) SetNillableLastUpdated(t *time.Time) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) SetNillableTalentID(id *string) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) SetTalent(y *YouTubeTalent) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) SetTalentID(id string) *GuildRoleUpdate
- func (gru *GuildRoleUpdate) Where(ps ...predicate.GuildRole) *GuildRoleUpdate
- type GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) AddUserMembershipIDs(ids ...int) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) AddUserMemberships(u ...*UserMembership) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) ClearGuild() *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) ClearTalent() *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) ClearUserMemberships() *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) Exec(ctx context.Context) error
- func (gruo *GuildRoleUpdateOne) ExecX(ctx context.Context)
- func (gruo *GuildRoleUpdateOne) Mutation() *GuildRoleMutation
- func (gruo *GuildRoleUpdateOne) RemoveUserMembershipIDs(ids ...int) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) RemoveUserMemberships(u ...*UserMembership) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) Save(ctx context.Context) (*GuildRole, error)
- func (gruo *GuildRoleUpdateOne) SaveX(ctx context.Context) *GuildRole
- func (gruo *GuildRoleUpdateOne) Select(field string, fields ...string) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) SetGuild(g *Guild) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) SetGuildID(id uint64) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) SetLastUpdated(t time.Time) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) SetName(s string) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) SetNillableLastUpdated(t *time.Time) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) SetNillableTalentID(id *string) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) SetTalent(y *YouTubeTalent) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) SetTalentID(id string) *GuildRoleUpdateOne
- func (gruo *GuildRoleUpdateOne) Where(ps ...predicate.GuildRole) *GuildRoleUpdateOne
- type GuildRoleUpsert
- type GuildRoleUpsertBulk
- func (u *GuildRoleUpsertBulk) DoNothing() *GuildRoleUpsertBulk
- func (u *GuildRoleUpsertBulk) Exec(ctx context.Context) error
- func (u *GuildRoleUpsertBulk) ExecX(ctx context.Context)
- func (u *GuildRoleUpsertBulk) Ignore() *GuildRoleUpsertBulk
- func (u *GuildRoleUpsertBulk) SetLastUpdated(v time.Time) *GuildRoleUpsertBulk
- func (u *GuildRoleUpsertBulk) SetName(v string) *GuildRoleUpsertBulk
- func (u *GuildRoleUpsertBulk) Update(set func(*GuildRoleUpsert)) *GuildRoleUpsertBulk
- func (u *GuildRoleUpsertBulk) UpdateLastUpdated() *GuildRoleUpsertBulk
- func (u *GuildRoleUpsertBulk) UpdateName() *GuildRoleUpsertBulk
- func (u *GuildRoleUpsertBulk) UpdateNewValues() *GuildRoleUpsertBulk
- type GuildRoleUpsertOne
- func (u *GuildRoleUpsertOne) DoNothing() *GuildRoleUpsertOne
- func (u *GuildRoleUpsertOne) Exec(ctx context.Context) error
- func (u *GuildRoleUpsertOne) ExecX(ctx context.Context)
- func (u *GuildRoleUpsertOne) ID(ctx context.Context) (id uint64, err error)
- func (u *GuildRoleUpsertOne) IDX(ctx context.Context) uint64
- func (u *GuildRoleUpsertOne) Ignore() *GuildRoleUpsertOne
- func (u *GuildRoleUpsertOne) SetLastUpdated(v time.Time) *GuildRoleUpsertOne
- func (u *GuildRoleUpsertOne) SetName(v string) *GuildRoleUpsertOne
- func (u *GuildRoleUpsertOne) Update(set func(*GuildRoleUpsert)) *GuildRoleUpsertOne
- func (u *GuildRoleUpsertOne) UpdateLastUpdated() *GuildRoleUpsertOne
- func (u *GuildRoleUpsertOne) UpdateName() *GuildRoleUpsertOne
- func (u *GuildRoleUpsertOne) UpdateNewValues() *GuildRoleUpsertOne
- type GuildRoles
- type GuildSelect
- func (gs *GuildSelect) Aggregate(fns ...AggregateFunc) *GuildSelect
- func (s *GuildSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GuildSelect) BoolX(ctx context.Context) bool
- func (s *GuildSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GuildSelect) BoolsX(ctx context.Context) []bool
- func (s *GuildSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GuildSelect) Float64X(ctx context.Context) float64
- func (s *GuildSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GuildSelect) Float64sX(ctx context.Context) []float64
- func (s *GuildSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GuildSelect) IntX(ctx context.Context) int
- func (s *GuildSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GuildSelect) IntsX(ctx context.Context) []int
- func (gs *GuildSelect) Scan(ctx context.Context, v any) error
- func (s *GuildSelect) ScanX(ctx context.Context, v any)
- func (s *GuildSelect) String(ctx context.Context) (_ string, err error)
- func (s *GuildSelect) StringX(ctx context.Context) string
- func (s *GuildSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GuildSelect) StringsX(ctx context.Context) []string
- type GuildUpdate
- func (gu *GuildUpdate) AddAdminIDs(ids ...uint64) *GuildUpdate
- func (gu *GuildUpdate) AddAdmins(u ...*User) *GuildUpdate
- func (gu *GuildUpdate) AddAuditChannel(u int64) *GuildUpdate
- func (gu *GuildUpdate) AddMemberIDs(ids ...uint64) *GuildUpdate
- func (gu *GuildUpdate) AddMembers(u ...*User) *GuildUpdate
- func (gu *GuildUpdate) AddRoleIDs(ids ...uint64) *GuildUpdate
- func (gu *GuildUpdate) AddRoles(g ...*GuildRole) *GuildUpdate
- func (gu *GuildUpdate) AddYoutubeTalentIDs(ids ...string) *GuildUpdate
- func (gu *GuildUpdate) AddYoutubeTalents(y ...*YouTubeTalent) *GuildUpdate
- func (gu *GuildUpdate) AppendAdminSnowflakes(u []uint64) *GuildUpdate
- func (gu *GuildUpdate) AppendModeratorSnowflakes(u []uint64) *GuildUpdate
- func (gu *GuildUpdate) ClearAdmins() *GuildUpdate
- func (gu *GuildUpdate) ClearAuditChannel() *GuildUpdate
- func (gu *GuildUpdate) ClearIconHash() *GuildUpdate
- func (gu *GuildUpdate) ClearMembers() *GuildUpdate
- func (gu *GuildUpdate) ClearModeratorSnowflakes() *GuildUpdate
- func (gu *GuildUpdate) ClearRoles() *GuildUpdate
- func (gu *GuildUpdate) ClearSettings() *GuildUpdate
- func (gu *GuildUpdate) ClearYoutubeTalents() *GuildUpdate
- func (gu *GuildUpdate) Exec(ctx context.Context) error
- func (gu *GuildUpdate) ExecX(ctx context.Context)
- func (gu *GuildUpdate) Mutation() *GuildMutation
- func (gu *GuildUpdate) RemoveAdminIDs(ids ...uint64) *GuildUpdate
- func (gu *GuildUpdate) RemoveAdmins(u ...*User) *GuildUpdate
- func (gu *GuildUpdate) RemoveMemberIDs(ids ...uint64) *GuildUpdate
- func (gu *GuildUpdate) RemoveMembers(u ...*User) *GuildUpdate
- func (gu *GuildUpdate) RemoveRoleIDs(ids ...uint64) *GuildUpdate
- func (gu *GuildUpdate) RemoveRoles(g ...*GuildRole) *GuildUpdate
- func (gu *GuildUpdate) RemoveYoutubeTalentIDs(ids ...string) *GuildUpdate
- func (gu *GuildUpdate) RemoveYoutubeTalents(y ...*YouTubeTalent) *GuildUpdate
- func (gu *GuildUpdate) Save(ctx context.Context) (int, error)
- func (gu *GuildUpdate) SaveX(ctx context.Context) int
- func (gu *GuildUpdate) SetAdminSnowflakes(u []uint64) *GuildUpdate
- func (gu *GuildUpdate) SetAuditChannel(u uint64) *GuildUpdate
- func (gu *GuildUpdate) SetIconHash(s string) *GuildUpdate
- func (gu *GuildUpdate) SetLanguage(value guild.Language) *GuildUpdate
- func (gu *GuildUpdate) SetModeratorSnowflakes(u []uint64) *GuildUpdate
- func (gu *GuildUpdate) SetName(s string) *GuildUpdate
- func (gu *GuildUpdate) SetNillableAuditChannel(u *uint64) *GuildUpdate
- func (gu *GuildUpdate) SetNillableIconHash(s *string) *GuildUpdate
- func (gu *GuildUpdate) SetNillableLanguage(value *guild.Language) *GuildUpdate
- func (gu *GuildUpdate) SetSettings(ss *schema.GuildSettings) *GuildUpdate
- func (gu *GuildUpdate) Where(ps ...predicate.Guild) *GuildUpdate
- type GuildUpdateOne
- func (guo *GuildUpdateOne) AddAdminIDs(ids ...uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) AddAdmins(u ...*User) *GuildUpdateOne
- func (guo *GuildUpdateOne) AddAuditChannel(u int64) *GuildUpdateOne
- func (guo *GuildUpdateOne) AddMemberIDs(ids ...uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) AddMembers(u ...*User) *GuildUpdateOne
- func (guo *GuildUpdateOne) AddRoleIDs(ids ...uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) AddRoles(g ...*GuildRole) *GuildUpdateOne
- func (guo *GuildUpdateOne) AddYoutubeTalentIDs(ids ...string) *GuildUpdateOne
- func (guo *GuildUpdateOne) AddYoutubeTalents(y ...*YouTubeTalent) *GuildUpdateOne
- func (guo *GuildUpdateOne) AppendAdminSnowflakes(u []uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) AppendModeratorSnowflakes(u []uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) ClearAdmins() *GuildUpdateOne
- func (guo *GuildUpdateOne) ClearAuditChannel() *GuildUpdateOne
- func (guo *GuildUpdateOne) ClearIconHash() *GuildUpdateOne
- func (guo *GuildUpdateOne) ClearMembers() *GuildUpdateOne
- func (guo *GuildUpdateOne) ClearModeratorSnowflakes() *GuildUpdateOne
- func (guo *GuildUpdateOne) ClearRoles() *GuildUpdateOne
- func (guo *GuildUpdateOne) ClearSettings() *GuildUpdateOne
- func (guo *GuildUpdateOne) ClearYoutubeTalents() *GuildUpdateOne
- func (guo *GuildUpdateOne) Exec(ctx context.Context) error
- func (guo *GuildUpdateOne) ExecX(ctx context.Context)
- func (guo *GuildUpdateOne) Mutation() *GuildMutation
- func (guo *GuildUpdateOne) RemoveAdminIDs(ids ...uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) RemoveAdmins(u ...*User) *GuildUpdateOne
- func (guo *GuildUpdateOne) RemoveMemberIDs(ids ...uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) RemoveMembers(u ...*User) *GuildUpdateOne
- func (guo *GuildUpdateOne) RemoveRoleIDs(ids ...uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) RemoveRoles(g ...*GuildRole) *GuildUpdateOne
- func (guo *GuildUpdateOne) RemoveYoutubeTalentIDs(ids ...string) *GuildUpdateOne
- func (guo *GuildUpdateOne) RemoveYoutubeTalents(y ...*YouTubeTalent) *GuildUpdateOne
- func (guo *GuildUpdateOne) Save(ctx context.Context) (*Guild, error)
- func (guo *GuildUpdateOne) SaveX(ctx context.Context) *Guild
- func (guo *GuildUpdateOne) Select(field string, fields ...string) *GuildUpdateOne
- func (guo *GuildUpdateOne) SetAdminSnowflakes(u []uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) SetAuditChannel(u uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) SetIconHash(s string) *GuildUpdateOne
- func (guo *GuildUpdateOne) SetLanguage(gu guild.Language) *GuildUpdateOne
- func (guo *GuildUpdateOne) SetModeratorSnowflakes(u []uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) SetName(s string) *GuildUpdateOne
- func (guo *GuildUpdateOne) SetNillableAuditChannel(u *uint64) *GuildUpdateOne
- func (guo *GuildUpdateOne) SetNillableIconHash(s *string) *GuildUpdateOne
- func (guo *GuildUpdateOne) SetNillableLanguage(gu *guild.Language) *GuildUpdateOne
- func (guo *GuildUpdateOne) SetSettings(ss *schema.GuildSettings) *GuildUpdateOne
- func (guo *GuildUpdateOne) Where(ps ...predicate.Guild) *GuildUpdateOne
- type GuildUpsert
- func (u *GuildUpsert) AddAuditChannel(v uint64) *GuildUpsert
- func (u *GuildUpsert) ClearAuditChannel() *GuildUpsert
- func (u *GuildUpsert) ClearIconHash() *GuildUpsert
- func (u *GuildUpsert) ClearModeratorSnowflakes() *GuildUpsert
- func (u *GuildUpsert) ClearSettings() *GuildUpsert
- func (u *GuildUpsert) SetAdminSnowflakes(v []uint64) *GuildUpsert
- func (u *GuildUpsert) SetAuditChannel(v uint64) *GuildUpsert
- func (u *GuildUpsert) SetIconHash(v string) *GuildUpsert
- func (u *GuildUpsert) SetLanguage(v guild.Language) *GuildUpsert
- func (u *GuildUpsert) SetModeratorSnowflakes(v []uint64) *GuildUpsert
- func (u *GuildUpsert) SetName(v string) *GuildUpsert
- func (u *GuildUpsert) SetSettings(v *schema.GuildSettings) *GuildUpsert
- func (u *GuildUpsert) UpdateAdminSnowflakes() *GuildUpsert
- func (u *GuildUpsert) UpdateAuditChannel() *GuildUpsert
- func (u *GuildUpsert) UpdateIconHash() *GuildUpsert
- func (u *GuildUpsert) UpdateLanguage() *GuildUpsert
- func (u *GuildUpsert) UpdateModeratorSnowflakes() *GuildUpsert
- func (u *GuildUpsert) UpdateName() *GuildUpsert
- func (u *GuildUpsert) UpdateSettings() *GuildUpsert
- type GuildUpsertBulk
- func (u *GuildUpsertBulk) AddAuditChannel(v uint64) *GuildUpsertBulk
- func (u *GuildUpsertBulk) ClearAuditChannel() *GuildUpsertBulk
- func (u *GuildUpsertBulk) ClearIconHash() *GuildUpsertBulk
- func (u *GuildUpsertBulk) ClearModeratorSnowflakes() *GuildUpsertBulk
- func (u *GuildUpsertBulk) ClearSettings() *GuildUpsertBulk
- func (u *GuildUpsertBulk) DoNothing() *GuildUpsertBulk
- func (u *GuildUpsertBulk) Exec(ctx context.Context) error
- func (u *GuildUpsertBulk) ExecX(ctx context.Context)
- func (u *GuildUpsertBulk) Ignore() *GuildUpsertBulk
- func (u *GuildUpsertBulk) SetAdminSnowflakes(v []uint64) *GuildUpsertBulk
- func (u *GuildUpsertBulk) SetAuditChannel(v uint64) *GuildUpsertBulk
- func (u *GuildUpsertBulk) SetIconHash(v string) *GuildUpsertBulk
- func (u *GuildUpsertBulk) SetLanguage(v guild.Language) *GuildUpsertBulk
- func (u *GuildUpsertBulk) SetModeratorSnowflakes(v []uint64) *GuildUpsertBulk
- func (u *GuildUpsertBulk) SetName(v string) *GuildUpsertBulk
- func (u *GuildUpsertBulk) SetSettings(v *schema.GuildSettings) *GuildUpsertBulk
- func (u *GuildUpsertBulk) Update(set func(*GuildUpsert)) *GuildUpsertBulk
- func (u *GuildUpsertBulk) UpdateAdminSnowflakes() *GuildUpsertBulk
- func (u *GuildUpsertBulk) UpdateAuditChannel() *GuildUpsertBulk
- func (u *GuildUpsertBulk) UpdateIconHash() *GuildUpsertBulk
- func (u *GuildUpsertBulk) UpdateLanguage() *GuildUpsertBulk
- func (u *GuildUpsertBulk) UpdateModeratorSnowflakes() *GuildUpsertBulk
- func (u *GuildUpsertBulk) UpdateName() *GuildUpsertBulk
- func (u *GuildUpsertBulk) UpdateNewValues() *GuildUpsertBulk
- func (u *GuildUpsertBulk) UpdateSettings() *GuildUpsertBulk
- type GuildUpsertOne
- func (u *GuildUpsertOne) AddAuditChannel(v uint64) *GuildUpsertOne
- func (u *GuildUpsertOne) ClearAuditChannel() *GuildUpsertOne
- func (u *GuildUpsertOne) ClearIconHash() *GuildUpsertOne
- func (u *GuildUpsertOne) ClearModeratorSnowflakes() *GuildUpsertOne
- func (u *GuildUpsertOne) ClearSettings() *GuildUpsertOne
- func (u *GuildUpsertOne) DoNothing() *GuildUpsertOne
- func (u *GuildUpsertOne) Exec(ctx context.Context) error
- func (u *GuildUpsertOne) ExecX(ctx context.Context)
- func (u *GuildUpsertOne) ID(ctx context.Context) (id uint64, err error)
- func (u *GuildUpsertOne) IDX(ctx context.Context) uint64
- func (u *GuildUpsertOne) Ignore() *GuildUpsertOne
- func (u *GuildUpsertOne) SetAdminSnowflakes(v []uint64) *GuildUpsertOne
- func (u *GuildUpsertOne) SetAuditChannel(v uint64) *GuildUpsertOne
- func (u *GuildUpsertOne) SetIconHash(v string) *GuildUpsertOne
- func (u *GuildUpsertOne) SetLanguage(v guild.Language) *GuildUpsertOne
- func (u *GuildUpsertOne) SetModeratorSnowflakes(v []uint64) *GuildUpsertOne
- func (u *GuildUpsertOne) SetName(v string) *GuildUpsertOne
- func (u *GuildUpsertOne) SetSettings(v *schema.GuildSettings) *GuildUpsertOne
- func (u *GuildUpsertOne) Update(set func(*GuildUpsert)) *GuildUpsertOne
- func (u *GuildUpsertOne) UpdateAdminSnowflakes() *GuildUpsertOne
- func (u *GuildUpsertOne) UpdateAuditChannel() *GuildUpsertOne
- func (u *GuildUpsertOne) UpdateIconHash() *GuildUpsertOne
- func (u *GuildUpsertOne) UpdateLanguage() *GuildUpsertOne
- func (u *GuildUpsertOne) UpdateModeratorSnowflakes() *GuildUpsertOne
- func (u *GuildUpsertOne) UpdateName() *GuildUpsertOne
- func (u *GuildUpsertOne) UpdateNewValues() *GuildUpsertOne
- func (u *GuildUpsertOne) UpdateSettings() *GuildUpsertOne
- type Guilds
- 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 User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uint64) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uint64) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uint64) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryGuilds(u *User) *GuildQuery
- func (c *UserClient) QueryGuildsAdmin(u *User) *GuildQuery
- func (c *UserClient) QueryMemberships(u *User) *UserMembershipQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uint64) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddGuildIDs(ids ...uint64) *UserCreate
- func (uc *UserCreate) AddGuilds(g ...*Guild) *UserCreate
- func (uc *UserCreate) AddGuildsAdmin(g ...*Guild) *UserCreate
- func (uc *UserCreate) AddGuildsAdminIDs(ids ...uint64) *UserCreate
- func (uc *UserCreate) AddMembershipIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddMemberships(u ...*UserMembership) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAvatarHash(s string) *UserCreate
- func (uc *UserCreate) SetDiscordToken(o *oauth2.Token) *UserCreate
- func (uc *UserCreate) SetFullName(s string) *UserCreate
- func (uc *UserCreate) SetID(u uint64) *UserCreate
- func (uc *UserCreate) SetLastCheck(t time.Time) *UserCreate
- func (uc *UserCreate) SetNillableLastCheck(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableYoutubeID(s *string) *UserCreate
- func (uc *UserCreate) SetYoutubeID(s string) *UserCreate
- func (uc *UserCreate) SetYoutubeToken(o *oauth2.Token) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMembership
- func (um *UserMembership) QueryRoles() *GuildRoleQuery
- func (um *UserMembership) QueryUser() *UserQuery
- func (um *UserMembership) QueryYoutubeTalent() *YouTubeTalentQuery
- func (um *UserMembership) String() string
- func (um *UserMembership) Unwrap() *UserMembership
- func (um *UserMembership) Update() *UserMembershipUpdateOne
- func (um *UserMembership) Value(name string) (ent.Value, error)
- type UserMembershipClient
- func (c *UserMembershipClient) Create() *UserMembershipCreate
- func (c *UserMembershipClient) CreateBulk(builders ...*UserMembershipCreate) *UserMembershipCreateBulk
- func (c *UserMembershipClient) Delete() *UserMembershipDelete
- func (c *UserMembershipClient) DeleteOne(um *UserMembership) *UserMembershipDeleteOne
- func (c *UserMembershipClient) DeleteOneID(id int) *UserMembershipDeleteOne
- func (c *UserMembershipClient) Get(ctx context.Context, id int) (*UserMembership, error)
- func (c *UserMembershipClient) GetX(ctx context.Context, id int) *UserMembership
- func (c *UserMembershipClient) Hooks() []Hook
- func (c *UserMembershipClient) Intercept(interceptors ...Interceptor)
- func (c *UserMembershipClient) Interceptors() []Interceptor
- func (c *UserMembershipClient) Query() *UserMembershipQuery
- func (c *UserMembershipClient) QueryRoles(um *UserMembership) *GuildRoleQuery
- func (c *UserMembershipClient) QueryUser(um *UserMembership) *UserQuery
- func (c *UserMembershipClient) QueryYoutubeTalent(um *UserMembership) *YouTubeTalentQuery
- func (c *UserMembershipClient) Update() *UserMembershipUpdate
- func (c *UserMembershipClient) UpdateOne(um *UserMembership) *UserMembershipUpdateOne
- func (c *UserMembershipClient) UpdateOneID(id int) *UserMembershipUpdateOne
- func (c *UserMembershipClient) Use(hooks ...Hook)
- type UserMembershipCreate
- func (umc *UserMembershipCreate) AddRoleIDs(ids ...uint64) *UserMembershipCreate
- func (umc *UserMembershipCreate) AddRoles(g ...*GuildRole) *UserMembershipCreate
- func (umc *UserMembershipCreate) Exec(ctx context.Context) error
- func (umc *UserMembershipCreate) ExecX(ctx context.Context)
- func (umc *UserMembershipCreate) Mutation() *UserMembershipMutation
- func (umc *UserMembershipCreate) OnConflict(opts ...sql.ConflictOption) *UserMembershipUpsertOne
- func (umc *UserMembershipCreate) OnConflictColumns(columns ...string) *UserMembershipUpsertOne
- func (umc *UserMembershipCreate) Save(ctx context.Context) (*UserMembership, error)
- func (umc *UserMembershipCreate) SaveX(ctx context.Context) *UserMembership
- func (umc *UserMembershipCreate) SetFailCount(i int) *UserMembershipCreate
- func (umc *UserMembershipCreate) SetFirstFailed(t time.Time) *UserMembershipCreate
- func (umc *UserMembershipCreate) SetLastVerified(t time.Time) *UserMembershipCreate
- func (umc *UserMembershipCreate) SetNillableFailCount(i *int) *UserMembershipCreate
- func (umc *UserMembershipCreate) SetNillableFirstFailed(t *time.Time) *UserMembershipCreate
- func (umc *UserMembershipCreate) SetNillableUserID(id *uint64) *UserMembershipCreate
- func (umc *UserMembershipCreate) SetUser(u *User) *UserMembershipCreate
- func (umc *UserMembershipCreate) SetUserID(id uint64) *UserMembershipCreate
- func (umc *UserMembershipCreate) SetYoutubeTalent(y *YouTubeTalent) *UserMembershipCreate
- func (umc *UserMembershipCreate) SetYoutubeTalentID(id string) *UserMembershipCreate
- type UserMembershipCreateBulk
- func (umcb *UserMembershipCreateBulk) Exec(ctx context.Context) error
- func (umcb *UserMembershipCreateBulk) ExecX(ctx context.Context)
- func (umcb *UserMembershipCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserMembershipUpsertBulk
- func (umcb *UserMembershipCreateBulk) OnConflictColumns(columns ...string) *UserMembershipUpsertBulk
- func (umcb *UserMembershipCreateBulk) Save(ctx context.Context) ([]*UserMembership, error)
- func (umcb *UserMembershipCreateBulk) SaveX(ctx context.Context) []*UserMembership
- type UserMembershipDelete
- type UserMembershipDeleteOne
- type UserMembershipEdges
- type UserMembershipGroupBy
- func (umgb *UserMembershipGroupBy) Aggregate(fns ...AggregateFunc) *UserMembershipGroupBy
- func (s *UserMembershipGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserMembershipGroupBy) BoolX(ctx context.Context) bool
- func (s *UserMembershipGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserMembershipGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserMembershipGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserMembershipGroupBy) Float64X(ctx context.Context) float64
- func (s *UserMembershipGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserMembershipGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserMembershipGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserMembershipGroupBy) IntX(ctx context.Context) int
- func (s *UserMembershipGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserMembershipGroupBy) IntsX(ctx context.Context) []int
- func (umgb *UserMembershipGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserMembershipGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserMembershipGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserMembershipGroupBy) StringX(ctx context.Context) string
- func (s *UserMembershipGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserMembershipGroupBy) StringsX(ctx context.Context) []string
- type UserMembershipMutation
- func (m *UserMembershipMutation) AddFailCount(i int)
- func (m *UserMembershipMutation) AddField(name string, value ent.Value) error
- func (m *UserMembershipMutation) AddRoleIDs(ids ...uint64)
- func (m *UserMembershipMutation) AddedEdges() []string
- func (m *UserMembershipMutation) AddedFailCount() (r int, exists bool)
- func (m *UserMembershipMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMembershipMutation) AddedFields() []string
- func (m *UserMembershipMutation) AddedIDs(name string) []ent.Value
- func (m *UserMembershipMutation) ClearEdge(name string) error
- func (m *UserMembershipMutation) ClearField(name string) error
- func (m *UserMembershipMutation) ClearFirstFailed()
- func (m *UserMembershipMutation) ClearRoles()
- func (m *UserMembershipMutation) ClearUser()
- func (m *UserMembershipMutation) ClearYoutubeTalent()
- func (m *UserMembershipMutation) ClearedEdges() []string
- func (m *UserMembershipMutation) ClearedFields() []string
- func (m UserMembershipMutation) Client() *Client
- func (m *UserMembershipMutation) EdgeCleared(name string) bool
- func (m *UserMembershipMutation) FailCount() (r int, exists bool)
- func (m *UserMembershipMutation) Field(name string) (ent.Value, bool)
- func (m *UserMembershipMutation) FieldCleared(name string) bool
- func (m *UserMembershipMutation) Fields() []string
- func (m *UserMembershipMutation) FirstFailed() (r time.Time, exists bool)
- func (m *UserMembershipMutation) FirstFailedCleared() bool
- func (m *UserMembershipMutation) ID() (id int, exists bool)
- func (m *UserMembershipMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMembershipMutation) LastVerified() (r time.Time, exists bool)
- func (m *UserMembershipMutation) OldFailCount(ctx context.Context) (v int, err error)
- func (m *UserMembershipMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMembershipMutation) OldFirstFailed(ctx context.Context) (v time.Time, err error)
- func (m *UserMembershipMutation) OldLastVerified(ctx context.Context) (v time.Time, err error)
- func (m *UserMembershipMutation) Op() Op
- func (m *UserMembershipMutation) RemoveRoleIDs(ids ...uint64)
- func (m *UserMembershipMutation) RemovedEdges() []string
- func (m *UserMembershipMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMembershipMutation) RemovedRolesIDs() (ids []uint64)
- func (m *UserMembershipMutation) ResetEdge(name string) error
- func (m *UserMembershipMutation) ResetFailCount()
- func (m *UserMembershipMutation) ResetField(name string) error
- func (m *UserMembershipMutation) ResetFirstFailed()
- func (m *UserMembershipMutation) ResetLastVerified()
- func (m *UserMembershipMutation) ResetRoles()
- func (m *UserMembershipMutation) ResetUser()
- func (m *UserMembershipMutation) ResetYoutubeTalent()
- func (m *UserMembershipMutation) RolesCleared() bool
- func (m *UserMembershipMutation) RolesIDs() (ids []uint64)
- func (m *UserMembershipMutation) SetFailCount(i int)
- func (m *UserMembershipMutation) SetField(name string, value ent.Value) error
- func (m *UserMembershipMutation) SetFirstFailed(t time.Time)
- func (m *UserMembershipMutation) SetLastVerified(t time.Time)
- func (m *UserMembershipMutation) SetOp(op Op)
- func (m *UserMembershipMutation) SetUserID(id uint64)
- func (m *UserMembershipMutation) SetYoutubeTalentID(id string)
- func (m UserMembershipMutation) Tx() (*Tx, error)
- func (m *UserMembershipMutation) Type() string
- func (m *UserMembershipMutation) UserCleared() bool
- func (m *UserMembershipMutation) UserID() (id uint64, exists bool)
- func (m *UserMembershipMutation) UserIDs() (ids []uint64)
- func (m *UserMembershipMutation) Where(ps ...predicate.UserMembership)
- func (m *UserMembershipMutation) WhereP(ps ...func(*sql.Selector))
- func (m *UserMembershipMutation) YoutubeTalentCleared() bool
- func (m *UserMembershipMutation) YoutubeTalentID() (id string, exists bool)
- func (m *UserMembershipMutation) YoutubeTalentIDs() (ids []string)
- type UserMembershipQuery
- func (umq *UserMembershipQuery) Aggregate(fns ...AggregateFunc) *UserMembershipSelect
- func (umq *UserMembershipQuery) All(ctx context.Context) ([]*UserMembership, error)
- func (umq *UserMembershipQuery) AllX(ctx context.Context) []*UserMembership
- func (umq *UserMembershipQuery) Clone() *UserMembershipQuery
- func (umq *UserMembershipQuery) Count(ctx context.Context) (int, error)
- func (umq *UserMembershipQuery) CountX(ctx context.Context) int
- func (umq *UserMembershipQuery) Exist(ctx context.Context) (bool, error)
- func (umq *UserMembershipQuery) ExistX(ctx context.Context) bool
- func (umq *UserMembershipQuery) First(ctx context.Context) (*UserMembership, error)
- func (umq *UserMembershipQuery) FirstID(ctx context.Context) (id int, err error)
- func (umq *UserMembershipQuery) FirstIDX(ctx context.Context) int
- func (umq *UserMembershipQuery) FirstX(ctx context.Context) *UserMembership
- func (umq *UserMembershipQuery) ForShare(opts ...sql.LockOption) *UserMembershipQuery
- func (umq *UserMembershipQuery) ForUpdate(opts ...sql.LockOption) *UserMembershipQuery
- func (umq *UserMembershipQuery) GroupBy(field string, fields ...string) *UserMembershipGroupBy
- func (umq *UserMembershipQuery) IDs(ctx context.Context) (ids []int, err error)
- func (umq *UserMembershipQuery) IDsX(ctx context.Context) []int
- func (umq *UserMembershipQuery) Limit(limit int) *UserMembershipQuery
- func (umq *UserMembershipQuery) Offset(offset int) *UserMembershipQuery
- func (umq *UserMembershipQuery) Only(ctx context.Context) (*UserMembership, error)
- func (umq *UserMembershipQuery) OnlyID(ctx context.Context) (id int, err error)
- func (umq *UserMembershipQuery) OnlyIDX(ctx context.Context) int
- func (umq *UserMembershipQuery) OnlyX(ctx context.Context) *UserMembership
- func (umq *UserMembershipQuery) Order(o ...usermembership.OrderOption) *UserMembershipQuery
- func (umq *UserMembershipQuery) QueryRoles() *GuildRoleQuery
- func (umq *UserMembershipQuery) QueryUser() *UserQuery
- func (umq *UserMembershipQuery) QueryYoutubeTalent() *YouTubeTalentQuery
- func (umq *UserMembershipQuery) Select(fields ...string) *UserMembershipSelect
- func (umq *UserMembershipQuery) Unique(unique bool) *UserMembershipQuery
- func (umq *UserMembershipQuery) Where(ps ...predicate.UserMembership) *UserMembershipQuery
- func (umq *UserMembershipQuery) WithRoles(opts ...func(*GuildRoleQuery)) *UserMembershipQuery
- func (umq *UserMembershipQuery) WithUser(opts ...func(*UserQuery)) *UserMembershipQuery
- func (umq *UserMembershipQuery) WithYoutubeTalent(opts ...func(*YouTubeTalentQuery)) *UserMembershipQuery
- type UserMembershipSelect
- func (ums *UserMembershipSelect) Aggregate(fns ...AggregateFunc) *UserMembershipSelect
- func (s *UserMembershipSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserMembershipSelect) BoolX(ctx context.Context) bool
- func (s *UserMembershipSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserMembershipSelect) BoolsX(ctx context.Context) []bool
- func (s *UserMembershipSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserMembershipSelect) Float64X(ctx context.Context) float64
- func (s *UserMembershipSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserMembershipSelect) Float64sX(ctx context.Context) []float64
- func (s *UserMembershipSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserMembershipSelect) IntX(ctx context.Context) int
- func (s *UserMembershipSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserMembershipSelect) IntsX(ctx context.Context) []int
- func (ums *UserMembershipSelect) Scan(ctx context.Context, v any) error
- func (s *UserMembershipSelect) ScanX(ctx context.Context, v any)
- func (s *UserMembershipSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserMembershipSelect) StringX(ctx context.Context) string
- func (s *UserMembershipSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserMembershipSelect) StringsX(ctx context.Context) []string
- type UserMembershipUpdate
- func (umu *UserMembershipUpdate) AddFailCount(i int) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) AddRoleIDs(ids ...uint64) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) AddRoles(g ...*GuildRole) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) ClearFirstFailed() *UserMembershipUpdate
- func (umu *UserMembershipUpdate) ClearRoles() *UserMembershipUpdate
- func (umu *UserMembershipUpdate) ClearUser() *UserMembershipUpdate
- func (umu *UserMembershipUpdate) ClearYoutubeTalent() *UserMembershipUpdate
- func (umu *UserMembershipUpdate) Exec(ctx context.Context) error
- func (umu *UserMembershipUpdate) ExecX(ctx context.Context)
- func (umu *UserMembershipUpdate) Mutation() *UserMembershipMutation
- func (umu *UserMembershipUpdate) RemoveRoleIDs(ids ...uint64) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) RemoveRoles(g ...*GuildRole) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) Save(ctx context.Context) (int, error)
- func (umu *UserMembershipUpdate) SaveX(ctx context.Context) int
- func (umu *UserMembershipUpdate) SetFailCount(i int) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) SetFirstFailed(t time.Time) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) SetLastVerified(t time.Time) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) SetNillableFailCount(i *int) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) SetNillableFirstFailed(t *time.Time) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) SetNillableUserID(id *uint64) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) SetUser(u *User) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) SetUserID(id uint64) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) SetYoutubeTalent(y *YouTubeTalent) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) SetYoutubeTalentID(id string) *UserMembershipUpdate
- func (umu *UserMembershipUpdate) Where(ps ...predicate.UserMembership) *UserMembershipUpdate
- type UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) AddFailCount(i int) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) AddRoleIDs(ids ...uint64) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) AddRoles(g ...*GuildRole) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) ClearFirstFailed() *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) ClearRoles() *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) ClearUser() *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) ClearYoutubeTalent() *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) Exec(ctx context.Context) error
- func (umuo *UserMembershipUpdateOne) ExecX(ctx context.Context)
- func (umuo *UserMembershipUpdateOne) Mutation() *UserMembershipMutation
- func (umuo *UserMembershipUpdateOne) RemoveRoleIDs(ids ...uint64) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) RemoveRoles(g ...*GuildRole) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) Save(ctx context.Context) (*UserMembership, error)
- func (umuo *UserMembershipUpdateOne) SaveX(ctx context.Context) *UserMembership
- func (umuo *UserMembershipUpdateOne) Select(field string, fields ...string) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) SetFailCount(i int) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) SetFirstFailed(t time.Time) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) SetLastVerified(t time.Time) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) SetNillableFailCount(i *int) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) SetNillableFirstFailed(t *time.Time) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) SetNillableUserID(id *uint64) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) SetUser(u *User) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) SetUserID(id uint64) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) SetYoutubeTalent(y *YouTubeTalent) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) SetYoutubeTalentID(id string) *UserMembershipUpdateOne
- func (umuo *UserMembershipUpdateOne) Where(ps ...predicate.UserMembership) *UserMembershipUpdateOne
- type UserMembershipUpsert
- func (u *UserMembershipUpsert) AddFailCount(v int) *UserMembershipUpsert
- func (u *UserMembershipUpsert) ClearFirstFailed() *UserMembershipUpsert
- func (u *UserMembershipUpsert) SetFailCount(v int) *UserMembershipUpsert
- func (u *UserMembershipUpsert) SetFirstFailed(v time.Time) *UserMembershipUpsert
- func (u *UserMembershipUpsert) SetLastVerified(v time.Time) *UserMembershipUpsert
- func (u *UserMembershipUpsert) UpdateFailCount() *UserMembershipUpsert
- func (u *UserMembershipUpsert) UpdateFirstFailed() *UserMembershipUpsert
- func (u *UserMembershipUpsert) UpdateLastVerified() *UserMembershipUpsert
- type UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) AddFailCount(v int) *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) ClearFirstFailed() *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) DoNothing() *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) Exec(ctx context.Context) error
- func (u *UserMembershipUpsertBulk) ExecX(ctx context.Context)
- func (u *UserMembershipUpsertBulk) Ignore() *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) SetFailCount(v int) *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) SetFirstFailed(v time.Time) *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) SetLastVerified(v time.Time) *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) Update(set func(*UserMembershipUpsert)) *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) UpdateFailCount() *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) UpdateFirstFailed() *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) UpdateLastVerified() *UserMembershipUpsertBulk
- func (u *UserMembershipUpsertBulk) UpdateNewValues() *UserMembershipUpsertBulk
- type UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) AddFailCount(v int) *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) ClearFirstFailed() *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) DoNothing() *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) Exec(ctx context.Context) error
- func (u *UserMembershipUpsertOne) ExecX(ctx context.Context)
- func (u *UserMembershipUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *UserMembershipUpsertOne) IDX(ctx context.Context) int
- func (u *UserMembershipUpsertOne) Ignore() *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) SetFailCount(v int) *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) SetFirstFailed(v time.Time) *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) SetLastVerified(v time.Time) *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) Update(set func(*UserMembershipUpsert)) *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) UpdateFailCount() *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) UpdateFirstFailed() *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) UpdateLastVerified() *UserMembershipUpsertOne
- func (u *UserMembershipUpsertOne) UpdateNewValues() *UserMembershipUpsertOne
- type UserMemberships
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddGuildIDs(ids ...uint64)
- func (m *UserMutation) AddGuildsAdminIDs(ids ...uint64)
- func (m *UserMutation) AddMembershipIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AvatarHash() (r string, exists bool)
- func (m *UserMutation) ClearDiscordToken()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearGuilds()
- func (m *UserMutation) ClearGuildsAdmin()
- func (m *UserMutation) ClearMemberships()
- func (m *UserMutation) ClearYoutubeID()
- func (m *UserMutation) ClearYoutubeToken()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) DiscordToken() (r *oauth2.Token, exists bool)
- func (m *UserMutation) DiscordTokenCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) FullName() (r string, exists bool)
- func (m *UserMutation) GuildsAdminCleared() bool
- func (m *UserMutation) GuildsAdminIDs() (ids []uint64)
- func (m *UserMutation) GuildsCleared() bool
- func (m *UserMutation) GuildsIDs() (ids []uint64)
- func (m *UserMutation) ID() (id uint64, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *UserMutation) LastCheck() (r time.Time, exists bool)
- func (m *UserMutation) MembershipsCleared() bool
- func (m *UserMutation) MembershipsIDs() (ids []int)
- func (m *UserMutation) OldAvatarHash(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldDiscordToken(ctx context.Context) (v *oauth2.Token, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldFullName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldLastCheck(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldYoutubeID(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldYoutubeToken(ctx context.Context) (v *oauth2.Token, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemoveGuildIDs(ids ...uint64)
- func (m *UserMutation) RemoveGuildsAdminIDs(ids ...uint64)
- func (m *UserMutation) RemoveMembershipIDs(ids ...int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedGuildsAdminIDs() (ids []uint64)
- func (m *UserMutation) RemovedGuildsIDs() (ids []uint64)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedMembershipsIDs() (ids []int)
- func (m *UserMutation) ResetAvatarHash()
- func (m *UserMutation) ResetDiscordToken()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFullName()
- func (m *UserMutation) ResetGuilds()
- func (m *UserMutation) ResetGuildsAdmin()
- func (m *UserMutation) ResetLastCheck()
- func (m *UserMutation) ResetMemberships()
- func (m *UserMutation) ResetYoutubeID()
- func (m *UserMutation) ResetYoutubeToken()
- func (m *UserMutation) SetAvatarHash(s string)
- func (m *UserMutation) SetDiscordToken(o *oauth2.Token)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetFullName(s string)
- func (m *UserMutation) SetID(id uint64)
- func (m *UserMutation) SetLastCheck(t time.Time)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetYoutubeID(s string)
- func (m *UserMutation) SetYoutubeToken(o *oauth2.Token)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- func (m *UserMutation) YoutubeID() (r string, exists bool)
- func (m *UserMutation) YoutubeIDCleared() bool
- func (m *UserMutation) YoutubeToken() (r *oauth2.Token, exists bool)
- func (m *UserMutation) YoutubeTokenCleared() bool
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uint64
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uint64
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uint64
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryGuilds() *GuildQuery
- func (uq *UserQuery) QueryGuildsAdmin() *GuildQuery
- func (uq *UserQuery) QueryMemberships() *UserMembershipQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithGuilds(opts ...func(*GuildQuery)) *UserQuery
- func (uq *UserQuery) WithGuildsAdmin(opts ...func(*GuildQuery)) *UserQuery
- func (uq *UserQuery) WithMemberships(opts ...func(*UserMembershipQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddGuildIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) AddGuilds(g ...*Guild) *UserUpdate
- func (uu *UserUpdate) AddGuildsAdmin(g ...*Guild) *UserUpdate
- func (uu *UserUpdate) AddGuildsAdminIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) AddMembershipIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddMemberships(u ...*UserMembership) *UserUpdate
- func (uu *UserUpdate) ClearDiscordToken() *UserUpdate
- func (uu *UserUpdate) ClearGuilds() *UserUpdate
- func (uu *UserUpdate) ClearGuildsAdmin() *UserUpdate
- func (uu *UserUpdate) ClearMemberships() *UserUpdate
- func (uu *UserUpdate) ClearYoutubeID() *UserUpdate
- func (uu *UserUpdate) ClearYoutubeToken() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveGuildIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) RemoveGuilds(g ...*Guild) *UserUpdate
- func (uu *UserUpdate) RemoveGuildsAdmin(g ...*Guild) *UserUpdate
- func (uu *UserUpdate) RemoveGuildsAdminIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) RemoveMembershipIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveMemberships(u ...*UserMembership) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAvatarHash(s string) *UserUpdate
- func (uu *UserUpdate) SetDiscordToken(o *oauth2.Token) *UserUpdate
- func (uu *UserUpdate) SetFullName(s string) *UserUpdate
- func (uu *UserUpdate) SetLastCheck(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableLastCheck(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableYoutubeID(s *string) *UserUpdate
- func (uu *UserUpdate) SetYoutubeID(s string) *UserUpdate
- func (uu *UserUpdate) SetYoutubeToken(o *oauth2.Token) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddGuildIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGuilds(g ...*Guild) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGuildsAdmin(g ...*Guild) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGuildsAdminIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMembershipIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddMemberships(u ...*UserMembership) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDiscordToken() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGuilds() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGuildsAdmin() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMemberships() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearYoutubeID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearYoutubeToken() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveGuildIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGuilds(g ...*Guild) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGuildsAdmin(g ...*Guild) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGuildsAdminIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMembershipIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveMemberships(u ...*UserMembership) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAvatarHash(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDiscordToken(o *oauth2.Token) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFullName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastCheck(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastCheck(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableYoutubeID(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetYoutubeID(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetYoutubeToken(o *oauth2.Token) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) ClearDiscordToken() *UserUpsert
- func (u *UserUpsert) ClearYoutubeID() *UserUpsert
- func (u *UserUpsert) ClearYoutubeToken() *UserUpsert
- func (u *UserUpsert) SetAvatarHash(v string) *UserUpsert
- func (u *UserUpsert) SetDiscordToken(v *oauth2.Token) *UserUpsert
- func (u *UserUpsert) SetFullName(v string) *UserUpsert
- func (u *UserUpsert) SetLastCheck(v time.Time) *UserUpsert
- func (u *UserUpsert) SetYoutubeID(v string) *UserUpsert
- func (u *UserUpsert) SetYoutubeToken(v *oauth2.Token) *UserUpsert
- func (u *UserUpsert) UpdateAvatarHash() *UserUpsert
- func (u *UserUpsert) UpdateDiscordToken() *UserUpsert
- func (u *UserUpsert) UpdateFullName() *UserUpsert
- func (u *UserUpsert) UpdateLastCheck() *UserUpsert
- func (u *UserUpsert) UpdateYoutubeID() *UserUpsert
- func (u *UserUpsert) UpdateYoutubeToken() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) ClearDiscordToken() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearYoutubeID() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearYoutubeToken() *UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetAvatarHash(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetDiscordToken(v *oauth2.Token) *UserUpsertBulk
- func (u *UserUpsertBulk) SetFullName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetLastCheck(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetYoutubeID(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetYoutubeToken(v *oauth2.Token) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateAvatarHash() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateDiscordToken() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateFullName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateLastCheck() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateYoutubeID() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateYoutubeToken() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) ClearDiscordToken() *UserUpsertOne
- func (u *UserUpsertOne) ClearYoutubeID() *UserUpsertOne
- func (u *UserUpsertOne) ClearYoutubeToken() *UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id uint64, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) uint64
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetAvatarHash(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetDiscordToken(v *oauth2.Token) *UserUpsertOne
- func (u *UserUpsertOne) SetFullName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetLastCheck(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetYoutubeID(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetYoutubeToken(v *oauth2.Token) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateAvatarHash() *UserUpsertOne
- func (u *UserUpsertOne) UpdateDiscordToken() *UserUpsertOne
- func (u *UserUpsertOne) UpdateFullName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateLastCheck() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdateYoutubeID() *UserUpsertOne
- func (u *UserUpsertOne) UpdateYoutubeToken() *UserUpsertOne
- type Users
- type ValidationError
- type Value
- type YouTubeTalent
- func (ytt *YouTubeTalent) QueryGuilds() *GuildQuery
- func (ytt *YouTubeTalent) QueryMemberships() *UserMembershipQuery
- func (ytt *YouTubeTalent) QueryRoles() *GuildRoleQuery
- func (ytt *YouTubeTalent) String() string
- func (ytt *YouTubeTalent) Unwrap() *YouTubeTalent
- func (ytt *YouTubeTalent) Update() *YouTubeTalentUpdateOne
- func (ytt *YouTubeTalent) Value(name string) (ent.Value, error)
- type YouTubeTalentClient
- func (c *YouTubeTalentClient) Create() *YouTubeTalentCreate
- func (c *YouTubeTalentClient) CreateBulk(builders ...*YouTubeTalentCreate) *YouTubeTalentCreateBulk
- func (c *YouTubeTalentClient) Delete() *YouTubeTalentDelete
- func (c *YouTubeTalentClient) DeleteOne(ytt *YouTubeTalent) *YouTubeTalentDeleteOne
- func (c *YouTubeTalentClient) DeleteOneID(id string) *YouTubeTalentDeleteOne
- func (c *YouTubeTalentClient) Get(ctx context.Context, id string) (*YouTubeTalent, error)
- func (c *YouTubeTalentClient) GetX(ctx context.Context, id string) *YouTubeTalent
- func (c *YouTubeTalentClient) Hooks() []Hook
- func (c *YouTubeTalentClient) Intercept(interceptors ...Interceptor)
- func (c *YouTubeTalentClient) Interceptors() []Interceptor
- func (c *YouTubeTalentClient) Query() *YouTubeTalentQuery
- func (c *YouTubeTalentClient) QueryGuilds(ytt *YouTubeTalent) *GuildQuery
- func (c *YouTubeTalentClient) QueryMemberships(ytt *YouTubeTalent) *UserMembershipQuery
- func (c *YouTubeTalentClient) QueryRoles(ytt *YouTubeTalent) *GuildRoleQuery
- func (c *YouTubeTalentClient) Update() *YouTubeTalentUpdate
- func (c *YouTubeTalentClient) UpdateOne(ytt *YouTubeTalent) *YouTubeTalentUpdateOne
- func (c *YouTubeTalentClient) UpdateOneID(id string) *YouTubeTalentUpdateOne
- func (c *YouTubeTalentClient) Use(hooks ...Hook)
- type YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) AddGuildIDs(ids ...uint64) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) AddGuilds(g ...*Guild) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) AddMembershipIDs(ids ...int) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) AddMemberships(u ...*UserMembership) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) AddRoleIDs(ids ...uint64) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) AddRoles(g ...*GuildRole) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) Exec(ctx context.Context) error
- func (yttc *YouTubeTalentCreate) ExecX(ctx context.Context)
- func (yttc *YouTubeTalentCreate) Mutation() *YouTubeTalentMutation
- func (yttc *YouTubeTalentCreate) OnConflict(opts ...sql.ConflictOption) *YouTubeTalentUpsertOne
- func (yttc *YouTubeTalentCreate) OnConflictColumns(columns ...string) *YouTubeTalentUpsertOne
- func (yttc *YouTubeTalentCreate) Save(ctx context.Context) (*YouTubeTalent, error)
- func (yttc *YouTubeTalentCreate) SaveX(ctx context.Context) *YouTubeTalent
- func (yttc *YouTubeTalentCreate) SetChannelName(s string) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetDisabled(t time.Time) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetDisabledPermanently(b bool) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetID(s string) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetLastMembershipVideoIDMiss(t time.Time) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetLastUpdated(t time.Time) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetMembershipVideoID(s string) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetNillableDisabled(t *time.Time) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetNillableDisabledPermanently(b *bool) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetNillableLastMembershipVideoIDMiss(t *time.Time) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetNillableLastUpdated(t *time.Time) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetNillableMembershipVideoID(s *string) *YouTubeTalentCreate
- func (yttc *YouTubeTalentCreate) SetThumbnailURL(s string) *YouTubeTalentCreate
- type YouTubeTalentCreateBulk
- func (yttcb *YouTubeTalentCreateBulk) Exec(ctx context.Context) error
- func (yttcb *YouTubeTalentCreateBulk) ExecX(ctx context.Context)
- func (yttcb *YouTubeTalentCreateBulk) OnConflict(opts ...sql.ConflictOption) *YouTubeTalentUpsertBulk
- func (yttcb *YouTubeTalentCreateBulk) OnConflictColumns(columns ...string) *YouTubeTalentUpsertBulk
- func (yttcb *YouTubeTalentCreateBulk) Save(ctx context.Context) ([]*YouTubeTalent, error)
- func (yttcb *YouTubeTalentCreateBulk) SaveX(ctx context.Context) []*YouTubeTalent
- type YouTubeTalentDelete
- type YouTubeTalentDeleteOne
- type YouTubeTalentEdges
- type YouTubeTalentGroupBy
- func (yttgb *YouTubeTalentGroupBy) Aggregate(fns ...AggregateFunc) *YouTubeTalentGroupBy
- func (s *YouTubeTalentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *YouTubeTalentGroupBy) BoolX(ctx context.Context) bool
- func (s *YouTubeTalentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *YouTubeTalentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *YouTubeTalentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *YouTubeTalentGroupBy) Float64X(ctx context.Context) float64
- func (s *YouTubeTalentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *YouTubeTalentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *YouTubeTalentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *YouTubeTalentGroupBy) IntX(ctx context.Context) int
- func (s *YouTubeTalentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *YouTubeTalentGroupBy) IntsX(ctx context.Context) []int
- func (yttgb *YouTubeTalentGroupBy) Scan(ctx context.Context, v any) error
- func (s *YouTubeTalentGroupBy) ScanX(ctx context.Context, v any)
- func (s *YouTubeTalentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *YouTubeTalentGroupBy) StringX(ctx context.Context) string
- func (s *YouTubeTalentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *YouTubeTalentGroupBy) StringsX(ctx context.Context) []string
- type YouTubeTalentMutation
- func (m *YouTubeTalentMutation) AddField(name string, value ent.Value) error
- func (m *YouTubeTalentMutation) AddGuildIDs(ids ...uint64)
- func (m *YouTubeTalentMutation) AddMembershipIDs(ids ...int)
- func (m *YouTubeTalentMutation) AddRoleIDs(ids ...uint64)
- func (m *YouTubeTalentMutation) AddedEdges() []string
- func (m *YouTubeTalentMutation) AddedField(name string) (ent.Value, bool)
- func (m *YouTubeTalentMutation) AddedFields() []string
- func (m *YouTubeTalentMutation) AddedIDs(name string) []ent.Value
- func (m *YouTubeTalentMutation) ChannelName() (r string, exists bool)
- func (m *YouTubeTalentMutation) ClearDisabled()
- func (m *YouTubeTalentMutation) ClearEdge(name string) error
- func (m *YouTubeTalentMutation) ClearField(name string) error
- func (m *YouTubeTalentMutation) ClearGuilds()
- func (m *YouTubeTalentMutation) ClearLastMembershipVideoIDMiss()
- func (m *YouTubeTalentMutation) ClearMembershipVideoID()
- func (m *YouTubeTalentMutation) ClearMemberships()
- func (m *YouTubeTalentMutation) ClearRoles()
- func (m *YouTubeTalentMutation) ClearedEdges() []string
- func (m *YouTubeTalentMutation) ClearedFields() []string
- func (m YouTubeTalentMutation) Client() *Client
- func (m *YouTubeTalentMutation) Disabled() (r time.Time, exists bool)
- func (m *YouTubeTalentMutation) DisabledCleared() bool
- func (m *YouTubeTalentMutation) DisabledPermanently() (r bool, exists bool)
- func (m *YouTubeTalentMutation) EdgeCleared(name string) bool
- func (m *YouTubeTalentMutation) Field(name string) (ent.Value, bool)
- func (m *YouTubeTalentMutation) FieldCleared(name string) bool
- func (m *YouTubeTalentMutation) Fields() []string
- func (m *YouTubeTalentMutation) GuildsCleared() bool
- func (m *YouTubeTalentMutation) GuildsIDs() (ids []uint64)
- func (m *YouTubeTalentMutation) ID() (id string, exists bool)
- func (m *YouTubeTalentMutation) IDs(ctx context.Context) ([]string, error)
- func (m *YouTubeTalentMutation) LastMembershipVideoIDMiss() (r time.Time, exists bool)
- func (m *YouTubeTalentMutation) LastMembershipVideoIDMissCleared() bool
- func (m *YouTubeTalentMutation) LastUpdated() (r time.Time, exists bool)
- func (m *YouTubeTalentMutation) MembershipVideoID() (r string, exists bool)
- func (m *YouTubeTalentMutation) MembershipVideoIDCleared() bool
- func (m *YouTubeTalentMutation) MembershipsCleared() bool
- func (m *YouTubeTalentMutation) MembershipsIDs() (ids []int)
- func (m *YouTubeTalentMutation) OldChannelName(ctx context.Context) (v string, err error)
- func (m *YouTubeTalentMutation) OldDisabled(ctx context.Context) (v time.Time, err error)
- func (m *YouTubeTalentMutation) OldDisabledPermanently(ctx context.Context) (v bool, err error)
- func (m *YouTubeTalentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *YouTubeTalentMutation) OldLastMembershipVideoIDMiss(ctx context.Context) (v time.Time, err error)
- func (m *YouTubeTalentMutation) OldLastUpdated(ctx context.Context) (v time.Time, err error)
- func (m *YouTubeTalentMutation) OldMembershipVideoID(ctx context.Context) (v string, err error)
- func (m *YouTubeTalentMutation) OldThumbnailURL(ctx context.Context) (v string, err error)
- func (m *YouTubeTalentMutation) Op() Op
- func (m *YouTubeTalentMutation) RemoveGuildIDs(ids ...uint64)
- func (m *YouTubeTalentMutation) RemoveMembershipIDs(ids ...int)
- func (m *YouTubeTalentMutation) RemoveRoleIDs(ids ...uint64)
- func (m *YouTubeTalentMutation) RemovedEdges() []string
- func (m *YouTubeTalentMutation) RemovedGuildsIDs() (ids []uint64)
- func (m *YouTubeTalentMutation) RemovedIDs(name string) []ent.Value
- func (m *YouTubeTalentMutation) RemovedMembershipsIDs() (ids []int)
- func (m *YouTubeTalentMutation) RemovedRolesIDs() (ids []uint64)
- func (m *YouTubeTalentMutation) ResetChannelName()
- func (m *YouTubeTalentMutation) ResetDisabled()
- func (m *YouTubeTalentMutation) ResetDisabledPermanently()
- func (m *YouTubeTalentMutation) ResetEdge(name string) error
- func (m *YouTubeTalentMutation) ResetField(name string) error
- func (m *YouTubeTalentMutation) ResetGuilds()
- func (m *YouTubeTalentMutation) ResetLastMembershipVideoIDMiss()
- func (m *YouTubeTalentMutation) ResetLastUpdated()
- func (m *YouTubeTalentMutation) ResetMembershipVideoID()
- func (m *YouTubeTalentMutation) ResetMemberships()
- func (m *YouTubeTalentMutation) ResetRoles()
- func (m *YouTubeTalentMutation) ResetThumbnailURL()
- func (m *YouTubeTalentMutation) RolesCleared() bool
- func (m *YouTubeTalentMutation) RolesIDs() (ids []uint64)
- func (m *YouTubeTalentMutation) SetChannelName(s string)
- func (m *YouTubeTalentMutation) SetDisabled(t time.Time)
- func (m *YouTubeTalentMutation) SetDisabledPermanently(b bool)
- func (m *YouTubeTalentMutation) SetField(name string, value ent.Value) error
- func (m *YouTubeTalentMutation) SetID(id string)
- func (m *YouTubeTalentMutation) SetLastMembershipVideoIDMiss(t time.Time)
- func (m *YouTubeTalentMutation) SetLastUpdated(t time.Time)
- func (m *YouTubeTalentMutation) SetMembershipVideoID(s string)
- func (m *YouTubeTalentMutation) SetOp(op Op)
- func (m *YouTubeTalentMutation) SetThumbnailURL(s string)
- func (m *YouTubeTalentMutation) ThumbnailURL() (r string, exists bool)
- func (m YouTubeTalentMutation) Tx() (*Tx, error)
- func (m *YouTubeTalentMutation) Type() string
- func (m *YouTubeTalentMutation) Where(ps ...predicate.YouTubeTalent)
- func (m *YouTubeTalentMutation) WhereP(ps ...func(*sql.Selector))
- type YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) Aggregate(fns ...AggregateFunc) *YouTubeTalentSelect
- func (yttq *YouTubeTalentQuery) All(ctx context.Context) ([]*YouTubeTalent, error)
- func (yttq *YouTubeTalentQuery) AllX(ctx context.Context) []*YouTubeTalent
- func (yttq *YouTubeTalentQuery) Clone() *YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) Count(ctx context.Context) (int, error)
- func (yttq *YouTubeTalentQuery) CountX(ctx context.Context) int
- func (yttq *YouTubeTalentQuery) Exist(ctx context.Context) (bool, error)
- func (yttq *YouTubeTalentQuery) ExistX(ctx context.Context) bool
- func (yttq *YouTubeTalentQuery) First(ctx context.Context) (*YouTubeTalent, error)
- func (yttq *YouTubeTalentQuery) FirstID(ctx context.Context) (id string, err error)
- func (yttq *YouTubeTalentQuery) FirstIDX(ctx context.Context) string
- func (yttq *YouTubeTalentQuery) FirstX(ctx context.Context) *YouTubeTalent
- func (yttq *YouTubeTalentQuery) ForShare(opts ...sql.LockOption) *YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) ForUpdate(opts ...sql.LockOption) *YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) GroupBy(field string, fields ...string) *YouTubeTalentGroupBy
- func (yttq *YouTubeTalentQuery) IDs(ctx context.Context) (ids []string, err error)
- func (yttq *YouTubeTalentQuery) IDsX(ctx context.Context) []string
- func (yttq *YouTubeTalentQuery) Limit(limit int) *YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) Offset(offset int) *YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) Only(ctx context.Context) (*YouTubeTalent, error)
- func (yttq *YouTubeTalentQuery) OnlyID(ctx context.Context) (id string, err error)
- func (yttq *YouTubeTalentQuery) OnlyIDX(ctx context.Context) string
- func (yttq *YouTubeTalentQuery) OnlyX(ctx context.Context) *YouTubeTalent
- func (yttq *YouTubeTalentQuery) Order(o ...youtubetalent.OrderOption) *YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) QueryGuilds() *GuildQuery
- func (yttq *YouTubeTalentQuery) QueryMemberships() *UserMembershipQuery
- func (yttq *YouTubeTalentQuery) QueryRoles() *GuildRoleQuery
- func (yttq *YouTubeTalentQuery) Select(fields ...string) *YouTubeTalentSelect
- func (yttq *YouTubeTalentQuery) Unique(unique bool) *YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) Where(ps ...predicate.YouTubeTalent) *YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) WithGuilds(opts ...func(*GuildQuery)) *YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) WithMemberships(opts ...func(*UserMembershipQuery)) *YouTubeTalentQuery
- func (yttq *YouTubeTalentQuery) WithRoles(opts ...func(*GuildRoleQuery)) *YouTubeTalentQuery
- type YouTubeTalentSelect
- func (ytts *YouTubeTalentSelect) Aggregate(fns ...AggregateFunc) *YouTubeTalentSelect
- func (s *YouTubeTalentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *YouTubeTalentSelect) BoolX(ctx context.Context) bool
- func (s *YouTubeTalentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *YouTubeTalentSelect) BoolsX(ctx context.Context) []bool
- func (s *YouTubeTalentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *YouTubeTalentSelect) Float64X(ctx context.Context) float64
- func (s *YouTubeTalentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *YouTubeTalentSelect) Float64sX(ctx context.Context) []float64
- func (s *YouTubeTalentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *YouTubeTalentSelect) IntX(ctx context.Context) int
- func (s *YouTubeTalentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *YouTubeTalentSelect) IntsX(ctx context.Context) []int
- func (ytts *YouTubeTalentSelect) Scan(ctx context.Context, v any) error
- func (s *YouTubeTalentSelect) ScanX(ctx context.Context, v any)
- func (s *YouTubeTalentSelect) String(ctx context.Context) (_ string, err error)
- func (s *YouTubeTalentSelect) StringX(ctx context.Context) string
- func (s *YouTubeTalentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *YouTubeTalentSelect) StringsX(ctx context.Context) []string
- type YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) AddGuildIDs(ids ...uint64) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) AddGuilds(g ...*Guild) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) AddMembershipIDs(ids ...int) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) AddMemberships(u ...*UserMembership) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) AddRoleIDs(ids ...uint64) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) AddRoles(g ...*GuildRole) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) ClearDisabled() *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) ClearGuilds() *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) ClearLastMembershipVideoIDMiss() *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) ClearMembershipVideoID() *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) ClearMemberships() *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) ClearRoles() *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) Exec(ctx context.Context) error
- func (yttu *YouTubeTalentUpdate) ExecX(ctx context.Context)
- func (yttu *YouTubeTalentUpdate) Mutation() *YouTubeTalentMutation
- func (yttu *YouTubeTalentUpdate) RemoveGuildIDs(ids ...uint64) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) RemoveGuilds(g ...*Guild) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) RemoveMembershipIDs(ids ...int) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) RemoveMemberships(u ...*UserMembership) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) RemoveRoleIDs(ids ...uint64) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) RemoveRoles(g ...*GuildRole) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) Save(ctx context.Context) (int, error)
- func (yttu *YouTubeTalentUpdate) SaveX(ctx context.Context) int
- func (yttu *YouTubeTalentUpdate) SetChannelName(s string) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetDisabled(t time.Time) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetDisabledPermanently(b bool) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetLastMembershipVideoIDMiss(t time.Time) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetLastUpdated(t time.Time) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetMembershipVideoID(s string) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetNillableDisabled(t *time.Time) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetNillableDisabledPermanently(b *bool) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetNillableLastMembershipVideoIDMiss(t *time.Time) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetNillableLastUpdated(t *time.Time) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetNillableMembershipVideoID(s *string) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) SetThumbnailURL(s string) *YouTubeTalentUpdate
- func (yttu *YouTubeTalentUpdate) Where(ps ...predicate.YouTubeTalent) *YouTubeTalentUpdate
- type YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) AddGuildIDs(ids ...uint64) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) AddGuilds(g ...*Guild) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) AddMembershipIDs(ids ...int) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) AddMemberships(u ...*UserMembership) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) AddRoleIDs(ids ...uint64) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) AddRoles(g ...*GuildRole) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) ClearDisabled() *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) ClearGuilds() *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) ClearLastMembershipVideoIDMiss() *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) ClearMembershipVideoID() *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) ClearMemberships() *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) ClearRoles() *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) Exec(ctx context.Context) error
- func (yttuo *YouTubeTalentUpdateOne) ExecX(ctx context.Context)
- func (yttuo *YouTubeTalentUpdateOne) Mutation() *YouTubeTalentMutation
- func (yttuo *YouTubeTalentUpdateOne) RemoveGuildIDs(ids ...uint64) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) RemoveGuilds(g ...*Guild) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) RemoveMembershipIDs(ids ...int) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) RemoveMemberships(u ...*UserMembership) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) RemoveRoleIDs(ids ...uint64) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) RemoveRoles(g ...*GuildRole) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) Save(ctx context.Context) (*YouTubeTalent, error)
- func (yttuo *YouTubeTalentUpdateOne) SaveX(ctx context.Context) *YouTubeTalent
- func (yttuo *YouTubeTalentUpdateOne) Select(field string, fields ...string) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetChannelName(s string) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetDisabled(t time.Time) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetDisabledPermanently(b bool) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetLastMembershipVideoIDMiss(t time.Time) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetLastUpdated(t time.Time) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetMembershipVideoID(s string) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetNillableDisabled(t *time.Time) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetNillableDisabledPermanently(b *bool) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetNillableLastMembershipVideoIDMiss(t *time.Time) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetNillableLastUpdated(t *time.Time) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetNillableMembershipVideoID(s *string) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) SetThumbnailURL(s string) *YouTubeTalentUpdateOne
- func (yttuo *YouTubeTalentUpdateOne) Where(ps ...predicate.YouTubeTalent) *YouTubeTalentUpdateOne
- type YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) ClearDisabled() *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) ClearLastMembershipVideoIDMiss() *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) ClearMembershipVideoID() *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) SetChannelName(v string) *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) SetDisabled(v time.Time) *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) SetDisabledPermanently(v bool) *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) SetLastMembershipVideoIDMiss(v time.Time) *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) SetLastUpdated(v time.Time) *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) SetMembershipVideoID(v string) *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) SetThumbnailURL(v string) *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) UpdateChannelName() *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) UpdateDisabled() *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) UpdateDisabledPermanently() *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) UpdateLastMembershipVideoIDMiss() *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) UpdateLastUpdated() *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) UpdateMembershipVideoID() *YouTubeTalentUpsert
- func (u *YouTubeTalentUpsert) UpdateThumbnailURL() *YouTubeTalentUpsert
- type YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) ClearDisabled() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) ClearLastMembershipVideoIDMiss() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) ClearMembershipVideoID() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) DoNothing() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) Exec(ctx context.Context) error
- func (u *YouTubeTalentUpsertBulk) ExecX(ctx context.Context)
- func (u *YouTubeTalentUpsertBulk) Ignore() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) SetChannelName(v string) *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) SetDisabled(v time.Time) *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) SetDisabledPermanently(v bool) *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) SetLastMembershipVideoIDMiss(v time.Time) *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) SetLastUpdated(v time.Time) *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) SetMembershipVideoID(v string) *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) SetThumbnailURL(v string) *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) Update(set func(*YouTubeTalentUpsert)) *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) UpdateChannelName() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) UpdateDisabled() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) UpdateDisabledPermanently() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) UpdateLastMembershipVideoIDMiss() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) UpdateLastUpdated() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) UpdateMembershipVideoID() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) UpdateNewValues() *YouTubeTalentUpsertBulk
- func (u *YouTubeTalentUpsertBulk) UpdateThumbnailURL() *YouTubeTalentUpsertBulk
- type YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) ClearDisabled() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) ClearLastMembershipVideoIDMiss() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) ClearMembershipVideoID() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) DoNothing() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) Exec(ctx context.Context) error
- func (u *YouTubeTalentUpsertOne) ExecX(ctx context.Context)
- func (u *YouTubeTalentUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *YouTubeTalentUpsertOne) IDX(ctx context.Context) string
- func (u *YouTubeTalentUpsertOne) Ignore() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) SetChannelName(v string) *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) SetDisabled(v time.Time) *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) SetDisabledPermanently(v bool) *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) SetLastMembershipVideoIDMiss(v time.Time) *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) SetLastUpdated(v time.Time) *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) SetMembershipVideoID(v string) *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) SetThumbnailURL(v string) *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) Update(set func(*YouTubeTalentUpsert)) *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) UpdateChannelName() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) UpdateDisabled() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) UpdateDisabledPermanently() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) UpdateLastMembershipVideoIDMiss() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) UpdateLastUpdated() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) UpdateMembershipVideoID() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) UpdateNewValues() *YouTubeTalentUpsertOne
- func (u *YouTubeTalentUpsertOne) UpdateThumbnailURL() *YouTubeTalentUpsertOne
- type YouTubeTalents
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeGuild = "Guild" TypeGuildRole = "GuildRole" TypeUser = "User" TypeUserMembership = "UserMembership" TypeYouTubeTalent = "YouTubeTalent" )
Variables ¶
This section is empty.
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(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Guild is the client for interacting with the Guild builders. Guild *GuildClient // GuildRole is the client for interacting with the GuildRole builders. GuildRole *GuildRoleClient // User is the client for interacting with the User builders. User *UserClient // UserMembership is the client for interacting with the UserMembership builders. UserMembership *UserMembershipClient // YouTubeTalent is the client for interacting with the YouTubeTalent builders. YouTubeTalent *YouTubeTalentClient // 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(). Guild. 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 Guild ¶
type Guild struct { // ID of the ent. // Discord guild ID ID uint64 `json:"id,omitempty"` // Discord guild name Name string `json:"name,omitempty"` // Discord guild icon hash IconHash string `json:"icon_hash,omitempty"` // Audit log channel ID AuditChannel uint64 `json:"audit_channel,omitempty"` // IETF BCP 47 language tag Language guild.Language `json:"language,omitempty"` // Discord snowflakes of users and groups that can modify server settings. The first snowflake is always the server owner. AdminSnowflakes []uint64 `json:"admin_snowflakes,omitempty"` // Discord snowflakes of users and groups that can read server settings ModeratorSnowflakes []uint64 `json:"moderator_snowflakes,omitempty"` // Settings holds the value of the "settings" field. Settings *schema.GuildSettings `json:"settings,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GuildQuery when eager-loading is set. Edges GuildEdges `json:"edges"` // contains filtered or unexported fields }
Guild is the model entity for the Guild schema.
func (*Guild) QueryAdmins ¶
QueryAdmins queries the "admins" edge of the Guild entity.
func (*Guild) QueryMembers ¶
QueryMembers queries the "members" edge of the Guild entity.
func (*Guild) QueryRoles ¶
func (gu *Guild) QueryRoles() *GuildRoleQuery
QueryRoles queries the "roles" edge of the Guild entity.
func (*Guild) QueryYoutubeTalents ¶
func (gu *Guild) QueryYoutubeTalents() *YouTubeTalentQuery
QueryYoutubeTalents queries the "youtube_talents" edge of the Guild entity.
func (*Guild) Unwrap ¶
Unwrap unwraps the Guild 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 (*Guild) Update ¶
func (gu *Guild) Update() *GuildUpdateOne
Update returns a builder for updating this Guild. Note that you need to call Guild.Unwrap() before calling this method if this Guild was returned from a transaction, and the transaction was committed or rolled back.
type GuildClient ¶
type GuildClient struct {
// contains filtered or unexported fields
}
GuildClient is a client for the Guild schema.
func NewGuildClient ¶
func NewGuildClient(c config) *GuildClient
NewGuildClient returns a client for the Guild from the given config.
func (*GuildClient) Create ¶
func (c *GuildClient) Create() *GuildCreate
Create returns a builder for creating a Guild entity.
func (*GuildClient) CreateBulk ¶
func (c *GuildClient) CreateBulk(builders ...*GuildCreate) *GuildCreateBulk
CreateBulk returns a builder for creating a bulk of Guild entities.
func (*GuildClient) Delete ¶
func (c *GuildClient) Delete() *GuildDelete
Delete returns a delete builder for Guild.
func (*GuildClient) DeleteOne ¶
func (c *GuildClient) DeleteOne(gu *Guild) *GuildDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GuildClient) DeleteOneID ¶
func (c *GuildClient) DeleteOneID(id uint64) *GuildDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GuildClient) GetX ¶
func (c *GuildClient) GetX(ctx context.Context, id uint64) *Guild
GetX is like Get, but panics if an error occurs.
func (*GuildClient) Intercept ¶
func (c *GuildClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `guild.Intercept(f(g(h())))`.
func (*GuildClient) Interceptors ¶
func (c *GuildClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GuildClient) Query ¶
func (c *GuildClient) Query() *GuildQuery
Query returns a query builder for Guild.
func (*GuildClient) QueryAdmins ¶
func (c *GuildClient) QueryAdmins(gu *Guild) *UserQuery
QueryAdmins queries the admins edge of a Guild.
func (*GuildClient) QueryMembers ¶
func (c *GuildClient) QueryMembers(gu *Guild) *UserQuery
QueryMembers queries the members edge of a Guild.
func (*GuildClient) QueryRoles ¶
func (c *GuildClient) QueryRoles(gu *Guild) *GuildRoleQuery
QueryRoles queries the roles edge of a Guild.
func (*GuildClient) QueryYoutubeTalents ¶
func (c *GuildClient) QueryYoutubeTalents(gu *Guild) *YouTubeTalentQuery
QueryYoutubeTalents queries the youtube_talents edge of a Guild.
func (*GuildClient) Update ¶
func (c *GuildClient) Update() *GuildUpdate
Update returns an update builder for Guild.
func (*GuildClient) UpdateOne ¶
func (c *GuildClient) UpdateOne(gu *Guild) *GuildUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GuildClient) UpdateOneID ¶
func (c *GuildClient) UpdateOneID(id uint64) *GuildUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GuildClient) Use ¶
func (c *GuildClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `guild.Hooks(f(g(h())))`.
type GuildCreate ¶
type GuildCreate struct {
// contains filtered or unexported fields
}
GuildCreate is the builder for creating a Guild entity.
func (*GuildCreate) AddAdminIDs ¶
func (gc *GuildCreate) AddAdminIDs(ids ...uint64) *GuildCreate
AddAdminIDs adds the "admins" edge to the User entity by IDs.
func (*GuildCreate) AddAdmins ¶
func (gc *GuildCreate) AddAdmins(u ...*User) *GuildCreate
AddAdmins adds the "admins" edges to the User entity.
func (*GuildCreate) AddMemberIDs ¶
func (gc *GuildCreate) AddMemberIDs(ids ...uint64) *GuildCreate
AddMemberIDs adds the "members" edge to the User entity by IDs.
func (*GuildCreate) AddMembers ¶
func (gc *GuildCreate) AddMembers(u ...*User) *GuildCreate
AddMembers adds the "members" edges to the User entity.
func (*GuildCreate) AddRoleIDs ¶
func (gc *GuildCreate) AddRoleIDs(ids ...uint64) *GuildCreate
AddRoleIDs adds the "roles" edge to the GuildRole entity by IDs.
func (*GuildCreate) AddRoles ¶
func (gc *GuildCreate) AddRoles(g ...*GuildRole) *GuildCreate
AddRoles adds the "roles" edges to the GuildRole entity.
func (*GuildCreate) AddYoutubeTalentIDs ¶
func (gc *GuildCreate) AddYoutubeTalentIDs(ids ...string) *GuildCreate
AddYoutubeTalentIDs adds the "youtube_talents" edge to the YouTubeTalent entity by IDs.
func (*GuildCreate) AddYoutubeTalents ¶
func (gc *GuildCreate) AddYoutubeTalents(y ...*YouTubeTalent) *GuildCreate
AddYoutubeTalents adds the "youtube_talents" edges to the YouTubeTalent entity.
func (*GuildCreate) Exec ¶
func (gc *GuildCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GuildCreate) ExecX ¶
func (gc *GuildCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildCreate) Mutation ¶
func (gc *GuildCreate) Mutation() *GuildMutation
Mutation returns the GuildMutation object of the builder.
func (*GuildCreate) OnConflict ¶
func (gc *GuildCreate) OnConflict(opts ...sql.ConflictOption) *GuildUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Guild.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GuildUpsert) { SetName(v+v). }). Exec(ctx)
func (*GuildCreate) OnConflictColumns ¶
func (gc *GuildCreate) OnConflictColumns(columns ...string) *GuildUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Guild.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GuildCreate) Save ¶
func (gc *GuildCreate) Save(ctx context.Context) (*Guild, error)
Save creates the Guild in the database.
func (*GuildCreate) SaveX ¶
func (gc *GuildCreate) SaveX(ctx context.Context) *Guild
SaveX calls Save and panics if Save returns an error.
func (*GuildCreate) SetAdminSnowflakes ¶
func (gc *GuildCreate) SetAdminSnowflakes(u []uint64) *GuildCreate
SetAdminSnowflakes sets the "admin_snowflakes" field.
func (*GuildCreate) SetAuditChannel ¶
func (gc *GuildCreate) SetAuditChannel(u uint64) *GuildCreate
SetAuditChannel sets the "audit_channel" field.
func (*GuildCreate) SetID ¶
func (gc *GuildCreate) SetID(u uint64) *GuildCreate
SetID sets the "id" field.
func (*GuildCreate) SetIconHash ¶
func (gc *GuildCreate) SetIconHash(s string) *GuildCreate
SetIconHash sets the "icon_hash" field.
func (*GuildCreate) SetLanguage ¶
func (gc *GuildCreate) SetLanguage(gu guild.Language) *GuildCreate
SetLanguage sets the "language" field.
func (*GuildCreate) SetModeratorSnowflakes ¶
func (gc *GuildCreate) SetModeratorSnowflakes(u []uint64) *GuildCreate
SetModeratorSnowflakes sets the "moderator_snowflakes" field.
func (*GuildCreate) SetName ¶
func (gc *GuildCreate) SetName(s string) *GuildCreate
SetName sets the "name" field.
func (*GuildCreate) SetNillableAuditChannel ¶
func (gc *GuildCreate) SetNillableAuditChannel(u *uint64) *GuildCreate
SetNillableAuditChannel sets the "audit_channel" field if the given value is not nil.
func (*GuildCreate) SetNillableIconHash ¶
func (gc *GuildCreate) SetNillableIconHash(s *string) *GuildCreate
SetNillableIconHash sets the "icon_hash" field if the given value is not nil.
func (*GuildCreate) SetNillableLanguage ¶
func (gc *GuildCreate) SetNillableLanguage(gu *guild.Language) *GuildCreate
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*GuildCreate) SetSettings ¶
func (gc *GuildCreate) SetSettings(ss *schema.GuildSettings) *GuildCreate
SetSettings sets the "settings" field.
type GuildCreateBulk ¶
type GuildCreateBulk struct {
// contains filtered or unexported fields
}
GuildCreateBulk is the builder for creating many Guild entities in bulk.
func (*GuildCreateBulk) Exec ¶
func (gcb *GuildCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GuildCreateBulk) ExecX ¶
func (gcb *GuildCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildCreateBulk) OnConflict ¶
func (gcb *GuildCreateBulk) OnConflict(opts ...sql.ConflictOption) *GuildUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Guild.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GuildUpsert) { SetName(v+v). }). Exec(ctx)
func (*GuildCreateBulk) OnConflictColumns ¶
func (gcb *GuildCreateBulk) OnConflictColumns(columns ...string) *GuildUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Guild.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type GuildDelete ¶
type GuildDelete struct {
// contains filtered or unexported fields
}
GuildDelete is the builder for deleting a Guild entity.
func (*GuildDelete) Exec ¶
func (gd *GuildDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GuildDelete) ExecX ¶
func (gd *GuildDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GuildDelete) Where ¶
func (gd *GuildDelete) Where(ps ...predicate.Guild) *GuildDelete
Where appends a list predicates to the GuildDelete builder.
type GuildDeleteOne ¶
type GuildDeleteOne struct {
// contains filtered or unexported fields
}
GuildDeleteOne is the builder for deleting a single Guild entity.
func (*GuildDeleteOne) Exec ¶
func (gdo *GuildDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GuildDeleteOne) ExecX ¶
func (gdo *GuildDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildDeleteOne) Where ¶
func (gdo *GuildDeleteOne) Where(ps ...predicate.Guild) *GuildDeleteOne
Where appends a list predicates to the GuildDelete builder.
type GuildEdges ¶
type GuildEdges struct { // Members holds the value of the members edge. Members []*User `json:"members,omitempty"` // Admins holds the value of the admins edge. Admins []*User `json:"admins,omitempty"` // Roles holds the value of the roles edge. Roles []*GuildRole `json:"roles,omitempty"` // YoutubeTalents holds the value of the youtube_talents edge. YoutubeTalents []*YouTubeTalent `json:"youtube_talents,omitempty"` // contains filtered or unexported fields }
GuildEdges holds the relations/edges for other nodes in the graph.
func (GuildEdges) AdminsOrErr ¶
func (e GuildEdges) AdminsOrErr() ([]*User, error)
AdminsOrErr returns the Admins value or an error if the edge was not loaded in eager-loading.
func (GuildEdges) MembersOrErr ¶
func (e GuildEdges) MembersOrErr() ([]*User, error)
MembersOrErr returns the Members value or an error if the edge was not loaded in eager-loading.
func (GuildEdges) RolesOrErr ¶
func (e GuildEdges) RolesOrErr() ([]*GuildRole, error)
RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.
func (GuildEdges) YoutubeTalentsOrErr ¶
func (e GuildEdges) YoutubeTalentsOrErr() ([]*YouTubeTalent, error)
YoutubeTalentsOrErr returns the YoutubeTalents value or an error if the edge was not loaded in eager-loading.
type GuildGroupBy ¶
type GuildGroupBy struct {
// contains filtered or unexported fields
}
GuildGroupBy is the group-by builder for Guild entities.
func (*GuildGroupBy) Aggregate ¶
func (ggb *GuildGroupBy) Aggregate(fns ...AggregateFunc) *GuildGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GuildGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GuildGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GuildGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GuildGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GuildGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GuildGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GuildGroupBy) Scan ¶
func (ggb *GuildGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GuildGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GuildMutation ¶
type GuildMutation struct {
// contains filtered or unexported fields
}
GuildMutation represents an operation that mutates the Guild nodes in the graph.
func (*GuildMutation) AddAdminIDs ¶
func (m *GuildMutation) AddAdminIDs(ids ...uint64)
AddAdminIDs adds the "admins" edge to the User entity by ids.
func (*GuildMutation) AddAuditChannel ¶
func (m *GuildMutation) AddAuditChannel(u int64)
AddAuditChannel adds u to the "audit_channel" field.
func (*GuildMutation) AddField ¶
func (m *GuildMutation) 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 (*GuildMutation) AddMemberIDs ¶
func (m *GuildMutation) AddMemberIDs(ids ...uint64)
AddMemberIDs adds the "members" edge to the User entity by ids.
func (*GuildMutation) AddRoleIDs ¶
func (m *GuildMutation) AddRoleIDs(ids ...uint64)
AddRoleIDs adds the "roles" edge to the GuildRole entity by ids.
func (*GuildMutation) AddYoutubeTalentIDs ¶
func (m *GuildMutation) AddYoutubeTalentIDs(ids ...string)
AddYoutubeTalentIDs adds the "youtube_talents" edge to the YouTubeTalent entity by ids.
func (*GuildMutation) AddedAuditChannel ¶
func (m *GuildMutation) AddedAuditChannel() (r int64, exists bool)
AddedAuditChannel returns the value that was added to the "audit_channel" field in this mutation.
func (*GuildMutation) AddedEdges ¶
func (m *GuildMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GuildMutation) AddedField ¶
func (m *GuildMutation) 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 (*GuildMutation) AddedFields ¶
func (m *GuildMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GuildMutation) AddedIDs ¶
func (m *GuildMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GuildMutation) AdminSnowflakes ¶
func (m *GuildMutation) AdminSnowflakes() (r []uint64, exists bool)
AdminSnowflakes returns the value of the "admin_snowflakes" field in the mutation.
func (*GuildMutation) AdminsCleared ¶
func (m *GuildMutation) AdminsCleared() bool
AdminsCleared reports if the "admins" edge to the User entity was cleared.
func (*GuildMutation) AdminsIDs ¶
func (m *GuildMutation) AdminsIDs() (ids []uint64)
AdminsIDs returns the "admins" edge IDs in the mutation.
func (*GuildMutation) AppendAdminSnowflakes ¶
func (m *GuildMutation) AppendAdminSnowflakes(u []uint64)
AppendAdminSnowflakes adds u to the "admin_snowflakes" field.
func (*GuildMutation) AppendModeratorSnowflakes ¶
func (m *GuildMutation) AppendModeratorSnowflakes(u []uint64)
AppendModeratorSnowflakes adds u to the "moderator_snowflakes" field.
func (*GuildMutation) AppendedAdminSnowflakes ¶
func (m *GuildMutation) AppendedAdminSnowflakes() ([]uint64, bool)
AppendedAdminSnowflakes returns the list of values that were appended to the "admin_snowflakes" field in this mutation.
func (*GuildMutation) AppendedModeratorSnowflakes ¶
func (m *GuildMutation) AppendedModeratorSnowflakes() ([]uint64, bool)
AppendedModeratorSnowflakes returns the list of values that were appended to the "moderator_snowflakes" field in this mutation.
func (*GuildMutation) AuditChannel ¶
func (m *GuildMutation) AuditChannel() (r uint64, exists bool)
AuditChannel returns the value of the "audit_channel" field in the mutation.
func (*GuildMutation) AuditChannelCleared ¶
func (m *GuildMutation) AuditChannelCleared() bool
AuditChannelCleared returns if the "audit_channel" field was cleared in this mutation.
func (*GuildMutation) ClearAdmins ¶
func (m *GuildMutation) ClearAdmins()
ClearAdmins clears the "admins" edge to the User entity.
func (*GuildMutation) ClearAuditChannel ¶
func (m *GuildMutation) ClearAuditChannel()
ClearAuditChannel clears the value of the "audit_channel" field.
func (*GuildMutation) ClearEdge ¶
func (m *GuildMutation) 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 (*GuildMutation) ClearField ¶
func (m *GuildMutation) 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 (*GuildMutation) ClearIconHash ¶
func (m *GuildMutation) ClearIconHash()
ClearIconHash clears the value of the "icon_hash" field.
func (*GuildMutation) ClearMembers ¶
func (m *GuildMutation) ClearMembers()
ClearMembers clears the "members" edge to the User entity.
func (*GuildMutation) ClearModeratorSnowflakes ¶
func (m *GuildMutation) ClearModeratorSnowflakes()
ClearModeratorSnowflakes clears the value of the "moderator_snowflakes" field.
func (*GuildMutation) ClearRoles ¶
func (m *GuildMutation) ClearRoles()
ClearRoles clears the "roles" edge to the GuildRole entity.
func (*GuildMutation) ClearSettings ¶
func (m *GuildMutation) ClearSettings()
ClearSettings clears the value of the "settings" field.
func (*GuildMutation) ClearYoutubeTalents ¶
func (m *GuildMutation) ClearYoutubeTalents()
ClearYoutubeTalents clears the "youtube_talents" edge to the YouTubeTalent entity.
func (*GuildMutation) ClearedEdges ¶
func (m *GuildMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GuildMutation) ClearedFields ¶
func (m *GuildMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GuildMutation) Client ¶
func (m GuildMutation) 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 (*GuildMutation) EdgeCleared ¶
func (m *GuildMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GuildMutation) Field ¶
func (m *GuildMutation) 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 (*GuildMutation) FieldCleared ¶
func (m *GuildMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GuildMutation) Fields ¶
func (m *GuildMutation) 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 (*GuildMutation) ID ¶
func (m *GuildMutation) ID() (id uint64, 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 (*GuildMutation) IDs ¶
func (m *GuildMutation) IDs(ctx context.Context) ([]uint64, 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 (*GuildMutation) IconHash ¶
func (m *GuildMutation) IconHash() (r string, exists bool)
IconHash returns the value of the "icon_hash" field in the mutation.
func (*GuildMutation) IconHashCleared ¶
func (m *GuildMutation) IconHashCleared() bool
IconHashCleared returns if the "icon_hash" field was cleared in this mutation.
func (*GuildMutation) Language ¶
func (m *GuildMutation) Language() (r guild.Language, exists bool)
Language returns the value of the "language" field in the mutation.
func (*GuildMutation) MembersCleared ¶
func (m *GuildMutation) MembersCleared() bool
MembersCleared reports if the "members" edge to the User entity was cleared.
func (*GuildMutation) MembersIDs ¶
func (m *GuildMutation) MembersIDs() (ids []uint64)
MembersIDs returns the "members" edge IDs in the mutation.
func (*GuildMutation) ModeratorSnowflakes ¶
func (m *GuildMutation) ModeratorSnowflakes() (r []uint64, exists bool)
ModeratorSnowflakes returns the value of the "moderator_snowflakes" field in the mutation.
func (*GuildMutation) ModeratorSnowflakesCleared ¶
func (m *GuildMutation) ModeratorSnowflakesCleared() bool
ModeratorSnowflakesCleared returns if the "moderator_snowflakes" field was cleared in this mutation.
func (*GuildMutation) Name ¶
func (m *GuildMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GuildMutation) OldAdminSnowflakes ¶
func (m *GuildMutation) OldAdminSnowflakes(ctx context.Context) (v []uint64, err error)
OldAdminSnowflakes returns the old "admin_snowflakes" field's value of the Guild entity. If the Guild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GuildMutation) OldAuditChannel ¶
func (m *GuildMutation) OldAuditChannel(ctx context.Context) (v uint64, err error)
OldAuditChannel returns the old "audit_channel" field's value of the Guild entity. If the Guild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GuildMutation) 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 (*GuildMutation) OldIconHash ¶
func (m *GuildMutation) OldIconHash(ctx context.Context) (v string, err error)
OldIconHash returns the old "icon_hash" field's value of the Guild entity. If the Guild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GuildMutation) OldLanguage ¶
OldLanguage returns the old "language" field's value of the Guild entity. If the Guild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GuildMutation) OldModeratorSnowflakes ¶
func (m *GuildMutation) OldModeratorSnowflakes(ctx context.Context) (v []uint64, err error)
OldModeratorSnowflakes returns the old "moderator_snowflakes" field's value of the Guild entity. If the Guild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GuildMutation) OldName ¶
func (m *GuildMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Guild entity. If the Guild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GuildMutation) OldSettings ¶
func (m *GuildMutation) OldSettings(ctx context.Context) (v *schema.GuildSettings, err error)
OldSettings returns the old "settings" field's value of the Guild entity. If the Guild object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GuildMutation) RemoveAdminIDs ¶
func (m *GuildMutation) RemoveAdminIDs(ids ...uint64)
RemoveAdminIDs removes the "admins" edge to the User entity by IDs.
func (*GuildMutation) RemoveMemberIDs ¶
func (m *GuildMutation) RemoveMemberIDs(ids ...uint64)
RemoveMemberIDs removes the "members" edge to the User entity by IDs.
func (*GuildMutation) RemoveRoleIDs ¶
func (m *GuildMutation) RemoveRoleIDs(ids ...uint64)
RemoveRoleIDs removes the "roles" edge to the GuildRole entity by IDs.
func (*GuildMutation) RemoveYoutubeTalentIDs ¶
func (m *GuildMutation) RemoveYoutubeTalentIDs(ids ...string)
RemoveYoutubeTalentIDs removes the "youtube_talents" edge to the YouTubeTalent entity by IDs.
func (*GuildMutation) RemovedAdminsIDs ¶
func (m *GuildMutation) RemovedAdminsIDs() (ids []uint64)
RemovedAdmins returns the removed IDs of the "admins" edge to the User entity.
func (*GuildMutation) RemovedEdges ¶
func (m *GuildMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GuildMutation) RemovedIDs ¶
func (m *GuildMutation) 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 (*GuildMutation) RemovedMembersIDs ¶
func (m *GuildMutation) RemovedMembersIDs() (ids []uint64)
RemovedMembers returns the removed IDs of the "members" edge to the User entity.
func (*GuildMutation) RemovedRolesIDs ¶
func (m *GuildMutation) RemovedRolesIDs() (ids []uint64)
RemovedRoles returns the removed IDs of the "roles" edge to the GuildRole entity.
func (*GuildMutation) RemovedYoutubeTalentsIDs ¶
func (m *GuildMutation) RemovedYoutubeTalentsIDs() (ids []string)
RemovedYoutubeTalents returns the removed IDs of the "youtube_talents" edge to the YouTubeTalent entity.
func (*GuildMutation) ResetAdminSnowflakes ¶
func (m *GuildMutation) ResetAdminSnowflakes()
ResetAdminSnowflakes resets all changes to the "admin_snowflakes" field.
func (*GuildMutation) ResetAdmins ¶
func (m *GuildMutation) ResetAdmins()
ResetAdmins resets all changes to the "admins" edge.
func (*GuildMutation) ResetAuditChannel ¶
func (m *GuildMutation) ResetAuditChannel()
ResetAuditChannel resets all changes to the "audit_channel" field.
func (*GuildMutation) ResetEdge ¶
func (m *GuildMutation) 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 (*GuildMutation) ResetField ¶
func (m *GuildMutation) 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 (*GuildMutation) ResetIconHash ¶
func (m *GuildMutation) ResetIconHash()
ResetIconHash resets all changes to the "icon_hash" field.
func (*GuildMutation) ResetLanguage ¶
func (m *GuildMutation) ResetLanguage()
ResetLanguage resets all changes to the "language" field.
func (*GuildMutation) ResetMembers ¶
func (m *GuildMutation) ResetMembers()
ResetMembers resets all changes to the "members" edge.
func (*GuildMutation) ResetModeratorSnowflakes ¶
func (m *GuildMutation) ResetModeratorSnowflakes()
ResetModeratorSnowflakes resets all changes to the "moderator_snowflakes" field.
func (*GuildMutation) ResetName ¶
func (m *GuildMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GuildMutation) ResetRoles ¶
func (m *GuildMutation) ResetRoles()
ResetRoles resets all changes to the "roles" edge.
func (*GuildMutation) ResetSettings ¶
func (m *GuildMutation) ResetSettings()
ResetSettings resets all changes to the "settings" field.
func (*GuildMutation) ResetYoutubeTalents ¶
func (m *GuildMutation) ResetYoutubeTalents()
ResetYoutubeTalents resets all changes to the "youtube_talents" edge.
func (*GuildMutation) RolesCleared ¶
func (m *GuildMutation) RolesCleared() bool
RolesCleared reports if the "roles" edge to the GuildRole entity was cleared.
func (*GuildMutation) RolesIDs ¶
func (m *GuildMutation) RolesIDs() (ids []uint64)
RolesIDs returns the "roles" edge IDs in the mutation.
func (*GuildMutation) SetAdminSnowflakes ¶
func (m *GuildMutation) SetAdminSnowflakes(u []uint64)
SetAdminSnowflakes sets the "admin_snowflakes" field.
func (*GuildMutation) SetAuditChannel ¶
func (m *GuildMutation) SetAuditChannel(u uint64)
SetAuditChannel sets the "audit_channel" field.
func (*GuildMutation) SetField ¶
func (m *GuildMutation) 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 (*GuildMutation) SetID ¶
func (m *GuildMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Guild entities.
func (*GuildMutation) SetIconHash ¶
func (m *GuildMutation) SetIconHash(s string)
SetIconHash sets the "icon_hash" field.
func (*GuildMutation) SetLanguage ¶
func (m *GuildMutation) SetLanguage(gu guild.Language)
SetLanguage sets the "language" field.
func (*GuildMutation) SetModeratorSnowflakes ¶
func (m *GuildMutation) SetModeratorSnowflakes(u []uint64)
SetModeratorSnowflakes sets the "moderator_snowflakes" field.
func (*GuildMutation) SetName ¶
func (m *GuildMutation) SetName(s string)
SetName sets the "name" field.
func (*GuildMutation) SetOp ¶
func (m *GuildMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GuildMutation) SetSettings ¶
func (m *GuildMutation) SetSettings(ss *schema.GuildSettings)
SetSettings sets the "settings" field.
func (*GuildMutation) Settings ¶
func (m *GuildMutation) Settings() (r *schema.GuildSettings, exists bool)
Settings returns the value of the "settings" field in the mutation.
func (*GuildMutation) SettingsCleared ¶
func (m *GuildMutation) SettingsCleared() bool
SettingsCleared returns if the "settings" field was cleared in this mutation.
func (GuildMutation) Tx ¶
func (m GuildMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GuildMutation) Type ¶
func (m *GuildMutation) Type() string
Type returns the node type of this mutation (Guild).
func (*GuildMutation) Where ¶
func (m *GuildMutation) Where(ps ...predicate.Guild)
Where appends a list predicates to the GuildMutation builder.
func (*GuildMutation) WhereP ¶
func (m *GuildMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GuildMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*GuildMutation) YoutubeTalentsCleared ¶
func (m *GuildMutation) YoutubeTalentsCleared() bool
YoutubeTalentsCleared reports if the "youtube_talents" edge to the YouTubeTalent entity was cleared.
func (*GuildMutation) YoutubeTalentsIDs ¶
func (m *GuildMutation) YoutubeTalentsIDs() (ids []string)
YoutubeTalentsIDs returns the "youtube_talents" edge IDs in the mutation.
type GuildQuery ¶
type GuildQuery struct {
// contains filtered or unexported fields
}
GuildQuery is the builder for querying Guild entities.
func (*GuildQuery) Aggregate ¶
func (gq *GuildQuery) Aggregate(fns ...AggregateFunc) *GuildSelect
Aggregate returns a GuildSelect configured with the given aggregations.
func (*GuildQuery) All ¶
func (gq *GuildQuery) All(ctx context.Context) ([]*Guild, error)
All executes the query and returns a list of Guilds.
func (*GuildQuery) AllX ¶
func (gq *GuildQuery) AllX(ctx context.Context) []*Guild
AllX is like All, but panics if an error occurs.
func (*GuildQuery) Clone ¶
func (gq *GuildQuery) Clone() *GuildQuery
Clone returns a duplicate of the GuildQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GuildQuery) Count ¶
func (gq *GuildQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GuildQuery) CountX ¶
func (gq *GuildQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GuildQuery) Exist ¶
func (gq *GuildQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GuildQuery) ExistX ¶
func (gq *GuildQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GuildQuery) First ¶
func (gq *GuildQuery) First(ctx context.Context) (*Guild, error)
First returns the first Guild entity from the query. Returns a *NotFoundError when no Guild was found.
func (*GuildQuery) FirstID ¶
func (gq *GuildQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Guild ID from the query. Returns a *NotFoundError when no Guild ID was found.
func (*GuildQuery) FirstIDX ¶
func (gq *GuildQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*GuildQuery) FirstX ¶
func (gq *GuildQuery) FirstX(ctx context.Context) *Guild
FirstX is like First, but panics if an error occurs.
func (*GuildQuery) ForShare ¶
func (gq *GuildQuery) ForShare(opts ...sql.LockOption) *GuildQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*GuildQuery) ForUpdate ¶
func (gq *GuildQuery) ForUpdate(opts ...sql.LockOption) *GuildQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*GuildQuery) GroupBy ¶
func (gq *GuildQuery) GroupBy(field string, fields ...string) *GuildGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Guild.Query(). GroupBy(guild.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GuildQuery) IDs ¶
func (gq *GuildQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Guild IDs.
func (*GuildQuery) IDsX ¶
func (gq *GuildQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*GuildQuery) Limit ¶
func (gq *GuildQuery) Limit(limit int) *GuildQuery
Limit the number of records to be returned by this query.
func (*GuildQuery) Offset ¶
func (gq *GuildQuery) Offset(offset int) *GuildQuery
Offset to start from.
func (*GuildQuery) Only ¶
func (gq *GuildQuery) Only(ctx context.Context) (*Guild, error)
Only returns a single Guild entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Guild entity is found. Returns a *NotFoundError when no Guild entities are found.
func (*GuildQuery) OnlyID ¶
func (gq *GuildQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Guild ID in the query. Returns a *NotSingularError when more than one Guild ID is found. Returns a *NotFoundError when no entities are found.
func (*GuildQuery) OnlyIDX ¶
func (gq *GuildQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GuildQuery) OnlyX ¶
func (gq *GuildQuery) OnlyX(ctx context.Context) *Guild
OnlyX is like Only, but panics if an error occurs.
func (*GuildQuery) Order ¶
func (gq *GuildQuery) Order(o ...guild.OrderOption) *GuildQuery
Order specifies how the records should be ordered.
func (*GuildQuery) QueryAdmins ¶
func (gq *GuildQuery) QueryAdmins() *UserQuery
QueryAdmins chains the current query on the "admins" edge.
func (*GuildQuery) QueryMembers ¶
func (gq *GuildQuery) QueryMembers() *UserQuery
QueryMembers chains the current query on the "members" edge.
func (*GuildQuery) QueryRoles ¶
func (gq *GuildQuery) QueryRoles() *GuildRoleQuery
QueryRoles chains the current query on the "roles" edge.
func (*GuildQuery) QueryYoutubeTalents ¶
func (gq *GuildQuery) QueryYoutubeTalents() *YouTubeTalentQuery
QueryYoutubeTalents chains the current query on the "youtube_talents" edge.
func (*GuildQuery) Select ¶
func (gq *GuildQuery) Select(fields ...string) *GuildSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Guild.Query(). Select(guild.FieldName). Scan(ctx, &v)
func (*GuildQuery) Unique ¶
func (gq *GuildQuery) Unique(unique bool) *GuildQuery
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 (*GuildQuery) Where ¶
func (gq *GuildQuery) Where(ps ...predicate.Guild) *GuildQuery
Where adds a new predicate for the GuildQuery builder.
func (*GuildQuery) WithAdmins ¶
func (gq *GuildQuery) WithAdmins(opts ...func(*UserQuery)) *GuildQuery
WithAdmins tells the query-builder to eager-load the nodes that are connected to the "admins" edge. The optional arguments are used to configure the query builder of the edge.
func (*GuildQuery) WithMembers ¶
func (gq *GuildQuery) WithMembers(opts ...func(*UserQuery)) *GuildQuery
WithMembers tells the query-builder to eager-load the nodes that are connected to the "members" edge. The optional arguments are used to configure the query builder of the edge.
func (*GuildQuery) WithRoles ¶
func (gq *GuildQuery) WithRoles(opts ...func(*GuildRoleQuery)) *GuildQuery
WithRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge. The optional arguments are used to configure the query builder of the edge.
func (*GuildQuery) WithYoutubeTalents ¶
func (gq *GuildQuery) WithYoutubeTalents(opts ...func(*YouTubeTalentQuery)) *GuildQuery
WithYoutubeTalents tells the query-builder to eager-load the nodes that are connected to the "youtube_talents" edge. The optional arguments are used to configure the query builder of the edge.
type GuildRole ¶
type GuildRole struct { // ID of the ent. // Discord snowflake for this role ID uint64 `json:"id,omitempty"` // Human name for this role Name string `json:"name,omitempty"` // When the name was last synchronized for this role LastUpdated time.Time `json:"last_updated,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GuildRoleQuery when eager-loading is set. Edges GuildRoleEdges `json:"edges"` // contains filtered or unexported fields }
GuildRole is the model entity for the GuildRole schema.
func (*GuildRole) QueryGuild ¶
func (gr *GuildRole) QueryGuild() *GuildQuery
QueryGuild queries the "guild" edge of the GuildRole entity.
func (*GuildRole) QueryTalent ¶
func (gr *GuildRole) QueryTalent() *YouTubeTalentQuery
QueryTalent queries the "talent" edge of the GuildRole entity.
func (*GuildRole) QueryUserMemberships ¶
func (gr *GuildRole) QueryUserMemberships() *UserMembershipQuery
QueryUserMemberships queries the "user_memberships" edge of the GuildRole entity.
func (*GuildRole) Unwrap ¶
Unwrap unwraps the GuildRole 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 (*GuildRole) Update ¶
func (gr *GuildRole) Update() *GuildRoleUpdateOne
Update returns a builder for updating this GuildRole. Note that you need to call GuildRole.Unwrap() before calling this method if this GuildRole was returned from a transaction, and the transaction was committed or rolled back.
type GuildRoleClient ¶
type GuildRoleClient struct {
// contains filtered or unexported fields
}
GuildRoleClient is a client for the GuildRole schema.
func NewGuildRoleClient ¶
func NewGuildRoleClient(c config) *GuildRoleClient
NewGuildRoleClient returns a client for the GuildRole from the given config.
func (*GuildRoleClient) Create ¶
func (c *GuildRoleClient) Create() *GuildRoleCreate
Create returns a builder for creating a GuildRole entity.
func (*GuildRoleClient) CreateBulk ¶
func (c *GuildRoleClient) CreateBulk(builders ...*GuildRoleCreate) *GuildRoleCreateBulk
CreateBulk returns a builder for creating a bulk of GuildRole entities.
func (*GuildRoleClient) Delete ¶
func (c *GuildRoleClient) Delete() *GuildRoleDelete
Delete returns a delete builder for GuildRole.
func (*GuildRoleClient) DeleteOne ¶
func (c *GuildRoleClient) DeleteOne(gr *GuildRole) *GuildRoleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GuildRoleClient) DeleteOneID ¶
func (c *GuildRoleClient) DeleteOneID(id uint64) *GuildRoleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GuildRoleClient) GetX ¶
func (c *GuildRoleClient) GetX(ctx context.Context, id uint64) *GuildRole
GetX is like Get, but panics if an error occurs.
func (*GuildRoleClient) Hooks ¶
func (c *GuildRoleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GuildRoleClient) Intercept ¶
func (c *GuildRoleClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `guildrole.Intercept(f(g(h())))`.
func (*GuildRoleClient) Interceptors ¶
func (c *GuildRoleClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GuildRoleClient) Query ¶
func (c *GuildRoleClient) Query() *GuildRoleQuery
Query returns a query builder for GuildRole.
func (*GuildRoleClient) QueryGuild ¶
func (c *GuildRoleClient) QueryGuild(gr *GuildRole) *GuildQuery
QueryGuild queries the guild edge of a GuildRole.
func (*GuildRoleClient) QueryTalent ¶
func (c *GuildRoleClient) QueryTalent(gr *GuildRole) *YouTubeTalentQuery
QueryTalent queries the talent edge of a GuildRole.
func (*GuildRoleClient) QueryUserMemberships ¶
func (c *GuildRoleClient) QueryUserMemberships(gr *GuildRole) *UserMembershipQuery
QueryUserMemberships queries the user_memberships edge of a GuildRole.
func (*GuildRoleClient) Update ¶
func (c *GuildRoleClient) Update() *GuildRoleUpdate
Update returns an update builder for GuildRole.
func (*GuildRoleClient) UpdateOne ¶
func (c *GuildRoleClient) UpdateOne(gr *GuildRole) *GuildRoleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GuildRoleClient) UpdateOneID ¶
func (c *GuildRoleClient) UpdateOneID(id uint64) *GuildRoleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GuildRoleClient) Use ¶
func (c *GuildRoleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `guildrole.Hooks(f(g(h())))`.
type GuildRoleCreate ¶
type GuildRoleCreate struct {
// contains filtered or unexported fields
}
GuildRoleCreate is the builder for creating a GuildRole entity.
func (*GuildRoleCreate) AddUserMembershipIDs ¶
func (grc *GuildRoleCreate) AddUserMembershipIDs(ids ...int) *GuildRoleCreate
AddUserMembershipIDs adds the "user_memberships" edge to the UserMembership entity by IDs.
func (*GuildRoleCreate) AddUserMemberships ¶
func (grc *GuildRoleCreate) AddUserMemberships(u ...*UserMembership) *GuildRoleCreate
AddUserMemberships adds the "user_memberships" edges to the UserMembership entity.
func (*GuildRoleCreate) Exec ¶
func (grc *GuildRoleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GuildRoleCreate) ExecX ¶
func (grc *GuildRoleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildRoleCreate) Mutation ¶
func (grc *GuildRoleCreate) Mutation() *GuildRoleMutation
Mutation returns the GuildRoleMutation object of the builder.
func (*GuildRoleCreate) OnConflict ¶
func (grc *GuildRoleCreate) OnConflict(opts ...sql.ConflictOption) *GuildRoleUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GuildRole.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GuildRoleUpsert) { SetName(v+v). }). Exec(ctx)
func (*GuildRoleCreate) OnConflictColumns ¶
func (grc *GuildRoleCreate) OnConflictColumns(columns ...string) *GuildRoleUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GuildRole.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GuildRoleCreate) Save ¶
func (grc *GuildRoleCreate) Save(ctx context.Context) (*GuildRole, error)
Save creates the GuildRole in the database.
func (*GuildRoleCreate) SaveX ¶
func (grc *GuildRoleCreate) SaveX(ctx context.Context) *GuildRole
SaveX calls Save and panics if Save returns an error.
func (*GuildRoleCreate) SetGuild ¶
func (grc *GuildRoleCreate) SetGuild(g *Guild) *GuildRoleCreate
SetGuild sets the "guild" edge to the Guild entity.
func (*GuildRoleCreate) SetGuildID ¶
func (grc *GuildRoleCreate) SetGuildID(id uint64) *GuildRoleCreate
SetGuildID sets the "guild" edge to the Guild entity by ID.
func (*GuildRoleCreate) SetID ¶
func (grc *GuildRoleCreate) SetID(u uint64) *GuildRoleCreate
SetID sets the "id" field.
func (*GuildRoleCreate) SetLastUpdated ¶
func (grc *GuildRoleCreate) SetLastUpdated(t time.Time) *GuildRoleCreate
SetLastUpdated sets the "last_updated" field.
func (*GuildRoleCreate) SetName ¶
func (grc *GuildRoleCreate) SetName(s string) *GuildRoleCreate
SetName sets the "name" field.
func (*GuildRoleCreate) SetNillableLastUpdated ¶
func (grc *GuildRoleCreate) SetNillableLastUpdated(t *time.Time) *GuildRoleCreate
SetNillableLastUpdated sets the "last_updated" field if the given value is not nil.
func (*GuildRoleCreate) SetNillableTalentID ¶
func (grc *GuildRoleCreate) SetNillableTalentID(id *string) *GuildRoleCreate
SetNillableTalentID sets the "talent" edge to the YouTubeTalent entity by ID if the given value is not nil.
func (*GuildRoleCreate) SetTalent ¶
func (grc *GuildRoleCreate) SetTalent(y *YouTubeTalent) *GuildRoleCreate
SetTalent sets the "talent" edge to the YouTubeTalent entity.
func (*GuildRoleCreate) SetTalentID ¶
func (grc *GuildRoleCreate) SetTalentID(id string) *GuildRoleCreate
SetTalentID sets the "talent" edge to the YouTubeTalent entity by ID.
type GuildRoleCreateBulk ¶
type GuildRoleCreateBulk struct {
// contains filtered or unexported fields
}
GuildRoleCreateBulk is the builder for creating many GuildRole entities in bulk.
func (*GuildRoleCreateBulk) Exec ¶
func (grcb *GuildRoleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GuildRoleCreateBulk) ExecX ¶
func (grcb *GuildRoleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildRoleCreateBulk) OnConflict ¶
func (grcb *GuildRoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *GuildRoleUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GuildRole.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GuildRoleUpsert) { SetName(v+v). }). Exec(ctx)
func (*GuildRoleCreateBulk) OnConflictColumns ¶
func (grcb *GuildRoleCreateBulk) OnConflictColumns(columns ...string) *GuildRoleUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GuildRole.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type GuildRoleDelete ¶
type GuildRoleDelete struct {
// contains filtered or unexported fields
}
GuildRoleDelete is the builder for deleting a GuildRole entity.
func (*GuildRoleDelete) Exec ¶
func (grd *GuildRoleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GuildRoleDelete) ExecX ¶
func (grd *GuildRoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GuildRoleDelete) Where ¶
func (grd *GuildRoleDelete) Where(ps ...predicate.GuildRole) *GuildRoleDelete
Where appends a list predicates to the GuildRoleDelete builder.
type GuildRoleDeleteOne ¶
type GuildRoleDeleteOne struct {
// contains filtered or unexported fields
}
GuildRoleDeleteOne is the builder for deleting a single GuildRole entity.
func (*GuildRoleDeleteOne) Exec ¶
func (grdo *GuildRoleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GuildRoleDeleteOne) ExecX ¶
func (grdo *GuildRoleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildRoleDeleteOne) Where ¶
func (grdo *GuildRoleDeleteOne) Where(ps ...predicate.GuildRole) *GuildRoleDeleteOne
Where appends a list predicates to the GuildRoleDelete builder.
type GuildRoleEdges ¶
type GuildRoleEdges struct { // Guild holds the value of the guild edge. Guild *Guild `json:"guild,omitempty"` // UserMemberships holds the value of the user_memberships edge. UserMemberships []*UserMembership `json:"user_memberships,omitempty"` // Talent holds the value of the talent edge. Talent *YouTubeTalent `json:"talent,omitempty"` // contains filtered or unexported fields }
GuildRoleEdges holds the relations/edges for other nodes in the graph.
func (GuildRoleEdges) GuildOrErr ¶
func (e GuildRoleEdges) GuildOrErr() (*Guild, error)
GuildOrErr returns the Guild value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GuildRoleEdges) TalentOrErr ¶
func (e GuildRoleEdges) TalentOrErr() (*YouTubeTalent, error)
TalentOrErr returns the Talent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GuildRoleEdges) UserMembershipsOrErr ¶
func (e GuildRoleEdges) UserMembershipsOrErr() ([]*UserMembership, error)
UserMembershipsOrErr returns the UserMemberships value or an error if the edge was not loaded in eager-loading.
type GuildRoleGroupBy ¶
type GuildRoleGroupBy struct {
// contains filtered or unexported fields
}
GuildRoleGroupBy is the group-by builder for GuildRole entities.
func (*GuildRoleGroupBy) Aggregate ¶
func (grgb *GuildRoleGroupBy) Aggregate(fns ...AggregateFunc) *GuildRoleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GuildRoleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GuildRoleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GuildRoleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GuildRoleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GuildRoleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GuildRoleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GuildRoleGroupBy) Scan ¶
func (grgb *GuildRoleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GuildRoleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GuildRoleMutation ¶
type GuildRoleMutation struct {
// contains filtered or unexported fields
}
GuildRoleMutation represents an operation that mutates the GuildRole nodes in the graph.
func (*GuildRoleMutation) AddField ¶
func (m *GuildRoleMutation) 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 (*GuildRoleMutation) AddUserMembershipIDs ¶
func (m *GuildRoleMutation) AddUserMembershipIDs(ids ...int)
AddUserMembershipIDs adds the "user_memberships" edge to the UserMembership entity by ids.
func (*GuildRoleMutation) AddedEdges ¶
func (m *GuildRoleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GuildRoleMutation) AddedField ¶
func (m *GuildRoleMutation) 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 (*GuildRoleMutation) AddedFields ¶
func (m *GuildRoleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GuildRoleMutation) AddedIDs ¶
func (m *GuildRoleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GuildRoleMutation) ClearEdge ¶
func (m *GuildRoleMutation) 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 (*GuildRoleMutation) ClearField ¶
func (m *GuildRoleMutation) 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 (*GuildRoleMutation) ClearGuild ¶
func (m *GuildRoleMutation) ClearGuild()
ClearGuild clears the "guild" edge to the Guild entity.
func (*GuildRoleMutation) ClearTalent ¶
func (m *GuildRoleMutation) ClearTalent()
ClearTalent clears the "talent" edge to the YouTubeTalent entity.
func (*GuildRoleMutation) ClearUserMemberships ¶
func (m *GuildRoleMutation) ClearUserMemberships()
ClearUserMemberships clears the "user_memberships" edge to the UserMembership entity.
func (*GuildRoleMutation) ClearedEdges ¶
func (m *GuildRoleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GuildRoleMutation) ClearedFields ¶
func (m *GuildRoleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GuildRoleMutation) Client ¶
func (m GuildRoleMutation) 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 (*GuildRoleMutation) EdgeCleared ¶
func (m *GuildRoleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GuildRoleMutation) Field ¶
func (m *GuildRoleMutation) 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 (*GuildRoleMutation) FieldCleared ¶
func (m *GuildRoleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GuildRoleMutation) Fields ¶
func (m *GuildRoleMutation) 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 (*GuildRoleMutation) GuildCleared ¶
func (m *GuildRoleMutation) GuildCleared() bool
GuildCleared reports if the "guild" edge to the Guild entity was cleared.
func (*GuildRoleMutation) GuildID ¶
func (m *GuildRoleMutation) GuildID() (id uint64, exists bool)
GuildID returns the "guild" edge ID in the mutation.
func (*GuildRoleMutation) GuildIDs ¶
func (m *GuildRoleMutation) GuildIDs() (ids []uint64)
GuildIDs returns the "guild" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GuildID instead. It exists only for internal usage by the builders.
func (*GuildRoleMutation) ID ¶
func (m *GuildRoleMutation) ID() (id uint64, 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 (*GuildRoleMutation) IDs ¶
func (m *GuildRoleMutation) IDs(ctx context.Context) ([]uint64, 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 (*GuildRoleMutation) LastUpdated ¶
func (m *GuildRoleMutation) LastUpdated() (r time.Time, exists bool)
LastUpdated returns the value of the "last_updated" field in the mutation.
func (*GuildRoleMutation) Name ¶
func (m *GuildRoleMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GuildRoleMutation) 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 (*GuildRoleMutation) OldLastUpdated ¶
OldLastUpdated returns the old "last_updated" field's value of the GuildRole entity. If the GuildRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GuildRoleMutation) OldName ¶
func (m *GuildRoleMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the GuildRole entity. If the GuildRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GuildRoleMutation) RemoveUserMembershipIDs ¶
func (m *GuildRoleMutation) RemoveUserMembershipIDs(ids ...int)
RemoveUserMembershipIDs removes the "user_memberships" edge to the UserMembership entity by IDs.
func (*GuildRoleMutation) RemovedEdges ¶
func (m *GuildRoleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GuildRoleMutation) RemovedIDs ¶
func (m *GuildRoleMutation) 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 (*GuildRoleMutation) RemovedUserMembershipsIDs ¶
func (m *GuildRoleMutation) RemovedUserMembershipsIDs() (ids []int)
RemovedUserMemberships returns the removed IDs of the "user_memberships" edge to the UserMembership entity.
func (*GuildRoleMutation) ResetEdge ¶
func (m *GuildRoleMutation) 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 (*GuildRoleMutation) ResetField ¶
func (m *GuildRoleMutation) 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 (*GuildRoleMutation) ResetGuild ¶
func (m *GuildRoleMutation) ResetGuild()
ResetGuild resets all changes to the "guild" edge.
func (*GuildRoleMutation) ResetLastUpdated ¶
func (m *GuildRoleMutation) ResetLastUpdated()
ResetLastUpdated resets all changes to the "last_updated" field.
func (*GuildRoleMutation) ResetName ¶
func (m *GuildRoleMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GuildRoleMutation) ResetTalent ¶
func (m *GuildRoleMutation) ResetTalent()
ResetTalent resets all changes to the "talent" edge.
func (*GuildRoleMutation) ResetUserMemberships ¶
func (m *GuildRoleMutation) ResetUserMemberships()
ResetUserMemberships resets all changes to the "user_memberships" edge.
func (*GuildRoleMutation) SetField ¶
func (m *GuildRoleMutation) 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 (*GuildRoleMutation) SetGuildID ¶
func (m *GuildRoleMutation) SetGuildID(id uint64)
SetGuildID sets the "guild" edge to the Guild entity by id.
func (*GuildRoleMutation) SetID ¶
func (m *GuildRoleMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GuildRole entities.
func (*GuildRoleMutation) SetLastUpdated ¶
func (m *GuildRoleMutation) SetLastUpdated(t time.Time)
SetLastUpdated sets the "last_updated" field.
func (*GuildRoleMutation) SetName ¶
func (m *GuildRoleMutation) SetName(s string)
SetName sets the "name" field.
func (*GuildRoleMutation) SetOp ¶
func (m *GuildRoleMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GuildRoleMutation) SetTalentID ¶
func (m *GuildRoleMutation) SetTalentID(id string)
SetTalentID sets the "talent" edge to the YouTubeTalent entity by id.
func (*GuildRoleMutation) TalentCleared ¶
func (m *GuildRoleMutation) TalentCleared() bool
TalentCleared reports if the "talent" edge to the YouTubeTalent entity was cleared.
func (*GuildRoleMutation) TalentID ¶
func (m *GuildRoleMutation) TalentID() (id string, exists bool)
TalentID returns the "talent" edge ID in the mutation.
func (*GuildRoleMutation) TalentIDs ¶
func (m *GuildRoleMutation) TalentIDs() (ids []string)
TalentIDs returns the "talent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TalentID instead. It exists only for internal usage by the builders.
func (GuildRoleMutation) Tx ¶
func (m GuildRoleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GuildRoleMutation) Type ¶
func (m *GuildRoleMutation) Type() string
Type returns the node type of this mutation (GuildRole).
func (*GuildRoleMutation) UserMembershipsCleared ¶
func (m *GuildRoleMutation) UserMembershipsCleared() bool
UserMembershipsCleared reports if the "user_memberships" edge to the UserMembership entity was cleared.
func (*GuildRoleMutation) UserMembershipsIDs ¶
func (m *GuildRoleMutation) UserMembershipsIDs() (ids []int)
UserMembershipsIDs returns the "user_memberships" edge IDs in the mutation.
func (*GuildRoleMutation) Where ¶
func (m *GuildRoleMutation) Where(ps ...predicate.GuildRole)
Where appends a list predicates to the GuildRoleMutation builder.
func (*GuildRoleMutation) WhereP ¶
func (m *GuildRoleMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GuildRoleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GuildRoleQuery ¶
type GuildRoleQuery struct {
// contains filtered or unexported fields
}
GuildRoleQuery is the builder for querying GuildRole entities.
func (*GuildRoleQuery) Aggregate ¶
func (grq *GuildRoleQuery) Aggregate(fns ...AggregateFunc) *GuildRoleSelect
Aggregate returns a GuildRoleSelect configured with the given aggregations.
func (*GuildRoleQuery) All ¶
func (grq *GuildRoleQuery) All(ctx context.Context) ([]*GuildRole, error)
All executes the query and returns a list of GuildRoles.
func (*GuildRoleQuery) AllX ¶
func (grq *GuildRoleQuery) AllX(ctx context.Context) []*GuildRole
AllX is like All, but panics if an error occurs.
func (*GuildRoleQuery) Clone ¶
func (grq *GuildRoleQuery) Clone() *GuildRoleQuery
Clone returns a duplicate of the GuildRoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GuildRoleQuery) Count ¶
func (grq *GuildRoleQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GuildRoleQuery) CountX ¶
func (grq *GuildRoleQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GuildRoleQuery) Exist ¶
func (grq *GuildRoleQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GuildRoleQuery) ExistX ¶
func (grq *GuildRoleQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GuildRoleQuery) First ¶
func (grq *GuildRoleQuery) First(ctx context.Context) (*GuildRole, error)
First returns the first GuildRole entity from the query. Returns a *NotFoundError when no GuildRole was found.
func (*GuildRoleQuery) FirstID ¶
func (grq *GuildRoleQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first GuildRole ID from the query. Returns a *NotFoundError when no GuildRole ID was found.
func (*GuildRoleQuery) FirstIDX ¶
func (grq *GuildRoleQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*GuildRoleQuery) FirstX ¶
func (grq *GuildRoleQuery) FirstX(ctx context.Context) *GuildRole
FirstX is like First, but panics if an error occurs.
func (*GuildRoleQuery) ForShare ¶
func (grq *GuildRoleQuery) ForShare(opts ...sql.LockOption) *GuildRoleQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*GuildRoleQuery) ForUpdate ¶
func (grq *GuildRoleQuery) ForUpdate(opts ...sql.LockOption) *GuildRoleQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*GuildRoleQuery) GroupBy ¶
func (grq *GuildRoleQuery) GroupBy(field string, fields ...string) *GuildRoleGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.GuildRole.Query(). GroupBy(guildrole.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GuildRoleQuery) IDs ¶
func (grq *GuildRoleQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of GuildRole IDs.
func (*GuildRoleQuery) IDsX ¶
func (grq *GuildRoleQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*GuildRoleQuery) Limit ¶
func (grq *GuildRoleQuery) Limit(limit int) *GuildRoleQuery
Limit the number of records to be returned by this query.
func (*GuildRoleQuery) Offset ¶
func (grq *GuildRoleQuery) Offset(offset int) *GuildRoleQuery
Offset to start from.
func (*GuildRoleQuery) Only ¶
func (grq *GuildRoleQuery) Only(ctx context.Context) (*GuildRole, error)
Only returns a single GuildRole entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GuildRole entity is found. Returns a *NotFoundError when no GuildRole entities are found.
func (*GuildRoleQuery) OnlyID ¶
func (grq *GuildRoleQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only GuildRole ID in the query. Returns a *NotSingularError when more than one GuildRole ID is found. Returns a *NotFoundError when no entities are found.
func (*GuildRoleQuery) OnlyIDX ¶
func (grq *GuildRoleQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GuildRoleQuery) OnlyX ¶
func (grq *GuildRoleQuery) OnlyX(ctx context.Context) *GuildRole
OnlyX is like Only, but panics if an error occurs.
func (*GuildRoleQuery) Order ¶
func (grq *GuildRoleQuery) Order(o ...guildrole.OrderOption) *GuildRoleQuery
Order specifies how the records should be ordered.
func (*GuildRoleQuery) QueryGuild ¶
func (grq *GuildRoleQuery) QueryGuild() *GuildQuery
QueryGuild chains the current query on the "guild" edge.
func (*GuildRoleQuery) QueryTalent ¶
func (grq *GuildRoleQuery) QueryTalent() *YouTubeTalentQuery
QueryTalent chains the current query on the "talent" edge.
func (*GuildRoleQuery) QueryUserMemberships ¶
func (grq *GuildRoleQuery) QueryUserMemberships() *UserMembershipQuery
QueryUserMemberships chains the current query on the "user_memberships" edge.
func (*GuildRoleQuery) Select ¶
func (grq *GuildRoleQuery) Select(fields ...string) *GuildRoleSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.GuildRole.Query(). Select(guildrole.FieldName). Scan(ctx, &v)
func (*GuildRoleQuery) Unique ¶
func (grq *GuildRoleQuery) Unique(unique bool) *GuildRoleQuery
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 (*GuildRoleQuery) Where ¶
func (grq *GuildRoleQuery) Where(ps ...predicate.GuildRole) *GuildRoleQuery
Where adds a new predicate for the GuildRoleQuery builder.
func (*GuildRoleQuery) WithGuild ¶
func (grq *GuildRoleQuery) WithGuild(opts ...func(*GuildQuery)) *GuildRoleQuery
WithGuild tells the query-builder to eager-load the nodes that are connected to the "guild" edge. The optional arguments are used to configure the query builder of the edge.
func (*GuildRoleQuery) WithTalent ¶
func (grq *GuildRoleQuery) WithTalent(opts ...func(*YouTubeTalentQuery)) *GuildRoleQuery
WithTalent tells the query-builder to eager-load the nodes that are connected to the "talent" edge. The optional arguments are used to configure the query builder of the edge.
func (*GuildRoleQuery) WithUserMemberships ¶
func (grq *GuildRoleQuery) WithUserMemberships(opts ...func(*UserMembershipQuery)) *GuildRoleQuery
WithUserMemberships tells the query-builder to eager-load the nodes that are connected to the "user_memberships" edge. The optional arguments are used to configure the query builder of the edge.
type GuildRoleSelect ¶
type GuildRoleSelect struct { *GuildRoleQuery // contains filtered or unexported fields }
GuildRoleSelect is the builder for selecting fields of GuildRole entities.
func (*GuildRoleSelect) Aggregate ¶
func (grs *GuildRoleSelect) Aggregate(fns ...AggregateFunc) *GuildRoleSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GuildRoleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GuildRoleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GuildRoleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GuildRoleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GuildRoleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GuildRoleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GuildRoleSelect) Scan ¶
func (grs *GuildRoleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GuildRoleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GuildRoleUpdate ¶
type GuildRoleUpdate struct {
// contains filtered or unexported fields
}
GuildRoleUpdate is the builder for updating GuildRole entities.
func (*GuildRoleUpdate) AddUserMembershipIDs ¶
func (gru *GuildRoleUpdate) AddUserMembershipIDs(ids ...int) *GuildRoleUpdate
AddUserMembershipIDs adds the "user_memberships" edge to the UserMembership entity by IDs.
func (*GuildRoleUpdate) AddUserMemberships ¶
func (gru *GuildRoleUpdate) AddUserMemberships(u ...*UserMembership) *GuildRoleUpdate
AddUserMemberships adds the "user_memberships" edges to the UserMembership entity.
func (*GuildRoleUpdate) ClearGuild ¶
func (gru *GuildRoleUpdate) ClearGuild() *GuildRoleUpdate
ClearGuild clears the "guild" edge to the Guild entity.
func (*GuildRoleUpdate) ClearTalent ¶
func (gru *GuildRoleUpdate) ClearTalent() *GuildRoleUpdate
ClearTalent clears the "talent" edge to the YouTubeTalent entity.
func (*GuildRoleUpdate) ClearUserMemberships ¶
func (gru *GuildRoleUpdate) ClearUserMemberships() *GuildRoleUpdate
ClearUserMemberships clears all "user_memberships" edges to the UserMembership entity.
func (*GuildRoleUpdate) Exec ¶
func (gru *GuildRoleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GuildRoleUpdate) ExecX ¶
func (gru *GuildRoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildRoleUpdate) Mutation ¶
func (gru *GuildRoleUpdate) Mutation() *GuildRoleMutation
Mutation returns the GuildRoleMutation object of the builder.
func (*GuildRoleUpdate) RemoveUserMembershipIDs ¶
func (gru *GuildRoleUpdate) RemoveUserMembershipIDs(ids ...int) *GuildRoleUpdate
RemoveUserMembershipIDs removes the "user_memberships" edge to UserMembership entities by IDs.
func (*GuildRoleUpdate) RemoveUserMemberships ¶
func (gru *GuildRoleUpdate) RemoveUserMemberships(u ...*UserMembership) *GuildRoleUpdate
RemoveUserMemberships removes "user_memberships" edges to UserMembership entities.
func (*GuildRoleUpdate) Save ¶
func (gru *GuildRoleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GuildRoleUpdate) SaveX ¶
func (gru *GuildRoleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GuildRoleUpdate) SetGuild ¶
func (gru *GuildRoleUpdate) SetGuild(g *Guild) *GuildRoleUpdate
SetGuild sets the "guild" edge to the Guild entity.
func (*GuildRoleUpdate) SetGuildID ¶
func (gru *GuildRoleUpdate) SetGuildID(id uint64) *GuildRoleUpdate
SetGuildID sets the "guild" edge to the Guild entity by ID.
func (*GuildRoleUpdate) SetLastUpdated ¶
func (gru *GuildRoleUpdate) SetLastUpdated(t time.Time) *GuildRoleUpdate
SetLastUpdated sets the "last_updated" field.
func (*GuildRoleUpdate) SetName ¶
func (gru *GuildRoleUpdate) SetName(s string) *GuildRoleUpdate
SetName sets the "name" field.
func (*GuildRoleUpdate) SetNillableLastUpdated ¶
func (gru *GuildRoleUpdate) SetNillableLastUpdated(t *time.Time) *GuildRoleUpdate
SetNillableLastUpdated sets the "last_updated" field if the given value is not nil.
func (*GuildRoleUpdate) SetNillableTalentID ¶
func (gru *GuildRoleUpdate) SetNillableTalentID(id *string) *GuildRoleUpdate
SetNillableTalentID sets the "talent" edge to the YouTubeTalent entity by ID if the given value is not nil.
func (*GuildRoleUpdate) SetTalent ¶
func (gru *GuildRoleUpdate) SetTalent(y *YouTubeTalent) *GuildRoleUpdate
SetTalent sets the "talent" edge to the YouTubeTalent entity.
func (*GuildRoleUpdate) SetTalentID ¶
func (gru *GuildRoleUpdate) SetTalentID(id string) *GuildRoleUpdate
SetTalentID sets the "talent" edge to the YouTubeTalent entity by ID.
func (*GuildRoleUpdate) Where ¶
func (gru *GuildRoleUpdate) Where(ps ...predicate.GuildRole) *GuildRoleUpdate
Where appends a list predicates to the GuildRoleUpdate builder.
type GuildRoleUpdateOne ¶
type GuildRoleUpdateOne struct {
// contains filtered or unexported fields
}
GuildRoleUpdateOne is the builder for updating a single GuildRole entity.
func (*GuildRoleUpdateOne) AddUserMembershipIDs ¶
func (gruo *GuildRoleUpdateOne) AddUserMembershipIDs(ids ...int) *GuildRoleUpdateOne
AddUserMembershipIDs adds the "user_memberships" edge to the UserMembership entity by IDs.
func (*GuildRoleUpdateOne) AddUserMemberships ¶
func (gruo *GuildRoleUpdateOne) AddUserMemberships(u ...*UserMembership) *GuildRoleUpdateOne
AddUserMemberships adds the "user_memberships" edges to the UserMembership entity.
func (*GuildRoleUpdateOne) ClearGuild ¶
func (gruo *GuildRoleUpdateOne) ClearGuild() *GuildRoleUpdateOne
ClearGuild clears the "guild" edge to the Guild entity.
func (*GuildRoleUpdateOne) ClearTalent ¶
func (gruo *GuildRoleUpdateOne) ClearTalent() *GuildRoleUpdateOne
ClearTalent clears the "talent" edge to the YouTubeTalent entity.
func (*GuildRoleUpdateOne) ClearUserMemberships ¶
func (gruo *GuildRoleUpdateOne) ClearUserMemberships() *GuildRoleUpdateOne
ClearUserMemberships clears all "user_memberships" edges to the UserMembership entity.
func (*GuildRoleUpdateOne) Exec ¶
func (gruo *GuildRoleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GuildRoleUpdateOne) ExecX ¶
func (gruo *GuildRoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildRoleUpdateOne) Mutation ¶
func (gruo *GuildRoleUpdateOne) Mutation() *GuildRoleMutation
Mutation returns the GuildRoleMutation object of the builder.
func (*GuildRoleUpdateOne) RemoveUserMembershipIDs ¶
func (gruo *GuildRoleUpdateOne) RemoveUserMembershipIDs(ids ...int) *GuildRoleUpdateOne
RemoveUserMembershipIDs removes the "user_memberships" edge to UserMembership entities by IDs.
func (*GuildRoleUpdateOne) RemoveUserMemberships ¶
func (gruo *GuildRoleUpdateOne) RemoveUserMemberships(u ...*UserMembership) *GuildRoleUpdateOne
RemoveUserMemberships removes "user_memberships" edges to UserMembership entities.
func (*GuildRoleUpdateOne) Save ¶
func (gruo *GuildRoleUpdateOne) Save(ctx context.Context) (*GuildRole, error)
Save executes the query and returns the updated GuildRole entity.
func (*GuildRoleUpdateOne) SaveX ¶
func (gruo *GuildRoleUpdateOne) SaveX(ctx context.Context) *GuildRole
SaveX is like Save, but panics if an error occurs.
func (*GuildRoleUpdateOne) Select ¶
func (gruo *GuildRoleUpdateOne) Select(field string, fields ...string) *GuildRoleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GuildRoleUpdateOne) SetGuild ¶
func (gruo *GuildRoleUpdateOne) SetGuild(g *Guild) *GuildRoleUpdateOne
SetGuild sets the "guild" edge to the Guild entity.
func (*GuildRoleUpdateOne) SetGuildID ¶
func (gruo *GuildRoleUpdateOne) SetGuildID(id uint64) *GuildRoleUpdateOne
SetGuildID sets the "guild" edge to the Guild entity by ID.
func (*GuildRoleUpdateOne) SetLastUpdated ¶
func (gruo *GuildRoleUpdateOne) SetLastUpdated(t time.Time) *GuildRoleUpdateOne
SetLastUpdated sets the "last_updated" field.
func (*GuildRoleUpdateOne) SetName ¶
func (gruo *GuildRoleUpdateOne) SetName(s string) *GuildRoleUpdateOne
SetName sets the "name" field.
func (*GuildRoleUpdateOne) SetNillableLastUpdated ¶
func (gruo *GuildRoleUpdateOne) SetNillableLastUpdated(t *time.Time) *GuildRoleUpdateOne
SetNillableLastUpdated sets the "last_updated" field if the given value is not nil.
func (*GuildRoleUpdateOne) SetNillableTalentID ¶
func (gruo *GuildRoleUpdateOne) SetNillableTalentID(id *string) *GuildRoleUpdateOne
SetNillableTalentID sets the "talent" edge to the YouTubeTalent entity by ID if the given value is not nil.
func (*GuildRoleUpdateOne) SetTalent ¶
func (gruo *GuildRoleUpdateOne) SetTalent(y *YouTubeTalent) *GuildRoleUpdateOne
SetTalent sets the "talent" edge to the YouTubeTalent entity.
func (*GuildRoleUpdateOne) SetTalentID ¶
func (gruo *GuildRoleUpdateOne) SetTalentID(id string) *GuildRoleUpdateOne
SetTalentID sets the "talent" edge to the YouTubeTalent entity by ID.
func (*GuildRoleUpdateOne) Where ¶
func (gruo *GuildRoleUpdateOne) Where(ps ...predicate.GuildRole) *GuildRoleUpdateOne
Where appends a list predicates to the GuildRoleUpdate builder.
type GuildRoleUpsert ¶
GuildRoleUpsert is the "OnConflict" setter.
func (*GuildRoleUpsert) SetLastUpdated ¶
func (u *GuildRoleUpsert) SetLastUpdated(v time.Time) *GuildRoleUpsert
SetLastUpdated sets the "last_updated" field.
func (*GuildRoleUpsert) SetName ¶
func (u *GuildRoleUpsert) SetName(v string) *GuildRoleUpsert
SetName sets the "name" field.
func (*GuildRoleUpsert) UpdateLastUpdated ¶
func (u *GuildRoleUpsert) UpdateLastUpdated() *GuildRoleUpsert
UpdateLastUpdated sets the "last_updated" field to the value that was provided on create.
func (*GuildRoleUpsert) UpdateName ¶
func (u *GuildRoleUpsert) UpdateName() *GuildRoleUpsert
UpdateName sets the "name" field to the value that was provided on create.
type GuildRoleUpsertBulk ¶
type GuildRoleUpsertBulk struct {
// contains filtered or unexported fields
}
GuildRoleUpsertBulk is the builder for "upsert"-ing a bulk of GuildRole nodes.
func (*GuildRoleUpsertBulk) DoNothing ¶
func (u *GuildRoleUpsertBulk) DoNothing() *GuildRoleUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GuildRoleUpsertBulk) Exec ¶
func (u *GuildRoleUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GuildRoleUpsertBulk) ExecX ¶
func (u *GuildRoleUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildRoleUpsertBulk) Ignore ¶
func (u *GuildRoleUpsertBulk) Ignore() *GuildRoleUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GuildRole.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GuildRoleUpsertBulk) SetLastUpdated ¶
func (u *GuildRoleUpsertBulk) SetLastUpdated(v time.Time) *GuildRoleUpsertBulk
SetLastUpdated sets the "last_updated" field.
func (*GuildRoleUpsertBulk) SetName ¶
func (u *GuildRoleUpsertBulk) SetName(v string) *GuildRoleUpsertBulk
SetName sets the "name" field.
func (*GuildRoleUpsertBulk) Update ¶
func (u *GuildRoleUpsertBulk) Update(set func(*GuildRoleUpsert)) *GuildRoleUpsertBulk
Update allows overriding fields `UPDATE` values. See the GuildRoleCreateBulk.OnConflict documentation for more info.
func (*GuildRoleUpsertBulk) UpdateLastUpdated ¶
func (u *GuildRoleUpsertBulk) UpdateLastUpdated() *GuildRoleUpsertBulk
UpdateLastUpdated sets the "last_updated" field to the value that was provided on create.
func (*GuildRoleUpsertBulk) UpdateName ¶
func (u *GuildRoleUpsertBulk) UpdateName() *GuildRoleUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*GuildRoleUpsertBulk) UpdateNewValues ¶
func (u *GuildRoleUpsertBulk) UpdateNewValues() *GuildRoleUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GuildRole.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(guildrole.FieldID) }), ). Exec(ctx)
type GuildRoleUpsertOne ¶
type GuildRoleUpsertOne struct {
// contains filtered or unexported fields
}
GuildRoleUpsertOne is the builder for "upsert"-ing
one GuildRole node.
func (*GuildRoleUpsertOne) DoNothing ¶
func (u *GuildRoleUpsertOne) DoNothing() *GuildRoleUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GuildRoleUpsertOne) Exec ¶
func (u *GuildRoleUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GuildRoleUpsertOne) ExecX ¶
func (u *GuildRoleUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildRoleUpsertOne) ID ¶
func (u *GuildRoleUpsertOne) ID(ctx context.Context) (id uint64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GuildRoleUpsertOne) IDX ¶
func (u *GuildRoleUpsertOne) IDX(ctx context.Context) uint64
IDX is like ID, but panics if an error occurs.
func (*GuildRoleUpsertOne) Ignore ¶
func (u *GuildRoleUpsertOne) Ignore() *GuildRoleUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GuildRole.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GuildRoleUpsertOne) SetLastUpdated ¶
func (u *GuildRoleUpsertOne) SetLastUpdated(v time.Time) *GuildRoleUpsertOne
SetLastUpdated sets the "last_updated" field.
func (*GuildRoleUpsertOne) SetName ¶
func (u *GuildRoleUpsertOne) SetName(v string) *GuildRoleUpsertOne
SetName sets the "name" field.
func (*GuildRoleUpsertOne) Update ¶
func (u *GuildRoleUpsertOne) Update(set func(*GuildRoleUpsert)) *GuildRoleUpsertOne
Update allows overriding fields `UPDATE` values. See the GuildRoleCreate.OnConflict documentation for more info.
func (*GuildRoleUpsertOne) UpdateLastUpdated ¶
func (u *GuildRoleUpsertOne) UpdateLastUpdated() *GuildRoleUpsertOne
UpdateLastUpdated sets the "last_updated" field to the value that was provided on create.
func (*GuildRoleUpsertOne) UpdateName ¶
func (u *GuildRoleUpsertOne) UpdateName() *GuildRoleUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*GuildRoleUpsertOne) UpdateNewValues ¶
func (u *GuildRoleUpsertOne) UpdateNewValues() *GuildRoleUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.GuildRole.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(guildrole.FieldID) }), ). Exec(ctx)
type GuildSelect ¶
type GuildSelect struct { *GuildQuery // contains filtered or unexported fields }
GuildSelect is the builder for selecting fields of Guild entities.
func (*GuildSelect) Aggregate ¶
func (gs *GuildSelect) Aggregate(fns ...AggregateFunc) *GuildSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GuildSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GuildSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GuildSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GuildSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GuildSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GuildSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GuildSelect) Scan ¶
func (gs *GuildSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GuildSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GuildUpdate ¶
type GuildUpdate struct {
// contains filtered or unexported fields
}
GuildUpdate is the builder for updating Guild entities.
func (*GuildUpdate) AddAdminIDs ¶
func (gu *GuildUpdate) AddAdminIDs(ids ...uint64) *GuildUpdate
AddAdminIDs adds the "admins" edge to the User entity by IDs.
func (*GuildUpdate) AddAdmins ¶
func (gu *GuildUpdate) AddAdmins(u ...*User) *GuildUpdate
AddAdmins adds the "admins" edges to the User entity.
func (*GuildUpdate) AddAuditChannel ¶
func (gu *GuildUpdate) AddAuditChannel(u int64) *GuildUpdate
AddAuditChannel adds u to the "audit_channel" field.
func (*GuildUpdate) AddMemberIDs ¶
func (gu *GuildUpdate) AddMemberIDs(ids ...uint64) *GuildUpdate
AddMemberIDs adds the "members" edge to the User entity by IDs.
func (*GuildUpdate) AddMembers ¶
func (gu *GuildUpdate) AddMembers(u ...*User) *GuildUpdate
AddMembers adds the "members" edges to the User entity.
func (*GuildUpdate) AddRoleIDs ¶
func (gu *GuildUpdate) AddRoleIDs(ids ...uint64) *GuildUpdate
AddRoleIDs adds the "roles" edge to the GuildRole entity by IDs.
func (*GuildUpdate) AddRoles ¶
func (gu *GuildUpdate) AddRoles(g ...*GuildRole) *GuildUpdate
AddRoles adds the "roles" edges to the GuildRole entity.
func (*GuildUpdate) AddYoutubeTalentIDs ¶
func (gu *GuildUpdate) AddYoutubeTalentIDs(ids ...string) *GuildUpdate
AddYoutubeTalentIDs adds the "youtube_talents" edge to the YouTubeTalent entity by IDs.
func (*GuildUpdate) AddYoutubeTalents ¶
func (gu *GuildUpdate) AddYoutubeTalents(y ...*YouTubeTalent) *GuildUpdate
AddYoutubeTalents adds the "youtube_talents" edges to the YouTubeTalent entity.
func (*GuildUpdate) AppendAdminSnowflakes ¶
func (gu *GuildUpdate) AppendAdminSnowflakes(u []uint64) *GuildUpdate
AppendAdminSnowflakes appends u to the "admin_snowflakes" field.
func (*GuildUpdate) AppendModeratorSnowflakes ¶
func (gu *GuildUpdate) AppendModeratorSnowflakes(u []uint64) *GuildUpdate
AppendModeratorSnowflakes appends u to the "moderator_snowflakes" field.
func (*GuildUpdate) ClearAdmins ¶
func (gu *GuildUpdate) ClearAdmins() *GuildUpdate
ClearAdmins clears all "admins" edges to the User entity.
func (*GuildUpdate) ClearAuditChannel ¶
func (gu *GuildUpdate) ClearAuditChannel() *GuildUpdate
ClearAuditChannel clears the value of the "audit_channel" field.
func (*GuildUpdate) ClearIconHash ¶
func (gu *GuildUpdate) ClearIconHash() *GuildUpdate
ClearIconHash clears the value of the "icon_hash" field.
func (*GuildUpdate) ClearMembers ¶
func (gu *GuildUpdate) ClearMembers() *GuildUpdate
ClearMembers clears all "members" edges to the User entity.
func (*GuildUpdate) ClearModeratorSnowflakes ¶
func (gu *GuildUpdate) ClearModeratorSnowflakes() *GuildUpdate
ClearModeratorSnowflakes clears the value of the "moderator_snowflakes" field.
func (*GuildUpdate) ClearRoles ¶
func (gu *GuildUpdate) ClearRoles() *GuildUpdate
ClearRoles clears all "roles" edges to the GuildRole entity.
func (*GuildUpdate) ClearSettings ¶
func (gu *GuildUpdate) ClearSettings() *GuildUpdate
ClearSettings clears the value of the "settings" field.
func (*GuildUpdate) ClearYoutubeTalents ¶
func (gu *GuildUpdate) ClearYoutubeTalents() *GuildUpdate
ClearYoutubeTalents clears all "youtube_talents" edges to the YouTubeTalent entity.
func (*GuildUpdate) Exec ¶
func (gu *GuildUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GuildUpdate) ExecX ¶
func (gu *GuildUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildUpdate) Mutation ¶
func (gu *GuildUpdate) Mutation() *GuildMutation
Mutation returns the GuildMutation object of the builder.
func (*GuildUpdate) RemoveAdminIDs ¶
func (gu *GuildUpdate) RemoveAdminIDs(ids ...uint64) *GuildUpdate
RemoveAdminIDs removes the "admins" edge to User entities by IDs.
func (*GuildUpdate) RemoveAdmins ¶
func (gu *GuildUpdate) RemoveAdmins(u ...*User) *GuildUpdate
RemoveAdmins removes "admins" edges to User entities.
func (*GuildUpdate) RemoveMemberIDs ¶
func (gu *GuildUpdate) RemoveMemberIDs(ids ...uint64) *GuildUpdate
RemoveMemberIDs removes the "members" edge to User entities by IDs.
func (*GuildUpdate) RemoveMembers ¶
func (gu *GuildUpdate) RemoveMembers(u ...*User) *GuildUpdate
RemoveMembers removes "members" edges to User entities.
func (*GuildUpdate) RemoveRoleIDs ¶
func (gu *GuildUpdate) RemoveRoleIDs(ids ...uint64) *GuildUpdate
RemoveRoleIDs removes the "roles" edge to GuildRole entities by IDs.
func (*GuildUpdate) RemoveRoles ¶
func (gu *GuildUpdate) RemoveRoles(g ...*GuildRole) *GuildUpdate
RemoveRoles removes "roles" edges to GuildRole entities.
func (*GuildUpdate) RemoveYoutubeTalentIDs ¶
func (gu *GuildUpdate) RemoveYoutubeTalentIDs(ids ...string) *GuildUpdate
RemoveYoutubeTalentIDs removes the "youtube_talents" edge to YouTubeTalent entities by IDs.
func (*GuildUpdate) RemoveYoutubeTalents ¶
func (gu *GuildUpdate) RemoveYoutubeTalents(y ...*YouTubeTalent) *GuildUpdate
RemoveYoutubeTalents removes "youtube_talents" edges to YouTubeTalent entities.
func (*GuildUpdate) Save ¶
func (gu *GuildUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GuildUpdate) SaveX ¶
func (gu *GuildUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GuildUpdate) SetAdminSnowflakes ¶
func (gu *GuildUpdate) SetAdminSnowflakes(u []uint64) *GuildUpdate
SetAdminSnowflakes sets the "admin_snowflakes" field.
func (*GuildUpdate) SetAuditChannel ¶
func (gu *GuildUpdate) SetAuditChannel(u uint64) *GuildUpdate
SetAuditChannel sets the "audit_channel" field.
func (*GuildUpdate) SetIconHash ¶
func (gu *GuildUpdate) SetIconHash(s string) *GuildUpdate
SetIconHash sets the "icon_hash" field.
func (*GuildUpdate) SetLanguage ¶
func (gu *GuildUpdate) SetLanguage(value guild.Language) *GuildUpdate
SetLanguage sets the "language" field.
func (*GuildUpdate) SetModeratorSnowflakes ¶
func (gu *GuildUpdate) SetModeratorSnowflakes(u []uint64) *GuildUpdate
SetModeratorSnowflakes sets the "moderator_snowflakes" field.
func (*GuildUpdate) SetName ¶
func (gu *GuildUpdate) SetName(s string) *GuildUpdate
SetName sets the "name" field.
func (*GuildUpdate) SetNillableAuditChannel ¶
func (gu *GuildUpdate) SetNillableAuditChannel(u *uint64) *GuildUpdate
SetNillableAuditChannel sets the "audit_channel" field if the given value is not nil.
func (*GuildUpdate) SetNillableIconHash ¶
func (gu *GuildUpdate) SetNillableIconHash(s *string) *GuildUpdate
SetNillableIconHash sets the "icon_hash" field if the given value is not nil.
func (*GuildUpdate) SetNillableLanguage ¶
func (gu *GuildUpdate) SetNillableLanguage(value *guild.Language) *GuildUpdate
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*GuildUpdate) SetSettings ¶
func (gu *GuildUpdate) SetSettings(ss *schema.GuildSettings) *GuildUpdate
SetSettings sets the "settings" field.
func (*GuildUpdate) Where ¶
func (gu *GuildUpdate) Where(ps ...predicate.Guild) *GuildUpdate
Where appends a list predicates to the GuildUpdate builder.
type GuildUpdateOne ¶
type GuildUpdateOne struct {
// contains filtered or unexported fields
}
GuildUpdateOne is the builder for updating a single Guild entity.
func (*GuildUpdateOne) AddAdminIDs ¶
func (guo *GuildUpdateOne) AddAdminIDs(ids ...uint64) *GuildUpdateOne
AddAdminIDs adds the "admins" edge to the User entity by IDs.
func (*GuildUpdateOne) AddAdmins ¶
func (guo *GuildUpdateOne) AddAdmins(u ...*User) *GuildUpdateOne
AddAdmins adds the "admins" edges to the User entity.
func (*GuildUpdateOne) AddAuditChannel ¶
func (guo *GuildUpdateOne) AddAuditChannel(u int64) *GuildUpdateOne
AddAuditChannel adds u to the "audit_channel" field.
func (*GuildUpdateOne) AddMemberIDs ¶
func (guo *GuildUpdateOne) AddMemberIDs(ids ...uint64) *GuildUpdateOne
AddMemberIDs adds the "members" edge to the User entity by IDs.
func (*GuildUpdateOne) AddMembers ¶
func (guo *GuildUpdateOne) AddMembers(u ...*User) *GuildUpdateOne
AddMembers adds the "members" edges to the User entity.
func (*GuildUpdateOne) AddRoleIDs ¶
func (guo *GuildUpdateOne) AddRoleIDs(ids ...uint64) *GuildUpdateOne
AddRoleIDs adds the "roles" edge to the GuildRole entity by IDs.
func (*GuildUpdateOne) AddRoles ¶
func (guo *GuildUpdateOne) AddRoles(g ...*GuildRole) *GuildUpdateOne
AddRoles adds the "roles" edges to the GuildRole entity.
func (*GuildUpdateOne) AddYoutubeTalentIDs ¶
func (guo *GuildUpdateOne) AddYoutubeTalentIDs(ids ...string) *GuildUpdateOne
AddYoutubeTalentIDs adds the "youtube_talents" edge to the YouTubeTalent entity by IDs.
func (*GuildUpdateOne) AddYoutubeTalents ¶
func (guo *GuildUpdateOne) AddYoutubeTalents(y ...*YouTubeTalent) *GuildUpdateOne
AddYoutubeTalents adds the "youtube_talents" edges to the YouTubeTalent entity.
func (*GuildUpdateOne) AppendAdminSnowflakes ¶
func (guo *GuildUpdateOne) AppendAdminSnowflakes(u []uint64) *GuildUpdateOne
AppendAdminSnowflakes appends u to the "admin_snowflakes" field.
func (*GuildUpdateOne) AppendModeratorSnowflakes ¶
func (guo *GuildUpdateOne) AppendModeratorSnowflakes(u []uint64) *GuildUpdateOne
AppendModeratorSnowflakes appends u to the "moderator_snowflakes" field.
func (*GuildUpdateOne) ClearAdmins ¶
func (guo *GuildUpdateOne) ClearAdmins() *GuildUpdateOne
ClearAdmins clears all "admins" edges to the User entity.
func (*GuildUpdateOne) ClearAuditChannel ¶
func (guo *GuildUpdateOne) ClearAuditChannel() *GuildUpdateOne
ClearAuditChannel clears the value of the "audit_channel" field.
func (*GuildUpdateOne) ClearIconHash ¶
func (guo *GuildUpdateOne) ClearIconHash() *GuildUpdateOne
ClearIconHash clears the value of the "icon_hash" field.
func (*GuildUpdateOne) ClearMembers ¶
func (guo *GuildUpdateOne) ClearMembers() *GuildUpdateOne
ClearMembers clears all "members" edges to the User entity.
func (*GuildUpdateOne) ClearModeratorSnowflakes ¶
func (guo *GuildUpdateOne) ClearModeratorSnowflakes() *GuildUpdateOne
ClearModeratorSnowflakes clears the value of the "moderator_snowflakes" field.
func (*GuildUpdateOne) ClearRoles ¶
func (guo *GuildUpdateOne) ClearRoles() *GuildUpdateOne
ClearRoles clears all "roles" edges to the GuildRole entity.
func (*GuildUpdateOne) ClearSettings ¶
func (guo *GuildUpdateOne) ClearSettings() *GuildUpdateOne
ClearSettings clears the value of the "settings" field.
func (*GuildUpdateOne) ClearYoutubeTalents ¶
func (guo *GuildUpdateOne) ClearYoutubeTalents() *GuildUpdateOne
ClearYoutubeTalents clears all "youtube_talents" edges to the YouTubeTalent entity.
func (*GuildUpdateOne) Exec ¶
func (guo *GuildUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GuildUpdateOne) ExecX ¶
func (guo *GuildUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildUpdateOne) Mutation ¶
func (guo *GuildUpdateOne) Mutation() *GuildMutation
Mutation returns the GuildMutation object of the builder.
func (*GuildUpdateOne) RemoveAdminIDs ¶
func (guo *GuildUpdateOne) RemoveAdminIDs(ids ...uint64) *GuildUpdateOne
RemoveAdminIDs removes the "admins" edge to User entities by IDs.
func (*GuildUpdateOne) RemoveAdmins ¶
func (guo *GuildUpdateOne) RemoveAdmins(u ...*User) *GuildUpdateOne
RemoveAdmins removes "admins" edges to User entities.
func (*GuildUpdateOne) RemoveMemberIDs ¶
func (guo *GuildUpdateOne) RemoveMemberIDs(ids ...uint64) *GuildUpdateOne
RemoveMemberIDs removes the "members" edge to User entities by IDs.
func (*GuildUpdateOne) RemoveMembers ¶
func (guo *GuildUpdateOne) RemoveMembers(u ...*User) *GuildUpdateOne
RemoveMembers removes "members" edges to User entities.
func (*GuildUpdateOne) RemoveRoleIDs ¶
func (guo *GuildUpdateOne) RemoveRoleIDs(ids ...uint64) *GuildUpdateOne
RemoveRoleIDs removes the "roles" edge to GuildRole entities by IDs.
func (*GuildUpdateOne) RemoveRoles ¶
func (guo *GuildUpdateOne) RemoveRoles(g ...*GuildRole) *GuildUpdateOne
RemoveRoles removes "roles" edges to GuildRole entities.
func (*GuildUpdateOne) RemoveYoutubeTalentIDs ¶
func (guo *GuildUpdateOne) RemoveYoutubeTalentIDs(ids ...string) *GuildUpdateOne
RemoveYoutubeTalentIDs removes the "youtube_talents" edge to YouTubeTalent entities by IDs.
func (*GuildUpdateOne) RemoveYoutubeTalents ¶
func (guo *GuildUpdateOne) RemoveYoutubeTalents(y ...*YouTubeTalent) *GuildUpdateOne
RemoveYoutubeTalents removes "youtube_talents" edges to YouTubeTalent entities.
func (*GuildUpdateOne) Save ¶
func (guo *GuildUpdateOne) Save(ctx context.Context) (*Guild, error)
Save executes the query and returns the updated Guild entity.
func (*GuildUpdateOne) SaveX ¶
func (guo *GuildUpdateOne) SaveX(ctx context.Context) *Guild
SaveX is like Save, but panics if an error occurs.
func (*GuildUpdateOne) Select ¶
func (guo *GuildUpdateOne) Select(field string, fields ...string) *GuildUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GuildUpdateOne) SetAdminSnowflakes ¶
func (guo *GuildUpdateOne) SetAdminSnowflakes(u []uint64) *GuildUpdateOne
SetAdminSnowflakes sets the "admin_snowflakes" field.
func (*GuildUpdateOne) SetAuditChannel ¶
func (guo *GuildUpdateOne) SetAuditChannel(u uint64) *GuildUpdateOne
SetAuditChannel sets the "audit_channel" field.
func (*GuildUpdateOne) SetIconHash ¶
func (guo *GuildUpdateOne) SetIconHash(s string) *GuildUpdateOne
SetIconHash sets the "icon_hash" field.
func (*GuildUpdateOne) SetLanguage ¶
func (guo *GuildUpdateOne) SetLanguage(gu guild.Language) *GuildUpdateOne
SetLanguage sets the "language" field.
func (*GuildUpdateOne) SetModeratorSnowflakes ¶
func (guo *GuildUpdateOne) SetModeratorSnowflakes(u []uint64) *GuildUpdateOne
SetModeratorSnowflakes sets the "moderator_snowflakes" field.
func (*GuildUpdateOne) SetName ¶
func (guo *GuildUpdateOne) SetName(s string) *GuildUpdateOne
SetName sets the "name" field.
func (*GuildUpdateOne) SetNillableAuditChannel ¶
func (guo *GuildUpdateOne) SetNillableAuditChannel(u *uint64) *GuildUpdateOne
SetNillableAuditChannel sets the "audit_channel" field if the given value is not nil.
func (*GuildUpdateOne) SetNillableIconHash ¶
func (guo *GuildUpdateOne) SetNillableIconHash(s *string) *GuildUpdateOne
SetNillableIconHash sets the "icon_hash" field if the given value is not nil.
func (*GuildUpdateOne) SetNillableLanguage ¶
func (guo *GuildUpdateOne) SetNillableLanguage(gu *guild.Language) *GuildUpdateOne
SetNillableLanguage sets the "language" field if the given value is not nil.
func (*GuildUpdateOne) SetSettings ¶
func (guo *GuildUpdateOne) SetSettings(ss *schema.GuildSettings) *GuildUpdateOne
SetSettings sets the "settings" field.
func (*GuildUpdateOne) Where ¶
func (guo *GuildUpdateOne) Where(ps ...predicate.Guild) *GuildUpdateOne
Where appends a list predicates to the GuildUpdate builder.
type GuildUpsert ¶
GuildUpsert is the "OnConflict" setter.
func (*GuildUpsert) AddAuditChannel ¶
func (u *GuildUpsert) AddAuditChannel(v uint64) *GuildUpsert
AddAuditChannel adds v to the "audit_channel" field.
func (*GuildUpsert) ClearAuditChannel ¶
func (u *GuildUpsert) ClearAuditChannel() *GuildUpsert
ClearAuditChannel clears the value of the "audit_channel" field.
func (*GuildUpsert) ClearIconHash ¶
func (u *GuildUpsert) ClearIconHash() *GuildUpsert
ClearIconHash clears the value of the "icon_hash" field.
func (*GuildUpsert) ClearModeratorSnowflakes ¶
func (u *GuildUpsert) ClearModeratorSnowflakes() *GuildUpsert
ClearModeratorSnowflakes clears the value of the "moderator_snowflakes" field.
func (*GuildUpsert) ClearSettings ¶
func (u *GuildUpsert) ClearSettings() *GuildUpsert
ClearSettings clears the value of the "settings" field.
func (*GuildUpsert) SetAdminSnowflakes ¶
func (u *GuildUpsert) SetAdminSnowflakes(v []uint64) *GuildUpsert
SetAdminSnowflakes sets the "admin_snowflakes" field.
func (*GuildUpsert) SetAuditChannel ¶
func (u *GuildUpsert) SetAuditChannel(v uint64) *GuildUpsert
SetAuditChannel sets the "audit_channel" field.
func (*GuildUpsert) SetIconHash ¶
func (u *GuildUpsert) SetIconHash(v string) *GuildUpsert
SetIconHash sets the "icon_hash" field.
func (*GuildUpsert) SetLanguage ¶
func (u *GuildUpsert) SetLanguage(v guild.Language) *GuildUpsert
SetLanguage sets the "language" field.
func (*GuildUpsert) SetModeratorSnowflakes ¶
func (u *GuildUpsert) SetModeratorSnowflakes(v []uint64) *GuildUpsert
SetModeratorSnowflakes sets the "moderator_snowflakes" field.
func (*GuildUpsert) SetName ¶
func (u *GuildUpsert) SetName(v string) *GuildUpsert
SetName sets the "name" field.
func (*GuildUpsert) SetSettings ¶
func (u *GuildUpsert) SetSettings(v *schema.GuildSettings) *GuildUpsert
SetSettings sets the "settings" field.
func (*GuildUpsert) UpdateAdminSnowflakes ¶
func (u *GuildUpsert) UpdateAdminSnowflakes() *GuildUpsert
UpdateAdminSnowflakes sets the "admin_snowflakes" field to the value that was provided on create.
func (*GuildUpsert) UpdateAuditChannel ¶
func (u *GuildUpsert) UpdateAuditChannel() *GuildUpsert
UpdateAuditChannel sets the "audit_channel" field to the value that was provided on create.
func (*GuildUpsert) UpdateIconHash ¶
func (u *GuildUpsert) UpdateIconHash() *GuildUpsert
UpdateIconHash sets the "icon_hash" field to the value that was provided on create.
func (*GuildUpsert) UpdateLanguage ¶
func (u *GuildUpsert) UpdateLanguage() *GuildUpsert
UpdateLanguage sets the "language" field to the value that was provided on create.
func (*GuildUpsert) UpdateModeratorSnowflakes ¶
func (u *GuildUpsert) UpdateModeratorSnowflakes() *GuildUpsert
UpdateModeratorSnowflakes sets the "moderator_snowflakes" field to the value that was provided on create.
func (*GuildUpsert) UpdateName ¶
func (u *GuildUpsert) UpdateName() *GuildUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*GuildUpsert) UpdateSettings ¶
func (u *GuildUpsert) UpdateSettings() *GuildUpsert
UpdateSettings sets the "settings" field to the value that was provided on create.
type GuildUpsertBulk ¶
type GuildUpsertBulk struct {
// contains filtered or unexported fields
}
GuildUpsertBulk is the builder for "upsert"-ing a bulk of Guild nodes.
func (*GuildUpsertBulk) AddAuditChannel ¶
func (u *GuildUpsertBulk) AddAuditChannel(v uint64) *GuildUpsertBulk
AddAuditChannel adds v to the "audit_channel" field.
func (*GuildUpsertBulk) ClearAuditChannel ¶
func (u *GuildUpsertBulk) ClearAuditChannel() *GuildUpsertBulk
ClearAuditChannel clears the value of the "audit_channel" field.
func (*GuildUpsertBulk) ClearIconHash ¶
func (u *GuildUpsertBulk) ClearIconHash() *GuildUpsertBulk
ClearIconHash clears the value of the "icon_hash" field.
func (*GuildUpsertBulk) ClearModeratorSnowflakes ¶
func (u *GuildUpsertBulk) ClearModeratorSnowflakes() *GuildUpsertBulk
ClearModeratorSnowflakes clears the value of the "moderator_snowflakes" field.
func (*GuildUpsertBulk) ClearSettings ¶
func (u *GuildUpsertBulk) ClearSettings() *GuildUpsertBulk
ClearSettings clears the value of the "settings" field.
func (*GuildUpsertBulk) DoNothing ¶
func (u *GuildUpsertBulk) DoNothing() *GuildUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GuildUpsertBulk) Exec ¶
func (u *GuildUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GuildUpsertBulk) ExecX ¶
func (u *GuildUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildUpsertBulk) Ignore ¶
func (u *GuildUpsertBulk) Ignore() *GuildUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Guild.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GuildUpsertBulk) SetAdminSnowflakes ¶
func (u *GuildUpsertBulk) SetAdminSnowflakes(v []uint64) *GuildUpsertBulk
SetAdminSnowflakes sets the "admin_snowflakes" field.
func (*GuildUpsertBulk) SetAuditChannel ¶
func (u *GuildUpsertBulk) SetAuditChannel(v uint64) *GuildUpsertBulk
SetAuditChannel sets the "audit_channel" field.
func (*GuildUpsertBulk) SetIconHash ¶
func (u *GuildUpsertBulk) SetIconHash(v string) *GuildUpsertBulk
SetIconHash sets the "icon_hash" field.
func (*GuildUpsertBulk) SetLanguage ¶
func (u *GuildUpsertBulk) SetLanguage(v guild.Language) *GuildUpsertBulk
SetLanguage sets the "language" field.
func (*GuildUpsertBulk) SetModeratorSnowflakes ¶
func (u *GuildUpsertBulk) SetModeratorSnowflakes(v []uint64) *GuildUpsertBulk
SetModeratorSnowflakes sets the "moderator_snowflakes" field.
func (*GuildUpsertBulk) SetName ¶
func (u *GuildUpsertBulk) SetName(v string) *GuildUpsertBulk
SetName sets the "name" field.
func (*GuildUpsertBulk) SetSettings ¶
func (u *GuildUpsertBulk) SetSettings(v *schema.GuildSettings) *GuildUpsertBulk
SetSettings sets the "settings" field.
func (*GuildUpsertBulk) Update ¶
func (u *GuildUpsertBulk) Update(set func(*GuildUpsert)) *GuildUpsertBulk
Update allows overriding fields `UPDATE` values. See the GuildCreateBulk.OnConflict documentation for more info.
func (*GuildUpsertBulk) UpdateAdminSnowflakes ¶
func (u *GuildUpsertBulk) UpdateAdminSnowflakes() *GuildUpsertBulk
UpdateAdminSnowflakes sets the "admin_snowflakes" field to the value that was provided on create.
func (*GuildUpsertBulk) UpdateAuditChannel ¶
func (u *GuildUpsertBulk) UpdateAuditChannel() *GuildUpsertBulk
UpdateAuditChannel sets the "audit_channel" field to the value that was provided on create.
func (*GuildUpsertBulk) UpdateIconHash ¶
func (u *GuildUpsertBulk) UpdateIconHash() *GuildUpsertBulk
UpdateIconHash sets the "icon_hash" field to the value that was provided on create.
func (*GuildUpsertBulk) UpdateLanguage ¶
func (u *GuildUpsertBulk) UpdateLanguage() *GuildUpsertBulk
UpdateLanguage sets the "language" field to the value that was provided on create.
func (*GuildUpsertBulk) UpdateModeratorSnowflakes ¶
func (u *GuildUpsertBulk) UpdateModeratorSnowflakes() *GuildUpsertBulk
UpdateModeratorSnowflakes sets the "moderator_snowflakes" field to the value that was provided on create.
func (*GuildUpsertBulk) UpdateName ¶
func (u *GuildUpsertBulk) UpdateName() *GuildUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*GuildUpsertBulk) UpdateNewValues ¶
func (u *GuildUpsertBulk) UpdateNewValues() *GuildUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Guild.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(guild.FieldID) }), ). Exec(ctx)
func (*GuildUpsertBulk) UpdateSettings ¶
func (u *GuildUpsertBulk) UpdateSettings() *GuildUpsertBulk
UpdateSettings sets the "settings" field to the value that was provided on create.
type GuildUpsertOne ¶
type GuildUpsertOne struct {
// contains filtered or unexported fields
}
GuildUpsertOne is the builder for "upsert"-ing
one Guild node.
func (*GuildUpsertOne) AddAuditChannel ¶
func (u *GuildUpsertOne) AddAuditChannel(v uint64) *GuildUpsertOne
AddAuditChannel adds v to the "audit_channel" field.
func (*GuildUpsertOne) ClearAuditChannel ¶
func (u *GuildUpsertOne) ClearAuditChannel() *GuildUpsertOne
ClearAuditChannel clears the value of the "audit_channel" field.
func (*GuildUpsertOne) ClearIconHash ¶
func (u *GuildUpsertOne) ClearIconHash() *GuildUpsertOne
ClearIconHash clears the value of the "icon_hash" field.
func (*GuildUpsertOne) ClearModeratorSnowflakes ¶
func (u *GuildUpsertOne) ClearModeratorSnowflakes() *GuildUpsertOne
ClearModeratorSnowflakes clears the value of the "moderator_snowflakes" field.
func (*GuildUpsertOne) ClearSettings ¶
func (u *GuildUpsertOne) ClearSettings() *GuildUpsertOne
ClearSettings clears the value of the "settings" field.
func (*GuildUpsertOne) DoNothing ¶
func (u *GuildUpsertOne) DoNothing() *GuildUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GuildUpsertOne) Exec ¶
func (u *GuildUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GuildUpsertOne) ExecX ¶
func (u *GuildUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GuildUpsertOne) ID ¶
func (u *GuildUpsertOne) ID(ctx context.Context) (id uint64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GuildUpsertOne) IDX ¶
func (u *GuildUpsertOne) IDX(ctx context.Context) uint64
IDX is like ID, but panics if an error occurs.
func (*GuildUpsertOne) Ignore ¶
func (u *GuildUpsertOne) Ignore() *GuildUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Guild.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GuildUpsertOne) SetAdminSnowflakes ¶
func (u *GuildUpsertOne) SetAdminSnowflakes(v []uint64) *GuildUpsertOne
SetAdminSnowflakes sets the "admin_snowflakes" field.
func (*GuildUpsertOne) SetAuditChannel ¶
func (u *GuildUpsertOne) SetAuditChannel(v uint64) *GuildUpsertOne
SetAuditChannel sets the "audit_channel" field.
func (*GuildUpsertOne) SetIconHash ¶
func (u *GuildUpsertOne) SetIconHash(v string) *GuildUpsertOne
SetIconHash sets the "icon_hash" field.
func (*GuildUpsertOne) SetLanguage ¶
func (u *GuildUpsertOne) SetLanguage(v guild.Language) *GuildUpsertOne
SetLanguage sets the "language" field.
func (*GuildUpsertOne) SetModeratorSnowflakes ¶
func (u *GuildUpsertOne) SetModeratorSnowflakes(v []uint64) *GuildUpsertOne
SetModeratorSnowflakes sets the "moderator_snowflakes" field.
func (*GuildUpsertOne) SetName ¶
func (u *GuildUpsertOne) SetName(v string) *GuildUpsertOne
SetName sets the "name" field.
func (*GuildUpsertOne) SetSettings ¶
func (u *GuildUpsertOne) SetSettings(v *schema.GuildSettings) *GuildUpsertOne
SetSettings sets the "settings" field.
func (*GuildUpsertOne) Update ¶
func (u *GuildUpsertOne) Update(set func(*GuildUpsert)) *GuildUpsertOne
Update allows overriding fields `UPDATE` values. See the GuildCreate.OnConflict documentation for more info.
func (*GuildUpsertOne) UpdateAdminSnowflakes ¶
func (u *GuildUpsertOne) UpdateAdminSnowflakes() *GuildUpsertOne
UpdateAdminSnowflakes sets the "admin_snowflakes" field to the value that was provided on create.
func (*GuildUpsertOne) UpdateAuditChannel ¶
func (u *GuildUpsertOne) UpdateAuditChannel() *GuildUpsertOne
UpdateAuditChannel sets the "audit_channel" field to the value that was provided on create.
func (*GuildUpsertOne) UpdateIconHash ¶
func (u *GuildUpsertOne) UpdateIconHash() *GuildUpsertOne
UpdateIconHash sets the "icon_hash" field to the value that was provided on create.
func (*GuildUpsertOne) UpdateLanguage ¶
func (u *GuildUpsertOne) UpdateLanguage() *GuildUpsertOne
UpdateLanguage sets the "language" field to the value that was provided on create.
func (*GuildUpsertOne) UpdateModeratorSnowflakes ¶
func (u *GuildUpsertOne) UpdateModeratorSnowflakes() *GuildUpsertOne
UpdateModeratorSnowflakes sets the "moderator_snowflakes" field to the value that was provided on create.
func (*GuildUpsertOne) UpdateName ¶
func (u *GuildUpsertOne) UpdateName() *GuildUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*GuildUpsertOne) UpdateNewValues ¶
func (u *GuildUpsertOne) UpdateNewValues() *GuildUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Guild.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(guild.FieldID) }), ). Exec(ctx)
func (*GuildUpsertOne) UpdateSettings ¶
func (u *GuildUpsertOne) UpdateSettings() *GuildUpsertOne
UpdateSettings sets the "settings" field to the value that was provided on create.
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 { // Guild is the client for interacting with the Guild builders. Guild *GuildClient // GuildRole is the client for interacting with the GuildRole builders. GuildRole *GuildRoleClient // User is the client for interacting with the User builders. User *UserClient // UserMembership is the client for interacting with the UserMembership builders. UserMembership *UserMembershipClient // YouTubeTalent is the client for interacting with the YouTubeTalent builders. YouTubeTalent *YouTubeTalentClient // 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 User ¶
type User struct { // ID of the ent. // Discord user snowflake ID uint64 `json:"id,omitempty"` // Username + discriminator FullName string `json:"full_name,omitempty"` // AvatarHash holds the value of the "avatar_hash" field. AvatarHash string `json:"avatar_hash,omitempty"` // Timestamp of last membership check LastCheck time.Time `json:"last_check,omitempty"` // user's YouTube channel ID YoutubeID *string `json:"youtube_id,omitempty"` // YoutubeToken holds the value of the "youtube_token" field. YoutubeToken *oauth2.Token `json:"youtube_token,omitempty"` // DiscordToken holds the value of the "discord_token" field. DiscordToken *oauth2.Token `json:"discord_token,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryGuilds ¶
func (u *User) QueryGuilds() *GuildQuery
QueryGuilds queries the "guilds" edge of the User entity.
func (*User) QueryGuildsAdmin ¶
func (u *User) QueryGuildsAdmin() *GuildQuery
QueryGuildsAdmin queries the "guilds_admin" edge of the User entity.
func (*User) QueryMemberships ¶
func (u *User) QueryMemberships() *UserMembershipQuery
QueryMemberships queries the "memberships" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uint64) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id uint64) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryGuilds ¶
func (c *UserClient) QueryGuilds(u *User) *GuildQuery
QueryGuilds queries the guilds edge of a User.
func (*UserClient) QueryGuildsAdmin ¶
func (c *UserClient) QueryGuildsAdmin(u *User) *GuildQuery
QueryGuildsAdmin queries the guilds_admin edge of a User.
func (*UserClient) QueryMemberships ¶
func (c *UserClient) QueryMemberships(u *User) *UserMembershipQuery
QueryMemberships queries the memberships edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uint64) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddGuildIDs ¶
func (uc *UserCreate) AddGuildIDs(ids ...uint64) *UserCreate
AddGuildIDs adds the "guilds" edge to the Guild entity by IDs.
func (*UserCreate) AddGuilds ¶
func (uc *UserCreate) AddGuilds(g ...*Guild) *UserCreate
AddGuilds adds the "guilds" edges to the Guild entity.
func (*UserCreate) AddGuildsAdmin ¶
func (uc *UserCreate) AddGuildsAdmin(g ...*Guild) *UserCreate
AddGuildsAdmin adds the "guilds_admin" edges to the Guild entity.
func (*UserCreate) AddGuildsAdminIDs ¶
func (uc *UserCreate) AddGuildsAdminIDs(ids ...uint64) *UserCreate
AddGuildsAdminIDs adds the "guilds_admin" edge to the Guild entity by IDs.
func (*UserCreate) AddMembershipIDs ¶
func (uc *UserCreate) AddMembershipIDs(ids ...int) *UserCreate
AddMembershipIDs adds the "memberships" edge to the UserMembership entity by IDs.
func (*UserCreate) AddMemberships ¶
func (uc *UserCreate) AddMemberships(u ...*UserMembership) *UserCreate
AddMemberships adds the "memberships" edges to the UserMembership entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetFullName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetFullName(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAvatarHash ¶
func (uc *UserCreate) SetAvatarHash(s string) *UserCreate
SetAvatarHash sets the "avatar_hash" field.
func (*UserCreate) SetDiscordToken ¶
func (uc *UserCreate) SetDiscordToken(o *oauth2.Token) *UserCreate
SetDiscordToken sets the "discord_token" field.
func (*UserCreate) SetFullName ¶
func (uc *UserCreate) SetFullName(s string) *UserCreate
SetFullName sets the "full_name" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uint64) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetLastCheck ¶
func (uc *UserCreate) SetLastCheck(t time.Time) *UserCreate
SetLastCheck sets the "last_check" field.
func (*UserCreate) SetNillableLastCheck ¶
func (uc *UserCreate) SetNillableLastCheck(t *time.Time) *UserCreate
SetNillableLastCheck sets the "last_check" field if the given value is not nil.
func (*UserCreate) SetNillableYoutubeID ¶
func (uc *UserCreate) SetNillableYoutubeID(s *string) *UserCreate
SetNillableYoutubeID sets the "youtube_id" field if the given value is not nil.
func (*UserCreate) SetYoutubeID ¶
func (uc *UserCreate) SetYoutubeID(s string) *UserCreate
SetYoutubeID sets the "youtube_id" field.
func (*UserCreate) SetYoutubeToken ¶
func (uc *UserCreate) SetYoutubeToken(o *oauth2.Token) *UserCreate
SetYoutubeToken sets the "youtube_token" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetFullName(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Guild that this user has joined Guilds []*Guild `json:"guilds,omitempty"` // GuildsAdmin holds the value of the guilds_admin edge. GuildsAdmin []*Guild `json:"guilds_admin,omitempty"` // Memberships holds the value of the memberships edge. Memberships []*UserMembership `json:"memberships,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) GuildsAdminOrErr ¶
GuildsAdminOrErr returns the GuildsAdmin value or an error if the edge was not loaded in eager-loading.
func (UserEdges) GuildsOrErr ¶
GuildsOrErr returns the Guilds value or an error if the edge was not loaded in eager-loading.
func (UserEdges) MembershipsOrErr ¶
func (e UserEdges) MembershipsOrErr() ([]*UserMembership, error)
MembershipsOrErr returns the Memberships value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMembership ¶
type UserMembership struct { // ID of the ent. ID int `json:"id,omitempty"` // FirstFailed holds the value of the "first_failed" field. FirstFailed time.Time `json:"first_failed,omitempty"` // LastVerified holds the value of the "last_verified" field. LastVerified time.Time `json:"last_verified,omitempty"` // FailCount holds the value of the "fail_count" field. FailCount int `json:"fail_count,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserMembershipQuery when eager-loading is set. Edges UserMembershipEdges `json:"edges"` // contains filtered or unexported fields }
UserMembership is the model entity for the UserMembership schema.
func (*UserMembership) QueryRoles ¶
func (um *UserMembership) QueryRoles() *GuildRoleQuery
QueryRoles queries the "roles" edge of the UserMembership entity.
func (*UserMembership) QueryUser ¶
func (um *UserMembership) QueryUser() *UserQuery
QueryUser queries the "user" edge of the UserMembership entity.
func (*UserMembership) QueryYoutubeTalent ¶
func (um *UserMembership) QueryYoutubeTalent() *YouTubeTalentQuery
QueryYoutubeTalent queries the "youtube_talent" edge of the UserMembership entity.
func (*UserMembership) String ¶
func (um *UserMembership) String() string
String implements the fmt.Stringer.
func (*UserMembership) Unwrap ¶
func (um *UserMembership) Unwrap() *UserMembership
Unwrap unwraps the UserMembership 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 (*UserMembership) Update ¶
func (um *UserMembership) Update() *UserMembershipUpdateOne
Update returns a builder for updating this UserMembership. Note that you need to call UserMembership.Unwrap() before calling this method if this UserMembership was returned from a transaction, and the transaction was committed or rolled back.
type UserMembershipClient ¶
type UserMembershipClient struct {
// contains filtered or unexported fields
}
UserMembershipClient is a client for the UserMembership schema.
func NewUserMembershipClient ¶
func NewUserMembershipClient(c config) *UserMembershipClient
NewUserMembershipClient returns a client for the UserMembership from the given config.
func (*UserMembershipClient) Create ¶
func (c *UserMembershipClient) Create() *UserMembershipCreate
Create returns a builder for creating a UserMembership entity.
func (*UserMembershipClient) CreateBulk ¶
func (c *UserMembershipClient) CreateBulk(builders ...*UserMembershipCreate) *UserMembershipCreateBulk
CreateBulk returns a builder for creating a bulk of UserMembership entities.
func (*UserMembershipClient) Delete ¶
func (c *UserMembershipClient) Delete() *UserMembershipDelete
Delete returns a delete builder for UserMembership.
func (*UserMembershipClient) DeleteOne ¶
func (c *UserMembershipClient) DeleteOne(um *UserMembership) *UserMembershipDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserMembershipClient) DeleteOneID ¶
func (c *UserMembershipClient) DeleteOneID(id int) *UserMembershipDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserMembershipClient) Get ¶
func (c *UserMembershipClient) Get(ctx context.Context, id int) (*UserMembership, error)
Get returns a UserMembership entity by its id.
func (*UserMembershipClient) GetX ¶
func (c *UserMembershipClient) GetX(ctx context.Context, id int) *UserMembership
GetX is like Get, but panics if an error occurs.
func (*UserMembershipClient) Hooks ¶
func (c *UserMembershipClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserMembershipClient) Intercept ¶
func (c *UserMembershipClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usermembership.Intercept(f(g(h())))`.
func (*UserMembershipClient) Interceptors ¶
func (c *UserMembershipClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserMembershipClient) Query ¶
func (c *UserMembershipClient) Query() *UserMembershipQuery
Query returns a query builder for UserMembership.
func (*UserMembershipClient) QueryRoles ¶
func (c *UserMembershipClient) QueryRoles(um *UserMembership) *GuildRoleQuery
QueryRoles queries the roles edge of a UserMembership.
func (*UserMembershipClient) QueryUser ¶
func (c *UserMembershipClient) QueryUser(um *UserMembership) *UserQuery
QueryUser queries the user edge of a UserMembership.
func (*UserMembershipClient) QueryYoutubeTalent ¶
func (c *UserMembershipClient) QueryYoutubeTalent(um *UserMembership) *YouTubeTalentQuery
QueryYoutubeTalent queries the youtube_talent edge of a UserMembership.
func (*UserMembershipClient) Update ¶
func (c *UserMembershipClient) Update() *UserMembershipUpdate
Update returns an update builder for UserMembership.
func (*UserMembershipClient) UpdateOne ¶
func (c *UserMembershipClient) UpdateOne(um *UserMembership) *UserMembershipUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserMembershipClient) UpdateOneID ¶
func (c *UserMembershipClient) UpdateOneID(id int) *UserMembershipUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserMembershipClient) Use ¶
func (c *UserMembershipClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usermembership.Hooks(f(g(h())))`.
type UserMembershipCreate ¶
type UserMembershipCreate struct {
// contains filtered or unexported fields
}
UserMembershipCreate is the builder for creating a UserMembership entity.
func (*UserMembershipCreate) AddRoleIDs ¶
func (umc *UserMembershipCreate) AddRoleIDs(ids ...uint64) *UserMembershipCreate
AddRoleIDs adds the "roles" edge to the GuildRole entity by IDs.
func (*UserMembershipCreate) AddRoles ¶
func (umc *UserMembershipCreate) AddRoles(g ...*GuildRole) *UserMembershipCreate
AddRoles adds the "roles" edges to the GuildRole entity.
func (*UserMembershipCreate) Exec ¶
func (umc *UserMembershipCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserMembershipCreate) ExecX ¶
func (umc *UserMembershipCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserMembershipCreate) Mutation ¶
func (umc *UserMembershipCreate) Mutation() *UserMembershipMutation
Mutation returns the UserMembershipMutation object of the builder.
func (*UserMembershipCreate) OnConflict ¶
func (umc *UserMembershipCreate) OnConflict(opts ...sql.ConflictOption) *UserMembershipUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserMembership.Create(). SetFirstFailed(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserMembershipUpsert) { SetFirstFailed(v+v). }). Exec(ctx)
func (*UserMembershipCreate) OnConflictColumns ¶
func (umc *UserMembershipCreate) OnConflictColumns(columns ...string) *UserMembershipUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserMembership.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserMembershipCreate) Save ¶
func (umc *UserMembershipCreate) Save(ctx context.Context) (*UserMembership, error)
Save creates the UserMembership in the database.
func (*UserMembershipCreate) SaveX ¶
func (umc *UserMembershipCreate) SaveX(ctx context.Context) *UserMembership
SaveX calls Save and panics if Save returns an error.
func (*UserMembershipCreate) SetFailCount ¶
func (umc *UserMembershipCreate) SetFailCount(i int) *UserMembershipCreate
SetFailCount sets the "fail_count" field.
func (*UserMembershipCreate) SetFirstFailed ¶
func (umc *UserMembershipCreate) SetFirstFailed(t time.Time) *UserMembershipCreate
SetFirstFailed sets the "first_failed" field.
func (*UserMembershipCreate) SetLastVerified ¶
func (umc *UserMembershipCreate) SetLastVerified(t time.Time) *UserMembershipCreate
SetLastVerified sets the "last_verified" field.
func (*UserMembershipCreate) SetNillableFailCount ¶
func (umc *UserMembershipCreate) SetNillableFailCount(i *int) *UserMembershipCreate
SetNillableFailCount sets the "fail_count" field if the given value is not nil.
func (*UserMembershipCreate) SetNillableFirstFailed ¶
func (umc *UserMembershipCreate) SetNillableFirstFailed(t *time.Time) *UserMembershipCreate
SetNillableFirstFailed sets the "first_failed" field if the given value is not nil.
func (*UserMembershipCreate) SetNillableUserID ¶
func (umc *UserMembershipCreate) SetNillableUserID(id *uint64) *UserMembershipCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*UserMembershipCreate) SetUser ¶
func (umc *UserMembershipCreate) SetUser(u *User) *UserMembershipCreate
SetUser sets the "user" edge to the User entity.
func (*UserMembershipCreate) SetUserID ¶
func (umc *UserMembershipCreate) SetUserID(id uint64) *UserMembershipCreate
SetUserID sets the "user" edge to the User entity by ID.
func (*UserMembershipCreate) SetYoutubeTalent ¶
func (umc *UserMembershipCreate) SetYoutubeTalent(y *YouTubeTalent) *UserMembershipCreate
SetYoutubeTalent sets the "youtube_talent" edge to the YouTubeTalent entity.
func (*UserMembershipCreate) SetYoutubeTalentID ¶
func (umc *UserMembershipCreate) SetYoutubeTalentID(id string) *UserMembershipCreate
SetYoutubeTalentID sets the "youtube_talent" edge to the YouTubeTalent entity by ID.
type UserMembershipCreateBulk ¶
type UserMembershipCreateBulk struct {
// contains filtered or unexported fields
}
UserMembershipCreateBulk is the builder for creating many UserMembership entities in bulk.
func (*UserMembershipCreateBulk) Exec ¶
func (umcb *UserMembershipCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserMembershipCreateBulk) ExecX ¶
func (umcb *UserMembershipCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserMembershipCreateBulk) OnConflict ¶
func (umcb *UserMembershipCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserMembershipUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserMembership.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserMembershipUpsert) { SetFirstFailed(v+v). }). Exec(ctx)
func (*UserMembershipCreateBulk) OnConflictColumns ¶
func (umcb *UserMembershipCreateBulk) OnConflictColumns(columns ...string) *UserMembershipUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserMembership.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserMembershipCreateBulk) Save ¶
func (umcb *UserMembershipCreateBulk) Save(ctx context.Context) ([]*UserMembership, error)
Save creates the UserMembership entities in the database.
func (*UserMembershipCreateBulk) SaveX ¶
func (umcb *UserMembershipCreateBulk) SaveX(ctx context.Context) []*UserMembership
SaveX is like Save, but panics if an error occurs.
type UserMembershipDelete ¶
type UserMembershipDelete struct {
// contains filtered or unexported fields
}
UserMembershipDelete is the builder for deleting a UserMembership entity.
func (*UserMembershipDelete) Exec ¶
func (umd *UserMembershipDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserMembershipDelete) ExecX ¶
func (umd *UserMembershipDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserMembershipDelete) Where ¶
func (umd *UserMembershipDelete) Where(ps ...predicate.UserMembership) *UserMembershipDelete
Where appends a list predicates to the UserMembershipDelete builder.
type UserMembershipDeleteOne ¶
type UserMembershipDeleteOne struct {
// contains filtered or unexported fields
}
UserMembershipDeleteOne is the builder for deleting a single UserMembership entity.
func (*UserMembershipDeleteOne) Exec ¶
func (umdo *UserMembershipDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserMembershipDeleteOne) ExecX ¶
func (umdo *UserMembershipDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserMembershipDeleteOne) Where ¶
func (umdo *UserMembershipDeleteOne) Where(ps ...predicate.UserMembership) *UserMembershipDeleteOne
Where appends a list predicates to the UserMembershipDelete builder.
type UserMembershipEdges ¶
type UserMembershipEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // YoutubeTalent holds the value of the youtube_talent edge. YoutubeTalent *YouTubeTalent `json:"youtube_talent,omitempty"` // Roles holds the value of the roles edge. Roles []*GuildRole `json:"roles,omitempty"` // contains filtered or unexported fields }
UserMembershipEdges holds the relations/edges for other nodes in the graph.
func (UserMembershipEdges) RolesOrErr ¶
func (e UserMembershipEdges) RolesOrErr() ([]*GuildRole, error)
RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.
func (UserMembershipEdges) UserOrErr ¶
func (e UserMembershipEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserMembershipEdges) YoutubeTalentOrErr ¶
func (e UserMembershipEdges) YoutubeTalentOrErr() (*YouTubeTalent, error)
YoutubeTalentOrErr returns the YoutubeTalent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserMembershipGroupBy ¶
type UserMembershipGroupBy struct {
// contains filtered or unexported fields
}
UserMembershipGroupBy is the group-by builder for UserMembership entities.
func (*UserMembershipGroupBy) Aggregate ¶
func (umgb *UserMembershipGroupBy) Aggregate(fns ...AggregateFunc) *UserMembershipGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserMembershipGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserMembershipGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserMembershipGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserMembershipGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserMembershipGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*UserMembershipGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserMembershipGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserMembershipGroupBy) Scan ¶
func (umgb *UserMembershipGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserMembershipGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMembershipMutation ¶
type UserMembershipMutation struct {
// contains filtered or unexported fields
}
UserMembershipMutation represents an operation that mutates the UserMembership nodes in the graph.
func (*UserMembershipMutation) AddFailCount ¶
func (m *UserMembershipMutation) AddFailCount(i int)
AddFailCount adds i to the "fail_count" field.
func (*UserMembershipMutation) AddField ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) AddRoleIDs ¶
func (m *UserMembershipMutation) AddRoleIDs(ids ...uint64)
AddRoleIDs adds the "roles" edge to the GuildRole entity by ids.
func (*UserMembershipMutation) AddedEdges ¶
func (m *UserMembershipMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMembershipMutation) AddedFailCount ¶
func (m *UserMembershipMutation) AddedFailCount() (r int, exists bool)
AddedFailCount returns the value that was added to the "fail_count" field in this mutation.
func (*UserMembershipMutation) AddedField ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) AddedFields ¶
func (m *UserMembershipMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMembershipMutation) AddedIDs ¶
func (m *UserMembershipMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMembershipMutation) ClearEdge ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) ClearField ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) ClearFirstFailed ¶
func (m *UserMembershipMutation) ClearFirstFailed()
ClearFirstFailed clears the value of the "first_failed" field.
func (*UserMembershipMutation) ClearRoles ¶
func (m *UserMembershipMutation) ClearRoles()
ClearRoles clears the "roles" edge to the GuildRole entity.
func (*UserMembershipMutation) ClearUser ¶
func (m *UserMembershipMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserMembershipMutation) ClearYoutubeTalent ¶
func (m *UserMembershipMutation) ClearYoutubeTalent()
ClearYoutubeTalent clears the "youtube_talent" edge to the YouTubeTalent entity.
func (*UserMembershipMutation) ClearedEdges ¶
func (m *UserMembershipMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMembershipMutation) ClearedFields ¶
func (m *UserMembershipMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMembershipMutation) Client ¶
func (m UserMembershipMutation) 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 (*UserMembershipMutation) EdgeCleared ¶
func (m *UserMembershipMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMembershipMutation) FailCount ¶
func (m *UserMembershipMutation) FailCount() (r int, exists bool)
FailCount returns the value of the "fail_count" field in the mutation.
func (*UserMembershipMutation) Field ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) FieldCleared ¶
func (m *UserMembershipMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMembershipMutation) Fields ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) FirstFailed ¶
func (m *UserMembershipMutation) FirstFailed() (r time.Time, exists bool)
FirstFailed returns the value of the "first_failed" field in the mutation.
func (*UserMembershipMutation) FirstFailedCleared ¶
func (m *UserMembershipMutation) FirstFailedCleared() bool
FirstFailedCleared returns if the "first_failed" field was cleared in this mutation.
func (*UserMembershipMutation) ID ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) IDs ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) LastVerified ¶
func (m *UserMembershipMutation) LastVerified() (r time.Time, exists bool)
LastVerified returns the value of the "last_verified" field in the mutation.
func (*UserMembershipMutation) OldFailCount ¶
func (m *UserMembershipMutation) OldFailCount(ctx context.Context) (v int, err error)
OldFailCount returns the old "fail_count" field's value of the UserMembership entity. If the UserMembership object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMembershipMutation) 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 (*UserMembershipMutation) OldFirstFailed ¶
OldFirstFailed returns the old "first_failed" field's value of the UserMembership entity. If the UserMembership object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMembershipMutation) OldLastVerified ¶
OldLastVerified returns the old "last_verified" field's value of the UserMembership entity. If the UserMembership object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMembershipMutation) Op ¶
func (m *UserMembershipMutation) Op() Op
Op returns the operation name.
func (*UserMembershipMutation) RemoveRoleIDs ¶
func (m *UserMembershipMutation) RemoveRoleIDs(ids ...uint64)
RemoveRoleIDs removes the "roles" edge to the GuildRole entity by IDs.
func (*UserMembershipMutation) RemovedEdges ¶
func (m *UserMembershipMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMembershipMutation) RemovedIDs ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) RemovedRolesIDs ¶
func (m *UserMembershipMutation) RemovedRolesIDs() (ids []uint64)
RemovedRoles returns the removed IDs of the "roles" edge to the GuildRole entity.
func (*UserMembershipMutation) ResetEdge ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) ResetFailCount ¶
func (m *UserMembershipMutation) ResetFailCount()
ResetFailCount resets all changes to the "fail_count" field.
func (*UserMembershipMutation) ResetField ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) ResetFirstFailed ¶
func (m *UserMembershipMutation) ResetFirstFailed()
ResetFirstFailed resets all changes to the "first_failed" field.
func (*UserMembershipMutation) ResetLastVerified ¶
func (m *UserMembershipMutation) ResetLastVerified()
ResetLastVerified resets all changes to the "last_verified" field.
func (*UserMembershipMutation) ResetRoles ¶
func (m *UserMembershipMutation) ResetRoles()
ResetRoles resets all changes to the "roles" edge.
func (*UserMembershipMutation) ResetUser ¶
func (m *UserMembershipMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserMembershipMutation) ResetYoutubeTalent ¶
func (m *UserMembershipMutation) ResetYoutubeTalent()
ResetYoutubeTalent resets all changes to the "youtube_talent" edge.
func (*UserMembershipMutation) RolesCleared ¶
func (m *UserMembershipMutation) RolesCleared() bool
RolesCleared reports if the "roles" edge to the GuildRole entity was cleared.
func (*UserMembershipMutation) RolesIDs ¶
func (m *UserMembershipMutation) RolesIDs() (ids []uint64)
RolesIDs returns the "roles" edge IDs in the mutation.
func (*UserMembershipMutation) SetFailCount ¶
func (m *UserMembershipMutation) SetFailCount(i int)
SetFailCount sets the "fail_count" field.
func (*UserMembershipMutation) SetField ¶
func (m *UserMembershipMutation) 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 (*UserMembershipMutation) SetFirstFailed ¶
func (m *UserMembershipMutation) SetFirstFailed(t time.Time)
SetFirstFailed sets the "first_failed" field.
func (*UserMembershipMutation) SetLastVerified ¶
func (m *UserMembershipMutation) SetLastVerified(t time.Time)
SetLastVerified sets the "last_verified" field.
func (*UserMembershipMutation) SetOp ¶
func (m *UserMembershipMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMembershipMutation) SetUserID ¶
func (m *UserMembershipMutation) SetUserID(id uint64)
SetUserID sets the "user" edge to the User entity by id.
func (*UserMembershipMutation) SetYoutubeTalentID ¶
func (m *UserMembershipMutation) SetYoutubeTalentID(id string)
SetYoutubeTalentID sets the "youtube_talent" edge to the YouTubeTalent entity by id.
func (UserMembershipMutation) Tx ¶
func (m UserMembershipMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMembershipMutation) Type ¶
func (m *UserMembershipMutation) Type() string
Type returns the node type of this mutation (UserMembership).
func (*UserMembershipMutation) UserCleared ¶
func (m *UserMembershipMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserMembershipMutation) UserID ¶
func (m *UserMembershipMutation) UserID() (id uint64, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*UserMembershipMutation) UserIDs ¶
func (m *UserMembershipMutation) UserIDs() (ids []uint64)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*UserMembershipMutation) Where ¶
func (m *UserMembershipMutation) Where(ps ...predicate.UserMembership)
Where appends a list predicates to the UserMembershipMutation builder.
func (*UserMembershipMutation) WhereP ¶
func (m *UserMembershipMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMembershipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*UserMembershipMutation) YoutubeTalentCleared ¶
func (m *UserMembershipMutation) YoutubeTalentCleared() bool
YoutubeTalentCleared reports if the "youtube_talent" edge to the YouTubeTalent entity was cleared.
func (*UserMembershipMutation) YoutubeTalentID ¶
func (m *UserMembershipMutation) YoutubeTalentID() (id string, exists bool)
YoutubeTalentID returns the "youtube_talent" edge ID in the mutation.
func (*UserMembershipMutation) YoutubeTalentIDs ¶
func (m *UserMembershipMutation) YoutubeTalentIDs() (ids []string)
YoutubeTalentIDs returns the "youtube_talent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use YoutubeTalentID instead. It exists only for internal usage by the builders.
type UserMembershipQuery ¶
type UserMembershipQuery struct {
// contains filtered or unexported fields
}
UserMembershipQuery is the builder for querying UserMembership entities.
func (*UserMembershipQuery) Aggregate ¶
func (umq *UserMembershipQuery) Aggregate(fns ...AggregateFunc) *UserMembershipSelect
Aggregate returns a UserMembershipSelect configured with the given aggregations.
func (*UserMembershipQuery) All ¶
func (umq *UserMembershipQuery) All(ctx context.Context) ([]*UserMembership, error)
All executes the query and returns a list of UserMemberships.
func (*UserMembershipQuery) AllX ¶
func (umq *UserMembershipQuery) AllX(ctx context.Context) []*UserMembership
AllX is like All, but panics if an error occurs.
func (*UserMembershipQuery) Clone ¶
func (umq *UserMembershipQuery) Clone() *UserMembershipQuery
Clone returns a duplicate of the UserMembershipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserMembershipQuery) Count ¶
func (umq *UserMembershipQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserMembershipQuery) CountX ¶
func (umq *UserMembershipQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserMembershipQuery) Exist ¶
func (umq *UserMembershipQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserMembershipQuery) ExistX ¶
func (umq *UserMembershipQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserMembershipQuery) First ¶
func (umq *UserMembershipQuery) First(ctx context.Context) (*UserMembership, error)
First returns the first UserMembership entity from the query. Returns a *NotFoundError when no UserMembership was found.
func (*UserMembershipQuery) FirstID ¶
func (umq *UserMembershipQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserMembership ID from the query. Returns a *NotFoundError when no UserMembership ID was found.
func (*UserMembershipQuery) FirstIDX ¶
func (umq *UserMembershipQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserMembershipQuery) FirstX ¶
func (umq *UserMembershipQuery) FirstX(ctx context.Context) *UserMembership
FirstX is like First, but panics if an error occurs.
func (*UserMembershipQuery) ForShare ¶
func (umq *UserMembershipQuery) ForShare(opts ...sql.LockOption) *UserMembershipQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserMembershipQuery) ForUpdate ¶
func (umq *UserMembershipQuery) ForUpdate(opts ...sql.LockOption) *UserMembershipQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserMembershipQuery) GroupBy ¶
func (umq *UserMembershipQuery) GroupBy(field string, fields ...string) *UserMembershipGroupBy
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 { FirstFailed time.Time `json:"first_failed,omitempty"` Count int `json:"count,omitempty"` } client.UserMembership.Query(). GroupBy(usermembership.FieldFirstFailed). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserMembershipQuery) IDs ¶
func (umq *UserMembershipQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of UserMembership IDs.
func (*UserMembershipQuery) IDsX ¶
func (umq *UserMembershipQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserMembershipQuery) Limit ¶
func (umq *UserMembershipQuery) Limit(limit int) *UserMembershipQuery
Limit the number of records to be returned by this query.
func (*UserMembershipQuery) Offset ¶
func (umq *UserMembershipQuery) Offset(offset int) *UserMembershipQuery
Offset to start from.
func (*UserMembershipQuery) Only ¶
func (umq *UserMembershipQuery) Only(ctx context.Context) (*UserMembership, error)
Only returns a single UserMembership entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserMembership entity is found. Returns a *NotFoundError when no UserMembership entities are found.
func (*UserMembershipQuery) OnlyID ¶
func (umq *UserMembershipQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserMembership ID in the query. Returns a *NotSingularError when more than one UserMembership ID is found. Returns a *NotFoundError when no entities are found.
func (*UserMembershipQuery) OnlyIDX ¶
func (umq *UserMembershipQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserMembershipQuery) OnlyX ¶
func (umq *UserMembershipQuery) OnlyX(ctx context.Context) *UserMembership
OnlyX is like Only, but panics if an error occurs.
func (*UserMembershipQuery) Order ¶
func (umq *UserMembershipQuery) Order(o ...usermembership.OrderOption) *UserMembershipQuery
Order specifies how the records should be ordered.
func (*UserMembershipQuery) QueryRoles ¶
func (umq *UserMembershipQuery) QueryRoles() *GuildRoleQuery
QueryRoles chains the current query on the "roles" edge.
func (*UserMembershipQuery) QueryUser ¶
func (umq *UserMembershipQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserMembershipQuery) QueryYoutubeTalent ¶
func (umq *UserMembershipQuery) QueryYoutubeTalent() *YouTubeTalentQuery
QueryYoutubeTalent chains the current query on the "youtube_talent" edge.
func (*UserMembershipQuery) Select ¶
func (umq *UserMembershipQuery) Select(fields ...string) *UserMembershipSelect
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 { FirstFailed time.Time `json:"first_failed,omitempty"` } client.UserMembership.Query(). Select(usermembership.FieldFirstFailed). Scan(ctx, &v)
func (*UserMembershipQuery) Unique ¶
func (umq *UserMembershipQuery) Unique(unique bool) *UserMembershipQuery
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 (*UserMembershipQuery) Where ¶
func (umq *UserMembershipQuery) Where(ps ...predicate.UserMembership) *UserMembershipQuery
Where adds a new predicate for the UserMembershipQuery builder.
func (*UserMembershipQuery) WithRoles ¶
func (umq *UserMembershipQuery) WithRoles(opts ...func(*GuildRoleQuery)) *UserMembershipQuery
WithRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserMembershipQuery) WithUser ¶
func (umq *UserMembershipQuery) WithUser(opts ...func(*UserQuery)) *UserMembershipQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserMembershipQuery) WithYoutubeTalent ¶
func (umq *UserMembershipQuery) WithYoutubeTalent(opts ...func(*YouTubeTalentQuery)) *UserMembershipQuery
WithYoutubeTalent tells the query-builder to eager-load the nodes that are connected to the "youtube_talent" edge. The optional arguments are used to configure the query builder of the edge.
type UserMembershipSelect ¶
type UserMembershipSelect struct { *UserMembershipQuery // contains filtered or unexported fields }
UserMembershipSelect is the builder for selecting fields of UserMembership entities.
func (*UserMembershipSelect) Aggregate ¶
func (ums *UserMembershipSelect) Aggregate(fns ...AggregateFunc) *UserMembershipSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserMembershipSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserMembershipSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserMembershipSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserMembershipSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserMembershipSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserMembershipSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserMembershipSelect) Scan ¶
func (ums *UserMembershipSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserMembershipSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMembershipUpdate ¶
type UserMembershipUpdate struct {
// contains filtered or unexported fields
}
UserMembershipUpdate is the builder for updating UserMembership entities.
func (*UserMembershipUpdate) AddFailCount ¶
func (umu *UserMembershipUpdate) AddFailCount(i int) *UserMembershipUpdate
AddFailCount adds i to the "fail_count" field.
func (*UserMembershipUpdate) AddRoleIDs ¶
func (umu *UserMembershipUpdate) AddRoleIDs(ids ...uint64) *UserMembershipUpdate
AddRoleIDs adds the "roles" edge to the GuildRole entity by IDs.
func (*UserMembershipUpdate) AddRoles ¶
func (umu *UserMembershipUpdate) AddRoles(g ...*GuildRole) *UserMembershipUpdate
AddRoles adds the "roles" edges to the GuildRole entity.
func (*UserMembershipUpdate) ClearFirstFailed ¶
func (umu *UserMembershipUpdate) ClearFirstFailed() *UserMembershipUpdate
ClearFirstFailed clears the value of the "first_failed" field.
func (*UserMembershipUpdate) ClearRoles ¶
func (umu *UserMembershipUpdate) ClearRoles() *UserMembershipUpdate
ClearRoles clears all "roles" edges to the GuildRole entity.
func (*UserMembershipUpdate) ClearUser ¶
func (umu *UserMembershipUpdate) ClearUser() *UserMembershipUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserMembershipUpdate) ClearYoutubeTalent ¶
func (umu *UserMembershipUpdate) ClearYoutubeTalent() *UserMembershipUpdate
ClearYoutubeTalent clears the "youtube_talent" edge to the YouTubeTalent entity.
func (*UserMembershipUpdate) Exec ¶
func (umu *UserMembershipUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserMembershipUpdate) ExecX ¶
func (umu *UserMembershipUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserMembershipUpdate) Mutation ¶
func (umu *UserMembershipUpdate) Mutation() *UserMembershipMutation
Mutation returns the UserMembershipMutation object of the builder.
func (*UserMembershipUpdate) RemoveRoleIDs ¶
func (umu *UserMembershipUpdate) RemoveRoleIDs(ids ...uint64) *UserMembershipUpdate
RemoveRoleIDs removes the "roles" edge to GuildRole entities by IDs.
func (*UserMembershipUpdate) RemoveRoles ¶
func (umu *UserMembershipUpdate) RemoveRoles(g ...*GuildRole) *UserMembershipUpdate
RemoveRoles removes "roles" edges to GuildRole entities.
func (*UserMembershipUpdate) Save ¶
func (umu *UserMembershipUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserMembershipUpdate) SaveX ¶
func (umu *UserMembershipUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserMembershipUpdate) SetFailCount ¶
func (umu *UserMembershipUpdate) SetFailCount(i int) *UserMembershipUpdate
SetFailCount sets the "fail_count" field.
func (*UserMembershipUpdate) SetFirstFailed ¶
func (umu *UserMembershipUpdate) SetFirstFailed(t time.Time) *UserMembershipUpdate
SetFirstFailed sets the "first_failed" field.
func (*UserMembershipUpdate) SetLastVerified ¶
func (umu *UserMembershipUpdate) SetLastVerified(t time.Time) *UserMembershipUpdate
SetLastVerified sets the "last_verified" field.
func (*UserMembershipUpdate) SetNillableFailCount ¶
func (umu *UserMembershipUpdate) SetNillableFailCount(i *int) *UserMembershipUpdate
SetNillableFailCount sets the "fail_count" field if the given value is not nil.
func (*UserMembershipUpdate) SetNillableFirstFailed ¶
func (umu *UserMembershipUpdate) SetNillableFirstFailed(t *time.Time) *UserMembershipUpdate
SetNillableFirstFailed sets the "first_failed" field if the given value is not nil.
func (*UserMembershipUpdate) SetNillableUserID ¶
func (umu *UserMembershipUpdate) SetNillableUserID(id *uint64) *UserMembershipUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*UserMembershipUpdate) SetUser ¶
func (umu *UserMembershipUpdate) SetUser(u *User) *UserMembershipUpdate
SetUser sets the "user" edge to the User entity.
func (*UserMembershipUpdate) SetUserID ¶
func (umu *UserMembershipUpdate) SetUserID(id uint64) *UserMembershipUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*UserMembershipUpdate) SetYoutubeTalent ¶
func (umu *UserMembershipUpdate) SetYoutubeTalent(y *YouTubeTalent) *UserMembershipUpdate
SetYoutubeTalent sets the "youtube_talent" edge to the YouTubeTalent entity.
func (*UserMembershipUpdate) SetYoutubeTalentID ¶
func (umu *UserMembershipUpdate) SetYoutubeTalentID(id string) *UserMembershipUpdate
SetYoutubeTalentID sets the "youtube_talent" edge to the YouTubeTalent entity by ID.
func (*UserMembershipUpdate) Where ¶
func (umu *UserMembershipUpdate) Where(ps ...predicate.UserMembership) *UserMembershipUpdate
Where appends a list predicates to the UserMembershipUpdate builder.
type UserMembershipUpdateOne ¶
type UserMembershipUpdateOne struct {
// contains filtered or unexported fields
}
UserMembershipUpdateOne is the builder for updating a single UserMembership entity.
func (*UserMembershipUpdateOne) AddFailCount ¶
func (umuo *UserMembershipUpdateOne) AddFailCount(i int) *UserMembershipUpdateOne
AddFailCount adds i to the "fail_count" field.
func (*UserMembershipUpdateOne) AddRoleIDs ¶
func (umuo *UserMembershipUpdateOne) AddRoleIDs(ids ...uint64) *UserMembershipUpdateOne
AddRoleIDs adds the "roles" edge to the GuildRole entity by IDs.
func (*UserMembershipUpdateOne) AddRoles ¶
func (umuo *UserMembershipUpdateOne) AddRoles(g ...*GuildRole) *UserMembershipUpdateOne
AddRoles adds the "roles" edges to the GuildRole entity.
func (*UserMembershipUpdateOne) ClearFirstFailed ¶
func (umuo *UserMembershipUpdateOne) ClearFirstFailed() *UserMembershipUpdateOne
ClearFirstFailed clears the value of the "first_failed" field.
func (*UserMembershipUpdateOne) ClearRoles ¶
func (umuo *UserMembershipUpdateOne) ClearRoles() *UserMembershipUpdateOne
ClearRoles clears all "roles" edges to the GuildRole entity.
func (*UserMembershipUpdateOne) ClearUser ¶
func (umuo *UserMembershipUpdateOne) ClearUser() *UserMembershipUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserMembershipUpdateOne) ClearYoutubeTalent ¶
func (umuo *UserMembershipUpdateOne) ClearYoutubeTalent() *UserMembershipUpdateOne
ClearYoutubeTalent clears the "youtube_talent" edge to the YouTubeTalent entity.
func (*UserMembershipUpdateOne) Exec ¶
func (umuo *UserMembershipUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserMembershipUpdateOne) ExecX ¶
func (umuo *UserMembershipUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserMembershipUpdateOne) Mutation ¶
func (umuo *UserMembershipUpdateOne) Mutation() *UserMembershipMutation
Mutation returns the UserMembershipMutation object of the builder.
func (*UserMembershipUpdateOne) RemoveRoleIDs ¶
func (umuo *UserMembershipUpdateOne) RemoveRoleIDs(ids ...uint64) *UserMembershipUpdateOne
RemoveRoleIDs removes the "roles" edge to GuildRole entities by IDs.
func (*UserMembershipUpdateOne) RemoveRoles ¶
func (umuo *UserMembershipUpdateOne) RemoveRoles(g ...*GuildRole) *UserMembershipUpdateOne
RemoveRoles removes "roles" edges to GuildRole entities.
func (*UserMembershipUpdateOne) Save ¶
func (umuo *UserMembershipUpdateOne) Save(ctx context.Context) (*UserMembership, error)
Save executes the query and returns the updated UserMembership entity.
func (*UserMembershipUpdateOne) SaveX ¶
func (umuo *UserMembershipUpdateOne) SaveX(ctx context.Context) *UserMembership
SaveX is like Save, but panics if an error occurs.
func (*UserMembershipUpdateOne) Select ¶
func (umuo *UserMembershipUpdateOne) Select(field string, fields ...string) *UserMembershipUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserMembershipUpdateOne) SetFailCount ¶
func (umuo *UserMembershipUpdateOne) SetFailCount(i int) *UserMembershipUpdateOne
SetFailCount sets the "fail_count" field.
func (*UserMembershipUpdateOne) SetFirstFailed ¶
func (umuo *UserMembershipUpdateOne) SetFirstFailed(t time.Time) *UserMembershipUpdateOne
SetFirstFailed sets the "first_failed" field.
func (*UserMembershipUpdateOne) SetLastVerified ¶
func (umuo *UserMembershipUpdateOne) SetLastVerified(t time.Time) *UserMembershipUpdateOne
SetLastVerified sets the "last_verified" field.
func (*UserMembershipUpdateOne) SetNillableFailCount ¶
func (umuo *UserMembershipUpdateOne) SetNillableFailCount(i *int) *UserMembershipUpdateOne
SetNillableFailCount sets the "fail_count" field if the given value is not nil.
func (*UserMembershipUpdateOne) SetNillableFirstFailed ¶
func (umuo *UserMembershipUpdateOne) SetNillableFirstFailed(t *time.Time) *UserMembershipUpdateOne
SetNillableFirstFailed sets the "first_failed" field if the given value is not nil.
func (*UserMembershipUpdateOne) SetNillableUserID ¶
func (umuo *UserMembershipUpdateOne) SetNillableUserID(id *uint64) *UserMembershipUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*UserMembershipUpdateOne) SetUser ¶
func (umuo *UserMembershipUpdateOne) SetUser(u *User) *UserMembershipUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserMembershipUpdateOne) SetUserID ¶
func (umuo *UserMembershipUpdateOne) SetUserID(id uint64) *UserMembershipUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*UserMembershipUpdateOne) SetYoutubeTalent ¶
func (umuo *UserMembershipUpdateOne) SetYoutubeTalent(y *YouTubeTalent) *UserMembershipUpdateOne
SetYoutubeTalent sets the "youtube_talent" edge to the YouTubeTalent entity.
func (*UserMembershipUpdateOne) SetYoutubeTalentID ¶
func (umuo *UserMembershipUpdateOne) SetYoutubeTalentID(id string) *UserMembershipUpdateOne
SetYoutubeTalentID sets the "youtube_talent" edge to the YouTubeTalent entity by ID.
func (*UserMembershipUpdateOne) Where ¶
func (umuo *UserMembershipUpdateOne) Where(ps ...predicate.UserMembership) *UserMembershipUpdateOne
Where appends a list predicates to the UserMembershipUpdate builder.
type UserMembershipUpsert ¶
UserMembershipUpsert is the "OnConflict" setter.
func (*UserMembershipUpsert) AddFailCount ¶
func (u *UserMembershipUpsert) AddFailCount(v int) *UserMembershipUpsert
AddFailCount adds v to the "fail_count" field.
func (*UserMembershipUpsert) ClearFirstFailed ¶
func (u *UserMembershipUpsert) ClearFirstFailed() *UserMembershipUpsert
ClearFirstFailed clears the value of the "first_failed" field.
func (*UserMembershipUpsert) SetFailCount ¶
func (u *UserMembershipUpsert) SetFailCount(v int) *UserMembershipUpsert
SetFailCount sets the "fail_count" field.
func (*UserMembershipUpsert) SetFirstFailed ¶
func (u *UserMembershipUpsert) SetFirstFailed(v time.Time) *UserMembershipUpsert
SetFirstFailed sets the "first_failed" field.
func (*UserMembershipUpsert) SetLastVerified ¶
func (u *UserMembershipUpsert) SetLastVerified(v time.Time) *UserMembershipUpsert
SetLastVerified sets the "last_verified" field.
func (*UserMembershipUpsert) UpdateFailCount ¶
func (u *UserMembershipUpsert) UpdateFailCount() *UserMembershipUpsert
UpdateFailCount sets the "fail_count" field to the value that was provided on create.
func (*UserMembershipUpsert) UpdateFirstFailed ¶
func (u *UserMembershipUpsert) UpdateFirstFailed() *UserMembershipUpsert
UpdateFirstFailed sets the "first_failed" field to the value that was provided on create.
func (*UserMembershipUpsert) UpdateLastVerified ¶
func (u *UserMembershipUpsert) UpdateLastVerified() *UserMembershipUpsert
UpdateLastVerified sets the "last_verified" field to the value that was provided on create.
type UserMembershipUpsertBulk ¶
type UserMembershipUpsertBulk struct {
// contains filtered or unexported fields
}
UserMembershipUpsertBulk is the builder for "upsert"-ing a bulk of UserMembership nodes.
func (*UserMembershipUpsertBulk) AddFailCount ¶
func (u *UserMembershipUpsertBulk) AddFailCount(v int) *UserMembershipUpsertBulk
AddFailCount adds v to the "fail_count" field.
func (*UserMembershipUpsertBulk) ClearFirstFailed ¶
func (u *UserMembershipUpsertBulk) ClearFirstFailed() *UserMembershipUpsertBulk
ClearFirstFailed clears the value of the "first_failed" field.
func (*UserMembershipUpsertBulk) DoNothing ¶
func (u *UserMembershipUpsertBulk) DoNothing() *UserMembershipUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserMembershipUpsertBulk) Exec ¶
func (u *UserMembershipUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserMembershipUpsertBulk) ExecX ¶
func (u *UserMembershipUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserMembershipUpsertBulk) Ignore ¶
func (u *UserMembershipUpsertBulk) Ignore() *UserMembershipUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserMembership.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserMembershipUpsertBulk) SetFailCount ¶
func (u *UserMembershipUpsertBulk) SetFailCount(v int) *UserMembershipUpsertBulk
SetFailCount sets the "fail_count" field.
func (*UserMembershipUpsertBulk) SetFirstFailed ¶
func (u *UserMembershipUpsertBulk) SetFirstFailed(v time.Time) *UserMembershipUpsertBulk
SetFirstFailed sets the "first_failed" field.
func (*UserMembershipUpsertBulk) SetLastVerified ¶
func (u *UserMembershipUpsertBulk) SetLastVerified(v time.Time) *UserMembershipUpsertBulk
SetLastVerified sets the "last_verified" field.
func (*UserMembershipUpsertBulk) Update ¶
func (u *UserMembershipUpsertBulk) Update(set func(*UserMembershipUpsert)) *UserMembershipUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserMembershipCreateBulk.OnConflict documentation for more info.
func (*UserMembershipUpsertBulk) UpdateFailCount ¶
func (u *UserMembershipUpsertBulk) UpdateFailCount() *UserMembershipUpsertBulk
UpdateFailCount sets the "fail_count" field to the value that was provided on create.
func (*UserMembershipUpsertBulk) UpdateFirstFailed ¶
func (u *UserMembershipUpsertBulk) UpdateFirstFailed() *UserMembershipUpsertBulk
UpdateFirstFailed sets the "first_failed" field to the value that was provided on create.
func (*UserMembershipUpsertBulk) UpdateLastVerified ¶
func (u *UserMembershipUpsertBulk) UpdateLastVerified() *UserMembershipUpsertBulk
UpdateLastVerified sets the "last_verified" field to the value that was provided on create.
func (*UserMembershipUpsertBulk) UpdateNewValues ¶
func (u *UserMembershipUpsertBulk) UpdateNewValues() *UserMembershipUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserMembership.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type UserMembershipUpsertOne ¶
type UserMembershipUpsertOne struct {
// contains filtered or unexported fields
}
UserMembershipUpsertOne is the builder for "upsert"-ing
one UserMembership node.
func (*UserMembershipUpsertOne) AddFailCount ¶
func (u *UserMembershipUpsertOne) AddFailCount(v int) *UserMembershipUpsertOne
AddFailCount adds v to the "fail_count" field.
func (*UserMembershipUpsertOne) ClearFirstFailed ¶
func (u *UserMembershipUpsertOne) ClearFirstFailed() *UserMembershipUpsertOne
ClearFirstFailed clears the value of the "first_failed" field.
func (*UserMembershipUpsertOne) DoNothing ¶
func (u *UserMembershipUpsertOne) DoNothing() *UserMembershipUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserMembershipUpsertOne) Exec ¶
func (u *UserMembershipUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserMembershipUpsertOne) ExecX ¶
func (u *UserMembershipUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserMembershipUpsertOne) ID ¶
func (u *UserMembershipUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserMembershipUpsertOne) IDX ¶
func (u *UserMembershipUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*UserMembershipUpsertOne) Ignore ¶
func (u *UserMembershipUpsertOne) Ignore() *UserMembershipUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserMembership.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserMembershipUpsertOne) SetFailCount ¶
func (u *UserMembershipUpsertOne) SetFailCount(v int) *UserMembershipUpsertOne
SetFailCount sets the "fail_count" field.
func (*UserMembershipUpsertOne) SetFirstFailed ¶
func (u *UserMembershipUpsertOne) SetFirstFailed(v time.Time) *UserMembershipUpsertOne
SetFirstFailed sets the "first_failed" field.
func (*UserMembershipUpsertOne) SetLastVerified ¶
func (u *UserMembershipUpsertOne) SetLastVerified(v time.Time) *UserMembershipUpsertOne
SetLastVerified sets the "last_verified" field.
func (*UserMembershipUpsertOne) Update ¶
func (u *UserMembershipUpsertOne) Update(set func(*UserMembershipUpsert)) *UserMembershipUpsertOne
Update allows overriding fields `UPDATE` values. See the UserMembershipCreate.OnConflict documentation for more info.
func (*UserMembershipUpsertOne) UpdateFailCount ¶
func (u *UserMembershipUpsertOne) UpdateFailCount() *UserMembershipUpsertOne
UpdateFailCount sets the "fail_count" field to the value that was provided on create.
func (*UserMembershipUpsertOne) UpdateFirstFailed ¶
func (u *UserMembershipUpsertOne) UpdateFirstFailed() *UserMembershipUpsertOne
UpdateFirstFailed sets the "first_failed" field to the value that was provided on create.
func (*UserMembershipUpsertOne) UpdateLastVerified ¶
func (u *UserMembershipUpsertOne) UpdateLastVerified() *UserMembershipUpsertOne
UpdateLastVerified sets the "last_verified" field to the value that was provided on create.
func (*UserMembershipUpsertOne) UpdateNewValues ¶
func (u *UserMembershipUpsertOne) UpdateNewValues() *UserMembershipUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserMembership.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type UserMemberships ¶
type UserMemberships []*UserMembership
UserMemberships is a parsable slice of UserMembership.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddGuildIDs ¶
func (m *UserMutation) AddGuildIDs(ids ...uint64)
AddGuildIDs adds the "guilds" edge to the Guild entity by ids.
func (*UserMutation) AddGuildsAdminIDs ¶
func (m *UserMutation) AddGuildsAdminIDs(ids ...uint64)
AddGuildsAdminIDs adds the "guilds_admin" edge to the Guild entity by ids.
func (*UserMutation) AddMembershipIDs ¶
func (m *UserMutation) AddMembershipIDs(ids ...int)
AddMembershipIDs adds the "memberships" edge to the UserMembership entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AvatarHash ¶
func (m *UserMutation) AvatarHash() (r string, exists bool)
AvatarHash returns the value of the "avatar_hash" field in the mutation.
func (*UserMutation) ClearDiscordToken ¶
func (m *UserMutation) ClearDiscordToken()
ClearDiscordToken clears the value of the "discord_token" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearGuilds ¶
func (m *UserMutation) ClearGuilds()
ClearGuilds clears the "guilds" edge to the Guild entity.
func (*UserMutation) ClearGuildsAdmin ¶
func (m *UserMutation) ClearGuildsAdmin()
ClearGuildsAdmin clears the "guilds_admin" edge to the Guild entity.
func (*UserMutation) ClearMemberships ¶
func (m *UserMutation) ClearMemberships()
ClearMemberships clears the "memberships" edge to the UserMembership entity.
func (*UserMutation) ClearYoutubeID ¶
func (m *UserMutation) ClearYoutubeID()
ClearYoutubeID clears the value of the "youtube_id" field.
func (*UserMutation) ClearYoutubeToken ¶
func (m *UserMutation) ClearYoutubeToken()
ClearYoutubeToken clears the value of the "youtube_token" field.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) DiscordToken ¶
func (m *UserMutation) DiscordToken() (r *oauth2.Token, exists bool)
DiscordToken returns the value of the "discord_token" field in the mutation.
func (*UserMutation) DiscordTokenCleared ¶
func (m *UserMutation) DiscordTokenCleared() bool
DiscordTokenCleared returns if the "discord_token" field was cleared in this mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) FullName ¶
func (m *UserMutation) FullName() (r string, exists bool)
FullName returns the value of the "full_name" field in the mutation.
func (*UserMutation) GuildsAdminCleared ¶
func (m *UserMutation) GuildsAdminCleared() bool
GuildsAdminCleared reports if the "guilds_admin" edge to the Guild entity was cleared.
func (*UserMutation) GuildsAdminIDs ¶
func (m *UserMutation) GuildsAdminIDs() (ids []uint64)
GuildsAdminIDs returns the "guilds_admin" edge IDs in the mutation.
func (*UserMutation) GuildsCleared ¶
func (m *UserMutation) GuildsCleared() bool
GuildsCleared reports if the "guilds" edge to the Guild entity was cleared.
func (*UserMutation) GuildsIDs ¶
func (m *UserMutation) GuildsIDs() (ids []uint64)
GuildsIDs returns the "guilds" edge IDs in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) LastCheck ¶
func (m *UserMutation) LastCheck() (r time.Time, exists bool)
LastCheck returns the value of the "last_check" field in the mutation.
func (*UserMutation) MembershipsCleared ¶
func (m *UserMutation) MembershipsCleared() bool
MembershipsCleared reports if the "memberships" edge to the UserMembership entity was cleared.
func (*UserMutation) MembershipsIDs ¶
func (m *UserMutation) MembershipsIDs() (ids []int)
MembershipsIDs returns the "memberships" edge IDs in the mutation.
func (*UserMutation) OldAvatarHash ¶
func (m *UserMutation) OldAvatarHash(ctx context.Context) (v string, err error)
OldAvatarHash returns the old "avatar_hash" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldDiscordToken ¶
OldDiscordToken returns the old "discord_token" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldFullName ¶
func (m *UserMutation) OldFullName(ctx context.Context) (v string, err error)
OldFullName returns the old "full_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldLastCheck ¶
OldLastCheck returns the old "last_check" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldYoutubeID ¶
func (m *UserMutation) OldYoutubeID(ctx context.Context) (v *string, err error)
OldYoutubeID returns the old "youtube_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldYoutubeToken ¶
OldYoutubeToken returns the old "youtube_token" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) RemoveGuildIDs ¶
func (m *UserMutation) RemoveGuildIDs(ids ...uint64)
RemoveGuildIDs removes the "guilds" edge to the Guild entity by IDs.
func (*UserMutation) RemoveGuildsAdminIDs ¶
func (m *UserMutation) RemoveGuildsAdminIDs(ids ...uint64)
RemoveGuildsAdminIDs removes the "guilds_admin" edge to the Guild entity by IDs.
func (*UserMutation) RemoveMembershipIDs ¶
func (m *UserMutation) RemoveMembershipIDs(ids ...int)
RemoveMembershipIDs removes the "memberships" edge to the UserMembership entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedGuildsAdminIDs ¶
func (m *UserMutation) RemovedGuildsAdminIDs() (ids []uint64)
RemovedGuildsAdmin returns the removed IDs of the "guilds_admin" edge to the Guild entity.
func (*UserMutation) RemovedGuildsIDs ¶
func (m *UserMutation) RemovedGuildsIDs() (ids []uint64)
RemovedGuilds returns the removed IDs of the "guilds" edge to the Guild entity.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedMembershipsIDs ¶
func (m *UserMutation) RemovedMembershipsIDs() (ids []int)
RemovedMemberships returns the removed IDs of the "memberships" edge to the UserMembership entity.
func (*UserMutation) ResetAvatarHash ¶
func (m *UserMutation) ResetAvatarHash()
ResetAvatarHash resets all changes to the "avatar_hash" field.
func (*UserMutation) ResetDiscordToken ¶
func (m *UserMutation) ResetDiscordToken()
ResetDiscordToken resets all changes to the "discord_token" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetFullName ¶
func (m *UserMutation) ResetFullName()
ResetFullName resets all changes to the "full_name" field.
func (*UserMutation) ResetGuilds ¶
func (m *UserMutation) ResetGuilds()
ResetGuilds resets all changes to the "guilds" edge.
func (*UserMutation) ResetGuildsAdmin ¶
func (m *UserMutation) ResetGuildsAdmin()
ResetGuildsAdmin resets all changes to the "guilds_admin" edge.
func (*UserMutation) ResetLastCheck ¶
func (m *UserMutation) ResetLastCheck()
ResetLastCheck resets all changes to the "last_check" field.
func (*UserMutation) ResetMemberships ¶
func (m *UserMutation) ResetMemberships()
ResetMemberships resets all changes to the "memberships" edge.
func (*UserMutation) ResetYoutubeID ¶
func (m *UserMutation) ResetYoutubeID()
ResetYoutubeID resets all changes to the "youtube_id" field.
func (*UserMutation) ResetYoutubeToken ¶
func (m *UserMutation) ResetYoutubeToken()
ResetYoutubeToken resets all changes to the "youtube_token" field.
func (*UserMutation) SetAvatarHash ¶
func (m *UserMutation) SetAvatarHash(s string)
SetAvatarHash sets the "avatar_hash" field.
func (*UserMutation) SetDiscordToken ¶
func (m *UserMutation) SetDiscordToken(o *oauth2.Token)
SetDiscordToken sets the "discord_token" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetFullName ¶
func (m *UserMutation) SetFullName(s string)
SetFullName sets the "full_name" field.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetLastCheck ¶
func (m *UserMutation) SetLastCheck(t time.Time)
SetLastCheck sets the "last_check" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetYoutubeID ¶
func (m *UserMutation) SetYoutubeID(s string)
SetYoutubeID sets the "youtube_id" field.
func (*UserMutation) SetYoutubeToken ¶
func (m *UserMutation) SetYoutubeToken(o *oauth2.Token)
SetYoutubeToken sets the "youtube_token" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*UserMutation) YoutubeID ¶
func (m *UserMutation) YoutubeID() (r string, exists bool)
YoutubeID returns the value of the "youtube_id" field in the mutation.
func (*UserMutation) YoutubeIDCleared ¶
func (m *UserMutation) YoutubeIDCleared() bool
YoutubeIDCleared returns if the "youtube_id" field was cleared in this mutation.
func (*UserMutation) YoutubeToken ¶
func (m *UserMutation) YoutubeToken() (r *oauth2.Token, exists bool)
YoutubeToken returns the value of the "youtube_token" field in the mutation.
func (*UserMutation) YoutubeTokenCleared ¶
func (m *UserMutation) YoutubeTokenCleared() bool
YoutubeTokenCleared returns if the "youtube_token" field was cleared in this mutation.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) ForShare ¶
func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserQuery) ForUpdate ¶
func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { FullName string `json:"full_name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldFullName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryGuilds ¶
func (uq *UserQuery) QueryGuilds() *GuildQuery
QueryGuilds chains the current query on the "guilds" edge.
func (*UserQuery) QueryGuildsAdmin ¶
func (uq *UserQuery) QueryGuildsAdmin() *GuildQuery
QueryGuildsAdmin chains the current query on the "guilds_admin" edge.
func (*UserQuery) QueryMemberships ¶
func (uq *UserQuery) QueryMemberships() *UserMembershipQuery
QueryMemberships chains the current query on the "memberships" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { FullName string `json:"full_name,omitempty"` } client.User.Query(). Select(user.FieldFullName). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithGuilds ¶
func (uq *UserQuery) WithGuilds(opts ...func(*GuildQuery)) *UserQuery
WithGuilds tells the query-builder to eager-load the nodes that are connected to the "guilds" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithGuildsAdmin ¶
func (uq *UserQuery) WithGuildsAdmin(opts ...func(*GuildQuery)) *UserQuery
WithGuildsAdmin tells the query-builder to eager-load the nodes that are connected to the "guilds_admin" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithMemberships ¶
func (uq *UserQuery) WithMemberships(opts ...func(*UserMembershipQuery)) *UserQuery
WithMemberships tells the query-builder to eager-load the nodes that are connected to the "memberships" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddGuildIDs ¶
func (uu *UserUpdate) AddGuildIDs(ids ...uint64) *UserUpdate
AddGuildIDs adds the "guilds" edge to the Guild entity by IDs.
func (*UserUpdate) AddGuilds ¶
func (uu *UserUpdate) AddGuilds(g ...*Guild) *UserUpdate
AddGuilds adds the "guilds" edges to the Guild entity.
func (*UserUpdate) AddGuildsAdmin ¶
func (uu *UserUpdate) AddGuildsAdmin(g ...*Guild) *UserUpdate
AddGuildsAdmin adds the "guilds_admin" edges to the Guild entity.
func (*UserUpdate) AddGuildsAdminIDs ¶
func (uu *UserUpdate) AddGuildsAdminIDs(ids ...uint64) *UserUpdate
AddGuildsAdminIDs adds the "guilds_admin" edge to the Guild entity by IDs.
func (*UserUpdate) AddMembershipIDs ¶
func (uu *UserUpdate) AddMembershipIDs(ids ...int) *UserUpdate
AddMembershipIDs adds the "memberships" edge to the UserMembership entity by IDs.
func (*UserUpdate) AddMemberships ¶
func (uu *UserUpdate) AddMemberships(u ...*UserMembership) *UserUpdate
AddMemberships adds the "memberships" edges to the UserMembership entity.
func (*UserUpdate) ClearDiscordToken ¶
func (uu *UserUpdate) ClearDiscordToken() *UserUpdate
ClearDiscordToken clears the value of the "discord_token" field.
func (*UserUpdate) ClearGuilds ¶
func (uu *UserUpdate) ClearGuilds() *UserUpdate
ClearGuilds clears all "guilds" edges to the Guild entity.
func (*UserUpdate) ClearGuildsAdmin ¶
func (uu *UserUpdate) ClearGuildsAdmin() *UserUpdate
ClearGuildsAdmin clears all "guilds_admin" edges to the Guild entity.
func (*UserUpdate) ClearMemberships ¶
func (uu *UserUpdate) ClearMemberships() *UserUpdate
ClearMemberships clears all "memberships" edges to the UserMembership entity.
func (*UserUpdate) ClearYoutubeID ¶
func (uu *UserUpdate) ClearYoutubeID() *UserUpdate
ClearYoutubeID clears the value of the "youtube_id" field.
func (*UserUpdate) ClearYoutubeToken ¶
func (uu *UserUpdate) ClearYoutubeToken() *UserUpdate
ClearYoutubeToken clears the value of the "youtube_token" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveGuildIDs ¶
func (uu *UserUpdate) RemoveGuildIDs(ids ...uint64) *UserUpdate
RemoveGuildIDs removes the "guilds" edge to Guild entities by IDs.
func (*UserUpdate) RemoveGuilds ¶
func (uu *UserUpdate) RemoveGuilds(g ...*Guild) *UserUpdate
RemoveGuilds removes "guilds" edges to Guild entities.
func (*UserUpdate) RemoveGuildsAdmin ¶
func (uu *UserUpdate) RemoveGuildsAdmin(g ...*Guild) *UserUpdate
RemoveGuildsAdmin removes "guilds_admin" edges to Guild entities.
func (*UserUpdate) RemoveGuildsAdminIDs ¶
func (uu *UserUpdate) RemoveGuildsAdminIDs(ids ...uint64) *UserUpdate
RemoveGuildsAdminIDs removes the "guilds_admin" edge to Guild entities by IDs.
func (*UserUpdate) RemoveMembershipIDs ¶
func (uu *UserUpdate) RemoveMembershipIDs(ids ...int) *UserUpdate
RemoveMembershipIDs removes the "memberships" edge to UserMembership entities by IDs.
func (*UserUpdate) RemoveMemberships ¶
func (uu *UserUpdate) RemoveMemberships(u ...*UserMembership) *UserUpdate
RemoveMemberships removes "memberships" edges to UserMembership entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAvatarHash ¶
func (uu *UserUpdate) SetAvatarHash(s string) *UserUpdate
SetAvatarHash sets the "avatar_hash" field.
func (*UserUpdate) SetDiscordToken ¶
func (uu *UserUpdate) SetDiscordToken(o *oauth2.Token) *UserUpdate
SetDiscordToken sets the "discord_token" field.
func (*UserUpdate) SetFullName ¶
func (uu *UserUpdate) SetFullName(s string) *UserUpdate
SetFullName sets the "full_name" field.
func (*UserUpdate) SetLastCheck ¶
func (uu *UserUpdate) SetLastCheck(t time.Time) *UserUpdate
SetLastCheck sets the "last_check" field.
func (*UserUpdate) SetNillableLastCheck ¶
func (uu *UserUpdate) SetNillableLastCheck(t *time.Time) *UserUpdate
SetNillableLastCheck sets the "last_check" field if the given value is not nil.
func (*UserUpdate) SetNillableYoutubeID ¶
func (uu *UserUpdate) SetNillableYoutubeID(s *string) *UserUpdate
SetNillableYoutubeID sets the "youtube_id" field if the given value is not nil.
func (*UserUpdate) SetYoutubeID ¶
func (uu *UserUpdate) SetYoutubeID(s string) *UserUpdate
SetYoutubeID sets the "youtube_id" field.
func (*UserUpdate) SetYoutubeToken ¶
func (uu *UserUpdate) SetYoutubeToken(o *oauth2.Token) *UserUpdate
SetYoutubeToken sets the "youtube_token" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddGuildIDs ¶
func (uuo *UserUpdateOne) AddGuildIDs(ids ...uint64) *UserUpdateOne
AddGuildIDs adds the "guilds" edge to the Guild entity by IDs.
func (*UserUpdateOne) AddGuilds ¶
func (uuo *UserUpdateOne) AddGuilds(g ...*Guild) *UserUpdateOne
AddGuilds adds the "guilds" edges to the Guild entity.
func (*UserUpdateOne) AddGuildsAdmin ¶
func (uuo *UserUpdateOne) AddGuildsAdmin(g ...*Guild) *UserUpdateOne
AddGuildsAdmin adds the "guilds_admin" edges to the Guild entity.
func (*UserUpdateOne) AddGuildsAdminIDs ¶
func (uuo *UserUpdateOne) AddGuildsAdminIDs(ids ...uint64) *UserUpdateOne
AddGuildsAdminIDs adds the "guilds_admin" edge to the Guild entity by IDs.
func (*UserUpdateOne) AddMembershipIDs ¶
func (uuo *UserUpdateOne) AddMembershipIDs(ids ...int) *UserUpdateOne
AddMembershipIDs adds the "memberships" edge to the UserMembership entity by IDs.
func (*UserUpdateOne) AddMemberships ¶
func (uuo *UserUpdateOne) AddMemberships(u ...*UserMembership) *UserUpdateOne
AddMemberships adds the "memberships" edges to the UserMembership entity.
func (*UserUpdateOne) ClearDiscordToken ¶
func (uuo *UserUpdateOne) ClearDiscordToken() *UserUpdateOne
ClearDiscordToken clears the value of the "discord_token" field.
func (*UserUpdateOne) ClearGuilds ¶
func (uuo *UserUpdateOne) ClearGuilds() *UserUpdateOne
ClearGuilds clears all "guilds" edges to the Guild entity.
func (*UserUpdateOne) ClearGuildsAdmin ¶
func (uuo *UserUpdateOne) ClearGuildsAdmin() *UserUpdateOne
ClearGuildsAdmin clears all "guilds_admin" edges to the Guild entity.
func (*UserUpdateOne) ClearMemberships ¶
func (uuo *UserUpdateOne) ClearMemberships() *UserUpdateOne
ClearMemberships clears all "memberships" edges to the UserMembership entity.
func (*UserUpdateOne) ClearYoutubeID ¶
func (uuo *UserUpdateOne) ClearYoutubeID() *UserUpdateOne
ClearYoutubeID clears the value of the "youtube_id" field.
func (*UserUpdateOne) ClearYoutubeToken ¶
func (uuo *UserUpdateOne) ClearYoutubeToken() *UserUpdateOne
ClearYoutubeToken clears the value of the "youtube_token" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveGuildIDs ¶
func (uuo *UserUpdateOne) RemoveGuildIDs(ids ...uint64) *UserUpdateOne
RemoveGuildIDs removes the "guilds" edge to Guild entities by IDs.
func (*UserUpdateOne) RemoveGuilds ¶
func (uuo *UserUpdateOne) RemoveGuilds(g ...*Guild) *UserUpdateOne
RemoveGuilds removes "guilds" edges to Guild entities.
func (*UserUpdateOne) RemoveGuildsAdmin ¶
func (uuo *UserUpdateOne) RemoveGuildsAdmin(g ...*Guild) *UserUpdateOne
RemoveGuildsAdmin removes "guilds_admin" edges to Guild entities.
func (*UserUpdateOne) RemoveGuildsAdminIDs ¶
func (uuo *UserUpdateOne) RemoveGuildsAdminIDs(ids ...uint64) *UserUpdateOne
RemoveGuildsAdminIDs removes the "guilds_admin" edge to Guild entities by IDs.
func (*UserUpdateOne) RemoveMembershipIDs ¶
func (uuo *UserUpdateOne) RemoveMembershipIDs(ids ...int) *UserUpdateOne
RemoveMembershipIDs removes the "memberships" edge to UserMembership entities by IDs.
func (*UserUpdateOne) RemoveMemberships ¶
func (uuo *UserUpdateOne) RemoveMemberships(u ...*UserMembership) *UserUpdateOne
RemoveMemberships removes "memberships" edges to UserMembership entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetAvatarHash ¶
func (uuo *UserUpdateOne) SetAvatarHash(s string) *UserUpdateOne
SetAvatarHash sets the "avatar_hash" field.
func (*UserUpdateOne) SetDiscordToken ¶
func (uuo *UserUpdateOne) SetDiscordToken(o *oauth2.Token) *UserUpdateOne
SetDiscordToken sets the "discord_token" field.
func (*UserUpdateOne) SetFullName ¶
func (uuo *UserUpdateOne) SetFullName(s string) *UserUpdateOne
SetFullName sets the "full_name" field.
func (*UserUpdateOne) SetLastCheck ¶
func (uuo *UserUpdateOne) SetLastCheck(t time.Time) *UserUpdateOne
SetLastCheck sets the "last_check" field.
func (*UserUpdateOne) SetNillableLastCheck ¶
func (uuo *UserUpdateOne) SetNillableLastCheck(t *time.Time) *UserUpdateOne
SetNillableLastCheck sets the "last_check" field if the given value is not nil.
func (*UserUpdateOne) SetNillableYoutubeID ¶
func (uuo *UserUpdateOne) SetNillableYoutubeID(s *string) *UserUpdateOne
SetNillableYoutubeID sets the "youtube_id" field if the given value is not nil.
func (*UserUpdateOne) SetYoutubeID ¶
func (uuo *UserUpdateOne) SetYoutubeID(s string) *UserUpdateOne
SetYoutubeID sets the "youtube_id" field.
func (*UserUpdateOne) SetYoutubeToken ¶
func (uuo *UserUpdateOne) SetYoutubeToken(o *oauth2.Token) *UserUpdateOne
SetYoutubeToken sets the "youtube_token" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) ClearDiscordToken ¶
func (u *UserUpsert) ClearDiscordToken() *UserUpsert
ClearDiscordToken clears the value of the "discord_token" field.
func (*UserUpsert) ClearYoutubeID ¶
func (u *UserUpsert) ClearYoutubeID() *UserUpsert
ClearYoutubeID clears the value of the "youtube_id" field.
func (*UserUpsert) ClearYoutubeToken ¶
func (u *UserUpsert) ClearYoutubeToken() *UserUpsert
ClearYoutubeToken clears the value of the "youtube_token" field.
func (*UserUpsert) SetAvatarHash ¶
func (u *UserUpsert) SetAvatarHash(v string) *UserUpsert
SetAvatarHash sets the "avatar_hash" field.
func (*UserUpsert) SetDiscordToken ¶
func (u *UserUpsert) SetDiscordToken(v *oauth2.Token) *UserUpsert
SetDiscordToken sets the "discord_token" field.
func (*UserUpsert) SetFullName ¶
func (u *UserUpsert) SetFullName(v string) *UserUpsert
SetFullName sets the "full_name" field.
func (*UserUpsert) SetLastCheck ¶
func (u *UserUpsert) SetLastCheck(v time.Time) *UserUpsert
SetLastCheck sets the "last_check" field.
func (*UserUpsert) SetYoutubeID ¶
func (u *UserUpsert) SetYoutubeID(v string) *UserUpsert
SetYoutubeID sets the "youtube_id" field.
func (*UserUpsert) SetYoutubeToken ¶
func (u *UserUpsert) SetYoutubeToken(v *oauth2.Token) *UserUpsert
SetYoutubeToken sets the "youtube_token" field.
func (*UserUpsert) UpdateAvatarHash ¶
func (u *UserUpsert) UpdateAvatarHash() *UserUpsert
UpdateAvatarHash sets the "avatar_hash" field to the value that was provided on create.
func (*UserUpsert) UpdateDiscordToken ¶
func (u *UserUpsert) UpdateDiscordToken() *UserUpsert
UpdateDiscordToken sets the "discord_token" field to the value that was provided on create.
func (*UserUpsert) UpdateFullName ¶
func (u *UserUpsert) UpdateFullName() *UserUpsert
UpdateFullName sets the "full_name" field to the value that was provided on create.
func (*UserUpsert) UpdateLastCheck ¶
func (u *UserUpsert) UpdateLastCheck() *UserUpsert
UpdateLastCheck sets the "last_check" field to the value that was provided on create.
func (*UserUpsert) UpdateYoutubeID ¶
func (u *UserUpsert) UpdateYoutubeID() *UserUpsert
UpdateYoutubeID sets the "youtube_id" field to the value that was provided on create.
func (*UserUpsert) UpdateYoutubeToken ¶
func (u *UserUpsert) UpdateYoutubeToken() *UserUpsert
UpdateYoutubeToken sets the "youtube_token" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) ClearDiscordToken ¶
func (u *UserUpsertBulk) ClearDiscordToken() *UserUpsertBulk
ClearDiscordToken clears the value of the "discord_token" field.
func (*UserUpsertBulk) ClearYoutubeID ¶
func (u *UserUpsertBulk) ClearYoutubeID() *UserUpsertBulk
ClearYoutubeID clears the value of the "youtube_id" field.
func (*UserUpsertBulk) ClearYoutubeToken ¶
func (u *UserUpsertBulk) ClearYoutubeToken() *UserUpsertBulk
ClearYoutubeToken clears the value of the "youtube_token" field.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetAvatarHash ¶
func (u *UserUpsertBulk) SetAvatarHash(v string) *UserUpsertBulk
SetAvatarHash sets the "avatar_hash" field.
func (*UserUpsertBulk) SetDiscordToken ¶
func (u *UserUpsertBulk) SetDiscordToken(v *oauth2.Token) *UserUpsertBulk
SetDiscordToken sets the "discord_token" field.
func (*UserUpsertBulk) SetFullName ¶
func (u *UserUpsertBulk) SetFullName(v string) *UserUpsertBulk
SetFullName sets the "full_name" field.
func (*UserUpsertBulk) SetLastCheck ¶
func (u *UserUpsertBulk) SetLastCheck(v time.Time) *UserUpsertBulk
SetLastCheck sets the "last_check" field.
func (*UserUpsertBulk) SetYoutubeID ¶
func (u *UserUpsertBulk) SetYoutubeID(v string) *UserUpsertBulk
SetYoutubeID sets the "youtube_id" field.
func (*UserUpsertBulk) SetYoutubeToken ¶
func (u *UserUpsertBulk) SetYoutubeToken(v *oauth2.Token) *UserUpsertBulk
SetYoutubeToken sets the "youtube_token" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateAvatarHash ¶
func (u *UserUpsertBulk) UpdateAvatarHash() *UserUpsertBulk
UpdateAvatarHash sets the "avatar_hash" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateDiscordToken ¶
func (u *UserUpsertBulk) UpdateDiscordToken() *UserUpsertBulk
UpdateDiscordToken sets the "discord_token" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateFullName ¶
func (u *UserUpsertBulk) UpdateFullName() *UserUpsertBulk
UpdateFullName sets the "full_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateLastCheck ¶
func (u *UserUpsertBulk) UpdateLastCheck() *UserUpsertBulk
UpdateLastCheck sets the "last_check" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertBulk) UpdateYoutubeID ¶
func (u *UserUpsertBulk) UpdateYoutubeID() *UserUpsertBulk
UpdateYoutubeID sets the "youtube_id" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateYoutubeToken ¶
func (u *UserUpsertBulk) UpdateYoutubeToken() *UserUpsertBulk
UpdateYoutubeToken sets the "youtube_token" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) ClearDiscordToken ¶
func (u *UserUpsertOne) ClearDiscordToken() *UserUpsertOne
ClearDiscordToken clears the value of the "discord_token" field.
func (*UserUpsertOne) ClearYoutubeID ¶
func (u *UserUpsertOne) ClearYoutubeID() *UserUpsertOne
ClearYoutubeID clears the value of the "youtube_id" field.
func (*UserUpsertOne) ClearYoutubeToken ¶
func (u *UserUpsertOne) ClearYoutubeToken() *UserUpsertOne
ClearYoutubeToken clears the value of the "youtube_token" field.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) ID ¶
func (u *UserUpsertOne) ID(ctx context.Context) (id uint64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) uint64
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetAvatarHash ¶
func (u *UserUpsertOne) SetAvatarHash(v string) *UserUpsertOne
SetAvatarHash sets the "avatar_hash" field.
func (*UserUpsertOne) SetDiscordToken ¶
func (u *UserUpsertOne) SetDiscordToken(v *oauth2.Token) *UserUpsertOne
SetDiscordToken sets the "discord_token" field.
func (*UserUpsertOne) SetFullName ¶
func (u *UserUpsertOne) SetFullName(v string) *UserUpsertOne
SetFullName sets the "full_name" field.
func (*UserUpsertOne) SetLastCheck ¶
func (u *UserUpsertOne) SetLastCheck(v time.Time) *UserUpsertOne
SetLastCheck sets the "last_check" field.
func (*UserUpsertOne) SetYoutubeID ¶
func (u *UserUpsertOne) SetYoutubeID(v string) *UserUpsertOne
SetYoutubeID sets the "youtube_id" field.
func (*UserUpsertOne) SetYoutubeToken ¶
func (u *UserUpsertOne) SetYoutubeToken(v *oauth2.Token) *UserUpsertOne
SetYoutubeToken sets the "youtube_token" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateAvatarHash ¶
func (u *UserUpsertOne) UpdateAvatarHash() *UserUpsertOne
UpdateAvatarHash sets the "avatar_hash" field to the value that was provided on create.
func (*UserUpsertOne) UpdateDiscordToken ¶
func (u *UserUpsertOne) UpdateDiscordToken() *UserUpsertOne
UpdateDiscordToken sets the "discord_token" field to the value that was provided on create.
func (*UserUpsertOne) UpdateFullName ¶
func (u *UserUpsertOne) UpdateFullName() *UserUpsertOne
UpdateFullName sets the "full_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateLastCheck ¶
func (u *UserUpsertOne) UpdateLastCheck() *UserUpsertOne
UpdateLastCheck sets the "last_check" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertOne) UpdateYoutubeID ¶
func (u *UserUpsertOne) UpdateYoutubeID() *UserUpsertOne
UpdateYoutubeID sets the "youtube_id" field to the value that was provided on create.
func (*UserUpsertOne) UpdateYoutubeToken ¶
func (u *UserUpsertOne) UpdateYoutubeToken() *UserUpsertOne
UpdateYoutubeToken sets the "youtube_token" field to the value that was provided on create.
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 YouTubeTalent ¶
type YouTubeTalent struct { // ID of the ent. // YouTube channel ID ID string `json:"id,omitempty"` // YouTube channel name ChannelName string `json:"channel_name,omitempty"` // URL of the talent's YouTube thumbnail ThumbnailURL string `json:"thumbnail_url,omitempty"` // ID of a members-only video MembershipVideoID string `json:"membership_video_id,omitempty"` // Last time membership_video_id returned no results LastMembershipVideoIDMiss time.Time `json:"last_membership_video_id_miss,omitempty"` // Last time data was fetched LastUpdated time.Time `json:"last_updated,omitempty"` // When refresh/membership checks were disabled. Set to zero/nil to re-enable. Disabled time.Time `json:"disabled,omitempty"` // Administratively toggled for deleted/deactivated channels DisabledPermanently bool `json:"disabled_permanently,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the YouTubeTalentQuery when eager-loading is set. Edges YouTubeTalentEdges `json:"edges"` // contains filtered or unexported fields }
YouTubeTalent is the model entity for the YouTubeTalent schema.
func (*YouTubeTalent) QueryGuilds ¶
func (ytt *YouTubeTalent) QueryGuilds() *GuildQuery
QueryGuilds queries the "guilds" edge of the YouTubeTalent entity.
func (*YouTubeTalent) QueryMemberships ¶
func (ytt *YouTubeTalent) QueryMemberships() *UserMembershipQuery
QueryMemberships queries the "memberships" edge of the YouTubeTalent entity.
func (*YouTubeTalent) QueryRoles ¶
func (ytt *YouTubeTalent) QueryRoles() *GuildRoleQuery
QueryRoles queries the "roles" edge of the YouTubeTalent entity.
func (*YouTubeTalent) String ¶
func (ytt *YouTubeTalent) String() string
String implements the fmt.Stringer.
func (*YouTubeTalent) Unwrap ¶
func (ytt *YouTubeTalent) Unwrap() *YouTubeTalent
Unwrap unwraps the YouTubeTalent 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 (*YouTubeTalent) Update ¶
func (ytt *YouTubeTalent) Update() *YouTubeTalentUpdateOne
Update returns a builder for updating this YouTubeTalent. Note that you need to call YouTubeTalent.Unwrap() before calling this method if this YouTubeTalent was returned from a transaction, and the transaction was committed or rolled back.
type YouTubeTalentClient ¶
type YouTubeTalentClient struct {
// contains filtered or unexported fields
}
YouTubeTalentClient is a client for the YouTubeTalent schema.
func NewYouTubeTalentClient ¶
func NewYouTubeTalentClient(c config) *YouTubeTalentClient
NewYouTubeTalentClient returns a client for the YouTubeTalent from the given config.
func (*YouTubeTalentClient) Create ¶
func (c *YouTubeTalentClient) Create() *YouTubeTalentCreate
Create returns a builder for creating a YouTubeTalent entity.
func (*YouTubeTalentClient) CreateBulk ¶
func (c *YouTubeTalentClient) CreateBulk(builders ...*YouTubeTalentCreate) *YouTubeTalentCreateBulk
CreateBulk returns a builder for creating a bulk of YouTubeTalent entities.
func (*YouTubeTalentClient) Delete ¶
func (c *YouTubeTalentClient) Delete() *YouTubeTalentDelete
Delete returns a delete builder for YouTubeTalent.
func (*YouTubeTalentClient) DeleteOne ¶
func (c *YouTubeTalentClient) DeleteOne(ytt *YouTubeTalent) *YouTubeTalentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*YouTubeTalentClient) DeleteOneID ¶
func (c *YouTubeTalentClient) DeleteOneID(id string) *YouTubeTalentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*YouTubeTalentClient) Get ¶
func (c *YouTubeTalentClient) Get(ctx context.Context, id string) (*YouTubeTalent, error)
Get returns a YouTubeTalent entity by its id.
func (*YouTubeTalentClient) GetX ¶
func (c *YouTubeTalentClient) GetX(ctx context.Context, id string) *YouTubeTalent
GetX is like Get, but panics if an error occurs.
func (*YouTubeTalentClient) Hooks ¶
func (c *YouTubeTalentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*YouTubeTalentClient) Intercept ¶
func (c *YouTubeTalentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `youtubetalent.Intercept(f(g(h())))`.
func (*YouTubeTalentClient) Interceptors ¶
func (c *YouTubeTalentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*YouTubeTalentClient) Query ¶
func (c *YouTubeTalentClient) Query() *YouTubeTalentQuery
Query returns a query builder for YouTubeTalent.
func (*YouTubeTalentClient) QueryGuilds ¶
func (c *YouTubeTalentClient) QueryGuilds(ytt *YouTubeTalent) *GuildQuery
QueryGuilds queries the guilds edge of a YouTubeTalent.
func (*YouTubeTalentClient) QueryMemberships ¶
func (c *YouTubeTalentClient) QueryMemberships(ytt *YouTubeTalent) *UserMembershipQuery
QueryMemberships queries the memberships edge of a YouTubeTalent.
func (*YouTubeTalentClient) QueryRoles ¶
func (c *YouTubeTalentClient) QueryRoles(ytt *YouTubeTalent) *GuildRoleQuery
QueryRoles queries the roles edge of a YouTubeTalent.
func (*YouTubeTalentClient) Update ¶
func (c *YouTubeTalentClient) Update() *YouTubeTalentUpdate
Update returns an update builder for YouTubeTalent.
func (*YouTubeTalentClient) UpdateOne ¶
func (c *YouTubeTalentClient) UpdateOne(ytt *YouTubeTalent) *YouTubeTalentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*YouTubeTalentClient) UpdateOneID ¶
func (c *YouTubeTalentClient) UpdateOneID(id string) *YouTubeTalentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*YouTubeTalentClient) Use ¶
func (c *YouTubeTalentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `youtubetalent.Hooks(f(g(h())))`.
type YouTubeTalentCreate ¶
type YouTubeTalentCreate struct {
// contains filtered or unexported fields
}
YouTubeTalentCreate is the builder for creating a YouTubeTalent entity.
func (*YouTubeTalentCreate) AddGuildIDs ¶
func (yttc *YouTubeTalentCreate) AddGuildIDs(ids ...uint64) *YouTubeTalentCreate
AddGuildIDs adds the "guilds" edge to the Guild entity by IDs.
func (*YouTubeTalentCreate) AddGuilds ¶
func (yttc *YouTubeTalentCreate) AddGuilds(g ...*Guild) *YouTubeTalentCreate
AddGuilds adds the "guilds" edges to the Guild entity.
func (*YouTubeTalentCreate) AddMembershipIDs ¶
func (yttc *YouTubeTalentCreate) AddMembershipIDs(ids ...int) *YouTubeTalentCreate
AddMembershipIDs adds the "memberships" edge to the UserMembership entity by IDs.
func (*YouTubeTalentCreate) AddMemberships ¶
func (yttc *YouTubeTalentCreate) AddMemberships(u ...*UserMembership) *YouTubeTalentCreate
AddMemberships adds the "memberships" edges to the UserMembership entity.
func (*YouTubeTalentCreate) AddRoleIDs ¶
func (yttc *YouTubeTalentCreate) AddRoleIDs(ids ...uint64) *YouTubeTalentCreate
AddRoleIDs adds the "roles" edge to the GuildRole entity by IDs.
func (*YouTubeTalentCreate) AddRoles ¶
func (yttc *YouTubeTalentCreate) AddRoles(g ...*GuildRole) *YouTubeTalentCreate
AddRoles adds the "roles" edges to the GuildRole entity.
func (*YouTubeTalentCreate) Exec ¶
func (yttc *YouTubeTalentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*YouTubeTalentCreate) ExecX ¶
func (yttc *YouTubeTalentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*YouTubeTalentCreate) Mutation ¶
func (yttc *YouTubeTalentCreate) Mutation() *YouTubeTalentMutation
Mutation returns the YouTubeTalentMutation object of the builder.
func (*YouTubeTalentCreate) OnConflict ¶
func (yttc *YouTubeTalentCreate) OnConflict(opts ...sql.ConflictOption) *YouTubeTalentUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.YouTubeTalent.Create(). SetChannelName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.YouTubeTalentUpsert) { SetChannelName(v+v). }). Exec(ctx)
func (*YouTubeTalentCreate) OnConflictColumns ¶
func (yttc *YouTubeTalentCreate) OnConflictColumns(columns ...string) *YouTubeTalentUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.YouTubeTalent.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*YouTubeTalentCreate) Save ¶
func (yttc *YouTubeTalentCreate) Save(ctx context.Context) (*YouTubeTalent, error)
Save creates the YouTubeTalent in the database.
func (*YouTubeTalentCreate) SaveX ¶
func (yttc *YouTubeTalentCreate) SaveX(ctx context.Context) *YouTubeTalent
SaveX calls Save and panics if Save returns an error.
func (*YouTubeTalentCreate) SetChannelName ¶
func (yttc *YouTubeTalentCreate) SetChannelName(s string) *YouTubeTalentCreate
SetChannelName sets the "channel_name" field.
func (*YouTubeTalentCreate) SetDisabled ¶
func (yttc *YouTubeTalentCreate) SetDisabled(t time.Time) *YouTubeTalentCreate
SetDisabled sets the "disabled" field.
func (*YouTubeTalentCreate) SetDisabledPermanently ¶
func (yttc *YouTubeTalentCreate) SetDisabledPermanently(b bool) *YouTubeTalentCreate
SetDisabledPermanently sets the "disabled_permanently" field.
func (*YouTubeTalentCreate) SetID ¶
func (yttc *YouTubeTalentCreate) SetID(s string) *YouTubeTalentCreate
SetID sets the "id" field.
func (*YouTubeTalentCreate) SetLastMembershipVideoIDMiss ¶
func (yttc *YouTubeTalentCreate) SetLastMembershipVideoIDMiss(t time.Time) *YouTubeTalentCreate
SetLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field.
func (*YouTubeTalentCreate) SetLastUpdated ¶
func (yttc *YouTubeTalentCreate) SetLastUpdated(t time.Time) *YouTubeTalentCreate
SetLastUpdated sets the "last_updated" field.
func (*YouTubeTalentCreate) SetMembershipVideoID ¶
func (yttc *YouTubeTalentCreate) SetMembershipVideoID(s string) *YouTubeTalentCreate
SetMembershipVideoID sets the "membership_video_id" field.
func (*YouTubeTalentCreate) SetNillableDisabled ¶
func (yttc *YouTubeTalentCreate) SetNillableDisabled(t *time.Time) *YouTubeTalentCreate
SetNillableDisabled sets the "disabled" field if the given value is not nil.
func (*YouTubeTalentCreate) SetNillableDisabledPermanently ¶
func (yttc *YouTubeTalentCreate) SetNillableDisabledPermanently(b *bool) *YouTubeTalentCreate
SetNillableDisabledPermanently sets the "disabled_permanently" field if the given value is not nil.
func (*YouTubeTalentCreate) SetNillableLastMembershipVideoIDMiss ¶
func (yttc *YouTubeTalentCreate) SetNillableLastMembershipVideoIDMiss(t *time.Time) *YouTubeTalentCreate
SetNillableLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field if the given value is not nil.
func (*YouTubeTalentCreate) SetNillableLastUpdated ¶
func (yttc *YouTubeTalentCreate) SetNillableLastUpdated(t *time.Time) *YouTubeTalentCreate
SetNillableLastUpdated sets the "last_updated" field if the given value is not nil.
func (*YouTubeTalentCreate) SetNillableMembershipVideoID ¶
func (yttc *YouTubeTalentCreate) SetNillableMembershipVideoID(s *string) *YouTubeTalentCreate
SetNillableMembershipVideoID sets the "membership_video_id" field if the given value is not nil.
func (*YouTubeTalentCreate) SetThumbnailURL ¶
func (yttc *YouTubeTalentCreate) SetThumbnailURL(s string) *YouTubeTalentCreate
SetThumbnailURL sets the "thumbnail_url" field.
type YouTubeTalentCreateBulk ¶
type YouTubeTalentCreateBulk struct {
// contains filtered or unexported fields
}
YouTubeTalentCreateBulk is the builder for creating many YouTubeTalent entities in bulk.
func (*YouTubeTalentCreateBulk) Exec ¶
func (yttcb *YouTubeTalentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*YouTubeTalentCreateBulk) ExecX ¶
func (yttcb *YouTubeTalentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*YouTubeTalentCreateBulk) OnConflict ¶
func (yttcb *YouTubeTalentCreateBulk) OnConflict(opts ...sql.ConflictOption) *YouTubeTalentUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.YouTubeTalent.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.YouTubeTalentUpsert) { SetChannelName(v+v). }). Exec(ctx)
func (*YouTubeTalentCreateBulk) OnConflictColumns ¶
func (yttcb *YouTubeTalentCreateBulk) OnConflictColumns(columns ...string) *YouTubeTalentUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.YouTubeTalent.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*YouTubeTalentCreateBulk) Save ¶
func (yttcb *YouTubeTalentCreateBulk) Save(ctx context.Context) ([]*YouTubeTalent, error)
Save creates the YouTubeTalent entities in the database.
func (*YouTubeTalentCreateBulk) SaveX ¶
func (yttcb *YouTubeTalentCreateBulk) SaveX(ctx context.Context) []*YouTubeTalent
SaveX is like Save, but panics if an error occurs.
type YouTubeTalentDelete ¶
type YouTubeTalentDelete struct {
// contains filtered or unexported fields
}
YouTubeTalentDelete is the builder for deleting a YouTubeTalent entity.
func (*YouTubeTalentDelete) Exec ¶
func (yttd *YouTubeTalentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*YouTubeTalentDelete) ExecX ¶
func (yttd *YouTubeTalentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*YouTubeTalentDelete) Where ¶
func (yttd *YouTubeTalentDelete) Where(ps ...predicate.YouTubeTalent) *YouTubeTalentDelete
Where appends a list predicates to the YouTubeTalentDelete builder.
type YouTubeTalentDeleteOne ¶
type YouTubeTalentDeleteOne struct {
// contains filtered or unexported fields
}
YouTubeTalentDeleteOne is the builder for deleting a single YouTubeTalent entity.
func (*YouTubeTalentDeleteOne) Exec ¶
func (yttdo *YouTubeTalentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*YouTubeTalentDeleteOne) ExecX ¶
func (yttdo *YouTubeTalentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*YouTubeTalentDeleteOne) Where ¶
func (yttdo *YouTubeTalentDeleteOne) Where(ps ...predicate.YouTubeTalent) *YouTubeTalentDeleteOne
Where appends a list predicates to the YouTubeTalentDelete builder.
type YouTubeTalentEdges ¶
type YouTubeTalentEdges struct { // Guilds holds the value of the guilds edge. Guilds []*Guild `json:"guilds,omitempty"` // Roles holds the value of the roles edge. Roles []*GuildRole `json:"roles,omitempty"` // Memberships holds the value of the memberships edge. Memberships []*UserMembership `json:"memberships,omitempty"` // contains filtered or unexported fields }
YouTubeTalentEdges holds the relations/edges for other nodes in the graph.
func (YouTubeTalentEdges) GuildsOrErr ¶
func (e YouTubeTalentEdges) GuildsOrErr() ([]*Guild, error)
GuildsOrErr returns the Guilds value or an error if the edge was not loaded in eager-loading.
func (YouTubeTalentEdges) MembershipsOrErr ¶
func (e YouTubeTalentEdges) MembershipsOrErr() ([]*UserMembership, error)
MembershipsOrErr returns the Memberships value or an error if the edge was not loaded in eager-loading.
func (YouTubeTalentEdges) RolesOrErr ¶
func (e YouTubeTalentEdges) RolesOrErr() ([]*GuildRole, error)
RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.
type YouTubeTalentGroupBy ¶
type YouTubeTalentGroupBy struct {
// contains filtered or unexported fields
}
YouTubeTalentGroupBy is the group-by builder for YouTubeTalent entities.
func (*YouTubeTalentGroupBy) Aggregate ¶
func (yttgb *YouTubeTalentGroupBy) Aggregate(fns ...AggregateFunc) *YouTubeTalentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*YouTubeTalentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentGroupBy) Scan ¶
func (yttgb *YouTubeTalentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*YouTubeTalentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type YouTubeTalentMutation ¶
type YouTubeTalentMutation struct {
// contains filtered or unexported fields
}
YouTubeTalentMutation represents an operation that mutates the YouTubeTalent nodes in the graph.
func (*YouTubeTalentMutation) AddField ¶
func (m *YouTubeTalentMutation) 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 (*YouTubeTalentMutation) AddGuildIDs ¶
func (m *YouTubeTalentMutation) AddGuildIDs(ids ...uint64)
AddGuildIDs adds the "guilds" edge to the Guild entity by ids.
func (*YouTubeTalentMutation) AddMembershipIDs ¶
func (m *YouTubeTalentMutation) AddMembershipIDs(ids ...int)
AddMembershipIDs adds the "memberships" edge to the UserMembership entity by ids.
func (*YouTubeTalentMutation) AddRoleIDs ¶
func (m *YouTubeTalentMutation) AddRoleIDs(ids ...uint64)
AddRoleIDs adds the "roles" edge to the GuildRole entity by ids.
func (*YouTubeTalentMutation) AddedEdges ¶
func (m *YouTubeTalentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*YouTubeTalentMutation) AddedField ¶
func (m *YouTubeTalentMutation) 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 (*YouTubeTalentMutation) AddedFields ¶
func (m *YouTubeTalentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*YouTubeTalentMutation) AddedIDs ¶
func (m *YouTubeTalentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*YouTubeTalentMutation) ChannelName ¶
func (m *YouTubeTalentMutation) ChannelName() (r string, exists bool)
ChannelName returns the value of the "channel_name" field in the mutation.
func (*YouTubeTalentMutation) ClearDisabled ¶
func (m *YouTubeTalentMutation) ClearDisabled()
ClearDisabled clears the value of the "disabled" field.
func (*YouTubeTalentMutation) ClearEdge ¶
func (m *YouTubeTalentMutation) 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 (*YouTubeTalentMutation) ClearField ¶
func (m *YouTubeTalentMutation) 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 (*YouTubeTalentMutation) ClearGuilds ¶
func (m *YouTubeTalentMutation) ClearGuilds()
ClearGuilds clears the "guilds" edge to the Guild entity.
func (*YouTubeTalentMutation) ClearLastMembershipVideoIDMiss ¶
func (m *YouTubeTalentMutation) ClearLastMembershipVideoIDMiss()
ClearLastMembershipVideoIDMiss clears the value of the "last_membership_video_id_miss" field.
func (*YouTubeTalentMutation) ClearMembershipVideoID ¶
func (m *YouTubeTalentMutation) ClearMembershipVideoID()
ClearMembershipVideoID clears the value of the "membership_video_id" field.
func (*YouTubeTalentMutation) ClearMemberships ¶
func (m *YouTubeTalentMutation) ClearMemberships()
ClearMemberships clears the "memberships" edge to the UserMembership entity.
func (*YouTubeTalentMutation) ClearRoles ¶
func (m *YouTubeTalentMutation) ClearRoles()
ClearRoles clears the "roles" edge to the GuildRole entity.
func (*YouTubeTalentMutation) ClearedEdges ¶
func (m *YouTubeTalentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*YouTubeTalentMutation) ClearedFields ¶
func (m *YouTubeTalentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (YouTubeTalentMutation) Client ¶
func (m YouTubeTalentMutation) 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 (*YouTubeTalentMutation) Disabled ¶
func (m *YouTubeTalentMutation) Disabled() (r time.Time, exists bool)
Disabled returns the value of the "disabled" field in the mutation.
func (*YouTubeTalentMutation) DisabledCleared ¶
func (m *YouTubeTalentMutation) DisabledCleared() bool
DisabledCleared returns if the "disabled" field was cleared in this mutation.
func (*YouTubeTalentMutation) DisabledPermanently ¶
func (m *YouTubeTalentMutation) DisabledPermanently() (r bool, exists bool)
DisabledPermanently returns the value of the "disabled_permanently" field in the mutation.
func (*YouTubeTalentMutation) EdgeCleared ¶
func (m *YouTubeTalentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*YouTubeTalentMutation) Field ¶
func (m *YouTubeTalentMutation) 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 (*YouTubeTalentMutation) FieldCleared ¶
func (m *YouTubeTalentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*YouTubeTalentMutation) Fields ¶
func (m *YouTubeTalentMutation) 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 (*YouTubeTalentMutation) GuildsCleared ¶
func (m *YouTubeTalentMutation) GuildsCleared() bool
GuildsCleared reports if the "guilds" edge to the Guild entity was cleared.
func (*YouTubeTalentMutation) GuildsIDs ¶
func (m *YouTubeTalentMutation) GuildsIDs() (ids []uint64)
GuildsIDs returns the "guilds" edge IDs in the mutation.
func (*YouTubeTalentMutation) ID ¶
func (m *YouTubeTalentMutation) ID() (id string, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*YouTubeTalentMutation) IDs ¶
func (m *YouTubeTalentMutation) IDs(ctx context.Context) ([]string, 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 (*YouTubeTalentMutation) LastMembershipVideoIDMiss ¶
func (m *YouTubeTalentMutation) LastMembershipVideoIDMiss() (r time.Time, exists bool)
LastMembershipVideoIDMiss returns the value of the "last_membership_video_id_miss" field in the mutation.
func (*YouTubeTalentMutation) LastMembershipVideoIDMissCleared ¶
func (m *YouTubeTalentMutation) LastMembershipVideoIDMissCleared() bool
LastMembershipVideoIDMissCleared returns if the "last_membership_video_id_miss" field was cleared in this mutation.
func (*YouTubeTalentMutation) LastUpdated ¶
func (m *YouTubeTalentMutation) LastUpdated() (r time.Time, exists bool)
LastUpdated returns the value of the "last_updated" field in the mutation.
func (*YouTubeTalentMutation) MembershipVideoID ¶
func (m *YouTubeTalentMutation) MembershipVideoID() (r string, exists bool)
MembershipVideoID returns the value of the "membership_video_id" field in the mutation.
func (*YouTubeTalentMutation) MembershipVideoIDCleared ¶
func (m *YouTubeTalentMutation) MembershipVideoIDCleared() bool
MembershipVideoIDCleared returns if the "membership_video_id" field was cleared in this mutation.
func (*YouTubeTalentMutation) MembershipsCleared ¶
func (m *YouTubeTalentMutation) MembershipsCleared() bool
MembershipsCleared reports if the "memberships" edge to the UserMembership entity was cleared.
func (*YouTubeTalentMutation) MembershipsIDs ¶
func (m *YouTubeTalentMutation) MembershipsIDs() (ids []int)
MembershipsIDs returns the "memberships" edge IDs in the mutation.
func (*YouTubeTalentMutation) OldChannelName ¶
func (m *YouTubeTalentMutation) OldChannelName(ctx context.Context) (v string, err error)
OldChannelName returns the old "channel_name" field's value of the YouTubeTalent entity. If the YouTubeTalent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*YouTubeTalentMutation) OldDisabled ¶
OldDisabled returns the old "disabled" field's value of the YouTubeTalent entity. If the YouTubeTalent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*YouTubeTalentMutation) OldDisabledPermanently ¶
func (m *YouTubeTalentMutation) OldDisabledPermanently(ctx context.Context) (v bool, err error)
OldDisabledPermanently returns the old "disabled_permanently" field's value of the YouTubeTalent entity. If the YouTubeTalent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*YouTubeTalentMutation) 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 (*YouTubeTalentMutation) OldLastMembershipVideoIDMiss ¶
func (m *YouTubeTalentMutation) OldLastMembershipVideoIDMiss(ctx context.Context) (v time.Time, err error)
OldLastMembershipVideoIDMiss returns the old "last_membership_video_id_miss" field's value of the YouTubeTalent entity. If the YouTubeTalent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*YouTubeTalentMutation) OldLastUpdated ¶
OldLastUpdated returns the old "last_updated" field's value of the YouTubeTalent entity. If the YouTubeTalent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*YouTubeTalentMutation) OldMembershipVideoID ¶
func (m *YouTubeTalentMutation) OldMembershipVideoID(ctx context.Context) (v string, err error)
OldMembershipVideoID returns the old "membership_video_id" field's value of the YouTubeTalent entity. If the YouTubeTalent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*YouTubeTalentMutation) OldThumbnailURL ¶
func (m *YouTubeTalentMutation) OldThumbnailURL(ctx context.Context) (v string, err error)
OldThumbnailURL returns the old "thumbnail_url" field's value of the YouTubeTalent entity. If the YouTubeTalent object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*YouTubeTalentMutation) Op ¶
func (m *YouTubeTalentMutation) Op() Op
Op returns the operation name.
func (*YouTubeTalentMutation) RemoveGuildIDs ¶
func (m *YouTubeTalentMutation) RemoveGuildIDs(ids ...uint64)
RemoveGuildIDs removes the "guilds" edge to the Guild entity by IDs.
func (*YouTubeTalentMutation) RemoveMembershipIDs ¶
func (m *YouTubeTalentMutation) RemoveMembershipIDs(ids ...int)
RemoveMembershipIDs removes the "memberships" edge to the UserMembership entity by IDs.
func (*YouTubeTalentMutation) RemoveRoleIDs ¶
func (m *YouTubeTalentMutation) RemoveRoleIDs(ids ...uint64)
RemoveRoleIDs removes the "roles" edge to the GuildRole entity by IDs.
func (*YouTubeTalentMutation) RemovedEdges ¶
func (m *YouTubeTalentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*YouTubeTalentMutation) RemovedGuildsIDs ¶
func (m *YouTubeTalentMutation) RemovedGuildsIDs() (ids []uint64)
RemovedGuilds returns the removed IDs of the "guilds" edge to the Guild entity.
func (*YouTubeTalentMutation) RemovedIDs ¶
func (m *YouTubeTalentMutation) 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 (*YouTubeTalentMutation) RemovedMembershipsIDs ¶
func (m *YouTubeTalentMutation) RemovedMembershipsIDs() (ids []int)
RemovedMemberships returns the removed IDs of the "memberships" edge to the UserMembership entity.
func (*YouTubeTalentMutation) RemovedRolesIDs ¶
func (m *YouTubeTalentMutation) RemovedRolesIDs() (ids []uint64)
RemovedRoles returns the removed IDs of the "roles" edge to the GuildRole entity.
func (*YouTubeTalentMutation) ResetChannelName ¶
func (m *YouTubeTalentMutation) ResetChannelName()
ResetChannelName resets all changes to the "channel_name" field.
func (*YouTubeTalentMutation) ResetDisabled ¶
func (m *YouTubeTalentMutation) ResetDisabled()
ResetDisabled resets all changes to the "disabled" field.
func (*YouTubeTalentMutation) ResetDisabledPermanently ¶
func (m *YouTubeTalentMutation) ResetDisabledPermanently()
ResetDisabledPermanently resets all changes to the "disabled_permanently" field.
func (*YouTubeTalentMutation) ResetEdge ¶
func (m *YouTubeTalentMutation) 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 (*YouTubeTalentMutation) ResetField ¶
func (m *YouTubeTalentMutation) 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 (*YouTubeTalentMutation) ResetGuilds ¶
func (m *YouTubeTalentMutation) ResetGuilds()
ResetGuilds resets all changes to the "guilds" edge.
func (*YouTubeTalentMutation) ResetLastMembershipVideoIDMiss ¶
func (m *YouTubeTalentMutation) ResetLastMembershipVideoIDMiss()
ResetLastMembershipVideoIDMiss resets all changes to the "last_membership_video_id_miss" field.
func (*YouTubeTalentMutation) ResetLastUpdated ¶
func (m *YouTubeTalentMutation) ResetLastUpdated()
ResetLastUpdated resets all changes to the "last_updated" field.
func (*YouTubeTalentMutation) ResetMembershipVideoID ¶
func (m *YouTubeTalentMutation) ResetMembershipVideoID()
ResetMembershipVideoID resets all changes to the "membership_video_id" field.
func (*YouTubeTalentMutation) ResetMemberships ¶
func (m *YouTubeTalentMutation) ResetMemberships()
ResetMemberships resets all changes to the "memberships" edge.
func (*YouTubeTalentMutation) ResetRoles ¶
func (m *YouTubeTalentMutation) ResetRoles()
ResetRoles resets all changes to the "roles" edge.
func (*YouTubeTalentMutation) ResetThumbnailURL ¶
func (m *YouTubeTalentMutation) ResetThumbnailURL()
ResetThumbnailURL resets all changes to the "thumbnail_url" field.
func (*YouTubeTalentMutation) RolesCleared ¶
func (m *YouTubeTalentMutation) RolesCleared() bool
RolesCleared reports if the "roles" edge to the GuildRole entity was cleared.
func (*YouTubeTalentMutation) RolesIDs ¶
func (m *YouTubeTalentMutation) RolesIDs() (ids []uint64)
RolesIDs returns the "roles" edge IDs in the mutation.
func (*YouTubeTalentMutation) SetChannelName ¶
func (m *YouTubeTalentMutation) SetChannelName(s string)
SetChannelName sets the "channel_name" field.
func (*YouTubeTalentMutation) SetDisabled ¶
func (m *YouTubeTalentMutation) SetDisabled(t time.Time)
SetDisabled sets the "disabled" field.
func (*YouTubeTalentMutation) SetDisabledPermanently ¶
func (m *YouTubeTalentMutation) SetDisabledPermanently(b bool)
SetDisabledPermanently sets the "disabled_permanently" field.
func (*YouTubeTalentMutation) SetField ¶
func (m *YouTubeTalentMutation) 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 (*YouTubeTalentMutation) SetID ¶
func (m *YouTubeTalentMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of YouTubeTalent entities.
func (*YouTubeTalentMutation) SetLastMembershipVideoIDMiss ¶
func (m *YouTubeTalentMutation) SetLastMembershipVideoIDMiss(t time.Time)
SetLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field.
func (*YouTubeTalentMutation) SetLastUpdated ¶
func (m *YouTubeTalentMutation) SetLastUpdated(t time.Time)
SetLastUpdated sets the "last_updated" field.
func (*YouTubeTalentMutation) SetMembershipVideoID ¶
func (m *YouTubeTalentMutation) SetMembershipVideoID(s string)
SetMembershipVideoID sets the "membership_video_id" field.
func (*YouTubeTalentMutation) SetOp ¶
func (m *YouTubeTalentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*YouTubeTalentMutation) SetThumbnailURL ¶
func (m *YouTubeTalentMutation) SetThumbnailURL(s string)
SetThumbnailURL sets the "thumbnail_url" field.
func (*YouTubeTalentMutation) ThumbnailURL ¶
func (m *YouTubeTalentMutation) ThumbnailURL() (r string, exists bool)
ThumbnailURL returns the value of the "thumbnail_url" field in the mutation.
func (YouTubeTalentMutation) Tx ¶
func (m YouTubeTalentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*YouTubeTalentMutation) Type ¶
func (m *YouTubeTalentMutation) Type() string
Type returns the node type of this mutation (YouTubeTalent).
func (*YouTubeTalentMutation) Where ¶
func (m *YouTubeTalentMutation) Where(ps ...predicate.YouTubeTalent)
Where appends a list predicates to the YouTubeTalentMutation builder.
func (*YouTubeTalentMutation) WhereP ¶
func (m *YouTubeTalentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the YouTubeTalentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type YouTubeTalentQuery ¶
type YouTubeTalentQuery struct {
// contains filtered or unexported fields
}
YouTubeTalentQuery is the builder for querying YouTubeTalent entities.
func (*YouTubeTalentQuery) Aggregate ¶
func (yttq *YouTubeTalentQuery) Aggregate(fns ...AggregateFunc) *YouTubeTalentSelect
Aggregate returns a YouTubeTalentSelect configured with the given aggregations.
func (*YouTubeTalentQuery) All ¶
func (yttq *YouTubeTalentQuery) All(ctx context.Context) ([]*YouTubeTalent, error)
All executes the query and returns a list of YouTubeTalents.
func (*YouTubeTalentQuery) AllX ¶
func (yttq *YouTubeTalentQuery) AllX(ctx context.Context) []*YouTubeTalent
AllX is like All, but panics if an error occurs.
func (*YouTubeTalentQuery) Clone ¶
func (yttq *YouTubeTalentQuery) Clone() *YouTubeTalentQuery
Clone returns a duplicate of the YouTubeTalentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*YouTubeTalentQuery) Count ¶
func (yttq *YouTubeTalentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*YouTubeTalentQuery) CountX ¶
func (yttq *YouTubeTalentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*YouTubeTalentQuery) Exist ¶
func (yttq *YouTubeTalentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*YouTubeTalentQuery) ExistX ¶
func (yttq *YouTubeTalentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*YouTubeTalentQuery) First ¶
func (yttq *YouTubeTalentQuery) First(ctx context.Context) (*YouTubeTalent, error)
First returns the first YouTubeTalent entity from the query. Returns a *NotFoundError when no YouTubeTalent was found.
func (*YouTubeTalentQuery) FirstID ¶
func (yttq *YouTubeTalentQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first YouTubeTalent ID from the query. Returns a *NotFoundError when no YouTubeTalent ID was found.
func (*YouTubeTalentQuery) FirstIDX ¶
func (yttq *YouTubeTalentQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*YouTubeTalentQuery) FirstX ¶
func (yttq *YouTubeTalentQuery) FirstX(ctx context.Context) *YouTubeTalent
FirstX is like First, but panics if an error occurs.
func (*YouTubeTalentQuery) ForShare ¶
func (yttq *YouTubeTalentQuery) ForShare(opts ...sql.LockOption) *YouTubeTalentQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*YouTubeTalentQuery) ForUpdate ¶
func (yttq *YouTubeTalentQuery) ForUpdate(opts ...sql.LockOption) *YouTubeTalentQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*YouTubeTalentQuery) GroupBy ¶
func (yttq *YouTubeTalentQuery) GroupBy(field string, fields ...string) *YouTubeTalentGroupBy
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 { ChannelName string `json:"channel_name,omitempty"` Count int `json:"count,omitempty"` } client.YouTubeTalent.Query(). GroupBy(youtubetalent.FieldChannelName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*YouTubeTalentQuery) IDs ¶
func (yttq *YouTubeTalentQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of YouTubeTalent IDs.
func (*YouTubeTalentQuery) IDsX ¶
func (yttq *YouTubeTalentQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*YouTubeTalentQuery) Limit ¶
func (yttq *YouTubeTalentQuery) Limit(limit int) *YouTubeTalentQuery
Limit the number of records to be returned by this query.
func (*YouTubeTalentQuery) Offset ¶
func (yttq *YouTubeTalentQuery) Offset(offset int) *YouTubeTalentQuery
Offset to start from.
func (*YouTubeTalentQuery) Only ¶
func (yttq *YouTubeTalentQuery) Only(ctx context.Context) (*YouTubeTalent, error)
Only returns a single YouTubeTalent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one YouTubeTalent entity is found. Returns a *NotFoundError when no YouTubeTalent entities are found.
func (*YouTubeTalentQuery) OnlyID ¶
func (yttq *YouTubeTalentQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only YouTubeTalent ID in the query. Returns a *NotSingularError when more than one YouTubeTalent ID is found. Returns a *NotFoundError when no entities are found.
func (*YouTubeTalentQuery) OnlyIDX ¶
func (yttq *YouTubeTalentQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*YouTubeTalentQuery) OnlyX ¶
func (yttq *YouTubeTalentQuery) OnlyX(ctx context.Context) *YouTubeTalent
OnlyX is like Only, but panics if an error occurs.
func (*YouTubeTalentQuery) Order ¶
func (yttq *YouTubeTalentQuery) Order(o ...youtubetalent.OrderOption) *YouTubeTalentQuery
Order specifies how the records should be ordered.
func (*YouTubeTalentQuery) QueryGuilds ¶
func (yttq *YouTubeTalentQuery) QueryGuilds() *GuildQuery
QueryGuilds chains the current query on the "guilds" edge.
func (*YouTubeTalentQuery) QueryMemberships ¶
func (yttq *YouTubeTalentQuery) QueryMemberships() *UserMembershipQuery
QueryMemberships chains the current query on the "memberships" edge.
func (*YouTubeTalentQuery) QueryRoles ¶
func (yttq *YouTubeTalentQuery) QueryRoles() *GuildRoleQuery
QueryRoles chains the current query on the "roles" edge.
func (*YouTubeTalentQuery) Select ¶
func (yttq *YouTubeTalentQuery) Select(fields ...string) *YouTubeTalentSelect
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 { ChannelName string `json:"channel_name,omitempty"` } client.YouTubeTalent.Query(). Select(youtubetalent.FieldChannelName). Scan(ctx, &v)
func (*YouTubeTalentQuery) Unique ¶
func (yttq *YouTubeTalentQuery) Unique(unique bool) *YouTubeTalentQuery
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 (*YouTubeTalentQuery) Where ¶
func (yttq *YouTubeTalentQuery) Where(ps ...predicate.YouTubeTalent) *YouTubeTalentQuery
Where adds a new predicate for the YouTubeTalentQuery builder.
func (*YouTubeTalentQuery) WithGuilds ¶
func (yttq *YouTubeTalentQuery) WithGuilds(opts ...func(*GuildQuery)) *YouTubeTalentQuery
WithGuilds tells the query-builder to eager-load the nodes that are connected to the "guilds" edge. The optional arguments are used to configure the query builder of the edge.
func (*YouTubeTalentQuery) WithMemberships ¶
func (yttq *YouTubeTalentQuery) WithMemberships(opts ...func(*UserMembershipQuery)) *YouTubeTalentQuery
WithMemberships tells the query-builder to eager-load the nodes that are connected to the "memberships" edge. The optional arguments are used to configure the query builder of the edge.
func (*YouTubeTalentQuery) WithRoles ¶
func (yttq *YouTubeTalentQuery) WithRoles(opts ...func(*GuildRoleQuery)) *YouTubeTalentQuery
WithRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge. The optional arguments are used to configure the query builder of the edge.
type YouTubeTalentSelect ¶
type YouTubeTalentSelect struct { *YouTubeTalentQuery // contains filtered or unexported fields }
YouTubeTalentSelect is the builder for selecting fields of YouTubeTalent entities.
func (*YouTubeTalentSelect) Aggregate ¶
func (ytts *YouTubeTalentSelect) Aggregate(fns ...AggregateFunc) *YouTubeTalentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*YouTubeTalentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*YouTubeTalentSelect) Scan ¶
func (ytts *YouTubeTalentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*YouTubeTalentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type YouTubeTalentUpdate ¶
type YouTubeTalentUpdate struct {
// contains filtered or unexported fields
}
YouTubeTalentUpdate is the builder for updating YouTubeTalent entities.
func (*YouTubeTalentUpdate) AddGuildIDs ¶
func (yttu *YouTubeTalentUpdate) AddGuildIDs(ids ...uint64) *YouTubeTalentUpdate
AddGuildIDs adds the "guilds" edge to the Guild entity by IDs.
func (*YouTubeTalentUpdate) AddGuilds ¶
func (yttu *YouTubeTalentUpdate) AddGuilds(g ...*Guild) *YouTubeTalentUpdate
AddGuilds adds the "guilds" edges to the Guild entity.
func (*YouTubeTalentUpdate) AddMembershipIDs ¶
func (yttu *YouTubeTalentUpdate) AddMembershipIDs(ids ...int) *YouTubeTalentUpdate
AddMembershipIDs adds the "memberships" edge to the UserMembership entity by IDs.
func (*YouTubeTalentUpdate) AddMemberships ¶
func (yttu *YouTubeTalentUpdate) AddMemberships(u ...*UserMembership) *YouTubeTalentUpdate
AddMemberships adds the "memberships" edges to the UserMembership entity.
func (*YouTubeTalentUpdate) AddRoleIDs ¶
func (yttu *YouTubeTalentUpdate) AddRoleIDs(ids ...uint64) *YouTubeTalentUpdate
AddRoleIDs adds the "roles" edge to the GuildRole entity by IDs.
func (*YouTubeTalentUpdate) AddRoles ¶
func (yttu *YouTubeTalentUpdate) AddRoles(g ...*GuildRole) *YouTubeTalentUpdate
AddRoles adds the "roles" edges to the GuildRole entity.
func (*YouTubeTalentUpdate) ClearDisabled ¶
func (yttu *YouTubeTalentUpdate) ClearDisabled() *YouTubeTalentUpdate
ClearDisabled clears the value of the "disabled" field.
func (*YouTubeTalentUpdate) ClearGuilds ¶
func (yttu *YouTubeTalentUpdate) ClearGuilds() *YouTubeTalentUpdate
ClearGuilds clears all "guilds" edges to the Guild entity.
func (*YouTubeTalentUpdate) ClearLastMembershipVideoIDMiss ¶
func (yttu *YouTubeTalentUpdate) ClearLastMembershipVideoIDMiss() *YouTubeTalentUpdate
ClearLastMembershipVideoIDMiss clears the value of the "last_membership_video_id_miss" field.
func (*YouTubeTalentUpdate) ClearMembershipVideoID ¶
func (yttu *YouTubeTalentUpdate) ClearMembershipVideoID() *YouTubeTalentUpdate
ClearMembershipVideoID clears the value of the "membership_video_id" field.
func (*YouTubeTalentUpdate) ClearMemberships ¶
func (yttu *YouTubeTalentUpdate) ClearMemberships() *YouTubeTalentUpdate
ClearMemberships clears all "memberships" edges to the UserMembership entity.
func (*YouTubeTalentUpdate) ClearRoles ¶
func (yttu *YouTubeTalentUpdate) ClearRoles() *YouTubeTalentUpdate
ClearRoles clears all "roles" edges to the GuildRole entity.
func (*YouTubeTalentUpdate) Exec ¶
func (yttu *YouTubeTalentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*YouTubeTalentUpdate) ExecX ¶
func (yttu *YouTubeTalentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*YouTubeTalentUpdate) Mutation ¶
func (yttu *YouTubeTalentUpdate) Mutation() *YouTubeTalentMutation
Mutation returns the YouTubeTalentMutation object of the builder.
func (*YouTubeTalentUpdate) RemoveGuildIDs ¶
func (yttu *YouTubeTalentUpdate) RemoveGuildIDs(ids ...uint64) *YouTubeTalentUpdate
RemoveGuildIDs removes the "guilds" edge to Guild entities by IDs.
func (*YouTubeTalentUpdate) RemoveGuilds ¶
func (yttu *YouTubeTalentUpdate) RemoveGuilds(g ...*Guild) *YouTubeTalentUpdate
RemoveGuilds removes "guilds" edges to Guild entities.
func (*YouTubeTalentUpdate) RemoveMembershipIDs ¶
func (yttu *YouTubeTalentUpdate) RemoveMembershipIDs(ids ...int) *YouTubeTalentUpdate
RemoveMembershipIDs removes the "memberships" edge to UserMembership entities by IDs.
func (*YouTubeTalentUpdate) RemoveMemberships ¶
func (yttu *YouTubeTalentUpdate) RemoveMemberships(u ...*UserMembership) *YouTubeTalentUpdate
RemoveMemberships removes "memberships" edges to UserMembership entities.
func (*YouTubeTalentUpdate) RemoveRoleIDs ¶
func (yttu *YouTubeTalentUpdate) RemoveRoleIDs(ids ...uint64) *YouTubeTalentUpdate
RemoveRoleIDs removes the "roles" edge to GuildRole entities by IDs.
func (*YouTubeTalentUpdate) RemoveRoles ¶
func (yttu *YouTubeTalentUpdate) RemoveRoles(g ...*GuildRole) *YouTubeTalentUpdate
RemoveRoles removes "roles" edges to GuildRole entities.
func (*YouTubeTalentUpdate) Save ¶
func (yttu *YouTubeTalentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*YouTubeTalentUpdate) SaveX ¶
func (yttu *YouTubeTalentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*YouTubeTalentUpdate) SetChannelName ¶
func (yttu *YouTubeTalentUpdate) SetChannelName(s string) *YouTubeTalentUpdate
SetChannelName sets the "channel_name" field.
func (*YouTubeTalentUpdate) SetDisabled ¶
func (yttu *YouTubeTalentUpdate) SetDisabled(t time.Time) *YouTubeTalentUpdate
SetDisabled sets the "disabled" field.
func (*YouTubeTalentUpdate) SetDisabledPermanently ¶
func (yttu *YouTubeTalentUpdate) SetDisabledPermanently(b bool) *YouTubeTalentUpdate
SetDisabledPermanently sets the "disabled_permanently" field.
func (*YouTubeTalentUpdate) SetLastMembershipVideoIDMiss ¶
func (yttu *YouTubeTalentUpdate) SetLastMembershipVideoIDMiss(t time.Time) *YouTubeTalentUpdate
SetLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field.
func (*YouTubeTalentUpdate) SetLastUpdated ¶
func (yttu *YouTubeTalentUpdate) SetLastUpdated(t time.Time) *YouTubeTalentUpdate
SetLastUpdated sets the "last_updated" field.
func (*YouTubeTalentUpdate) SetMembershipVideoID ¶
func (yttu *YouTubeTalentUpdate) SetMembershipVideoID(s string) *YouTubeTalentUpdate
SetMembershipVideoID sets the "membership_video_id" field.
func (*YouTubeTalentUpdate) SetNillableDisabled ¶
func (yttu *YouTubeTalentUpdate) SetNillableDisabled(t *time.Time) *YouTubeTalentUpdate
SetNillableDisabled sets the "disabled" field if the given value is not nil.
func (*YouTubeTalentUpdate) SetNillableDisabledPermanently ¶
func (yttu *YouTubeTalentUpdate) SetNillableDisabledPermanently(b *bool) *YouTubeTalentUpdate
SetNillableDisabledPermanently sets the "disabled_permanently" field if the given value is not nil.
func (*YouTubeTalentUpdate) SetNillableLastMembershipVideoIDMiss ¶
func (yttu *YouTubeTalentUpdate) SetNillableLastMembershipVideoIDMiss(t *time.Time) *YouTubeTalentUpdate
SetNillableLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field if the given value is not nil.
func (*YouTubeTalentUpdate) SetNillableLastUpdated ¶
func (yttu *YouTubeTalentUpdate) SetNillableLastUpdated(t *time.Time) *YouTubeTalentUpdate
SetNillableLastUpdated sets the "last_updated" field if the given value is not nil.
func (*YouTubeTalentUpdate) SetNillableMembershipVideoID ¶
func (yttu *YouTubeTalentUpdate) SetNillableMembershipVideoID(s *string) *YouTubeTalentUpdate
SetNillableMembershipVideoID sets the "membership_video_id" field if the given value is not nil.
func (*YouTubeTalentUpdate) SetThumbnailURL ¶
func (yttu *YouTubeTalentUpdate) SetThumbnailURL(s string) *YouTubeTalentUpdate
SetThumbnailURL sets the "thumbnail_url" field.
func (*YouTubeTalentUpdate) Where ¶
func (yttu *YouTubeTalentUpdate) Where(ps ...predicate.YouTubeTalent) *YouTubeTalentUpdate
Where appends a list predicates to the YouTubeTalentUpdate builder.
type YouTubeTalentUpdateOne ¶
type YouTubeTalentUpdateOne struct {
// contains filtered or unexported fields
}
YouTubeTalentUpdateOne is the builder for updating a single YouTubeTalent entity.
func (*YouTubeTalentUpdateOne) AddGuildIDs ¶
func (yttuo *YouTubeTalentUpdateOne) AddGuildIDs(ids ...uint64) *YouTubeTalentUpdateOne
AddGuildIDs adds the "guilds" edge to the Guild entity by IDs.
func (*YouTubeTalentUpdateOne) AddGuilds ¶
func (yttuo *YouTubeTalentUpdateOne) AddGuilds(g ...*Guild) *YouTubeTalentUpdateOne
AddGuilds adds the "guilds" edges to the Guild entity.
func (*YouTubeTalentUpdateOne) AddMembershipIDs ¶
func (yttuo *YouTubeTalentUpdateOne) AddMembershipIDs(ids ...int) *YouTubeTalentUpdateOne
AddMembershipIDs adds the "memberships" edge to the UserMembership entity by IDs.
func (*YouTubeTalentUpdateOne) AddMemberships ¶
func (yttuo *YouTubeTalentUpdateOne) AddMemberships(u ...*UserMembership) *YouTubeTalentUpdateOne
AddMemberships adds the "memberships" edges to the UserMembership entity.
func (*YouTubeTalentUpdateOne) AddRoleIDs ¶
func (yttuo *YouTubeTalentUpdateOne) AddRoleIDs(ids ...uint64) *YouTubeTalentUpdateOne
AddRoleIDs adds the "roles" edge to the GuildRole entity by IDs.
func (*YouTubeTalentUpdateOne) AddRoles ¶
func (yttuo *YouTubeTalentUpdateOne) AddRoles(g ...*GuildRole) *YouTubeTalentUpdateOne
AddRoles adds the "roles" edges to the GuildRole entity.
func (*YouTubeTalentUpdateOne) ClearDisabled ¶
func (yttuo *YouTubeTalentUpdateOne) ClearDisabled() *YouTubeTalentUpdateOne
ClearDisabled clears the value of the "disabled" field.
func (*YouTubeTalentUpdateOne) ClearGuilds ¶
func (yttuo *YouTubeTalentUpdateOne) ClearGuilds() *YouTubeTalentUpdateOne
ClearGuilds clears all "guilds" edges to the Guild entity.
func (*YouTubeTalentUpdateOne) ClearLastMembershipVideoIDMiss ¶
func (yttuo *YouTubeTalentUpdateOne) ClearLastMembershipVideoIDMiss() *YouTubeTalentUpdateOne
ClearLastMembershipVideoIDMiss clears the value of the "last_membership_video_id_miss" field.
func (*YouTubeTalentUpdateOne) ClearMembershipVideoID ¶
func (yttuo *YouTubeTalentUpdateOne) ClearMembershipVideoID() *YouTubeTalentUpdateOne
ClearMembershipVideoID clears the value of the "membership_video_id" field.
func (*YouTubeTalentUpdateOne) ClearMemberships ¶
func (yttuo *YouTubeTalentUpdateOne) ClearMemberships() *YouTubeTalentUpdateOne
ClearMemberships clears all "memberships" edges to the UserMembership entity.
func (*YouTubeTalentUpdateOne) ClearRoles ¶
func (yttuo *YouTubeTalentUpdateOne) ClearRoles() *YouTubeTalentUpdateOne
ClearRoles clears all "roles" edges to the GuildRole entity.
func (*YouTubeTalentUpdateOne) Exec ¶
func (yttuo *YouTubeTalentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*YouTubeTalentUpdateOne) ExecX ¶
func (yttuo *YouTubeTalentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*YouTubeTalentUpdateOne) Mutation ¶
func (yttuo *YouTubeTalentUpdateOne) Mutation() *YouTubeTalentMutation
Mutation returns the YouTubeTalentMutation object of the builder.
func (*YouTubeTalentUpdateOne) RemoveGuildIDs ¶
func (yttuo *YouTubeTalentUpdateOne) RemoveGuildIDs(ids ...uint64) *YouTubeTalentUpdateOne
RemoveGuildIDs removes the "guilds" edge to Guild entities by IDs.
func (*YouTubeTalentUpdateOne) RemoveGuilds ¶
func (yttuo *YouTubeTalentUpdateOne) RemoveGuilds(g ...*Guild) *YouTubeTalentUpdateOne
RemoveGuilds removes "guilds" edges to Guild entities.
func (*YouTubeTalentUpdateOne) RemoveMembershipIDs ¶
func (yttuo *YouTubeTalentUpdateOne) RemoveMembershipIDs(ids ...int) *YouTubeTalentUpdateOne
RemoveMembershipIDs removes the "memberships" edge to UserMembership entities by IDs.
func (*YouTubeTalentUpdateOne) RemoveMemberships ¶
func (yttuo *YouTubeTalentUpdateOne) RemoveMemberships(u ...*UserMembership) *YouTubeTalentUpdateOne
RemoveMemberships removes "memberships" edges to UserMembership entities.
func (*YouTubeTalentUpdateOne) RemoveRoleIDs ¶
func (yttuo *YouTubeTalentUpdateOne) RemoveRoleIDs(ids ...uint64) *YouTubeTalentUpdateOne
RemoveRoleIDs removes the "roles" edge to GuildRole entities by IDs.
func (*YouTubeTalentUpdateOne) RemoveRoles ¶
func (yttuo *YouTubeTalentUpdateOne) RemoveRoles(g ...*GuildRole) *YouTubeTalentUpdateOne
RemoveRoles removes "roles" edges to GuildRole entities.
func (*YouTubeTalentUpdateOne) Save ¶
func (yttuo *YouTubeTalentUpdateOne) Save(ctx context.Context) (*YouTubeTalent, error)
Save executes the query and returns the updated YouTubeTalent entity.
func (*YouTubeTalentUpdateOne) SaveX ¶
func (yttuo *YouTubeTalentUpdateOne) SaveX(ctx context.Context) *YouTubeTalent
SaveX is like Save, but panics if an error occurs.
func (*YouTubeTalentUpdateOne) Select ¶
func (yttuo *YouTubeTalentUpdateOne) Select(field string, fields ...string) *YouTubeTalentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*YouTubeTalentUpdateOne) SetChannelName ¶
func (yttuo *YouTubeTalentUpdateOne) SetChannelName(s string) *YouTubeTalentUpdateOne
SetChannelName sets the "channel_name" field.
func (*YouTubeTalentUpdateOne) SetDisabled ¶
func (yttuo *YouTubeTalentUpdateOne) SetDisabled(t time.Time) *YouTubeTalentUpdateOne
SetDisabled sets the "disabled" field.
func (*YouTubeTalentUpdateOne) SetDisabledPermanently ¶
func (yttuo *YouTubeTalentUpdateOne) SetDisabledPermanently(b bool) *YouTubeTalentUpdateOne
SetDisabledPermanently sets the "disabled_permanently" field.
func (*YouTubeTalentUpdateOne) SetLastMembershipVideoIDMiss ¶
func (yttuo *YouTubeTalentUpdateOne) SetLastMembershipVideoIDMiss(t time.Time) *YouTubeTalentUpdateOne
SetLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field.
func (*YouTubeTalentUpdateOne) SetLastUpdated ¶
func (yttuo *YouTubeTalentUpdateOne) SetLastUpdated(t time.Time) *YouTubeTalentUpdateOne
SetLastUpdated sets the "last_updated" field.
func (*YouTubeTalentUpdateOne) SetMembershipVideoID ¶
func (yttuo *YouTubeTalentUpdateOne) SetMembershipVideoID(s string) *YouTubeTalentUpdateOne
SetMembershipVideoID sets the "membership_video_id" field.
func (*YouTubeTalentUpdateOne) SetNillableDisabled ¶
func (yttuo *YouTubeTalentUpdateOne) SetNillableDisabled(t *time.Time) *YouTubeTalentUpdateOne
SetNillableDisabled sets the "disabled" field if the given value is not nil.
func (*YouTubeTalentUpdateOne) SetNillableDisabledPermanently ¶
func (yttuo *YouTubeTalentUpdateOne) SetNillableDisabledPermanently(b *bool) *YouTubeTalentUpdateOne
SetNillableDisabledPermanently sets the "disabled_permanently" field if the given value is not nil.
func (*YouTubeTalentUpdateOne) SetNillableLastMembershipVideoIDMiss ¶
func (yttuo *YouTubeTalentUpdateOne) SetNillableLastMembershipVideoIDMiss(t *time.Time) *YouTubeTalentUpdateOne
SetNillableLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field if the given value is not nil.
func (*YouTubeTalentUpdateOne) SetNillableLastUpdated ¶
func (yttuo *YouTubeTalentUpdateOne) SetNillableLastUpdated(t *time.Time) *YouTubeTalentUpdateOne
SetNillableLastUpdated sets the "last_updated" field if the given value is not nil.
func (*YouTubeTalentUpdateOne) SetNillableMembershipVideoID ¶
func (yttuo *YouTubeTalentUpdateOne) SetNillableMembershipVideoID(s *string) *YouTubeTalentUpdateOne
SetNillableMembershipVideoID sets the "membership_video_id" field if the given value is not nil.
func (*YouTubeTalentUpdateOne) SetThumbnailURL ¶
func (yttuo *YouTubeTalentUpdateOne) SetThumbnailURL(s string) *YouTubeTalentUpdateOne
SetThumbnailURL sets the "thumbnail_url" field.
func (*YouTubeTalentUpdateOne) Where ¶
func (yttuo *YouTubeTalentUpdateOne) Where(ps ...predicate.YouTubeTalent) *YouTubeTalentUpdateOne
Where appends a list predicates to the YouTubeTalentUpdate builder.
type YouTubeTalentUpsert ¶
YouTubeTalentUpsert is the "OnConflict" setter.
func (*YouTubeTalentUpsert) ClearDisabled ¶
func (u *YouTubeTalentUpsert) ClearDisabled() *YouTubeTalentUpsert
ClearDisabled clears the value of the "disabled" field.
func (*YouTubeTalentUpsert) ClearLastMembershipVideoIDMiss ¶
func (u *YouTubeTalentUpsert) ClearLastMembershipVideoIDMiss() *YouTubeTalentUpsert
ClearLastMembershipVideoIDMiss clears the value of the "last_membership_video_id_miss" field.
func (*YouTubeTalentUpsert) ClearMembershipVideoID ¶
func (u *YouTubeTalentUpsert) ClearMembershipVideoID() *YouTubeTalentUpsert
ClearMembershipVideoID clears the value of the "membership_video_id" field.
func (*YouTubeTalentUpsert) SetChannelName ¶
func (u *YouTubeTalentUpsert) SetChannelName(v string) *YouTubeTalentUpsert
SetChannelName sets the "channel_name" field.
func (*YouTubeTalentUpsert) SetDisabled ¶
func (u *YouTubeTalentUpsert) SetDisabled(v time.Time) *YouTubeTalentUpsert
SetDisabled sets the "disabled" field.
func (*YouTubeTalentUpsert) SetDisabledPermanently ¶
func (u *YouTubeTalentUpsert) SetDisabledPermanently(v bool) *YouTubeTalentUpsert
SetDisabledPermanently sets the "disabled_permanently" field.
func (*YouTubeTalentUpsert) SetLastMembershipVideoIDMiss ¶
func (u *YouTubeTalentUpsert) SetLastMembershipVideoIDMiss(v time.Time) *YouTubeTalentUpsert
SetLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field.
func (*YouTubeTalentUpsert) SetLastUpdated ¶
func (u *YouTubeTalentUpsert) SetLastUpdated(v time.Time) *YouTubeTalentUpsert
SetLastUpdated sets the "last_updated" field.
func (*YouTubeTalentUpsert) SetMembershipVideoID ¶
func (u *YouTubeTalentUpsert) SetMembershipVideoID(v string) *YouTubeTalentUpsert
SetMembershipVideoID sets the "membership_video_id" field.
func (*YouTubeTalentUpsert) SetThumbnailURL ¶
func (u *YouTubeTalentUpsert) SetThumbnailURL(v string) *YouTubeTalentUpsert
SetThumbnailURL sets the "thumbnail_url" field.
func (*YouTubeTalentUpsert) UpdateChannelName ¶
func (u *YouTubeTalentUpsert) UpdateChannelName() *YouTubeTalentUpsert
UpdateChannelName sets the "channel_name" field to the value that was provided on create.
func (*YouTubeTalentUpsert) UpdateDisabled ¶
func (u *YouTubeTalentUpsert) UpdateDisabled() *YouTubeTalentUpsert
UpdateDisabled sets the "disabled" field to the value that was provided on create.
func (*YouTubeTalentUpsert) UpdateDisabledPermanently ¶
func (u *YouTubeTalentUpsert) UpdateDisabledPermanently() *YouTubeTalentUpsert
UpdateDisabledPermanently sets the "disabled_permanently" field to the value that was provided on create.
func (*YouTubeTalentUpsert) UpdateLastMembershipVideoIDMiss ¶
func (u *YouTubeTalentUpsert) UpdateLastMembershipVideoIDMiss() *YouTubeTalentUpsert
UpdateLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field to the value that was provided on create.
func (*YouTubeTalentUpsert) UpdateLastUpdated ¶
func (u *YouTubeTalentUpsert) UpdateLastUpdated() *YouTubeTalentUpsert
UpdateLastUpdated sets the "last_updated" field to the value that was provided on create.
func (*YouTubeTalentUpsert) UpdateMembershipVideoID ¶
func (u *YouTubeTalentUpsert) UpdateMembershipVideoID() *YouTubeTalentUpsert
UpdateMembershipVideoID sets the "membership_video_id" field to the value that was provided on create.
func (*YouTubeTalentUpsert) UpdateThumbnailURL ¶
func (u *YouTubeTalentUpsert) UpdateThumbnailURL() *YouTubeTalentUpsert
UpdateThumbnailURL sets the "thumbnail_url" field to the value that was provided on create.
type YouTubeTalentUpsertBulk ¶
type YouTubeTalentUpsertBulk struct {
// contains filtered or unexported fields
}
YouTubeTalentUpsertBulk is the builder for "upsert"-ing a bulk of YouTubeTalent nodes.
func (*YouTubeTalentUpsertBulk) ClearDisabled ¶
func (u *YouTubeTalentUpsertBulk) ClearDisabled() *YouTubeTalentUpsertBulk
ClearDisabled clears the value of the "disabled" field.
func (*YouTubeTalentUpsertBulk) ClearLastMembershipVideoIDMiss ¶
func (u *YouTubeTalentUpsertBulk) ClearLastMembershipVideoIDMiss() *YouTubeTalentUpsertBulk
ClearLastMembershipVideoIDMiss clears the value of the "last_membership_video_id_miss" field.
func (*YouTubeTalentUpsertBulk) ClearMembershipVideoID ¶
func (u *YouTubeTalentUpsertBulk) ClearMembershipVideoID() *YouTubeTalentUpsertBulk
ClearMembershipVideoID clears the value of the "membership_video_id" field.
func (*YouTubeTalentUpsertBulk) DoNothing ¶
func (u *YouTubeTalentUpsertBulk) DoNothing() *YouTubeTalentUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*YouTubeTalentUpsertBulk) Exec ¶
func (u *YouTubeTalentUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*YouTubeTalentUpsertBulk) ExecX ¶
func (u *YouTubeTalentUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*YouTubeTalentUpsertBulk) Ignore ¶
func (u *YouTubeTalentUpsertBulk) Ignore() *YouTubeTalentUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.YouTubeTalent.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*YouTubeTalentUpsertBulk) SetChannelName ¶
func (u *YouTubeTalentUpsertBulk) SetChannelName(v string) *YouTubeTalentUpsertBulk
SetChannelName sets the "channel_name" field.
func (*YouTubeTalentUpsertBulk) SetDisabled ¶
func (u *YouTubeTalentUpsertBulk) SetDisabled(v time.Time) *YouTubeTalentUpsertBulk
SetDisabled sets the "disabled" field.
func (*YouTubeTalentUpsertBulk) SetDisabledPermanently ¶
func (u *YouTubeTalentUpsertBulk) SetDisabledPermanently(v bool) *YouTubeTalentUpsertBulk
SetDisabledPermanently sets the "disabled_permanently" field.
func (*YouTubeTalentUpsertBulk) SetLastMembershipVideoIDMiss ¶
func (u *YouTubeTalentUpsertBulk) SetLastMembershipVideoIDMiss(v time.Time) *YouTubeTalentUpsertBulk
SetLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field.
func (*YouTubeTalentUpsertBulk) SetLastUpdated ¶
func (u *YouTubeTalentUpsertBulk) SetLastUpdated(v time.Time) *YouTubeTalentUpsertBulk
SetLastUpdated sets the "last_updated" field.
func (*YouTubeTalentUpsertBulk) SetMembershipVideoID ¶
func (u *YouTubeTalentUpsertBulk) SetMembershipVideoID(v string) *YouTubeTalentUpsertBulk
SetMembershipVideoID sets the "membership_video_id" field.
func (*YouTubeTalentUpsertBulk) SetThumbnailURL ¶
func (u *YouTubeTalentUpsertBulk) SetThumbnailURL(v string) *YouTubeTalentUpsertBulk
SetThumbnailURL sets the "thumbnail_url" field.
func (*YouTubeTalentUpsertBulk) Update ¶
func (u *YouTubeTalentUpsertBulk) Update(set func(*YouTubeTalentUpsert)) *YouTubeTalentUpsertBulk
Update allows overriding fields `UPDATE` values. See the YouTubeTalentCreateBulk.OnConflict documentation for more info.
func (*YouTubeTalentUpsertBulk) UpdateChannelName ¶
func (u *YouTubeTalentUpsertBulk) UpdateChannelName() *YouTubeTalentUpsertBulk
UpdateChannelName sets the "channel_name" field to the value that was provided on create.
func (*YouTubeTalentUpsertBulk) UpdateDisabled ¶
func (u *YouTubeTalentUpsertBulk) UpdateDisabled() *YouTubeTalentUpsertBulk
UpdateDisabled sets the "disabled" field to the value that was provided on create.
func (*YouTubeTalentUpsertBulk) UpdateDisabledPermanently ¶
func (u *YouTubeTalentUpsertBulk) UpdateDisabledPermanently() *YouTubeTalentUpsertBulk
UpdateDisabledPermanently sets the "disabled_permanently" field to the value that was provided on create.
func (*YouTubeTalentUpsertBulk) UpdateLastMembershipVideoIDMiss ¶
func (u *YouTubeTalentUpsertBulk) UpdateLastMembershipVideoIDMiss() *YouTubeTalentUpsertBulk
UpdateLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field to the value that was provided on create.
func (*YouTubeTalentUpsertBulk) UpdateLastUpdated ¶
func (u *YouTubeTalentUpsertBulk) UpdateLastUpdated() *YouTubeTalentUpsertBulk
UpdateLastUpdated sets the "last_updated" field to the value that was provided on create.
func (*YouTubeTalentUpsertBulk) UpdateMembershipVideoID ¶
func (u *YouTubeTalentUpsertBulk) UpdateMembershipVideoID() *YouTubeTalentUpsertBulk
UpdateMembershipVideoID sets the "membership_video_id" field to the value that was provided on create.
func (*YouTubeTalentUpsertBulk) UpdateNewValues ¶
func (u *YouTubeTalentUpsertBulk) UpdateNewValues() *YouTubeTalentUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.YouTubeTalent.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(youtubetalent.FieldID) }), ). Exec(ctx)
func (*YouTubeTalentUpsertBulk) UpdateThumbnailURL ¶
func (u *YouTubeTalentUpsertBulk) UpdateThumbnailURL() *YouTubeTalentUpsertBulk
UpdateThumbnailURL sets the "thumbnail_url" field to the value that was provided on create.
type YouTubeTalentUpsertOne ¶
type YouTubeTalentUpsertOne struct {
// contains filtered or unexported fields
}
YouTubeTalentUpsertOne is the builder for "upsert"-ing
one YouTubeTalent node.
func (*YouTubeTalentUpsertOne) ClearDisabled ¶
func (u *YouTubeTalentUpsertOne) ClearDisabled() *YouTubeTalentUpsertOne
ClearDisabled clears the value of the "disabled" field.
func (*YouTubeTalentUpsertOne) ClearLastMembershipVideoIDMiss ¶
func (u *YouTubeTalentUpsertOne) ClearLastMembershipVideoIDMiss() *YouTubeTalentUpsertOne
ClearLastMembershipVideoIDMiss clears the value of the "last_membership_video_id_miss" field.
func (*YouTubeTalentUpsertOne) ClearMembershipVideoID ¶
func (u *YouTubeTalentUpsertOne) ClearMembershipVideoID() *YouTubeTalentUpsertOne
ClearMembershipVideoID clears the value of the "membership_video_id" field.
func (*YouTubeTalentUpsertOne) DoNothing ¶
func (u *YouTubeTalentUpsertOne) DoNothing() *YouTubeTalentUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*YouTubeTalentUpsertOne) Exec ¶
func (u *YouTubeTalentUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*YouTubeTalentUpsertOne) ExecX ¶
func (u *YouTubeTalentUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*YouTubeTalentUpsertOne) ID ¶
func (u *YouTubeTalentUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*YouTubeTalentUpsertOne) IDX ¶
func (u *YouTubeTalentUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*YouTubeTalentUpsertOne) Ignore ¶
func (u *YouTubeTalentUpsertOne) Ignore() *YouTubeTalentUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.YouTubeTalent.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*YouTubeTalentUpsertOne) SetChannelName ¶
func (u *YouTubeTalentUpsertOne) SetChannelName(v string) *YouTubeTalentUpsertOne
SetChannelName sets the "channel_name" field.
func (*YouTubeTalentUpsertOne) SetDisabled ¶
func (u *YouTubeTalentUpsertOne) SetDisabled(v time.Time) *YouTubeTalentUpsertOne
SetDisabled sets the "disabled" field.
func (*YouTubeTalentUpsertOne) SetDisabledPermanently ¶
func (u *YouTubeTalentUpsertOne) SetDisabledPermanently(v bool) *YouTubeTalentUpsertOne
SetDisabledPermanently sets the "disabled_permanently" field.
func (*YouTubeTalentUpsertOne) SetLastMembershipVideoIDMiss ¶
func (u *YouTubeTalentUpsertOne) SetLastMembershipVideoIDMiss(v time.Time) *YouTubeTalentUpsertOne
SetLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field.
func (*YouTubeTalentUpsertOne) SetLastUpdated ¶
func (u *YouTubeTalentUpsertOne) SetLastUpdated(v time.Time) *YouTubeTalentUpsertOne
SetLastUpdated sets the "last_updated" field.
func (*YouTubeTalentUpsertOne) SetMembershipVideoID ¶
func (u *YouTubeTalentUpsertOne) SetMembershipVideoID(v string) *YouTubeTalentUpsertOne
SetMembershipVideoID sets the "membership_video_id" field.
func (*YouTubeTalentUpsertOne) SetThumbnailURL ¶
func (u *YouTubeTalentUpsertOne) SetThumbnailURL(v string) *YouTubeTalentUpsertOne
SetThumbnailURL sets the "thumbnail_url" field.
func (*YouTubeTalentUpsertOne) Update ¶
func (u *YouTubeTalentUpsertOne) Update(set func(*YouTubeTalentUpsert)) *YouTubeTalentUpsertOne
Update allows overriding fields `UPDATE` values. See the YouTubeTalentCreate.OnConflict documentation for more info.
func (*YouTubeTalentUpsertOne) UpdateChannelName ¶
func (u *YouTubeTalentUpsertOne) UpdateChannelName() *YouTubeTalentUpsertOne
UpdateChannelName sets the "channel_name" field to the value that was provided on create.
func (*YouTubeTalentUpsertOne) UpdateDisabled ¶
func (u *YouTubeTalentUpsertOne) UpdateDisabled() *YouTubeTalentUpsertOne
UpdateDisabled sets the "disabled" field to the value that was provided on create.
func (*YouTubeTalentUpsertOne) UpdateDisabledPermanently ¶
func (u *YouTubeTalentUpsertOne) UpdateDisabledPermanently() *YouTubeTalentUpsertOne
UpdateDisabledPermanently sets the "disabled_permanently" field to the value that was provided on create.
func (*YouTubeTalentUpsertOne) UpdateLastMembershipVideoIDMiss ¶
func (u *YouTubeTalentUpsertOne) UpdateLastMembershipVideoIDMiss() *YouTubeTalentUpsertOne
UpdateLastMembershipVideoIDMiss sets the "last_membership_video_id_miss" field to the value that was provided on create.
func (*YouTubeTalentUpsertOne) UpdateLastUpdated ¶
func (u *YouTubeTalentUpsertOne) UpdateLastUpdated() *YouTubeTalentUpsertOne
UpdateLastUpdated sets the "last_updated" field to the value that was provided on create.
func (*YouTubeTalentUpsertOne) UpdateMembershipVideoID ¶
func (u *YouTubeTalentUpsertOne) UpdateMembershipVideoID() *YouTubeTalentUpsertOne
UpdateMembershipVideoID sets the "membership_video_id" field to the value that was provided on create.
func (*YouTubeTalentUpsertOne) UpdateNewValues ¶
func (u *YouTubeTalentUpsertOne) UpdateNewValues() *YouTubeTalentUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.YouTubeTalent.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(youtubetalent.FieldID) }), ). Exec(ctx)
func (*YouTubeTalentUpsertOne) UpdateThumbnailURL ¶
func (u *YouTubeTalentUpsertOne) UpdateThumbnailURL() *YouTubeTalentUpsertOne
UpdateThumbnailURL sets the "thumbnail_url" field to the value that was provided on create.
type YouTubeTalents ¶
type YouTubeTalents []*YouTubeTalent
YouTubeTalents is a parsable slice of YouTubeTalent.
Source Files ¶
- client.go
- ent.go
- generate.go
- guild.go
- guild_create.go
- guild_delete.go
- guild_query.go
- guild_update.go
- guildrole.go
- guildrole_create.go
- guildrole_delete.go
- guildrole_query.go
- guildrole_update.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- usermembership.go
- usermembership_create.go
- usermembership_delete.go
- usermembership_query.go
- usermembership_update.go
- youtubetalent.go
- youtubetalent_create.go
- youtubetalent_delete.go
- youtubetalent_query.go
- youtubetalent_update.go