Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Actors
- type ActorsClient
- func (c *ActorsClient) Create() *ActorsCreate
- func (c *ActorsClient) CreateBulk(builders ...*ActorsCreate) *ActorsCreateBulk
- func (c *ActorsClient) Delete() *ActorsDelete
- func (c *ActorsClient) DeleteOne(a *Actors) *ActorsDeleteOne
- func (c *ActorsClient) DeleteOneID(id int) *ActorsDeleteOne
- func (c *ActorsClient) Get(ctx context.Context, id int) (*Actors, error)
- func (c *ActorsClient) GetX(ctx context.Context, id int) *Actors
- func (c *ActorsClient) Hooks() []Hook
- func (c *ActorsClient) Intercept(interceptors ...Interceptor)
- func (c *ActorsClient) Interceptors() []Interceptor
- func (c *ActorsClient) MapCreateBulk(slice any, setFunc func(*ActorsCreate, int)) *ActorsCreateBulk
- func (c *ActorsClient) Query() *ActorsQuery
- func (c *ActorsClient) Update() *ActorsUpdate
- func (c *ActorsClient) UpdateOne(a *Actors) *ActorsUpdateOne
- func (c *ActorsClient) UpdateOneID(id int) *ActorsUpdateOne
- func (c *ActorsClient) Use(hooks ...Hook)
- type ActorsCreate
- type ActorsCreateBulk
- type ActorsDelete
- type ActorsDeleteOne
- type ActorsGroupBy
- func (agb *ActorsGroupBy) Aggregate(fns ...AggregateFunc) *ActorsGroupBy
- func (s *ActorsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ActorsGroupBy) BoolX(ctx context.Context) bool
- func (s *ActorsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ActorsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ActorsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ActorsGroupBy) Float64X(ctx context.Context) float64
- func (s *ActorsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ActorsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ActorsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ActorsGroupBy) IntX(ctx context.Context) int
- func (s *ActorsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ActorsGroupBy) IntsX(ctx context.Context) []int
- func (agb *ActorsGroupBy) Scan(ctx context.Context, v any) error
- func (s *ActorsGroupBy) ScanX(ctx context.Context, v any)
- func (s *ActorsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ActorsGroupBy) StringX(ctx context.Context) string
- func (s *ActorsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ActorsGroupBy) StringsX(ctx context.Context) []string
- type ActorsMutation
- func (m *ActorsMutation) AddField(name string, value ent.Value) error
- func (m *ActorsMutation) AddedEdges() []string
- func (m *ActorsMutation) AddedField(name string) (ent.Value, bool)
- func (m *ActorsMutation) AddedFields() []string
- func (m *ActorsMutation) AddedIDs(name string) []ent.Value
- func (m *ActorsMutation) ClearEdge(name string) error
- func (m *ActorsMutation) ClearField(name string) error
- func (m *ActorsMutation) ClearedEdges() []string
- func (m *ActorsMutation) ClearedFields() []string
- func (m ActorsMutation) Client() *Client
- func (m *ActorsMutation) EdgeCleared(name string) bool
- func (m *ActorsMutation) Field(name string) (ent.Value, bool)
- func (m *ActorsMutation) FieldCleared(name string) bool
- func (m *ActorsMutation) Fields() []string
- func (m *ActorsMutation) ID() (id int, exists bool)
- func (m *ActorsMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ActorsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ActorsMutation) Op() Op
- func (m *ActorsMutation) RemovedEdges() []string
- func (m *ActorsMutation) RemovedIDs(name string) []ent.Value
- func (m *ActorsMutation) ResetEdge(name string) error
- func (m *ActorsMutation) ResetField(name string) error
- func (m *ActorsMutation) SetField(name string, value ent.Value) error
- func (m *ActorsMutation) SetOp(op Op)
- func (m ActorsMutation) Tx() (*Tx, error)
- func (m *ActorsMutation) Type() string
- func (m *ActorsMutation) Where(ps ...predicate.Actors)
- func (m *ActorsMutation) WhereP(ps ...func(*sql.Selector))
- type ActorsQuery
- func (aq *ActorsQuery) Aggregate(fns ...AggregateFunc) *ActorsSelect
- func (aq *ActorsQuery) All(ctx context.Context) ([]*Actors, error)
- func (aq *ActorsQuery) AllX(ctx context.Context) []*Actors
- func (aq *ActorsQuery) Clone() *ActorsQuery
- func (aq *ActorsQuery) Count(ctx context.Context) (int, error)
- func (aq *ActorsQuery) CountX(ctx context.Context) int
- func (aq *ActorsQuery) Exist(ctx context.Context) (bool, error)
- func (aq *ActorsQuery) ExistX(ctx context.Context) bool
- func (aq *ActorsQuery) First(ctx context.Context) (*Actors, error)
- func (aq *ActorsQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *ActorsQuery) FirstIDX(ctx context.Context) int
- func (aq *ActorsQuery) FirstX(ctx context.Context) *Actors
- func (aq *ActorsQuery) GroupBy(field string, fields ...string) *ActorsGroupBy
- func (aq *ActorsQuery) IDs(ctx context.Context) (ids []int, err error)
- func (aq *ActorsQuery) IDsX(ctx context.Context) []int
- func (aq *ActorsQuery) Limit(limit int) *ActorsQuery
- func (aq *ActorsQuery) Offset(offset int) *ActorsQuery
- func (aq *ActorsQuery) Only(ctx context.Context) (*Actors, error)
- func (aq *ActorsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *ActorsQuery) OnlyIDX(ctx context.Context) int
- func (aq *ActorsQuery) OnlyX(ctx context.Context) *Actors
- func (aq *ActorsQuery) Order(o ...actors.OrderOption) *ActorsQuery
- func (aq *ActorsQuery) Select(fields ...string) *ActorsSelect
- func (aq *ActorsQuery) Unique(unique bool) *ActorsQuery
- func (aq *ActorsQuery) Where(ps ...predicate.Actors) *ActorsQuery
- type ActorsSelect
- func (as *ActorsSelect) Aggregate(fns ...AggregateFunc) *ActorsSelect
- func (s *ActorsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ActorsSelect) BoolX(ctx context.Context) bool
- func (s *ActorsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ActorsSelect) BoolsX(ctx context.Context) []bool
- func (s *ActorsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ActorsSelect) Float64X(ctx context.Context) float64
- func (s *ActorsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ActorsSelect) Float64sX(ctx context.Context) []float64
- func (s *ActorsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ActorsSelect) IntX(ctx context.Context) int
- func (s *ActorsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ActorsSelect) IntsX(ctx context.Context) []int
- func (as *ActorsSelect) Scan(ctx context.Context, v any) error
- func (s *ActorsSelect) ScanX(ctx context.Context, v any)
- func (s *ActorsSelect) String(ctx context.Context) (_ string, err error)
- func (s *ActorsSelect) StringX(ctx context.Context) string
- func (s *ActorsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ActorsSelect) StringsX(ctx context.Context) []string
- type ActorsSlice
- type ActorsUpdate
- func (au *ActorsUpdate) Exec(ctx context.Context) error
- func (au *ActorsUpdate) ExecX(ctx context.Context)
- func (au *ActorsUpdate) Mutation() *ActorsMutation
- func (au *ActorsUpdate) Save(ctx context.Context) (int, error)
- func (au *ActorsUpdate) SaveX(ctx context.Context) int
- func (au *ActorsUpdate) Where(ps ...predicate.Actors) *ActorsUpdate
- type ActorsUpdateOne
- func (auo *ActorsUpdateOne) Exec(ctx context.Context) error
- func (auo *ActorsUpdateOne) ExecX(ctx context.Context)
- func (auo *ActorsUpdateOne) Mutation() *ActorsMutation
- func (auo *ActorsUpdateOne) Save(ctx context.Context) (*Actors, error)
- func (auo *ActorsUpdateOne) SaveX(ctx context.Context) *Actors
- func (auo *ActorsUpdateOne) Select(field string, fields ...string) *ActorsUpdateOne
- func (auo *ActorsUpdateOne) Where(ps ...predicate.Actors) *ActorsUpdateOne
- type AggregateFunc
- type Albums
- func (a *Albums) QueryArtists() *ArtistsQuery
- func (a *Albums) QueryImage() *ImagesQuery
- func (a *Albums) QueryMusics() *MusicsQuery
- func (a *Albums) QueryUsers() *UsersQuery
- func (a *Albums) String() string
- func (a *Albums) Unwrap() *Albums
- func (a *Albums) Update() *AlbumsUpdateOne
- func (a *Albums) Value(name string) (ent.Value, error)
- type AlbumsClient
- func (c *AlbumsClient) Create() *AlbumsCreate
- func (c *AlbumsClient) CreateBulk(builders ...*AlbumsCreate) *AlbumsCreateBulk
- func (c *AlbumsClient) Delete() *AlbumsDelete
- func (c *AlbumsClient) DeleteOne(a *Albums) *AlbumsDeleteOne
- func (c *AlbumsClient) DeleteOneID(id uint64) *AlbumsDeleteOne
- func (c *AlbumsClient) Get(ctx context.Context, id uint64) (*Albums, error)
- func (c *AlbumsClient) GetX(ctx context.Context, id uint64) *Albums
- func (c *AlbumsClient) Hooks() []Hook
- func (c *AlbumsClient) Intercept(interceptors ...Interceptor)
- func (c *AlbumsClient) Interceptors() []Interceptor
- func (c *AlbumsClient) MapCreateBulk(slice any, setFunc func(*AlbumsCreate, int)) *AlbumsCreateBulk
- func (c *AlbumsClient) Query() *AlbumsQuery
- func (c *AlbumsClient) QueryArtists(a *Albums) *ArtistsQuery
- func (c *AlbumsClient) QueryImage(a *Albums) *ImagesQuery
- func (c *AlbumsClient) QueryMusics(a *Albums) *MusicsQuery
- func (c *AlbumsClient) QueryUsers(a *Albums) *UsersQuery
- func (c *AlbumsClient) Update() *AlbumsUpdate
- func (c *AlbumsClient) UpdateOne(a *Albums) *AlbumsUpdateOne
- func (c *AlbumsClient) UpdateOneID(id uint64) *AlbumsUpdateOne
- func (c *AlbumsClient) Use(hooks ...Hook)
- type AlbumsCreate
- func (ac *AlbumsCreate) AddArtistIDs(ids ...uint64) *AlbumsCreate
- func (ac *AlbumsCreate) AddArtists(a ...*Artists) *AlbumsCreate
- func (ac *AlbumsCreate) AddMusicIDs(ids ...uint64) *AlbumsCreate
- func (ac *AlbumsCreate) AddMusics(m ...*Musics) *AlbumsCreate
- func (ac *AlbumsCreate) AddUserIDs(ids ...uint64) *AlbumsCreate
- func (ac *AlbumsCreate) AddUsers(u ...*Users) *AlbumsCreate
- func (ac *AlbumsCreate) Exec(ctx context.Context) error
- func (ac *AlbumsCreate) ExecX(ctx context.Context)
- func (ac *AlbumsCreate) Mutation() *AlbumsMutation
- func (ac *AlbumsCreate) Save(ctx context.Context) (*Albums, error)
- func (ac *AlbumsCreate) SaveX(ctx context.Context) *Albums
- func (ac *AlbumsCreate) SetCreateTime(t time.Time) *AlbumsCreate
- func (ac *AlbumsCreate) SetDate(s string) *AlbumsCreate
- func (ac *AlbumsCreate) SetDescription(s string) *AlbumsCreate
- func (ac *AlbumsCreate) SetID(u uint64) *AlbumsCreate
- func (ac *AlbumsCreate) SetImage(i *Images) *AlbumsCreate
- func (ac *AlbumsCreate) SetImageID(id uint64) *AlbumsCreate
- func (ac *AlbumsCreate) SetNillableCreateTime(t *time.Time) *AlbumsCreate
- func (ac *AlbumsCreate) SetNillableDescription(s *string) *AlbumsCreate
- func (ac *AlbumsCreate) SetNillableUpdateTime(t *time.Time) *AlbumsCreate
- func (ac *AlbumsCreate) SetTitle(s string) *AlbumsCreate
- func (ac *AlbumsCreate) SetUpdateTime(t time.Time) *AlbumsCreate
- type AlbumsCreateBulk
- type AlbumsDelete
- type AlbumsDeleteOne
- type AlbumsEdges
- type AlbumsGroupBy
- func (agb *AlbumsGroupBy) Aggregate(fns ...AggregateFunc) *AlbumsGroupBy
- func (s *AlbumsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AlbumsGroupBy) BoolX(ctx context.Context) bool
- func (s *AlbumsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AlbumsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AlbumsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AlbumsGroupBy) Float64X(ctx context.Context) float64
- func (s *AlbumsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AlbumsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AlbumsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AlbumsGroupBy) IntX(ctx context.Context) int
- func (s *AlbumsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AlbumsGroupBy) IntsX(ctx context.Context) []int
- func (agb *AlbumsGroupBy) Scan(ctx context.Context, v any) error
- func (s *AlbumsGroupBy) ScanX(ctx context.Context, v any)
- func (s *AlbumsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AlbumsGroupBy) StringX(ctx context.Context) string
- func (s *AlbumsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AlbumsGroupBy) StringsX(ctx context.Context) []string
- type AlbumsMutation
- func (m *AlbumsMutation) AddArtistIDs(ids ...uint64)
- func (m *AlbumsMutation) AddField(name string, value ent.Value) error
- func (m *AlbumsMutation) AddMusicIDs(ids ...uint64)
- func (m *AlbumsMutation) AddUserIDs(ids ...uint64)
- func (m *AlbumsMutation) AddedEdges() []string
- func (m *AlbumsMutation) AddedField(name string) (ent.Value, bool)
- func (m *AlbumsMutation) AddedFields() []string
- func (m *AlbumsMutation) AddedIDs(name string) []ent.Value
- func (m *AlbumsMutation) ArtistsCleared() bool
- func (m *AlbumsMutation) ArtistsIDs() (ids []uint64)
- func (m *AlbumsMutation) ClearArtists()
- func (m *AlbumsMutation) ClearDescription()
- func (m *AlbumsMutation) ClearEdge(name string) error
- func (m *AlbumsMutation) ClearField(name string) error
- func (m *AlbumsMutation) ClearImage()
- func (m *AlbumsMutation) ClearMusics()
- func (m *AlbumsMutation) ClearUsers()
- func (m *AlbumsMutation) ClearedEdges() []string
- func (m *AlbumsMutation) ClearedFields() []string
- func (m AlbumsMutation) Client() *Client
- func (m *AlbumsMutation) CreateTime() (r time.Time, exists bool)
- func (m *AlbumsMutation) Date() (r string, exists bool)
- func (m *AlbumsMutation) Description() (r string, exists bool)
- func (m *AlbumsMutation) DescriptionCleared() bool
- func (m *AlbumsMutation) EdgeCleared(name string) bool
- func (m *AlbumsMutation) Field(name string) (ent.Value, bool)
- func (m *AlbumsMutation) FieldCleared(name string) bool
- func (m *AlbumsMutation) Fields() []string
- func (m *AlbumsMutation) ID() (id uint64, exists bool)
- func (m *AlbumsMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *AlbumsMutation) ImageCleared() bool
- func (m *AlbumsMutation) ImageID() (id uint64, exists bool)
- func (m *AlbumsMutation) ImageIDs() (ids []uint64)
- func (m *AlbumsMutation) MusicsCleared() bool
- func (m *AlbumsMutation) MusicsIDs() (ids []uint64)
- func (m *AlbumsMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *AlbumsMutation) OldDate(ctx context.Context) (v string, err error)
- func (m *AlbumsMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *AlbumsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AlbumsMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *AlbumsMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *AlbumsMutation) Op() Op
- func (m *AlbumsMutation) RemoveArtistIDs(ids ...uint64)
- func (m *AlbumsMutation) RemoveMusicIDs(ids ...uint64)
- func (m *AlbumsMutation) RemoveUserIDs(ids ...uint64)
- func (m *AlbumsMutation) RemovedArtistsIDs() (ids []uint64)
- func (m *AlbumsMutation) RemovedEdges() []string
- func (m *AlbumsMutation) RemovedIDs(name string) []ent.Value
- func (m *AlbumsMutation) RemovedMusicsIDs() (ids []uint64)
- func (m *AlbumsMutation) RemovedUsersIDs() (ids []uint64)
- func (m *AlbumsMutation) ResetArtists()
- func (m *AlbumsMutation) ResetCreateTime()
- func (m *AlbumsMutation) ResetDate()
- func (m *AlbumsMutation) ResetDescription()
- func (m *AlbumsMutation) ResetEdge(name string) error
- func (m *AlbumsMutation) ResetField(name string) error
- func (m *AlbumsMutation) ResetImage()
- func (m *AlbumsMutation) ResetMusics()
- func (m *AlbumsMutation) ResetTitle()
- func (m *AlbumsMutation) ResetUpdateTime()
- func (m *AlbumsMutation) ResetUsers()
- func (m *AlbumsMutation) SetCreateTime(t time.Time)
- func (m *AlbumsMutation) SetDate(s string)
- func (m *AlbumsMutation) SetDescription(s string)
- func (m *AlbumsMutation) SetField(name string, value ent.Value) error
- func (m *AlbumsMutation) SetID(id uint64)
- func (m *AlbumsMutation) SetImageID(id uint64)
- func (m *AlbumsMutation) SetOp(op Op)
- func (m *AlbumsMutation) SetTitle(s string)
- func (m *AlbumsMutation) SetUpdateTime(t time.Time)
- func (m *AlbumsMutation) Title() (r string, exists bool)
- func (m AlbumsMutation) Tx() (*Tx, error)
- func (m *AlbumsMutation) Type() string
- func (m *AlbumsMutation) UpdateTime() (r time.Time, exists bool)
- func (m *AlbumsMutation) UsersCleared() bool
- func (m *AlbumsMutation) UsersIDs() (ids []uint64)
- func (m *AlbumsMutation) Where(ps ...predicate.Albums)
- func (m *AlbumsMutation) WhereP(ps ...func(*sql.Selector))
- type AlbumsQuery
- func (aq *AlbumsQuery) Aggregate(fns ...AggregateFunc) *AlbumsSelect
- func (aq *AlbumsQuery) All(ctx context.Context) ([]*Albums, error)
- func (aq *AlbumsQuery) AllX(ctx context.Context) []*Albums
- func (aq *AlbumsQuery) Clone() *AlbumsQuery
- func (aq *AlbumsQuery) Count(ctx context.Context) (int, error)
- func (aq *AlbumsQuery) CountX(ctx context.Context) int
- func (aq *AlbumsQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AlbumsQuery) ExistX(ctx context.Context) bool
- func (aq *AlbumsQuery) First(ctx context.Context) (*Albums, error)
- func (aq *AlbumsQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (aq *AlbumsQuery) FirstIDX(ctx context.Context) uint64
- func (aq *AlbumsQuery) FirstX(ctx context.Context) *Albums
- func (aq *AlbumsQuery) GroupBy(field string, fields ...string) *AlbumsGroupBy
- func (aq *AlbumsQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (aq *AlbumsQuery) IDsX(ctx context.Context) []uint64
- func (aq *AlbumsQuery) Limit(limit int) *AlbumsQuery
- func (aq *AlbumsQuery) Offset(offset int) *AlbumsQuery
- func (aq *AlbumsQuery) Only(ctx context.Context) (*Albums, error)
- func (aq *AlbumsQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (aq *AlbumsQuery) OnlyIDX(ctx context.Context) uint64
- func (aq *AlbumsQuery) OnlyX(ctx context.Context) *Albums
- func (aq *AlbumsQuery) Order(o ...albums.OrderOption) *AlbumsQuery
- func (aq *AlbumsQuery) QueryArtists() *ArtistsQuery
- func (aq *AlbumsQuery) QueryImage() *ImagesQuery
- func (aq *AlbumsQuery) QueryMusics() *MusicsQuery
- func (aq *AlbumsQuery) QueryUsers() *UsersQuery
- func (aq *AlbumsQuery) Select(fields ...string) *AlbumsSelect
- func (aq *AlbumsQuery) Unique(unique bool) *AlbumsQuery
- func (aq *AlbumsQuery) Where(ps ...predicate.Albums) *AlbumsQuery
- func (aq *AlbumsQuery) WithArtists(opts ...func(*ArtistsQuery)) *AlbumsQuery
- func (aq *AlbumsQuery) WithImage(opts ...func(*ImagesQuery)) *AlbumsQuery
- func (aq *AlbumsQuery) WithMusics(opts ...func(*MusicsQuery)) *AlbumsQuery
- func (aq *AlbumsQuery) WithUsers(opts ...func(*UsersQuery)) *AlbumsQuery
- type AlbumsSelect
- func (as *AlbumsSelect) Aggregate(fns ...AggregateFunc) *AlbumsSelect
- func (s *AlbumsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AlbumsSelect) BoolX(ctx context.Context) bool
- func (s *AlbumsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AlbumsSelect) BoolsX(ctx context.Context) []bool
- func (s *AlbumsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AlbumsSelect) Float64X(ctx context.Context) float64
- func (s *AlbumsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AlbumsSelect) Float64sX(ctx context.Context) []float64
- func (s *AlbumsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AlbumsSelect) IntX(ctx context.Context) int
- func (s *AlbumsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AlbumsSelect) IntsX(ctx context.Context) []int
- func (as *AlbumsSelect) Scan(ctx context.Context, v any) error
- func (s *AlbumsSelect) ScanX(ctx context.Context, v any)
- func (s *AlbumsSelect) String(ctx context.Context) (_ string, err error)
- func (s *AlbumsSelect) StringX(ctx context.Context) string
- func (s *AlbumsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AlbumsSelect) StringsX(ctx context.Context) []string
- type AlbumsSlice
- type AlbumsUpdate
- func (au *AlbumsUpdate) AddArtistIDs(ids ...uint64) *AlbumsUpdate
- func (au *AlbumsUpdate) AddArtists(a ...*Artists) *AlbumsUpdate
- func (au *AlbumsUpdate) AddMusicIDs(ids ...uint64) *AlbumsUpdate
- func (au *AlbumsUpdate) AddMusics(m ...*Musics) *AlbumsUpdate
- func (au *AlbumsUpdate) AddUserIDs(ids ...uint64) *AlbumsUpdate
- func (au *AlbumsUpdate) AddUsers(u ...*Users) *AlbumsUpdate
- func (au *AlbumsUpdate) ClearArtists() *AlbumsUpdate
- func (au *AlbumsUpdate) ClearDescription() *AlbumsUpdate
- func (au *AlbumsUpdate) ClearImage() *AlbumsUpdate
- func (au *AlbumsUpdate) ClearMusics() *AlbumsUpdate
- func (au *AlbumsUpdate) ClearUsers() *AlbumsUpdate
- func (au *AlbumsUpdate) Exec(ctx context.Context) error
- func (au *AlbumsUpdate) ExecX(ctx context.Context)
- func (au *AlbumsUpdate) Mutation() *AlbumsMutation
- func (au *AlbumsUpdate) RemoveArtistIDs(ids ...uint64) *AlbumsUpdate
- func (au *AlbumsUpdate) RemoveArtists(a ...*Artists) *AlbumsUpdate
- func (au *AlbumsUpdate) RemoveMusicIDs(ids ...uint64) *AlbumsUpdate
- func (au *AlbumsUpdate) RemoveMusics(m ...*Musics) *AlbumsUpdate
- func (au *AlbumsUpdate) RemoveUserIDs(ids ...uint64) *AlbumsUpdate
- func (au *AlbumsUpdate) RemoveUsers(u ...*Users) *AlbumsUpdate
- func (au *AlbumsUpdate) Save(ctx context.Context) (int, error)
- func (au *AlbumsUpdate) SaveX(ctx context.Context) int
- func (au *AlbumsUpdate) SetDate(s string) *AlbumsUpdate
- func (au *AlbumsUpdate) SetDescription(s string) *AlbumsUpdate
- func (au *AlbumsUpdate) SetImage(i *Images) *AlbumsUpdate
- func (au *AlbumsUpdate) SetImageID(id uint64) *AlbumsUpdate
- func (au *AlbumsUpdate) SetNillableDate(s *string) *AlbumsUpdate
- func (au *AlbumsUpdate) SetNillableDescription(s *string) *AlbumsUpdate
- func (au *AlbumsUpdate) SetNillableTitle(s *string) *AlbumsUpdate
- func (au *AlbumsUpdate) SetTitle(s string) *AlbumsUpdate
- func (au *AlbumsUpdate) SetUpdateTime(t time.Time) *AlbumsUpdate
- func (au *AlbumsUpdate) Where(ps ...predicate.Albums) *AlbumsUpdate
- type AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) AddArtistIDs(ids ...uint64) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) AddArtists(a ...*Artists) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) AddMusicIDs(ids ...uint64) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) AddMusics(m ...*Musics) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) AddUserIDs(ids ...uint64) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) AddUsers(u ...*Users) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) ClearArtists() *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) ClearDescription() *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) ClearImage() *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) ClearMusics() *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) ClearUsers() *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) Exec(ctx context.Context) error
- func (auo *AlbumsUpdateOne) ExecX(ctx context.Context)
- func (auo *AlbumsUpdateOne) Mutation() *AlbumsMutation
- func (auo *AlbumsUpdateOne) RemoveArtistIDs(ids ...uint64) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) RemoveArtists(a ...*Artists) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) RemoveMusicIDs(ids ...uint64) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) RemoveMusics(m ...*Musics) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) RemoveUserIDs(ids ...uint64) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) RemoveUsers(u ...*Users) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) Save(ctx context.Context) (*Albums, error)
- func (auo *AlbumsUpdateOne) SaveX(ctx context.Context) *Albums
- func (auo *AlbumsUpdateOne) Select(field string, fields ...string) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) SetDate(s string) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) SetDescription(s string) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) SetImage(i *Images) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) SetImageID(id uint64) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) SetNillableDate(s *string) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) SetNillableDescription(s *string) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) SetNillableTitle(s *string) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) SetTitle(s string) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) SetUpdateTime(t time.Time) *AlbumsUpdateOne
- func (auo *AlbumsUpdateOne) Where(ps ...predicate.Albums) *AlbumsUpdateOne
- type Artists
- type ArtistsClient
- func (c *ArtistsClient) Create() *ArtistsCreate
- func (c *ArtistsClient) CreateBulk(builders ...*ArtistsCreate) *ArtistsCreateBulk
- func (c *ArtistsClient) Delete() *ArtistsDelete
- func (c *ArtistsClient) DeleteOne(a *Artists) *ArtistsDeleteOne
- func (c *ArtistsClient) DeleteOneID(id uint64) *ArtistsDeleteOne
- func (c *ArtistsClient) Get(ctx context.Context, id uint64) (*Artists, error)
- func (c *ArtistsClient) GetX(ctx context.Context, id uint64) *Artists
- func (c *ArtistsClient) Hooks() []Hook
- func (c *ArtistsClient) Intercept(interceptors ...Interceptor)
- func (c *ArtistsClient) Interceptors() []Interceptor
- func (c *ArtistsClient) MapCreateBulk(slice any, setFunc func(*ArtistsCreate, int)) *ArtistsCreateBulk
- func (c *ArtistsClient) Query() *ArtistsQuery
- func (c *ArtistsClient) QueryAlbums(a *Artists) *AlbumsQuery
- func (c *ArtistsClient) QueryMusics(a *Artists) *MusicsQuery
- func (c *ArtistsClient) Update() *ArtistsUpdate
- func (c *ArtistsClient) UpdateOne(a *Artists) *ArtistsUpdateOne
- func (c *ArtistsClient) UpdateOneID(id uint64) *ArtistsUpdateOne
- func (c *ArtistsClient) Use(hooks ...Hook)
- type ArtistsCreate
- func (ac *ArtistsCreate) AddAlbumIDs(ids ...uint64) *ArtistsCreate
- func (ac *ArtistsCreate) AddAlbums(a ...*Albums) *ArtistsCreate
- func (ac *ArtistsCreate) AddMusicIDs(ids ...uint64) *ArtistsCreate
- func (ac *ArtistsCreate) AddMusics(m ...*Musics) *ArtistsCreate
- func (ac *ArtistsCreate) Exec(ctx context.Context) error
- func (ac *ArtistsCreate) ExecX(ctx context.Context)
- func (ac *ArtistsCreate) Mutation() *ArtistsMutation
- func (ac *ArtistsCreate) Save(ctx context.Context) (*Artists, error)
- func (ac *ArtistsCreate) SaveX(ctx context.Context) *Artists
- func (ac *ArtistsCreate) SetID(u uint64) *ArtistsCreate
- func (ac *ArtistsCreate) SetName(s string) *ArtistsCreate
- type ArtistsCreateBulk
- type ArtistsDelete
- type ArtistsDeleteOne
- type ArtistsEdges
- type ArtistsGroupBy
- func (agb *ArtistsGroupBy) Aggregate(fns ...AggregateFunc) *ArtistsGroupBy
- func (s *ArtistsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ArtistsGroupBy) BoolX(ctx context.Context) bool
- func (s *ArtistsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ArtistsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ArtistsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ArtistsGroupBy) Float64X(ctx context.Context) float64
- func (s *ArtistsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ArtistsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ArtistsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ArtistsGroupBy) IntX(ctx context.Context) int
- func (s *ArtistsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ArtistsGroupBy) IntsX(ctx context.Context) []int
- func (agb *ArtistsGroupBy) Scan(ctx context.Context, v any) error
- func (s *ArtistsGroupBy) ScanX(ctx context.Context, v any)
- func (s *ArtistsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ArtistsGroupBy) StringX(ctx context.Context) string
- func (s *ArtistsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ArtistsGroupBy) StringsX(ctx context.Context) []string
- type ArtistsMutation
- func (m *ArtistsMutation) AddAlbumIDs(ids ...uint64)
- func (m *ArtistsMutation) AddField(name string, value ent.Value) error
- func (m *ArtistsMutation) AddMusicIDs(ids ...uint64)
- func (m *ArtistsMutation) AddedEdges() []string
- func (m *ArtistsMutation) AddedField(name string) (ent.Value, bool)
- func (m *ArtistsMutation) AddedFields() []string
- func (m *ArtistsMutation) AddedIDs(name string) []ent.Value
- func (m *ArtistsMutation) AlbumsCleared() bool
- func (m *ArtistsMutation) AlbumsIDs() (ids []uint64)
- func (m *ArtistsMutation) ClearAlbums()
- func (m *ArtistsMutation) ClearEdge(name string) error
- func (m *ArtistsMutation) ClearField(name string) error
- func (m *ArtistsMutation) ClearMusics()
- func (m *ArtistsMutation) ClearedEdges() []string
- func (m *ArtistsMutation) ClearedFields() []string
- func (m ArtistsMutation) Client() *Client
- func (m *ArtistsMutation) EdgeCleared(name string) bool
- func (m *ArtistsMutation) Field(name string) (ent.Value, bool)
- func (m *ArtistsMutation) FieldCleared(name string) bool
- func (m *ArtistsMutation) Fields() []string
- func (m *ArtistsMutation) ID() (id uint64, exists bool)
- func (m *ArtistsMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *ArtistsMutation) MusicsCleared() bool
- func (m *ArtistsMutation) MusicsIDs() (ids []uint64)
- func (m *ArtistsMutation) Name() (r string, exists bool)
- func (m *ArtistsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ArtistsMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ArtistsMutation) Op() Op
- func (m *ArtistsMutation) RemoveAlbumIDs(ids ...uint64)
- func (m *ArtistsMutation) RemoveMusicIDs(ids ...uint64)
- func (m *ArtistsMutation) RemovedAlbumsIDs() (ids []uint64)
- func (m *ArtistsMutation) RemovedEdges() []string
- func (m *ArtistsMutation) RemovedIDs(name string) []ent.Value
- func (m *ArtistsMutation) RemovedMusicsIDs() (ids []uint64)
- func (m *ArtistsMutation) ResetAlbums()
- func (m *ArtistsMutation) ResetEdge(name string) error
- func (m *ArtistsMutation) ResetField(name string) error
- func (m *ArtistsMutation) ResetMusics()
- func (m *ArtistsMutation) ResetName()
- func (m *ArtistsMutation) SetField(name string, value ent.Value) error
- func (m *ArtistsMutation) SetID(id uint64)
- func (m *ArtistsMutation) SetName(s string)
- func (m *ArtistsMutation) SetOp(op Op)
- func (m ArtistsMutation) Tx() (*Tx, error)
- func (m *ArtistsMutation) Type() string
- func (m *ArtistsMutation) Where(ps ...predicate.Artists)
- func (m *ArtistsMutation) WhereP(ps ...func(*sql.Selector))
- type ArtistsQuery
- func (aq *ArtistsQuery) Aggregate(fns ...AggregateFunc) *ArtistsSelect
- func (aq *ArtistsQuery) All(ctx context.Context) ([]*Artists, error)
- func (aq *ArtistsQuery) AllX(ctx context.Context) []*Artists
- func (aq *ArtistsQuery) Clone() *ArtistsQuery
- func (aq *ArtistsQuery) Count(ctx context.Context) (int, error)
- func (aq *ArtistsQuery) CountX(ctx context.Context) int
- func (aq *ArtistsQuery) Exist(ctx context.Context) (bool, error)
- func (aq *ArtistsQuery) ExistX(ctx context.Context) bool
- func (aq *ArtistsQuery) First(ctx context.Context) (*Artists, error)
- func (aq *ArtistsQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (aq *ArtistsQuery) FirstIDX(ctx context.Context) uint64
- func (aq *ArtistsQuery) FirstX(ctx context.Context) *Artists
- func (aq *ArtistsQuery) GroupBy(field string, fields ...string) *ArtistsGroupBy
- func (aq *ArtistsQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (aq *ArtistsQuery) IDsX(ctx context.Context) []uint64
- func (aq *ArtistsQuery) Limit(limit int) *ArtistsQuery
- func (aq *ArtistsQuery) Offset(offset int) *ArtistsQuery
- func (aq *ArtistsQuery) Only(ctx context.Context) (*Artists, error)
- func (aq *ArtistsQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (aq *ArtistsQuery) OnlyIDX(ctx context.Context) uint64
- func (aq *ArtistsQuery) OnlyX(ctx context.Context) *Artists
- func (aq *ArtistsQuery) Order(o ...artists.OrderOption) *ArtistsQuery
- func (aq *ArtistsQuery) QueryAlbums() *AlbumsQuery
- func (aq *ArtistsQuery) QueryMusics() *MusicsQuery
- func (aq *ArtistsQuery) Select(fields ...string) *ArtistsSelect
- func (aq *ArtistsQuery) Unique(unique bool) *ArtistsQuery
- func (aq *ArtistsQuery) Where(ps ...predicate.Artists) *ArtistsQuery
- func (aq *ArtistsQuery) WithAlbums(opts ...func(*AlbumsQuery)) *ArtistsQuery
- func (aq *ArtistsQuery) WithMusics(opts ...func(*MusicsQuery)) *ArtistsQuery
- type ArtistsSelect
- func (as *ArtistsSelect) Aggregate(fns ...AggregateFunc) *ArtistsSelect
- func (s *ArtistsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ArtistsSelect) BoolX(ctx context.Context) bool
- func (s *ArtistsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ArtistsSelect) BoolsX(ctx context.Context) []bool
- func (s *ArtistsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ArtistsSelect) Float64X(ctx context.Context) float64
- func (s *ArtistsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ArtistsSelect) Float64sX(ctx context.Context) []float64
- func (s *ArtistsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ArtistsSelect) IntX(ctx context.Context) int
- func (s *ArtistsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ArtistsSelect) IntsX(ctx context.Context) []int
- func (as *ArtistsSelect) Scan(ctx context.Context, v any) error
- func (s *ArtistsSelect) ScanX(ctx context.Context, v any)
- func (s *ArtistsSelect) String(ctx context.Context) (_ string, err error)
- func (s *ArtistsSelect) StringX(ctx context.Context) string
- func (s *ArtistsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ArtistsSelect) StringsX(ctx context.Context) []string
- type ArtistsSlice
- type ArtistsUpdate
- func (au *ArtistsUpdate) AddAlbumIDs(ids ...uint64) *ArtistsUpdate
- func (au *ArtistsUpdate) AddAlbums(a ...*Albums) *ArtistsUpdate
- func (au *ArtistsUpdate) AddMusicIDs(ids ...uint64) *ArtistsUpdate
- func (au *ArtistsUpdate) AddMusics(m ...*Musics) *ArtistsUpdate
- func (au *ArtistsUpdate) ClearAlbums() *ArtistsUpdate
- func (au *ArtistsUpdate) ClearMusics() *ArtistsUpdate
- func (au *ArtistsUpdate) Exec(ctx context.Context) error
- func (au *ArtistsUpdate) ExecX(ctx context.Context)
- func (au *ArtistsUpdate) Mutation() *ArtistsMutation
- func (au *ArtistsUpdate) RemoveAlbumIDs(ids ...uint64) *ArtistsUpdate
- func (au *ArtistsUpdate) RemoveAlbums(a ...*Albums) *ArtistsUpdate
- func (au *ArtistsUpdate) RemoveMusicIDs(ids ...uint64) *ArtistsUpdate
- func (au *ArtistsUpdate) RemoveMusics(m ...*Musics) *ArtistsUpdate
- func (au *ArtistsUpdate) Save(ctx context.Context) (int, error)
- func (au *ArtistsUpdate) SaveX(ctx context.Context) int
- func (au *ArtistsUpdate) SetName(s string) *ArtistsUpdate
- func (au *ArtistsUpdate) SetNillableName(s *string) *ArtistsUpdate
- func (au *ArtistsUpdate) Where(ps ...predicate.Artists) *ArtistsUpdate
- type ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) AddAlbumIDs(ids ...uint64) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) AddAlbums(a ...*Albums) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) AddMusicIDs(ids ...uint64) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) AddMusics(m ...*Musics) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) ClearAlbums() *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) ClearMusics() *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) Exec(ctx context.Context) error
- func (auo *ArtistsUpdateOne) ExecX(ctx context.Context)
- func (auo *ArtistsUpdateOne) Mutation() *ArtistsMutation
- func (auo *ArtistsUpdateOne) RemoveAlbumIDs(ids ...uint64) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) RemoveAlbums(a ...*Albums) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) RemoveMusicIDs(ids ...uint64) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) RemoveMusics(m ...*Musics) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) Save(ctx context.Context) (*Artists, error)
- func (auo *ArtistsUpdateOne) SaveX(ctx context.Context) *Artists
- func (auo *ArtistsUpdateOne) Select(field string, fields ...string) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) SetName(s string) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) SetNillableName(s *string) *ArtistsUpdateOne
- func (auo *ArtistsUpdateOne) Where(ps ...predicate.Artists) *ArtistsUpdateOne
- type Audiobooks
- type AudiobooksClient
- func (c *AudiobooksClient) Create() *AudiobooksCreate
- func (c *AudiobooksClient) CreateBulk(builders ...*AudiobooksCreate) *AudiobooksCreateBulk
- func (c *AudiobooksClient) Delete() *AudiobooksDelete
- func (c *AudiobooksClient) DeleteOne(a *Audiobooks) *AudiobooksDeleteOne
- func (c *AudiobooksClient) DeleteOneID(id int) *AudiobooksDeleteOne
- func (c *AudiobooksClient) Get(ctx context.Context, id int) (*Audiobooks, error)
- func (c *AudiobooksClient) GetX(ctx context.Context, id int) *Audiobooks
- func (c *AudiobooksClient) Hooks() []Hook
- func (c *AudiobooksClient) Intercept(interceptors ...Interceptor)
- func (c *AudiobooksClient) Interceptors() []Interceptor
- func (c *AudiobooksClient) MapCreateBulk(slice any, setFunc func(*AudiobooksCreate, int)) *AudiobooksCreateBulk
- func (c *AudiobooksClient) Query() *AudiobooksQuery
- func (c *AudiobooksClient) Update() *AudiobooksUpdate
- func (c *AudiobooksClient) UpdateOne(a *Audiobooks) *AudiobooksUpdateOne
- func (c *AudiobooksClient) UpdateOneID(id int) *AudiobooksUpdateOne
- func (c *AudiobooksClient) Use(hooks ...Hook)
- type AudiobooksCreate
- func (ac *AudiobooksCreate) Exec(ctx context.Context) error
- func (ac *AudiobooksCreate) ExecX(ctx context.Context)
- func (ac *AudiobooksCreate) Mutation() *AudiobooksMutation
- func (ac *AudiobooksCreate) Save(ctx context.Context) (*Audiobooks, error)
- func (ac *AudiobooksCreate) SaveX(ctx context.Context) *Audiobooks
- type AudiobooksCreateBulk
- type AudiobooksDelete
- type AudiobooksDeleteOne
- type AudiobooksGroupBy
- func (agb *AudiobooksGroupBy) Aggregate(fns ...AggregateFunc) *AudiobooksGroupBy
- func (s *AudiobooksGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AudiobooksGroupBy) BoolX(ctx context.Context) bool
- func (s *AudiobooksGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AudiobooksGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AudiobooksGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AudiobooksGroupBy) Float64X(ctx context.Context) float64
- func (s *AudiobooksGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AudiobooksGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AudiobooksGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AudiobooksGroupBy) IntX(ctx context.Context) int
- func (s *AudiobooksGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AudiobooksGroupBy) IntsX(ctx context.Context) []int
- func (agb *AudiobooksGroupBy) Scan(ctx context.Context, v any) error
- func (s *AudiobooksGroupBy) ScanX(ctx context.Context, v any)
- func (s *AudiobooksGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AudiobooksGroupBy) StringX(ctx context.Context) string
- func (s *AudiobooksGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AudiobooksGroupBy) StringsX(ctx context.Context) []string
- type AudiobooksMutation
- func (m *AudiobooksMutation) AddField(name string, value ent.Value) error
- func (m *AudiobooksMutation) AddedEdges() []string
- func (m *AudiobooksMutation) AddedField(name string) (ent.Value, bool)
- func (m *AudiobooksMutation) AddedFields() []string
- func (m *AudiobooksMutation) AddedIDs(name string) []ent.Value
- func (m *AudiobooksMutation) ClearEdge(name string) error
- func (m *AudiobooksMutation) ClearField(name string) error
- func (m *AudiobooksMutation) ClearedEdges() []string
- func (m *AudiobooksMutation) ClearedFields() []string
- func (m AudiobooksMutation) Client() *Client
- func (m *AudiobooksMutation) EdgeCleared(name string) bool
- func (m *AudiobooksMutation) Field(name string) (ent.Value, bool)
- func (m *AudiobooksMutation) FieldCleared(name string) bool
- func (m *AudiobooksMutation) Fields() []string
- func (m *AudiobooksMutation) ID() (id int, exists bool)
- func (m *AudiobooksMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AudiobooksMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AudiobooksMutation) Op() Op
- func (m *AudiobooksMutation) RemovedEdges() []string
- func (m *AudiobooksMutation) RemovedIDs(name string) []ent.Value
- func (m *AudiobooksMutation) ResetEdge(name string) error
- func (m *AudiobooksMutation) ResetField(name string) error
- func (m *AudiobooksMutation) SetField(name string, value ent.Value) error
- func (m *AudiobooksMutation) SetOp(op Op)
- func (m AudiobooksMutation) Tx() (*Tx, error)
- func (m *AudiobooksMutation) Type() string
- func (m *AudiobooksMutation) Where(ps ...predicate.Audiobooks)
- func (m *AudiobooksMutation) WhereP(ps ...func(*sql.Selector))
- type AudiobooksQuery
- func (aq *AudiobooksQuery) Aggregate(fns ...AggregateFunc) *AudiobooksSelect
- func (aq *AudiobooksQuery) All(ctx context.Context) ([]*Audiobooks, error)
- func (aq *AudiobooksQuery) AllX(ctx context.Context) []*Audiobooks
- func (aq *AudiobooksQuery) Clone() *AudiobooksQuery
- func (aq *AudiobooksQuery) Count(ctx context.Context) (int, error)
- func (aq *AudiobooksQuery) CountX(ctx context.Context) int
- func (aq *AudiobooksQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AudiobooksQuery) ExistX(ctx context.Context) bool
- func (aq *AudiobooksQuery) First(ctx context.Context) (*Audiobooks, error)
- func (aq *AudiobooksQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AudiobooksQuery) FirstIDX(ctx context.Context) int
- func (aq *AudiobooksQuery) FirstX(ctx context.Context) *Audiobooks
- func (aq *AudiobooksQuery) GroupBy(field string, fields ...string) *AudiobooksGroupBy
- func (aq *AudiobooksQuery) IDs(ctx context.Context) (ids []int, err error)
- func (aq *AudiobooksQuery) IDsX(ctx context.Context) []int
- func (aq *AudiobooksQuery) Limit(limit int) *AudiobooksQuery
- func (aq *AudiobooksQuery) Offset(offset int) *AudiobooksQuery
- func (aq *AudiobooksQuery) Only(ctx context.Context) (*Audiobooks, error)
- func (aq *AudiobooksQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AudiobooksQuery) OnlyIDX(ctx context.Context) int
- func (aq *AudiobooksQuery) OnlyX(ctx context.Context) *Audiobooks
- func (aq *AudiobooksQuery) Order(o ...audiobooks.OrderOption) *AudiobooksQuery
- func (aq *AudiobooksQuery) Select(fields ...string) *AudiobooksSelect
- func (aq *AudiobooksQuery) Unique(unique bool) *AudiobooksQuery
- func (aq *AudiobooksQuery) Where(ps ...predicate.Audiobooks) *AudiobooksQuery
- type AudiobooksSelect
- func (as *AudiobooksSelect) Aggregate(fns ...AggregateFunc) *AudiobooksSelect
- func (s *AudiobooksSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AudiobooksSelect) BoolX(ctx context.Context) bool
- func (s *AudiobooksSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AudiobooksSelect) BoolsX(ctx context.Context) []bool
- func (s *AudiobooksSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AudiobooksSelect) Float64X(ctx context.Context) float64
- func (s *AudiobooksSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AudiobooksSelect) Float64sX(ctx context.Context) []float64
- func (s *AudiobooksSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AudiobooksSelect) IntX(ctx context.Context) int
- func (s *AudiobooksSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AudiobooksSelect) IntsX(ctx context.Context) []int
- func (as *AudiobooksSelect) Scan(ctx context.Context, v any) error
- func (s *AudiobooksSelect) ScanX(ctx context.Context, v any)
- func (s *AudiobooksSelect) String(ctx context.Context) (_ string, err error)
- func (s *AudiobooksSelect) StringX(ctx context.Context) string
- func (s *AudiobooksSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AudiobooksSelect) StringsX(ctx context.Context) []string
- type AudiobooksSlice
- type AudiobooksUpdate
- func (au *AudiobooksUpdate) Exec(ctx context.Context) error
- func (au *AudiobooksUpdate) ExecX(ctx context.Context)
- func (au *AudiobooksUpdate) Mutation() *AudiobooksMutation
- func (au *AudiobooksUpdate) Save(ctx context.Context) (int, error)
- func (au *AudiobooksUpdate) SaveX(ctx context.Context) int
- func (au *AudiobooksUpdate) Where(ps ...predicate.Audiobooks) *AudiobooksUpdate
- type AudiobooksUpdateOne
- func (auo *AudiobooksUpdateOne) Exec(ctx context.Context) error
- func (auo *AudiobooksUpdateOne) ExecX(ctx context.Context)
- func (auo *AudiobooksUpdateOne) Mutation() *AudiobooksMutation
- func (auo *AudiobooksUpdateOne) Save(ctx context.Context) (*Audiobooks, error)
- func (auo *AudiobooksUpdateOne) SaveX(ctx context.Context) *Audiobooks
- func (auo *AudiobooksUpdateOne) Select(field string, fields ...string) *AudiobooksUpdateOne
- func (auo *AudiobooksUpdateOne) Where(ps ...predicate.Audiobooks) *AudiobooksUpdateOne
- type Categorys
- type CategorysClient
- func (c *CategorysClient) Create() *CategorysCreate
- func (c *CategorysClient) CreateBulk(builders ...*CategorysCreate) *CategorysCreateBulk
- func (c *CategorysClient) Delete() *CategorysDelete
- func (c *CategorysClient) DeleteOne(ca *Categorys) *CategorysDeleteOne
- func (c *CategorysClient) DeleteOneID(id int) *CategorysDeleteOne
- func (c *CategorysClient) Get(ctx context.Context, id int) (*Categorys, error)
- func (c *CategorysClient) GetX(ctx context.Context, id int) *Categorys
- func (c *CategorysClient) Hooks() []Hook
- func (c *CategorysClient) Intercept(interceptors ...Interceptor)
- func (c *CategorysClient) Interceptors() []Interceptor
- func (c *CategorysClient) MapCreateBulk(slice any, setFunc func(*CategorysCreate, int)) *CategorysCreateBulk
- func (c *CategorysClient) Query() *CategorysQuery
- func (c *CategorysClient) Update() *CategorysUpdate
- func (c *CategorysClient) UpdateOne(ca *Categorys) *CategorysUpdateOne
- func (c *CategorysClient) UpdateOneID(id int) *CategorysUpdateOne
- func (c *CategorysClient) Use(hooks ...Hook)
- type CategorysCreate
- func (cc *CategorysCreate) Exec(ctx context.Context) error
- func (cc *CategorysCreate) ExecX(ctx context.Context)
- func (cc *CategorysCreate) Mutation() *CategorysMutation
- func (cc *CategorysCreate) Save(ctx context.Context) (*Categorys, error)
- func (cc *CategorysCreate) SaveX(ctx context.Context) *Categorys
- type CategorysCreateBulk
- type CategorysDelete
- type CategorysDeleteOne
- type CategorysGroupBy
- func (cgb *CategorysGroupBy) Aggregate(fns ...AggregateFunc) *CategorysGroupBy
- func (s *CategorysGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CategorysGroupBy) BoolX(ctx context.Context) bool
- func (s *CategorysGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CategorysGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CategorysGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CategorysGroupBy) Float64X(ctx context.Context) float64
- func (s *CategorysGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CategorysGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CategorysGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CategorysGroupBy) IntX(ctx context.Context) int
- func (s *CategorysGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CategorysGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CategorysGroupBy) Scan(ctx context.Context, v any) error
- func (s *CategorysGroupBy) ScanX(ctx context.Context, v any)
- func (s *CategorysGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CategorysGroupBy) StringX(ctx context.Context) string
- func (s *CategorysGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CategorysGroupBy) StringsX(ctx context.Context) []string
- type CategorysMutation
- func (m *CategorysMutation) AddField(name string, value ent.Value) error
- func (m *CategorysMutation) AddedEdges() []string
- func (m *CategorysMutation) AddedField(name string) (ent.Value, bool)
- func (m *CategorysMutation) AddedFields() []string
- func (m *CategorysMutation) AddedIDs(name string) []ent.Value
- func (m *CategorysMutation) ClearEdge(name string) error
- func (m *CategorysMutation) ClearField(name string) error
- func (m *CategorysMutation) ClearedEdges() []string
- func (m *CategorysMutation) ClearedFields() []string
- func (m CategorysMutation) Client() *Client
- func (m *CategorysMutation) EdgeCleared(name string) bool
- func (m *CategorysMutation) Field(name string) (ent.Value, bool)
- func (m *CategorysMutation) FieldCleared(name string) bool
- func (m *CategorysMutation) Fields() []string
- func (m *CategorysMutation) ID() (id int, exists bool)
- func (m *CategorysMutation) IDs(ctx context.Context) ([]int, error)
- func (m *CategorysMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CategorysMutation) Op() Op
- func (m *CategorysMutation) RemovedEdges() []string
- func (m *CategorysMutation) RemovedIDs(name string) []ent.Value
- func (m *CategorysMutation) ResetEdge(name string) error
- func (m *CategorysMutation) ResetField(name string) error
- func (m *CategorysMutation) SetField(name string, value ent.Value) error
- func (m *CategorysMutation) SetOp(op Op)
- func (m CategorysMutation) Tx() (*Tx, error)
- func (m *CategorysMutation) Type() string
- func (m *CategorysMutation) Where(ps ...predicate.Categorys)
- func (m *CategorysMutation) WhereP(ps ...func(*sql.Selector))
- type CategorysQuery
- func (cq *CategorysQuery) Aggregate(fns ...AggregateFunc) *CategorysSelect
- func (cq *CategorysQuery) All(ctx context.Context) ([]*Categorys, error)
- func (cq *CategorysQuery) AllX(ctx context.Context) []*Categorys
- func (cq *CategorysQuery) Clone() *CategorysQuery
- func (cq *CategorysQuery) Count(ctx context.Context) (int, error)
- func (cq *CategorysQuery) CountX(ctx context.Context) int
- func (cq *CategorysQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CategorysQuery) ExistX(ctx context.Context) bool
- func (cq *CategorysQuery) First(ctx context.Context) (*Categorys, error)
- func (cq *CategorysQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *CategorysQuery) FirstIDX(ctx context.Context) int
- func (cq *CategorysQuery) FirstX(ctx context.Context) *Categorys
- func (cq *CategorysQuery) GroupBy(field string, fields ...string) *CategorysGroupBy
- func (cq *CategorysQuery) IDs(ctx context.Context) (ids []int, err error)
- func (cq *CategorysQuery) IDsX(ctx context.Context) []int
- func (cq *CategorysQuery) Limit(limit int) *CategorysQuery
- func (cq *CategorysQuery) Offset(offset int) *CategorysQuery
- func (cq *CategorysQuery) Only(ctx context.Context) (*Categorys, error)
- func (cq *CategorysQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *CategorysQuery) OnlyIDX(ctx context.Context) int
- func (cq *CategorysQuery) OnlyX(ctx context.Context) *Categorys
- func (cq *CategorysQuery) Order(o ...categorys.OrderOption) *CategorysQuery
- func (cq *CategorysQuery) Select(fields ...string) *CategorysSelect
- func (cq *CategorysQuery) Unique(unique bool) *CategorysQuery
- func (cq *CategorysQuery) Where(ps ...predicate.Categorys) *CategorysQuery
- type CategorysSelect
- func (cs *CategorysSelect) Aggregate(fns ...AggregateFunc) *CategorysSelect
- func (s *CategorysSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CategorysSelect) BoolX(ctx context.Context) bool
- func (s *CategorysSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CategorysSelect) BoolsX(ctx context.Context) []bool
- func (s *CategorysSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CategorysSelect) Float64X(ctx context.Context) float64
- func (s *CategorysSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CategorysSelect) Float64sX(ctx context.Context) []float64
- func (s *CategorysSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CategorysSelect) IntX(ctx context.Context) int
- func (s *CategorysSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CategorysSelect) IntsX(ctx context.Context) []int
- func (cs *CategorysSelect) Scan(ctx context.Context, v any) error
- func (s *CategorysSelect) ScanX(ctx context.Context, v any)
- func (s *CategorysSelect) String(ctx context.Context) (_ string, err error)
- func (s *CategorysSelect) StringX(ctx context.Context) string
- func (s *CategorysSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CategorysSelect) StringsX(ctx context.Context) []string
- type CategorysSlice
- type CategorysUpdate
- func (cu *CategorysUpdate) Exec(ctx context.Context) error
- func (cu *CategorysUpdate) ExecX(ctx context.Context)
- func (cu *CategorysUpdate) Mutation() *CategorysMutation
- func (cu *CategorysUpdate) Save(ctx context.Context) (int, error)
- func (cu *CategorysUpdate) SaveX(ctx context.Context) int
- func (cu *CategorysUpdate) Where(ps ...predicate.Categorys) *CategorysUpdate
- type CategorysUpdateOne
- func (cuo *CategorysUpdateOne) Exec(ctx context.Context) error
- func (cuo *CategorysUpdateOne) ExecX(ctx context.Context)
- func (cuo *CategorysUpdateOne) Mutation() *CategorysMutation
- func (cuo *CategorysUpdateOne) Save(ctx context.Context) (*Categorys, error)
- func (cuo *CategorysUpdateOne) SaveX(ctx context.Context) *Categorys
- func (cuo *CategorysUpdateOne) Select(field string, fields ...string) *CategorysUpdateOne
- func (cuo *CategorysUpdateOne) Where(ps ...predicate.Categorys) *CategorysUpdateOne
- 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 Devices
- type DevicesClient
- func (c *DevicesClient) Create() *DevicesCreate
- func (c *DevicesClient) CreateBulk(builders ...*DevicesCreate) *DevicesCreateBulk
- func (c *DevicesClient) Delete() *DevicesDelete
- func (c *DevicesClient) DeleteOne(d *Devices) *DevicesDeleteOne
- func (c *DevicesClient) DeleteOneID(id uint64) *DevicesDeleteOne
- func (c *DevicesClient) Get(ctx context.Context, id uint64) (*Devices, error)
- func (c *DevicesClient) GetX(ctx context.Context, id uint64) *Devices
- func (c *DevicesClient) Hooks() []Hook
- func (c *DevicesClient) Intercept(interceptors ...Interceptor)
- func (c *DevicesClient) Interceptors() []Interceptor
- func (c *DevicesClient) MapCreateBulk(slice any, setFunc func(*DevicesCreate, int)) *DevicesCreateBulk
- func (c *DevicesClient) Query() *DevicesQuery
- func (c *DevicesClient) QueryUser(d *Devices) *UsersQuery
- func (c *DevicesClient) Update() *DevicesUpdate
- func (c *DevicesClient) UpdateOne(d *Devices) *DevicesUpdateOne
- func (c *DevicesClient) UpdateOneID(id uint64) *DevicesUpdateOne
- func (c *DevicesClient) Use(hooks ...Hook)
- type DevicesCreate
- func (dc *DevicesCreate) Exec(ctx context.Context) error
- func (dc *DevicesCreate) ExecX(ctx context.Context)
- func (dc *DevicesCreate) Mutation() *DevicesMutation
- func (dc *DevicesCreate) Save(ctx context.Context) (*Devices, error)
- func (dc *DevicesCreate) SaveX(ctx context.Context) *Devices
- func (dc *DevicesCreate) SetCreateTime(t time.Time) *DevicesCreate
- func (dc *DevicesCreate) SetDevice(s string) *DevicesCreate
- func (dc *DevicesCreate) SetID(u uint64) *DevicesCreate
- func (dc *DevicesCreate) SetIP(s string) *DevicesCreate
- func (dc *DevicesCreate) SetNillableCreateTime(t *time.Time) *DevicesCreate
- func (dc *DevicesCreate) SetNillableUpdateTime(t *time.Time) *DevicesCreate
- func (dc *DevicesCreate) SetNillableUserID(id *uint64) *DevicesCreate
- func (dc *DevicesCreate) SetUpdateTime(t time.Time) *DevicesCreate
- func (dc *DevicesCreate) SetUser(u *Users) *DevicesCreate
- func (dc *DevicesCreate) SetUserID(id uint64) *DevicesCreate
- type DevicesCreateBulk
- type DevicesDelete
- type DevicesDeleteOne
- type DevicesEdges
- type DevicesGroupBy
- func (dgb *DevicesGroupBy) Aggregate(fns ...AggregateFunc) *DevicesGroupBy
- func (s *DevicesGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DevicesGroupBy) BoolX(ctx context.Context) bool
- func (s *DevicesGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DevicesGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DevicesGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DevicesGroupBy) Float64X(ctx context.Context) float64
- func (s *DevicesGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DevicesGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DevicesGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DevicesGroupBy) IntX(ctx context.Context) int
- func (s *DevicesGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DevicesGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DevicesGroupBy) Scan(ctx context.Context, v any) error
- func (s *DevicesGroupBy) ScanX(ctx context.Context, v any)
- func (s *DevicesGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DevicesGroupBy) StringX(ctx context.Context) string
- func (s *DevicesGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DevicesGroupBy) StringsX(ctx context.Context) []string
- type DevicesMutation
- func (m *DevicesMutation) AddField(name string, value ent.Value) error
- func (m *DevicesMutation) AddedEdges() []string
- func (m *DevicesMutation) AddedField(name string) (ent.Value, bool)
- func (m *DevicesMutation) AddedFields() []string
- func (m *DevicesMutation) AddedIDs(name string) []ent.Value
- func (m *DevicesMutation) ClearEdge(name string) error
- func (m *DevicesMutation) ClearField(name string) error
- func (m *DevicesMutation) ClearUser()
- func (m *DevicesMutation) ClearedEdges() []string
- func (m *DevicesMutation) ClearedFields() []string
- func (m DevicesMutation) Client() *Client
- func (m *DevicesMutation) CreateTime() (r time.Time, exists bool)
- func (m *DevicesMutation) Device() (r string, exists bool)
- func (m *DevicesMutation) EdgeCleared(name string) bool
- func (m *DevicesMutation) Field(name string) (ent.Value, bool)
- func (m *DevicesMutation) FieldCleared(name string) bool
- func (m *DevicesMutation) Fields() []string
- func (m *DevicesMutation) ID() (id uint64, exists bool)
- func (m *DevicesMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *DevicesMutation) IP() (r string, exists bool)
- func (m *DevicesMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *DevicesMutation) OldDevice(ctx context.Context) (v string, err error)
- func (m *DevicesMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DevicesMutation) OldIP(ctx context.Context) (v string, err error)
- func (m *DevicesMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *DevicesMutation) Op() Op
- func (m *DevicesMutation) RemovedEdges() []string
- func (m *DevicesMutation) RemovedIDs(name string) []ent.Value
- func (m *DevicesMutation) ResetCreateTime()
- func (m *DevicesMutation) ResetDevice()
- func (m *DevicesMutation) ResetEdge(name string) error
- func (m *DevicesMutation) ResetField(name string) error
- func (m *DevicesMutation) ResetIP()
- func (m *DevicesMutation) ResetUpdateTime()
- func (m *DevicesMutation) ResetUser()
- func (m *DevicesMutation) SetCreateTime(t time.Time)
- func (m *DevicesMutation) SetDevice(s string)
- func (m *DevicesMutation) SetField(name string, value ent.Value) error
- func (m *DevicesMutation) SetID(id uint64)
- func (m *DevicesMutation) SetIP(s string)
- func (m *DevicesMutation) SetOp(op Op)
- func (m *DevicesMutation) SetUpdateTime(t time.Time)
- func (m *DevicesMutation) SetUserID(id uint64)
- func (m DevicesMutation) Tx() (*Tx, error)
- func (m *DevicesMutation) Type() string
- func (m *DevicesMutation) UpdateTime() (r time.Time, exists bool)
- func (m *DevicesMutation) UserCleared() bool
- func (m *DevicesMutation) UserID() (id uint64, exists bool)
- func (m *DevicesMutation) UserIDs() (ids []uint64)
- func (m *DevicesMutation) Where(ps ...predicate.Devices)
- func (m *DevicesMutation) WhereP(ps ...func(*sql.Selector))
- type DevicesQuery
- func (dq *DevicesQuery) Aggregate(fns ...AggregateFunc) *DevicesSelect
- func (dq *DevicesQuery) All(ctx context.Context) ([]*Devices, error)
- func (dq *DevicesQuery) AllX(ctx context.Context) []*Devices
- func (dq *DevicesQuery) Clone() *DevicesQuery
- func (dq *DevicesQuery) Count(ctx context.Context) (int, error)
- func (dq *DevicesQuery) CountX(ctx context.Context) int
- func (dq *DevicesQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DevicesQuery) ExistX(ctx context.Context) bool
- func (dq *DevicesQuery) First(ctx context.Context) (*Devices, error)
- func (dq *DevicesQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (dq *DevicesQuery) FirstIDX(ctx context.Context) uint64
- func (dq *DevicesQuery) FirstX(ctx context.Context) *Devices
- func (dq *DevicesQuery) GroupBy(field string, fields ...string) *DevicesGroupBy
- func (dq *DevicesQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (dq *DevicesQuery) IDsX(ctx context.Context) []uint64
- func (dq *DevicesQuery) Limit(limit int) *DevicesQuery
- func (dq *DevicesQuery) Offset(offset int) *DevicesQuery
- func (dq *DevicesQuery) Only(ctx context.Context) (*Devices, error)
- func (dq *DevicesQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (dq *DevicesQuery) OnlyIDX(ctx context.Context) uint64
- func (dq *DevicesQuery) OnlyX(ctx context.Context) *Devices
- func (dq *DevicesQuery) Order(o ...devices.OrderOption) *DevicesQuery
- func (dq *DevicesQuery) QueryUser() *UsersQuery
- func (dq *DevicesQuery) Select(fields ...string) *DevicesSelect
- func (dq *DevicesQuery) Unique(unique bool) *DevicesQuery
- func (dq *DevicesQuery) Where(ps ...predicate.Devices) *DevicesQuery
- func (dq *DevicesQuery) WithUser(opts ...func(*UsersQuery)) *DevicesQuery
- type DevicesSelect
- func (ds *DevicesSelect) Aggregate(fns ...AggregateFunc) *DevicesSelect
- func (s *DevicesSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DevicesSelect) BoolX(ctx context.Context) bool
- func (s *DevicesSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DevicesSelect) BoolsX(ctx context.Context) []bool
- func (s *DevicesSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DevicesSelect) Float64X(ctx context.Context) float64
- func (s *DevicesSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DevicesSelect) Float64sX(ctx context.Context) []float64
- func (s *DevicesSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DevicesSelect) IntX(ctx context.Context) int
- func (s *DevicesSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DevicesSelect) IntsX(ctx context.Context) []int
- func (ds *DevicesSelect) Scan(ctx context.Context, v any) error
- func (s *DevicesSelect) ScanX(ctx context.Context, v any)
- func (s *DevicesSelect) String(ctx context.Context) (_ string, err error)
- func (s *DevicesSelect) StringX(ctx context.Context) string
- func (s *DevicesSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DevicesSelect) StringsX(ctx context.Context) []string
- type DevicesSlice
- type DevicesUpdate
- func (du *DevicesUpdate) ClearUser() *DevicesUpdate
- func (du *DevicesUpdate) Exec(ctx context.Context) error
- func (du *DevicesUpdate) ExecX(ctx context.Context)
- func (du *DevicesUpdate) Mutation() *DevicesMutation
- func (du *DevicesUpdate) Save(ctx context.Context) (int, error)
- func (du *DevicesUpdate) SaveX(ctx context.Context) int
- func (du *DevicesUpdate) SetDevice(s string) *DevicesUpdate
- func (du *DevicesUpdate) SetIP(s string) *DevicesUpdate
- func (du *DevicesUpdate) SetNillableDevice(s *string) *DevicesUpdate
- func (du *DevicesUpdate) SetNillableIP(s *string) *DevicesUpdate
- func (du *DevicesUpdate) SetNillableUserID(id *uint64) *DevicesUpdate
- func (du *DevicesUpdate) SetUpdateTime(t time.Time) *DevicesUpdate
- func (du *DevicesUpdate) SetUser(u *Users) *DevicesUpdate
- func (du *DevicesUpdate) SetUserID(id uint64) *DevicesUpdate
- func (du *DevicesUpdate) Where(ps ...predicate.Devices) *DevicesUpdate
- type DevicesUpdateOne
- func (duo *DevicesUpdateOne) ClearUser() *DevicesUpdateOne
- func (duo *DevicesUpdateOne) Exec(ctx context.Context) error
- func (duo *DevicesUpdateOne) ExecX(ctx context.Context)
- func (duo *DevicesUpdateOne) Mutation() *DevicesMutation
- func (duo *DevicesUpdateOne) Save(ctx context.Context) (*Devices, error)
- func (duo *DevicesUpdateOne) SaveX(ctx context.Context) *Devices
- func (duo *DevicesUpdateOne) Select(field string, fields ...string) *DevicesUpdateOne
- func (duo *DevicesUpdateOne) SetDevice(s string) *DevicesUpdateOne
- func (duo *DevicesUpdateOne) SetIP(s string) *DevicesUpdateOne
- func (duo *DevicesUpdateOne) SetNillableDevice(s *string) *DevicesUpdateOne
- func (duo *DevicesUpdateOne) SetNillableIP(s *string) *DevicesUpdateOne
- func (duo *DevicesUpdateOne) SetNillableUserID(id *uint64) *DevicesUpdateOne
- func (duo *DevicesUpdateOne) SetUpdateTime(t time.Time) *DevicesUpdateOne
- func (duo *DevicesUpdateOne) SetUser(u *Users) *DevicesUpdateOne
- func (duo *DevicesUpdateOne) SetUserID(id uint64) *DevicesUpdateOne
- func (duo *DevicesUpdateOne) Where(ps ...predicate.Devices) *DevicesUpdateOne
- type Directors
- type DirectorsClient
- func (c *DirectorsClient) Create() *DirectorsCreate
- func (c *DirectorsClient) CreateBulk(builders ...*DirectorsCreate) *DirectorsCreateBulk
- func (c *DirectorsClient) Delete() *DirectorsDelete
- func (c *DirectorsClient) DeleteOne(d *Directors) *DirectorsDeleteOne
- func (c *DirectorsClient) DeleteOneID(id int) *DirectorsDeleteOne
- func (c *DirectorsClient) Get(ctx context.Context, id int) (*Directors, error)
- func (c *DirectorsClient) GetX(ctx context.Context, id int) *Directors
- func (c *DirectorsClient) Hooks() []Hook
- func (c *DirectorsClient) Intercept(interceptors ...Interceptor)
- func (c *DirectorsClient) Interceptors() []Interceptor
- func (c *DirectorsClient) MapCreateBulk(slice any, setFunc func(*DirectorsCreate, int)) *DirectorsCreateBulk
- func (c *DirectorsClient) Query() *DirectorsQuery
- func (c *DirectorsClient) Update() *DirectorsUpdate
- func (c *DirectorsClient) UpdateOne(d *Directors) *DirectorsUpdateOne
- func (c *DirectorsClient) UpdateOneID(id int) *DirectorsUpdateOne
- func (c *DirectorsClient) Use(hooks ...Hook)
- type DirectorsCreate
- func (dc *DirectorsCreate) Exec(ctx context.Context) error
- func (dc *DirectorsCreate) ExecX(ctx context.Context)
- func (dc *DirectorsCreate) Mutation() *DirectorsMutation
- func (dc *DirectorsCreate) Save(ctx context.Context) (*Directors, error)
- func (dc *DirectorsCreate) SaveX(ctx context.Context) *Directors
- type DirectorsCreateBulk
- type DirectorsDelete
- type DirectorsDeleteOne
- type DirectorsGroupBy
- func (dgb *DirectorsGroupBy) Aggregate(fns ...AggregateFunc) *DirectorsGroupBy
- func (s *DirectorsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DirectorsGroupBy) BoolX(ctx context.Context) bool
- func (s *DirectorsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DirectorsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DirectorsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DirectorsGroupBy) Float64X(ctx context.Context) float64
- func (s *DirectorsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DirectorsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DirectorsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DirectorsGroupBy) IntX(ctx context.Context) int
- func (s *DirectorsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DirectorsGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DirectorsGroupBy) Scan(ctx context.Context, v any) error
- func (s *DirectorsGroupBy) ScanX(ctx context.Context, v any)
- func (s *DirectorsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DirectorsGroupBy) StringX(ctx context.Context) string
- func (s *DirectorsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DirectorsGroupBy) StringsX(ctx context.Context) []string
- type DirectorsMutation
- func (m *DirectorsMutation) AddField(name string, value ent.Value) error
- func (m *DirectorsMutation) AddedEdges() []string
- func (m *DirectorsMutation) AddedField(name string) (ent.Value, bool)
- func (m *DirectorsMutation) AddedFields() []string
- func (m *DirectorsMutation) AddedIDs(name string) []ent.Value
- func (m *DirectorsMutation) ClearEdge(name string) error
- func (m *DirectorsMutation) ClearField(name string) error
- func (m *DirectorsMutation) ClearedEdges() []string
- func (m *DirectorsMutation) ClearedFields() []string
- func (m DirectorsMutation) Client() *Client
- func (m *DirectorsMutation) EdgeCleared(name string) bool
- func (m *DirectorsMutation) Field(name string) (ent.Value, bool)
- func (m *DirectorsMutation) FieldCleared(name string) bool
- func (m *DirectorsMutation) Fields() []string
- func (m *DirectorsMutation) ID() (id int, exists bool)
- func (m *DirectorsMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DirectorsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DirectorsMutation) Op() Op
- func (m *DirectorsMutation) RemovedEdges() []string
- func (m *DirectorsMutation) RemovedIDs(name string) []ent.Value
- func (m *DirectorsMutation) ResetEdge(name string) error
- func (m *DirectorsMutation) ResetField(name string) error
- func (m *DirectorsMutation) SetField(name string, value ent.Value) error
- func (m *DirectorsMutation) SetOp(op Op)
- func (m DirectorsMutation) Tx() (*Tx, error)
- func (m *DirectorsMutation) Type() string
- func (m *DirectorsMutation) Where(ps ...predicate.Directors)
- func (m *DirectorsMutation) WhereP(ps ...func(*sql.Selector))
- type DirectorsQuery
- func (dq *DirectorsQuery) Aggregate(fns ...AggregateFunc) *DirectorsSelect
- func (dq *DirectorsQuery) All(ctx context.Context) ([]*Directors, error)
- func (dq *DirectorsQuery) AllX(ctx context.Context) []*Directors
- func (dq *DirectorsQuery) Clone() *DirectorsQuery
- func (dq *DirectorsQuery) Count(ctx context.Context) (int, error)
- func (dq *DirectorsQuery) CountX(ctx context.Context) int
- func (dq *DirectorsQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DirectorsQuery) ExistX(ctx context.Context) bool
- func (dq *DirectorsQuery) First(ctx context.Context) (*Directors, error)
- func (dq *DirectorsQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DirectorsQuery) FirstIDX(ctx context.Context) int
- func (dq *DirectorsQuery) FirstX(ctx context.Context) *Directors
- func (dq *DirectorsQuery) GroupBy(field string, fields ...string) *DirectorsGroupBy
- func (dq *DirectorsQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dq *DirectorsQuery) IDsX(ctx context.Context) []int
- func (dq *DirectorsQuery) Limit(limit int) *DirectorsQuery
- func (dq *DirectorsQuery) Offset(offset int) *DirectorsQuery
- func (dq *DirectorsQuery) Only(ctx context.Context) (*Directors, error)
- func (dq *DirectorsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DirectorsQuery) OnlyIDX(ctx context.Context) int
- func (dq *DirectorsQuery) OnlyX(ctx context.Context) *Directors
- func (dq *DirectorsQuery) Order(o ...directors.OrderOption) *DirectorsQuery
- func (dq *DirectorsQuery) Select(fields ...string) *DirectorsSelect
- func (dq *DirectorsQuery) Unique(unique bool) *DirectorsQuery
- func (dq *DirectorsQuery) Where(ps ...predicate.Directors) *DirectorsQuery
- type DirectorsSelect
- func (ds *DirectorsSelect) Aggregate(fns ...AggregateFunc) *DirectorsSelect
- func (s *DirectorsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DirectorsSelect) BoolX(ctx context.Context) bool
- func (s *DirectorsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DirectorsSelect) BoolsX(ctx context.Context) []bool
- func (s *DirectorsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DirectorsSelect) Float64X(ctx context.Context) float64
- func (s *DirectorsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DirectorsSelect) Float64sX(ctx context.Context) []float64
- func (s *DirectorsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DirectorsSelect) IntX(ctx context.Context) int
- func (s *DirectorsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DirectorsSelect) IntsX(ctx context.Context) []int
- func (ds *DirectorsSelect) Scan(ctx context.Context, v any) error
- func (s *DirectorsSelect) ScanX(ctx context.Context, v any)
- func (s *DirectorsSelect) String(ctx context.Context) (_ string, err error)
- func (s *DirectorsSelect) StringX(ctx context.Context) string
- func (s *DirectorsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DirectorsSelect) StringsX(ctx context.Context) []string
- type DirectorsSlice
- type DirectorsUpdate
- func (du *DirectorsUpdate) Exec(ctx context.Context) error
- func (du *DirectorsUpdate) ExecX(ctx context.Context)
- func (du *DirectorsUpdate) Mutation() *DirectorsMutation
- func (du *DirectorsUpdate) Save(ctx context.Context) (int, error)
- func (du *DirectorsUpdate) SaveX(ctx context.Context) int
- func (du *DirectorsUpdate) Where(ps ...predicate.Directors) *DirectorsUpdate
- type DirectorsUpdateOne
- func (duo *DirectorsUpdateOne) Exec(ctx context.Context) error
- func (duo *DirectorsUpdateOne) ExecX(ctx context.Context)
- func (duo *DirectorsUpdateOne) Mutation() *DirectorsMutation
- func (duo *DirectorsUpdateOne) Save(ctx context.Context) (*Directors, error)
- func (duo *DirectorsUpdateOne) SaveX(ctx context.Context) *Directors
- func (duo *DirectorsUpdateOne) Select(field string, fields ...string) *DirectorsUpdateOne
- func (duo *DirectorsUpdateOne) Where(ps ...predicate.Directors) *DirectorsUpdateOne
- type Files
- type FilesClient
- func (c *FilesClient) Create() *FilesCreate
- func (c *FilesClient) CreateBulk(builders ...*FilesCreate) *FilesCreateBulk
- func (c *FilesClient) Delete() *FilesDelete
- func (c *FilesClient) DeleteOne(f *Files) *FilesDeleteOne
- func (c *FilesClient) DeleteOneID(id uint64) *FilesDeleteOne
- func (c *FilesClient) Get(ctx context.Context, id uint64) (*Files, error)
- func (c *FilesClient) GetX(ctx context.Context, id uint64) *Files
- func (c *FilesClient) Hooks() []Hook
- func (c *FilesClient) Intercept(interceptors ...Interceptor)
- func (c *FilesClient) Interceptors() []Interceptor
- func (c *FilesClient) MapCreateBulk(slice any, setFunc func(*FilesCreate, int)) *FilesCreateBulk
- func (c *FilesClient) Query() *FilesQuery
- func (c *FilesClient) QueryImages(f *Files) *ImagesQuery
- func (c *FilesClient) QueryMusics(f *Files) *MusicsQuery
- func (c *FilesClient) Update() *FilesUpdate
- func (c *FilesClient) UpdateOne(f *Files) *FilesUpdateOne
- func (c *FilesClient) UpdateOneID(id uint64) *FilesUpdateOne
- func (c *FilesClient) Use(hooks ...Hook)
- type FilesCreate
- func (fc *FilesCreate) AddImageIDs(ids ...uint64) *FilesCreate
- func (fc *FilesCreate) AddImages(i ...*Images) *FilesCreate
- func (fc *FilesCreate) AddMusicIDs(ids ...uint64) *FilesCreate
- func (fc *FilesCreate) AddMusics(m ...*Musics) *FilesCreate
- func (fc *FilesCreate) Exec(ctx context.Context) error
- func (fc *FilesCreate) ExecX(ctx context.Context)
- func (fc *FilesCreate) Mutation() *FilesMutation
- func (fc *FilesCreate) Save(ctx context.Context) (*Files, error)
- func (fc *FilesCreate) SaveX(ctx context.Context) *Files
- func (fc *FilesCreate) SetHash(s string) *FilesCreate
- func (fc *FilesCreate) SetID(u uint64) *FilesCreate
- func (fc *FilesCreate) SetName(s string) *FilesCreate
- func (fc *FilesCreate) SetSize(u uint64) *FilesCreate
- type FilesCreateBulk
- type FilesDelete
- type FilesDeleteOne
- type FilesEdges
- type FilesGroupBy
- func (fgb *FilesGroupBy) Aggregate(fns ...AggregateFunc) *FilesGroupBy
- func (s *FilesGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FilesGroupBy) BoolX(ctx context.Context) bool
- func (s *FilesGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FilesGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FilesGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FilesGroupBy) Float64X(ctx context.Context) float64
- func (s *FilesGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FilesGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FilesGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FilesGroupBy) IntX(ctx context.Context) int
- func (s *FilesGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FilesGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FilesGroupBy) Scan(ctx context.Context, v any) error
- func (s *FilesGroupBy) ScanX(ctx context.Context, v any)
- func (s *FilesGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FilesGroupBy) StringX(ctx context.Context) string
- func (s *FilesGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FilesGroupBy) StringsX(ctx context.Context) []string
- type FilesMutation
- func (m *FilesMutation) AddField(name string, value ent.Value) error
- func (m *FilesMutation) AddImageIDs(ids ...uint64)
- func (m *FilesMutation) AddMusicIDs(ids ...uint64)
- func (m *FilesMutation) AddSize(u int64)
- func (m *FilesMutation) AddedEdges() []string
- func (m *FilesMutation) AddedField(name string) (ent.Value, bool)
- func (m *FilesMutation) AddedFields() []string
- func (m *FilesMutation) AddedIDs(name string) []ent.Value
- func (m *FilesMutation) AddedSize() (r int64, exists bool)
- func (m *FilesMutation) ClearEdge(name string) error
- func (m *FilesMutation) ClearField(name string) error
- func (m *FilesMutation) ClearImages()
- func (m *FilesMutation) ClearMusics()
- func (m *FilesMutation) ClearedEdges() []string
- func (m *FilesMutation) ClearedFields() []string
- func (m FilesMutation) Client() *Client
- func (m *FilesMutation) EdgeCleared(name string) bool
- func (m *FilesMutation) Field(name string) (ent.Value, bool)
- func (m *FilesMutation) FieldCleared(name string) bool
- func (m *FilesMutation) Fields() []string
- func (m *FilesMutation) Hash() (r string, exists bool)
- func (m *FilesMutation) ID() (id uint64, exists bool)
- func (m *FilesMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *FilesMutation) ImagesCleared() bool
- func (m *FilesMutation) ImagesIDs() (ids []uint64)
- func (m *FilesMutation) MusicsCleared() bool
- func (m *FilesMutation) MusicsIDs() (ids []uint64)
- func (m *FilesMutation) Name() (r string, exists bool)
- func (m *FilesMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FilesMutation) OldHash(ctx context.Context) (v string, err error)
- func (m *FilesMutation) OldName(ctx context.Context) (v string, err error)
- func (m *FilesMutation) OldSize(ctx context.Context) (v uint64, err error)
- func (m *FilesMutation) Op() Op
- func (m *FilesMutation) RemoveImageIDs(ids ...uint64)
- func (m *FilesMutation) RemoveMusicIDs(ids ...uint64)
- func (m *FilesMutation) RemovedEdges() []string
- func (m *FilesMutation) RemovedIDs(name string) []ent.Value
- func (m *FilesMutation) RemovedImagesIDs() (ids []uint64)
- func (m *FilesMutation) RemovedMusicsIDs() (ids []uint64)
- func (m *FilesMutation) ResetEdge(name string) error
- func (m *FilesMutation) ResetField(name string) error
- func (m *FilesMutation) ResetHash()
- func (m *FilesMutation) ResetImages()
- func (m *FilesMutation) ResetMusics()
- func (m *FilesMutation) ResetName()
- func (m *FilesMutation) ResetSize()
- func (m *FilesMutation) SetField(name string, value ent.Value) error
- func (m *FilesMutation) SetHash(s string)
- func (m *FilesMutation) SetID(id uint64)
- func (m *FilesMutation) SetName(s string)
- func (m *FilesMutation) SetOp(op Op)
- func (m *FilesMutation) SetSize(u uint64)
- func (m *FilesMutation) Size() (r uint64, exists bool)
- func (m FilesMutation) Tx() (*Tx, error)
- func (m *FilesMutation) Type() string
- func (m *FilesMutation) Where(ps ...predicate.Files)
- func (m *FilesMutation) WhereP(ps ...func(*sql.Selector))
- type FilesQuery
- func (fq *FilesQuery) Aggregate(fns ...AggregateFunc) *FilesSelect
- func (fq *FilesQuery) All(ctx context.Context) ([]*Files, error)
- func (fq *FilesQuery) AllX(ctx context.Context) []*Files
- func (fq *FilesQuery) Clone() *FilesQuery
- func (fq *FilesQuery) Count(ctx context.Context) (int, error)
- func (fq *FilesQuery) CountX(ctx context.Context) int
- func (fq *FilesQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FilesQuery) ExistX(ctx context.Context) bool
- func (fq *FilesQuery) First(ctx context.Context) (*Files, error)
- func (fq *FilesQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (fq *FilesQuery) FirstIDX(ctx context.Context) uint64
- func (fq *FilesQuery) FirstX(ctx context.Context) *Files
- func (fq *FilesQuery) GroupBy(field string, fields ...string) *FilesGroupBy
- func (fq *FilesQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (fq *FilesQuery) IDsX(ctx context.Context) []uint64
- func (fq *FilesQuery) Limit(limit int) *FilesQuery
- func (fq *FilesQuery) Offset(offset int) *FilesQuery
- func (fq *FilesQuery) Only(ctx context.Context) (*Files, error)
- func (fq *FilesQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (fq *FilesQuery) OnlyIDX(ctx context.Context) uint64
- func (fq *FilesQuery) OnlyX(ctx context.Context) *Files
- func (fq *FilesQuery) Order(o ...files.OrderOption) *FilesQuery
- func (fq *FilesQuery) QueryImages() *ImagesQuery
- func (fq *FilesQuery) QueryMusics() *MusicsQuery
- func (fq *FilesQuery) Select(fields ...string) *FilesSelect
- func (fq *FilesQuery) Unique(unique bool) *FilesQuery
- func (fq *FilesQuery) Where(ps ...predicate.Files) *FilesQuery
- func (fq *FilesQuery) WithImages(opts ...func(*ImagesQuery)) *FilesQuery
- func (fq *FilesQuery) WithMusics(opts ...func(*MusicsQuery)) *FilesQuery
- type FilesSelect
- func (fs *FilesSelect) Aggregate(fns ...AggregateFunc) *FilesSelect
- func (s *FilesSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FilesSelect) BoolX(ctx context.Context) bool
- func (s *FilesSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FilesSelect) BoolsX(ctx context.Context) []bool
- func (s *FilesSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FilesSelect) Float64X(ctx context.Context) float64
- func (s *FilesSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FilesSelect) Float64sX(ctx context.Context) []float64
- func (s *FilesSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FilesSelect) IntX(ctx context.Context) int
- func (s *FilesSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FilesSelect) IntsX(ctx context.Context) []int
- func (fs *FilesSelect) Scan(ctx context.Context, v any) error
- func (s *FilesSelect) ScanX(ctx context.Context, v any)
- func (s *FilesSelect) String(ctx context.Context) (_ string, err error)
- func (s *FilesSelect) StringX(ctx context.Context) string
- func (s *FilesSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FilesSelect) StringsX(ctx context.Context) []string
- type FilesSlice
- type FilesUpdate
- func (fu *FilesUpdate) AddImageIDs(ids ...uint64) *FilesUpdate
- func (fu *FilesUpdate) AddImages(i ...*Images) *FilesUpdate
- func (fu *FilesUpdate) AddMusicIDs(ids ...uint64) *FilesUpdate
- func (fu *FilesUpdate) AddMusics(m ...*Musics) *FilesUpdate
- func (fu *FilesUpdate) AddSize(u int64) *FilesUpdate
- func (fu *FilesUpdate) ClearImages() *FilesUpdate
- func (fu *FilesUpdate) ClearMusics() *FilesUpdate
- func (fu *FilesUpdate) Exec(ctx context.Context) error
- func (fu *FilesUpdate) ExecX(ctx context.Context)
- func (fu *FilesUpdate) Mutation() *FilesMutation
- func (fu *FilesUpdate) RemoveImageIDs(ids ...uint64) *FilesUpdate
- func (fu *FilesUpdate) RemoveImages(i ...*Images) *FilesUpdate
- func (fu *FilesUpdate) RemoveMusicIDs(ids ...uint64) *FilesUpdate
- func (fu *FilesUpdate) RemoveMusics(m ...*Musics) *FilesUpdate
- func (fu *FilesUpdate) Save(ctx context.Context) (int, error)
- func (fu *FilesUpdate) SaveX(ctx context.Context) int
- func (fu *FilesUpdate) SetHash(s string) *FilesUpdate
- func (fu *FilesUpdate) SetName(s string) *FilesUpdate
- func (fu *FilesUpdate) SetNillableHash(s *string) *FilesUpdate
- func (fu *FilesUpdate) SetNillableName(s *string) *FilesUpdate
- func (fu *FilesUpdate) SetNillableSize(u *uint64) *FilesUpdate
- func (fu *FilesUpdate) SetSize(u uint64) *FilesUpdate
- func (fu *FilesUpdate) Where(ps ...predicate.Files) *FilesUpdate
- type FilesUpdateOne
- func (fuo *FilesUpdateOne) AddImageIDs(ids ...uint64) *FilesUpdateOne
- func (fuo *FilesUpdateOne) AddImages(i ...*Images) *FilesUpdateOne
- func (fuo *FilesUpdateOne) AddMusicIDs(ids ...uint64) *FilesUpdateOne
- func (fuo *FilesUpdateOne) AddMusics(m ...*Musics) *FilesUpdateOne
- func (fuo *FilesUpdateOne) AddSize(u int64) *FilesUpdateOne
- func (fuo *FilesUpdateOne) ClearImages() *FilesUpdateOne
- func (fuo *FilesUpdateOne) ClearMusics() *FilesUpdateOne
- func (fuo *FilesUpdateOne) Exec(ctx context.Context) error
- func (fuo *FilesUpdateOne) ExecX(ctx context.Context)
- func (fuo *FilesUpdateOne) Mutation() *FilesMutation
- func (fuo *FilesUpdateOne) RemoveImageIDs(ids ...uint64) *FilesUpdateOne
- func (fuo *FilesUpdateOne) RemoveImages(i ...*Images) *FilesUpdateOne
- func (fuo *FilesUpdateOne) RemoveMusicIDs(ids ...uint64) *FilesUpdateOne
- func (fuo *FilesUpdateOne) RemoveMusics(m ...*Musics) *FilesUpdateOne
- func (fuo *FilesUpdateOne) Save(ctx context.Context) (*Files, error)
- func (fuo *FilesUpdateOne) SaveX(ctx context.Context) *Files
- func (fuo *FilesUpdateOne) Select(field string, fields ...string) *FilesUpdateOne
- func (fuo *FilesUpdateOne) SetHash(s string) *FilesUpdateOne
- func (fuo *FilesUpdateOne) SetName(s string) *FilesUpdateOne
- func (fuo *FilesUpdateOne) SetNillableHash(s *string) *FilesUpdateOne
- func (fuo *FilesUpdateOne) SetNillableName(s *string) *FilesUpdateOne
- func (fuo *FilesUpdateOne) SetNillableSize(u *uint64) *FilesUpdateOne
- func (fuo *FilesUpdateOne) SetSize(u uint64) *FilesUpdateOne
- func (fuo *FilesUpdateOne) Where(ps ...predicate.Files) *FilesUpdateOne
- type Hook
- type Images
- type ImagesClient
- func (c *ImagesClient) Create() *ImagesCreate
- func (c *ImagesClient) CreateBulk(builders ...*ImagesCreate) *ImagesCreateBulk
- func (c *ImagesClient) Delete() *ImagesDelete
- func (c *ImagesClient) DeleteOne(i *Images) *ImagesDeleteOne
- func (c *ImagesClient) DeleteOneID(id uint64) *ImagesDeleteOne
- func (c *ImagesClient) Get(ctx context.Context, id uint64) (*Images, error)
- func (c *ImagesClient) GetX(ctx context.Context, id uint64) *Images
- func (c *ImagesClient) Hooks() []Hook
- func (c *ImagesClient) Intercept(interceptors ...Interceptor)
- func (c *ImagesClient) Interceptors() []Interceptor
- func (c *ImagesClient) MapCreateBulk(slice any, setFunc func(*ImagesCreate, int)) *ImagesCreateBulk
- func (c *ImagesClient) Query() *ImagesQuery
- func (c *ImagesClient) QueryAlbums(i *Images) *AlbumsQuery
- func (c *ImagesClient) QueryFile(i *Images) *FilesQuery
- func (c *ImagesClient) QueryPlaylists(i *Images) *PlaylistsQuery
- func (c *ImagesClient) Update() *ImagesUpdate
- func (c *ImagesClient) UpdateOne(i *Images) *ImagesUpdateOne
- func (c *ImagesClient) UpdateOneID(id uint64) *ImagesUpdateOne
- func (c *ImagesClient) Use(hooks ...Hook)
- type ImagesCreate
- func (ic *ImagesCreate) AddAlbumIDs(ids ...uint64) *ImagesCreate
- func (ic *ImagesCreate) AddAlbums(a ...*Albums) *ImagesCreate
- func (ic *ImagesCreate) AddPlaylistIDs(ids ...uint64) *ImagesCreate
- func (ic *ImagesCreate) AddPlaylists(p ...*Playlists) *ImagesCreate
- func (ic *ImagesCreate) Exec(ctx context.Context) error
- func (ic *ImagesCreate) ExecX(ctx context.Context)
- func (ic *ImagesCreate) Mutation() *ImagesMutation
- func (ic *ImagesCreate) Save(ctx context.Context) (*Images, error)
- func (ic *ImagesCreate) SaveX(ctx context.Context) *Images
- func (ic *ImagesCreate) SetCreateTime(t time.Time) *ImagesCreate
- func (ic *ImagesCreate) SetFile(f *Files) *ImagesCreate
- func (ic *ImagesCreate) SetFileID(id uint64) *ImagesCreate
- func (ic *ImagesCreate) SetHeight(i int32) *ImagesCreate
- func (ic *ImagesCreate) SetID(u uint64) *ImagesCreate
- func (ic *ImagesCreate) SetNillableCreateTime(t *time.Time) *ImagesCreate
- func (ic *ImagesCreate) SetNillableUpdateTime(t *time.Time) *ImagesCreate
- func (ic *ImagesCreate) SetUpdateTime(t time.Time) *ImagesCreate
- func (ic *ImagesCreate) SetWidth(i int32) *ImagesCreate
- type ImagesCreateBulk
- type ImagesDelete
- type ImagesDeleteOne
- type ImagesEdges
- type ImagesGroupBy
- func (igb *ImagesGroupBy) Aggregate(fns ...AggregateFunc) *ImagesGroupBy
- func (s *ImagesGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ImagesGroupBy) BoolX(ctx context.Context) bool
- func (s *ImagesGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ImagesGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ImagesGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ImagesGroupBy) Float64X(ctx context.Context) float64
- func (s *ImagesGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ImagesGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ImagesGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ImagesGroupBy) IntX(ctx context.Context) int
- func (s *ImagesGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ImagesGroupBy) IntsX(ctx context.Context) []int
- func (igb *ImagesGroupBy) Scan(ctx context.Context, v any) error
- func (s *ImagesGroupBy) ScanX(ctx context.Context, v any)
- func (s *ImagesGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ImagesGroupBy) StringX(ctx context.Context) string
- func (s *ImagesGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ImagesGroupBy) StringsX(ctx context.Context) []string
- type ImagesMutation
- func (m *ImagesMutation) AddAlbumIDs(ids ...uint64)
- func (m *ImagesMutation) AddField(name string, value ent.Value) error
- func (m *ImagesMutation) AddHeight(i int32)
- func (m *ImagesMutation) AddPlaylistIDs(ids ...uint64)
- func (m *ImagesMutation) AddWidth(i int32)
- func (m *ImagesMutation) AddedEdges() []string
- func (m *ImagesMutation) AddedField(name string) (ent.Value, bool)
- func (m *ImagesMutation) AddedFields() []string
- func (m *ImagesMutation) AddedHeight() (r int32, exists bool)
- func (m *ImagesMutation) AddedIDs(name string) []ent.Value
- func (m *ImagesMutation) AddedWidth() (r int32, exists bool)
- func (m *ImagesMutation) AlbumsCleared() bool
- func (m *ImagesMutation) AlbumsIDs() (ids []uint64)
- func (m *ImagesMutation) ClearAlbums()
- func (m *ImagesMutation) ClearEdge(name string) error
- func (m *ImagesMutation) ClearField(name string) error
- func (m *ImagesMutation) ClearFile()
- func (m *ImagesMutation) ClearPlaylists()
- func (m *ImagesMutation) ClearedEdges() []string
- func (m *ImagesMutation) ClearedFields() []string
- func (m ImagesMutation) Client() *Client
- func (m *ImagesMutation) CreateTime() (r time.Time, exists bool)
- func (m *ImagesMutation) EdgeCleared(name string) bool
- func (m *ImagesMutation) Field(name string) (ent.Value, bool)
- func (m *ImagesMutation) FieldCleared(name string) bool
- func (m *ImagesMutation) Fields() []string
- func (m *ImagesMutation) FileCleared() bool
- func (m *ImagesMutation) FileID() (id uint64, exists bool)
- func (m *ImagesMutation) FileIDs() (ids []uint64)
- func (m *ImagesMutation) Height() (r int32, exists bool)
- func (m *ImagesMutation) ID() (id uint64, exists bool)
- func (m *ImagesMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *ImagesMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *ImagesMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ImagesMutation) OldHeight(ctx context.Context) (v int32, err error)
- func (m *ImagesMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *ImagesMutation) OldWidth(ctx context.Context) (v int32, err error)
- func (m *ImagesMutation) Op() Op
- func (m *ImagesMutation) PlaylistsCleared() bool
- func (m *ImagesMutation) PlaylistsIDs() (ids []uint64)
- func (m *ImagesMutation) RemoveAlbumIDs(ids ...uint64)
- func (m *ImagesMutation) RemovePlaylistIDs(ids ...uint64)
- func (m *ImagesMutation) RemovedAlbumsIDs() (ids []uint64)
- func (m *ImagesMutation) RemovedEdges() []string
- func (m *ImagesMutation) RemovedIDs(name string) []ent.Value
- func (m *ImagesMutation) RemovedPlaylistsIDs() (ids []uint64)
- func (m *ImagesMutation) ResetAlbums()
- func (m *ImagesMutation) ResetCreateTime()
- func (m *ImagesMutation) ResetEdge(name string) error
- func (m *ImagesMutation) ResetField(name string) error
- func (m *ImagesMutation) ResetFile()
- func (m *ImagesMutation) ResetHeight()
- func (m *ImagesMutation) ResetPlaylists()
- func (m *ImagesMutation) ResetUpdateTime()
- func (m *ImagesMutation) ResetWidth()
- func (m *ImagesMutation) SetCreateTime(t time.Time)
- func (m *ImagesMutation) SetField(name string, value ent.Value) error
- func (m *ImagesMutation) SetFileID(id uint64)
- func (m *ImagesMutation) SetHeight(i int32)
- func (m *ImagesMutation) SetID(id uint64)
- func (m *ImagesMutation) SetOp(op Op)
- func (m *ImagesMutation) SetUpdateTime(t time.Time)
- func (m *ImagesMutation) SetWidth(i int32)
- func (m ImagesMutation) Tx() (*Tx, error)
- func (m *ImagesMutation) Type() string
- func (m *ImagesMutation) UpdateTime() (r time.Time, exists bool)
- func (m *ImagesMutation) Where(ps ...predicate.Images)
- func (m *ImagesMutation) WhereP(ps ...func(*sql.Selector))
- func (m *ImagesMutation) Width() (r int32, exists bool)
- type ImagesQuery
- func (iq *ImagesQuery) Aggregate(fns ...AggregateFunc) *ImagesSelect
- func (iq *ImagesQuery) All(ctx context.Context) ([]*Images, error)
- func (iq *ImagesQuery) AllX(ctx context.Context) []*Images
- func (iq *ImagesQuery) Clone() *ImagesQuery
- func (iq *ImagesQuery) Count(ctx context.Context) (int, error)
- func (iq *ImagesQuery) CountX(ctx context.Context) int
- func (iq *ImagesQuery) Exist(ctx context.Context) (bool, error)
- func (iq *ImagesQuery) ExistX(ctx context.Context) bool
- func (iq *ImagesQuery) First(ctx context.Context) (*Images, error)
- func (iq *ImagesQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (iq *ImagesQuery) FirstIDX(ctx context.Context) uint64
- func (iq *ImagesQuery) FirstX(ctx context.Context) *Images
- func (iq *ImagesQuery) GroupBy(field string, fields ...string) *ImagesGroupBy
- func (iq *ImagesQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (iq *ImagesQuery) IDsX(ctx context.Context) []uint64
- func (iq *ImagesQuery) Limit(limit int) *ImagesQuery
- func (iq *ImagesQuery) Offset(offset int) *ImagesQuery
- func (iq *ImagesQuery) Only(ctx context.Context) (*Images, error)
- func (iq *ImagesQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (iq *ImagesQuery) OnlyIDX(ctx context.Context) uint64
- func (iq *ImagesQuery) OnlyX(ctx context.Context) *Images
- func (iq *ImagesQuery) Order(o ...images.OrderOption) *ImagesQuery
- func (iq *ImagesQuery) QueryAlbums() *AlbumsQuery
- func (iq *ImagesQuery) QueryFile() *FilesQuery
- func (iq *ImagesQuery) QueryPlaylists() *PlaylistsQuery
- func (iq *ImagesQuery) Select(fields ...string) *ImagesSelect
- func (iq *ImagesQuery) Unique(unique bool) *ImagesQuery
- func (iq *ImagesQuery) Where(ps ...predicate.Images) *ImagesQuery
- func (iq *ImagesQuery) WithAlbums(opts ...func(*AlbumsQuery)) *ImagesQuery
- func (iq *ImagesQuery) WithFile(opts ...func(*FilesQuery)) *ImagesQuery
- func (iq *ImagesQuery) WithPlaylists(opts ...func(*PlaylistsQuery)) *ImagesQuery
- type ImagesSelect
- func (is *ImagesSelect) Aggregate(fns ...AggregateFunc) *ImagesSelect
- func (s *ImagesSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ImagesSelect) BoolX(ctx context.Context) bool
- func (s *ImagesSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ImagesSelect) BoolsX(ctx context.Context) []bool
- func (s *ImagesSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ImagesSelect) Float64X(ctx context.Context) float64
- func (s *ImagesSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ImagesSelect) Float64sX(ctx context.Context) []float64
- func (s *ImagesSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ImagesSelect) IntX(ctx context.Context) int
- func (s *ImagesSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ImagesSelect) IntsX(ctx context.Context) []int
- func (is *ImagesSelect) Scan(ctx context.Context, v any) error
- func (s *ImagesSelect) ScanX(ctx context.Context, v any)
- func (s *ImagesSelect) String(ctx context.Context) (_ string, err error)
- func (s *ImagesSelect) StringX(ctx context.Context) string
- func (s *ImagesSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ImagesSelect) StringsX(ctx context.Context) []string
- type ImagesSlice
- type ImagesUpdate
- func (iu *ImagesUpdate) AddAlbumIDs(ids ...uint64) *ImagesUpdate
- func (iu *ImagesUpdate) AddAlbums(a ...*Albums) *ImagesUpdate
- func (iu *ImagesUpdate) AddHeight(i int32) *ImagesUpdate
- func (iu *ImagesUpdate) AddPlaylistIDs(ids ...uint64) *ImagesUpdate
- func (iu *ImagesUpdate) AddPlaylists(p ...*Playlists) *ImagesUpdate
- func (iu *ImagesUpdate) AddWidth(i int32) *ImagesUpdate
- func (iu *ImagesUpdate) ClearAlbums() *ImagesUpdate
- func (iu *ImagesUpdate) ClearFile() *ImagesUpdate
- func (iu *ImagesUpdate) ClearPlaylists() *ImagesUpdate
- func (iu *ImagesUpdate) Exec(ctx context.Context) error
- func (iu *ImagesUpdate) ExecX(ctx context.Context)
- func (iu *ImagesUpdate) Mutation() *ImagesMutation
- func (iu *ImagesUpdate) RemoveAlbumIDs(ids ...uint64) *ImagesUpdate
- func (iu *ImagesUpdate) RemoveAlbums(a ...*Albums) *ImagesUpdate
- func (iu *ImagesUpdate) RemovePlaylistIDs(ids ...uint64) *ImagesUpdate
- func (iu *ImagesUpdate) RemovePlaylists(p ...*Playlists) *ImagesUpdate
- func (iu *ImagesUpdate) Save(ctx context.Context) (int, error)
- func (iu *ImagesUpdate) SaveX(ctx context.Context) int
- func (iu *ImagesUpdate) SetFile(f *Files) *ImagesUpdate
- func (iu *ImagesUpdate) SetFileID(id uint64) *ImagesUpdate
- func (iu *ImagesUpdate) SetHeight(i int32) *ImagesUpdate
- func (iu *ImagesUpdate) SetNillableHeight(i *int32) *ImagesUpdate
- func (iu *ImagesUpdate) SetNillableWidth(i *int32) *ImagesUpdate
- func (iu *ImagesUpdate) SetUpdateTime(t time.Time) *ImagesUpdate
- func (iu *ImagesUpdate) SetWidth(i int32) *ImagesUpdate
- func (iu *ImagesUpdate) Where(ps ...predicate.Images) *ImagesUpdate
- type ImagesUpdateOne
- func (iuo *ImagesUpdateOne) AddAlbumIDs(ids ...uint64) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) AddAlbums(a ...*Albums) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) AddHeight(i int32) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) AddPlaylistIDs(ids ...uint64) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) AddPlaylists(p ...*Playlists) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) AddWidth(i int32) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) ClearAlbums() *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) ClearFile() *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) ClearPlaylists() *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) Exec(ctx context.Context) error
- func (iuo *ImagesUpdateOne) ExecX(ctx context.Context)
- func (iuo *ImagesUpdateOne) Mutation() *ImagesMutation
- func (iuo *ImagesUpdateOne) RemoveAlbumIDs(ids ...uint64) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) RemoveAlbums(a ...*Albums) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) RemovePlaylistIDs(ids ...uint64) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) RemovePlaylists(p ...*Playlists) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) Save(ctx context.Context) (*Images, error)
- func (iuo *ImagesUpdateOne) SaveX(ctx context.Context) *Images
- func (iuo *ImagesUpdateOne) Select(field string, fields ...string) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) SetFile(f *Files) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) SetFileID(id uint64) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) SetHeight(i int32) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) SetNillableHeight(i *int32) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) SetNillableWidth(i *int32) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) SetUpdateTime(t time.Time) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) SetWidth(i int32) *ImagesUpdateOne
- func (iuo *ImagesUpdateOne) Where(ps ...predicate.Images) *ImagesUpdateOne
- type InterceptFunc
- type Interceptor
- type Musics
- func (m *Musics) QueryAlbums() *AlbumsQuery
- func (m *Musics) QueryArtists() *ArtistsQuery
- func (m *Musics) QueryFile() *FilesQuery
- func (m *Musics) QueryPlaylists() *PlaylistsQuery
- func (m *Musics) QueryUsers() *UsersQuery
- func (m *Musics) String() string
- func (m *Musics) Unwrap() *Musics
- func (m *Musics) Update() *MusicsUpdateOne
- func (m *Musics) Value(name string) (ent.Value, error)
- type MusicsClient
- func (c *MusicsClient) Create() *MusicsCreate
- func (c *MusicsClient) CreateBulk(builders ...*MusicsCreate) *MusicsCreateBulk
- func (c *MusicsClient) Delete() *MusicsDelete
- func (c *MusicsClient) DeleteOne(m *Musics) *MusicsDeleteOne
- func (c *MusicsClient) DeleteOneID(id uint64) *MusicsDeleteOne
- func (c *MusicsClient) Get(ctx context.Context, id uint64) (*Musics, error)
- func (c *MusicsClient) GetX(ctx context.Context, id uint64) *Musics
- func (c *MusicsClient) Hooks() []Hook
- func (c *MusicsClient) Intercept(interceptors ...Interceptor)
- func (c *MusicsClient) Interceptors() []Interceptor
- func (c *MusicsClient) MapCreateBulk(slice any, setFunc func(*MusicsCreate, int)) *MusicsCreateBulk
- func (c *MusicsClient) Query() *MusicsQuery
- func (c *MusicsClient) QueryAlbums(m *Musics) *AlbumsQuery
- func (c *MusicsClient) QueryArtists(m *Musics) *ArtistsQuery
- func (c *MusicsClient) QueryFile(m *Musics) *FilesQuery
- func (c *MusicsClient) QueryPlaylists(m *Musics) *PlaylistsQuery
- func (c *MusicsClient) QueryUsers(m *Musics) *UsersQuery
- func (c *MusicsClient) Update() *MusicsUpdate
- func (c *MusicsClient) UpdateOne(m *Musics) *MusicsUpdateOne
- func (c *MusicsClient) UpdateOneID(id uint64) *MusicsUpdateOne
- func (c *MusicsClient) Use(hooks ...Hook)
- type MusicsCreate
- func (mc *MusicsCreate) AddAlbumIDs(ids ...uint64) *MusicsCreate
- func (mc *MusicsCreate) AddAlbums(a ...*Albums) *MusicsCreate
- func (mc *MusicsCreate) AddArtistIDs(ids ...uint64) *MusicsCreate
- func (mc *MusicsCreate) AddArtists(a ...*Artists) *MusicsCreate
- func (mc *MusicsCreate) AddPlaylistIDs(ids ...uint64) *MusicsCreate
- func (mc *MusicsCreate) AddPlaylists(p ...*Playlists) *MusicsCreate
- func (mc *MusicsCreate) AddUserIDs(ids ...uint64) *MusicsCreate
- func (mc *MusicsCreate) AddUsers(u ...*Users) *MusicsCreate
- func (mc *MusicsCreate) Exec(ctx context.Context) error
- func (mc *MusicsCreate) ExecX(ctx context.Context)
- func (mc *MusicsCreate) Mutation() *MusicsMutation
- func (mc *MusicsCreate) Save(ctx context.Context) (*Musics, error)
- func (mc *MusicsCreate) SaveX(ctx context.Context) *Musics
- func (mc *MusicsCreate) SetCreateTime(t time.Time) *MusicsCreate
- func (mc *MusicsCreate) SetDescription(s string) *MusicsCreate
- func (mc *MusicsCreate) SetFile(f *Files) *MusicsCreate
- func (mc *MusicsCreate) SetFileID(id uint64) *MusicsCreate
- func (mc *MusicsCreate) SetID(u uint64) *MusicsCreate
- func (mc *MusicsCreate) SetName(s string) *MusicsCreate
- func (mc *MusicsCreate) SetNillableCreateTime(t *time.Time) *MusicsCreate
- func (mc *MusicsCreate) SetNillableDescription(s *string) *MusicsCreate
- func (mc *MusicsCreate) SetNillableUpdateTime(t *time.Time) *MusicsCreate
- func (mc *MusicsCreate) SetUpdateTime(t time.Time) *MusicsCreate
- type MusicsCreateBulk
- type MusicsDelete
- type MusicsDeleteOne
- type MusicsEdges
- type MusicsGroupBy
- func (mgb *MusicsGroupBy) Aggregate(fns ...AggregateFunc) *MusicsGroupBy
- func (s *MusicsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MusicsGroupBy) BoolX(ctx context.Context) bool
- func (s *MusicsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MusicsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MusicsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MusicsGroupBy) Float64X(ctx context.Context) float64
- func (s *MusicsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MusicsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MusicsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MusicsGroupBy) IntX(ctx context.Context) int
- func (s *MusicsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MusicsGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MusicsGroupBy) Scan(ctx context.Context, v any) error
- func (s *MusicsGroupBy) ScanX(ctx context.Context, v any)
- func (s *MusicsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MusicsGroupBy) StringX(ctx context.Context) string
- func (s *MusicsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MusicsGroupBy) StringsX(ctx context.Context) []string
- type MusicsMutation
- func (m *MusicsMutation) AddAlbumIDs(ids ...uint64)
- func (m *MusicsMutation) AddArtistIDs(ids ...uint64)
- func (m *MusicsMutation) AddField(name string, value ent.Value) error
- func (m *MusicsMutation) AddPlaylistIDs(ids ...uint64)
- func (m *MusicsMutation) AddUserIDs(ids ...uint64)
- func (m *MusicsMutation) AddedEdges() []string
- func (m *MusicsMutation) AddedField(name string) (ent.Value, bool)
- func (m *MusicsMutation) AddedFields() []string
- func (m *MusicsMutation) AddedIDs(name string) []ent.Value
- func (m *MusicsMutation) AlbumsCleared() bool
- func (m *MusicsMutation) AlbumsIDs() (ids []uint64)
- func (m *MusicsMutation) ArtistsCleared() bool
- func (m *MusicsMutation) ArtistsIDs() (ids []uint64)
- func (m *MusicsMutation) ClearAlbums()
- func (m *MusicsMutation) ClearArtists()
- func (m *MusicsMutation) ClearDescription()
- func (m *MusicsMutation) ClearEdge(name string) error
- func (m *MusicsMutation) ClearField(name string) error
- func (m *MusicsMutation) ClearFile()
- func (m *MusicsMutation) ClearPlaylists()
- func (m *MusicsMutation) ClearUsers()
- func (m *MusicsMutation) ClearedEdges() []string
- func (m *MusicsMutation) ClearedFields() []string
- func (m MusicsMutation) Client() *Client
- func (m *MusicsMutation) CreateTime() (r time.Time, exists bool)
- func (m *MusicsMutation) Description() (r string, exists bool)
- func (m *MusicsMutation) DescriptionCleared() bool
- func (m *MusicsMutation) EdgeCleared(name string) bool
- func (m *MusicsMutation) Field(name string) (ent.Value, bool)
- func (m *MusicsMutation) FieldCleared(name string) bool
- func (m *MusicsMutation) Fields() []string
- func (m *MusicsMutation) FileCleared() bool
- func (m *MusicsMutation) FileID() (id uint64, exists bool)
- func (m *MusicsMutation) FileIDs() (ids []uint64)
- func (m *MusicsMutation) ID() (id uint64, exists bool)
- func (m *MusicsMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *MusicsMutation) Name() (r string, exists bool)
- func (m *MusicsMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *MusicsMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *MusicsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MusicsMutation) OldName(ctx context.Context) (v string, err error)
- func (m *MusicsMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *MusicsMutation) Op() Op
- func (m *MusicsMutation) PlaylistsCleared() bool
- func (m *MusicsMutation) PlaylistsIDs() (ids []uint64)
- func (m *MusicsMutation) RemoveAlbumIDs(ids ...uint64)
- func (m *MusicsMutation) RemoveArtistIDs(ids ...uint64)
- func (m *MusicsMutation) RemovePlaylistIDs(ids ...uint64)
- func (m *MusicsMutation) RemoveUserIDs(ids ...uint64)
- func (m *MusicsMutation) RemovedAlbumsIDs() (ids []uint64)
- func (m *MusicsMutation) RemovedArtistsIDs() (ids []uint64)
- func (m *MusicsMutation) RemovedEdges() []string
- func (m *MusicsMutation) RemovedIDs(name string) []ent.Value
- func (m *MusicsMutation) RemovedPlaylistsIDs() (ids []uint64)
- func (m *MusicsMutation) RemovedUsersIDs() (ids []uint64)
- func (m *MusicsMutation) ResetAlbums()
- func (m *MusicsMutation) ResetArtists()
- func (m *MusicsMutation) ResetCreateTime()
- func (m *MusicsMutation) ResetDescription()
- func (m *MusicsMutation) ResetEdge(name string) error
- func (m *MusicsMutation) ResetField(name string) error
- func (m *MusicsMutation) ResetFile()
- func (m *MusicsMutation) ResetName()
- func (m *MusicsMutation) ResetPlaylists()
- func (m *MusicsMutation) ResetUpdateTime()
- func (m *MusicsMutation) ResetUsers()
- func (m *MusicsMutation) SetCreateTime(t time.Time)
- func (m *MusicsMutation) SetDescription(s string)
- func (m *MusicsMutation) SetField(name string, value ent.Value) error
- func (m *MusicsMutation) SetFileID(id uint64)
- func (m *MusicsMutation) SetID(id uint64)
- func (m *MusicsMutation) SetName(s string)
- func (m *MusicsMutation) SetOp(op Op)
- func (m *MusicsMutation) SetUpdateTime(t time.Time)
- func (m MusicsMutation) Tx() (*Tx, error)
- func (m *MusicsMutation) Type() string
- func (m *MusicsMutation) UpdateTime() (r time.Time, exists bool)
- func (m *MusicsMutation) UsersCleared() bool
- func (m *MusicsMutation) UsersIDs() (ids []uint64)
- func (m *MusicsMutation) Where(ps ...predicate.Musics)
- func (m *MusicsMutation) WhereP(ps ...func(*sql.Selector))
- type MusicsQuery
- func (mq *MusicsQuery) Aggregate(fns ...AggregateFunc) *MusicsSelect
- func (mq *MusicsQuery) All(ctx context.Context) ([]*Musics, error)
- func (mq *MusicsQuery) AllX(ctx context.Context) []*Musics
- func (mq *MusicsQuery) Clone() *MusicsQuery
- func (mq *MusicsQuery) Count(ctx context.Context) (int, error)
- func (mq *MusicsQuery) CountX(ctx context.Context) int
- func (mq *MusicsQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MusicsQuery) ExistX(ctx context.Context) bool
- func (mq *MusicsQuery) First(ctx context.Context) (*Musics, error)
- func (mq *MusicsQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (mq *MusicsQuery) FirstIDX(ctx context.Context) uint64
- func (mq *MusicsQuery) FirstX(ctx context.Context) *Musics
- func (mq *MusicsQuery) GroupBy(field string, fields ...string) *MusicsGroupBy
- func (mq *MusicsQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (mq *MusicsQuery) IDsX(ctx context.Context) []uint64
- func (mq *MusicsQuery) Limit(limit int) *MusicsQuery
- func (mq *MusicsQuery) Offset(offset int) *MusicsQuery
- func (mq *MusicsQuery) Only(ctx context.Context) (*Musics, error)
- func (mq *MusicsQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (mq *MusicsQuery) OnlyIDX(ctx context.Context) uint64
- func (mq *MusicsQuery) OnlyX(ctx context.Context) *Musics
- func (mq *MusicsQuery) Order(o ...musics.OrderOption) *MusicsQuery
- func (mq *MusicsQuery) QueryAlbums() *AlbumsQuery
- func (mq *MusicsQuery) QueryArtists() *ArtistsQuery
- func (mq *MusicsQuery) QueryFile() *FilesQuery
- func (mq *MusicsQuery) QueryPlaylists() *PlaylistsQuery
- func (mq *MusicsQuery) QueryUsers() *UsersQuery
- func (mq *MusicsQuery) Select(fields ...string) *MusicsSelect
- func (mq *MusicsQuery) Unique(unique bool) *MusicsQuery
- func (mq *MusicsQuery) Where(ps ...predicate.Musics) *MusicsQuery
- func (mq *MusicsQuery) WithAlbums(opts ...func(*AlbumsQuery)) *MusicsQuery
- func (mq *MusicsQuery) WithArtists(opts ...func(*ArtistsQuery)) *MusicsQuery
- func (mq *MusicsQuery) WithFile(opts ...func(*FilesQuery)) *MusicsQuery
- func (mq *MusicsQuery) WithPlaylists(opts ...func(*PlaylistsQuery)) *MusicsQuery
- func (mq *MusicsQuery) WithUsers(opts ...func(*UsersQuery)) *MusicsQuery
- type MusicsSelect
- func (ms *MusicsSelect) Aggregate(fns ...AggregateFunc) *MusicsSelect
- func (s *MusicsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MusicsSelect) BoolX(ctx context.Context) bool
- func (s *MusicsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MusicsSelect) BoolsX(ctx context.Context) []bool
- func (s *MusicsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MusicsSelect) Float64X(ctx context.Context) float64
- func (s *MusicsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MusicsSelect) Float64sX(ctx context.Context) []float64
- func (s *MusicsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MusicsSelect) IntX(ctx context.Context) int
- func (s *MusicsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MusicsSelect) IntsX(ctx context.Context) []int
- func (ms *MusicsSelect) Scan(ctx context.Context, v any) error
- func (s *MusicsSelect) ScanX(ctx context.Context, v any)
- func (s *MusicsSelect) String(ctx context.Context) (_ string, err error)
- func (s *MusicsSelect) StringX(ctx context.Context) string
- func (s *MusicsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MusicsSelect) StringsX(ctx context.Context) []string
- type MusicsSlice
- type MusicsUpdate
- func (mu *MusicsUpdate) AddAlbumIDs(ids ...uint64) *MusicsUpdate
- func (mu *MusicsUpdate) AddAlbums(a ...*Albums) *MusicsUpdate
- func (mu *MusicsUpdate) AddArtistIDs(ids ...uint64) *MusicsUpdate
- func (mu *MusicsUpdate) AddArtists(a ...*Artists) *MusicsUpdate
- func (mu *MusicsUpdate) AddPlaylistIDs(ids ...uint64) *MusicsUpdate
- func (mu *MusicsUpdate) AddPlaylists(p ...*Playlists) *MusicsUpdate
- func (mu *MusicsUpdate) AddUserIDs(ids ...uint64) *MusicsUpdate
- func (mu *MusicsUpdate) AddUsers(u ...*Users) *MusicsUpdate
- func (mu *MusicsUpdate) ClearAlbums() *MusicsUpdate
- func (mu *MusicsUpdate) ClearArtists() *MusicsUpdate
- func (mu *MusicsUpdate) ClearDescription() *MusicsUpdate
- func (mu *MusicsUpdate) ClearFile() *MusicsUpdate
- func (mu *MusicsUpdate) ClearPlaylists() *MusicsUpdate
- func (mu *MusicsUpdate) ClearUsers() *MusicsUpdate
- func (mu *MusicsUpdate) Exec(ctx context.Context) error
- func (mu *MusicsUpdate) ExecX(ctx context.Context)
- func (mu *MusicsUpdate) Mutation() *MusicsMutation
- func (mu *MusicsUpdate) RemoveAlbumIDs(ids ...uint64) *MusicsUpdate
- func (mu *MusicsUpdate) RemoveAlbums(a ...*Albums) *MusicsUpdate
- func (mu *MusicsUpdate) RemoveArtistIDs(ids ...uint64) *MusicsUpdate
- func (mu *MusicsUpdate) RemoveArtists(a ...*Artists) *MusicsUpdate
- func (mu *MusicsUpdate) RemovePlaylistIDs(ids ...uint64) *MusicsUpdate
- func (mu *MusicsUpdate) RemovePlaylists(p ...*Playlists) *MusicsUpdate
- func (mu *MusicsUpdate) RemoveUserIDs(ids ...uint64) *MusicsUpdate
- func (mu *MusicsUpdate) RemoveUsers(u ...*Users) *MusicsUpdate
- func (mu *MusicsUpdate) Save(ctx context.Context) (int, error)
- func (mu *MusicsUpdate) SaveX(ctx context.Context) int
- func (mu *MusicsUpdate) SetDescription(s string) *MusicsUpdate
- func (mu *MusicsUpdate) SetFile(f *Files) *MusicsUpdate
- func (mu *MusicsUpdate) SetFileID(id uint64) *MusicsUpdate
- func (mu *MusicsUpdate) SetName(s string) *MusicsUpdate
- func (mu *MusicsUpdate) SetNillableDescription(s *string) *MusicsUpdate
- func (mu *MusicsUpdate) SetNillableName(s *string) *MusicsUpdate
- func (mu *MusicsUpdate) SetUpdateTime(t time.Time) *MusicsUpdate
- func (mu *MusicsUpdate) Where(ps ...predicate.Musics) *MusicsUpdate
- type MusicsUpdateOne
- func (muo *MusicsUpdateOne) AddAlbumIDs(ids ...uint64) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) AddAlbums(a ...*Albums) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) AddArtistIDs(ids ...uint64) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) AddArtists(a ...*Artists) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) AddPlaylistIDs(ids ...uint64) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) AddPlaylists(p ...*Playlists) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) AddUserIDs(ids ...uint64) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) AddUsers(u ...*Users) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) ClearAlbums() *MusicsUpdateOne
- func (muo *MusicsUpdateOne) ClearArtists() *MusicsUpdateOne
- func (muo *MusicsUpdateOne) ClearDescription() *MusicsUpdateOne
- func (muo *MusicsUpdateOne) ClearFile() *MusicsUpdateOne
- func (muo *MusicsUpdateOne) ClearPlaylists() *MusicsUpdateOne
- func (muo *MusicsUpdateOne) ClearUsers() *MusicsUpdateOne
- func (muo *MusicsUpdateOne) Exec(ctx context.Context) error
- func (muo *MusicsUpdateOne) ExecX(ctx context.Context)
- func (muo *MusicsUpdateOne) Mutation() *MusicsMutation
- func (muo *MusicsUpdateOne) RemoveAlbumIDs(ids ...uint64) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) RemoveAlbums(a ...*Albums) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) RemoveArtistIDs(ids ...uint64) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) RemoveArtists(a ...*Artists) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) RemovePlaylistIDs(ids ...uint64) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) RemovePlaylists(p ...*Playlists) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) RemoveUserIDs(ids ...uint64) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) RemoveUsers(u ...*Users) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) Save(ctx context.Context) (*Musics, error)
- func (muo *MusicsUpdateOne) SaveX(ctx context.Context) *Musics
- func (muo *MusicsUpdateOne) Select(field string, fields ...string) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) SetDescription(s string) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) SetFile(f *Files) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) SetFileID(id uint64) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) SetName(s string) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) SetNillableDescription(s *string) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) SetNillableName(s *string) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) SetUpdateTime(t time.Time) *MusicsUpdateOne
- func (muo *MusicsUpdateOne) Where(ps ...predicate.Musics) *MusicsUpdateOne
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Oidc
- type OidcClient
- func (c *OidcClient) Create() *OidcCreate
- func (c *OidcClient) CreateBulk(builders ...*OidcCreate) *OidcCreateBulk
- func (c *OidcClient) Delete() *OidcDelete
- func (c *OidcClient) DeleteOne(o *Oidc) *OidcDeleteOne
- func (c *OidcClient) DeleteOneID(id uint64) *OidcDeleteOne
- func (c *OidcClient) Get(ctx context.Context, id uint64) (*Oidc, error)
- func (c *OidcClient) GetX(ctx context.Context, id uint64) *Oidc
- func (c *OidcClient) Hooks() []Hook
- func (c *OidcClient) Intercept(interceptors ...Interceptor)
- func (c *OidcClient) Interceptors() []Interceptor
- func (c *OidcClient) MapCreateBulk(slice any, setFunc func(*OidcCreate, int)) *OidcCreateBulk
- func (c *OidcClient) Query() *OidcQuery
- func (c *OidcClient) Update() *OidcUpdate
- func (c *OidcClient) UpdateOne(o *Oidc) *OidcUpdateOne
- func (c *OidcClient) UpdateOneID(id uint64) *OidcUpdateOne
- func (c *OidcClient) Use(hooks ...Hook)
- type OidcCreate
- func (oc *OidcCreate) Exec(ctx context.Context) error
- func (oc *OidcCreate) ExecX(ctx context.Context)
- func (oc *OidcCreate) Mutation() *OidcMutation
- func (oc *OidcCreate) Save(ctx context.Context) (*Oidc, error)
- func (oc *OidcCreate) SaveX(ctx context.Context) *Oidc
- func (oc *OidcCreate) SetConfigurationEndpoint(s string) *OidcCreate
- func (oc *OidcCreate) SetCreateTime(t time.Time) *OidcCreate
- func (oc *OidcCreate) SetID(u uint64) *OidcCreate
- func (oc *OidcCreate) SetName(s string) *OidcCreate
- func (oc *OidcCreate) SetNillableCreateTime(t *time.Time) *OidcCreate
- func (oc *OidcCreate) SetNillableUpdateTime(t *time.Time) *OidcCreate
- func (oc *OidcCreate) SetUpdateTime(t time.Time) *OidcCreate
- type OidcCreateBulk
- type OidcDelete
- type OidcDeleteOne
- type OidcGroupBy
- func (ogb *OidcGroupBy) Aggregate(fns ...AggregateFunc) *OidcGroupBy
- func (s *OidcGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OidcGroupBy) BoolX(ctx context.Context) bool
- func (s *OidcGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OidcGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OidcGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OidcGroupBy) Float64X(ctx context.Context) float64
- func (s *OidcGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OidcGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OidcGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OidcGroupBy) IntX(ctx context.Context) int
- func (s *OidcGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OidcGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OidcGroupBy) Scan(ctx context.Context, v any) error
- func (s *OidcGroupBy) ScanX(ctx context.Context, v any)
- func (s *OidcGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OidcGroupBy) StringX(ctx context.Context) string
- func (s *OidcGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OidcGroupBy) StringsX(ctx context.Context) []string
- type OidcMutation
- func (m *OidcMutation) AddField(name string, value ent.Value) error
- func (m *OidcMutation) AddedEdges() []string
- func (m *OidcMutation) AddedField(name string) (ent.Value, bool)
- func (m *OidcMutation) AddedFields() []string
- func (m *OidcMutation) AddedIDs(name string) []ent.Value
- func (m *OidcMutation) ClearEdge(name string) error
- func (m *OidcMutation) ClearField(name string) error
- func (m *OidcMutation) ClearedEdges() []string
- func (m *OidcMutation) ClearedFields() []string
- func (m OidcMutation) Client() *Client
- func (m *OidcMutation) ConfigurationEndpoint() (r string, exists bool)
- func (m *OidcMutation) CreateTime() (r time.Time, exists bool)
- func (m *OidcMutation) EdgeCleared(name string) bool
- func (m *OidcMutation) Field(name string) (ent.Value, bool)
- func (m *OidcMutation) FieldCleared(name string) bool
- func (m *OidcMutation) Fields() []string
- func (m *OidcMutation) ID() (id uint64, exists bool)
- func (m *OidcMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *OidcMutation) Name() (r string, exists bool)
- func (m *OidcMutation) OldConfigurationEndpoint(ctx context.Context) (v string, err error)
- func (m *OidcMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *OidcMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OidcMutation) OldName(ctx context.Context) (v string, err error)
- func (m *OidcMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *OidcMutation) Op() Op
- func (m *OidcMutation) RemovedEdges() []string
- func (m *OidcMutation) RemovedIDs(name string) []ent.Value
- func (m *OidcMutation) ResetConfigurationEndpoint()
- func (m *OidcMutation) ResetCreateTime()
- func (m *OidcMutation) ResetEdge(name string) error
- func (m *OidcMutation) ResetField(name string) error
- func (m *OidcMutation) ResetName()
- func (m *OidcMutation) ResetUpdateTime()
- func (m *OidcMutation) SetConfigurationEndpoint(s string)
- func (m *OidcMutation) SetCreateTime(t time.Time)
- func (m *OidcMutation) SetField(name string, value ent.Value) error
- func (m *OidcMutation) SetID(id uint64)
- func (m *OidcMutation) SetName(s string)
- func (m *OidcMutation) SetOp(op Op)
- func (m *OidcMutation) SetUpdateTime(t time.Time)
- func (m OidcMutation) Tx() (*Tx, error)
- func (m *OidcMutation) Type() string
- func (m *OidcMutation) UpdateTime() (r time.Time, exists bool)
- func (m *OidcMutation) Where(ps ...predicate.Oidc)
- func (m *OidcMutation) WhereP(ps ...func(*sql.Selector))
- type OidcQuery
- func (oq *OidcQuery) Aggregate(fns ...AggregateFunc) *OidcSelect
- func (oq *OidcQuery) All(ctx context.Context) ([]*Oidc, error)
- func (oq *OidcQuery) AllX(ctx context.Context) []*Oidc
- func (oq *OidcQuery) Clone() *OidcQuery
- func (oq *OidcQuery) Count(ctx context.Context) (int, error)
- func (oq *OidcQuery) CountX(ctx context.Context) int
- func (oq *OidcQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OidcQuery) ExistX(ctx context.Context) bool
- func (oq *OidcQuery) First(ctx context.Context) (*Oidc, error)
- func (oq *OidcQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (oq *OidcQuery) FirstIDX(ctx context.Context) uint64
- func (oq *OidcQuery) FirstX(ctx context.Context) *Oidc
- func (oq *OidcQuery) GroupBy(field string, fields ...string) *OidcGroupBy
- func (oq *OidcQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (oq *OidcQuery) IDsX(ctx context.Context) []uint64
- func (oq *OidcQuery) Limit(limit int) *OidcQuery
- func (oq *OidcQuery) Offset(offset int) *OidcQuery
- func (oq *OidcQuery) Only(ctx context.Context) (*Oidc, error)
- func (oq *OidcQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (oq *OidcQuery) OnlyIDX(ctx context.Context) uint64
- func (oq *OidcQuery) OnlyX(ctx context.Context) *Oidc
- func (oq *OidcQuery) Order(o ...oidc.OrderOption) *OidcQuery
- func (oq *OidcQuery) Select(fields ...string) *OidcSelect
- func (oq *OidcQuery) Unique(unique bool) *OidcQuery
- func (oq *OidcQuery) Where(ps ...predicate.Oidc) *OidcQuery
- type OidcSelect
- func (os *OidcSelect) Aggregate(fns ...AggregateFunc) *OidcSelect
- func (s *OidcSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OidcSelect) BoolX(ctx context.Context) bool
- func (s *OidcSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OidcSelect) BoolsX(ctx context.Context) []bool
- func (s *OidcSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OidcSelect) Float64X(ctx context.Context) float64
- func (s *OidcSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OidcSelect) Float64sX(ctx context.Context) []float64
- func (s *OidcSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OidcSelect) IntX(ctx context.Context) int
- func (s *OidcSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OidcSelect) IntsX(ctx context.Context) []int
- func (os *OidcSelect) Scan(ctx context.Context, v any) error
- func (s *OidcSelect) ScanX(ctx context.Context, v any)
- func (s *OidcSelect) String(ctx context.Context) (_ string, err error)
- func (s *OidcSelect) StringX(ctx context.Context) string
- func (s *OidcSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OidcSelect) StringsX(ctx context.Context) []string
- type OidcUpdate
- func (ou *OidcUpdate) Exec(ctx context.Context) error
- func (ou *OidcUpdate) ExecX(ctx context.Context)
- func (ou *OidcUpdate) Mutation() *OidcMutation
- func (ou *OidcUpdate) Save(ctx context.Context) (int, error)
- func (ou *OidcUpdate) SaveX(ctx context.Context) int
- func (ou *OidcUpdate) SetConfigurationEndpoint(s string) *OidcUpdate
- func (ou *OidcUpdate) SetName(s string) *OidcUpdate
- func (ou *OidcUpdate) SetNillableConfigurationEndpoint(s *string) *OidcUpdate
- func (ou *OidcUpdate) SetNillableName(s *string) *OidcUpdate
- func (ou *OidcUpdate) SetUpdateTime(t time.Time) *OidcUpdate
- func (ou *OidcUpdate) Where(ps ...predicate.Oidc) *OidcUpdate
- type OidcUpdateOne
- func (ouo *OidcUpdateOne) Exec(ctx context.Context) error
- func (ouo *OidcUpdateOne) ExecX(ctx context.Context)
- func (ouo *OidcUpdateOne) Mutation() *OidcMutation
- func (ouo *OidcUpdateOne) Save(ctx context.Context) (*Oidc, error)
- func (ouo *OidcUpdateOne) SaveX(ctx context.Context) *Oidc
- func (ouo *OidcUpdateOne) Select(field string, fields ...string) *OidcUpdateOne
- func (ouo *OidcUpdateOne) SetConfigurationEndpoint(s string) *OidcUpdateOne
- func (ouo *OidcUpdateOne) SetName(s string) *OidcUpdateOne
- func (ouo *OidcUpdateOne) SetNillableConfigurationEndpoint(s *string) *OidcUpdateOne
- func (ouo *OidcUpdateOne) SetNillableName(s *string) *OidcUpdateOne
- func (ouo *OidcUpdateOne) SetUpdateTime(t time.Time) *OidcUpdateOne
- func (ouo *OidcUpdateOne) Where(ps ...predicate.Oidc) *OidcUpdateOne
- type Oidcs
- type Op
- type Option
- type OrderFunc
- type Playlists
- func (pl *Playlists) QueryImage() *ImagesQuery
- func (pl *Playlists) QueryMusics() *MusicsQuery
- func (pl *Playlists) QueryOwner() *UsersQuery
- func (pl *Playlists) String() string
- func (pl *Playlists) Unwrap() *Playlists
- func (pl *Playlists) Update() *PlaylistsUpdateOne
- func (pl *Playlists) Value(name string) (ent.Value, error)
- type PlaylistsClient
- func (c *PlaylistsClient) Create() *PlaylistsCreate
- func (c *PlaylistsClient) CreateBulk(builders ...*PlaylistsCreate) *PlaylistsCreateBulk
- func (c *PlaylistsClient) Delete() *PlaylistsDelete
- func (c *PlaylistsClient) DeleteOne(pl *Playlists) *PlaylistsDeleteOne
- func (c *PlaylistsClient) DeleteOneID(id uint64) *PlaylistsDeleteOne
- func (c *PlaylistsClient) Get(ctx context.Context, id uint64) (*Playlists, error)
- func (c *PlaylistsClient) GetX(ctx context.Context, id uint64) *Playlists
- func (c *PlaylistsClient) Hooks() []Hook
- func (c *PlaylistsClient) Intercept(interceptors ...Interceptor)
- func (c *PlaylistsClient) Interceptors() []Interceptor
- func (c *PlaylistsClient) MapCreateBulk(slice any, setFunc func(*PlaylistsCreate, int)) *PlaylistsCreateBulk
- func (c *PlaylistsClient) Query() *PlaylistsQuery
- func (c *PlaylistsClient) QueryImage(pl *Playlists) *ImagesQuery
- func (c *PlaylistsClient) QueryMusics(pl *Playlists) *MusicsQuery
- func (c *PlaylistsClient) QueryOwner(pl *Playlists) *UsersQuery
- func (c *PlaylistsClient) Update() *PlaylistsUpdate
- func (c *PlaylistsClient) UpdateOne(pl *Playlists) *PlaylistsUpdateOne
- func (c *PlaylistsClient) UpdateOneID(id uint64) *PlaylistsUpdateOne
- func (c *PlaylistsClient) Use(hooks ...Hook)
- type PlaylistsCreate
- func (pc *PlaylistsCreate) AddMusicIDs(ids ...uint64) *PlaylistsCreate
- func (pc *PlaylistsCreate) AddMusics(m ...*Musics) *PlaylistsCreate
- func (pc *PlaylistsCreate) Exec(ctx context.Context) error
- func (pc *PlaylistsCreate) ExecX(ctx context.Context)
- func (pc *PlaylistsCreate) Mutation() *PlaylistsMutation
- func (pc *PlaylistsCreate) Save(ctx context.Context) (*Playlists, error)
- func (pc *PlaylistsCreate) SaveX(ctx context.Context) *Playlists
- func (pc *PlaylistsCreate) SetCreateTime(t time.Time) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetDescription(s string) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetID(u uint64) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetImage(i *Images) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetImageID(id uint64) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetName(s string) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetNillableCreateTime(t *time.Time) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetNillableDescription(s *string) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetNillableImageID(id *uint64) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetNillablePrivate(b *bool) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetNillableUpdateTime(t *time.Time) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetOwner(u *Users) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetOwnerID(id uint64) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetPrivate(b bool) *PlaylistsCreate
- func (pc *PlaylistsCreate) SetUpdateTime(t time.Time) *PlaylistsCreate
- type PlaylistsCreateBulk
- type PlaylistsDelete
- type PlaylistsDeleteOne
- type PlaylistsEdges
- type PlaylistsGroupBy
- func (pgb *PlaylistsGroupBy) Aggregate(fns ...AggregateFunc) *PlaylistsGroupBy
- func (s *PlaylistsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PlaylistsGroupBy) BoolX(ctx context.Context) bool
- func (s *PlaylistsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PlaylistsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PlaylistsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PlaylistsGroupBy) Float64X(ctx context.Context) float64
- func (s *PlaylistsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PlaylistsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PlaylistsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PlaylistsGroupBy) IntX(ctx context.Context) int
- func (s *PlaylistsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PlaylistsGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PlaylistsGroupBy) Scan(ctx context.Context, v any) error
- func (s *PlaylistsGroupBy) ScanX(ctx context.Context, v any)
- func (s *PlaylistsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PlaylistsGroupBy) StringX(ctx context.Context) string
- func (s *PlaylistsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PlaylistsGroupBy) StringsX(ctx context.Context) []string
- type PlaylistsMutation
- func (m *PlaylistsMutation) AddField(name string, value ent.Value) error
- func (m *PlaylistsMutation) AddMusicIDs(ids ...uint64)
- func (m *PlaylistsMutation) AddedEdges() []string
- func (m *PlaylistsMutation) AddedField(name string) (ent.Value, bool)
- func (m *PlaylistsMutation) AddedFields() []string
- func (m *PlaylistsMutation) AddedIDs(name string) []ent.Value
- func (m *PlaylistsMutation) ClearDescription()
- func (m *PlaylistsMutation) ClearEdge(name string) error
- func (m *PlaylistsMutation) ClearField(name string) error
- func (m *PlaylistsMutation) ClearImage()
- func (m *PlaylistsMutation) ClearMusics()
- func (m *PlaylistsMutation) ClearOwner()
- func (m *PlaylistsMutation) ClearedEdges() []string
- func (m *PlaylistsMutation) ClearedFields() []string
- func (m PlaylistsMutation) Client() *Client
- func (m *PlaylistsMutation) CreateTime() (r time.Time, exists bool)
- func (m *PlaylistsMutation) Description() (r string, exists bool)
- func (m *PlaylistsMutation) DescriptionCleared() bool
- func (m *PlaylistsMutation) EdgeCleared(name string) bool
- func (m *PlaylistsMutation) Field(name string) (ent.Value, bool)
- func (m *PlaylistsMutation) FieldCleared(name string) bool
- func (m *PlaylistsMutation) Fields() []string
- func (m *PlaylistsMutation) ID() (id uint64, exists bool)
- func (m *PlaylistsMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *PlaylistsMutation) ImageCleared() bool
- func (m *PlaylistsMutation) ImageID() (id uint64, exists bool)
- func (m *PlaylistsMutation) ImageIDs() (ids []uint64)
- func (m *PlaylistsMutation) MusicsCleared() bool
- func (m *PlaylistsMutation) MusicsIDs() (ids []uint64)
- func (m *PlaylistsMutation) Name() (r string, exists bool)
- func (m *PlaylistsMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *PlaylistsMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *PlaylistsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PlaylistsMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PlaylistsMutation) OldPrivate(ctx context.Context) (v bool, err error)
- func (m *PlaylistsMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *PlaylistsMutation) Op() Op
- func (m *PlaylistsMutation) OwnerCleared() bool
- func (m *PlaylistsMutation) OwnerID() (id uint64, exists bool)
- func (m *PlaylistsMutation) OwnerIDs() (ids []uint64)
- func (m *PlaylistsMutation) Private() (r bool, exists bool)
- func (m *PlaylistsMutation) RemoveMusicIDs(ids ...uint64)
- func (m *PlaylistsMutation) RemovedEdges() []string
- func (m *PlaylistsMutation) RemovedIDs(name string) []ent.Value
- func (m *PlaylistsMutation) RemovedMusicsIDs() (ids []uint64)
- func (m *PlaylistsMutation) ResetCreateTime()
- func (m *PlaylistsMutation) ResetDescription()
- func (m *PlaylistsMutation) ResetEdge(name string) error
- func (m *PlaylistsMutation) ResetField(name string) error
- func (m *PlaylistsMutation) ResetImage()
- func (m *PlaylistsMutation) ResetMusics()
- func (m *PlaylistsMutation) ResetName()
- func (m *PlaylistsMutation) ResetOwner()
- func (m *PlaylistsMutation) ResetPrivate()
- func (m *PlaylistsMutation) ResetUpdateTime()
- func (m *PlaylistsMutation) SetCreateTime(t time.Time)
- func (m *PlaylistsMutation) SetDescription(s string)
- func (m *PlaylistsMutation) SetField(name string, value ent.Value) error
- func (m *PlaylistsMutation) SetID(id uint64)
- func (m *PlaylistsMutation) SetImageID(id uint64)
- func (m *PlaylistsMutation) SetName(s string)
- func (m *PlaylistsMutation) SetOp(op Op)
- func (m *PlaylistsMutation) SetOwnerID(id uint64)
- func (m *PlaylistsMutation) SetPrivate(b bool)
- func (m *PlaylistsMutation) SetUpdateTime(t time.Time)
- func (m PlaylistsMutation) Tx() (*Tx, error)
- func (m *PlaylistsMutation) Type() string
- func (m *PlaylistsMutation) UpdateTime() (r time.Time, exists bool)
- func (m *PlaylistsMutation) Where(ps ...predicate.Playlists)
- func (m *PlaylistsMutation) WhereP(ps ...func(*sql.Selector))
- type PlaylistsQuery
- func (pq *PlaylistsQuery) Aggregate(fns ...AggregateFunc) *PlaylistsSelect
- func (pq *PlaylistsQuery) All(ctx context.Context) ([]*Playlists, error)
- func (pq *PlaylistsQuery) AllX(ctx context.Context) []*Playlists
- func (pq *PlaylistsQuery) Clone() *PlaylistsQuery
- func (pq *PlaylistsQuery) Count(ctx context.Context) (int, error)
- func (pq *PlaylistsQuery) CountX(ctx context.Context) int
- func (pq *PlaylistsQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PlaylistsQuery) ExistX(ctx context.Context) bool
- func (pq *PlaylistsQuery) First(ctx context.Context) (*Playlists, error)
- func (pq *PlaylistsQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (pq *PlaylistsQuery) FirstIDX(ctx context.Context) uint64
- func (pq *PlaylistsQuery) FirstX(ctx context.Context) *Playlists
- func (pq *PlaylistsQuery) GroupBy(field string, fields ...string) *PlaylistsGroupBy
- func (pq *PlaylistsQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (pq *PlaylistsQuery) IDsX(ctx context.Context) []uint64
- func (pq *PlaylistsQuery) Limit(limit int) *PlaylistsQuery
- func (pq *PlaylistsQuery) Offset(offset int) *PlaylistsQuery
- func (pq *PlaylistsQuery) Only(ctx context.Context) (*Playlists, error)
- func (pq *PlaylistsQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (pq *PlaylistsQuery) OnlyIDX(ctx context.Context) uint64
- func (pq *PlaylistsQuery) OnlyX(ctx context.Context) *Playlists
- func (pq *PlaylistsQuery) Order(o ...playlists.OrderOption) *PlaylistsQuery
- func (pq *PlaylistsQuery) QueryImage() *ImagesQuery
- func (pq *PlaylistsQuery) QueryMusics() *MusicsQuery
- func (pq *PlaylistsQuery) QueryOwner() *UsersQuery
- func (pq *PlaylistsQuery) Select(fields ...string) *PlaylistsSelect
- func (pq *PlaylistsQuery) Unique(unique bool) *PlaylistsQuery
- func (pq *PlaylistsQuery) Where(ps ...predicate.Playlists) *PlaylistsQuery
- func (pq *PlaylistsQuery) WithImage(opts ...func(*ImagesQuery)) *PlaylistsQuery
- func (pq *PlaylistsQuery) WithMusics(opts ...func(*MusicsQuery)) *PlaylistsQuery
- func (pq *PlaylistsQuery) WithOwner(opts ...func(*UsersQuery)) *PlaylistsQuery
- type PlaylistsSelect
- func (ps *PlaylistsSelect) Aggregate(fns ...AggregateFunc) *PlaylistsSelect
- func (s *PlaylistsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PlaylistsSelect) BoolX(ctx context.Context) bool
- func (s *PlaylistsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PlaylistsSelect) BoolsX(ctx context.Context) []bool
- func (s *PlaylistsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PlaylistsSelect) Float64X(ctx context.Context) float64
- func (s *PlaylistsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PlaylistsSelect) Float64sX(ctx context.Context) []float64
- func (s *PlaylistsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PlaylistsSelect) IntX(ctx context.Context) int
- func (s *PlaylistsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PlaylistsSelect) IntsX(ctx context.Context) []int
- func (ps *PlaylistsSelect) Scan(ctx context.Context, v any) error
- func (s *PlaylistsSelect) ScanX(ctx context.Context, v any)
- func (s *PlaylistsSelect) String(ctx context.Context) (_ string, err error)
- func (s *PlaylistsSelect) StringX(ctx context.Context) string
- func (s *PlaylistsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PlaylistsSelect) StringsX(ctx context.Context) []string
- type PlaylistsSlice
- type PlaylistsUpdate
- func (pu *PlaylistsUpdate) AddMusicIDs(ids ...uint64) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) AddMusics(m ...*Musics) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) ClearDescription() *PlaylistsUpdate
- func (pu *PlaylistsUpdate) ClearImage() *PlaylistsUpdate
- func (pu *PlaylistsUpdate) ClearMusics() *PlaylistsUpdate
- func (pu *PlaylistsUpdate) ClearOwner() *PlaylistsUpdate
- func (pu *PlaylistsUpdate) Exec(ctx context.Context) error
- func (pu *PlaylistsUpdate) ExecX(ctx context.Context)
- func (pu *PlaylistsUpdate) Mutation() *PlaylistsMutation
- func (pu *PlaylistsUpdate) RemoveMusicIDs(ids ...uint64) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) RemoveMusics(m ...*Musics) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) Save(ctx context.Context) (int, error)
- func (pu *PlaylistsUpdate) SaveX(ctx context.Context) int
- func (pu *PlaylistsUpdate) SetDescription(s string) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetImage(i *Images) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetImageID(id uint64) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetName(s string) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetNillableDescription(s *string) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetNillableImageID(id *uint64) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetNillableName(s *string) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetNillablePrivate(b *bool) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetOwner(u *Users) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetOwnerID(id uint64) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetPrivate(b bool) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) SetUpdateTime(t time.Time) *PlaylistsUpdate
- func (pu *PlaylistsUpdate) Where(ps ...predicate.Playlists) *PlaylistsUpdate
- type PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) AddMusicIDs(ids ...uint64) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) AddMusics(m ...*Musics) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) ClearDescription() *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) ClearImage() *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) ClearMusics() *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) ClearOwner() *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) Exec(ctx context.Context) error
- func (puo *PlaylistsUpdateOne) ExecX(ctx context.Context)
- func (puo *PlaylistsUpdateOne) Mutation() *PlaylistsMutation
- func (puo *PlaylistsUpdateOne) RemoveMusicIDs(ids ...uint64) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) RemoveMusics(m ...*Musics) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) Save(ctx context.Context) (*Playlists, error)
- func (puo *PlaylistsUpdateOne) SaveX(ctx context.Context) *Playlists
- func (puo *PlaylistsUpdateOne) Select(field string, fields ...string) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetDescription(s string) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetImage(i *Images) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetImageID(id uint64) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetName(s string) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetNillableDescription(s *string) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetNillableImageID(id *uint64) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetNillableName(s *string) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetNillablePrivate(b *bool) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetOwner(u *Users) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetOwnerID(id uint64) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetPrivate(b bool) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) SetUpdateTime(t time.Time) *PlaylistsUpdateOne
- func (puo *PlaylistsUpdateOne) Where(ps ...predicate.Playlists) *PlaylistsUpdateOne
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type Users
- func (u *Users) QueryAlbums() *AlbumsQuery
- func (u *Users) QueryDevices() *DevicesQuery
- func (u *Users) QueryMusics() *MusicsQuery
- func (u *Users) QueryPlaylists() *PlaylistsQuery
- func (u *Users) String() string
- func (u *Users) Unwrap() *Users
- func (u *Users) Update() *UsersUpdateOne
- func (u *Users) Value(name string) (ent.Value, error)
- type UsersClient
- func (c *UsersClient) Create() *UsersCreate
- func (c *UsersClient) CreateBulk(builders ...*UsersCreate) *UsersCreateBulk
- func (c *UsersClient) Delete() *UsersDelete
- func (c *UsersClient) DeleteOne(u *Users) *UsersDeleteOne
- func (c *UsersClient) DeleteOneID(id uint64) *UsersDeleteOne
- func (c *UsersClient) Get(ctx context.Context, id uint64) (*Users, error)
- func (c *UsersClient) GetX(ctx context.Context, id uint64) *Users
- func (c *UsersClient) Hooks() []Hook
- func (c *UsersClient) Intercept(interceptors ...Interceptor)
- func (c *UsersClient) Interceptors() []Interceptor
- func (c *UsersClient) MapCreateBulk(slice any, setFunc func(*UsersCreate, int)) *UsersCreateBulk
- func (c *UsersClient) Query() *UsersQuery
- func (c *UsersClient) QueryAlbums(u *Users) *AlbumsQuery
- func (c *UsersClient) QueryDevices(u *Users) *DevicesQuery
- func (c *UsersClient) QueryMusics(u *Users) *MusicsQuery
- func (c *UsersClient) QueryPlaylists(u *Users) *PlaylistsQuery
- func (c *UsersClient) Update() *UsersUpdate
- func (c *UsersClient) UpdateOne(u *Users) *UsersUpdateOne
- func (c *UsersClient) UpdateOneID(id uint64) *UsersUpdateOne
- func (c *UsersClient) Use(hooks ...Hook)
- type UsersCreate
- func (uc *UsersCreate) AddAlbumIDs(ids ...uint64) *UsersCreate
- func (uc *UsersCreate) AddAlbums(a ...*Albums) *UsersCreate
- func (uc *UsersCreate) AddDeviceIDs(ids ...uint64) *UsersCreate
- func (uc *UsersCreate) AddDevices(d ...*Devices) *UsersCreate
- func (uc *UsersCreate) AddMusicIDs(ids ...uint64) *UsersCreate
- func (uc *UsersCreate) AddMusics(m ...*Musics) *UsersCreate
- func (uc *UsersCreate) AddPlaylistIDs(ids ...uint64) *UsersCreate
- func (uc *UsersCreate) AddPlaylists(p ...*Playlists) *UsersCreate
- func (uc *UsersCreate) Exec(ctx context.Context) error
- func (uc *UsersCreate) ExecX(ctx context.Context)
- func (uc *UsersCreate) Mutation() *UsersMutation
- func (uc *UsersCreate) Save(ctx context.Context) (*Users, error)
- func (uc *UsersCreate) SaveX(ctx context.Context) *Users
- func (uc *UsersCreate) SetAvatar(s string) *UsersCreate
- func (uc *UsersCreate) SetBio(s string) *UsersCreate
- func (uc *UsersCreate) SetCreateTime(t time.Time) *UsersCreate
- func (uc *UsersCreate) SetEmail(s string) *UsersCreate
- func (uc *UsersCreate) SetID(u uint64) *UsersCreate
- func (uc *UsersCreate) SetName(s string) *UsersCreate
- func (uc *UsersCreate) SetNillableAvatar(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillableBio(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillableCreateTime(t *time.Time) *UsersCreate
- func (uc *UsersCreate) SetNillableEmail(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillableName(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillablePassword(s *string) *UsersCreate
- func (uc *UsersCreate) SetNillableUpdateTime(t *time.Time) *UsersCreate
- func (uc *UsersCreate) SetPassword(s string) *UsersCreate
- func (uc *UsersCreate) SetUpdateTime(t time.Time) *UsersCreate
- func (uc *UsersCreate) SetUsername(s string) *UsersCreate
- type UsersCreateBulk
- type UsersDelete
- type UsersDeleteOne
- type UsersEdges
- type UsersGroupBy
- func (ugb *UsersGroupBy) Aggregate(fns ...AggregateFunc) *UsersGroupBy
- func (s *UsersGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UsersGroupBy) BoolX(ctx context.Context) bool
- func (s *UsersGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UsersGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UsersGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UsersGroupBy) Float64X(ctx context.Context) float64
- func (s *UsersGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UsersGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UsersGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UsersGroupBy) IntX(ctx context.Context) int
- func (s *UsersGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UsersGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UsersGroupBy) Scan(ctx context.Context, v any) error
- func (s *UsersGroupBy) ScanX(ctx context.Context, v any)
- func (s *UsersGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UsersGroupBy) StringX(ctx context.Context) string
- func (s *UsersGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UsersGroupBy) StringsX(ctx context.Context) []string
- type UsersMutation
- func (m *UsersMutation) AddAlbumIDs(ids ...uint64)
- func (m *UsersMutation) AddDeviceIDs(ids ...uint64)
- func (m *UsersMutation) AddField(name string, value ent.Value) error
- func (m *UsersMutation) AddMusicIDs(ids ...uint64)
- func (m *UsersMutation) AddPlaylistIDs(ids ...uint64)
- func (m *UsersMutation) AddedEdges() []string
- func (m *UsersMutation) AddedField(name string) (ent.Value, bool)
- func (m *UsersMutation) AddedFields() []string
- func (m *UsersMutation) AddedIDs(name string) []ent.Value
- func (m *UsersMutation) AlbumsCleared() bool
- func (m *UsersMutation) AlbumsIDs() (ids []uint64)
- func (m *UsersMutation) Avatar() (r string, exists bool)
- func (m *UsersMutation) AvatarCleared() bool
- func (m *UsersMutation) Bio() (r string, exists bool)
- func (m *UsersMutation) BioCleared() bool
- func (m *UsersMutation) ClearAlbums()
- func (m *UsersMutation) ClearAvatar()
- func (m *UsersMutation) ClearBio()
- func (m *UsersMutation) ClearDevices()
- func (m *UsersMutation) ClearEdge(name string) error
- func (m *UsersMutation) ClearEmail()
- func (m *UsersMutation) ClearField(name string) error
- func (m *UsersMutation) ClearMusics()
- func (m *UsersMutation) ClearName()
- func (m *UsersMutation) ClearPassword()
- func (m *UsersMutation) ClearPlaylists()
- func (m *UsersMutation) ClearedEdges() []string
- func (m *UsersMutation) ClearedFields() []string
- func (m UsersMutation) Client() *Client
- func (m *UsersMutation) CreateTime() (r time.Time, exists bool)
- func (m *UsersMutation) DevicesCleared() bool
- func (m *UsersMutation) DevicesIDs() (ids []uint64)
- func (m *UsersMutation) EdgeCleared(name string) bool
- func (m *UsersMutation) Email() (r string, exists bool)
- func (m *UsersMutation) EmailCleared() bool
- func (m *UsersMutation) Field(name string) (ent.Value, bool)
- func (m *UsersMutation) FieldCleared(name string) bool
- func (m *UsersMutation) Fields() []string
- func (m *UsersMutation) ID() (id uint64, exists bool)
- func (m *UsersMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *UsersMutation) MusicsCleared() bool
- func (m *UsersMutation) MusicsIDs() (ids []uint64)
- func (m *UsersMutation) Name() (r string, exists bool)
- func (m *UsersMutation) NameCleared() bool
- func (m *UsersMutation) OldAvatar(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldBio(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldCreateTime(ctx context.Context) (v time.Time, err error)
- func (m *UsersMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UsersMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error)
- func (m *UsersMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UsersMutation) Op() Op
- func (m *UsersMutation) Password() (r string, exists bool)
- func (m *UsersMutation) PasswordCleared() bool
- func (m *UsersMutation) PlaylistsCleared() bool
- func (m *UsersMutation) PlaylistsIDs() (ids []uint64)
- func (m *UsersMutation) RemoveAlbumIDs(ids ...uint64)
- func (m *UsersMutation) RemoveDeviceIDs(ids ...uint64)
- func (m *UsersMutation) RemoveMusicIDs(ids ...uint64)
- func (m *UsersMutation) RemovePlaylistIDs(ids ...uint64)
- func (m *UsersMutation) RemovedAlbumsIDs() (ids []uint64)
- func (m *UsersMutation) RemovedDevicesIDs() (ids []uint64)
- func (m *UsersMutation) RemovedEdges() []string
- func (m *UsersMutation) RemovedIDs(name string) []ent.Value
- func (m *UsersMutation) RemovedMusicsIDs() (ids []uint64)
- func (m *UsersMutation) RemovedPlaylistsIDs() (ids []uint64)
- func (m *UsersMutation) ResetAlbums()
- func (m *UsersMutation) ResetAvatar()
- func (m *UsersMutation) ResetBio()
- func (m *UsersMutation) ResetCreateTime()
- func (m *UsersMutation) ResetDevices()
- func (m *UsersMutation) ResetEdge(name string) error
- func (m *UsersMutation) ResetEmail()
- func (m *UsersMutation) ResetField(name string) error
- func (m *UsersMutation) ResetMusics()
- func (m *UsersMutation) ResetName()
- func (m *UsersMutation) ResetPassword()
- func (m *UsersMutation) ResetPlaylists()
- func (m *UsersMutation) ResetUpdateTime()
- func (m *UsersMutation) ResetUsername()
- func (m *UsersMutation) SetAvatar(s string)
- func (m *UsersMutation) SetBio(s string)
- func (m *UsersMutation) SetCreateTime(t time.Time)
- func (m *UsersMutation) SetEmail(s string)
- func (m *UsersMutation) SetField(name string, value ent.Value) error
- func (m *UsersMutation) SetID(id uint64)
- func (m *UsersMutation) SetName(s string)
- func (m *UsersMutation) SetOp(op Op)
- func (m *UsersMutation) SetPassword(s string)
- func (m *UsersMutation) SetUpdateTime(t time.Time)
- func (m *UsersMutation) SetUsername(s string)
- func (m UsersMutation) Tx() (*Tx, error)
- func (m *UsersMutation) Type() string
- func (m *UsersMutation) UpdateTime() (r time.Time, exists bool)
- func (m *UsersMutation) Username() (r string, exists bool)
- func (m *UsersMutation) Where(ps ...predicate.Users)
- func (m *UsersMutation) WhereP(ps ...func(*sql.Selector))
- type UsersQuery
- func (uq *UsersQuery) Aggregate(fns ...AggregateFunc) *UsersSelect
- func (uq *UsersQuery) All(ctx context.Context) ([]*Users, error)
- func (uq *UsersQuery) AllX(ctx context.Context) []*Users
- func (uq *UsersQuery) Clone() *UsersQuery
- func (uq *UsersQuery) Count(ctx context.Context) (int, error)
- func (uq *UsersQuery) CountX(ctx context.Context) int
- func (uq *UsersQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UsersQuery) ExistX(ctx context.Context) bool
- func (uq *UsersQuery) First(ctx context.Context) (*Users, error)
- func (uq *UsersQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (uq *UsersQuery) FirstIDX(ctx context.Context) uint64
- func (uq *UsersQuery) FirstX(ctx context.Context) *Users
- func (uq *UsersQuery) GroupBy(field string, fields ...string) *UsersGroupBy
- func (uq *UsersQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (uq *UsersQuery) IDsX(ctx context.Context) []uint64
- func (uq *UsersQuery) Limit(limit int) *UsersQuery
- func (uq *UsersQuery) Offset(offset int) *UsersQuery
- func (uq *UsersQuery) Only(ctx context.Context) (*Users, error)
- func (uq *UsersQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (uq *UsersQuery) OnlyIDX(ctx context.Context) uint64
- func (uq *UsersQuery) OnlyX(ctx context.Context) *Users
- func (uq *UsersQuery) Order(o ...users.OrderOption) *UsersQuery
- func (uq *UsersQuery) QueryAlbums() *AlbumsQuery
- func (uq *UsersQuery) QueryDevices() *DevicesQuery
- func (uq *UsersQuery) QueryMusics() *MusicsQuery
- func (uq *UsersQuery) QueryPlaylists() *PlaylistsQuery
- func (uq *UsersQuery) Select(fields ...string) *UsersSelect
- func (uq *UsersQuery) Unique(unique bool) *UsersQuery
- func (uq *UsersQuery) Where(ps ...predicate.Users) *UsersQuery
- func (uq *UsersQuery) WithAlbums(opts ...func(*AlbumsQuery)) *UsersQuery
- func (uq *UsersQuery) WithDevices(opts ...func(*DevicesQuery)) *UsersQuery
- func (uq *UsersQuery) WithMusics(opts ...func(*MusicsQuery)) *UsersQuery
- func (uq *UsersQuery) WithPlaylists(opts ...func(*PlaylistsQuery)) *UsersQuery
- type UsersSelect
- func (us *UsersSelect) Aggregate(fns ...AggregateFunc) *UsersSelect
- func (s *UsersSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UsersSelect) BoolX(ctx context.Context) bool
- func (s *UsersSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UsersSelect) BoolsX(ctx context.Context) []bool
- func (s *UsersSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UsersSelect) Float64X(ctx context.Context) float64
- func (s *UsersSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UsersSelect) Float64sX(ctx context.Context) []float64
- func (s *UsersSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UsersSelect) IntX(ctx context.Context) int
- func (s *UsersSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UsersSelect) IntsX(ctx context.Context) []int
- func (us *UsersSelect) Scan(ctx context.Context, v any) error
- func (s *UsersSelect) ScanX(ctx context.Context, v any)
- func (s *UsersSelect) String(ctx context.Context) (_ string, err error)
- func (s *UsersSelect) StringX(ctx context.Context) string
- func (s *UsersSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UsersSelect) StringsX(ctx context.Context) []string
- type UsersSlice
- type UsersUpdate
- func (uu *UsersUpdate) AddAlbumIDs(ids ...uint64) *UsersUpdate
- func (uu *UsersUpdate) AddAlbums(a ...*Albums) *UsersUpdate
- func (uu *UsersUpdate) AddDeviceIDs(ids ...uint64) *UsersUpdate
- func (uu *UsersUpdate) AddDevices(d ...*Devices) *UsersUpdate
- func (uu *UsersUpdate) AddMusicIDs(ids ...uint64) *UsersUpdate
- func (uu *UsersUpdate) AddMusics(m ...*Musics) *UsersUpdate
- func (uu *UsersUpdate) AddPlaylistIDs(ids ...uint64) *UsersUpdate
- func (uu *UsersUpdate) AddPlaylists(p ...*Playlists) *UsersUpdate
- func (uu *UsersUpdate) ClearAlbums() *UsersUpdate
- func (uu *UsersUpdate) ClearAvatar() *UsersUpdate
- func (uu *UsersUpdate) ClearBio() *UsersUpdate
- func (uu *UsersUpdate) ClearDevices() *UsersUpdate
- func (uu *UsersUpdate) ClearEmail() *UsersUpdate
- func (uu *UsersUpdate) ClearMusics() *UsersUpdate
- func (uu *UsersUpdate) ClearName() *UsersUpdate
- func (uu *UsersUpdate) ClearPassword() *UsersUpdate
- func (uu *UsersUpdate) ClearPlaylists() *UsersUpdate
- func (uu *UsersUpdate) Exec(ctx context.Context) error
- func (uu *UsersUpdate) ExecX(ctx context.Context)
- func (uu *UsersUpdate) Mutation() *UsersMutation
- func (uu *UsersUpdate) RemoveAlbumIDs(ids ...uint64) *UsersUpdate
- func (uu *UsersUpdate) RemoveAlbums(a ...*Albums) *UsersUpdate
- func (uu *UsersUpdate) RemoveDeviceIDs(ids ...uint64) *UsersUpdate
- func (uu *UsersUpdate) RemoveDevices(d ...*Devices) *UsersUpdate
- func (uu *UsersUpdate) RemoveMusicIDs(ids ...uint64) *UsersUpdate
- func (uu *UsersUpdate) RemoveMusics(m ...*Musics) *UsersUpdate
- func (uu *UsersUpdate) RemovePlaylistIDs(ids ...uint64) *UsersUpdate
- func (uu *UsersUpdate) RemovePlaylists(p ...*Playlists) *UsersUpdate
- func (uu *UsersUpdate) Save(ctx context.Context) (int, error)
- func (uu *UsersUpdate) SaveX(ctx context.Context) int
- func (uu *UsersUpdate) SetAvatar(s string) *UsersUpdate
- func (uu *UsersUpdate) SetBio(s string) *UsersUpdate
- func (uu *UsersUpdate) SetEmail(s string) *UsersUpdate
- func (uu *UsersUpdate) SetName(s string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableAvatar(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableBio(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableEmail(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableName(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillablePassword(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetNillableUsername(s *string) *UsersUpdate
- func (uu *UsersUpdate) SetPassword(s string) *UsersUpdate
- func (uu *UsersUpdate) SetUpdateTime(t time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetUsername(s string) *UsersUpdate
- func (uu *UsersUpdate) Where(ps ...predicate.Users) *UsersUpdate
- type UsersUpdateOne
- func (uuo *UsersUpdateOne) AddAlbumIDs(ids ...uint64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddAlbums(a ...*Albums) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddDeviceIDs(ids ...uint64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddDevices(d ...*Devices) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddMusicIDs(ids ...uint64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddMusics(m ...*Musics) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddPlaylistIDs(ids ...uint64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) AddPlaylists(p ...*Playlists) *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearAlbums() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearAvatar() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearBio() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearDevices() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearEmail() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearMusics() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearName() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearPassword() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearPlaylists() *UsersUpdateOne
- func (uuo *UsersUpdateOne) Exec(ctx context.Context) error
- func (uuo *UsersUpdateOne) ExecX(ctx context.Context)
- func (uuo *UsersUpdateOne) Mutation() *UsersMutation
- func (uuo *UsersUpdateOne) RemoveAlbumIDs(ids ...uint64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemoveAlbums(a ...*Albums) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemoveDeviceIDs(ids ...uint64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemoveDevices(d ...*Devices) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemoveMusicIDs(ids ...uint64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemoveMusics(m ...*Musics) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemovePlaylistIDs(ids ...uint64) *UsersUpdateOne
- func (uuo *UsersUpdateOne) RemovePlaylists(p ...*Playlists) *UsersUpdateOne
- func (uuo *UsersUpdateOne) Save(ctx context.Context) (*Users, error)
- func (uuo *UsersUpdateOne) SaveX(ctx context.Context) *Users
- func (uuo *UsersUpdateOne) Select(field string, fields ...string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetAvatar(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetBio(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetEmail(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetName(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableAvatar(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableBio(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableEmail(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableName(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillablePassword(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableUsername(s *string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetPassword(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUpdateTime(t time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUsername(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) Where(ps ...predicate.Users) *UsersUpdateOne
- type ValidationError
- type Value
- type Videos
- type VideosClient
- func (c *VideosClient) Create() *VideosCreate
- func (c *VideosClient) CreateBulk(builders ...*VideosCreate) *VideosCreateBulk
- func (c *VideosClient) Delete() *VideosDelete
- func (c *VideosClient) DeleteOne(v *Videos) *VideosDeleteOne
- func (c *VideosClient) DeleteOneID(id int) *VideosDeleteOne
- func (c *VideosClient) Get(ctx context.Context, id int) (*Videos, error)
- func (c *VideosClient) GetX(ctx context.Context, id int) *Videos
- func (c *VideosClient) Hooks() []Hook
- func (c *VideosClient) Intercept(interceptors ...Interceptor)
- func (c *VideosClient) Interceptors() []Interceptor
- func (c *VideosClient) MapCreateBulk(slice any, setFunc func(*VideosCreate, int)) *VideosCreateBulk
- func (c *VideosClient) Query() *VideosQuery
- func (c *VideosClient) Update() *VideosUpdate
- func (c *VideosClient) UpdateOne(v *Videos) *VideosUpdateOne
- func (c *VideosClient) UpdateOneID(id int) *VideosUpdateOne
- func (c *VideosClient) Use(hooks ...Hook)
- type VideosCreate
- type VideosCreateBulk
- type VideosDelete
- type VideosDeleteOne
- type VideosGroupBy
- func (vgb *VideosGroupBy) Aggregate(fns ...AggregateFunc) *VideosGroupBy
- func (s *VideosGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *VideosGroupBy) BoolX(ctx context.Context) bool
- func (s *VideosGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *VideosGroupBy) BoolsX(ctx context.Context) []bool
- func (s *VideosGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *VideosGroupBy) Float64X(ctx context.Context) float64
- func (s *VideosGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *VideosGroupBy) Float64sX(ctx context.Context) []float64
- func (s *VideosGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *VideosGroupBy) IntX(ctx context.Context) int
- func (s *VideosGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *VideosGroupBy) IntsX(ctx context.Context) []int
- func (vgb *VideosGroupBy) Scan(ctx context.Context, v any) error
- func (s *VideosGroupBy) ScanX(ctx context.Context, v any)
- func (s *VideosGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *VideosGroupBy) StringX(ctx context.Context) string
- func (s *VideosGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *VideosGroupBy) StringsX(ctx context.Context) []string
- type VideosMutation
- func (m *VideosMutation) AddField(name string, value ent.Value) error
- func (m *VideosMutation) AddedEdges() []string
- func (m *VideosMutation) AddedField(name string) (ent.Value, bool)
- func (m *VideosMutation) AddedFields() []string
- func (m *VideosMutation) AddedIDs(name string) []ent.Value
- func (m *VideosMutation) ClearEdge(name string) error
- func (m *VideosMutation) ClearField(name string) error
- func (m *VideosMutation) ClearedEdges() []string
- func (m *VideosMutation) ClearedFields() []string
- func (m VideosMutation) Client() *Client
- func (m *VideosMutation) EdgeCleared(name string) bool
- func (m *VideosMutation) Field(name string) (ent.Value, bool)
- func (m *VideosMutation) FieldCleared(name string) bool
- func (m *VideosMutation) Fields() []string
- func (m *VideosMutation) ID() (id int, exists bool)
- func (m *VideosMutation) IDs(ctx context.Context) ([]int, error)
- func (m *VideosMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *VideosMutation) Op() Op
- func (m *VideosMutation) RemovedEdges() []string
- func (m *VideosMutation) RemovedIDs(name string) []ent.Value
- func (m *VideosMutation) ResetEdge(name string) error
- func (m *VideosMutation) ResetField(name string) error
- func (m *VideosMutation) SetField(name string, value ent.Value) error
- func (m *VideosMutation) SetOp(op Op)
- func (m VideosMutation) Tx() (*Tx, error)
- func (m *VideosMutation) Type() string
- func (m *VideosMutation) Where(ps ...predicate.Videos)
- func (m *VideosMutation) WhereP(ps ...func(*sql.Selector))
- type VideosQuery
- func (vq *VideosQuery) Aggregate(fns ...AggregateFunc) *VideosSelect
- func (vq *VideosQuery) All(ctx context.Context) ([]*Videos, error)
- func (vq *VideosQuery) AllX(ctx context.Context) []*Videos
- func (vq *VideosQuery) Clone() *VideosQuery
- func (vq *VideosQuery) Count(ctx context.Context) (int, error)
- func (vq *VideosQuery) CountX(ctx context.Context) int
- func (vq *VideosQuery) Exist(ctx context.Context) (bool, error)
- func (vq *VideosQuery) ExistX(ctx context.Context) bool
- func (vq *VideosQuery) First(ctx context.Context) (*Videos, error)
- func (vq *VideosQuery) FirstID(ctx context.Context) (id int, err error)
- func (vq *VideosQuery) FirstIDX(ctx context.Context) int
- func (vq *VideosQuery) FirstX(ctx context.Context) *Videos
- func (vq *VideosQuery) GroupBy(field string, fields ...string) *VideosGroupBy
- func (vq *VideosQuery) IDs(ctx context.Context) (ids []int, err error)
- func (vq *VideosQuery) IDsX(ctx context.Context) []int
- func (vq *VideosQuery) Limit(limit int) *VideosQuery
- func (vq *VideosQuery) Offset(offset int) *VideosQuery
- func (vq *VideosQuery) Only(ctx context.Context) (*Videos, error)
- func (vq *VideosQuery) OnlyID(ctx context.Context) (id int, err error)
- func (vq *VideosQuery) OnlyIDX(ctx context.Context) int
- func (vq *VideosQuery) OnlyX(ctx context.Context) *Videos
- func (vq *VideosQuery) Order(o ...videos.OrderOption) *VideosQuery
- func (vq *VideosQuery) Select(fields ...string) *VideosSelect
- func (vq *VideosQuery) Unique(unique bool) *VideosQuery
- func (vq *VideosQuery) Where(ps ...predicate.Videos) *VideosQuery
- type VideosSelect
- func (vs *VideosSelect) Aggregate(fns ...AggregateFunc) *VideosSelect
- func (s *VideosSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *VideosSelect) BoolX(ctx context.Context) bool
- func (s *VideosSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *VideosSelect) BoolsX(ctx context.Context) []bool
- func (s *VideosSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *VideosSelect) Float64X(ctx context.Context) float64
- func (s *VideosSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *VideosSelect) Float64sX(ctx context.Context) []float64
- func (s *VideosSelect) Int(ctx context.Context) (_ int, err error)
- func (s *VideosSelect) IntX(ctx context.Context) int
- func (s *VideosSelect) Ints(ctx context.Context) ([]int, error)
- func (s *VideosSelect) IntsX(ctx context.Context) []int
- func (vs *VideosSelect) Scan(ctx context.Context, v any) error
- func (s *VideosSelect) ScanX(ctx context.Context, v any)
- func (s *VideosSelect) String(ctx context.Context) (_ string, err error)
- func (s *VideosSelect) StringX(ctx context.Context) string
- func (s *VideosSelect) Strings(ctx context.Context) ([]string, error)
- func (s *VideosSelect) StringsX(ctx context.Context) []string
- type VideosSlice
- type VideosUpdate
- func (vu *VideosUpdate) Exec(ctx context.Context) error
- func (vu *VideosUpdate) ExecX(ctx context.Context)
- func (vu *VideosUpdate) Mutation() *VideosMutation
- func (vu *VideosUpdate) Save(ctx context.Context) (int, error)
- func (vu *VideosUpdate) SaveX(ctx context.Context) int
- func (vu *VideosUpdate) Where(ps ...predicate.Videos) *VideosUpdate
- type VideosUpdateOne
- func (vuo *VideosUpdateOne) Exec(ctx context.Context) error
- func (vuo *VideosUpdateOne) ExecX(ctx context.Context)
- func (vuo *VideosUpdateOne) Mutation() *VideosMutation
- func (vuo *VideosUpdateOne) Save(ctx context.Context) (*Videos, error)
- func (vuo *VideosUpdateOne) SaveX(ctx context.Context) *Videos
- func (vuo *VideosUpdateOne) Select(field string, fields ...string) *VideosUpdateOne
- func (vuo *VideosUpdateOne) Where(ps ...predicate.Videos) *VideosUpdateOne
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeActors = "Actors" TypeAlbums = "Albums" TypeArtists = "Artists" TypeAudiobooks = "Audiobooks" TypeCategorys = "Categorys" TypeDevices = "Devices" TypeDirectors = "Directors" TypeFiles = "Files" TypeImages = "Images" TypeMusics = "Musics" TypeOidc = "Oidc" TypePlaylists = "Playlists" TypeUsers = "Users" TypeVideos = "Videos" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func 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 Actors ¶
type Actors struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
Actors is the model entity for the Actors schema.
func (*Actors) Unwrap ¶
Unwrap unwraps the Actors 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 (*Actors) Update ¶
func (a *Actors) Update() *ActorsUpdateOne
Update returns a builder for updating this Actors. Note that you need to call Actors.Unwrap() before calling this method if this Actors was returned from a transaction, and the transaction was committed or rolled back.
type ActorsClient ¶
type ActorsClient struct {
// contains filtered or unexported fields
}
ActorsClient is a client for the Actors schema.
func NewActorsClient ¶
func NewActorsClient(c config) *ActorsClient
NewActorsClient returns a client for the Actors from the given config.
func (*ActorsClient) Create ¶
func (c *ActorsClient) Create() *ActorsCreate
Create returns a builder for creating a Actors entity.
func (*ActorsClient) CreateBulk ¶
func (c *ActorsClient) CreateBulk(builders ...*ActorsCreate) *ActorsCreateBulk
CreateBulk returns a builder for creating a bulk of Actors entities.
func (*ActorsClient) Delete ¶
func (c *ActorsClient) Delete() *ActorsDelete
Delete returns a delete builder for Actors.
func (*ActorsClient) DeleteOne ¶
func (c *ActorsClient) DeleteOne(a *Actors) *ActorsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ActorsClient) DeleteOneID ¶
func (c *ActorsClient) DeleteOneID(id int) *ActorsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ActorsClient) GetX ¶
func (c *ActorsClient) GetX(ctx context.Context, id int) *Actors
GetX is like Get, but panics if an error occurs.
func (*ActorsClient) Intercept ¶
func (c *ActorsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `actors.Intercept(f(g(h())))`.
func (*ActorsClient) Interceptors ¶
func (c *ActorsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ActorsClient) MapCreateBulk ¶
func (c *ActorsClient) MapCreateBulk(slice any, setFunc func(*ActorsCreate, int)) *ActorsCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ActorsClient) Query ¶
func (c *ActorsClient) Query() *ActorsQuery
Query returns a query builder for Actors.
func (*ActorsClient) Update ¶
func (c *ActorsClient) Update() *ActorsUpdate
Update returns an update builder for Actors.
func (*ActorsClient) UpdateOne ¶
func (c *ActorsClient) UpdateOne(a *Actors) *ActorsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ActorsClient) UpdateOneID ¶
func (c *ActorsClient) UpdateOneID(id int) *ActorsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ActorsClient) Use ¶
func (c *ActorsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `actors.Hooks(f(g(h())))`.
type ActorsCreate ¶
type ActorsCreate struct {
// contains filtered or unexported fields
}
ActorsCreate is the builder for creating a Actors entity.
func (*ActorsCreate) Exec ¶
func (ac *ActorsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ActorsCreate) ExecX ¶
func (ac *ActorsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActorsCreate) Mutation ¶
func (ac *ActorsCreate) Mutation() *ActorsMutation
Mutation returns the ActorsMutation object of the builder.
type ActorsCreateBulk ¶
type ActorsCreateBulk struct {
// contains filtered or unexported fields
}
ActorsCreateBulk is the builder for creating many Actors entities in bulk.
func (*ActorsCreateBulk) Exec ¶
func (acb *ActorsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ActorsCreateBulk) ExecX ¶
func (acb *ActorsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ActorsDelete ¶
type ActorsDelete struct {
// contains filtered or unexported fields
}
ActorsDelete is the builder for deleting a Actors entity.
func (*ActorsDelete) Exec ¶
func (ad *ActorsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ActorsDelete) ExecX ¶
func (ad *ActorsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ActorsDelete) Where ¶
func (ad *ActorsDelete) Where(ps ...predicate.Actors) *ActorsDelete
Where appends a list predicates to the ActorsDelete builder.
type ActorsDeleteOne ¶
type ActorsDeleteOne struct {
// contains filtered or unexported fields
}
ActorsDeleteOne is the builder for deleting a single Actors entity.
func (*ActorsDeleteOne) Exec ¶
func (ado *ActorsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ActorsDeleteOne) ExecX ¶
func (ado *ActorsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActorsDeleteOne) Where ¶
func (ado *ActorsDeleteOne) Where(ps ...predicate.Actors) *ActorsDeleteOne
Where appends a list predicates to the ActorsDelete builder.
type ActorsGroupBy ¶
type ActorsGroupBy struct {
// contains filtered or unexported fields
}
ActorsGroupBy is the group-by builder for Actors entities.
func (*ActorsGroupBy) Aggregate ¶
func (agb *ActorsGroupBy) Aggregate(fns ...AggregateFunc) *ActorsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ActorsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ActorsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ActorsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ActorsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ActorsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ActorsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ActorsGroupBy) Scan ¶
func (agb *ActorsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ActorsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ActorsMutation ¶
type ActorsMutation struct {
// contains filtered or unexported fields
}
ActorsMutation represents an operation that mutates the Actors nodes in the graph.
func (*ActorsMutation) AddField ¶
func (m *ActorsMutation) 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 (*ActorsMutation) AddedEdges ¶
func (m *ActorsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ActorsMutation) AddedField ¶
func (m *ActorsMutation) 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 (*ActorsMutation) AddedFields ¶
func (m *ActorsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ActorsMutation) AddedIDs ¶
func (m *ActorsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ActorsMutation) ClearEdge ¶
func (m *ActorsMutation) 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 (*ActorsMutation) ClearField ¶
func (m *ActorsMutation) 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 (*ActorsMutation) ClearedEdges ¶
func (m *ActorsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ActorsMutation) ClearedFields ¶
func (m *ActorsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ActorsMutation) Client ¶
func (m ActorsMutation) 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 (*ActorsMutation) EdgeCleared ¶
func (m *ActorsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ActorsMutation) Field ¶
func (m *ActorsMutation) 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 (*ActorsMutation) FieldCleared ¶
func (m *ActorsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ActorsMutation) Fields ¶
func (m *ActorsMutation) 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 (*ActorsMutation) ID ¶
func (m *ActorsMutation) 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 (*ActorsMutation) IDs ¶
func (m *ActorsMutation) 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 (*ActorsMutation) 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 (*ActorsMutation) RemovedEdges ¶
func (m *ActorsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ActorsMutation) RemovedIDs ¶
func (m *ActorsMutation) 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 (*ActorsMutation) ResetEdge ¶
func (m *ActorsMutation) 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 (*ActorsMutation) ResetField ¶
func (m *ActorsMutation) 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 (*ActorsMutation) SetField ¶
func (m *ActorsMutation) 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 (*ActorsMutation) SetOp ¶
func (m *ActorsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ActorsMutation) Tx ¶
func (m ActorsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ActorsMutation) Type ¶
func (m *ActorsMutation) Type() string
Type returns the node type of this mutation (Actors).
func (*ActorsMutation) Where ¶
func (m *ActorsMutation) Where(ps ...predicate.Actors)
Where appends a list predicates to the ActorsMutation builder.
func (*ActorsMutation) WhereP ¶
func (m *ActorsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ActorsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ActorsQuery ¶
type ActorsQuery struct {
// contains filtered or unexported fields
}
ActorsQuery is the builder for querying Actors entities.
func (*ActorsQuery) Aggregate ¶
func (aq *ActorsQuery) Aggregate(fns ...AggregateFunc) *ActorsSelect
Aggregate returns a ActorsSelect configured with the given aggregations.
func (*ActorsQuery) All ¶
func (aq *ActorsQuery) All(ctx context.Context) ([]*Actors, error)
All executes the query and returns a list of ActorsSlice.
func (*ActorsQuery) AllX ¶
func (aq *ActorsQuery) AllX(ctx context.Context) []*Actors
AllX is like All, but panics if an error occurs.
func (*ActorsQuery) Clone ¶
func (aq *ActorsQuery) Clone() *ActorsQuery
Clone returns a duplicate of the ActorsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ActorsQuery) Count ¶
func (aq *ActorsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ActorsQuery) CountX ¶
func (aq *ActorsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ActorsQuery) Exist ¶
func (aq *ActorsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ActorsQuery) ExistX ¶
func (aq *ActorsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ActorsQuery) First ¶
func (aq *ActorsQuery) First(ctx context.Context) (*Actors, error)
First returns the first Actors entity from the query. Returns a *NotFoundError when no Actors was found.
func (*ActorsQuery) FirstID ¶
func (aq *ActorsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Actors ID from the query. Returns a *NotFoundError when no Actors ID was found.
func (*ActorsQuery) FirstIDX ¶
func (aq *ActorsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ActorsQuery) FirstX ¶
func (aq *ActorsQuery) FirstX(ctx context.Context) *Actors
FirstX is like First, but panics if an error occurs.
func (*ActorsQuery) GroupBy ¶
func (aq *ActorsQuery) GroupBy(field string, fields ...string) *ActorsGroupBy
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.
func (*ActorsQuery) IDs ¶
func (aq *ActorsQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Actors IDs.
func (*ActorsQuery) IDsX ¶
func (aq *ActorsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ActorsQuery) Limit ¶
func (aq *ActorsQuery) Limit(limit int) *ActorsQuery
Limit the number of records to be returned by this query.
func (*ActorsQuery) Offset ¶
func (aq *ActorsQuery) Offset(offset int) *ActorsQuery
Offset to start from.
func (*ActorsQuery) Only ¶
func (aq *ActorsQuery) Only(ctx context.Context) (*Actors, error)
Only returns a single Actors entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Actors entity is found. Returns a *NotFoundError when no Actors entities are found.
func (*ActorsQuery) OnlyID ¶
func (aq *ActorsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Actors ID in the query. Returns a *NotSingularError when more than one Actors ID is found. Returns a *NotFoundError when no entities are found.
func (*ActorsQuery) OnlyIDX ¶
func (aq *ActorsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ActorsQuery) OnlyX ¶
func (aq *ActorsQuery) OnlyX(ctx context.Context) *Actors
OnlyX is like Only, but panics if an error occurs.
func (*ActorsQuery) Order ¶
func (aq *ActorsQuery) Order(o ...actors.OrderOption) *ActorsQuery
Order specifies how the records should be ordered.
func (*ActorsQuery) Select ¶
func (aq *ActorsQuery) Select(fields ...string) *ActorsSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*ActorsQuery) Unique ¶
func (aq *ActorsQuery) Unique(unique bool) *ActorsQuery
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 (*ActorsQuery) Where ¶
func (aq *ActorsQuery) Where(ps ...predicate.Actors) *ActorsQuery
Where adds a new predicate for the ActorsQuery builder.
type ActorsSelect ¶
type ActorsSelect struct { *ActorsQuery // contains filtered or unexported fields }
ActorsSelect is the builder for selecting fields of Actors entities.
func (*ActorsSelect) Aggregate ¶
func (as *ActorsSelect) Aggregate(fns ...AggregateFunc) *ActorsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ActorsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ActorsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ActorsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ActorsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ActorsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ActorsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ActorsSelect) Scan ¶
func (as *ActorsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ActorsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ActorsUpdate ¶
type ActorsUpdate struct {
// contains filtered or unexported fields
}
ActorsUpdate is the builder for updating Actors entities.
func (*ActorsUpdate) Exec ¶
func (au *ActorsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ActorsUpdate) ExecX ¶
func (au *ActorsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActorsUpdate) Mutation ¶
func (au *ActorsUpdate) Mutation() *ActorsMutation
Mutation returns the ActorsMutation object of the builder.
func (*ActorsUpdate) Save ¶
func (au *ActorsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ActorsUpdate) SaveX ¶
func (au *ActorsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ActorsUpdate) Where ¶
func (au *ActorsUpdate) Where(ps ...predicate.Actors) *ActorsUpdate
Where appends a list predicates to the ActorsUpdate builder.
type ActorsUpdateOne ¶
type ActorsUpdateOne struct {
// contains filtered or unexported fields
}
ActorsUpdateOne is the builder for updating a single Actors entity.
func (*ActorsUpdateOne) Exec ¶
func (auo *ActorsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ActorsUpdateOne) ExecX ¶
func (auo *ActorsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ActorsUpdateOne) Mutation ¶
func (auo *ActorsUpdateOne) Mutation() *ActorsMutation
Mutation returns the ActorsMutation object of the builder.
func (*ActorsUpdateOne) Save ¶
func (auo *ActorsUpdateOne) Save(ctx context.Context) (*Actors, error)
Save executes the query and returns the updated Actors entity.
func (*ActorsUpdateOne) SaveX ¶
func (auo *ActorsUpdateOne) SaveX(ctx context.Context) *Actors
SaveX is like Save, but panics if an error occurs.
func (*ActorsUpdateOne) Select ¶
func (auo *ActorsUpdateOne) Select(field string, fields ...string) *ActorsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ActorsUpdateOne) Where ¶
func (auo *ActorsUpdateOne) Where(ps ...predicate.Actors) *ActorsUpdateOne
Where appends a list predicates to the ActorsUpdate builder.
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 Albums ¶
type Albums struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Date holds the value of the "date" field. Date string `json:"date,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AlbumsQuery when eager-loading is set. Edges AlbumsEdges `json:"edges"` // contains filtered or unexported fields }
Albums is the model entity for the Albums schema.
func (*Albums) QueryArtists ¶
func (a *Albums) QueryArtists() *ArtistsQuery
QueryArtists queries the "artists" edge of the Albums entity.
func (*Albums) QueryImage ¶
func (a *Albums) QueryImage() *ImagesQuery
QueryImage queries the "image" edge of the Albums entity.
func (*Albums) QueryMusics ¶
func (a *Albums) QueryMusics() *MusicsQuery
QueryMusics queries the "musics" edge of the Albums entity.
func (*Albums) QueryUsers ¶
func (a *Albums) QueryUsers() *UsersQuery
QueryUsers queries the "users" edge of the Albums entity.
func (*Albums) Unwrap ¶
Unwrap unwraps the Albums 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 (*Albums) Update ¶
func (a *Albums) Update() *AlbumsUpdateOne
Update returns a builder for updating this Albums. Note that you need to call Albums.Unwrap() before calling this method if this Albums was returned from a transaction, and the transaction was committed or rolled back.
type AlbumsClient ¶
type AlbumsClient struct {
// contains filtered or unexported fields
}
AlbumsClient is a client for the Albums schema.
func NewAlbumsClient ¶
func NewAlbumsClient(c config) *AlbumsClient
NewAlbumsClient returns a client for the Albums from the given config.
func (*AlbumsClient) Create ¶
func (c *AlbumsClient) Create() *AlbumsCreate
Create returns a builder for creating a Albums entity.
func (*AlbumsClient) CreateBulk ¶
func (c *AlbumsClient) CreateBulk(builders ...*AlbumsCreate) *AlbumsCreateBulk
CreateBulk returns a builder for creating a bulk of Albums entities.
func (*AlbumsClient) Delete ¶
func (c *AlbumsClient) Delete() *AlbumsDelete
Delete returns a delete builder for Albums.
func (*AlbumsClient) DeleteOne ¶
func (c *AlbumsClient) DeleteOne(a *Albums) *AlbumsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AlbumsClient) DeleteOneID ¶
func (c *AlbumsClient) DeleteOneID(id uint64) *AlbumsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AlbumsClient) GetX ¶
func (c *AlbumsClient) GetX(ctx context.Context, id uint64) *Albums
GetX is like Get, but panics if an error occurs.
func (*AlbumsClient) Intercept ¶
func (c *AlbumsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `albums.Intercept(f(g(h())))`.
func (*AlbumsClient) Interceptors ¶
func (c *AlbumsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AlbumsClient) MapCreateBulk ¶
func (c *AlbumsClient) MapCreateBulk(slice any, setFunc func(*AlbumsCreate, int)) *AlbumsCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*AlbumsClient) Query ¶
func (c *AlbumsClient) Query() *AlbumsQuery
Query returns a query builder for Albums.
func (*AlbumsClient) QueryArtists ¶
func (c *AlbumsClient) QueryArtists(a *Albums) *ArtistsQuery
QueryArtists queries the artists edge of a Albums.
func (*AlbumsClient) QueryImage ¶
func (c *AlbumsClient) QueryImage(a *Albums) *ImagesQuery
QueryImage queries the image edge of a Albums.
func (*AlbumsClient) QueryMusics ¶
func (c *AlbumsClient) QueryMusics(a *Albums) *MusicsQuery
QueryMusics queries the musics edge of a Albums.
func (*AlbumsClient) QueryUsers ¶
func (c *AlbumsClient) QueryUsers(a *Albums) *UsersQuery
QueryUsers queries the users edge of a Albums.
func (*AlbumsClient) Update ¶
func (c *AlbumsClient) Update() *AlbumsUpdate
Update returns an update builder for Albums.
func (*AlbumsClient) UpdateOne ¶
func (c *AlbumsClient) UpdateOne(a *Albums) *AlbumsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AlbumsClient) UpdateOneID ¶
func (c *AlbumsClient) UpdateOneID(id uint64) *AlbumsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AlbumsClient) Use ¶
func (c *AlbumsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `albums.Hooks(f(g(h())))`.
type AlbumsCreate ¶
type AlbumsCreate struct {
// contains filtered or unexported fields
}
AlbumsCreate is the builder for creating a Albums entity.
func (*AlbumsCreate) AddArtistIDs ¶
func (ac *AlbumsCreate) AddArtistIDs(ids ...uint64) *AlbumsCreate
AddArtistIDs adds the "artists" edge to the Artists entity by IDs.
func (*AlbumsCreate) AddArtists ¶
func (ac *AlbumsCreate) AddArtists(a ...*Artists) *AlbumsCreate
AddArtists adds the "artists" edges to the Artists entity.
func (*AlbumsCreate) AddMusicIDs ¶
func (ac *AlbumsCreate) AddMusicIDs(ids ...uint64) *AlbumsCreate
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*AlbumsCreate) AddMusics ¶
func (ac *AlbumsCreate) AddMusics(m ...*Musics) *AlbumsCreate
AddMusics adds the "musics" edges to the Musics entity.
func (*AlbumsCreate) AddUserIDs ¶
func (ac *AlbumsCreate) AddUserIDs(ids ...uint64) *AlbumsCreate
AddUserIDs adds the "users" edge to the Users entity by IDs.
func (*AlbumsCreate) AddUsers ¶
func (ac *AlbumsCreate) AddUsers(u ...*Users) *AlbumsCreate
AddUsers adds the "users" edges to the Users entity.
func (*AlbumsCreate) Exec ¶
func (ac *AlbumsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AlbumsCreate) ExecX ¶
func (ac *AlbumsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlbumsCreate) Mutation ¶
func (ac *AlbumsCreate) Mutation() *AlbumsMutation
Mutation returns the AlbumsMutation object of the builder.
func (*AlbumsCreate) Save ¶
func (ac *AlbumsCreate) Save(ctx context.Context) (*Albums, error)
Save creates the Albums in the database.
func (*AlbumsCreate) SaveX ¶
func (ac *AlbumsCreate) SaveX(ctx context.Context) *Albums
SaveX calls Save and panics if Save returns an error.
func (*AlbumsCreate) SetCreateTime ¶
func (ac *AlbumsCreate) SetCreateTime(t time.Time) *AlbumsCreate
SetCreateTime sets the "create_time" field.
func (*AlbumsCreate) SetDate ¶
func (ac *AlbumsCreate) SetDate(s string) *AlbumsCreate
SetDate sets the "date" field.
func (*AlbumsCreate) SetDescription ¶
func (ac *AlbumsCreate) SetDescription(s string) *AlbumsCreate
SetDescription sets the "description" field.
func (*AlbumsCreate) SetID ¶
func (ac *AlbumsCreate) SetID(u uint64) *AlbumsCreate
SetID sets the "id" field.
func (*AlbumsCreate) SetImage ¶
func (ac *AlbumsCreate) SetImage(i *Images) *AlbumsCreate
SetImage sets the "image" edge to the Images entity.
func (*AlbumsCreate) SetImageID ¶
func (ac *AlbumsCreate) SetImageID(id uint64) *AlbumsCreate
SetImageID sets the "image" edge to the Images entity by ID.
func (*AlbumsCreate) SetNillableCreateTime ¶
func (ac *AlbumsCreate) SetNillableCreateTime(t *time.Time) *AlbumsCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*AlbumsCreate) SetNillableDescription ¶
func (ac *AlbumsCreate) SetNillableDescription(s *string) *AlbumsCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*AlbumsCreate) SetNillableUpdateTime ¶
func (ac *AlbumsCreate) SetNillableUpdateTime(t *time.Time) *AlbumsCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*AlbumsCreate) SetTitle ¶
func (ac *AlbumsCreate) SetTitle(s string) *AlbumsCreate
SetTitle sets the "title" field.
func (*AlbumsCreate) SetUpdateTime ¶
func (ac *AlbumsCreate) SetUpdateTime(t time.Time) *AlbumsCreate
SetUpdateTime sets the "update_time" field.
type AlbumsCreateBulk ¶
type AlbumsCreateBulk struct {
// contains filtered or unexported fields
}
AlbumsCreateBulk is the builder for creating many Albums entities in bulk.
func (*AlbumsCreateBulk) Exec ¶
func (acb *AlbumsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AlbumsCreateBulk) ExecX ¶
func (acb *AlbumsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AlbumsDelete ¶
type AlbumsDelete struct {
// contains filtered or unexported fields
}
AlbumsDelete is the builder for deleting a Albums entity.
func (*AlbumsDelete) Exec ¶
func (ad *AlbumsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AlbumsDelete) ExecX ¶
func (ad *AlbumsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AlbumsDelete) Where ¶
func (ad *AlbumsDelete) Where(ps ...predicate.Albums) *AlbumsDelete
Where appends a list predicates to the AlbumsDelete builder.
type AlbumsDeleteOne ¶
type AlbumsDeleteOne struct {
// contains filtered or unexported fields
}
AlbumsDeleteOne is the builder for deleting a single Albums entity.
func (*AlbumsDeleteOne) Exec ¶
func (ado *AlbumsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AlbumsDeleteOne) ExecX ¶
func (ado *AlbumsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlbumsDeleteOne) Where ¶
func (ado *AlbumsDeleteOne) Where(ps ...predicate.Albums) *AlbumsDeleteOne
Where appends a list predicates to the AlbumsDelete builder.
type AlbumsEdges ¶
type AlbumsEdges struct { // Image holds the value of the image edge. Image *Images `json:"image,omitempty"` // Musics holds the value of the musics edge. Musics []*Musics `json:"musics,omitempty"` // Users holds the value of the users edge. Users []*Users `json:"users,omitempty"` // Artists holds the value of the artists edge. Artists []*Artists `json:"artists,omitempty"` // contains filtered or unexported fields }
AlbumsEdges holds the relations/edges for other nodes in the graph.
func (AlbumsEdges) ArtistsOrErr ¶
func (e AlbumsEdges) ArtistsOrErr() ([]*Artists, error)
ArtistsOrErr returns the Artists value or an error if the edge was not loaded in eager-loading.
func (AlbumsEdges) ImageOrErr ¶
func (e AlbumsEdges) ImageOrErr() (*Images, error)
ImageOrErr returns the Image value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (AlbumsEdges) MusicsOrErr ¶
func (e AlbumsEdges) MusicsOrErr() ([]*Musics, error)
MusicsOrErr returns the Musics value or an error if the edge was not loaded in eager-loading.
func (AlbumsEdges) UsersOrErr ¶
func (e AlbumsEdges) UsersOrErr() ([]*Users, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type AlbumsGroupBy ¶
type AlbumsGroupBy struct {
// contains filtered or unexported fields
}
AlbumsGroupBy is the group-by builder for Albums entities.
func (*AlbumsGroupBy) Aggregate ¶
func (agb *AlbumsGroupBy) Aggregate(fns ...AggregateFunc) *AlbumsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AlbumsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AlbumsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AlbumsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AlbumsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AlbumsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AlbumsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AlbumsGroupBy) Scan ¶
func (agb *AlbumsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AlbumsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AlbumsMutation ¶
type AlbumsMutation struct {
// contains filtered or unexported fields
}
AlbumsMutation represents an operation that mutates the Albums nodes in the graph.
func (*AlbumsMutation) AddArtistIDs ¶
func (m *AlbumsMutation) AddArtistIDs(ids ...uint64)
AddArtistIDs adds the "artists" edge to the Artists entity by ids.
func (*AlbumsMutation) AddField ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) AddMusicIDs ¶
func (m *AlbumsMutation) AddMusicIDs(ids ...uint64)
AddMusicIDs adds the "musics" edge to the Musics entity by ids.
func (*AlbumsMutation) AddUserIDs ¶
func (m *AlbumsMutation) AddUserIDs(ids ...uint64)
AddUserIDs adds the "users" edge to the Users entity by ids.
func (*AlbumsMutation) AddedEdges ¶
func (m *AlbumsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AlbumsMutation) AddedField ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) AddedFields ¶
func (m *AlbumsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AlbumsMutation) AddedIDs ¶
func (m *AlbumsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AlbumsMutation) ArtistsCleared ¶
func (m *AlbumsMutation) ArtistsCleared() bool
ArtistsCleared reports if the "artists" edge to the Artists entity was cleared.
func (*AlbumsMutation) ArtistsIDs ¶
func (m *AlbumsMutation) ArtistsIDs() (ids []uint64)
ArtistsIDs returns the "artists" edge IDs in the mutation.
func (*AlbumsMutation) ClearArtists ¶
func (m *AlbumsMutation) ClearArtists()
ClearArtists clears the "artists" edge to the Artists entity.
func (*AlbumsMutation) ClearDescription ¶
func (m *AlbumsMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*AlbumsMutation) ClearEdge ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) ClearField ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) ClearImage ¶
func (m *AlbumsMutation) ClearImage()
ClearImage clears the "image" edge to the Images entity.
func (*AlbumsMutation) ClearMusics ¶
func (m *AlbumsMutation) ClearMusics()
ClearMusics clears the "musics" edge to the Musics entity.
func (*AlbumsMutation) ClearUsers ¶
func (m *AlbumsMutation) ClearUsers()
ClearUsers clears the "users" edge to the Users entity.
func (*AlbumsMutation) ClearedEdges ¶
func (m *AlbumsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AlbumsMutation) ClearedFields ¶
func (m *AlbumsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AlbumsMutation) Client ¶
func (m AlbumsMutation) 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 (*AlbumsMutation) CreateTime ¶
func (m *AlbumsMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*AlbumsMutation) Date ¶
func (m *AlbumsMutation) Date() (r string, exists bool)
Date returns the value of the "date" field in the mutation.
func (*AlbumsMutation) Description ¶
func (m *AlbumsMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*AlbumsMutation) DescriptionCleared ¶
func (m *AlbumsMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*AlbumsMutation) EdgeCleared ¶
func (m *AlbumsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AlbumsMutation) Field ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) FieldCleared ¶
func (m *AlbumsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AlbumsMutation) Fields ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) ID ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) IDs ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) ImageCleared ¶
func (m *AlbumsMutation) ImageCleared() bool
ImageCleared reports if the "image" edge to the Images entity was cleared.
func (*AlbumsMutation) ImageID ¶
func (m *AlbumsMutation) ImageID() (id uint64, exists bool)
ImageID returns the "image" edge ID in the mutation.
func (*AlbumsMutation) ImageIDs ¶
func (m *AlbumsMutation) ImageIDs() (ids []uint64)
ImageIDs returns the "image" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ImageID instead. It exists only for internal usage by the builders.
func (*AlbumsMutation) MusicsCleared ¶
func (m *AlbumsMutation) MusicsCleared() bool
MusicsCleared reports if the "musics" edge to the Musics entity was cleared.
func (*AlbumsMutation) MusicsIDs ¶
func (m *AlbumsMutation) MusicsIDs() (ids []uint64)
MusicsIDs returns the "musics" edge IDs in the mutation.
func (*AlbumsMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Albums entity. If the Albums object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlbumsMutation) OldDate ¶
func (m *AlbumsMutation) OldDate(ctx context.Context) (v string, err error)
OldDate returns the old "date" field's value of the Albums entity. If the Albums object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlbumsMutation) OldDescription ¶
func (m *AlbumsMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Albums entity. If the Albums object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlbumsMutation) 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 (*AlbumsMutation) OldTitle ¶
func (m *AlbumsMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Albums entity. If the Albums object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlbumsMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Albums entity. If the Albums object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlbumsMutation) RemoveArtistIDs ¶
func (m *AlbumsMutation) RemoveArtistIDs(ids ...uint64)
RemoveArtistIDs removes the "artists" edge to the Artists entity by IDs.
func (*AlbumsMutation) RemoveMusicIDs ¶
func (m *AlbumsMutation) RemoveMusicIDs(ids ...uint64)
RemoveMusicIDs removes the "musics" edge to the Musics entity by IDs.
func (*AlbumsMutation) RemoveUserIDs ¶
func (m *AlbumsMutation) RemoveUserIDs(ids ...uint64)
RemoveUserIDs removes the "users" edge to the Users entity by IDs.
func (*AlbumsMutation) RemovedArtistsIDs ¶
func (m *AlbumsMutation) RemovedArtistsIDs() (ids []uint64)
RemovedArtists returns the removed IDs of the "artists" edge to the Artists entity.
func (*AlbumsMutation) RemovedEdges ¶
func (m *AlbumsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AlbumsMutation) RemovedIDs ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) RemovedMusicsIDs ¶
func (m *AlbumsMutation) RemovedMusicsIDs() (ids []uint64)
RemovedMusics returns the removed IDs of the "musics" edge to the Musics entity.
func (*AlbumsMutation) RemovedUsersIDs ¶
func (m *AlbumsMutation) RemovedUsersIDs() (ids []uint64)
RemovedUsers returns the removed IDs of the "users" edge to the Users entity.
func (*AlbumsMutation) ResetArtists ¶
func (m *AlbumsMutation) ResetArtists()
ResetArtists resets all changes to the "artists" edge.
func (*AlbumsMutation) ResetCreateTime ¶
func (m *AlbumsMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*AlbumsMutation) ResetDate ¶
func (m *AlbumsMutation) ResetDate()
ResetDate resets all changes to the "date" field.
func (*AlbumsMutation) ResetDescription ¶
func (m *AlbumsMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*AlbumsMutation) ResetEdge ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) ResetField ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) ResetImage ¶
func (m *AlbumsMutation) ResetImage()
ResetImage resets all changes to the "image" edge.
func (*AlbumsMutation) ResetMusics ¶
func (m *AlbumsMutation) ResetMusics()
ResetMusics resets all changes to the "musics" edge.
func (*AlbumsMutation) ResetTitle ¶
func (m *AlbumsMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*AlbumsMutation) ResetUpdateTime ¶
func (m *AlbumsMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*AlbumsMutation) ResetUsers ¶
func (m *AlbumsMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*AlbumsMutation) SetCreateTime ¶
func (m *AlbumsMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*AlbumsMutation) SetDate ¶
func (m *AlbumsMutation) SetDate(s string)
SetDate sets the "date" field.
func (*AlbumsMutation) SetDescription ¶
func (m *AlbumsMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*AlbumsMutation) SetField ¶
func (m *AlbumsMutation) 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 (*AlbumsMutation) SetID ¶
func (m *AlbumsMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Albums entities.
func (*AlbumsMutation) SetImageID ¶
func (m *AlbumsMutation) SetImageID(id uint64)
SetImageID sets the "image" edge to the Images entity by id.
func (*AlbumsMutation) SetOp ¶
func (m *AlbumsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AlbumsMutation) SetTitle ¶
func (m *AlbumsMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*AlbumsMutation) SetUpdateTime ¶
func (m *AlbumsMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*AlbumsMutation) Title ¶
func (m *AlbumsMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (AlbumsMutation) Tx ¶
func (m AlbumsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AlbumsMutation) Type ¶
func (m *AlbumsMutation) Type() string
Type returns the node type of this mutation (Albums).
func (*AlbumsMutation) UpdateTime ¶
func (m *AlbumsMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*AlbumsMutation) UsersCleared ¶
func (m *AlbumsMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the Users entity was cleared.
func (*AlbumsMutation) UsersIDs ¶
func (m *AlbumsMutation) UsersIDs() (ids []uint64)
UsersIDs returns the "users" edge IDs in the mutation.
func (*AlbumsMutation) Where ¶
func (m *AlbumsMutation) Where(ps ...predicate.Albums)
Where appends a list predicates to the AlbumsMutation builder.
func (*AlbumsMutation) WhereP ¶
func (m *AlbumsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AlbumsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AlbumsQuery ¶
type AlbumsQuery struct {
// contains filtered or unexported fields
}
AlbumsQuery is the builder for querying Albums entities.
func (*AlbumsQuery) Aggregate ¶
func (aq *AlbumsQuery) Aggregate(fns ...AggregateFunc) *AlbumsSelect
Aggregate returns a AlbumsSelect configured with the given aggregations.
func (*AlbumsQuery) All ¶
func (aq *AlbumsQuery) All(ctx context.Context) ([]*Albums, error)
All executes the query and returns a list of AlbumsSlice.
func (*AlbumsQuery) AllX ¶
func (aq *AlbumsQuery) AllX(ctx context.Context) []*Albums
AllX is like All, but panics if an error occurs.
func (*AlbumsQuery) Clone ¶
func (aq *AlbumsQuery) Clone() *AlbumsQuery
Clone returns a duplicate of the AlbumsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AlbumsQuery) Count ¶
func (aq *AlbumsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AlbumsQuery) CountX ¶
func (aq *AlbumsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AlbumsQuery) Exist ¶
func (aq *AlbumsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AlbumsQuery) ExistX ¶
func (aq *AlbumsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AlbumsQuery) First ¶
func (aq *AlbumsQuery) First(ctx context.Context) (*Albums, error)
First returns the first Albums entity from the query. Returns a *NotFoundError when no Albums was found.
func (*AlbumsQuery) FirstID ¶
func (aq *AlbumsQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Albums ID from the query. Returns a *NotFoundError when no Albums ID was found.
func (*AlbumsQuery) FirstIDX ¶
func (aq *AlbumsQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*AlbumsQuery) FirstX ¶
func (aq *AlbumsQuery) FirstX(ctx context.Context) *Albums
FirstX is like First, but panics if an error occurs.
func (*AlbumsQuery) GroupBy ¶
func (aq *AlbumsQuery) GroupBy(field string, fields ...string) *AlbumsGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Albums.Query(). GroupBy(albums.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AlbumsQuery) IDs ¶
func (aq *AlbumsQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Albums IDs.
func (*AlbumsQuery) IDsX ¶
func (aq *AlbumsQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*AlbumsQuery) Limit ¶
func (aq *AlbumsQuery) Limit(limit int) *AlbumsQuery
Limit the number of records to be returned by this query.
func (*AlbumsQuery) Offset ¶
func (aq *AlbumsQuery) Offset(offset int) *AlbumsQuery
Offset to start from.
func (*AlbumsQuery) Only ¶
func (aq *AlbumsQuery) Only(ctx context.Context) (*Albums, error)
Only returns a single Albums entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Albums entity is found. Returns a *NotFoundError when no Albums entities are found.
func (*AlbumsQuery) OnlyID ¶
func (aq *AlbumsQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Albums ID in the query. Returns a *NotSingularError when more than one Albums ID is found. Returns a *NotFoundError when no entities are found.
func (*AlbumsQuery) OnlyIDX ¶
func (aq *AlbumsQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AlbumsQuery) OnlyX ¶
func (aq *AlbumsQuery) OnlyX(ctx context.Context) *Albums
OnlyX is like Only, but panics if an error occurs.
func (*AlbumsQuery) Order ¶
func (aq *AlbumsQuery) Order(o ...albums.OrderOption) *AlbumsQuery
Order specifies how the records should be ordered.
func (*AlbumsQuery) QueryArtists ¶
func (aq *AlbumsQuery) QueryArtists() *ArtistsQuery
QueryArtists chains the current query on the "artists" edge.
func (*AlbumsQuery) QueryImage ¶
func (aq *AlbumsQuery) QueryImage() *ImagesQuery
QueryImage chains the current query on the "image" edge.
func (*AlbumsQuery) QueryMusics ¶
func (aq *AlbumsQuery) QueryMusics() *MusicsQuery
QueryMusics chains the current query on the "musics" edge.
func (*AlbumsQuery) QueryUsers ¶
func (aq *AlbumsQuery) QueryUsers() *UsersQuery
QueryUsers chains the current query on the "users" edge.
func (*AlbumsQuery) Select ¶
func (aq *AlbumsQuery) Select(fields ...string) *AlbumsSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Albums.Query(). Select(albums.FieldCreateTime). Scan(ctx, &v)
func (*AlbumsQuery) Unique ¶
func (aq *AlbumsQuery) Unique(unique bool) *AlbumsQuery
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 (*AlbumsQuery) Where ¶
func (aq *AlbumsQuery) Where(ps ...predicate.Albums) *AlbumsQuery
Where adds a new predicate for the AlbumsQuery builder.
func (*AlbumsQuery) WithArtists ¶
func (aq *AlbumsQuery) WithArtists(opts ...func(*ArtistsQuery)) *AlbumsQuery
WithArtists tells the query-builder to eager-load the nodes that are connected to the "artists" edge. The optional arguments are used to configure the query builder of the edge.
func (*AlbumsQuery) WithImage ¶
func (aq *AlbumsQuery) WithImage(opts ...func(*ImagesQuery)) *AlbumsQuery
WithImage tells the query-builder to eager-load the nodes that are connected to the "image" edge. The optional arguments are used to configure the query builder of the edge.
func (*AlbumsQuery) WithMusics ¶
func (aq *AlbumsQuery) WithMusics(opts ...func(*MusicsQuery)) *AlbumsQuery
WithMusics tells the query-builder to eager-load the nodes that are connected to the "musics" edge. The optional arguments are used to configure the query builder of the edge.
func (*AlbumsQuery) WithUsers ¶
func (aq *AlbumsQuery) WithUsers(opts ...func(*UsersQuery)) *AlbumsQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type AlbumsSelect ¶
type AlbumsSelect struct { *AlbumsQuery // contains filtered or unexported fields }
AlbumsSelect is the builder for selecting fields of Albums entities.
func (*AlbumsSelect) Aggregate ¶
func (as *AlbumsSelect) Aggregate(fns ...AggregateFunc) *AlbumsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AlbumsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AlbumsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AlbumsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AlbumsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AlbumsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AlbumsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AlbumsSelect) Scan ¶
func (as *AlbumsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AlbumsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AlbumsUpdate ¶
type AlbumsUpdate struct {
// contains filtered or unexported fields
}
AlbumsUpdate is the builder for updating Albums entities.
func (*AlbumsUpdate) AddArtistIDs ¶
func (au *AlbumsUpdate) AddArtistIDs(ids ...uint64) *AlbumsUpdate
AddArtistIDs adds the "artists" edge to the Artists entity by IDs.
func (*AlbumsUpdate) AddArtists ¶
func (au *AlbumsUpdate) AddArtists(a ...*Artists) *AlbumsUpdate
AddArtists adds the "artists" edges to the Artists entity.
func (*AlbumsUpdate) AddMusicIDs ¶
func (au *AlbumsUpdate) AddMusicIDs(ids ...uint64) *AlbumsUpdate
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*AlbumsUpdate) AddMusics ¶
func (au *AlbumsUpdate) AddMusics(m ...*Musics) *AlbumsUpdate
AddMusics adds the "musics" edges to the Musics entity.
func (*AlbumsUpdate) AddUserIDs ¶
func (au *AlbumsUpdate) AddUserIDs(ids ...uint64) *AlbumsUpdate
AddUserIDs adds the "users" edge to the Users entity by IDs.
func (*AlbumsUpdate) AddUsers ¶
func (au *AlbumsUpdate) AddUsers(u ...*Users) *AlbumsUpdate
AddUsers adds the "users" edges to the Users entity.
func (*AlbumsUpdate) ClearArtists ¶
func (au *AlbumsUpdate) ClearArtists() *AlbumsUpdate
ClearArtists clears all "artists" edges to the Artists entity.
func (*AlbumsUpdate) ClearDescription ¶
func (au *AlbumsUpdate) ClearDescription() *AlbumsUpdate
ClearDescription clears the value of the "description" field.
func (*AlbumsUpdate) ClearImage ¶
func (au *AlbumsUpdate) ClearImage() *AlbumsUpdate
ClearImage clears the "image" edge to the Images entity.
func (*AlbumsUpdate) ClearMusics ¶
func (au *AlbumsUpdate) ClearMusics() *AlbumsUpdate
ClearMusics clears all "musics" edges to the Musics entity.
func (*AlbumsUpdate) ClearUsers ¶
func (au *AlbumsUpdate) ClearUsers() *AlbumsUpdate
ClearUsers clears all "users" edges to the Users entity.
func (*AlbumsUpdate) Exec ¶
func (au *AlbumsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AlbumsUpdate) ExecX ¶
func (au *AlbumsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlbumsUpdate) Mutation ¶
func (au *AlbumsUpdate) Mutation() *AlbumsMutation
Mutation returns the AlbumsMutation object of the builder.
func (*AlbumsUpdate) RemoveArtistIDs ¶
func (au *AlbumsUpdate) RemoveArtistIDs(ids ...uint64) *AlbumsUpdate
RemoveArtistIDs removes the "artists" edge to Artists entities by IDs.
func (*AlbumsUpdate) RemoveArtists ¶
func (au *AlbumsUpdate) RemoveArtists(a ...*Artists) *AlbumsUpdate
RemoveArtists removes "artists" edges to Artists entities.
func (*AlbumsUpdate) RemoveMusicIDs ¶
func (au *AlbumsUpdate) RemoveMusicIDs(ids ...uint64) *AlbumsUpdate
RemoveMusicIDs removes the "musics" edge to Musics entities by IDs.
func (*AlbumsUpdate) RemoveMusics ¶
func (au *AlbumsUpdate) RemoveMusics(m ...*Musics) *AlbumsUpdate
RemoveMusics removes "musics" edges to Musics entities.
func (*AlbumsUpdate) RemoveUserIDs ¶
func (au *AlbumsUpdate) RemoveUserIDs(ids ...uint64) *AlbumsUpdate
RemoveUserIDs removes the "users" edge to Users entities by IDs.
func (*AlbumsUpdate) RemoveUsers ¶
func (au *AlbumsUpdate) RemoveUsers(u ...*Users) *AlbumsUpdate
RemoveUsers removes "users" edges to Users entities.
func (*AlbumsUpdate) Save ¶
func (au *AlbumsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AlbumsUpdate) SaveX ¶
func (au *AlbumsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AlbumsUpdate) SetDate ¶
func (au *AlbumsUpdate) SetDate(s string) *AlbumsUpdate
SetDate sets the "date" field.
func (*AlbumsUpdate) SetDescription ¶
func (au *AlbumsUpdate) SetDescription(s string) *AlbumsUpdate
SetDescription sets the "description" field.
func (*AlbumsUpdate) SetImage ¶
func (au *AlbumsUpdate) SetImage(i *Images) *AlbumsUpdate
SetImage sets the "image" edge to the Images entity.
func (*AlbumsUpdate) SetImageID ¶
func (au *AlbumsUpdate) SetImageID(id uint64) *AlbumsUpdate
SetImageID sets the "image" edge to the Images entity by ID.
func (*AlbumsUpdate) SetNillableDate ¶
func (au *AlbumsUpdate) SetNillableDate(s *string) *AlbumsUpdate
SetNillableDate sets the "date" field if the given value is not nil.
func (*AlbumsUpdate) SetNillableDescription ¶
func (au *AlbumsUpdate) SetNillableDescription(s *string) *AlbumsUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*AlbumsUpdate) SetNillableTitle ¶
func (au *AlbumsUpdate) SetNillableTitle(s *string) *AlbumsUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*AlbumsUpdate) SetTitle ¶
func (au *AlbumsUpdate) SetTitle(s string) *AlbumsUpdate
SetTitle sets the "title" field.
func (*AlbumsUpdate) SetUpdateTime ¶
func (au *AlbumsUpdate) SetUpdateTime(t time.Time) *AlbumsUpdate
SetUpdateTime sets the "update_time" field.
func (*AlbumsUpdate) Where ¶
func (au *AlbumsUpdate) Where(ps ...predicate.Albums) *AlbumsUpdate
Where appends a list predicates to the AlbumsUpdate builder.
type AlbumsUpdateOne ¶
type AlbumsUpdateOne struct {
// contains filtered or unexported fields
}
AlbumsUpdateOne is the builder for updating a single Albums entity.
func (*AlbumsUpdateOne) AddArtistIDs ¶
func (auo *AlbumsUpdateOne) AddArtistIDs(ids ...uint64) *AlbumsUpdateOne
AddArtistIDs adds the "artists" edge to the Artists entity by IDs.
func (*AlbumsUpdateOne) AddArtists ¶
func (auo *AlbumsUpdateOne) AddArtists(a ...*Artists) *AlbumsUpdateOne
AddArtists adds the "artists" edges to the Artists entity.
func (*AlbumsUpdateOne) AddMusicIDs ¶
func (auo *AlbumsUpdateOne) AddMusicIDs(ids ...uint64) *AlbumsUpdateOne
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*AlbumsUpdateOne) AddMusics ¶
func (auo *AlbumsUpdateOne) AddMusics(m ...*Musics) *AlbumsUpdateOne
AddMusics adds the "musics" edges to the Musics entity.
func (*AlbumsUpdateOne) AddUserIDs ¶
func (auo *AlbumsUpdateOne) AddUserIDs(ids ...uint64) *AlbumsUpdateOne
AddUserIDs adds the "users" edge to the Users entity by IDs.
func (*AlbumsUpdateOne) AddUsers ¶
func (auo *AlbumsUpdateOne) AddUsers(u ...*Users) *AlbumsUpdateOne
AddUsers adds the "users" edges to the Users entity.
func (*AlbumsUpdateOne) ClearArtists ¶
func (auo *AlbumsUpdateOne) ClearArtists() *AlbumsUpdateOne
ClearArtists clears all "artists" edges to the Artists entity.
func (*AlbumsUpdateOne) ClearDescription ¶
func (auo *AlbumsUpdateOne) ClearDescription() *AlbumsUpdateOne
ClearDescription clears the value of the "description" field.
func (*AlbumsUpdateOne) ClearImage ¶
func (auo *AlbumsUpdateOne) ClearImage() *AlbumsUpdateOne
ClearImage clears the "image" edge to the Images entity.
func (*AlbumsUpdateOne) ClearMusics ¶
func (auo *AlbumsUpdateOne) ClearMusics() *AlbumsUpdateOne
ClearMusics clears all "musics" edges to the Musics entity.
func (*AlbumsUpdateOne) ClearUsers ¶
func (auo *AlbumsUpdateOne) ClearUsers() *AlbumsUpdateOne
ClearUsers clears all "users" edges to the Users entity.
func (*AlbumsUpdateOne) Exec ¶
func (auo *AlbumsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AlbumsUpdateOne) ExecX ¶
func (auo *AlbumsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlbumsUpdateOne) Mutation ¶
func (auo *AlbumsUpdateOne) Mutation() *AlbumsMutation
Mutation returns the AlbumsMutation object of the builder.
func (*AlbumsUpdateOne) RemoveArtistIDs ¶
func (auo *AlbumsUpdateOne) RemoveArtistIDs(ids ...uint64) *AlbumsUpdateOne
RemoveArtistIDs removes the "artists" edge to Artists entities by IDs.
func (*AlbumsUpdateOne) RemoveArtists ¶
func (auo *AlbumsUpdateOne) RemoveArtists(a ...*Artists) *AlbumsUpdateOne
RemoveArtists removes "artists" edges to Artists entities.
func (*AlbumsUpdateOne) RemoveMusicIDs ¶
func (auo *AlbumsUpdateOne) RemoveMusicIDs(ids ...uint64) *AlbumsUpdateOne
RemoveMusicIDs removes the "musics" edge to Musics entities by IDs.
func (*AlbumsUpdateOne) RemoveMusics ¶
func (auo *AlbumsUpdateOne) RemoveMusics(m ...*Musics) *AlbumsUpdateOne
RemoveMusics removes "musics" edges to Musics entities.
func (*AlbumsUpdateOne) RemoveUserIDs ¶
func (auo *AlbumsUpdateOne) RemoveUserIDs(ids ...uint64) *AlbumsUpdateOne
RemoveUserIDs removes the "users" edge to Users entities by IDs.
func (*AlbumsUpdateOne) RemoveUsers ¶
func (auo *AlbumsUpdateOne) RemoveUsers(u ...*Users) *AlbumsUpdateOne
RemoveUsers removes "users" edges to Users entities.
func (*AlbumsUpdateOne) Save ¶
func (auo *AlbumsUpdateOne) Save(ctx context.Context) (*Albums, error)
Save executes the query and returns the updated Albums entity.
func (*AlbumsUpdateOne) SaveX ¶
func (auo *AlbumsUpdateOne) SaveX(ctx context.Context) *Albums
SaveX is like Save, but panics if an error occurs.
func (*AlbumsUpdateOne) Select ¶
func (auo *AlbumsUpdateOne) Select(field string, fields ...string) *AlbumsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AlbumsUpdateOne) SetDate ¶
func (auo *AlbumsUpdateOne) SetDate(s string) *AlbumsUpdateOne
SetDate sets the "date" field.
func (*AlbumsUpdateOne) SetDescription ¶
func (auo *AlbumsUpdateOne) SetDescription(s string) *AlbumsUpdateOne
SetDescription sets the "description" field.
func (*AlbumsUpdateOne) SetImage ¶
func (auo *AlbumsUpdateOne) SetImage(i *Images) *AlbumsUpdateOne
SetImage sets the "image" edge to the Images entity.
func (*AlbumsUpdateOne) SetImageID ¶
func (auo *AlbumsUpdateOne) SetImageID(id uint64) *AlbumsUpdateOne
SetImageID sets the "image" edge to the Images entity by ID.
func (*AlbumsUpdateOne) SetNillableDate ¶
func (auo *AlbumsUpdateOne) SetNillableDate(s *string) *AlbumsUpdateOne
SetNillableDate sets the "date" field if the given value is not nil.
func (*AlbumsUpdateOne) SetNillableDescription ¶
func (auo *AlbumsUpdateOne) SetNillableDescription(s *string) *AlbumsUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*AlbumsUpdateOne) SetNillableTitle ¶
func (auo *AlbumsUpdateOne) SetNillableTitle(s *string) *AlbumsUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*AlbumsUpdateOne) SetTitle ¶
func (auo *AlbumsUpdateOne) SetTitle(s string) *AlbumsUpdateOne
SetTitle sets the "title" field.
func (*AlbumsUpdateOne) SetUpdateTime ¶
func (auo *AlbumsUpdateOne) SetUpdateTime(t time.Time) *AlbumsUpdateOne
SetUpdateTime sets the "update_time" field.
func (*AlbumsUpdateOne) Where ¶
func (auo *AlbumsUpdateOne) Where(ps ...predicate.Albums) *AlbumsUpdateOne
Where appends a list predicates to the AlbumsUpdate builder.
type Artists ¶
type Artists struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ArtistsQuery when eager-loading is set. Edges ArtistsEdges `json:"edges"` // contains filtered or unexported fields }
Artists is the model entity for the Artists schema.
func (*Artists) QueryAlbums ¶
func (a *Artists) QueryAlbums() *AlbumsQuery
QueryAlbums queries the "albums" edge of the Artists entity.
func (*Artists) QueryMusics ¶
func (a *Artists) QueryMusics() *MusicsQuery
QueryMusics queries the "musics" edge of the Artists entity.
func (*Artists) Unwrap ¶
Unwrap unwraps the Artists 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 (*Artists) Update ¶
func (a *Artists) Update() *ArtistsUpdateOne
Update returns a builder for updating this Artists. Note that you need to call Artists.Unwrap() before calling this method if this Artists was returned from a transaction, and the transaction was committed or rolled back.
type ArtistsClient ¶
type ArtistsClient struct {
// contains filtered or unexported fields
}
ArtistsClient is a client for the Artists schema.
func NewArtistsClient ¶
func NewArtistsClient(c config) *ArtistsClient
NewArtistsClient returns a client for the Artists from the given config.
func (*ArtistsClient) Create ¶
func (c *ArtistsClient) Create() *ArtistsCreate
Create returns a builder for creating a Artists entity.
func (*ArtistsClient) CreateBulk ¶
func (c *ArtistsClient) CreateBulk(builders ...*ArtistsCreate) *ArtistsCreateBulk
CreateBulk returns a builder for creating a bulk of Artists entities.
func (*ArtistsClient) Delete ¶
func (c *ArtistsClient) Delete() *ArtistsDelete
Delete returns a delete builder for Artists.
func (*ArtistsClient) DeleteOne ¶
func (c *ArtistsClient) DeleteOne(a *Artists) *ArtistsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ArtistsClient) DeleteOneID ¶
func (c *ArtistsClient) DeleteOneID(id uint64) *ArtistsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ArtistsClient) GetX ¶
func (c *ArtistsClient) GetX(ctx context.Context, id uint64) *Artists
GetX is like Get, but panics if an error occurs.
func (*ArtistsClient) Hooks ¶
func (c *ArtistsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ArtistsClient) Intercept ¶
func (c *ArtistsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `artists.Intercept(f(g(h())))`.
func (*ArtistsClient) Interceptors ¶
func (c *ArtistsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ArtistsClient) MapCreateBulk ¶
func (c *ArtistsClient) MapCreateBulk(slice any, setFunc func(*ArtistsCreate, int)) *ArtistsCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ArtistsClient) Query ¶
func (c *ArtistsClient) Query() *ArtistsQuery
Query returns a query builder for Artists.
func (*ArtistsClient) QueryAlbums ¶
func (c *ArtistsClient) QueryAlbums(a *Artists) *AlbumsQuery
QueryAlbums queries the albums edge of a Artists.
func (*ArtistsClient) QueryMusics ¶
func (c *ArtistsClient) QueryMusics(a *Artists) *MusicsQuery
QueryMusics queries the musics edge of a Artists.
func (*ArtistsClient) Update ¶
func (c *ArtistsClient) Update() *ArtistsUpdate
Update returns an update builder for Artists.
func (*ArtistsClient) UpdateOne ¶
func (c *ArtistsClient) UpdateOne(a *Artists) *ArtistsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ArtistsClient) UpdateOneID ¶
func (c *ArtistsClient) UpdateOneID(id uint64) *ArtistsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ArtistsClient) Use ¶
func (c *ArtistsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `artists.Hooks(f(g(h())))`.
type ArtistsCreate ¶
type ArtistsCreate struct {
// contains filtered or unexported fields
}
ArtistsCreate is the builder for creating a Artists entity.
func (*ArtistsCreate) AddAlbumIDs ¶
func (ac *ArtistsCreate) AddAlbumIDs(ids ...uint64) *ArtistsCreate
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*ArtistsCreate) AddAlbums ¶
func (ac *ArtistsCreate) AddAlbums(a ...*Albums) *ArtistsCreate
AddAlbums adds the "albums" edges to the Albums entity.
func (*ArtistsCreate) AddMusicIDs ¶
func (ac *ArtistsCreate) AddMusicIDs(ids ...uint64) *ArtistsCreate
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*ArtistsCreate) AddMusics ¶
func (ac *ArtistsCreate) AddMusics(m ...*Musics) *ArtistsCreate
AddMusics adds the "musics" edges to the Musics entity.
func (*ArtistsCreate) Exec ¶
func (ac *ArtistsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ArtistsCreate) ExecX ¶
func (ac *ArtistsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ArtistsCreate) Mutation ¶
func (ac *ArtistsCreate) Mutation() *ArtistsMutation
Mutation returns the ArtistsMutation object of the builder.
func (*ArtistsCreate) Save ¶
func (ac *ArtistsCreate) Save(ctx context.Context) (*Artists, error)
Save creates the Artists in the database.
func (*ArtistsCreate) SaveX ¶
func (ac *ArtistsCreate) SaveX(ctx context.Context) *Artists
SaveX calls Save and panics if Save returns an error.
func (*ArtistsCreate) SetID ¶
func (ac *ArtistsCreate) SetID(u uint64) *ArtistsCreate
SetID sets the "id" field.
func (*ArtistsCreate) SetName ¶
func (ac *ArtistsCreate) SetName(s string) *ArtistsCreate
SetName sets the "name" field.
type ArtistsCreateBulk ¶
type ArtistsCreateBulk struct {
// contains filtered or unexported fields
}
ArtistsCreateBulk is the builder for creating many Artists entities in bulk.
func (*ArtistsCreateBulk) Exec ¶
func (acb *ArtistsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ArtistsCreateBulk) ExecX ¶
func (acb *ArtistsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ArtistsDelete ¶
type ArtistsDelete struct {
// contains filtered or unexported fields
}
ArtistsDelete is the builder for deleting a Artists entity.
func (*ArtistsDelete) Exec ¶
func (ad *ArtistsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ArtistsDelete) ExecX ¶
func (ad *ArtistsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ArtistsDelete) Where ¶
func (ad *ArtistsDelete) Where(ps ...predicate.Artists) *ArtistsDelete
Where appends a list predicates to the ArtistsDelete builder.
type ArtistsDeleteOne ¶
type ArtistsDeleteOne struct {
// contains filtered or unexported fields
}
ArtistsDeleteOne is the builder for deleting a single Artists entity.
func (*ArtistsDeleteOne) Exec ¶
func (ado *ArtistsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ArtistsDeleteOne) ExecX ¶
func (ado *ArtistsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ArtistsDeleteOne) Where ¶
func (ado *ArtistsDeleteOne) Where(ps ...predicate.Artists) *ArtistsDeleteOne
Where appends a list predicates to the ArtistsDelete builder.
type ArtistsEdges ¶
type ArtistsEdges struct { // Musics holds the value of the musics edge. Musics []*Musics `json:"musics,omitempty"` // Albums holds the value of the albums edge. Albums []*Albums `json:"albums,omitempty"` // contains filtered or unexported fields }
ArtistsEdges holds the relations/edges for other nodes in the graph.
func (ArtistsEdges) AlbumsOrErr ¶
func (e ArtistsEdges) AlbumsOrErr() ([]*Albums, error)
AlbumsOrErr returns the Albums value or an error if the edge was not loaded in eager-loading.
func (ArtistsEdges) MusicsOrErr ¶
func (e ArtistsEdges) MusicsOrErr() ([]*Musics, error)
MusicsOrErr returns the Musics value or an error if the edge was not loaded in eager-loading.
type ArtistsGroupBy ¶
type ArtistsGroupBy struct {
// contains filtered or unexported fields
}
ArtistsGroupBy is the group-by builder for Artists entities.
func (*ArtistsGroupBy) Aggregate ¶
func (agb *ArtistsGroupBy) Aggregate(fns ...AggregateFunc) *ArtistsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ArtistsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ArtistsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ArtistsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ArtistsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ArtistsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ArtistsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ArtistsGroupBy) Scan ¶
func (agb *ArtistsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ArtistsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ArtistsMutation ¶
type ArtistsMutation struct {
// contains filtered or unexported fields
}
ArtistsMutation represents an operation that mutates the Artists nodes in the graph.
func (*ArtistsMutation) AddAlbumIDs ¶
func (m *ArtistsMutation) AddAlbumIDs(ids ...uint64)
AddAlbumIDs adds the "albums" edge to the Albums entity by ids.
func (*ArtistsMutation) AddField ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) AddMusicIDs ¶
func (m *ArtistsMutation) AddMusicIDs(ids ...uint64)
AddMusicIDs adds the "musics" edge to the Musics entity by ids.
func (*ArtistsMutation) AddedEdges ¶
func (m *ArtistsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ArtistsMutation) AddedField ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) AddedFields ¶
func (m *ArtistsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ArtistsMutation) AddedIDs ¶
func (m *ArtistsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ArtistsMutation) AlbumsCleared ¶
func (m *ArtistsMutation) AlbumsCleared() bool
AlbumsCleared reports if the "albums" edge to the Albums entity was cleared.
func (*ArtistsMutation) AlbumsIDs ¶
func (m *ArtistsMutation) AlbumsIDs() (ids []uint64)
AlbumsIDs returns the "albums" edge IDs in the mutation.
func (*ArtistsMutation) ClearAlbums ¶
func (m *ArtistsMutation) ClearAlbums()
ClearAlbums clears the "albums" edge to the Albums entity.
func (*ArtistsMutation) ClearEdge ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) ClearField ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) ClearMusics ¶
func (m *ArtistsMutation) ClearMusics()
ClearMusics clears the "musics" edge to the Musics entity.
func (*ArtistsMutation) ClearedEdges ¶
func (m *ArtistsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ArtistsMutation) ClearedFields ¶
func (m *ArtistsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ArtistsMutation) Client ¶
func (m ArtistsMutation) 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 (*ArtistsMutation) EdgeCleared ¶
func (m *ArtistsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ArtistsMutation) Field ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) FieldCleared ¶
func (m *ArtistsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ArtistsMutation) Fields ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) ID ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) IDs ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) MusicsCleared ¶
func (m *ArtistsMutation) MusicsCleared() bool
MusicsCleared reports if the "musics" edge to the Musics entity was cleared.
func (*ArtistsMutation) MusicsIDs ¶
func (m *ArtistsMutation) MusicsIDs() (ids []uint64)
MusicsIDs returns the "musics" edge IDs in the mutation.
func (*ArtistsMutation) Name ¶
func (m *ArtistsMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ArtistsMutation) 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 (*ArtistsMutation) OldName ¶
func (m *ArtistsMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Artists entity. If the Artists object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ArtistsMutation) RemoveAlbumIDs ¶
func (m *ArtistsMutation) RemoveAlbumIDs(ids ...uint64)
RemoveAlbumIDs removes the "albums" edge to the Albums entity by IDs.
func (*ArtistsMutation) RemoveMusicIDs ¶
func (m *ArtistsMutation) RemoveMusicIDs(ids ...uint64)
RemoveMusicIDs removes the "musics" edge to the Musics entity by IDs.
func (*ArtistsMutation) RemovedAlbumsIDs ¶
func (m *ArtistsMutation) RemovedAlbumsIDs() (ids []uint64)
RemovedAlbums returns the removed IDs of the "albums" edge to the Albums entity.
func (*ArtistsMutation) RemovedEdges ¶
func (m *ArtistsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ArtistsMutation) RemovedIDs ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) RemovedMusicsIDs ¶
func (m *ArtistsMutation) RemovedMusicsIDs() (ids []uint64)
RemovedMusics returns the removed IDs of the "musics" edge to the Musics entity.
func (*ArtistsMutation) ResetAlbums ¶
func (m *ArtistsMutation) ResetAlbums()
ResetAlbums resets all changes to the "albums" edge.
func (*ArtistsMutation) ResetEdge ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) ResetField ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) ResetMusics ¶
func (m *ArtistsMutation) ResetMusics()
ResetMusics resets all changes to the "musics" edge.
func (*ArtistsMutation) ResetName ¶
func (m *ArtistsMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ArtistsMutation) SetField ¶
func (m *ArtistsMutation) 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 (*ArtistsMutation) SetID ¶
func (m *ArtistsMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Artists entities.
func (*ArtistsMutation) SetName ¶
func (m *ArtistsMutation) SetName(s string)
SetName sets the "name" field.
func (*ArtistsMutation) SetOp ¶
func (m *ArtistsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ArtistsMutation) Tx ¶
func (m ArtistsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ArtistsMutation) Type ¶
func (m *ArtistsMutation) Type() string
Type returns the node type of this mutation (Artists).
func (*ArtistsMutation) Where ¶
func (m *ArtistsMutation) Where(ps ...predicate.Artists)
Where appends a list predicates to the ArtistsMutation builder.
func (*ArtistsMutation) WhereP ¶
func (m *ArtistsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ArtistsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ArtistsQuery ¶
type ArtistsQuery struct {
// contains filtered or unexported fields
}
ArtistsQuery is the builder for querying Artists entities.
func (*ArtistsQuery) Aggregate ¶
func (aq *ArtistsQuery) Aggregate(fns ...AggregateFunc) *ArtistsSelect
Aggregate returns a ArtistsSelect configured with the given aggregations.
func (*ArtistsQuery) All ¶
func (aq *ArtistsQuery) All(ctx context.Context) ([]*Artists, error)
All executes the query and returns a list of ArtistsSlice.
func (*ArtistsQuery) AllX ¶
func (aq *ArtistsQuery) AllX(ctx context.Context) []*Artists
AllX is like All, but panics if an error occurs.
func (*ArtistsQuery) Clone ¶
func (aq *ArtistsQuery) Clone() *ArtistsQuery
Clone returns a duplicate of the ArtistsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ArtistsQuery) Count ¶
func (aq *ArtistsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ArtistsQuery) CountX ¶
func (aq *ArtistsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ArtistsQuery) Exist ¶
func (aq *ArtistsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ArtistsQuery) ExistX ¶
func (aq *ArtistsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ArtistsQuery) First ¶
func (aq *ArtistsQuery) First(ctx context.Context) (*Artists, error)
First returns the first Artists entity from the query. Returns a *NotFoundError when no Artists was found.
func (*ArtistsQuery) FirstID ¶
func (aq *ArtistsQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Artists ID from the query. Returns a *NotFoundError when no Artists ID was found.
func (*ArtistsQuery) FirstIDX ¶
func (aq *ArtistsQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*ArtistsQuery) FirstX ¶
func (aq *ArtistsQuery) FirstX(ctx context.Context) *Artists
FirstX is like First, but panics if an error occurs.
func (*ArtistsQuery) GroupBy ¶
func (aq *ArtistsQuery) GroupBy(field string, fields ...string) *ArtistsGroupBy
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.Artists.Query(). GroupBy(artists.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ArtistsQuery) IDs ¶
func (aq *ArtistsQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Artists IDs.
func (*ArtistsQuery) IDsX ¶
func (aq *ArtistsQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*ArtistsQuery) Limit ¶
func (aq *ArtistsQuery) Limit(limit int) *ArtistsQuery
Limit the number of records to be returned by this query.
func (*ArtistsQuery) Offset ¶
func (aq *ArtistsQuery) Offset(offset int) *ArtistsQuery
Offset to start from.
func (*ArtistsQuery) Only ¶
func (aq *ArtistsQuery) Only(ctx context.Context) (*Artists, error)
Only returns a single Artists entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Artists entity is found. Returns a *NotFoundError when no Artists entities are found.
func (*ArtistsQuery) OnlyID ¶
func (aq *ArtistsQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Artists ID in the query. Returns a *NotSingularError when more than one Artists ID is found. Returns a *NotFoundError when no entities are found.
func (*ArtistsQuery) OnlyIDX ¶
func (aq *ArtistsQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ArtistsQuery) OnlyX ¶
func (aq *ArtistsQuery) OnlyX(ctx context.Context) *Artists
OnlyX is like Only, but panics if an error occurs.
func (*ArtistsQuery) Order ¶
func (aq *ArtistsQuery) Order(o ...artists.OrderOption) *ArtistsQuery
Order specifies how the records should be ordered.
func (*ArtistsQuery) QueryAlbums ¶
func (aq *ArtistsQuery) QueryAlbums() *AlbumsQuery
QueryAlbums chains the current query on the "albums" edge.
func (*ArtistsQuery) QueryMusics ¶
func (aq *ArtistsQuery) QueryMusics() *MusicsQuery
QueryMusics chains the current query on the "musics" edge.
func (*ArtistsQuery) Select ¶
func (aq *ArtistsQuery) Select(fields ...string) *ArtistsSelect
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.Artists.Query(). Select(artists.FieldName). Scan(ctx, &v)
func (*ArtistsQuery) Unique ¶
func (aq *ArtistsQuery) Unique(unique bool) *ArtistsQuery
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 (*ArtistsQuery) Where ¶
func (aq *ArtistsQuery) Where(ps ...predicate.Artists) *ArtistsQuery
Where adds a new predicate for the ArtistsQuery builder.
func (*ArtistsQuery) WithAlbums ¶
func (aq *ArtistsQuery) WithAlbums(opts ...func(*AlbumsQuery)) *ArtistsQuery
WithAlbums tells the query-builder to eager-load the nodes that are connected to the "albums" edge. The optional arguments are used to configure the query builder of the edge.
func (*ArtistsQuery) WithMusics ¶
func (aq *ArtistsQuery) WithMusics(opts ...func(*MusicsQuery)) *ArtistsQuery
WithMusics tells the query-builder to eager-load the nodes that are connected to the "musics" edge. The optional arguments are used to configure the query builder of the edge.
type ArtistsSelect ¶
type ArtistsSelect struct { *ArtistsQuery // contains filtered or unexported fields }
ArtistsSelect is the builder for selecting fields of Artists entities.
func (*ArtistsSelect) Aggregate ¶
func (as *ArtistsSelect) Aggregate(fns ...AggregateFunc) *ArtistsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ArtistsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ArtistsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ArtistsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ArtistsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ArtistsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ArtistsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ArtistsSelect) Scan ¶
func (as *ArtistsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ArtistsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ArtistsUpdate ¶
type ArtistsUpdate struct {
// contains filtered or unexported fields
}
ArtistsUpdate is the builder for updating Artists entities.
func (*ArtistsUpdate) AddAlbumIDs ¶
func (au *ArtistsUpdate) AddAlbumIDs(ids ...uint64) *ArtistsUpdate
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*ArtistsUpdate) AddAlbums ¶
func (au *ArtistsUpdate) AddAlbums(a ...*Albums) *ArtistsUpdate
AddAlbums adds the "albums" edges to the Albums entity.
func (*ArtistsUpdate) AddMusicIDs ¶
func (au *ArtistsUpdate) AddMusicIDs(ids ...uint64) *ArtistsUpdate
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*ArtistsUpdate) AddMusics ¶
func (au *ArtistsUpdate) AddMusics(m ...*Musics) *ArtistsUpdate
AddMusics adds the "musics" edges to the Musics entity.
func (*ArtistsUpdate) ClearAlbums ¶
func (au *ArtistsUpdate) ClearAlbums() *ArtistsUpdate
ClearAlbums clears all "albums" edges to the Albums entity.
func (*ArtistsUpdate) ClearMusics ¶
func (au *ArtistsUpdate) ClearMusics() *ArtistsUpdate
ClearMusics clears all "musics" edges to the Musics entity.
func (*ArtistsUpdate) Exec ¶
func (au *ArtistsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ArtistsUpdate) ExecX ¶
func (au *ArtistsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ArtistsUpdate) Mutation ¶
func (au *ArtistsUpdate) Mutation() *ArtistsMutation
Mutation returns the ArtistsMutation object of the builder.
func (*ArtistsUpdate) RemoveAlbumIDs ¶
func (au *ArtistsUpdate) RemoveAlbumIDs(ids ...uint64) *ArtistsUpdate
RemoveAlbumIDs removes the "albums" edge to Albums entities by IDs.
func (*ArtistsUpdate) RemoveAlbums ¶
func (au *ArtistsUpdate) RemoveAlbums(a ...*Albums) *ArtistsUpdate
RemoveAlbums removes "albums" edges to Albums entities.
func (*ArtistsUpdate) RemoveMusicIDs ¶
func (au *ArtistsUpdate) RemoveMusicIDs(ids ...uint64) *ArtistsUpdate
RemoveMusicIDs removes the "musics" edge to Musics entities by IDs.
func (*ArtistsUpdate) RemoveMusics ¶
func (au *ArtistsUpdate) RemoveMusics(m ...*Musics) *ArtistsUpdate
RemoveMusics removes "musics" edges to Musics entities.
func (*ArtistsUpdate) Save ¶
func (au *ArtistsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ArtistsUpdate) SaveX ¶
func (au *ArtistsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ArtistsUpdate) SetName ¶
func (au *ArtistsUpdate) SetName(s string) *ArtistsUpdate
SetName sets the "name" field.
func (*ArtistsUpdate) SetNillableName ¶
func (au *ArtistsUpdate) SetNillableName(s *string) *ArtistsUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ArtistsUpdate) Where ¶
func (au *ArtistsUpdate) Where(ps ...predicate.Artists) *ArtistsUpdate
Where appends a list predicates to the ArtistsUpdate builder.
type ArtistsUpdateOne ¶
type ArtistsUpdateOne struct {
// contains filtered or unexported fields
}
ArtistsUpdateOne is the builder for updating a single Artists entity.
func (*ArtistsUpdateOne) AddAlbumIDs ¶
func (auo *ArtistsUpdateOne) AddAlbumIDs(ids ...uint64) *ArtistsUpdateOne
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*ArtistsUpdateOne) AddAlbums ¶
func (auo *ArtistsUpdateOne) AddAlbums(a ...*Albums) *ArtistsUpdateOne
AddAlbums adds the "albums" edges to the Albums entity.
func (*ArtistsUpdateOne) AddMusicIDs ¶
func (auo *ArtistsUpdateOne) AddMusicIDs(ids ...uint64) *ArtistsUpdateOne
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*ArtistsUpdateOne) AddMusics ¶
func (auo *ArtistsUpdateOne) AddMusics(m ...*Musics) *ArtistsUpdateOne
AddMusics adds the "musics" edges to the Musics entity.
func (*ArtistsUpdateOne) ClearAlbums ¶
func (auo *ArtistsUpdateOne) ClearAlbums() *ArtistsUpdateOne
ClearAlbums clears all "albums" edges to the Albums entity.
func (*ArtistsUpdateOne) ClearMusics ¶
func (auo *ArtistsUpdateOne) ClearMusics() *ArtistsUpdateOne
ClearMusics clears all "musics" edges to the Musics entity.
func (*ArtistsUpdateOne) Exec ¶
func (auo *ArtistsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ArtistsUpdateOne) ExecX ¶
func (auo *ArtistsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ArtistsUpdateOne) Mutation ¶
func (auo *ArtistsUpdateOne) Mutation() *ArtistsMutation
Mutation returns the ArtistsMutation object of the builder.
func (*ArtistsUpdateOne) RemoveAlbumIDs ¶
func (auo *ArtistsUpdateOne) RemoveAlbumIDs(ids ...uint64) *ArtistsUpdateOne
RemoveAlbumIDs removes the "albums" edge to Albums entities by IDs.
func (*ArtistsUpdateOne) RemoveAlbums ¶
func (auo *ArtistsUpdateOne) RemoveAlbums(a ...*Albums) *ArtistsUpdateOne
RemoveAlbums removes "albums" edges to Albums entities.
func (*ArtistsUpdateOne) RemoveMusicIDs ¶
func (auo *ArtistsUpdateOne) RemoveMusicIDs(ids ...uint64) *ArtistsUpdateOne
RemoveMusicIDs removes the "musics" edge to Musics entities by IDs.
func (*ArtistsUpdateOne) RemoveMusics ¶
func (auo *ArtistsUpdateOne) RemoveMusics(m ...*Musics) *ArtistsUpdateOne
RemoveMusics removes "musics" edges to Musics entities.
func (*ArtistsUpdateOne) Save ¶
func (auo *ArtistsUpdateOne) Save(ctx context.Context) (*Artists, error)
Save executes the query and returns the updated Artists entity.
func (*ArtistsUpdateOne) SaveX ¶
func (auo *ArtistsUpdateOne) SaveX(ctx context.Context) *Artists
SaveX is like Save, but panics if an error occurs.
func (*ArtistsUpdateOne) Select ¶
func (auo *ArtistsUpdateOne) Select(field string, fields ...string) *ArtistsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ArtistsUpdateOne) SetName ¶
func (auo *ArtistsUpdateOne) SetName(s string) *ArtistsUpdateOne
SetName sets the "name" field.
func (*ArtistsUpdateOne) SetNillableName ¶
func (auo *ArtistsUpdateOne) SetNillableName(s *string) *ArtistsUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ArtistsUpdateOne) Where ¶
func (auo *ArtistsUpdateOne) Where(ps ...predicate.Artists) *ArtistsUpdateOne
Where appends a list predicates to the ArtistsUpdate builder.
type Audiobooks ¶
type Audiobooks struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
Audiobooks is the model entity for the Audiobooks schema.
func (*Audiobooks) String ¶
func (a *Audiobooks) String() string
String implements the fmt.Stringer.
func (*Audiobooks) Unwrap ¶
func (a *Audiobooks) Unwrap() *Audiobooks
Unwrap unwraps the Audiobooks 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 (*Audiobooks) Update ¶
func (a *Audiobooks) Update() *AudiobooksUpdateOne
Update returns a builder for updating this Audiobooks. Note that you need to call Audiobooks.Unwrap() before calling this method if this Audiobooks was returned from a transaction, and the transaction was committed or rolled back.
type AudiobooksClient ¶
type AudiobooksClient struct {
// contains filtered or unexported fields
}
AudiobooksClient is a client for the Audiobooks schema.
func NewAudiobooksClient ¶
func NewAudiobooksClient(c config) *AudiobooksClient
NewAudiobooksClient returns a client for the Audiobooks from the given config.
func (*AudiobooksClient) Create ¶
func (c *AudiobooksClient) Create() *AudiobooksCreate
Create returns a builder for creating a Audiobooks entity.
func (*AudiobooksClient) CreateBulk ¶
func (c *AudiobooksClient) CreateBulk(builders ...*AudiobooksCreate) *AudiobooksCreateBulk
CreateBulk returns a builder for creating a bulk of Audiobooks entities.
func (*AudiobooksClient) Delete ¶
func (c *AudiobooksClient) Delete() *AudiobooksDelete
Delete returns a delete builder for Audiobooks.
func (*AudiobooksClient) DeleteOne ¶
func (c *AudiobooksClient) DeleteOne(a *Audiobooks) *AudiobooksDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AudiobooksClient) DeleteOneID ¶
func (c *AudiobooksClient) DeleteOneID(id int) *AudiobooksDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AudiobooksClient) Get ¶
func (c *AudiobooksClient) Get(ctx context.Context, id int) (*Audiobooks, error)
Get returns a Audiobooks entity by its id.
func (*AudiobooksClient) GetX ¶
func (c *AudiobooksClient) GetX(ctx context.Context, id int) *Audiobooks
GetX is like Get, but panics if an error occurs.
func (*AudiobooksClient) Hooks ¶
func (c *AudiobooksClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AudiobooksClient) Intercept ¶
func (c *AudiobooksClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `audiobooks.Intercept(f(g(h())))`.
func (*AudiobooksClient) Interceptors ¶
func (c *AudiobooksClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AudiobooksClient) MapCreateBulk ¶
func (c *AudiobooksClient) MapCreateBulk(slice any, setFunc func(*AudiobooksCreate, int)) *AudiobooksCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*AudiobooksClient) Query ¶
func (c *AudiobooksClient) Query() *AudiobooksQuery
Query returns a query builder for Audiobooks.
func (*AudiobooksClient) Update ¶
func (c *AudiobooksClient) Update() *AudiobooksUpdate
Update returns an update builder for Audiobooks.
func (*AudiobooksClient) UpdateOne ¶
func (c *AudiobooksClient) UpdateOne(a *Audiobooks) *AudiobooksUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AudiobooksClient) UpdateOneID ¶
func (c *AudiobooksClient) UpdateOneID(id int) *AudiobooksUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AudiobooksClient) Use ¶
func (c *AudiobooksClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `audiobooks.Hooks(f(g(h())))`.
type AudiobooksCreate ¶
type AudiobooksCreate struct {
// contains filtered or unexported fields
}
AudiobooksCreate is the builder for creating a Audiobooks entity.
func (*AudiobooksCreate) Exec ¶
func (ac *AudiobooksCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AudiobooksCreate) ExecX ¶
func (ac *AudiobooksCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AudiobooksCreate) Mutation ¶
func (ac *AudiobooksCreate) Mutation() *AudiobooksMutation
Mutation returns the AudiobooksMutation object of the builder.
func (*AudiobooksCreate) Save ¶
func (ac *AudiobooksCreate) Save(ctx context.Context) (*Audiobooks, error)
Save creates the Audiobooks in the database.
func (*AudiobooksCreate) SaveX ¶
func (ac *AudiobooksCreate) SaveX(ctx context.Context) *Audiobooks
SaveX calls Save and panics if Save returns an error.
type AudiobooksCreateBulk ¶
type AudiobooksCreateBulk struct {
// contains filtered or unexported fields
}
AudiobooksCreateBulk is the builder for creating many Audiobooks entities in bulk.
func (*AudiobooksCreateBulk) Exec ¶
func (acb *AudiobooksCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AudiobooksCreateBulk) ExecX ¶
func (acb *AudiobooksCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AudiobooksCreateBulk) Save ¶
func (acb *AudiobooksCreateBulk) Save(ctx context.Context) ([]*Audiobooks, error)
Save creates the Audiobooks entities in the database.
func (*AudiobooksCreateBulk) SaveX ¶
func (acb *AudiobooksCreateBulk) SaveX(ctx context.Context) []*Audiobooks
SaveX is like Save, but panics if an error occurs.
type AudiobooksDelete ¶
type AudiobooksDelete struct {
// contains filtered or unexported fields
}
AudiobooksDelete is the builder for deleting a Audiobooks entity.
func (*AudiobooksDelete) Exec ¶
func (ad *AudiobooksDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AudiobooksDelete) ExecX ¶
func (ad *AudiobooksDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AudiobooksDelete) Where ¶
func (ad *AudiobooksDelete) Where(ps ...predicate.Audiobooks) *AudiobooksDelete
Where appends a list predicates to the AudiobooksDelete builder.
type AudiobooksDeleteOne ¶
type AudiobooksDeleteOne struct {
// contains filtered or unexported fields
}
AudiobooksDeleteOne is the builder for deleting a single Audiobooks entity.
func (*AudiobooksDeleteOne) Exec ¶
func (ado *AudiobooksDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AudiobooksDeleteOne) ExecX ¶
func (ado *AudiobooksDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AudiobooksDeleteOne) Where ¶
func (ado *AudiobooksDeleteOne) Where(ps ...predicate.Audiobooks) *AudiobooksDeleteOne
Where appends a list predicates to the AudiobooksDelete builder.
type AudiobooksGroupBy ¶
type AudiobooksGroupBy struct {
// contains filtered or unexported fields
}
AudiobooksGroupBy is the group-by builder for Audiobooks entities.
func (*AudiobooksGroupBy) Aggregate ¶
func (agb *AudiobooksGroupBy) Aggregate(fns ...AggregateFunc) *AudiobooksGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AudiobooksGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AudiobooksGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AudiobooksGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AudiobooksGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AudiobooksGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AudiobooksGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AudiobooksGroupBy) Scan ¶
func (agb *AudiobooksGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AudiobooksGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AudiobooksMutation ¶
type AudiobooksMutation struct {
// contains filtered or unexported fields
}
AudiobooksMutation represents an operation that mutates the Audiobooks nodes in the graph.
func (*AudiobooksMutation) AddField ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) AddedEdges ¶
func (m *AudiobooksMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AudiobooksMutation) AddedField ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) AddedFields ¶
func (m *AudiobooksMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AudiobooksMutation) AddedIDs ¶
func (m *AudiobooksMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AudiobooksMutation) ClearEdge ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) ClearField ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) ClearedEdges ¶
func (m *AudiobooksMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AudiobooksMutation) ClearedFields ¶
func (m *AudiobooksMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AudiobooksMutation) Client ¶
func (m AudiobooksMutation) 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 (*AudiobooksMutation) EdgeCleared ¶
func (m *AudiobooksMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AudiobooksMutation) Field ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) FieldCleared ¶
func (m *AudiobooksMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AudiobooksMutation) Fields ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) ID ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) IDs ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) 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 (*AudiobooksMutation) RemovedEdges ¶
func (m *AudiobooksMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AudiobooksMutation) RemovedIDs ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) ResetEdge ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) ResetField ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) SetField ¶
func (m *AudiobooksMutation) 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 (*AudiobooksMutation) SetOp ¶
func (m *AudiobooksMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (AudiobooksMutation) Tx ¶
func (m AudiobooksMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AudiobooksMutation) Type ¶
func (m *AudiobooksMutation) Type() string
Type returns the node type of this mutation (Audiobooks).
func (*AudiobooksMutation) Where ¶
func (m *AudiobooksMutation) Where(ps ...predicate.Audiobooks)
Where appends a list predicates to the AudiobooksMutation builder.
func (*AudiobooksMutation) WhereP ¶
func (m *AudiobooksMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AudiobooksMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AudiobooksQuery ¶
type AudiobooksQuery struct {
// contains filtered or unexported fields
}
AudiobooksQuery is the builder for querying Audiobooks entities.
func (*AudiobooksQuery) Aggregate ¶
func (aq *AudiobooksQuery) Aggregate(fns ...AggregateFunc) *AudiobooksSelect
Aggregate returns a AudiobooksSelect configured with the given aggregations.
func (*AudiobooksQuery) All ¶
func (aq *AudiobooksQuery) All(ctx context.Context) ([]*Audiobooks, error)
All executes the query and returns a list of AudiobooksSlice.
func (*AudiobooksQuery) AllX ¶
func (aq *AudiobooksQuery) AllX(ctx context.Context) []*Audiobooks
AllX is like All, but panics if an error occurs.
func (*AudiobooksQuery) Clone ¶
func (aq *AudiobooksQuery) Clone() *AudiobooksQuery
Clone returns a duplicate of the AudiobooksQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AudiobooksQuery) Count ¶
func (aq *AudiobooksQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AudiobooksQuery) CountX ¶
func (aq *AudiobooksQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AudiobooksQuery) Exist ¶
func (aq *AudiobooksQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AudiobooksQuery) ExistX ¶
func (aq *AudiobooksQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AudiobooksQuery) First ¶
func (aq *AudiobooksQuery) First(ctx context.Context) (*Audiobooks, error)
First returns the first Audiobooks entity from the query. Returns a *NotFoundError when no Audiobooks was found.
func (*AudiobooksQuery) FirstID ¶
func (aq *AudiobooksQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Audiobooks ID from the query. Returns a *NotFoundError when no Audiobooks ID was found.
func (*AudiobooksQuery) FirstIDX ¶
func (aq *AudiobooksQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AudiobooksQuery) FirstX ¶
func (aq *AudiobooksQuery) FirstX(ctx context.Context) *Audiobooks
FirstX is like First, but panics if an error occurs.
func (*AudiobooksQuery) GroupBy ¶
func (aq *AudiobooksQuery) GroupBy(field string, fields ...string) *AudiobooksGroupBy
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.
func (*AudiobooksQuery) IDs ¶
func (aq *AudiobooksQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Audiobooks IDs.
func (*AudiobooksQuery) IDsX ¶
func (aq *AudiobooksQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AudiobooksQuery) Limit ¶
func (aq *AudiobooksQuery) Limit(limit int) *AudiobooksQuery
Limit the number of records to be returned by this query.
func (*AudiobooksQuery) Offset ¶
func (aq *AudiobooksQuery) Offset(offset int) *AudiobooksQuery
Offset to start from.
func (*AudiobooksQuery) Only ¶
func (aq *AudiobooksQuery) Only(ctx context.Context) (*Audiobooks, error)
Only returns a single Audiobooks entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Audiobooks entity is found. Returns a *NotFoundError when no Audiobooks entities are found.
func (*AudiobooksQuery) OnlyID ¶
func (aq *AudiobooksQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Audiobooks ID in the query. Returns a *NotSingularError when more than one Audiobooks ID is found. Returns a *NotFoundError when no entities are found.
func (*AudiobooksQuery) OnlyIDX ¶
func (aq *AudiobooksQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AudiobooksQuery) OnlyX ¶
func (aq *AudiobooksQuery) OnlyX(ctx context.Context) *Audiobooks
OnlyX is like Only, but panics if an error occurs.
func (*AudiobooksQuery) Order ¶
func (aq *AudiobooksQuery) Order(o ...audiobooks.OrderOption) *AudiobooksQuery
Order specifies how the records should be ordered.
func (*AudiobooksQuery) Select ¶
func (aq *AudiobooksQuery) Select(fields ...string) *AudiobooksSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*AudiobooksQuery) Unique ¶
func (aq *AudiobooksQuery) Unique(unique bool) *AudiobooksQuery
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 (*AudiobooksQuery) Where ¶
func (aq *AudiobooksQuery) Where(ps ...predicate.Audiobooks) *AudiobooksQuery
Where adds a new predicate for the AudiobooksQuery builder.
type AudiobooksSelect ¶
type AudiobooksSelect struct { *AudiobooksQuery // contains filtered or unexported fields }
AudiobooksSelect is the builder for selecting fields of Audiobooks entities.
func (*AudiobooksSelect) Aggregate ¶
func (as *AudiobooksSelect) Aggregate(fns ...AggregateFunc) *AudiobooksSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AudiobooksSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AudiobooksSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AudiobooksSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AudiobooksSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AudiobooksSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AudiobooksSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AudiobooksSelect) Scan ¶
func (as *AudiobooksSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AudiobooksSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AudiobooksSlice ¶
type AudiobooksSlice []*Audiobooks
AudiobooksSlice is a parsable slice of Audiobooks.
type AudiobooksUpdate ¶
type AudiobooksUpdate struct {
// contains filtered or unexported fields
}
AudiobooksUpdate is the builder for updating Audiobooks entities.
func (*AudiobooksUpdate) Exec ¶
func (au *AudiobooksUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AudiobooksUpdate) ExecX ¶
func (au *AudiobooksUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AudiobooksUpdate) Mutation ¶
func (au *AudiobooksUpdate) Mutation() *AudiobooksMutation
Mutation returns the AudiobooksMutation object of the builder.
func (*AudiobooksUpdate) Save ¶
func (au *AudiobooksUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AudiobooksUpdate) SaveX ¶
func (au *AudiobooksUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AudiobooksUpdate) Where ¶
func (au *AudiobooksUpdate) Where(ps ...predicate.Audiobooks) *AudiobooksUpdate
Where appends a list predicates to the AudiobooksUpdate builder.
type AudiobooksUpdateOne ¶
type AudiobooksUpdateOne struct {
// contains filtered or unexported fields
}
AudiobooksUpdateOne is the builder for updating a single Audiobooks entity.
func (*AudiobooksUpdateOne) Exec ¶
func (auo *AudiobooksUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AudiobooksUpdateOne) ExecX ¶
func (auo *AudiobooksUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AudiobooksUpdateOne) Mutation ¶
func (auo *AudiobooksUpdateOne) Mutation() *AudiobooksMutation
Mutation returns the AudiobooksMutation object of the builder.
func (*AudiobooksUpdateOne) Save ¶
func (auo *AudiobooksUpdateOne) Save(ctx context.Context) (*Audiobooks, error)
Save executes the query and returns the updated Audiobooks entity.
func (*AudiobooksUpdateOne) SaveX ¶
func (auo *AudiobooksUpdateOne) SaveX(ctx context.Context) *Audiobooks
SaveX is like Save, but panics if an error occurs.
func (*AudiobooksUpdateOne) Select ¶
func (auo *AudiobooksUpdateOne) Select(field string, fields ...string) *AudiobooksUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AudiobooksUpdateOne) Where ¶
func (auo *AudiobooksUpdateOne) Where(ps ...predicate.Audiobooks) *AudiobooksUpdateOne
Where appends a list predicates to the AudiobooksUpdate builder.
type Categorys ¶
type Categorys struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
Categorys is the model entity for the Categorys schema.
func (*Categorys) Unwrap ¶
Unwrap unwraps the Categorys 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 (*Categorys) Update ¶
func (c *Categorys) Update() *CategorysUpdateOne
Update returns a builder for updating this Categorys. Note that you need to call Categorys.Unwrap() before calling this method if this Categorys was returned from a transaction, and the transaction was committed or rolled back.
type CategorysClient ¶
type CategorysClient struct {
// contains filtered or unexported fields
}
CategorysClient is a client for the Categorys schema.
func NewCategorysClient ¶
func NewCategorysClient(c config) *CategorysClient
NewCategorysClient returns a client for the Categorys from the given config.
func (*CategorysClient) Create ¶
func (c *CategorysClient) Create() *CategorysCreate
Create returns a builder for creating a Categorys entity.
func (*CategorysClient) CreateBulk ¶
func (c *CategorysClient) CreateBulk(builders ...*CategorysCreate) *CategorysCreateBulk
CreateBulk returns a builder for creating a bulk of Categorys entities.
func (*CategorysClient) Delete ¶
func (c *CategorysClient) Delete() *CategorysDelete
Delete returns a delete builder for Categorys.
func (*CategorysClient) DeleteOne ¶
func (c *CategorysClient) DeleteOne(ca *Categorys) *CategorysDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CategorysClient) DeleteOneID ¶
func (c *CategorysClient) DeleteOneID(id int) *CategorysDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CategorysClient) GetX ¶
func (c *CategorysClient) GetX(ctx context.Context, id int) *Categorys
GetX is like Get, but panics if an error occurs.
func (*CategorysClient) Hooks ¶
func (c *CategorysClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CategorysClient) Intercept ¶
func (c *CategorysClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `categorys.Intercept(f(g(h())))`.
func (*CategorysClient) Interceptors ¶
func (c *CategorysClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CategorysClient) MapCreateBulk ¶
func (c *CategorysClient) MapCreateBulk(slice any, setFunc func(*CategorysCreate, int)) *CategorysCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CategorysClient) Query ¶
func (c *CategorysClient) Query() *CategorysQuery
Query returns a query builder for Categorys.
func (*CategorysClient) Update ¶
func (c *CategorysClient) Update() *CategorysUpdate
Update returns an update builder for Categorys.
func (*CategorysClient) UpdateOne ¶
func (c *CategorysClient) UpdateOne(ca *Categorys) *CategorysUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CategorysClient) UpdateOneID ¶
func (c *CategorysClient) UpdateOneID(id int) *CategorysUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CategorysClient) Use ¶
func (c *CategorysClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `categorys.Hooks(f(g(h())))`.
type CategorysCreate ¶
type CategorysCreate struct {
// contains filtered or unexported fields
}
CategorysCreate is the builder for creating a Categorys entity.
func (*CategorysCreate) Exec ¶
func (cc *CategorysCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategorysCreate) ExecX ¶
func (cc *CategorysCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategorysCreate) Mutation ¶
func (cc *CategorysCreate) Mutation() *CategorysMutation
Mutation returns the CategorysMutation object of the builder.
type CategorysCreateBulk ¶
type CategorysCreateBulk struct {
// contains filtered or unexported fields
}
CategorysCreateBulk is the builder for creating many Categorys entities in bulk.
func (*CategorysCreateBulk) Exec ¶
func (ccb *CategorysCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CategorysCreateBulk) ExecX ¶
func (ccb *CategorysCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CategorysDelete ¶
type CategorysDelete struct {
// contains filtered or unexported fields
}
CategorysDelete is the builder for deleting a Categorys entity.
func (*CategorysDelete) Exec ¶
func (cd *CategorysDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CategorysDelete) ExecX ¶
func (cd *CategorysDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CategorysDelete) Where ¶
func (cd *CategorysDelete) Where(ps ...predicate.Categorys) *CategorysDelete
Where appends a list predicates to the CategorysDelete builder.
type CategorysDeleteOne ¶
type CategorysDeleteOne struct {
// contains filtered or unexported fields
}
CategorysDeleteOne is the builder for deleting a single Categorys entity.
func (*CategorysDeleteOne) Exec ¶
func (cdo *CategorysDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CategorysDeleteOne) ExecX ¶
func (cdo *CategorysDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategorysDeleteOne) Where ¶
func (cdo *CategorysDeleteOne) Where(ps ...predicate.Categorys) *CategorysDeleteOne
Where appends a list predicates to the CategorysDelete builder.
type CategorysGroupBy ¶
type CategorysGroupBy struct {
// contains filtered or unexported fields
}
CategorysGroupBy is the group-by builder for Categorys entities.
func (*CategorysGroupBy) Aggregate ¶
func (cgb *CategorysGroupBy) Aggregate(fns ...AggregateFunc) *CategorysGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CategorysGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CategorysGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CategorysGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CategorysGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CategorysGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CategorysGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CategorysGroupBy) Scan ¶
func (cgb *CategorysGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CategorysGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CategorysMutation ¶
type CategorysMutation struct {
// contains filtered or unexported fields
}
CategorysMutation represents an operation that mutates the Categorys nodes in the graph.
func (*CategorysMutation) AddField ¶
func (m *CategorysMutation) 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 (*CategorysMutation) AddedEdges ¶
func (m *CategorysMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CategorysMutation) AddedField ¶
func (m *CategorysMutation) 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 (*CategorysMutation) AddedFields ¶
func (m *CategorysMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CategorysMutation) AddedIDs ¶
func (m *CategorysMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CategorysMutation) ClearEdge ¶
func (m *CategorysMutation) 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 (*CategorysMutation) ClearField ¶
func (m *CategorysMutation) 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 (*CategorysMutation) ClearedEdges ¶
func (m *CategorysMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CategorysMutation) ClearedFields ¶
func (m *CategorysMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CategorysMutation) Client ¶
func (m CategorysMutation) 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 (*CategorysMutation) EdgeCleared ¶
func (m *CategorysMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CategorysMutation) Field ¶
func (m *CategorysMutation) 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 (*CategorysMutation) FieldCleared ¶
func (m *CategorysMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CategorysMutation) Fields ¶
func (m *CategorysMutation) 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 (*CategorysMutation) ID ¶
func (m *CategorysMutation) 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 (*CategorysMutation) IDs ¶
func (m *CategorysMutation) 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 (*CategorysMutation) 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 (*CategorysMutation) RemovedEdges ¶
func (m *CategorysMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CategorysMutation) RemovedIDs ¶
func (m *CategorysMutation) 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 (*CategorysMutation) ResetEdge ¶
func (m *CategorysMutation) 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 (*CategorysMutation) ResetField ¶
func (m *CategorysMutation) 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 (*CategorysMutation) SetField ¶
func (m *CategorysMutation) 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 (*CategorysMutation) SetOp ¶
func (m *CategorysMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (CategorysMutation) Tx ¶
func (m CategorysMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CategorysMutation) Type ¶
func (m *CategorysMutation) Type() string
Type returns the node type of this mutation (Categorys).
func (*CategorysMutation) Where ¶
func (m *CategorysMutation) Where(ps ...predicate.Categorys)
Where appends a list predicates to the CategorysMutation builder.
func (*CategorysMutation) WhereP ¶
func (m *CategorysMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CategorysMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CategorysQuery ¶
type CategorysQuery struct {
// contains filtered or unexported fields
}
CategorysQuery is the builder for querying Categorys entities.
func (*CategorysQuery) Aggregate ¶
func (cq *CategorysQuery) Aggregate(fns ...AggregateFunc) *CategorysSelect
Aggregate returns a CategorysSelect configured with the given aggregations.
func (*CategorysQuery) All ¶
func (cq *CategorysQuery) All(ctx context.Context) ([]*Categorys, error)
All executes the query and returns a list of CategorysSlice.
func (*CategorysQuery) AllX ¶
func (cq *CategorysQuery) AllX(ctx context.Context) []*Categorys
AllX is like All, but panics if an error occurs.
func (*CategorysQuery) Clone ¶
func (cq *CategorysQuery) Clone() *CategorysQuery
Clone returns a duplicate of the CategorysQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CategorysQuery) Count ¶
func (cq *CategorysQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CategorysQuery) CountX ¶
func (cq *CategorysQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CategorysQuery) Exist ¶
func (cq *CategorysQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CategorysQuery) ExistX ¶
func (cq *CategorysQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CategorysQuery) First ¶
func (cq *CategorysQuery) First(ctx context.Context) (*Categorys, error)
First returns the first Categorys entity from the query. Returns a *NotFoundError when no Categorys was found.
func (*CategorysQuery) FirstID ¶
func (cq *CategorysQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Categorys ID from the query. Returns a *NotFoundError when no Categorys ID was found.
func (*CategorysQuery) FirstIDX ¶
func (cq *CategorysQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*CategorysQuery) FirstX ¶
func (cq *CategorysQuery) FirstX(ctx context.Context) *Categorys
FirstX is like First, but panics if an error occurs.
func (*CategorysQuery) GroupBy ¶
func (cq *CategorysQuery) GroupBy(field string, fields ...string) *CategorysGroupBy
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.
func (*CategorysQuery) IDs ¶
func (cq *CategorysQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Categorys IDs.
func (*CategorysQuery) IDsX ¶
func (cq *CategorysQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*CategorysQuery) Limit ¶
func (cq *CategorysQuery) Limit(limit int) *CategorysQuery
Limit the number of records to be returned by this query.
func (*CategorysQuery) Offset ¶
func (cq *CategorysQuery) Offset(offset int) *CategorysQuery
Offset to start from.
func (*CategorysQuery) Only ¶
func (cq *CategorysQuery) Only(ctx context.Context) (*Categorys, error)
Only returns a single Categorys entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Categorys entity is found. Returns a *NotFoundError when no Categorys entities are found.
func (*CategorysQuery) OnlyID ¶
func (cq *CategorysQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Categorys ID in the query. Returns a *NotSingularError when more than one Categorys ID is found. Returns a *NotFoundError when no entities are found.
func (*CategorysQuery) OnlyIDX ¶
func (cq *CategorysQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CategorysQuery) OnlyX ¶
func (cq *CategorysQuery) OnlyX(ctx context.Context) *Categorys
OnlyX is like Only, but panics if an error occurs.
func (*CategorysQuery) Order ¶
func (cq *CategorysQuery) Order(o ...categorys.OrderOption) *CategorysQuery
Order specifies how the records should be ordered.
func (*CategorysQuery) Select ¶
func (cq *CategorysQuery) Select(fields ...string) *CategorysSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*CategorysQuery) Unique ¶
func (cq *CategorysQuery) Unique(unique bool) *CategorysQuery
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 (*CategorysQuery) Where ¶
func (cq *CategorysQuery) Where(ps ...predicate.Categorys) *CategorysQuery
Where adds a new predicate for the CategorysQuery builder.
type CategorysSelect ¶
type CategorysSelect struct { *CategorysQuery // contains filtered or unexported fields }
CategorysSelect is the builder for selecting fields of Categorys entities.
func (*CategorysSelect) Aggregate ¶
func (cs *CategorysSelect) Aggregate(fns ...AggregateFunc) *CategorysSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CategorysSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CategorysSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CategorysSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CategorysSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CategorysSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CategorysSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CategorysSelect) Scan ¶
func (cs *CategorysSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CategorysSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CategorysSlice ¶
type CategorysSlice []*Categorys
CategorysSlice is a parsable slice of Categorys.
type CategorysUpdate ¶
type CategorysUpdate struct {
// contains filtered or unexported fields
}
CategorysUpdate is the builder for updating Categorys entities.
func (*CategorysUpdate) Exec ¶
func (cu *CategorysUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategorysUpdate) ExecX ¶
func (cu *CategorysUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategorysUpdate) Mutation ¶
func (cu *CategorysUpdate) Mutation() *CategorysMutation
Mutation returns the CategorysMutation object of the builder.
func (*CategorysUpdate) Save ¶
func (cu *CategorysUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CategorysUpdate) SaveX ¶
func (cu *CategorysUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CategorysUpdate) Where ¶
func (cu *CategorysUpdate) Where(ps ...predicate.Categorys) *CategorysUpdate
Where appends a list predicates to the CategorysUpdate builder.
type CategorysUpdateOne ¶
type CategorysUpdateOne struct {
// contains filtered or unexported fields
}
CategorysUpdateOne is the builder for updating a single Categorys entity.
func (*CategorysUpdateOne) Exec ¶
func (cuo *CategorysUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CategorysUpdateOne) ExecX ¶
func (cuo *CategorysUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategorysUpdateOne) Mutation ¶
func (cuo *CategorysUpdateOne) Mutation() *CategorysMutation
Mutation returns the CategorysMutation object of the builder.
func (*CategorysUpdateOne) Save ¶
func (cuo *CategorysUpdateOne) Save(ctx context.Context) (*Categorys, error)
Save executes the query and returns the updated Categorys entity.
func (*CategorysUpdateOne) SaveX ¶
func (cuo *CategorysUpdateOne) SaveX(ctx context.Context) *Categorys
SaveX is like Save, but panics if an error occurs.
func (*CategorysUpdateOne) Select ¶
func (cuo *CategorysUpdateOne) Select(field string, fields ...string) *CategorysUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CategorysUpdateOne) Where ¶
func (cuo *CategorysUpdateOne) Where(ps ...predicate.Categorys) *CategorysUpdateOne
Where appends a list predicates to the CategorysUpdate builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Actors is the client for interacting with the Actors builders. Actors *ActorsClient // Albums is the client for interacting with the Albums builders. Albums *AlbumsClient // Artists is the client for interacting with the Artists builders. Artists *ArtistsClient // Audiobooks is the client for interacting with the Audiobooks builders. Audiobooks *AudiobooksClient // Categorys is the client for interacting with the Categorys builders. Categorys *CategorysClient // Devices is the client for interacting with the Devices builders. Devices *DevicesClient // Directors is the client for interacting with the Directors builders. Directors *DirectorsClient // Files is the client for interacting with the Files builders. Files *FilesClient // Images is the client for interacting with the Images builders. Images *ImagesClient // Musics is the client for interacting with the Musics builders. Musics *MusicsClient // Oidc is the client for interacting with the Oidc builders. Oidc *OidcClient // Playlists is the client for interacting with the Playlists builders. Playlists *PlaylistsClient // Users is the client for interacting with the Users builders. Users *UsersClient // Videos is the client for interacting with the Videos builders. Videos *VideosClient // 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(). Actors. 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 Devices ¶
type Devices struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // IP holds the value of the "ip" field. IP string `json:"ip,omitempty"` // Device holds the value of the "device" field. Device string `json:"device,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DevicesQuery when eager-loading is set. Edges DevicesEdges `json:"edges"` // contains filtered or unexported fields }
Devices is the model entity for the Devices schema.
func (*Devices) QueryUser ¶
func (d *Devices) QueryUser() *UsersQuery
QueryUser queries the "user" edge of the Devices entity.
func (*Devices) Unwrap ¶
Unwrap unwraps the Devices 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 (*Devices) Update ¶
func (d *Devices) Update() *DevicesUpdateOne
Update returns a builder for updating this Devices. Note that you need to call Devices.Unwrap() before calling this method if this Devices was returned from a transaction, and the transaction was committed or rolled back.
type DevicesClient ¶
type DevicesClient struct {
// contains filtered or unexported fields
}
DevicesClient is a client for the Devices schema.
func NewDevicesClient ¶
func NewDevicesClient(c config) *DevicesClient
NewDevicesClient returns a client for the Devices from the given config.
func (*DevicesClient) Create ¶
func (c *DevicesClient) Create() *DevicesCreate
Create returns a builder for creating a Devices entity.
func (*DevicesClient) CreateBulk ¶
func (c *DevicesClient) CreateBulk(builders ...*DevicesCreate) *DevicesCreateBulk
CreateBulk returns a builder for creating a bulk of Devices entities.
func (*DevicesClient) Delete ¶
func (c *DevicesClient) Delete() *DevicesDelete
Delete returns a delete builder for Devices.
func (*DevicesClient) DeleteOne ¶
func (c *DevicesClient) DeleteOne(d *Devices) *DevicesDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DevicesClient) DeleteOneID ¶
func (c *DevicesClient) DeleteOneID(id uint64) *DevicesDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DevicesClient) GetX ¶
func (c *DevicesClient) GetX(ctx context.Context, id uint64) *Devices
GetX is like Get, but panics if an error occurs.
func (*DevicesClient) Hooks ¶
func (c *DevicesClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DevicesClient) Intercept ¶
func (c *DevicesClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `devices.Intercept(f(g(h())))`.
func (*DevicesClient) Interceptors ¶
func (c *DevicesClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DevicesClient) MapCreateBulk ¶
func (c *DevicesClient) MapCreateBulk(slice any, setFunc func(*DevicesCreate, int)) *DevicesCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*DevicesClient) Query ¶
func (c *DevicesClient) Query() *DevicesQuery
Query returns a query builder for Devices.
func (*DevicesClient) QueryUser ¶
func (c *DevicesClient) QueryUser(d *Devices) *UsersQuery
QueryUser queries the user edge of a Devices.
func (*DevicesClient) Update ¶
func (c *DevicesClient) Update() *DevicesUpdate
Update returns an update builder for Devices.
func (*DevicesClient) UpdateOne ¶
func (c *DevicesClient) UpdateOne(d *Devices) *DevicesUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DevicesClient) UpdateOneID ¶
func (c *DevicesClient) UpdateOneID(id uint64) *DevicesUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DevicesClient) Use ¶
func (c *DevicesClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `devices.Hooks(f(g(h())))`.
type DevicesCreate ¶
type DevicesCreate struct {
// contains filtered or unexported fields
}
DevicesCreate is the builder for creating a Devices entity.
func (*DevicesCreate) Exec ¶
func (dc *DevicesCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DevicesCreate) ExecX ¶
func (dc *DevicesCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DevicesCreate) Mutation ¶
func (dc *DevicesCreate) Mutation() *DevicesMutation
Mutation returns the DevicesMutation object of the builder.
func (*DevicesCreate) Save ¶
func (dc *DevicesCreate) Save(ctx context.Context) (*Devices, error)
Save creates the Devices in the database.
func (*DevicesCreate) SaveX ¶
func (dc *DevicesCreate) SaveX(ctx context.Context) *Devices
SaveX calls Save and panics if Save returns an error.
func (*DevicesCreate) SetCreateTime ¶
func (dc *DevicesCreate) SetCreateTime(t time.Time) *DevicesCreate
SetCreateTime sets the "create_time" field.
func (*DevicesCreate) SetDevice ¶
func (dc *DevicesCreate) SetDevice(s string) *DevicesCreate
SetDevice sets the "device" field.
func (*DevicesCreate) SetID ¶
func (dc *DevicesCreate) SetID(u uint64) *DevicesCreate
SetID sets the "id" field.
func (*DevicesCreate) SetIP ¶
func (dc *DevicesCreate) SetIP(s string) *DevicesCreate
SetIP sets the "ip" field.
func (*DevicesCreate) SetNillableCreateTime ¶
func (dc *DevicesCreate) SetNillableCreateTime(t *time.Time) *DevicesCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*DevicesCreate) SetNillableUpdateTime ¶
func (dc *DevicesCreate) SetNillableUpdateTime(t *time.Time) *DevicesCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*DevicesCreate) SetNillableUserID ¶
func (dc *DevicesCreate) SetNillableUserID(id *uint64) *DevicesCreate
SetNillableUserID sets the "user" edge to the Users entity by ID if the given value is not nil.
func (*DevicesCreate) SetUpdateTime ¶
func (dc *DevicesCreate) SetUpdateTime(t time.Time) *DevicesCreate
SetUpdateTime sets the "update_time" field.
func (*DevicesCreate) SetUser ¶
func (dc *DevicesCreate) SetUser(u *Users) *DevicesCreate
SetUser sets the "user" edge to the Users entity.
func (*DevicesCreate) SetUserID ¶
func (dc *DevicesCreate) SetUserID(id uint64) *DevicesCreate
SetUserID sets the "user" edge to the Users entity by ID.
type DevicesCreateBulk ¶
type DevicesCreateBulk struct {
// contains filtered or unexported fields
}
DevicesCreateBulk is the builder for creating many Devices entities in bulk.
func (*DevicesCreateBulk) Exec ¶
func (dcb *DevicesCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DevicesCreateBulk) ExecX ¶
func (dcb *DevicesCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DevicesDelete ¶
type DevicesDelete struct {
// contains filtered or unexported fields
}
DevicesDelete is the builder for deleting a Devices entity.
func (*DevicesDelete) Exec ¶
func (dd *DevicesDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DevicesDelete) ExecX ¶
func (dd *DevicesDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DevicesDelete) Where ¶
func (dd *DevicesDelete) Where(ps ...predicate.Devices) *DevicesDelete
Where appends a list predicates to the DevicesDelete builder.
type DevicesDeleteOne ¶
type DevicesDeleteOne struct {
// contains filtered or unexported fields
}
DevicesDeleteOne is the builder for deleting a single Devices entity.
func (*DevicesDeleteOne) Exec ¶
func (ddo *DevicesDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DevicesDeleteOne) ExecX ¶
func (ddo *DevicesDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DevicesDeleteOne) Where ¶
func (ddo *DevicesDeleteOne) Where(ps ...predicate.Devices) *DevicesDeleteOne
Where appends a list predicates to the DevicesDelete builder.
type DevicesEdges ¶
type DevicesEdges struct { // User holds the value of the user edge. User *Users `json:"user,omitempty"` // contains filtered or unexported fields }
DevicesEdges holds the relations/edges for other nodes in the graph.
func (DevicesEdges) UserOrErr ¶
func (e DevicesEdges) UserOrErr() (*Users, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DevicesGroupBy ¶
type DevicesGroupBy struct {
// contains filtered or unexported fields
}
DevicesGroupBy is the group-by builder for Devices entities.
func (*DevicesGroupBy) Aggregate ¶
func (dgb *DevicesGroupBy) Aggregate(fns ...AggregateFunc) *DevicesGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DevicesGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DevicesGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DevicesGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DevicesGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DevicesGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DevicesGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DevicesGroupBy) Scan ¶
func (dgb *DevicesGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DevicesGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DevicesMutation ¶
type DevicesMutation struct {
// contains filtered or unexported fields
}
DevicesMutation represents an operation that mutates the Devices nodes in the graph.
func (*DevicesMutation) AddField ¶
func (m *DevicesMutation) 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 (*DevicesMutation) AddedEdges ¶
func (m *DevicesMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DevicesMutation) AddedField ¶
func (m *DevicesMutation) 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 (*DevicesMutation) AddedFields ¶
func (m *DevicesMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DevicesMutation) AddedIDs ¶
func (m *DevicesMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DevicesMutation) ClearEdge ¶
func (m *DevicesMutation) 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 (*DevicesMutation) ClearField ¶
func (m *DevicesMutation) 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 (*DevicesMutation) ClearUser ¶
func (m *DevicesMutation) ClearUser()
ClearUser clears the "user" edge to the Users entity.
func (*DevicesMutation) ClearedEdges ¶
func (m *DevicesMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DevicesMutation) ClearedFields ¶
func (m *DevicesMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DevicesMutation) Client ¶
func (m DevicesMutation) 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 (*DevicesMutation) CreateTime ¶
func (m *DevicesMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*DevicesMutation) Device ¶
func (m *DevicesMutation) Device() (r string, exists bool)
Device returns the value of the "device" field in the mutation.
func (*DevicesMutation) EdgeCleared ¶
func (m *DevicesMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DevicesMutation) Field ¶
func (m *DevicesMutation) 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 (*DevicesMutation) FieldCleared ¶
func (m *DevicesMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DevicesMutation) Fields ¶
func (m *DevicesMutation) 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 (*DevicesMutation) ID ¶
func (m *DevicesMutation) 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 (*DevicesMutation) IDs ¶
func (m *DevicesMutation) 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 (*DevicesMutation) IP ¶
func (m *DevicesMutation) IP() (r string, exists bool)
IP returns the value of the "ip" field in the mutation.
func (*DevicesMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Devices entity. If the Devices object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DevicesMutation) OldDevice ¶
func (m *DevicesMutation) OldDevice(ctx context.Context) (v string, err error)
OldDevice returns the old "device" field's value of the Devices entity. If the Devices object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DevicesMutation) 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 (*DevicesMutation) OldIP ¶
func (m *DevicesMutation) OldIP(ctx context.Context) (v string, err error)
OldIP returns the old "ip" field's value of the Devices entity. If the Devices object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DevicesMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Devices entity. If the Devices object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DevicesMutation) RemovedEdges ¶
func (m *DevicesMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DevicesMutation) RemovedIDs ¶
func (m *DevicesMutation) 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 (*DevicesMutation) ResetCreateTime ¶
func (m *DevicesMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*DevicesMutation) ResetDevice ¶
func (m *DevicesMutation) ResetDevice()
ResetDevice resets all changes to the "device" field.
func (*DevicesMutation) ResetEdge ¶
func (m *DevicesMutation) 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 (*DevicesMutation) ResetField ¶
func (m *DevicesMutation) 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 (*DevicesMutation) ResetIP ¶
func (m *DevicesMutation) ResetIP()
ResetIP resets all changes to the "ip" field.
func (*DevicesMutation) ResetUpdateTime ¶
func (m *DevicesMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*DevicesMutation) ResetUser ¶
func (m *DevicesMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*DevicesMutation) SetCreateTime ¶
func (m *DevicesMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*DevicesMutation) SetDevice ¶
func (m *DevicesMutation) SetDevice(s string)
SetDevice sets the "device" field.
func (*DevicesMutation) SetField ¶
func (m *DevicesMutation) 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 (*DevicesMutation) SetID ¶
func (m *DevicesMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Devices entities.
func (*DevicesMutation) SetIP ¶
func (m *DevicesMutation) SetIP(s string)
SetIP sets the "ip" field.
func (*DevicesMutation) SetOp ¶
func (m *DevicesMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DevicesMutation) SetUpdateTime ¶
func (m *DevicesMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*DevicesMutation) SetUserID ¶
func (m *DevicesMutation) SetUserID(id uint64)
SetUserID sets the "user" edge to the Users entity by id.
func (DevicesMutation) Tx ¶
func (m DevicesMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DevicesMutation) Type ¶
func (m *DevicesMutation) Type() string
Type returns the node type of this mutation (Devices).
func (*DevicesMutation) UpdateTime ¶
func (m *DevicesMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*DevicesMutation) UserCleared ¶
func (m *DevicesMutation) UserCleared() bool
UserCleared reports if the "user" edge to the Users entity was cleared.
func (*DevicesMutation) UserID ¶
func (m *DevicesMutation) UserID() (id uint64, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*DevicesMutation) UserIDs ¶
func (m *DevicesMutation) 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 (*DevicesMutation) Where ¶
func (m *DevicesMutation) Where(ps ...predicate.Devices)
Where appends a list predicates to the DevicesMutation builder.
func (*DevicesMutation) WhereP ¶
func (m *DevicesMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DevicesMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DevicesQuery ¶
type DevicesQuery struct {
// contains filtered or unexported fields
}
DevicesQuery is the builder for querying Devices entities.
func (*DevicesQuery) Aggregate ¶
func (dq *DevicesQuery) Aggregate(fns ...AggregateFunc) *DevicesSelect
Aggregate returns a DevicesSelect configured with the given aggregations.
func (*DevicesQuery) All ¶
func (dq *DevicesQuery) All(ctx context.Context) ([]*Devices, error)
All executes the query and returns a list of DevicesSlice.
func (*DevicesQuery) AllX ¶
func (dq *DevicesQuery) AllX(ctx context.Context) []*Devices
AllX is like All, but panics if an error occurs.
func (*DevicesQuery) Clone ¶
func (dq *DevicesQuery) Clone() *DevicesQuery
Clone returns a duplicate of the DevicesQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DevicesQuery) Count ¶
func (dq *DevicesQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DevicesQuery) CountX ¶
func (dq *DevicesQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DevicesQuery) Exist ¶
func (dq *DevicesQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DevicesQuery) ExistX ¶
func (dq *DevicesQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DevicesQuery) First ¶
func (dq *DevicesQuery) First(ctx context.Context) (*Devices, error)
First returns the first Devices entity from the query. Returns a *NotFoundError when no Devices was found.
func (*DevicesQuery) FirstID ¶
func (dq *DevicesQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Devices ID from the query. Returns a *NotFoundError when no Devices ID was found.
func (*DevicesQuery) FirstIDX ¶
func (dq *DevicesQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*DevicesQuery) FirstX ¶
func (dq *DevicesQuery) FirstX(ctx context.Context) *Devices
FirstX is like First, but panics if an error occurs.
func (*DevicesQuery) GroupBy ¶
func (dq *DevicesQuery) GroupBy(field string, fields ...string) *DevicesGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Devices.Query(). GroupBy(devices.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DevicesQuery) IDs ¶
func (dq *DevicesQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Devices IDs.
func (*DevicesQuery) IDsX ¶
func (dq *DevicesQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*DevicesQuery) Limit ¶
func (dq *DevicesQuery) Limit(limit int) *DevicesQuery
Limit the number of records to be returned by this query.
func (*DevicesQuery) Offset ¶
func (dq *DevicesQuery) Offset(offset int) *DevicesQuery
Offset to start from.
func (*DevicesQuery) Only ¶
func (dq *DevicesQuery) Only(ctx context.Context) (*Devices, error)
Only returns a single Devices entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Devices entity is found. Returns a *NotFoundError when no Devices entities are found.
func (*DevicesQuery) OnlyID ¶
func (dq *DevicesQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Devices ID in the query. Returns a *NotSingularError when more than one Devices ID is found. Returns a *NotFoundError when no entities are found.
func (*DevicesQuery) OnlyIDX ¶
func (dq *DevicesQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DevicesQuery) OnlyX ¶
func (dq *DevicesQuery) OnlyX(ctx context.Context) *Devices
OnlyX is like Only, but panics if an error occurs.
func (*DevicesQuery) Order ¶
func (dq *DevicesQuery) Order(o ...devices.OrderOption) *DevicesQuery
Order specifies how the records should be ordered.
func (*DevicesQuery) QueryUser ¶
func (dq *DevicesQuery) QueryUser() *UsersQuery
QueryUser chains the current query on the "user" edge.
func (*DevicesQuery) Select ¶
func (dq *DevicesQuery) Select(fields ...string) *DevicesSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Devices.Query(). Select(devices.FieldCreateTime). Scan(ctx, &v)
func (*DevicesQuery) Unique ¶
func (dq *DevicesQuery) Unique(unique bool) *DevicesQuery
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 (*DevicesQuery) Where ¶
func (dq *DevicesQuery) Where(ps ...predicate.Devices) *DevicesQuery
Where adds a new predicate for the DevicesQuery builder.
func (*DevicesQuery) WithUser ¶
func (dq *DevicesQuery) WithUser(opts ...func(*UsersQuery)) *DevicesQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type DevicesSelect ¶
type DevicesSelect struct { *DevicesQuery // contains filtered or unexported fields }
DevicesSelect is the builder for selecting fields of Devices entities.
func (*DevicesSelect) Aggregate ¶
func (ds *DevicesSelect) Aggregate(fns ...AggregateFunc) *DevicesSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DevicesSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DevicesSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DevicesSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DevicesSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DevicesSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DevicesSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DevicesSelect) Scan ¶
func (ds *DevicesSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DevicesSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DevicesUpdate ¶
type DevicesUpdate struct {
// contains filtered or unexported fields
}
DevicesUpdate is the builder for updating Devices entities.
func (*DevicesUpdate) ClearUser ¶
func (du *DevicesUpdate) ClearUser() *DevicesUpdate
ClearUser clears the "user" edge to the Users entity.
func (*DevicesUpdate) Exec ¶
func (du *DevicesUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DevicesUpdate) ExecX ¶
func (du *DevicesUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DevicesUpdate) Mutation ¶
func (du *DevicesUpdate) Mutation() *DevicesMutation
Mutation returns the DevicesMutation object of the builder.
func (*DevicesUpdate) Save ¶
func (du *DevicesUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DevicesUpdate) SaveX ¶
func (du *DevicesUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DevicesUpdate) SetDevice ¶
func (du *DevicesUpdate) SetDevice(s string) *DevicesUpdate
SetDevice sets the "device" field.
func (*DevicesUpdate) SetIP ¶
func (du *DevicesUpdate) SetIP(s string) *DevicesUpdate
SetIP sets the "ip" field.
func (*DevicesUpdate) SetNillableDevice ¶
func (du *DevicesUpdate) SetNillableDevice(s *string) *DevicesUpdate
SetNillableDevice sets the "device" field if the given value is not nil.
func (*DevicesUpdate) SetNillableIP ¶
func (du *DevicesUpdate) SetNillableIP(s *string) *DevicesUpdate
SetNillableIP sets the "ip" field if the given value is not nil.
func (*DevicesUpdate) SetNillableUserID ¶
func (du *DevicesUpdate) SetNillableUserID(id *uint64) *DevicesUpdate
SetNillableUserID sets the "user" edge to the Users entity by ID if the given value is not nil.
func (*DevicesUpdate) SetUpdateTime ¶
func (du *DevicesUpdate) SetUpdateTime(t time.Time) *DevicesUpdate
SetUpdateTime sets the "update_time" field.
func (*DevicesUpdate) SetUser ¶
func (du *DevicesUpdate) SetUser(u *Users) *DevicesUpdate
SetUser sets the "user" edge to the Users entity.
func (*DevicesUpdate) SetUserID ¶
func (du *DevicesUpdate) SetUserID(id uint64) *DevicesUpdate
SetUserID sets the "user" edge to the Users entity by ID.
func (*DevicesUpdate) Where ¶
func (du *DevicesUpdate) Where(ps ...predicate.Devices) *DevicesUpdate
Where appends a list predicates to the DevicesUpdate builder.
type DevicesUpdateOne ¶
type DevicesUpdateOne struct {
// contains filtered or unexported fields
}
DevicesUpdateOne is the builder for updating a single Devices entity.
func (*DevicesUpdateOne) ClearUser ¶
func (duo *DevicesUpdateOne) ClearUser() *DevicesUpdateOne
ClearUser clears the "user" edge to the Users entity.
func (*DevicesUpdateOne) Exec ¶
func (duo *DevicesUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DevicesUpdateOne) ExecX ¶
func (duo *DevicesUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DevicesUpdateOne) Mutation ¶
func (duo *DevicesUpdateOne) Mutation() *DevicesMutation
Mutation returns the DevicesMutation object of the builder.
func (*DevicesUpdateOne) Save ¶
func (duo *DevicesUpdateOne) Save(ctx context.Context) (*Devices, error)
Save executes the query and returns the updated Devices entity.
func (*DevicesUpdateOne) SaveX ¶
func (duo *DevicesUpdateOne) SaveX(ctx context.Context) *Devices
SaveX is like Save, but panics if an error occurs.
func (*DevicesUpdateOne) Select ¶
func (duo *DevicesUpdateOne) Select(field string, fields ...string) *DevicesUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DevicesUpdateOne) SetDevice ¶
func (duo *DevicesUpdateOne) SetDevice(s string) *DevicesUpdateOne
SetDevice sets the "device" field.
func (*DevicesUpdateOne) SetIP ¶
func (duo *DevicesUpdateOne) SetIP(s string) *DevicesUpdateOne
SetIP sets the "ip" field.
func (*DevicesUpdateOne) SetNillableDevice ¶
func (duo *DevicesUpdateOne) SetNillableDevice(s *string) *DevicesUpdateOne
SetNillableDevice sets the "device" field if the given value is not nil.
func (*DevicesUpdateOne) SetNillableIP ¶
func (duo *DevicesUpdateOne) SetNillableIP(s *string) *DevicesUpdateOne
SetNillableIP sets the "ip" field if the given value is not nil.
func (*DevicesUpdateOne) SetNillableUserID ¶
func (duo *DevicesUpdateOne) SetNillableUserID(id *uint64) *DevicesUpdateOne
SetNillableUserID sets the "user" edge to the Users entity by ID if the given value is not nil.
func (*DevicesUpdateOne) SetUpdateTime ¶
func (duo *DevicesUpdateOne) SetUpdateTime(t time.Time) *DevicesUpdateOne
SetUpdateTime sets the "update_time" field.
func (*DevicesUpdateOne) SetUser ¶
func (duo *DevicesUpdateOne) SetUser(u *Users) *DevicesUpdateOne
SetUser sets the "user" edge to the Users entity.
func (*DevicesUpdateOne) SetUserID ¶
func (duo *DevicesUpdateOne) SetUserID(id uint64) *DevicesUpdateOne
SetUserID sets the "user" edge to the Users entity by ID.
func (*DevicesUpdateOne) Where ¶
func (duo *DevicesUpdateOne) Where(ps ...predicate.Devices) *DevicesUpdateOne
Where appends a list predicates to the DevicesUpdate builder.
type Directors ¶
type Directors struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
Directors is the model entity for the Directors schema.
func (*Directors) Unwrap ¶
Unwrap unwraps the Directors 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 (*Directors) Update ¶
func (d *Directors) Update() *DirectorsUpdateOne
Update returns a builder for updating this Directors. Note that you need to call Directors.Unwrap() before calling this method if this Directors was returned from a transaction, and the transaction was committed or rolled back.
type DirectorsClient ¶
type DirectorsClient struct {
// contains filtered or unexported fields
}
DirectorsClient is a client for the Directors schema.
func NewDirectorsClient ¶
func NewDirectorsClient(c config) *DirectorsClient
NewDirectorsClient returns a client for the Directors from the given config.
func (*DirectorsClient) Create ¶
func (c *DirectorsClient) Create() *DirectorsCreate
Create returns a builder for creating a Directors entity.
func (*DirectorsClient) CreateBulk ¶
func (c *DirectorsClient) CreateBulk(builders ...*DirectorsCreate) *DirectorsCreateBulk
CreateBulk returns a builder for creating a bulk of Directors entities.
func (*DirectorsClient) Delete ¶
func (c *DirectorsClient) Delete() *DirectorsDelete
Delete returns a delete builder for Directors.
func (*DirectorsClient) DeleteOne ¶
func (c *DirectorsClient) DeleteOne(d *Directors) *DirectorsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DirectorsClient) DeleteOneID ¶
func (c *DirectorsClient) DeleteOneID(id int) *DirectorsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DirectorsClient) GetX ¶
func (c *DirectorsClient) GetX(ctx context.Context, id int) *Directors
GetX is like Get, but panics if an error occurs.
func (*DirectorsClient) Hooks ¶
func (c *DirectorsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DirectorsClient) Intercept ¶
func (c *DirectorsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `directors.Intercept(f(g(h())))`.
func (*DirectorsClient) Interceptors ¶
func (c *DirectorsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DirectorsClient) MapCreateBulk ¶
func (c *DirectorsClient) MapCreateBulk(slice any, setFunc func(*DirectorsCreate, int)) *DirectorsCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*DirectorsClient) Query ¶
func (c *DirectorsClient) Query() *DirectorsQuery
Query returns a query builder for Directors.
func (*DirectorsClient) Update ¶
func (c *DirectorsClient) Update() *DirectorsUpdate
Update returns an update builder for Directors.
func (*DirectorsClient) UpdateOne ¶
func (c *DirectorsClient) UpdateOne(d *Directors) *DirectorsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DirectorsClient) UpdateOneID ¶
func (c *DirectorsClient) UpdateOneID(id int) *DirectorsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DirectorsClient) Use ¶
func (c *DirectorsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `directors.Hooks(f(g(h())))`.
type DirectorsCreate ¶
type DirectorsCreate struct {
// contains filtered or unexported fields
}
DirectorsCreate is the builder for creating a Directors entity.
func (*DirectorsCreate) Exec ¶
func (dc *DirectorsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DirectorsCreate) ExecX ¶
func (dc *DirectorsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectorsCreate) Mutation ¶
func (dc *DirectorsCreate) Mutation() *DirectorsMutation
Mutation returns the DirectorsMutation object of the builder.
type DirectorsCreateBulk ¶
type DirectorsCreateBulk struct {
// contains filtered or unexported fields
}
DirectorsCreateBulk is the builder for creating many Directors entities in bulk.
func (*DirectorsCreateBulk) Exec ¶
func (dcb *DirectorsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DirectorsCreateBulk) ExecX ¶
func (dcb *DirectorsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DirectorsDelete ¶
type DirectorsDelete struct {
// contains filtered or unexported fields
}
DirectorsDelete is the builder for deleting a Directors entity.
func (*DirectorsDelete) Exec ¶
func (dd *DirectorsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DirectorsDelete) ExecX ¶
func (dd *DirectorsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DirectorsDelete) Where ¶
func (dd *DirectorsDelete) Where(ps ...predicate.Directors) *DirectorsDelete
Where appends a list predicates to the DirectorsDelete builder.
type DirectorsDeleteOne ¶
type DirectorsDeleteOne struct {
// contains filtered or unexported fields
}
DirectorsDeleteOne is the builder for deleting a single Directors entity.
func (*DirectorsDeleteOne) Exec ¶
func (ddo *DirectorsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DirectorsDeleteOne) ExecX ¶
func (ddo *DirectorsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectorsDeleteOne) Where ¶
func (ddo *DirectorsDeleteOne) Where(ps ...predicate.Directors) *DirectorsDeleteOne
Where appends a list predicates to the DirectorsDelete builder.
type DirectorsGroupBy ¶
type DirectorsGroupBy struct {
// contains filtered or unexported fields
}
DirectorsGroupBy is the group-by builder for Directors entities.
func (*DirectorsGroupBy) Aggregate ¶
func (dgb *DirectorsGroupBy) Aggregate(fns ...AggregateFunc) *DirectorsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DirectorsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DirectorsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DirectorsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DirectorsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DirectorsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DirectorsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DirectorsGroupBy) Scan ¶
func (dgb *DirectorsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DirectorsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DirectorsMutation ¶
type DirectorsMutation struct {
// contains filtered or unexported fields
}
DirectorsMutation represents an operation that mutates the Directors nodes in the graph.
func (*DirectorsMutation) AddField ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) AddedEdges ¶
func (m *DirectorsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DirectorsMutation) AddedField ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) AddedFields ¶
func (m *DirectorsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DirectorsMutation) AddedIDs ¶
func (m *DirectorsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DirectorsMutation) ClearEdge ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) ClearField ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) ClearedEdges ¶
func (m *DirectorsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DirectorsMutation) ClearedFields ¶
func (m *DirectorsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DirectorsMutation) Client ¶
func (m DirectorsMutation) 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 (*DirectorsMutation) EdgeCleared ¶
func (m *DirectorsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DirectorsMutation) Field ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) FieldCleared ¶
func (m *DirectorsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DirectorsMutation) Fields ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) ID ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) IDs ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) 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 (*DirectorsMutation) RemovedEdges ¶
func (m *DirectorsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DirectorsMutation) RemovedIDs ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) ResetEdge ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) ResetField ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) SetField ¶
func (m *DirectorsMutation) 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 (*DirectorsMutation) SetOp ¶
func (m *DirectorsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (DirectorsMutation) Tx ¶
func (m DirectorsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DirectorsMutation) Type ¶
func (m *DirectorsMutation) Type() string
Type returns the node type of this mutation (Directors).
func (*DirectorsMutation) Where ¶
func (m *DirectorsMutation) Where(ps ...predicate.Directors)
Where appends a list predicates to the DirectorsMutation builder.
func (*DirectorsMutation) WhereP ¶
func (m *DirectorsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DirectorsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DirectorsQuery ¶
type DirectorsQuery struct {
// contains filtered or unexported fields
}
DirectorsQuery is the builder for querying Directors entities.
func (*DirectorsQuery) Aggregate ¶
func (dq *DirectorsQuery) Aggregate(fns ...AggregateFunc) *DirectorsSelect
Aggregate returns a DirectorsSelect configured with the given aggregations.
func (*DirectorsQuery) All ¶
func (dq *DirectorsQuery) All(ctx context.Context) ([]*Directors, error)
All executes the query and returns a list of DirectorsSlice.
func (*DirectorsQuery) AllX ¶
func (dq *DirectorsQuery) AllX(ctx context.Context) []*Directors
AllX is like All, but panics if an error occurs.
func (*DirectorsQuery) Clone ¶
func (dq *DirectorsQuery) Clone() *DirectorsQuery
Clone returns a duplicate of the DirectorsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DirectorsQuery) Count ¶
func (dq *DirectorsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DirectorsQuery) CountX ¶
func (dq *DirectorsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DirectorsQuery) Exist ¶
func (dq *DirectorsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DirectorsQuery) ExistX ¶
func (dq *DirectorsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DirectorsQuery) First ¶
func (dq *DirectorsQuery) First(ctx context.Context) (*Directors, error)
First returns the first Directors entity from the query. Returns a *NotFoundError when no Directors was found.
func (*DirectorsQuery) FirstID ¶
func (dq *DirectorsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Directors ID from the query. Returns a *NotFoundError when no Directors ID was found.
func (*DirectorsQuery) FirstIDX ¶
func (dq *DirectorsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DirectorsQuery) FirstX ¶
func (dq *DirectorsQuery) FirstX(ctx context.Context) *Directors
FirstX is like First, but panics if an error occurs.
func (*DirectorsQuery) GroupBy ¶
func (dq *DirectorsQuery) GroupBy(field string, fields ...string) *DirectorsGroupBy
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.
func (*DirectorsQuery) IDs ¶
func (dq *DirectorsQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Directors IDs.
func (*DirectorsQuery) IDsX ¶
func (dq *DirectorsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DirectorsQuery) Limit ¶
func (dq *DirectorsQuery) Limit(limit int) *DirectorsQuery
Limit the number of records to be returned by this query.
func (*DirectorsQuery) Offset ¶
func (dq *DirectorsQuery) Offset(offset int) *DirectorsQuery
Offset to start from.
func (*DirectorsQuery) Only ¶
func (dq *DirectorsQuery) Only(ctx context.Context) (*Directors, error)
Only returns a single Directors entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Directors entity is found. Returns a *NotFoundError when no Directors entities are found.
func (*DirectorsQuery) OnlyID ¶
func (dq *DirectorsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Directors ID in the query. Returns a *NotSingularError when more than one Directors ID is found. Returns a *NotFoundError when no entities are found.
func (*DirectorsQuery) OnlyIDX ¶
func (dq *DirectorsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DirectorsQuery) OnlyX ¶
func (dq *DirectorsQuery) OnlyX(ctx context.Context) *Directors
OnlyX is like Only, but panics if an error occurs.
func (*DirectorsQuery) Order ¶
func (dq *DirectorsQuery) Order(o ...directors.OrderOption) *DirectorsQuery
Order specifies how the records should be ordered.
func (*DirectorsQuery) Select ¶
func (dq *DirectorsQuery) Select(fields ...string) *DirectorsSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*DirectorsQuery) Unique ¶
func (dq *DirectorsQuery) Unique(unique bool) *DirectorsQuery
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 (*DirectorsQuery) Where ¶
func (dq *DirectorsQuery) Where(ps ...predicate.Directors) *DirectorsQuery
Where adds a new predicate for the DirectorsQuery builder.
type DirectorsSelect ¶
type DirectorsSelect struct { *DirectorsQuery // contains filtered or unexported fields }
DirectorsSelect is the builder for selecting fields of Directors entities.
func (*DirectorsSelect) Aggregate ¶
func (ds *DirectorsSelect) Aggregate(fns ...AggregateFunc) *DirectorsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DirectorsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DirectorsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DirectorsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DirectorsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DirectorsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DirectorsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DirectorsSelect) Scan ¶
func (ds *DirectorsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DirectorsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DirectorsSlice ¶
type DirectorsSlice []*Directors
DirectorsSlice is a parsable slice of Directors.
type DirectorsUpdate ¶
type DirectorsUpdate struct {
// contains filtered or unexported fields
}
DirectorsUpdate is the builder for updating Directors entities.
func (*DirectorsUpdate) Exec ¶
func (du *DirectorsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DirectorsUpdate) ExecX ¶
func (du *DirectorsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectorsUpdate) Mutation ¶
func (du *DirectorsUpdate) Mutation() *DirectorsMutation
Mutation returns the DirectorsMutation object of the builder.
func (*DirectorsUpdate) Save ¶
func (du *DirectorsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DirectorsUpdate) SaveX ¶
func (du *DirectorsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DirectorsUpdate) Where ¶
func (du *DirectorsUpdate) Where(ps ...predicate.Directors) *DirectorsUpdate
Where appends a list predicates to the DirectorsUpdate builder.
type DirectorsUpdateOne ¶
type DirectorsUpdateOne struct {
// contains filtered or unexported fields
}
DirectorsUpdateOne is the builder for updating a single Directors entity.
func (*DirectorsUpdateOne) Exec ¶
func (duo *DirectorsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DirectorsUpdateOne) ExecX ¶
func (duo *DirectorsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DirectorsUpdateOne) Mutation ¶
func (duo *DirectorsUpdateOne) Mutation() *DirectorsMutation
Mutation returns the DirectorsMutation object of the builder.
func (*DirectorsUpdateOne) Save ¶
func (duo *DirectorsUpdateOne) Save(ctx context.Context) (*Directors, error)
Save executes the query and returns the updated Directors entity.
func (*DirectorsUpdateOne) SaveX ¶
func (duo *DirectorsUpdateOne) SaveX(ctx context.Context) *Directors
SaveX is like Save, but panics if an error occurs.
func (*DirectorsUpdateOne) Select ¶
func (duo *DirectorsUpdateOne) Select(field string, fields ...string) *DirectorsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DirectorsUpdateOne) Where ¶
func (duo *DirectorsUpdateOne) Where(ps ...predicate.Directors) *DirectorsUpdateOne
Where appends a list predicates to the DirectorsUpdate builder.
type Files ¶
type Files struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Hash holds the value of the "hash" field. Hash string `json:"hash,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Size holds the value of the "size" field. Size uint64 `json:"size,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FilesQuery when eager-loading is set. Edges FilesEdges `json:"edges"` // contains filtered or unexported fields }
Files is the model entity for the Files schema.
func (*Files) QueryImages ¶
func (f *Files) QueryImages() *ImagesQuery
QueryImages queries the "images" edge of the Files entity.
func (*Files) QueryMusics ¶
func (f *Files) QueryMusics() *MusicsQuery
QueryMusics queries the "musics" edge of the Files entity.
func (*Files) Unwrap ¶
Unwrap unwraps the Files 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 (*Files) Update ¶
func (f *Files) Update() *FilesUpdateOne
Update returns a builder for updating this Files. Note that you need to call Files.Unwrap() before calling this method if this Files was returned from a transaction, and the transaction was committed or rolled back.
type FilesClient ¶
type FilesClient struct {
// contains filtered or unexported fields
}
FilesClient is a client for the Files schema.
func NewFilesClient ¶
func NewFilesClient(c config) *FilesClient
NewFilesClient returns a client for the Files from the given config.
func (*FilesClient) Create ¶
func (c *FilesClient) Create() *FilesCreate
Create returns a builder for creating a Files entity.
func (*FilesClient) CreateBulk ¶
func (c *FilesClient) CreateBulk(builders ...*FilesCreate) *FilesCreateBulk
CreateBulk returns a builder for creating a bulk of Files entities.
func (*FilesClient) Delete ¶
func (c *FilesClient) Delete() *FilesDelete
Delete returns a delete builder for Files.
func (*FilesClient) DeleteOne ¶
func (c *FilesClient) DeleteOne(f *Files) *FilesDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FilesClient) DeleteOneID ¶
func (c *FilesClient) DeleteOneID(id uint64) *FilesDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FilesClient) GetX ¶
func (c *FilesClient) GetX(ctx context.Context, id uint64) *Files
GetX is like Get, but panics if an error occurs.
func (*FilesClient) Intercept ¶
func (c *FilesClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `files.Intercept(f(g(h())))`.
func (*FilesClient) Interceptors ¶
func (c *FilesClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FilesClient) MapCreateBulk ¶
func (c *FilesClient) MapCreateBulk(slice any, setFunc func(*FilesCreate, int)) *FilesCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FilesClient) Query ¶
func (c *FilesClient) Query() *FilesQuery
Query returns a query builder for Files.
func (*FilesClient) QueryImages ¶
func (c *FilesClient) QueryImages(f *Files) *ImagesQuery
QueryImages queries the images edge of a Files.
func (*FilesClient) QueryMusics ¶
func (c *FilesClient) QueryMusics(f *Files) *MusicsQuery
QueryMusics queries the musics edge of a Files.
func (*FilesClient) Update ¶
func (c *FilesClient) Update() *FilesUpdate
Update returns an update builder for Files.
func (*FilesClient) UpdateOne ¶
func (c *FilesClient) UpdateOne(f *Files) *FilesUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FilesClient) UpdateOneID ¶
func (c *FilesClient) UpdateOneID(id uint64) *FilesUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FilesClient) Use ¶
func (c *FilesClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `files.Hooks(f(g(h())))`.
type FilesCreate ¶
type FilesCreate struct {
// contains filtered or unexported fields
}
FilesCreate is the builder for creating a Files entity.
func (*FilesCreate) AddImageIDs ¶
func (fc *FilesCreate) AddImageIDs(ids ...uint64) *FilesCreate
AddImageIDs adds the "images" edge to the Images entity by IDs.
func (*FilesCreate) AddImages ¶
func (fc *FilesCreate) AddImages(i ...*Images) *FilesCreate
AddImages adds the "images" edges to the Images entity.
func (*FilesCreate) AddMusicIDs ¶
func (fc *FilesCreate) AddMusicIDs(ids ...uint64) *FilesCreate
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*FilesCreate) AddMusics ¶
func (fc *FilesCreate) AddMusics(m ...*Musics) *FilesCreate
AddMusics adds the "musics" edges to the Musics entity.
func (*FilesCreate) Exec ¶
func (fc *FilesCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FilesCreate) ExecX ¶
func (fc *FilesCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FilesCreate) Mutation ¶
func (fc *FilesCreate) Mutation() *FilesMutation
Mutation returns the FilesMutation object of the builder.
func (*FilesCreate) Save ¶
func (fc *FilesCreate) Save(ctx context.Context) (*Files, error)
Save creates the Files in the database.
func (*FilesCreate) SaveX ¶
func (fc *FilesCreate) SaveX(ctx context.Context) *Files
SaveX calls Save and panics if Save returns an error.
func (*FilesCreate) SetHash ¶
func (fc *FilesCreate) SetHash(s string) *FilesCreate
SetHash sets the "hash" field.
func (*FilesCreate) SetID ¶
func (fc *FilesCreate) SetID(u uint64) *FilesCreate
SetID sets the "id" field.
func (*FilesCreate) SetName ¶
func (fc *FilesCreate) SetName(s string) *FilesCreate
SetName sets the "name" field.
func (*FilesCreate) SetSize ¶
func (fc *FilesCreate) SetSize(u uint64) *FilesCreate
SetSize sets the "size" field.
type FilesCreateBulk ¶
type FilesCreateBulk struct {
// contains filtered or unexported fields
}
FilesCreateBulk is the builder for creating many Files entities in bulk.
func (*FilesCreateBulk) Exec ¶
func (fcb *FilesCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FilesCreateBulk) ExecX ¶
func (fcb *FilesCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FilesDelete ¶
type FilesDelete struct {
// contains filtered or unexported fields
}
FilesDelete is the builder for deleting a Files entity.
func (*FilesDelete) Exec ¶
func (fd *FilesDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FilesDelete) ExecX ¶
func (fd *FilesDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FilesDelete) Where ¶
func (fd *FilesDelete) Where(ps ...predicate.Files) *FilesDelete
Where appends a list predicates to the FilesDelete builder.
type FilesDeleteOne ¶
type FilesDeleteOne struct {
// contains filtered or unexported fields
}
FilesDeleteOne is the builder for deleting a single Files entity.
func (*FilesDeleteOne) Exec ¶
func (fdo *FilesDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FilesDeleteOne) ExecX ¶
func (fdo *FilesDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FilesDeleteOne) Where ¶
func (fdo *FilesDeleteOne) Where(ps ...predicate.Files) *FilesDeleteOne
Where appends a list predicates to the FilesDelete builder.
type FilesEdges ¶
type FilesEdges struct { // Musics holds the value of the musics edge. Musics []*Musics `json:"musics,omitempty"` // Images holds the value of the images edge. Images []*Images `json:"images,omitempty"` // contains filtered or unexported fields }
FilesEdges holds the relations/edges for other nodes in the graph.
func (FilesEdges) ImagesOrErr ¶
func (e FilesEdges) ImagesOrErr() ([]*Images, error)
ImagesOrErr returns the Images value or an error if the edge was not loaded in eager-loading.
func (FilesEdges) MusicsOrErr ¶
func (e FilesEdges) MusicsOrErr() ([]*Musics, error)
MusicsOrErr returns the Musics value or an error if the edge was not loaded in eager-loading.
type FilesGroupBy ¶
type FilesGroupBy struct {
// contains filtered or unexported fields
}
FilesGroupBy is the group-by builder for Files entities.
func (*FilesGroupBy) Aggregate ¶
func (fgb *FilesGroupBy) Aggregate(fns ...AggregateFunc) *FilesGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FilesGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FilesGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FilesGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FilesGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FilesGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FilesGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FilesGroupBy) Scan ¶
func (fgb *FilesGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FilesGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FilesMutation ¶
type FilesMutation struct {
// contains filtered or unexported fields
}
FilesMutation represents an operation that mutates the Files nodes in the graph.
func (*FilesMutation) AddField ¶
func (m *FilesMutation) 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 (*FilesMutation) AddImageIDs ¶
func (m *FilesMutation) AddImageIDs(ids ...uint64)
AddImageIDs adds the "images" edge to the Images entity by ids.
func (*FilesMutation) AddMusicIDs ¶
func (m *FilesMutation) AddMusicIDs(ids ...uint64)
AddMusicIDs adds the "musics" edge to the Musics entity by ids.
func (*FilesMutation) AddSize ¶
func (m *FilesMutation) AddSize(u int64)
AddSize adds u to the "size" field.
func (*FilesMutation) AddedEdges ¶
func (m *FilesMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FilesMutation) AddedField ¶
func (m *FilesMutation) 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 (*FilesMutation) AddedFields ¶
func (m *FilesMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FilesMutation) AddedIDs ¶
func (m *FilesMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FilesMutation) AddedSize ¶
func (m *FilesMutation) AddedSize() (r int64, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (*FilesMutation) ClearEdge ¶
func (m *FilesMutation) 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 (*FilesMutation) ClearField ¶
func (m *FilesMutation) 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 (*FilesMutation) ClearImages ¶
func (m *FilesMutation) ClearImages()
ClearImages clears the "images" edge to the Images entity.
func (*FilesMutation) ClearMusics ¶
func (m *FilesMutation) ClearMusics()
ClearMusics clears the "musics" edge to the Musics entity.
func (*FilesMutation) ClearedEdges ¶
func (m *FilesMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FilesMutation) ClearedFields ¶
func (m *FilesMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FilesMutation) Client ¶
func (m FilesMutation) 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 (*FilesMutation) EdgeCleared ¶
func (m *FilesMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FilesMutation) Field ¶
func (m *FilesMutation) 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 (*FilesMutation) FieldCleared ¶
func (m *FilesMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FilesMutation) Fields ¶
func (m *FilesMutation) 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 (*FilesMutation) Hash ¶
func (m *FilesMutation) Hash() (r string, exists bool)
Hash returns the value of the "hash" field in the mutation.
func (*FilesMutation) ID ¶
func (m *FilesMutation) 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 (*FilesMutation) IDs ¶
func (m *FilesMutation) 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 (*FilesMutation) ImagesCleared ¶
func (m *FilesMutation) ImagesCleared() bool
ImagesCleared reports if the "images" edge to the Images entity was cleared.
func (*FilesMutation) ImagesIDs ¶
func (m *FilesMutation) ImagesIDs() (ids []uint64)
ImagesIDs returns the "images" edge IDs in the mutation.
func (*FilesMutation) MusicsCleared ¶
func (m *FilesMutation) MusicsCleared() bool
MusicsCleared reports if the "musics" edge to the Musics entity was cleared.
func (*FilesMutation) MusicsIDs ¶
func (m *FilesMutation) MusicsIDs() (ids []uint64)
MusicsIDs returns the "musics" edge IDs in the mutation.
func (*FilesMutation) Name ¶
func (m *FilesMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*FilesMutation) 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 (*FilesMutation) OldHash ¶
func (m *FilesMutation) OldHash(ctx context.Context) (v string, err error)
OldHash returns the old "hash" field's value of the Files entity. If the Files object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FilesMutation) OldName ¶
func (m *FilesMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Files entity. If the Files object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FilesMutation) OldSize ¶
func (m *FilesMutation) OldSize(ctx context.Context) (v uint64, err error)
OldSize returns the old "size" field's value of the Files entity. If the Files object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FilesMutation) RemoveImageIDs ¶
func (m *FilesMutation) RemoveImageIDs(ids ...uint64)
RemoveImageIDs removes the "images" edge to the Images entity by IDs.
func (*FilesMutation) RemoveMusicIDs ¶
func (m *FilesMutation) RemoveMusicIDs(ids ...uint64)
RemoveMusicIDs removes the "musics" edge to the Musics entity by IDs.
func (*FilesMutation) RemovedEdges ¶
func (m *FilesMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FilesMutation) RemovedIDs ¶
func (m *FilesMutation) 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 (*FilesMutation) RemovedImagesIDs ¶
func (m *FilesMutation) RemovedImagesIDs() (ids []uint64)
RemovedImages returns the removed IDs of the "images" edge to the Images entity.
func (*FilesMutation) RemovedMusicsIDs ¶
func (m *FilesMutation) RemovedMusicsIDs() (ids []uint64)
RemovedMusics returns the removed IDs of the "musics" edge to the Musics entity.
func (*FilesMutation) ResetEdge ¶
func (m *FilesMutation) 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 (*FilesMutation) ResetField ¶
func (m *FilesMutation) 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 (*FilesMutation) ResetHash ¶
func (m *FilesMutation) ResetHash()
ResetHash resets all changes to the "hash" field.
func (*FilesMutation) ResetImages ¶
func (m *FilesMutation) ResetImages()
ResetImages resets all changes to the "images" edge.
func (*FilesMutation) ResetMusics ¶
func (m *FilesMutation) ResetMusics()
ResetMusics resets all changes to the "musics" edge.
func (*FilesMutation) ResetName ¶
func (m *FilesMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*FilesMutation) ResetSize ¶
func (m *FilesMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (*FilesMutation) SetField ¶
func (m *FilesMutation) 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 (*FilesMutation) SetHash ¶
func (m *FilesMutation) SetHash(s string)
SetHash sets the "hash" field.
func (*FilesMutation) SetID ¶
func (m *FilesMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Files entities.
func (*FilesMutation) SetName ¶
func (m *FilesMutation) SetName(s string)
SetName sets the "name" field.
func (*FilesMutation) SetOp ¶
func (m *FilesMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FilesMutation) SetSize ¶
func (m *FilesMutation) SetSize(u uint64)
SetSize sets the "size" field.
func (*FilesMutation) Size ¶
func (m *FilesMutation) Size() (r uint64, exists bool)
Size returns the value of the "size" field in the mutation.
func (FilesMutation) Tx ¶
func (m FilesMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FilesMutation) Type ¶
func (m *FilesMutation) Type() string
Type returns the node type of this mutation (Files).
func (*FilesMutation) Where ¶
func (m *FilesMutation) Where(ps ...predicate.Files)
Where appends a list predicates to the FilesMutation builder.
func (*FilesMutation) WhereP ¶
func (m *FilesMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FilesMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FilesQuery ¶
type FilesQuery struct {
// contains filtered or unexported fields
}
FilesQuery is the builder for querying Files entities.
func (*FilesQuery) Aggregate ¶
func (fq *FilesQuery) Aggregate(fns ...AggregateFunc) *FilesSelect
Aggregate returns a FilesSelect configured with the given aggregations.
func (*FilesQuery) All ¶
func (fq *FilesQuery) All(ctx context.Context) ([]*Files, error)
All executes the query and returns a list of FilesSlice.
func (*FilesQuery) AllX ¶
func (fq *FilesQuery) AllX(ctx context.Context) []*Files
AllX is like All, but panics if an error occurs.
func (*FilesQuery) Clone ¶
func (fq *FilesQuery) Clone() *FilesQuery
Clone returns a duplicate of the FilesQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FilesQuery) Count ¶
func (fq *FilesQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FilesQuery) CountX ¶
func (fq *FilesQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FilesQuery) Exist ¶
func (fq *FilesQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FilesQuery) ExistX ¶
func (fq *FilesQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FilesQuery) First ¶
func (fq *FilesQuery) First(ctx context.Context) (*Files, error)
First returns the first Files entity from the query. Returns a *NotFoundError when no Files was found.
func (*FilesQuery) FirstID ¶
func (fq *FilesQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Files ID from the query. Returns a *NotFoundError when no Files ID was found.
func (*FilesQuery) FirstIDX ¶
func (fq *FilesQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*FilesQuery) FirstX ¶
func (fq *FilesQuery) FirstX(ctx context.Context) *Files
FirstX is like First, but panics if an error occurs.
func (*FilesQuery) GroupBy ¶
func (fq *FilesQuery) GroupBy(field string, fields ...string) *FilesGroupBy
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 { Hash string `json:"hash,omitempty"` Count int `json:"count,omitempty"` } client.Files.Query(). GroupBy(files.FieldHash). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FilesQuery) IDs ¶
func (fq *FilesQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Files IDs.
func (*FilesQuery) IDsX ¶
func (fq *FilesQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*FilesQuery) Limit ¶
func (fq *FilesQuery) Limit(limit int) *FilesQuery
Limit the number of records to be returned by this query.
func (*FilesQuery) Offset ¶
func (fq *FilesQuery) Offset(offset int) *FilesQuery
Offset to start from.
func (*FilesQuery) Only ¶
func (fq *FilesQuery) Only(ctx context.Context) (*Files, error)
Only returns a single Files entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Files entity is found. Returns a *NotFoundError when no Files entities are found.
func (*FilesQuery) OnlyID ¶
func (fq *FilesQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Files ID in the query. Returns a *NotSingularError when more than one Files ID is found. Returns a *NotFoundError when no entities are found.
func (*FilesQuery) OnlyIDX ¶
func (fq *FilesQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FilesQuery) OnlyX ¶
func (fq *FilesQuery) OnlyX(ctx context.Context) *Files
OnlyX is like Only, but panics if an error occurs.
func (*FilesQuery) Order ¶
func (fq *FilesQuery) Order(o ...files.OrderOption) *FilesQuery
Order specifies how the records should be ordered.
func (*FilesQuery) QueryImages ¶
func (fq *FilesQuery) QueryImages() *ImagesQuery
QueryImages chains the current query on the "images" edge.
func (*FilesQuery) QueryMusics ¶
func (fq *FilesQuery) QueryMusics() *MusicsQuery
QueryMusics chains the current query on the "musics" edge.
func (*FilesQuery) Select ¶
func (fq *FilesQuery) Select(fields ...string) *FilesSelect
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 { Hash string `json:"hash,omitempty"` } client.Files.Query(). Select(files.FieldHash). Scan(ctx, &v)
func (*FilesQuery) Unique ¶
func (fq *FilesQuery) Unique(unique bool) *FilesQuery
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 (*FilesQuery) Where ¶
func (fq *FilesQuery) Where(ps ...predicate.Files) *FilesQuery
Where adds a new predicate for the FilesQuery builder.
func (*FilesQuery) WithImages ¶
func (fq *FilesQuery) WithImages(opts ...func(*ImagesQuery)) *FilesQuery
WithImages tells the query-builder to eager-load the nodes that are connected to the "images" edge. The optional arguments are used to configure the query builder of the edge.
func (*FilesQuery) WithMusics ¶
func (fq *FilesQuery) WithMusics(opts ...func(*MusicsQuery)) *FilesQuery
WithMusics tells the query-builder to eager-load the nodes that are connected to the "musics" edge. The optional arguments are used to configure the query builder of the edge.
type FilesSelect ¶
type FilesSelect struct { *FilesQuery // contains filtered or unexported fields }
FilesSelect is the builder for selecting fields of Files entities.
func (*FilesSelect) Aggregate ¶
func (fs *FilesSelect) Aggregate(fns ...AggregateFunc) *FilesSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FilesSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FilesSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FilesSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FilesSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FilesSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FilesSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FilesSelect) Scan ¶
func (fs *FilesSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FilesSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FilesUpdate ¶
type FilesUpdate struct {
// contains filtered or unexported fields
}
FilesUpdate is the builder for updating Files entities.
func (*FilesUpdate) AddImageIDs ¶
func (fu *FilesUpdate) AddImageIDs(ids ...uint64) *FilesUpdate
AddImageIDs adds the "images" edge to the Images entity by IDs.
func (*FilesUpdate) AddImages ¶
func (fu *FilesUpdate) AddImages(i ...*Images) *FilesUpdate
AddImages adds the "images" edges to the Images entity.
func (*FilesUpdate) AddMusicIDs ¶
func (fu *FilesUpdate) AddMusicIDs(ids ...uint64) *FilesUpdate
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*FilesUpdate) AddMusics ¶
func (fu *FilesUpdate) AddMusics(m ...*Musics) *FilesUpdate
AddMusics adds the "musics" edges to the Musics entity.
func (*FilesUpdate) AddSize ¶
func (fu *FilesUpdate) AddSize(u int64) *FilesUpdate
AddSize adds u to the "size" field.
func (*FilesUpdate) ClearImages ¶
func (fu *FilesUpdate) ClearImages() *FilesUpdate
ClearImages clears all "images" edges to the Images entity.
func (*FilesUpdate) ClearMusics ¶
func (fu *FilesUpdate) ClearMusics() *FilesUpdate
ClearMusics clears all "musics" edges to the Musics entity.
func (*FilesUpdate) Exec ¶
func (fu *FilesUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FilesUpdate) ExecX ¶
func (fu *FilesUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FilesUpdate) Mutation ¶
func (fu *FilesUpdate) Mutation() *FilesMutation
Mutation returns the FilesMutation object of the builder.
func (*FilesUpdate) RemoveImageIDs ¶
func (fu *FilesUpdate) RemoveImageIDs(ids ...uint64) *FilesUpdate
RemoveImageIDs removes the "images" edge to Images entities by IDs.
func (*FilesUpdate) RemoveImages ¶
func (fu *FilesUpdate) RemoveImages(i ...*Images) *FilesUpdate
RemoveImages removes "images" edges to Images entities.
func (*FilesUpdate) RemoveMusicIDs ¶
func (fu *FilesUpdate) RemoveMusicIDs(ids ...uint64) *FilesUpdate
RemoveMusicIDs removes the "musics" edge to Musics entities by IDs.
func (*FilesUpdate) RemoveMusics ¶
func (fu *FilesUpdate) RemoveMusics(m ...*Musics) *FilesUpdate
RemoveMusics removes "musics" edges to Musics entities.
func (*FilesUpdate) Save ¶
func (fu *FilesUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FilesUpdate) SaveX ¶
func (fu *FilesUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FilesUpdate) SetHash ¶
func (fu *FilesUpdate) SetHash(s string) *FilesUpdate
SetHash sets the "hash" field.
func (*FilesUpdate) SetName ¶
func (fu *FilesUpdate) SetName(s string) *FilesUpdate
SetName sets the "name" field.
func (*FilesUpdate) SetNillableHash ¶
func (fu *FilesUpdate) SetNillableHash(s *string) *FilesUpdate
SetNillableHash sets the "hash" field if the given value is not nil.
func (*FilesUpdate) SetNillableName ¶
func (fu *FilesUpdate) SetNillableName(s *string) *FilesUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*FilesUpdate) SetNillableSize ¶
func (fu *FilesUpdate) SetNillableSize(u *uint64) *FilesUpdate
SetNillableSize sets the "size" field if the given value is not nil.
func (*FilesUpdate) SetSize ¶
func (fu *FilesUpdate) SetSize(u uint64) *FilesUpdate
SetSize sets the "size" field.
func (*FilesUpdate) Where ¶
func (fu *FilesUpdate) Where(ps ...predicate.Files) *FilesUpdate
Where appends a list predicates to the FilesUpdate builder.
type FilesUpdateOne ¶
type FilesUpdateOne struct {
// contains filtered or unexported fields
}
FilesUpdateOne is the builder for updating a single Files entity.
func (*FilesUpdateOne) AddImageIDs ¶
func (fuo *FilesUpdateOne) AddImageIDs(ids ...uint64) *FilesUpdateOne
AddImageIDs adds the "images" edge to the Images entity by IDs.
func (*FilesUpdateOne) AddImages ¶
func (fuo *FilesUpdateOne) AddImages(i ...*Images) *FilesUpdateOne
AddImages adds the "images" edges to the Images entity.
func (*FilesUpdateOne) AddMusicIDs ¶
func (fuo *FilesUpdateOne) AddMusicIDs(ids ...uint64) *FilesUpdateOne
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*FilesUpdateOne) AddMusics ¶
func (fuo *FilesUpdateOne) AddMusics(m ...*Musics) *FilesUpdateOne
AddMusics adds the "musics" edges to the Musics entity.
func (*FilesUpdateOne) AddSize ¶
func (fuo *FilesUpdateOne) AddSize(u int64) *FilesUpdateOne
AddSize adds u to the "size" field.
func (*FilesUpdateOne) ClearImages ¶
func (fuo *FilesUpdateOne) ClearImages() *FilesUpdateOne
ClearImages clears all "images" edges to the Images entity.
func (*FilesUpdateOne) ClearMusics ¶
func (fuo *FilesUpdateOne) ClearMusics() *FilesUpdateOne
ClearMusics clears all "musics" edges to the Musics entity.
func (*FilesUpdateOne) Exec ¶
func (fuo *FilesUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FilesUpdateOne) ExecX ¶
func (fuo *FilesUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FilesUpdateOne) Mutation ¶
func (fuo *FilesUpdateOne) Mutation() *FilesMutation
Mutation returns the FilesMutation object of the builder.
func (*FilesUpdateOne) RemoveImageIDs ¶
func (fuo *FilesUpdateOne) RemoveImageIDs(ids ...uint64) *FilesUpdateOne
RemoveImageIDs removes the "images" edge to Images entities by IDs.
func (*FilesUpdateOne) RemoveImages ¶
func (fuo *FilesUpdateOne) RemoveImages(i ...*Images) *FilesUpdateOne
RemoveImages removes "images" edges to Images entities.
func (*FilesUpdateOne) RemoveMusicIDs ¶
func (fuo *FilesUpdateOne) RemoveMusicIDs(ids ...uint64) *FilesUpdateOne
RemoveMusicIDs removes the "musics" edge to Musics entities by IDs.
func (*FilesUpdateOne) RemoveMusics ¶
func (fuo *FilesUpdateOne) RemoveMusics(m ...*Musics) *FilesUpdateOne
RemoveMusics removes "musics" edges to Musics entities.
func (*FilesUpdateOne) Save ¶
func (fuo *FilesUpdateOne) Save(ctx context.Context) (*Files, error)
Save executes the query and returns the updated Files entity.
func (*FilesUpdateOne) SaveX ¶
func (fuo *FilesUpdateOne) SaveX(ctx context.Context) *Files
SaveX is like Save, but panics if an error occurs.
func (*FilesUpdateOne) Select ¶
func (fuo *FilesUpdateOne) Select(field string, fields ...string) *FilesUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FilesUpdateOne) SetHash ¶
func (fuo *FilesUpdateOne) SetHash(s string) *FilesUpdateOne
SetHash sets the "hash" field.
func (*FilesUpdateOne) SetName ¶
func (fuo *FilesUpdateOne) SetName(s string) *FilesUpdateOne
SetName sets the "name" field.
func (*FilesUpdateOne) SetNillableHash ¶
func (fuo *FilesUpdateOne) SetNillableHash(s *string) *FilesUpdateOne
SetNillableHash sets the "hash" field if the given value is not nil.
func (*FilesUpdateOne) SetNillableName ¶
func (fuo *FilesUpdateOne) SetNillableName(s *string) *FilesUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*FilesUpdateOne) SetNillableSize ¶
func (fuo *FilesUpdateOne) SetNillableSize(u *uint64) *FilesUpdateOne
SetNillableSize sets the "size" field if the given value is not nil.
func (*FilesUpdateOne) SetSize ¶
func (fuo *FilesUpdateOne) SetSize(u uint64) *FilesUpdateOne
SetSize sets the "size" field.
func (*FilesUpdateOne) Where ¶
func (fuo *FilesUpdateOne) Where(ps ...predicate.Files) *FilesUpdateOne
Where appends a list predicates to the FilesUpdate builder.
type Images ¶
type Images struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // IMAGE WIDTH Width int32 `json:"width,omitempty"` // IMAGE HEIGHT Height int32 `json:"height,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ImagesQuery when eager-loading is set. Edges ImagesEdges `json:"edges"` // contains filtered or unexported fields }
Images is the model entity for the Images schema.
func (*Images) QueryAlbums ¶
func (i *Images) QueryAlbums() *AlbumsQuery
QueryAlbums queries the "albums" edge of the Images entity.
func (*Images) QueryFile ¶
func (i *Images) QueryFile() *FilesQuery
QueryFile queries the "file" edge of the Images entity.
func (*Images) QueryPlaylists ¶
func (i *Images) QueryPlaylists() *PlaylistsQuery
QueryPlaylists queries the "playlists" edge of the Images entity.
func (*Images) Unwrap ¶
Unwrap unwraps the Images 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 (*Images) Update ¶
func (i *Images) Update() *ImagesUpdateOne
Update returns a builder for updating this Images. Note that you need to call Images.Unwrap() before calling this method if this Images was returned from a transaction, and the transaction was committed or rolled back.
type ImagesClient ¶
type ImagesClient struct {
// contains filtered or unexported fields
}
ImagesClient is a client for the Images schema.
func NewImagesClient ¶
func NewImagesClient(c config) *ImagesClient
NewImagesClient returns a client for the Images from the given config.
func (*ImagesClient) Create ¶
func (c *ImagesClient) Create() *ImagesCreate
Create returns a builder for creating a Images entity.
func (*ImagesClient) CreateBulk ¶
func (c *ImagesClient) CreateBulk(builders ...*ImagesCreate) *ImagesCreateBulk
CreateBulk returns a builder for creating a bulk of Images entities.
func (*ImagesClient) Delete ¶
func (c *ImagesClient) Delete() *ImagesDelete
Delete returns a delete builder for Images.
func (*ImagesClient) DeleteOne ¶
func (c *ImagesClient) DeleteOne(i *Images) *ImagesDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ImagesClient) DeleteOneID ¶
func (c *ImagesClient) DeleteOneID(id uint64) *ImagesDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ImagesClient) GetX ¶
func (c *ImagesClient) GetX(ctx context.Context, id uint64) *Images
GetX is like Get, but panics if an error occurs.
func (*ImagesClient) Intercept ¶
func (c *ImagesClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `images.Intercept(f(g(h())))`.
func (*ImagesClient) Interceptors ¶
func (c *ImagesClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ImagesClient) MapCreateBulk ¶
func (c *ImagesClient) MapCreateBulk(slice any, setFunc func(*ImagesCreate, int)) *ImagesCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ImagesClient) Query ¶
func (c *ImagesClient) Query() *ImagesQuery
Query returns a query builder for Images.
func (*ImagesClient) QueryAlbums ¶
func (c *ImagesClient) QueryAlbums(i *Images) *AlbumsQuery
QueryAlbums queries the albums edge of a Images.
func (*ImagesClient) QueryFile ¶
func (c *ImagesClient) QueryFile(i *Images) *FilesQuery
QueryFile queries the file edge of a Images.
func (*ImagesClient) QueryPlaylists ¶
func (c *ImagesClient) QueryPlaylists(i *Images) *PlaylistsQuery
QueryPlaylists queries the playlists edge of a Images.
func (*ImagesClient) Update ¶
func (c *ImagesClient) Update() *ImagesUpdate
Update returns an update builder for Images.
func (*ImagesClient) UpdateOne ¶
func (c *ImagesClient) UpdateOne(i *Images) *ImagesUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ImagesClient) UpdateOneID ¶
func (c *ImagesClient) UpdateOneID(id uint64) *ImagesUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ImagesClient) Use ¶
func (c *ImagesClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `images.Hooks(f(g(h())))`.
type ImagesCreate ¶
type ImagesCreate struct {
// contains filtered or unexported fields
}
ImagesCreate is the builder for creating a Images entity.
func (*ImagesCreate) AddAlbumIDs ¶
func (ic *ImagesCreate) AddAlbumIDs(ids ...uint64) *ImagesCreate
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*ImagesCreate) AddAlbums ¶
func (ic *ImagesCreate) AddAlbums(a ...*Albums) *ImagesCreate
AddAlbums adds the "albums" edges to the Albums entity.
func (*ImagesCreate) AddPlaylistIDs ¶
func (ic *ImagesCreate) AddPlaylistIDs(ids ...uint64) *ImagesCreate
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by IDs.
func (*ImagesCreate) AddPlaylists ¶
func (ic *ImagesCreate) AddPlaylists(p ...*Playlists) *ImagesCreate
AddPlaylists adds the "playlists" edges to the Playlists entity.
func (*ImagesCreate) Exec ¶
func (ic *ImagesCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ImagesCreate) ExecX ¶
func (ic *ImagesCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImagesCreate) Mutation ¶
func (ic *ImagesCreate) Mutation() *ImagesMutation
Mutation returns the ImagesMutation object of the builder.
func (*ImagesCreate) Save ¶
func (ic *ImagesCreate) Save(ctx context.Context) (*Images, error)
Save creates the Images in the database.
func (*ImagesCreate) SaveX ¶
func (ic *ImagesCreate) SaveX(ctx context.Context) *Images
SaveX calls Save and panics if Save returns an error.
func (*ImagesCreate) SetCreateTime ¶
func (ic *ImagesCreate) SetCreateTime(t time.Time) *ImagesCreate
SetCreateTime sets the "create_time" field.
func (*ImagesCreate) SetFile ¶
func (ic *ImagesCreate) SetFile(f *Files) *ImagesCreate
SetFile sets the "file" edge to the Files entity.
func (*ImagesCreate) SetFileID ¶
func (ic *ImagesCreate) SetFileID(id uint64) *ImagesCreate
SetFileID sets the "file" edge to the Files entity by ID.
func (*ImagesCreate) SetHeight ¶
func (ic *ImagesCreate) SetHeight(i int32) *ImagesCreate
SetHeight sets the "height" field.
func (*ImagesCreate) SetID ¶
func (ic *ImagesCreate) SetID(u uint64) *ImagesCreate
SetID sets the "id" field.
func (*ImagesCreate) SetNillableCreateTime ¶
func (ic *ImagesCreate) SetNillableCreateTime(t *time.Time) *ImagesCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*ImagesCreate) SetNillableUpdateTime ¶
func (ic *ImagesCreate) SetNillableUpdateTime(t *time.Time) *ImagesCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*ImagesCreate) SetUpdateTime ¶
func (ic *ImagesCreate) SetUpdateTime(t time.Time) *ImagesCreate
SetUpdateTime sets the "update_time" field.
func (*ImagesCreate) SetWidth ¶
func (ic *ImagesCreate) SetWidth(i int32) *ImagesCreate
SetWidth sets the "width" field.
type ImagesCreateBulk ¶
type ImagesCreateBulk struct {
// contains filtered or unexported fields
}
ImagesCreateBulk is the builder for creating many Images entities in bulk.
func (*ImagesCreateBulk) Exec ¶
func (icb *ImagesCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ImagesCreateBulk) ExecX ¶
func (icb *ImagesCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ImagesDelete ¶
type ImagesDelete struct {
// contains filtered or unexported fields
}
ImagesDelete is the builder for deleting a Images entity.
func (*ImagesDelete) Exec ¶
func (id *ImagesDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ImagesDelete) ExecX ¶
func (id *ImagesDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ImagesDelete) Where ¶
func (id *ImagesDelete) Where(ps ...predicate.Images) *ImagesDelete
Where appends a list predicates to the ImagesDelete builder.
type ImagesDeleteOne ¶
type ImagesDeleteOne struct {
// contains filtered or unexported fields
}
ImagesDeleteOne is the builder for deleting a single Images entity.
func (*ImagesDeleteOne) Exec ¶
func (ido *ImagesDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ImagesDeleteOne) ExecX ¶
func (ido *ImagesDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImagesDeleteOne) Where ¶
func (ido *ImagesDeleteOne) Where(ps ...predicate.Images) *ImagesDeleteOne
Where appends a list predicates to the ImagesDelete builder.
type ImagesEdges ¶
type ImagesEdges struct { // File holds the value of the file edge. File *Files `json:"file,omitempty"` // Albums holds the value of the albums edge. Albums []*Albums `json:"albums,omitempty"` // Playlists holds the value of the playlists edge. Playlists []*Playlists `json:"playlists,omitempty"` // contains filtered or unexported fields }
ImagesEdges holds the relations/edges for other nodes in the graph.
func (ImagesEdges) AlbumsOrErr ¶
func (e ImagesEdges) AlbumsOrErr() ([]*Albums, error)
AlbumsOrErr returns the Albums value or an error if the edge was not loaded in eager-loading.
func (ImagesEdges) FileOrErr ¶
func (e ImagesEdges) FileOrErr() (*Files, error)
FileOrErr returns the File value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ImagesEdges) PlaylistsOrErr ¶
func (e ImagesEdges) PlaylistsOrErr() ([]*Playlists, error)
PlaylistsOrErr returns the Playlists value or an error if the edge was not loaded in eager-loading.
type ImagesGroupBy ¶
type ImagesGroupBy struct {
// contains filtered or unexported fields
}
ImagesGroupBy is the group-by builder for Images entities.
func (*ImagesGroupBy) Aggregate ¶
func (igb *ImagesGroupBy) Aggregate(fns ...AggregateFunc) *ImagesGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ImagesGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ImagesGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ImagesGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ImagesGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ImagesGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ImagesGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ImagesGroupBy) Scan ¶
func (igb *ImagesGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ImagesGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ImagesMutation ¶
type ImagesMutation struct {
// contains filtered or unexported fields
}
ImagesMutation represents an operation that mutates the Images nodes in the graph.
func (*ImagesMutation) AddAlbumIDs ¶
func (m *ImagesMutation) AddAlbumIDs(ids ...uint64)
AddAlbumIDs adds the "albums" edge to the Albums entity by ids.
func (*ImagesMutation) AddField ¶
func (m *ImagesMutation) 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 (*ImagesMutation) AddHeight ¶
func (m *ImagesMutation) AddHeight(i int32)
AddHeight adds i to the "height" field.
func (*ImagesMutation) AddPlaylistIDs ¶
func (m *ImagesMutation) AddPlaylistIDs(ids ...uint64)
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by ids.
func (*ImagesMutation) AddWidth ¶
func (m *ImagesMutation) AddWidth(i int32)
AddWidth adds i to the "width" field.
func (*ImagesMutation) AddedEdges ¶
func (m *ImagesMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ImagesMutation) AddedField ¶
func (m *ImagesMutation) 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 (*ImagesMutation) AddedFields ¶
func (m *ImagesMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ImagesMutation) AddedHeight ¶
func (m *ImagesMutation) AddedHeight() (r int32, exists bool)
AddedHeight returns the value that was added to the "height" field in this mutation.
func (*ImagesMutation) AddedIDs ¶
func (m *ImagesMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ImagesMutation) AddedWidth ¶
func (m *ImagesMutation) AddedWidth() (r int32, exists bool)
AddedWidth returns the value that was added to the "width" field in this mutation.
func (*ImagesMutation) AlbumsCleared ¶
func (m *ImagesMutation) AlbumsCleared() bool
AlbumsCleared reports if the "albums" edge to the Albums entity was cleared.
func (*ImagesMutation) AlbumsIDs ¶
func (m *ImagesMutation) AlbumsIDs() (ids []uint64)
AlbumsIDs returns the "albums" edge IDs in the mutation.
func (*ImagesMutation) ClearAlbums ¶
func (m *ImagesMutation) ClearAlbums()
ClearAlbums clears the "albums" edge to the Albums entity.
func (*ImagesMutation) ClearEdge ¶
func (m *ImagesMutation) 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 (*ImagesMutation) ClearField ¶
func (m *ImagesMutation) 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 (*ImagesMutation) ClearFile ¶
func (m *ImagesMutation) ClearFile()
ClearFile clears the "file" edge to the Files entity.
func (*ImagesMutation) ClearPlaylists ¶
func (m *ImagesMutation) ClearPlaylists()
ClearPlaylists clears the "playlists" edge to the Playlists entity.
func (*ImagesMutation) ClearedEdges ¶
func (m *ImagesMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ImagesMutation) ClearedFields ¶
func (m *ImagesMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ImagesMutation) Client ¶
func (m ImagesMutation) 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 (*ImagesMutation) CreateTime ¶
func (m *ImagesMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*ImagesMutation) EdgeCleared ¶
func (m *ImagesMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ImagesMutation) Field ¶
func (m *ImagesMutation) 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 (*ImagesMutation) FieldCleared ¶
func (m *ImagesMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ImagesMutation) Fields ¶
func (m *ImagesMutation) 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 (*ImagesMutation) FileCleared ¶
func (m *ImagesMutation) FileCleared() bool
FileCleared reports if the "file" edge to the Files entity was cleared.
func (*ImagesMutation) FileID ¶
func (m *ImagesMutation) FileID() (id uint64, exists bool)
FileID returns the "file" edge ID in the mutation.
func (*ImagesMutation) FileIDs ¶
func (m *ImagesMutation) FileIDs() (ids []uint64)
FileIDs returns the "file" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FileID instead. It exists only for internal usage by the builders.
func (*ImagesMutation) Height ¶
func (m *ImagesMutation) Height() (r int32, exists bool)
Height returns the value of the "height" field in the mutation.
func (*ImagesMutation) ID ¶
func (m *ImagesMutation) 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 (*ImagesMutation) IDs ¶
func (m *ImagesMutation) 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 (*ImagesMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Images entity. If the Images object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ImagesMutation) 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 (*ImagesMutation) OldHeight ¶
func (m *ImagesMutation) OldHeight(ctx context.Context) (v int32, err error)
OldHeight returns the old "height" field's value of the Images entity. If the Images object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ImagesMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Images entity. If the Images object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ImagesMutation) OldWidth ¶
func (m *ImagesMutation) OldWidth(ctx context.Context) (v int32, err error)
OldWidth returns the old "width" field's value of the Images entity. If the Images object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ImagesMutation) PlaylistsCleared ¶
func (m *ImagesMutation) PlaylistsCleared() bool
PlaylistsCleared reports if the "playlists" edge to the Playlists entity was cleared.
func (*ImagesMutation) PlaylistsIDs ¶
func (m *ImagesMutation) PlaylistsIDs() (ids []uint64)
PlaylistsIDs returns the "playlists" edge IDs in the mutation.
func (*ImagesMutation) RemoveAlbumIDs ¶
func (m *ImagesMutation) RemoveAlbumIDs(ids ...uint64)
RemoveAlbumIDs removes the "albums" edge to the Albums entity by IDs.
func (*ImagesMutation) RemovePlaylistIDs ¶
func (m *ImagesMutation) RemovePlaylistIDs(ids ...uint64)
RemovePlaylistIDs removes the "playlists" edge to the Playlists entity by IDs.
func (*ImagesMutation) RemovedAlbumsIDs ¶
func (m *ImagesMutation) RemovedAlbumsIDs() (ids []uint64)
RemovedAlbums returns the removed IDs of the "albums" edge to the Albums entity.
func (*ImagesMutation) RemovedEdges ¶
func (m *ImagesMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ImagesMutation) RemovedIDs ¶
func (m *ImagesMutation) 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 (*ImagesMutation) RemovedPlaylistsIDs ¶
func (m *ImagesMutation) RemovedPlaylistsIDs() (ids []uint64)
RemovedPlaylists returns the removed IDs of the "playlists" edge to the Playlists entity.
func (*ImagesMutation) ResetAlbums ¶
func (m *ImagesMutation) ResetAlbums()
ResetAlbums resets all changes to the "albums" edge.
func (*ImagesMutation) ResetCreateTime ¶
func (m *ImagesMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*ImagesMutation) ResetEdge ¶
func (m *ImagesMutation) 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 (*ImagesMutation) ResetField ¶
func (m *ImagesMutation) 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 (*ImagesMutation) ResetFile ¶
func (m *ImagesMutation) ResetFile()
ResetFile resets all changes to the "file" edge.
func (*ImagesMutation) ResetHeight ¶
func (m *ImagesMutation) ResetHeight()
ResetHeight resets all changes to the "height" field.
func (*ImagesMutation) ResetPlaylists ¶
func (m *ImagesMutation) ResetPlaylists()
ResetPlaylists resets all changes to the "playlists" edge.
func (*ImagesMutation) ResetUpdateTime ¶
func (m *ImagesMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*ImagesMutation) ResetWidth ¶
func (m *ImagesMutation) ResetWidth()
ResetWidth resets all changes to the "width" field.
func (*ImagesMutation) SetCreateTime ¶
func (m *ImagesMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*ImagesMutation) SetField ¶
func (m *ImagesMutation) 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 (*ImagesMutation) SetFileID ¶
func (m *ImagesMutation) SetFileID(id uint64)
SetFileID sets the "file" edge to the Files entity by id.
func (*ImagesMutation) SetHeight ¶
func (m *ImagesMutation) SetHeight(i int32)
SetHeight sets the "height" field.
func (*ImagesMutation) SetID ¶
func (m *ImagesMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Images entities.
func (*ImagesMutation) SetOp ¶
func (m *ImagesMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ImagesMutation) SetUpdateTime ¶
func (m *ImagesMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*ImagesMutation) SetWidth ¶
func (m *ImagesMutation) SetWidth(i int32)
SetWidth sets the "width" field.
func (ImagesMutation) Tx ¶
func (m ImagesMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ImagesMutation) Type ¶
func (m *ImagesMutation) Type() string
Type returns the node type of this mutation (Images).
func (*ImagesMutation) UpdateTime ¶
func (m *ImagesMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*ImagesMutation) Where ¶
func (m *ImagesMutation) Where(ps ...predicate.Images)
Where appends a list predicates to the ImagesMutation builder.
func (*ImagesMutation) WhereP ¶
func (m *ImagesMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ImagesMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*ImagesMutation) Width ¶
func (m *ImagesMutation) Width() (r int32, exists bool)
Width returns the value of the "width" field in the mutation.
type ImagesQuery ¶
type ImagesQuery struct {
// contains filtered or unexported fields
}
ImagesQuery is the builder for querying Images entities.
func (*ImagesQuery) Aggregate ¶
func (iq *ImagesQuery) Aggregate(fns ...AggregateFunc) *ImagesSelect
Aggregate returns a ImagesSelect configured with the given aggregations.
func (*ImagesQuery) All ¶
func (iq *ImagesQuery) All(ctx context.Context) ([]*Images, error)
All executes the query and returns a list of ImagesSlice.
func (*ImagesQuery) AllX ¶
func (iq *ImagesQuery) AllX(ctx context.Context) []*Images
AllX is like All, but panics if an error occurs.
func (*ImagesQuery) Clone ¶
func (iq *ImagesQuery) Clone() *ImagesQuery
Clone returns a duplicate of the ImagesQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ImagesQuery) Count ¶
func (iq *ImagesQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ImagesQuery) CountX ¶
func (iq *ImagesQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ImagesQuery) Exist ¶
func (iq *ImagesQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ImagesQuery) ExistX ¶
func (iq *ImagesQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ImagesQuery) First ¶
func (iq *ImagesQuery) First(ctx context.Context) (*Images, error)
First returns the first Images entity from the query. Returns a *NotFoundError when no Images was found.
func (*ImagesQuery) FirstID ¶
func (iq *ImagesQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Images ID from the query. Returns a *NotFoundError when no Images ID was found.
func (*ImagesQuery) FirstIDX ¶
func (iq *ImagesQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*ImagesQuery) FirstX ¶
func (iq *ImagesQuery) FirstX(ctx context.Context) *Images
FirstX is like First, but panics if an error occurs.
func (*ImagesQuery) GroupBy ¶
func (iq *ImagesQuery) GroupBy(field string, fields ...string) *ImagesGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Images.Query(). GroupBy(images.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ImagesQuery) IDs ¶
func (iq *ImagesQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Images IDs.
func (*ImagesQuery) IDsX ¶
func (iq *ImagesQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*ImagesQuery) Limit ¶
func (iq *ImagesQuery) Limit(limit int) *ImagesQuery
Limit the number of records to be returned by this query.
func (*ImagesQuery) Offset ¶
func (iq *ImagesQuery) Offset(offset int) *ImagesQuery
Offset to start from.
func (*ImagesQuery) Only ¶
func (iq *ImagesQuery) Only(ctx context.Context) (*Images, error)
Only returns a single Images entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Images entity is found. Returns a *NotFoundError when no Images entities are found.
func (*ImagesQuery) OnlyID ¶
func (iq *ImagesQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Images ID in the query. Returns a *NotSingularError when more than one Images ID is found. Returns a *NotFoundError when no entities are found.
func (*ImagesQuery) OnlyIDX ¶
func (iq *ImagesQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ImagesQuery) OnlyX ¶
func (iq *ImagesQuery) OnlyX(ctx context.Context) *Images
OnlyX is like Only, but panics if an error occurs.
func (*ImagesQuery) Order ¶
func (iq *ImagesQuery) Order(o ...images.OrderOption) *ImagesQuery
Order specifies how the records should be ordered.
func (*ImagesQuery) QueryAlbums ¶
func (iq *ImagesQuery) QueryAlbums() *AlbumsQuery
QueryAlbums chains the current query on the "albums" edge.
func (*ImagesQuery) QueryFile ¶
func (iq *ImagesQuery) QueryFile() *FilesQuery
QueryFile chains the current query on the "file" edge.
func (*ImagesQuery) QueryPlaylists ¶
func (iq *ImagesQuery) QueryPlaylists() *PlaylistsQuery
QueryPlaylists chains the current query on the "playlists" edge.
func (*ImagesQuery) Select ¶
func (iq *ImagesQuery) Select(fields ...string) *ImagesSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Images.Query(). Select(images.FieldCreateTime). Scan(ctx, &v)
func (*ImagesQuery) Unique ¶
func (iq *ImagesQuery) Unique(unique bool) *ImagesQuery
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 (*ImagesQuery) Where ¶
func (iq *ImagesQuery) Where(ps ...predicate.Images) *ImagesQuery
Where adds a new predicate for the ImagesQuery builder.
func (*ImagesQuery) WithAlbums ¶
func (iq *ImagesQuery) WithAlbums(opts ...func(*AlbumsQuery)) *ImagesQuery
WithAlbums tells the query-builder to eager-load the nodes that are connected to the "albums" edge. The optional arguments are used to configure the query builder of the edge.
func (*ImagesQuery) WithFile ¶
func (iq *ImagesQuery) WithFile(opts ...func(*FilesQuery)) *ImagesQuery
WithFile tells the query-builder to eager-load the nodes that are connected to the "file" edge. The optional arguments are used to configure the query builder of the edge.
func (*ImagesQuery) WithPlaylists ¶
func (iq *ImagesQuery) WithPlaylists(opts ...func(*PlaylistsQuery)) *ImagesQuery
WithPlaylists tells the query-builder to eager-load the nodes that are connected to the "playlists" edge. The optional arguments are used to configure the query builder of the edge.
type ImagesSelect ¶
type ImagesSelect struct { *ImagesQuery // contains filtered or unexported fields }
ImagesSelect is the builder for selecting fields of Images entities.
func (*ImagesSelect) Aggregate ¶
func (is *ImagesSelect) Aggregate(fns ...AggregateFunc) *ImagesSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ImagesSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ImagesSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ImagesSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ImagesSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ImagesSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ImagesSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ImagesSelect) Scan ¶
func (is *ImagesSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ImagesSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ImagesUpdate ¶
type ImagesUpdate struct {
// contains filtered or unexported fields
}
ImagesUpdate is the builder for updating Images entities.
func (*ImagesUpdate) AddAlbumIDs ¶
func (iu *ImagesUpdate) AddAlbumIDs(ids ...uint64) *ImagesUpdate
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*ImagesUpdate) AddAlbums ¶
func (iu *ImagesUpdate) AddAlbums(a ...*Albums) *ImagesUpdate
AddAlbums adds the "albums" edges to the Albums entity.
func (*ImagesUpdate) AddHeight ¶
func (iu *ImagesUpdate) AddHeight(i int32) *ImagesUpdate
AddHeight adds i to the "height" field.
func (*ImagesUpdate) AddPlaylistIDs ¶
func (iu *ImagesUpdate) AddPlaylistIDs(ids ...uint64) *ImagesUpdate
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by IDs.
func (*ImagesUpdate) AddPlaylists ¶
func (iu *ImagesUpdate) AddPlaylists(p ...*Playlists) *ImagesUpdate
AddPlaylists adds the "playlists" edges to the Playlists entity.
func (*ImagesUpdate) AddWidth ¶
func (iu *ImagesUpdate) AddWidth(i int32) *ImagesUpdate
AddWidth adds i to the "width" field.
func (*ImagesUpdate) ClearAlbums ¶
func (iu *ImagesUpdate) ClearAlbums() *ImagesUpdate
ClearAlbums clears all "albums" edges to the Albums entity.
func (*ImagesUpdate) ClearFile ¶
func (iu *ImagesUpdate) ClearFile() *ImagesUpdate
ClearFile clears the "file" edge to the Files entity.
func (*ImagesUpdate) ClearPlaylists ¶
func (iu *ImagesUpdate) ClearPlaylists() *ImagesUpdate
ClearPlaylists clears all "playlists" edges to the Playlists entity.
func (*ImagesUpdate) Exec ¶
func (iu *ImagesUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ImagesUpdate) ExecX ¶
func (iu *ImagesUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImagesUpdate) Mutation ¶
func (iu *ImagesUpdate) Mutation() *ImagesMutation
Mutation returns the ImagesMutation object of the builder.
func (*ImagesUpdate) RemoveAlbumIDs ¶
func (iu *ImagesUpdate) RemoveAlbumIDs(ids ...uint64) *ImagesUpdate
RemoveAlbumIDs removes the "albums" edge to Albums entities by IDs.
func (*ImagesUpdate) RemoveAlbums ¶
func (iu *ImagesUpdate) RemoveAlbums(a ...*Albums) *ImagesUpdate
RemoveAlbums removes "albums" edges to Albums entities.
func (*ImagesUpdate) RemovePlaylistIDs ¶
func (iu *ImagesUpdate) RemovePlaylistIDs(ids ...uint64) *ImagesUpdate
RemovePlaylistIDs removes the "playlists" edge to Playlists entities by IDs.
func (*ImagesUpdate) RemovePlaylists ¶
func (iu *ImagesUpdate) RemovePlaylists(p ...*Playlists) *ImagesUpdate
RemovePlaylists removes "playlists" edges to Playlists entities.
func (*ImagesUpdate) Save ¶
func (iu *ImagesUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ImagesUpdate) SaveX ¶
func (iu *ImagesUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ImagesUpdate) SetFile ¶
func (iu *ImagesUpdate) SetFile(f *Files) *ImagesUpdate
SetFile sets the "file" edge to the Files entity.
func (*ImagesUpdate) SetFileID ¶
func (iu *ImagesUpdate) SetFileID(id uint64) *ImagesUpdate
SetFileID sets the "file" edge to the Files entity by ID.
func (*ImagesUpdate) SetHeight ¶
func (iu *ImagesUpdate) SetHeight(i int32) *ImagesUpdate
SetHeight sets the "height" field.
func (*ImagesUpdate) SetNillableHeight ¶
func (iu *ImagesUpdate) SetNillableHeight(i *int32) *ImagesUpdate
SetNillableHeight sets the "height" field if the given value is not nil.
func (*ImagesUpdate) SetNillableWidth ¶
func (iu *ImagesUpdate) SetNillableWidth(i *int32) *ImagesUpdate
SetNillableWidth sets the "width" field if the given value is not nil.
func (*ImagesUpdate) SetUpdateTime ¶
func (iu *ImagesUpdate) SetUpdateTime(t time.Time) *ImagesUpdate
SetUpdateTime sets the "update_time" field.
func (*ImagesUpdate) SetWidth ¶
func (iu *ImagesUpdate) SetWidth(i int32) *ImagesUpdate
SetWidth sets the "width" field.
func (*ImagesUpdate) Where ¶
func (iu *ImagesUpdate) Where(ps ...predicate.Images) *ImagesUpdate
Where appends a list predicates to the ImagesUpdate builder.
type ImagesUpdateOne ¶
type ImagesUpdateOne struct {
// contains filtered or unexported fields
}
ImagesUpdateOne is the builder for updating a single Images entity.
func (*ImagesUpdateOne) AddAlbumIDs ¶
func (iuo *ImagesUpdateOne) AddAlbumIDs(ids ...uint64) *ImagesUpdateOne
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*ImagesUpdateOne) AddAlbums ¶
func (iuo *ImagesUpdateOne) AddAlbums(a ...*Albums) *ImagesUpdateOne
AddAlbums adds the "albums" edges to the Albums entity.
func (*ImagesUpdateOne) AddHeight ¶
func (iuo *ImagesUpdateOne) AddHeight(i int32) *ImagesUpdateOne
AddHeight adds i to the "height" field.
func (*ImagesUpdateOne) AddPlaylistIDs ¶
func (iuo *ImagesUpdateOne) AddPlaylistIDs(ids ...uint64) *ImagesUpdateOne
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by IDs.
func (*ImagesUpdateOne) AddPlaylists ¶
func (iuo *ImagesUpdateOne) AddPlaylists(p ...*Playlists) *ImagesUpdateOne
AddPlaylists adds the "playlists" edges to the Playlists entity.
func (*ImagesUpdateOne) AddWidth ¶
func (iuo *ImagesUpdateOne) AddWidth(i int32) *ImagesUpdateOne
AddWidth adds i to the "width" field.
func (*ImagesUpdateOne) ClearAlbums ¶
func (iuo *ImagesUpdateOne) ClearAlbums() *ImagesUpdateOne
ClearAlbums clears all "albums" edges to the Albums entity.
func (*ImagesUpdateOne) ClearFile ¶
func (iuo *ImagesUpdateOne) ClearFile() *ImagesUpdateOne
ClearFile clears the "file" edge to the Files entity.
func (*ImagesUpdateOne) ClearPlaylists ¶
func (iuo *ImagesUpdateOne) ClearPlaylists() *ImagesUpdateOne
ClearPlaylists clears all "playlists" edges to the Playlists entity.
func (*ImagesUpdateOne) Exec ¶
func (iuo *ImagesUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ImagesUpdateOne) ExecX ¶
func (iuo *ImagesUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ImagesUpdateOne) Mutation ¶
func (iuo *ImagesUpdateOne) Mutation() *ImagesMutation
Mutation returns the ImagesMutation object of the builder.
func (*ImagesUpdateOne) RemoveAlbumIDs ¶
func (iuo *ImagesUpdateOne) RemoveAlbumIDs(ids ...uint64) *ImagesUpdateOne
RemoveAlbumIDs removes the "albums" edge to Albums entities by IDs.
func (*ImagesUpdateOne) RemoveAlbums ¶
func (iuo *ImagesUpdateOne) RemoveAlbums(a ...*Albums) *ImagesUpdateOne
RemoveAlbums removes "albums" edges to Albums entities.
func (*ImagesUpdateOne) RemovePlaylistIDs ¶
func (iuo *ImagesUpdateOne) RemovePlaylistIDs(ids ...uint64) *ImagesUpdateOne
RemovePlaylistIDs removes the "playlists" edge to Playlists entities by IDs.
func (*ImagesUpdateOne) RemovePlaylists ¶
func (iuo *ImagesUpdateOne) RemovePlaylists(p ...*Playlists) *ImagesUpdateOne
RemovePlaylists removes "playlists" edges to Playlists entities.
func (*ImagesUpdateOne) Save ¶
func (iuo *ImagesUpdateOne) Save(ctx context.Context) (*Images, error)
Save executes the query and returns the updated Images entity.
func (*ImagesUpdateOne) SaveX ¶
func (iuo *ImagesUpdateOne) SaveX(ctx context.Context) *Images
SaveX is like Save, but panics if an error occurs.
func (*ImagesUpdateOne) Select ¶
func (iuo *ImagesUpdateOne) Select(field string, fields ...string) *ImagesUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ImagesUpdateOne) SetFile ¶
func (iuo *ImagesUpdateOne) SetFile(f *Files) *ImagesUpdateOne
SetFile sets the "file" edge to the Files entity.
func (*ImagesUpdateOne) SetFileID ¶
func (iuo *ImagesUpdateOne) SetFileID(id uint64) *ImagesUpdateOne
SetFileID sets the "file" edge to the Files entity by ID.
func (*ImagesUpdateOne) SetHeight ¶
func (iuo *ImagesUpdateOne) SetHeight(i int32) *ImagesUpdateOne
SetHeight sets the "height" field.
func (*ImagesUpdateOne) SetNillableHeight ¶
func (iuo *ImagesUpdateOne) SetNillableHeight(i *int32) *ImagesUpdateOne
SetNillableHeight sets the "height" field if the given value is not nil.
func (*ImagesUpdateOne) SetNillableWidth ¶
func (iuo *ImagesUpdateOne) SetNillableWidth(i *int32) *ImagesUpdateOne
SetNillableWidth sets the "width" field if the given value is not nil.
func (*ImagesUpdateOne) SetUpdateTime ¶
func (iuo *ImagesUpdateOne) SetUpdateTime(t time.Time) *ImagesUpdateOne
SetUpdateTime sets the "update_time" field.
func (*ImagesUpdateOne) SetWidth ¶
func (iuo *ImagesUpdateOne) SetWidth(i int32) *ImagesUpdateOne
SetWidth sets the "width" field.
func (*ImagesUpdateOne) Where ¶
func (iuo *ImagesUpdateOne) Where(ps ...predicate.Images) *ImagesUpdateOne
Where appends a list predicates to the ImagesUpdate builder.
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 Musics ¶
type Musics struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MusicsQuery when eager-loading is set. Edges MusicsEdges `json:"edges"` // contains filtered or unexported fields }
Musics is the model entity for the Musics schema.
func (*Musics) QueryAlbums ¶
func (m *Musics) QueryAlbums() *AlbumsQuery
QueryAlbums queries the "albums" edge of the Musics entity.
func (*Musics) QueryArtists ¶
func (m *Musics) QueryArtists() *ArtistsQuery
QueryArtists queries the "artists" edge of the Musics entity.
func (*Musics) QueryFile ¶
func (m *Musics) QueryFile() *FilesQuery
QueryFile queries the "file" edge of the Musics entity.
func (*Musics) QueryPlaylists ¶
func (m *Musics) QueryPlaylists() *PlaylistsQuery
QueryPlaylists queries the "playlists" edge of the Musics entity.
func (*Musics) QueryUsers ¶
func (m *Musics) QueryUsers() *UsersQuery
QueryUsers queries the "users" edge of the Musics entity.
func (*Musics) Unwrap ¶
Unwrap unwraps the Musics 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 (*Musics) Update ¶
func (m *Musics) Update() *MusicsUpdateOne
Update returns a builder for updating this Musics. Note that you need to call Musics.Unwrap() before calling this method if this Musics was returned from a transaction, and the transaction was committed or rolled back.
type MusicsClient ¶
type MusicsClient struct {
// contains filtered or unexported fields
}
MusicsClient is a client for the Musics schema.
func NewMusicsClient ¶
func NewMusicsClient(c config) *MusicsClient
NewMusicsClient returns a client for the Musics from the given config.
func (*MusicsClient) Create ¶
func (c *MusicsClient) Create() *MusicsCreate
Create returns a builder for creating a Musics entity.
func (*MusicsClient) CreateBulk ¶
func (c *MusicsClient) CreateBulk(builders ...*MusicsCreate) *MusicsCreateBulk
CreateBulk returns a builder for creating a bulk of Musics entities.
func (*MusicsClient) Delete ¶
func (c *MusicsClient) Delete() *MusicsDelete
Delete returns a delete builder for Musics.
func (*MusicsClient) DeleteOne ¶
func (c *MusicsClient) DeleteOne(m *Musics) *MusicsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MusicsClient) DeleteOneID ¶
func (c *MusicsClient) DeleteOneID(id uint64) *MusicsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MusicsClient) GetX ¶
func (c *MusicsClient) GetX(ctx context.Context, id uint64) *Musics
GetX is like Get, but panics if an error occurs.
func (*MusicsClient) Intercept ¶
func (c *MusicsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `musics.Intercept(f(g(h())))`.
func (*MusicsClient) Interceptors ¶
func (c *MusicsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MusicsClient) MapCreateBulk ¶
func (c *MusicsClient) MapCreateBulk(slice any, setFunc func(*MusicsCreate, int)) *MusicsCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*MusicsClient) Query ¶
func (c *MusicsClient) Query() *MusicsQuery
Query returns a query builder for Musics.
func (*MusicsClient) QueryAlbums ¶
func (c *MusicsClient) QueryAlbums(m *Musics) *AlbumsQuery
QueryAlbums queries the albums edge of a Musics.
func (*MusicsClient) QueryArtists ¶
func (c *MusicsClient) QueryArtists(m *Musics) *ArtistsQuery
QueryArtists queries the artists edge of a Musics.
func (*MusicsClient) QueryFile ¶
func (c *MusicsClient) QueryFile(m *Musics) *FilesQuery
QueryFile queries the file edge of a Musics.
func (*MusicsClient) QueryPlaylists ¶
func (c *MusicsClient) QueryPlaylists(m *Musics) *PlaylistsQuery
QueryPlaylists queries the playlists edge of a Musics.
func (*MusicsClient) QueryUsers ¶
func (c *MusicsClient) QueryUsers(m *Musics) *UsersQuery
QueryUsers queries the users edge of a Musics.
func (*MusicsClient) Update ¶
func (c *MusicsClient) Update() *MusicsUpdate
Update returns an update builder for Musics.
func (*MusicsClient) UpdateOne ¶
func (c *MusicsClient) UpdateOne(m *Musics) *MusicsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MusicsClient) UpdateOneID ¶
func (c *MusicsClient) UpdateOneID(id uint64) *MusicsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MusicsClient) Use ¶
func (c *MusicsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `musics.Hooks(f(g(h())))`.
type MusicsCreate ¶
type MusicsCreate struct {
// contains filtered or unexported fields
}
MusicsCreate is the builder for creating a Musics entity.
func (*MusicsCreate) AddAlbumIDs ¶
func (mc *MusicsCreate) AddAlbumIDs(ids ...uint64) *MusicsCreate
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*MusicsCreate) AddAlbums ¶
func (mc *MusicsCreate) AddAlbums(a ...*Albums) *MusicsCreate
AddAlbums adds the "albums" edges to the Albums entity.
func (*MusicsCreate) AddArtistIDs ¶
func (mc *MusicsCreate) AddArtistIDs(ids ...uint64) *MusicsCreate
AddArtistIDs adds the "artists" edge to the Artists entity by IDs.
func (*MusicsCreate) AddArtists ¶
func (mc *MusicsCreate) AddArtists(a ...*Artists) *MusicsCreate
AddArtists adds the "artists" edges to the Artists entity.
func (*MusicsCreate) AddPlaylistIDs ¶
func (mc *MusicsCreate) AddPlaylistIDs(ids ...uint64) *MusicsCreate
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by IDs.
func (*MusicsCreate) AddPlaylists ¶
func (mc *MusicsCreate) AddPlaylists(p ...*Playlists) *MusicsCreate
AddPlaylists adds the "playlists" edges to the Playlists entity.
func (*MusicsCreate) AddUserIDs ¶
func (mc *MusicsCreate) AddUserIDs(ids ...uint64) *MusicsCreate
AddUserIDs adds the "users" edge to the Users entity by IDs.
func (*MusicsCreate) AddUsers ¶
func (mc *MusicsCreate) AddUsers(u ...*Users) *MusicsCreate
AddUsers adds the "users" edges to the Users entity.
func (*MusicsCreate) Exec ¶
func (mc *MusicsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MusicsCreate) ExecX ¶
func (mc *MusicsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MusicsCreate) Mutation ¶
func (mc *MusicsCreate) Mutation() *MusicsMutation
Mutation returns the MusicsMutation object of the builder.
func (*MusicsCreate) Save ¶
func (mc *MusicsCreate) Save(ctx context.Context) (*Musics, error)
Save creates the Musics in the database.
func (*MusicsCreate) SaveX ¶
func (mc *MusicsCreate) SaveX(ctx context.Context) *Musics
SaveX calls Save and panics if Save returns an error.
func (*MusicsCreate) SetCreateTime ¶
func (mc *MusicsCreate) SetCreateTime(t time.Time) *MusicsCreate
SetCreateTime sets the "create_time" field.
func (*MusicsCreate) SetDescription ¶
func (mc *MusicsCreate) SetDescription(s string) *MusicsCreate
SetDescription sets the "description" field.
func (*MusicsCreate) SetFile ¶
func (mc *MusicsCreate) SetFile(f *Files) *MusicsCreate
SetFile sets the "file" edge to the Files entity.
func (*MusicsCreate) SetFileID ¶
func (mc *MusicsCreate) SetFileID(id uint64) *MusicsCreate
SetFileID sets the "file" edge to the Files entity by ID.
func (*MusicsCreate) SetID ¶
func (mc *MusicsCreate) SetID(u uint64) *MusicsCreate
SetID sets the "id" field.
func (*MusicsCreate) SetName ¶
func (mc *MusicsCreate) SetName(s string) *MusicsCreate
SetName sets the "name" field.
func (*MusicsCreate) SetNillableCreateTime ¶
func (mc *MusicsCreate) SetNillableCreateTime(t *time.Time) *MusicsCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*MusicsCreate) SetNillableDescription ¶
func (mc *MusicsCreate) SetNillableDescription(s *string) *MusicsCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MusicsCreate) SetNillableUpdateTime ¶
func (mc *MusicsCreate) SetNillableUpdateTime(t *time.Time) *MusicsCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*MusicsCreate) SetUpdateTime ¶
func (mc *MusicsCreate) SetUpdateTime(t time.Time) *MusicsCreate
SetUpdateTime sets the "update_time" field.
type MusicsCreateBulk ¶
type MusicsCreateBulk struct {
// contains filtered or unexported fields
}
MusicsCreateBulk is the builder for creating many Musics entities in bulk.
func (*MusicsCreateBulk) Exec ¶
func (mcb *MusicsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MusicsCreateBulk) ExecX ¶
func (mcb *MusicsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MusicsDelete ¶
type MusicsDelete struct {
// contains filtered or unexported fields
}
MusicsDelete is the builder for deleting a Musics entity.
func (*MusicsDelete) Exec ¶
func (md *MusicsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MusicsDelete) ExecX ¶
func (md *MusicsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MusicsDelete) Where ¶
func (md *MusicsDelete) Where(ps ...predicate.Musics) *MusicsDelete
Where appends a list predicates to the MusicsDelete builder.
type MusicsDeleteOne ¶
type MusicsDeleteOne struct {
// contains filtered or unexported fields
}
MusicsDeleteOne is the builder for deleting a single Musics entity.
func (*MusicsDeleteOne) Exec ¶
func (mdo *MusicsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MusicsDeleteOne) ExecX ¶
func (mdo *MusicsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MusicsDeleteOne) Where ¶
func (mdo *MusicsDeleteOne) Where(ps ...predicate.Musics) *MusicsDeleteOne
Where appends a list predicates to the MusicsDelete builder.
type MusicsEdges ¶
type MusicsEdges struct { // Users holds the value of the users edge. Users []*Users `json:"users,omitempty"` // File holds the value of the file edge. File *Files `json:"file,omitempty"` // Artists holds the value of the artists edge. Artists []*Artists `json:"artists,omitempty"` // Playlists holds the value of the playlists edge. Playlists []*Playlists `json:"playlists,omitempty"` // Albums holds the value of the albums edge. Albums []*Albums `json:"albums,omitempty"` // contains filtered or unexported fields }
MusicsEdges holds the relations/edges for other nodes in the graph.
func (MusicsEdges) AlbumsOrErr ¶
func (e MusicsEdges) AlbumsOrErr() ([]*Albums, error)
AlbumsOrErr returns the Albums value or an error if the edge was not loaded in eager-loading.
func (MusicsEdges) ArtistsOrErr ¶
func (e MusicsEdges) ArtistsOrErr() ([]*Artists, error)
ArtistsOrErr returns the Artists value or an error if the edge was not loaded in eager-loading.
func (MusicsEdges) FileOrErr ¶
func (e MusicsEdges) FileOrErr() (*Files, error)
FileOrErr returns the File value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MusicsEdges) PlaylistsOrErr ¶
func (e MusicsEdges) PlaylistsOrErr() ([]*Playlists, error)
PlaylistsOrErr returns the Playlists value or an error if the edge was not loaded in eager-loading.
func (MusicsEdges) UsersOrErr ¶
func (e MusicsEdges) UsersOrErr() ([]*Users, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type MusicsGroupBy ¶
type MusicsGroupBy struct {
// contains filtered or unexported fields
}
MusicsGroupBy is the group-by builder for Musics entities.
func (*MusicsGroupBy) Aggregate ¶
func (mgb *MusicsGroupBy) Aggregate(fns ...AggregateFunc) *MusicsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MusicsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MusicsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MusicsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MusicsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MusicsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MusicsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MusicsGroupBy) Scan ¶
func (mgb *MusicsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MusicsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MusicsMutation ¶
type MusicsMutation struct {
// contains filtered or unexported fields
}
MusicsMutation represents an operation that mutates the Musics nodes in the graph.
func (*MusicsMutation) AddAlbumIDs ¶
func (m *MusicsMutation) AddAlbumIDs(ids ...uint64)
AddAlbumIDs adds the "albums" edge to the Albums entity by ids.
func (*MusicsMutation) AddArtistIDs ¶
func (m *MusicsMutation) AddArtistIDs(ids ...uint64)
AddArtistIDs adds the "artists" edge to the Artists entity by ids.
func (*MusicsMutation) AddField ¶
func (m *MusicsMutation) 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 (*MusicsMutation) AddPlaylistIDs ¶
func (m *MusicsMutation) AddPlaylistIDs(ids ...uint64)
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by ids.
func (*MusicsMutation) AddUserIDs ¶
func (m *MusicsMutation) AddUserIDs(ids ...uint64)
AddUserIDs adds the "users" edge to the Users entity by ids.
func (*MusicsMutation) AddedEdges ¶
func (m *MusicsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MusicsMutation) AddedField ¶
func (m *MusicsMutation) 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 (*MusicsMutation) AddedFields ¶
func (m *MusicsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MusicsMutation) AddedIDs ¶
func (m *MusicsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MusicsMutation) AlbumsCleared ¶
func (m *MusicsMutation) AlbumsCleared() bool
AlbumsCleared reports if the "albums" edge to the Albums entity was cleared.
func (*MusicsMutation) AlbumsIDs ¶
func (m *MusicsMutation) AlbumsIDs() (ids []uint64)
AlbumsIDs returns the "albums" edge IDs in the mutation.
func (*MusicsMutation) ArtistsCleared ¶
func (m *MusicsMutation) ArtistsCleared() bool
ArtistsCleared reports if the "artists" edge to the Artists entity was cleared.
func (*MusicsMutation) ArtistsIDs ¶
func (m *MusicsMutation) ArtistsIDs() (ids []uint64)
ArtistsIDs returns the "artists" edge IDs in the mutation.
func (*MusicsMutation) ClearAlbums ¶
func (m *MusicsMutation) ClearAlbums()
ClearAlbums clears the "albums" edge to the Albums entity.
func (*MusicsMutation) ClearArtists ¶
func (m *MusicsMutation) ClearArtists()
ClearArtists clears the "artists" edge to the Artists entity.
func (*MusicsMutation) ClearDescription ¶
func (m *MusicsMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*MusicsMutation) ClearEdge ¶
func (m *MusicsMutation) 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 (*MusicsMutation) ClearField ¶
func (m *MusicsMutation) 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 (*MusicsMutation) ClearFile ¶
func (m *MusicsMutation) ClearFile()
ClearFile clears the "file" edge to the Files entity.
func (*MusicsMutation) ClearPlaylists ¶
func (m *MusicsMutation) ClearPlaylists()
ClearPlaylists clears the "playlists" edge to the Playlists entity.
func (*MusicsMutation) ClearUsers ¶
func (m *MusicsMutation) ClearUsers()
ClearUsers clears the "users" edge to the Users entity.
func (*MusicsMutation) ClearedEdges ¶
func (m *MusicsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MusicsMutation) ClearedFields ¶
func (m *MusicsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MusicsMutation) Client ¶
func (m MusicsMutation) 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 (*MusicsMutation) CreateTime ¶
func (m *MusicsMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*MusicsMutation) Description ¶
func (m *MusicsMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*MusicsMutation) DescriptionCleared ¶
func (m *MusicsMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*MusicsMutation) EdgeCleared ¶
func (m *MusicsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MusicsMutation) Field ¶
func (m *MusicsMutation) 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 (*MusicsMutation) FieldCleared ¶
func (m *MusicsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MusicsMutation) Fields ¶
func (m *MusicsMutation) 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 (*MusicsMutation) FileCleared ¶
func (m *MusicsMutation) FileCleared() bool
FileCleared reports if the "file" edge to the Files entity was cleared.
func (*MusicsMutation) FileID ¶
func (m *MusicsMutation) FileID() (id uint64, exists bool)
FileID returns the "file" edge ID in the mutation.
func (*MusicsMutation) FileIDs ¶
func (m *MusicsMutation) FileIDs() (ids []uint64)
FileIDs returns the "file" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FileID instead. It exists only for internal usage by the builders.
func (*MusicsMutation) ID ¶
func (m *MusicsMutation) 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 (*MusicsMutation) IDs ¶
func (m *MusicsMutation) 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 (*MusicsMutation) Name ¶
func (m *MusicsMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*MusicsMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Musics entity. If the Musics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MusicsMutation) OldDescription ¶
func (m *MusicsMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Musics entity. If the Musics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MusicsMutation) 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 (*MusicsMutation) OldName ¶
func (m *MusicsMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Musics entity. If the Musics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MusicsMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Musics entity. If the Musics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MusicsMutation) PlaylistsCleared ¶
func (m *MusicsMutation) PlaylistsCleared() bool
PlaylistsCleared reports if the "playlists" edge to the Playlists entity was cleared.
func (*MusicsMutation) PlaylistsIDs ¶
func (m *MusicsMutation) PlaylistsIDs() (ids []uint64)
PlaylistsIDs returns the "playlists" edge IDs in the mutation.
func (*MusicsMutation) RemoveAlbumIDs ¶
func (m *MusicsMutation) RemoveAlbumIDs(ids ...uint64)
RemoveAlbumIDs removes the "albums" edge to the Albums entity by IDs.
func (*MusicsMutation) RemoveArtistIDs ¶
func (m *MusicsMutation) RemoveArtistIDs(ids ...uint64)
RemoveArtistIDs removes the "artists" edge to the Artists entity by IDs.
func (*MusicsMutation) RemovePlaylistIDs ¶
func (m *MusicsMutation) RemovePlaylistIDs(ids ...uint64)
RemovePlaylistIDs removes the "playlists" edge to the Playlists entity by IDs.
func (*MusicsMutation) RemoveUserIDs ¶
func (m *MusicsMutation) RemoveUserIDs(ids ...uint64)
RemoveUserIDs removes the "users" edge to the Users entity by IDs.
func (*MusicsMutation) RemovedAlbumsIDs ¶
func (m *MusicsMutation) RemovedAlbumsIDs() (ids []uint64)
RemovedAlbums returns the removed IDs of the "albums" edge to the Albums entity.
func (*MusicsMutation) RemovedArtistsIDs ¶
func (m *MusicsMutation) RemovedArtistsIDs() (ids []uint64)
RemovedArtists returns the removed IDs of the "artists" edge to the Artists entity.
func (*MusicsMutation) RemovedEdges ¶
func (m *MusicsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MusicsMutation) RemovedIDs ¶
func (m *MusicsMutation) 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 (*MusicsMutation) RemovedPlaylistsIDs ¶
func (m *MusicsMutation) RemovedPlaylistsIDs() (ids []uint64)
RemovedPlaylists returns the removed IDs of the "playlists" edge to the Playlists entity.
func (*MusicsMutation) RemovedUsersIDs ¶
func (m *MusicsMutation) RemovedUsersIDs() (ids []uint64)
RemovedUsers returns the removed IDs of the "users" edge to the Users entity.
func (*MusicsMutation) ResetAlbums ¶
func (m *MusicsMutation) ResetAlbums()
ResetAlbums resets all changes to the "albums" edge.
func (*MusicsMutation) ResetArtists ¶
func (m *MusicsMutation) ResetArtists()
ResetArtists resets all changes to the "artists" edge.
func (*MusicsMutation) ResetCreateTime ¶
func (m *MusicsMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*MusicsMutation) ResetDescription ¶
func (m *MusicsMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*MusicsMutation) ResetEdge ¶
func (m *MusicsMutation) 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 (*MusicsMutation) ResetField ¶
func (m *MusicsMutation) 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 (*MusicsMutation) ResetFile ¶
func (m *MusicsMutation) ResetFile()
ResetFile resets all changes to the "file" edge.
func (*MusicsMutation) ResetName ¶
func (m *MusicsMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*MusicsMutation) ResetPlaylists ¶
func (m *MusicsMutation) ResetPlaylists()
ResetPlaylists resets all changes to the "playlists" edge.
func (*MusicsMutation) ResetUpdateTime ¶
func (m *MusicsMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*MusicsMutation) ResetUsers ¶
func (m *MusicsMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*MusicsMutation) SetCreateTime ¶
func (m *MusicsMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*MusicsMutation) SetDescription ¶
func (m *MusicsMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*MusicsMutation) SetField ¶
func (m *MusicsMutation) 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 (*MusicsMutation) SetFileID ¶
func (m *MusicsMutation) SetFileID(id uint64)
SetFileID sets the "file" edge to the Files entity by id.
func (*MusicsMutation) SetID ¶
func (m *MusicsMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Musics entities.
func (*MusicsMutation) SetName ¶
func (m *MusicsMutation) SetName(s string)
SetName sets the "name" field.
func (*MusicsMutation) SetOp ¶
func (m *MusicsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MusicsMutation) SetUpdateTime ¶
func (m *MusicsMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (MusicsMutation) Tx ¶
func (m MusicsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MusicsMutation) Type ¶
func (m *MusicsMutation) Type() string
Type returns the node type of this mutation (Musics).
func (*MusicsMutation) UpdateTime ¶
func (m *MusicsMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*MusicsMutation) UsersCleared ¶
func (m *MusicsMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the Users entity was cleared.
func (*MusicsMutation) UsersIDs ¶
func (m *MusicsMutation) UsersIDs() (ids []uint64)
UsersIDs returns the "users" edge IDs in the mutation.
func (*MusicsMutation) Where ¶
func (m *MusicsMutation) Where(ps ...predicate.Musics)
Where appends a list predicates to the MusicsMutation builder.
func (*MusicsMutation) WhereP ¶
func (m *MusicsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MusicsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MusicsQuery ¶
type MusicsQuery struct {
// contains filtered or unexported fields
}
MusicsQuery is the builder for querying Musics entities.
func (*MusicsQuery) Aggregate ¶
func (mq *MusicsQuery) Aggregate(fns ...AggregateFunc) *MusicsSelect
Aggregate returns a MusicsSelect configured with the given aggregations.
func (*MusicsQuery) All ¶
func (mq *MusicsQuery) All(ctx context.Context) ([]*Musics, error)
All executes the query and returns a list of MusicsSlice.
func (*MusicsQuery) AllX ¶
func (mq *MusicsQuery) AllX(ctx context.Context) []*Musics
AllX is like All, but panics if an error occurs.
func (*MusicsQuery) Clone ¶
func (mq *MusicsQuery) Clone() *MusicsQuery
Clone returns a duplicate of the MusicsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MusicsQuery) Count ¶
func (mq *MusicsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MusicsQuery) CountX ¶
func (mq *MusicsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MusicsQuery) Exist ¶
func (mq *MusicsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MusicsQuery) ExistX ¶
func (mq *MusicsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MusicsQuery) First ¶
func (mq *MusicsQuery) First(ctx context.Context) (*Musics, error)
First returns the first Musics entity from the query. Returns a *NotFoundError when no Musics was found.
func (*MusicsQuery) FirstID ¶
func (mq *MusicsQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Musics ID from the query. Returns a *NotFoundError when no Musics ID was found.
func (*MusicsQuery) FirstIDX ¶
func (mq *MusicsQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*MusicsQuery) FirstX ¶
func (mq *MusicsQuery) FirstX(ctx context.Context) *Musics
FirstX is like First, but panics if an error occurs.
func (*MusicsQuery) GroupBy ¶
func (mq *MusicsQuery) GroupBy(field string, fields ...string) *MusicsGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Musics.Query(). GroupBy(musics.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MusicsQuery) IDs ¶
func (mq *MusicsQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Musics IDs.
func (*MusicsQuery) IDsX ¶
func (mq *MusicsQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*MusicsQuery) Limit ¶
func (mq *MusicsQuery) Limit(limit int) *MusicsQuery
Limit the number of records to be returned by this query.
func (*MusicsQuery) Offset ¶
func (mq *MusicsQuery) Offset(offset int) *MusicsQuery
Offset to start from.
func (*MusicsQuery) Only ¶
func (mq *MusicsQuery) Only(ctx context.Context) (*Musics, error)
Only returns a single Musics entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Musics entity is found. Returns a *NotFoundError when no Musics entities are found.
func (*MusicsQuery) OnlyID ¶
func (mq *MusicsQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Musics ID in the query. Returns a *NotSingularError when more than one Musics ID is found. Returns a *NotFoundError when no entities are found.
func (*MusicsQuery) OnlyIDX ¶
func (mq *MusicsQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MusicsQuery) OnlyX ¶
func (mq *MusicsQuery) OnlyX(ctx context.Context) *Musics
OnlyX is like Only, but panics if an error occurs.
func (*MusicsQuery) Order ¶
func (mq *MusicsQuery) Order(o ...musics.OrderOption) *MusicsQuery
Order specifies how the records should be ordered.
func (*MusicsQuery) QueryAlbums ¶
func (mq *MusicsQuery) QueryAlbums() *AlbumsQuery
QueryAlbums chains the current query on the "albums" edge.
func (*MusicsQuery) QueryArtists ¶
func (mq *MusicsQuery) QueryArtists() *ArtistsQuery
QueryArtists chains the current query on the "artists" edge.
func (*MusicsQuery) QueryFile ¶
func (mq *MusicsQuery) QueryFile() *FilesQuery
QueryFile chains the current query on the "file" edge.
func (*MusicsQuery) QueryPlaylists ¶
func (mq *MusicsQuery) QueryPlaylists() *PlaylistsQuery
QueryPlaylists chains the current query on the "playlists" edge.
func (*MusicsQuery) QueryUsers ¶
func (mq *MusicsQuery) QueryUsers() *UsersQuery
QueryUsers chains the current query on the "users" edge.
func (*MusicsQuery) Select ¶
func (mq *MusicsQuery) Select(fields ...string) *MusicsSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Musics.Query(). Select(musics.FieldCreateTime). Scan(ctx, &v)
func (*MusicsQuery) Unique ¶
func (mq *MusicsQuery) Unique(unique bool) *MusicsQuery
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 (*MusicsQuery) Where ¶
func (mq *MusicsQuery) Where(ps ...predicate.Musics) *MusicsQuery
Where adds a new predicate for the MusicsQuery builder.
func (*MusicsQuery) WithAlbums ¶
func (mq *MusicsQuery) WithAlbums(opts ...func(*AlbumsQuery)) *MusicsQuery
WithAlbums tells the query-builder to eager-load the nodes that are connected to the "albums" edge. The optional arguments are used to configure the query builder of the edge.
func (*MusicsQuery) WithArtists ¶
func (mq *MusicsQuery) WithArtists(opts ...func(*ArtistsQuery)) *MusicsQuery
WithArtists tells the query-builder to eager-load the nodes that are connected to the "artists" edge. The optional arguments are used to configure the query builder of the edge.
func (*MusicsQuery) WithFile ¶
func (mq *MusicsQuery) WithFile(opts ...func(*FilesQuery)) *MusicsQuery
WithFile tells the query-builder to eager-load the nodes that are connected to the "file" edge. The optional arguments are used to configure the query builder of the edge.
func (*MusicsQuery) WithPlaylists ¶
func (mq *MusicsQuery) WithPlaylists(opts ...func(*PlaylistsQuery)) *MusicsQuery
WithPlaylists tells the query-builder to eager-load the nodes that are connected to the "playlists" edge. The optional arguments are used to configure the query builder of the edge.
func (*MusicsQuery) WithUsers ¶
func (mq *MusicsQuery) WithUsers(opts ...func(*UsersQuery)) *MusicsQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type MusicsSelect ¶
type MusicsSelect struct { *MusicsQuery // contains filtered or unexported fields }
MusicsSelect is the builder for selecting fields of Musics entities.
func (*MusicsSelect) Aggregate ¶
func (ms *MusicsSelect) Aggregate(fns ...AggregateFunc) *MusicsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MusicsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MusicsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MusicsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MusicsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MusicsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MusicsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MusicsSelect) Scan ¶
func (ms *MusicsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MusicsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MusicsUpdate ¶
type MusicsUpdate struct {
// contains filtered or unexported fields
}
MusicsUpdate is the builder for updating Musics entities.
func (*MusicsUpdate) AddAlbumIDs ¶
func (mu *MusicsUpdate) AddAlbumIDs(ids ...uint64) *MusicsUpdate
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*MusicsUpdate) AddAlbums ¶
func (mu *MusicsUpdate) AddAlbums(a ...*Albums) *MusicsUpdate
AddAlbums adds the "albums" edges to the Albums entity.
func (*MusicsUpdate) AddArtistIDs ¶
func (mu *MusicsUpdate) AddArtistIDs(ids ...uint64) *MusicsUpdate
AddArtistIDs adds the "artists" edge to the Artists entity by IDs.
func (*MusicsUpdate) AddArtists ¶
func (mu *MusicsUpdate) AddArtists(a ...*Artists) *MusicsUpdate
AddArtists adds the "artists" edges to the Artists entity.
func (*MusicsUpdate) AddPlaylistIDs ¶
func (mu *MusicsUpdate) AddPlaylistIDs(ids ...uint64) *MusicsUpdate
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by IDs.
func (*MusicsUpdate) AddPlaylists ¶
func (mu *MusicsUpdate) AddPlaylists(p ...*Playlists) *MusicsUpdate
AddPlaylists adds the "playlists" edges to the Playlists entity.
func (*MusicsUpdate) AddUserIDs ¶
func (mu *MusicsUpdate) AddUserIDs(ids ...uint64) *MusicsUpdate
AddUserIDs adds the "users" edge to the Users entity by IDs.
func (*MusicsUpdate) AddUsers ¶
func (mu *MusicsUpdate) AddUsers(u ...*Users) *MusicsUpdate
AddUsers adds the "users" edges to the Users entity.
func (*MusicsUpdate) ClearAlbums ¶
func (mu *MusicsUpdate) ClearAlbums() *MusicsUpdate
ClearAlbums clears all "albums" edges to the Albums entity.
func (*MusicsUpdate) ClearArtists ¶
func (mu *MusicsUpdate) ClearArtists() *MusicsUpdate
ClearArtists clears all "artists" edges to the Artists entity.
func (*MusicsUpdate) ClearDescription ¶
func (mu *MusicsUpdate) ClearDescription() *MusicsUpdate
ClearDescription clears the value of the "description" field.
func (*MusicsUpdate) ClearFile ¶
func (mu *MusicsUpdate) ClearFile() *MusicsUpdate
ClearFile clears the "file" edge to the Files entity.
func (*MusicsUpdate) ClearPlaylists ¶
func (mu *MusicsUpdate) ClearPlaylists() *MusicsUpdate
ClearPlaylists clears all "playlists" edges to the Playlists entity.
func (*MusicsUpdate) ClearUsers ¶
func (mu *MusicsUpdate) ClearUsers() *MusicsUpdate
ClearUsers clears all "users" edges to the Users entity.
func (*MusicsUpdate) Exec ¶
func (mu *MusicsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MusicsUpdate) ExecX ¶
func (mu *MusicsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MusicsUpdate) Mutation ¶
func (mu *MusicsUpdate) Mutation() *MusicsMutation
Mutation returns the MusicsMutation object of the builder.
func (*MusicsUpdate) RemoveAlbumIDs ¶
func (mu *MusicsUpdate) RemoveAlbumIDs(ids ...uint64) *MusicsUpdate
RemoveAlbumIDs removes the "albums" edge to Albums entities by IDs.
func (*MusicsUpdate) RemoveAlbums ¶
func (mu *MusicsUpdate) RemoveAlbums(a ...*Albums) *MusicsUpdate
RemoveAlbums removes "albums" edges to Albums entities.
func (*MusicsUpdate) RemoveArtistIDs ¶
func (mu *MusicsUpdate) RemoveArtistIDs(ids ...uint64) *MusicsUpdate
RemoveArtistIDs removes the "artists" edge to Artists entities by IDs.
func (*MusicsUpdate) RemoveArtists ¶
func (mu *MusicsUpdate) RemoveArtists(a ...*Artists) *MusicsUpdate
RemoveArtists removes "artists" edges to Artists entities.
func (*MusicsUpdate) RemovePlaylistIDs ¶
func (mu *MusicsUpdate) RemovePlaylistIDs(ids ...uint64) *MusicsUpdate
RemovePlaylistIDs removes the "playlists" edge to Playlists entities by IDs.
func (*MusicsUpdate) RemovePlaylists ¶
func (mu *MusicsUpdate) RemovePlaylists(p ...*Playlists) *MusicsUpdate
RemovePlaylists removes "playlists" edges to Playlists entities.
func (*MusicsUpdate) RemoveUserIDs ¶
func (mu *MusicsUpdate) RemoveUserIDs(ids ...uint64) *MusicsUpdate
RemoveUserIDs removes the "users" edge to Users entities by IDs.
func (*MusicsUpdate) RemoveUsers ¶
func (mu *MusicsUpdate) RemoveUsers(u ...*Users) *MusicsUpdate
RemoveUsers removes "users" edges to Users entities.
func (*MusicsUpdate) Save ¶
func (mu *MusicsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MusicsUpdate) SaveX ¶
func (mu *MusicsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MusicsUpdate) SetDescription ¶
func (mu *MusicsUpdate) SetDescription(s string) *MusicsUpdate
SetDescription sets the "description" field.
func (*MusicsUpdate) SetFile ¶
func (mu *MusicsUpdate) SetFile(f *Files) *MusicsUpdate
SetFile sets the "file" edge to the Files entity.
func (*MusicsUpdate) SetFileID ¶
func (mu *MusicsUpdate) SetFileID(id uint64) *MusicsUpdate
SetFileID sets the "file" edge to the Files entity by ID.
func (*MusicsUpdate) SetName ¶
func (mu *MusicsUpdate) SetName(s string) *MusicsUpdate
SetName sets the "name" field.
func (*MusicsUpdate) SetNillableDescription ¶
func (mu *MusicsUpdate) SetNillableDescription(s *string) *MusicsUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MusicsUpdate) SetNillableName ¶
func (mu *MusicsUpdate) SetNillableName(s *string) *MusicsUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*MusicsUpdate) SetUpdateTime ¶
func (mu *MusicsUpdate) SetUpdateTime(t time.Time) *MusicsUpdate
SetUpdateTime sets the "update_time" field.
func (*MusicsUpdate) Where ¶
func (mu *MusicsUpdate) Where(ps ...predicate.Musics) *MusicsUpdate
Where appends a list predicates to the MusicsUpdate builder.
type MusicsUpdateOne ¶
type MusicsUpdateOne struct {
// contains filtered or unexported fields
}
MusicsUpdateOne is the builder for updating a single Musics entity.
func (*MusicsUpdateOne) AddAlbumIDs ¶
func (muo *MusicsUpdateOne) AddAlbumIDs(ids ...uint64) *MusicsUpdateOne
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*MusicsUpdateOne) AddAlbums ¶
func (muo *MusicsUpdateOne) AddAlbums(a ...*Albums) *MusicsUpdateOne
AddAlbums adds the "albums" edges to the Albums entity.
func (*MusicsUpdateOne) AddArtistIDs ¶
func (muo *MusicsUpdateOne) AddArtistIDs(ids ...uint64) *MusicsUpdateOne
AddArtistIDs adds the "artists" edge to the Artists entity by IDs.
func (*MusicsUpdateOne) AddArtists ¶
func (muo *MusicsUpdateOne) AddArtists(a ...*Artists) *MusicsUpdateOne
AddArtists adds the "artists" edges to the Artists entity.
func (*MusicsUpdateOne) AddPlaylistIDs ¶
func (muo *MusicsUpdateOne) AddPlaylistIDs(ids ...uint64) *MusicsUpdateOne
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by IDs.
func (*MusicsUpdateOne) AddPlaylists ¶
func (muo *MusicsUpdateOne) AddPlaylists(p ...*Playlists) *MusicsUpdateOne
AddPlaylists adds the "playlists" edges to the Playlists entity.
func (*MusicsUpdateOne) AddUserIDs ¶
func (muo *MusicsUpdateOne) AddUserIDs(ids ...uint64) *MusicsUpdateOne
AddUserIDs adds the "users" edge to the Users entity by IDs.
func (*MusicsUpdateOne) AddUsers ¶
func (muo *MusicsUpdateOne) AddUsers(u ...*Users) *MusicsUpdateOne
AddUsers adds the "users" edges to the Users entity.
func (*MusicsUpdateOne) ClearAlbums ¶
func (muo *MusicsUpdateOne) ClearAlbums() *MusicsUpdateOne
ClearAlbums clears all "albums" edges to the Albums entity.
func (*MusicsUpdateOne) ClearArtists ¶
func (muo *MusicsUpdateOne) ClearArtists() *MusicsUpdateOne
ClearArtists clears all "artists" edges to the Artists entity.
func (*MusicsUpdateOne) ClearDescription ¶
func (muo *MusicsUpdateOne) ClearDescription() *MusicsUpdateOne
ClearDescription clears the value of the "description" field.
func (*MusicsUpdateOne) ClearFile ¶
func (muo *MusicsUpdateOne) ClearFile() *MusicsUpdateOne
ClearFile clears the "file" edge to the Files entity.
func (*MusicsUpdateOne) ClearPlaylists ¶
func (muo *MusicsUpdateOne) ClearPlaylists() *MusicsUpdateOne
ClearPlaylists clears all "playlists" edges to the Playlists entity.
func (*MusicsUpdateOne) ClearUsers ¶
func (muo *MusicsUpdateOne) ClearUsers() *MusicsUpdateOne
ClearUsers clears all "users" edges to the Users entity.
func (*MusicsUpdateOne) Exec ¶
func (muo *MusicsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MusicsUpdateOne) ExecX ¶
func (muo *MusicsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MusicsUpdateOne) Mutation ¶
func (muo *MusicsUpdateOne) Mutation() *MusicsMutation
Mutation returns the MusicsMutation object of the builder.
func (*MusicsUpdateOne) RemoveAlbumIDs ¶
func (muo *MusicsUpdateOne) RemoveAlbumIDs(ids ...uint64) *MusicsUpdateOne
RemoveAlbumIDs removes the "albums" edge to Albums entities by IDs.
func (*MusicsUpdateOne) RemoveAlbums ¶
func (muo *MusicsUpdateOne) RemoveAlbums(a ...*Albums) *MusicsUpdateOne
RemoveAlbums removes "albums" edges to Albums entities.
func (*MusicsUpdateOne) RemoveArtistIDs ¶
func (muo *MusicsUpdateOne) RemoveArtistIDs(ids ...uint64) *MusicsUpdateOne
RemoveArtistIDs removes the "artists" edge to Artists entities by IDs.
func (*MusicsUpdateOne) RemoveArtists ¶
func (muo *MusicsUpdateOne) RemoveArtists(a ...*Artists) *MusicsUpdateOne
RemoveArtists removes "artists" edges to Artists entities.
func (*MusicsUpdateOne) RemovePlaylistIDs ¶
func (muo *MusicsUpdateOne) RemovePlaylistIDs(ids ...uint64) *MusicsUpdateOne
RemovePlaylistIDs removes the "playlists" edge to Playlists entities by IDs.
func (*MusicsUpdateOne) RemovePlaylists ¶
func (muo *MusicsUpdateOne) RemovePlaylists(p ...*Playlists) *MusicsUpdateOne
RemovePlaylists removes "playlists" edges to Playlists entities.
func (*MusicsUpdateOne) RemoveUserIDs ¶
func (muo *MusicsUpdateOne) RemoveUserIDs(ids ...uint64) *MusicsUpdateOne
RemoveUserIDs removes the "users" edge to Users entities by IDs.
func (*MusicsUpdateOne) RemoveUsers ¶
func (muo *MusicsUpdateOne) RemoveUsers(u ...*Users) *MusicsUpdateOne
RemoveUsers removes "users" edges to Users entities.
func (*MusicsUpdateOne) Save ¶
func (muo *MusicsUpdateOne) Save(ctx context.Context) (*Musics, error)
Save executes the query and returns the updated Musics entity.
func (*MusicsUpdateOne) SaveX ¶
func (muo *MusicsUpdateOne) SaveX(ctx context.Context) *Musics
SaveX is like Save, but panics if an error occurs.
func (*MusicsUpdateOne) Select ¶
func (muo *MusicsUpdateOne) Select(field string, fields ...string) *MusicsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MusicsUpdateOne) SetDescription ¶
func (muo *MusicsUpdateOne) SetDescription(s string) *MusicsUpdateOne
SetDescription sets the "description" field.
func (*MusicsUpdateOne) SetFile ¶
func (muo *MusicsUpdateOne) SetFile(f *Files) *MusicsUpdateOne
SetFile sets the "file" edge to the Files entity.
func (*MusicsUpdateOne) SetFileID ¶
func (muo *MusicsUpdateOne) SetFileID(id uint64) *MusicsUpdateOne
SetFileID sets the "file" edge to the Files entity by ID.
func (*MusicsUpdateOne) SetName ¶
func (muo *MusicsUpdateOne) SetName(s string) *MusicsUpdateOne
SetName sets the "name" field.
func (*MusicsUpdateOne) SetNillableDescription ¶
func (muo *MusicsUpdateOne) SetNillableDescription(s *string) *MusicsUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MusicsUpdateOne) SetNillableName ¶
func (muo *MusicsUpdateOne) SetNillableName(s *string) *MusicsUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*MusicsUpdateOne) SetUpdateTime ¶
func (muo *MusicsUpdateOne) SetUpdateTime(t time.Time) *MusicsUpdateOne
SetUpdateTime sets the "update_time" field.
func (*MusicsUpdateOne) Where ¶
func (muo *MusicsUpdateOne) Where(ps ...predicate.Musics) *MusicsUpdateOne
Where appends a list predicates to the MusicsUpdate builder.
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 Oidc ¶
type Oidc struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // ConfigurationEndpoint holds the value of the "configuration_endpoint" field. ConfigurationEndpoint string `json:"configuration_endpoint,omitempty"` // contains filtered or unexported fields }
Oidc is the model entity for the Oidc schema.
func (*Oidc) Unwrap ¶
Unwrap unwraps the Oidc 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 (*Oidc) Update ¶
func (o *Oidc) Update() *OidcUpdateOne
Update returns a builder for updating this Oidc. Note that you need to call Oidc.Unwrap() before calling this method if this Oidc was returned from a transaction, and the transaction was committed or rolled back.
type OidcClient ¶
type OidcClient struct {
// contains filtered or unexported fields
}
OidcClient is a client for the Oidc schema.
func NewOidcClient ¶
func NewOidcClient(c config) *OidcClient
NewOidcClient returns a client for the Oidc from the given config.
func (*OidcClient) Create ¶
func (c *OidcClient) Create() *OidcCreate
Create returns a builder for creating a Oidc entity.
func (*OidcClient) CreateBulk ¶
func (c *OidcClient) CreateBulk(builders ...*OidcCreate) *OidcCreateBulk
CreateBulk returns a builder for creating a bulk of Oidc entities.
func (*OidcClient) Delete ¶
func (c *OidcClient) Delete() *OidcDelete
Delete returns a delete builder for Oidc.
func (*OidcClient) DeleteOne ¶
func (c *OidcClient) DeleteOne(o *Oidc) *OidcDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OidcClient) DeleteOneID ¶
func (c *OidcClient) DeleteOneID(id uint64) *OidcDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OidcClient) GetX ¶
func (c *OidcClient) GetX(ctx context.Context, id uint64) *Oidc
GetX is like Get, but panics if an error occurs.
func (*OidcClient) Intercept ¶
func (c *OidcClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oidc.Intercept(f(g(h())))`.
func (*OidcClient) Interceptors ¶
func (c *OidcClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OidcClient) MapCreateBulk ¶
func (c *OidcClient) MapCreateBulk(slice any, setFunc func(*OidcCreate, int)) *OidcCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*OidcClient) Query ¶
func (c *OidcClient) Query() *OidcQuery
Query returns a query builder for Oidc.
func (*OidcClient) Update ¶
func (c *OidcClient) Update() *OidcUpdate
Update returns an update builder for Oidc.
func (*OidcClient) UpdateOne ¶
func (c *OidcClient) UpdateOne(o *Oidc) *OidcUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OidcClient) UpdateOneID ¶
func (c *OidcClient) UpdateOneID(id uint64) *OidcUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OidcClient) Use ¶
func (c *OidcClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oidc.Hooks(f(g(h())))`.
type OidcCreate ¶
type OidcCreate struct {
// contains filtered or unexported fields
}
OidcCreate is the builder for creating a Oidc entity.
func (*OidcCreate) Exec ¶
func (oc *OidcCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OidcCreate) ExecX ¶
func (oc *OidcCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OidcCreate) Mutation ¶
func (oc *OidcCreate) Mutation() *OidcMutation
Mutation returns the OidcMutation object of the builder.
func (*OidcCreate) Save ¶
func (oc *OidcCreate) Save(ctx context.Context) (*Oidc, error)
Save creates the Oidc in the database.
func (*OidcCreate) SaveX ¶
func (oc *OidcCreate) SaveX(ctx context.Context) *Oidc
SaveX calls Save and panics if Save returns an error.
func (*OidcCreate) SetConfigurationEndpoint ¶
func (oc *OidcCreate) SetConfigurationEndpoint(s string) *OidcCreate
SetConfigurationEndpoint sets the "configuration_endpoint" field.
func (*OidcCreate) SetCreateTime ¶
func (oc *OidcCreate) SetCreateTime(t time.Time) *OidcCreate
SetCreateTime sets the "create_time" field.
func (*OidcCreate) SetID ¶
func (oc *OidcCreate) SetID(u uint64) *OidcCreate
SetID sets the "id" field.
func (*OidcCreate) SetName ¶
func (oc *OidcCreate) SetName(s string) *OidcCreate
SetName sets the "name" field.
func (*OidcCreate) SetNillableCreateTime ¶
func (oc *OidcCreate) SetNillableCreateTime(t *time.Time) *OidcCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*OidcCreate) SetNillableUpdateTime ¶
func (oc *OidcCreate) SetNillableUpdateTime(t *time.Time) *OidcCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*OidcCreate) SetUpdateTime ¶
func (oc *OidcCreate) SetUpdateTime(t time.Time) *OidcCreate
SetUpdateTime sets the "update_time" field.
type OidcCreateBulk ¶
type OidcCreateBulk struct {
// contains filtered or unexported fields
}
OidcCreateBulk is the builder for creating many Oidc entities in bulk.
func (*OidcCreateBulk) Exec ¶
func (ocb *OidcCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OidcCreateBulk) ExecX ¶
func (ocb *OidcCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OidcDelete ¶
type OidcDelete struct {
// contains filtered or unexported fields
}
OidcDelete is the builder for deleting a Oidc entity.
func (*OidcDelete) Exec ¶
func (od *OidcDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OidcDelete) ExecX ¶
func (od *OidcDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OidcDelete) Where ¶
func (od *OidcDelete) Where(ps ...predicate.Oidc) *OidcDelete
Where appends a list predicates to the OidcDelete builder.
type OidcDeleteOne ¶
type OidcDeleteOne struct {
// contains filtered or unexported fields
}
OidcDeleteOne is the builder for deleting a single Oidc entity.
func (*OidcDeleteOne) Exec ¶
func (odo *OidcDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OidcDeleteOne) ExecX ¶
func (odo *OidcDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OidcDeleteOne) Where ¶
func (odo *OidcDeleteOne) Where(ps ...predicate.Oidc) *OidcDeleteOne
Where appends a list predicates to the OidcDelete builder.
type OidcGroupBy ¶
type OidcGroupBy struct {
// contains filtered or unexported fields
}
OidcGroupBy is the group-by builder for Oidc entities.
func (*OidcGroupBy) Aggregate ¶
func (ogb *OidcGroupBy) Aggregate(fns ...AggregateFunc) *OidcGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OidcGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OidcGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OidcGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OidcGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OidcGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OidcGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OidcGroupBy) Scan ¶
func (ogb *OidcGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OidcGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OidcMutation ¶
type OidcMutation struct {
// contains filtered or unexported fields
}
OidcMutation represents an operation that mutates the Oidc nodes in the graph.
func (*OidcMutation) AddField ¶
func (m *OidcMutation) 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 (*OidcMutation) AddedEdges ¶
func (m *OidcMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OidcMutation) AddedField ¶
func (m *OidcMutation) 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 (*OidcMutation) AddedFields ¶
func (m *OidcMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OidcMutation) AddedIDs ¶
func (m *OidcMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OidcMutation) ClearEdge ¶
func (m *OidcMutation) 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 (*OidcMutation) ClearField ¶
func (m *OidcMutation) 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 (*OidcMutation) ClearedEdges ¶
func (m *OidcMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OidcMutation) ClearedFields ¶
func (m *OidcMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OidcMutation) Client ¶
func (m OidcMutation) 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 (*OidcMutation) ConfigurationEndpoint ¶
func (m *OidcMutation) ConfigurationEndpoint() (r string, exists bool)
ConfigurationEndpoint returns the value of the "configuration_endpoint" field in the mutation.
func (*OidcMutation) CreateTime ¶
func (m *OidcMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*OidcMutation) EdgeCleared ¶
func (m *OidcMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OidcMutation) Field ¶
func (m *OidcMutation) 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 (*OidcMutation) FieldCleared ¶
func (m *OidcMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OidcMutation) Fields ¶
func (m *OidcMutation) 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 (*OidcMutation) ID ¶
func (m *OidcMutation) 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 (*OidcMutation) IDs ¶
func (m *OidcMutation) 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 (*OidcMutation) Name ¶
func (m *OidcMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*OidcMutation) OldConfigurationEndpoint ¶
func (m *OidcMutation) OldConfigurationEndpoint(ctx context.Context) (v string, err error)
OldConfigurationEndpoint returns the old "configuration_endpoint" field's value of the Oidc entity. If the Oidc object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OidcMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Oidc entity. If the Oidc object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OidcMutation) 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 (*OidcMutation) OldName ¶
func (m *OidcMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Oidc entity. If the Oidc object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OidcMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Oidc entity. If the Oidc object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OidcMutation) RemovedEdges ¶
func (m *OidcMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OidcMutation) RemovedIDs ¶
func (m *OidcMutation) 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 (*OidcMutation) ResetConfigurationEndpoint ¶
func (m *OidcMutation) ResetConfigurationEndpoint()
ResetConfigurationEndpoint resets all changes to the "configuration_endpoint" field.
func (*OidcMutation) ResetCreateTime ¶
func (m *OidcMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*OidcMutation) ResetEdge ¶
func (m *OidcMutation) 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 (*OidcMutation) ResetField ¶
func (m *OidcMutation) 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 (*OidcMutation) ResetName ¶
func (m *OidcMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*OidcMutation) ResetUpdateTime ¶
func (m *OidcMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*OidcMutation) SetConfigurationEndpoint ¶
func (m *OidcMutation) SetConfigurationEndpoint(s string)
SetConfigurationEndpoint sets the "configuration_endpoint" field.
func (*OidcMutation) SetCreateTime ¶
func (m *OidcMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*OidcMutation) SetField ¶
func (m *OidcMutation) 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 (*OidcMutation) SetID ¶
func (m *OidcMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Oidc entities.
func (*OidcMutation) SetName ¶
func (m *OidcMutation) SetName(s string)
SetName sets the "name" field.
func (*OidcMutation) SetOp ¶
func (m *OidcMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OidcMutation) SetUpdateTime ¶
func (m *OidcMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (OidcMutation) Tx ¶
func (m OidcMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OidcMutation) Type ¶
func (m *OidcMutation) Type() string
Type returns the node type of this mutation (Oidc).
func (*OidcMutation) UpdateTime ¶
func (m *OidcMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*OidcMutation) Where ¶
func (m *OidcMutation) Where(ps ...predicate.Oidc)
Where appends a list predicates to the OidcMutation builder.
func (*OidcMutation) WhereP ¶
func (m *OidcMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OidcMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OidcQuery ¶
type OidcQuery struct {
// contains filtered or unexported fields
}
OidcQuery is the builder for querying Oidc entities.
func (*OidcQuery) Aggregate ¶
func (oq *OidcQuery) Aggregate(fns ...AggregateFunc) *OidcSelect
Aggregate returns a OidcSelect configured with the given aggregations.
func (*OidcQuery) Clone ¶
Clone returns a duplicate of the OidcQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OidcQuery) First ¶
First returns the first Oidc entity from the query. Returns a *NotFoundError when no Oidc was found.
func (*OidcQuery) FirstID ¶
FirstID returns the first Oidc ID from the query. Returns a *NotFoundError when no Oidc ID was found.
func (*OidcQuery) GroupBy ¶
func (oq *OidcQuery) GroupBy(field string, fields ...string) *OidcGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Oidc.Query(). GroupBy(oidc.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OidcQuery) Only ¶
Only returns a single Oidc entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Oidc entity is found. Returns a *NotFoundError when no Oidc entities are found.
func (*OidcQuery) OnlyID ¶
OnlyID is like Only, but returns the only Oidc ID in the query. Returns a *NotSingularError when more than one Oidc ID is found. Returns a *NotFoundError when no entities are found.
func (*OidcQuery) Order ¶
func (oq *OidcQuery) Order(o ...oidc.OrderOption) *OidcQuery
Order specifies how the records should be ordered.
func (*OidcQuery) Select ¶
func (oq *OidcQuery) Select(fields ...string) *OidcSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Oidc.Query(). Select(oidc.FieldCreateTime). Scan(ctx, &v)
type OidcSelect ¶
type OidcSelect struct { *OidcQuery // contains filtered or unexported fields }
OidcSelect is the builder for selecting fields of Oidc entities.
func (*OidcSelect) Aggregate ¶
func (os *OidcSelect) Aggregate(fns ...AggregateFunc) *OidcSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OidcSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OidcSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OidcSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OidcSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OidcSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OidcSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OidcSelect) Scan ¶
func (os *OidcSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OidcSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OidcUpdate ¶
type OidcUpdate struct {
// contains filtered or unexported fields
}
OidcUpdate is the builder for updating Oidc entities.
func (*OidcUpdate) Exec ¶
func (ou *OidcUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OidcUpdate) ExecX ¶
func (ou *OidcUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OidcUpdate) Mutation ¶
func (ou *OidcUpdate) Mutation() *OidcMutation
Mutation returns the OidcMutation object of the builder.
func (*OidcUpdate) Save ¶
func (ou *OidcUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OidcUpdate) SaveX ¶
func (ou *OidcUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OidcUpdate) SetConfigurationEndpoint ¶
func (ou *OidcUpdate) SetConfigurationEndpoint(s string) *OidcUpdate
SetConfigurationEndpoint sets the "configuration_endpoint" field.
func (*OidcUpdate) SetName ¶
func (ou *OidcUpdate) SetName(s string) *OidcUpdate
SetName sets the "name" field.
func (*OidcUpdate) SetNillableConfigurationEndpoint ¶
func (ou *OidcUpdate) SetNillableConfigurationEndpoint(s *string) *OidcUpdate
SetNillableConfigurationEndpoint sets the "configuration_endpoint" field if the given value is not nil.
func (*OidcUpdate) SetNillableName ¶
func (ou *OidcUpdate) SetNillableName(s *string) *OidcUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*OidcUpdate) SetUpdateTime ¶
func (ou *OidcUpdate) SetUpdateTime(t time.Time) *OidcUpdate
SetUpdateTime sets the "update_time" field.
func (*OidcUpdate) Where ¶
func (ou *OidcUpdate) Where(ps ...predicate.Oidc) *OidcUpdate
Where appends a list predicates to the OidcUpdate builder.
type OidcUpdateOne ¶
type OidcUpdateOne struct {
// contains filtered or unexported fields
}
OidcUpdateOne is the builder for updating a single Oidc entity.
func (*OidcUpdateOne) Exec ¶
func (ouo *OidcUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OidcUpdateOne) ExecX ¶
func (ouo *OidcUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OidcUpdateOne) Mutation ¶
func (ouo *OidcUpdateOne) Mutation() *OidcMutation
Mutation returns the OidcMutation object of the builder.
func (*OidcUpdateOne) Save ¶
func (ouo *OidcUpdateOne) Save(ctx context.Context) (*Oidc, error)
Save executes the query and returns the updated Oidc entity.
func (*OidcUpdateOne) SaveX ¶
func (ouo *OidcUpdateOne) SaveX(ctx context.Context) *Oidc
SaveX is like Save, but panics if an error occurs.
func (*OidcUpdateOne) Select ¶
func (ouo *OidcUpdateOne) Select(field string, fields ...string) *OidcUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OidcUpdateOne) SetConfigurationEndpoint ¶
func (ouo *OidcUpdateOne) SetConfigurationEndpoint(s string) *OidcUpdateOne
SetConfigurationEndpoint sets the "configuration_endpoint" field.
func (*OidcUpdateOne) SetName ¶
func (ouo *OidcUpdateOne) SetName(s string) *OidcUpdateOne
SetName sets the "name" field.
func (*OidcUpdateOne) SetNillableConfigurationEndpoint ¶
func (ouo *OidcUpdateOne) SetNillableConfigurationEndpoint(s *string) *OidcUpdateOne
SetNillableConfigurationEndpoint sets the "configuration_endpoint" field if the given value is not nil.
func (*OidcUpdateOne) SetNillableName ¶
func (ouo *OidcUpdateOne) SetNillableName(s *string) *OidcUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*OidcUpdateOne) SetUpdateTime ¶
func (ouo *OidcUpdateOne) SetUpdateTime(t time.Time) *OidcUpdateOne
SetUpdateTime sets the "update_time" field.
func (*OidcUpdateOne) Where ¶
func (ouo *OidcUpdateOne) Where(ps ...predicate.Oidc) *OidcUpdateOne
Where appends a list predicates to the OidcUpdate builder.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Playlists ¶
type Playlists struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Private holds the value of the "private" field. Private bool `json:"private,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PlaylistsQuery when eager-loading is set. Edges PlaylistsEdges `json:"edges"` // contains filtered or unexported fields }
Playlists is the model entity for the Playlists schema.
func (*Playlists) QueryImage ¶
func (pl *Playlists) QueryImage() *ImagesQuery
QueryImage queries the "image" edge of the Playlists entity.
func (*Playlists) QueryMusics ¶
func (pl *Playlists) QueryMusics() *MusicsQuery
QueryMusics queries the "musics" edge of the Playlists entity.
func (*Playlists) QueryOwner ¶
func (pl *Playlists) QueryOwner() *UsersQuery
QueryOwner queries the "owner" edge of the Playlists entity.
func (*Playlists) Unwrap ¶
Unwrap unwraps the Playlists 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 (*Playlists) Update ¶
func (pl *Playlists) Update() *PlaylistsUpdateOne
Update returns a builder for updating this Playlists. Note that you need to call Playlists.Unwrap() before calling this method if this Playlists was returned from a transaction, and the transaction was committed or rolled back.
type PlaylistsClient ¶
type PlaylistsClient struct {
// contains filtered or unexported fields
}
PlaylistsClient is a client for the Playlists schema.
func NewPlaylistsClient ¶
func NewPlaylistsClient(c config) *PlaylistsClient
NewPlaylistsClient returns a client for the Playlists from the given config.
func (*PlaylistsClient) Create ¶
func (c *PlaylistsClient) Create() *PlaylistsCreate
Create returns a builder for creating a Playlists entity.
func (*PlaylistsClient) CreateBulk ¶
func (c *PlaylistsClient) CreateBulk(builders ...*PlaylistsCreate) *PlaylistsCreateBulk
CreateBulk returns a builder for creating a bulk of Playlists entities.
func (*PlaylistsClient) Delete ¶
func (c *PlaylistsClient) Delete() *PlaylistsDelete
Delete returns a delete builder for Playlists.
func (*PlaylistsClient) DeleteOne ¶
func (c *PlaylistsClient) DeleteOne(pl *Playlists) *PlaylistsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PlaylistsClient) DeleteOneID ¶
func (c *PlaylistsClient) DeleteOneID(id uint64) *PlaylistsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PlaylistsClient) GetX ¶
func (c *PlaylistsClient) GetX(ctx context.Context, id uint64) *Playlists
GetX is like Get, but panics if an error occurs.
func (*PlaylistsClient) Hooks ¶
func (c *PlaylistsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PlaylistsClient) Intercept ¶
func (c *PlaylistsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `playlists.Intercept(f(g(h())))`.
func (*PlaylistsClient) Interceptors ¶
func (c *PlaylistsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PlaylistsClient) MapCreateBulk ¶
func (c *PlaylistsClient) MapCreateBulk(slice any, setFunc func(*PlaylistsCreate, int)) *PlaylistsCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PlaylistsClient) Query ¶
func (c *PlaylistsClient) Query() *PlaylistsQuery
Query returns a query builder for Playlists.
func (*PlaylistsClient) QueryImage ¶
func (c *PlaylistsClient) QueryImage(pl *Playlists) *ImagesQuery
QueryImage queries the image edge of a Playlists.
func (*PlaylistsClient) QueryMusics ¶
func (c *PlaylistsClient) QueryMusics(pl *Playlists) *MusicsQuery
QueryMusics queries the musics edge of a Playlists.
func (*PlaylistsClient) QueryOwner ¶
func (c *PlaylistsClient) QueryOwner(pl *Playlists) *UsersQuery
QueryOwner queries the owner edge of a Playlists.
func (*PlaylistsClient) Update ¶
func (c *PlaylistsClient) Update() *PlaylistsUpdate
Update returns an update builder for Playlists.
func (*PlaylistsClient) UpdateOne ¶
func (c *PlaylistsClient) UpdateOne(pl *Playlists) *PlaylistsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PlaylistsClient) UpdateOneID ¶
func (c *PlaylistsClient) UpdateOneID(id uint64) *PlaylistsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PlaylistsClient) Use ¶
func (c *PlaylistsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `playlists.Hooks(f(g(h())))`.
type PlaylistsCreate ¶
type PlaylistsCreate struct {
// contains filtered or unexported fields
}
PlaylistsCreate is the builder for creating a Playlists entity.
func (*PlaylistsCreate) AddMusicIDs ¶
func (pc *PlaylistsCreate) AddMusicIDs(ids ...uint64) *PlaylistsCreate
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*PlaylistsCreate) AddMusics ¶
func (pc *PlaylistsCreate) AddMusics(m ...*Musics) *PlaylistsCreate
AddMusics adds the "musics" edges to the Musics entity.
func (*PlaylistsCreate) Exec ¶
func (pc *PlaylistsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PlaylistsCreate) ExecX ¶
func (pc *PlaylistsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlaylistsCreate) Mutation ¶
func (pc *PlaylistsCreate) Mutation() *PlaylistsMutation
Mutation returns the PlaylistsMutation object of the builder.
func (*PlaylistsCreate) Save ¶
func (pc *PlaylistsCreate) Save(ctx context.Context) (*Playlists, error)
Save creates the Playlists in the database.
func (*PlaylistsCreate) SaveX ¶
func (pc *PlaylistsCreate) SaveX(ctx context.Context) *Playlists
SaveX calls Save and panics if Save returns an error.
func (*PlaylistsCreate) SetCreateTime ¶
func (pc *PlaylistsCreate) SetCreateTime(t time.Time) *PlaylistsCreate
SetCreateTime sets the "create_time" field.
func (*PlaylistsCreate) SetDescription ¶
func (pc *PlaylistsCreate) SetDescription(s string) *PlaylistsCreate
SetDescription sets the "description" field.
func (*PlaylistsCreate) SetID ¶
func (pc *PlaylistsCreate) SetID(u uint64) *PlaylistsCreate
SetID sets the "id" field.
func (*PlaylistsCreate) SetImage ¶
func (pc *PlaylistsCreate) SetImage(i *Images) *PlaylistsCreate
SetImage sets the "image" edge to the Images entity.
func (*PlaylistsCreate) SetImageID ¶
func (pc *PlaylistsCreate) SetImageID(id uint64) *PlaylistsCreate
SetImageID sets the "image" edge to the Images entity by ID.
func (*PlaylistsCreate) SetName ¶
func (pc *PlaylistsCreate) SetName(s string) *PlaylistsCreate
SetName sets the "name" field.
func (*PlaylistsCreate) SetNillableCreateTime ¶
func (pc *PlaylistsCreate) SetNillableCreateTime(t *time.Time) *PlaylistsCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*PlaylistsCreate) SetNillableDescription ¶
func (pc *PlaylistsCreate) SetNillableDescription(s *string) *PlaylistsCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*PlaylistsCreate) SetNillableImageID ¶
func (pc *PlaylistsCreate) SetNillableImageID(id *uint64) *PlaylistsCreate
SetNillableImageID sets the "image" edge to the Images entity by ID if the given value is not nil.
func (*PlaylistsCreate) SetNillablePrivate ¶
func (pc *PlaylistsCreate) SetNillablePrivate(b *bool) *PlaylistsCreate
SetNillablePrivate sets the "private" field if the given value is not nil.
func (*PlaylistsCreate) SetNillableUpdateTime ¶
func (pc *PlaylistsCreate) SetNillableUpdateTime(t *time.Time) *PlaylistsCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*PlaylistsCreate) SetOwner ¶
func (pc *PlaylistsCreate) SetOwner(u *Users) *PlaylistsCreate
SetOwner sets the "owner" edge to the Users entity.
func (*PlaylistsCreate) SetOwnerID ¶
func (pc *PlaylistsCreate) SetOwnerID(id uint64) *PlaylistsCreate
SetOwnerID sets the "owner" edge to the Users entity by ID.
func (*PlaylistsCreate) SetPrivate ¶
func (pc *PlaylistsCreate) SetPrivate(b bool) *PlaylistsCreate
SetPrivate sets the "private" field.
func (*PlaylistsCreate) SetUpdateTime ¶
func (pc *PlaylistsCreate) SetUpdateTime(t time.Time) *PlaylistsCreate
SetUpdateTime sets the "update_time" field.
type PlaylistsCreateBulk ¶
type PlaylistsCreateBulk struct {
// contains filtered or unexported fields
}
PlaylistsCreateBulk is the builder for creating many Playlists entities in bulk.
func (*PlaylistsCreateBulk) Exec ¶
func (pcb *PlaylistsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PlaylistsCreateBulk) ExecX ¶
func (pcb *PlaylistsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PlaylistsDelete ¶
type PlaylistsDelete struct {
// contains filtered or unexported fields
}
PlaylistsDelete is the builder for deleting a Playlists entity.
func (*PlaylistsDelete) Exec ¶
func (pd *PlaylistsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PlaylistsDelete) ExecX ¶
func (pd *PlaylistsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PlaylistsDelete) Where ¶
func (pd *PlaylistsDelete) Where(ps ...predicate.Playlists) *PlaylistsDelete
Where appends a list predicates to the PlaylistsDelete builder.
type PlaylistsDeleteOne ¶
type PlaylistsDeleteOne struct {
// contains filtered or unexported fields
}
PlaylistsDeleteOne is the builder for deleting a single Playlists entity.
func (*PlaylistsDeleteOne) Exec ¶
func (pdo *PlaylistsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PlaylistsDeleteOne) ExecX ¶
func (pdo *PlaylistsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlaylistsDeleteOne) Where ¶
func (pdo *PlaylistsDeleteOne) Where(ps ...predicate.Playlists) *PlaylistsDeleteOne
Where appends a list predicates to the PlaylistsDelete builder.
type PlaylistsEdges ¶
type PlaylistsEdges struct { // Owner holds the value of the owner edge. Owner *Users `json:"owner,omitempty"` // Musics holds the value of the musics edge. Musics []*Musics `json:"musics,omitempty"` // Image holds the value of the image edge. Image *Images `json:"image,omitempty"` // contains filtered or unexported fields }
PlaylistsEdges holds the relations/edges for other nodes in the graph.
func (PlaylistsEdges) ImageOrErr ¶
func (e PlaylistsEdges) ImageOrErr() (*Images, error)
ImageOrErr returns the Image value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PlaylistsEdges) MusicsOrErr ¶
func (e PlaylistsEdges) MusicsOrErr() ([]*Musics, error)
MusicsOrErr returns the Musics value or an error if the edge was not loaded in eager-loading.
func (PlaylistsEdges) OwnerOrErr ¶
func (e PlaylistsEdges) OwnerOrErr() (*Users, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PlaylistsGroupBy ¶
type PlaylistsGroupBy struct {
// contains filtered or unexported fields
}
PlaylistsGroupBy is the group-by builder for Playlists entities.
func (*PlaylistsGroupBy) Aggregate ¶
func (pgb *PlaylistsGroupBy) Aggregate(fns ...AggregateFunc) *PlaylistsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PlaylistsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PlaylistsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PlaylistsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PlaylistsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PlaylistsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PlaylistsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PlaylistsGroupBy) Scan ¶
func (pgb *PlaylistsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PlaylistsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PlaylistsMutation ¶
type PlaylistsMutation struct {
// contains filtered or unexported fields
}
PlaylistsMutation represents an operation that mutates the Playlists nodes in the graph.
func (*PlaylistsMutation) AddField ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) AddMusicIDs ¶
func (m *PlaylistsMutation) AddMusicIDs(ids ...uint64)
AddMusicIDs adds the "musics" edge to the Musics entity by ids.
func (*PlaylistsMutation) AddedEdges ¶
func (m *PlaylistsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PlaylistsMutation) AddedField ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) AddedFields ¶
func (m *PlaylistsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PlaylistsMutation) AddedIDs ¶
func (m *PlaylistsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PlaylistsMutation) ClearDescription ¶
func (m *PlaylistsMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*PlaylistsMutation) ClearEdge ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) ClearField ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) ClearImage ¶
func (m *PlaylistsMutation) ClearImage()
ClearImage clears the "image" edge to the Images entity.
func (*PlaylistsMutation) ClearMusics ¶
func (m *PlaylistsMutation) ClearMusics()
ClearMusics clears the "musics" edge to the Musics entity.
func (*PlaylistsMutation) ClearOwner ¶
func (m *PlaylistsMutation) ClearOwner()
ClearOwner clears the "owner" edge to the Users entity.
func (*PlaylistsMutation) ClearedEdges ¶
func (m *PlaylistsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PlaylistsMutation) ClearedFields ¶
func (m *PlaylistsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PlaylistsMutation) Client ¶
func (m PlaylistsMutation) 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 (*PlaylistsMutation) CreateTime ¶
func (m *PlaylistsMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*PlaylistsMutation) Description ¶
func (m *PlaylistsMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*PlaylistsMutation) DescriptionCleared ¶
func (m *PlaylistsMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*PlaylistsMutation) EdgeCleared ¶
func (m *PlaylistsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PlaylistsMutation) Field ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) FieldCleared ¶
func (m *PlaylistsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PlaylistsMutation) Fields ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) ID ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) IDs ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) ImageCleared ¶
func (m *PlaylistsMutation) ImageCleared() bool
ImageCleared reports if the "image" edge to the Images entity was cleared.
func (*PlaylistsMutation) ImageID ¶
func (m *PlaylistsMutation) ImageID() (id uint64, exists bool)
ImageID returns the "image" edge ID in the mutation.
func (*PlaylistsMutation) ImageIDs ¶
func (m *PlaylistsMutation) ImageIDs() (ids []uint64)
ImageIDs returns the "image" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ImageID instead. It exists only for internal usage by the builders.
func (*PlaylistsMutation) MusicsCleared ¶
func (m *PlaylistsMutation) MusicsCleared() bool
MusicsCleared reports if the "musics" edge to the Musics entity was cleared.
func (*PlaylistsMutation) MusicsIDs ¶
func (m *PlaylistsMutation) MusicsIDs() (ids []uint64)
MusicsIDs returns the "musics" edge IDs in the mutation.
func (*PlaylistsMutation) Name ¶
func (m *PlaylistsMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PlaylistsMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Playlists entity. If the Playlists object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlaylistsMutation) OldDescription ¶
func (m *PlaylistsMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Playlists entity. If the Playlists object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlaylistsMutation) 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 (*PlaylistsMutation) OldName ¶
func (m *PlaylistsMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Playlists entity. If the Playlists object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlaylistsMutation) OldPrivate ¶
func (m *PlaylistsMutation) OldPrivate(ctx context.Context) (v bool, err error)
OldPrivate returns the old "private" field's value of the Playlists entity. If the Playlists object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlaylistsMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Playlists entity. If the Playlists object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PlaylistsMutation) OwnerCleared ¶
func (m *PlaylistsMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the Users entity was cleared.
func (*PlaylistsMutation) OwnerID ¶
func (m *PlaylistsMutation) OwnerID() (id uint64, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*PlaylistsMutation) OwnerIDs ¶
func (m *PlaylistsMutation) OwnerIDs() (ids []uint64)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*PlaylistsMutation) Private ¶
func (m *PlaylistsMutation) Private() (r bool, exists bool)
Private returns the value of the "private" field in the mutation.
func (*PlaylistsMutation) RemoveMusicIDs ¶
func (m *PlaylistsMutation) RemoveMusicIDs(ids ...uint64)
RemoveMusicIDs removes the "musics" edge to the Musics entity by IDs.
func (*PlaylistsMutation) RemovedEdges ¶
func (m *PlaylistsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PlaylistsMutation) RemovedIDs ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) RemovedMusicsIDs ¶
func (m *PlaylistsMutation) RemovedMusicsIDs() (ids []uint64)
RemovedMusics returns the removed IDs of the "musics" edge to the Musics entity.
func (*PlaylistsMutation) ResetCreateTime ¶
func (m *PlaylistsMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*PlaylistsMutation) ResetDescription ¶
func (m *PlaylistsMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*PlaylistsMutation) ResetEdge ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) ResetField ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) ResetImage ¶
func (m *PlaylistsMutation) ResetImage()
ResetImage resets all changes to the "image" edge.
func (*PlaylistsMutation) ResetMusics ¶
func (m *PlaylistsMutation) ResetMusics()
ResetMusics resets all changes to the "musics" edge.
func (*PlaylistsMutation) ResetName ¶
func (m *PlaylistsMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PlaylistsMutation) ResetOwner ¶
func (m *PlaylistsMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*PlaylistsMutation) ResetPrivate ¶
func (m *PlaylistsMutation) ResetPrivate()
ResetPrivate resets all changes to the "private" field.
func (*PlaylistsMutation) ResetUpdateTime ¶
func (m *PlaylistsMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*PlaylistsMutation) SetCreateTime ¶
func (m *PlaylistsMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*PlaylistsMutation) SetDescription ¶
func (m *PlaylistsMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*PlaylistsMutation) SetField ¶
func (m *PlaylistsMutation) 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 (*PlaylistsMutation) SetID ¶
func (m *PlaylistsMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Playlists entities.
func (*PlaylistsMutation) SetImageID ¶
func (m *PlaylistsMutation) SetImageID(id uint64)
SetImageID sets the "image" edge to the Images entity by id.
func (*PlaylistsMutation) SetName ¶
func (m *PlaylistsMutation) SetName(s string)
SetName sets the "name" field.
func (*PlaylistsMutation) SetOp ¶
func (m *PlaylistsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PlaylistsMutation) SetOwnerID ¶
func (m *PlaylistsMutation) SetOwnerID(id uint64)
SetOwnerID sets the "owner" edge to the Users entity by id.
func (*PlaylistsMutation) SetPrivate ¶
func (m *PlaylistsMutation) SetPrivate(b bool)
SetPrivate sets the "private" field.
func (*PlaylistsMutation) SetUpdateTime ¶
func (m *PlaylistsMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (PlaylistsMutation) Tx ¶
func (m PlaylistsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PlaylistsMutation) Type ¶
func (m *PlaylistsMutation) Type() string
Type returns the node type of this mutation (Playlists).
func (*PlaylistsMutation) UpdateTime ¶
func (m *PlaylistsMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*PlaylistsMutation) Where ¶
func (m *PlaylistsMutation) Where(ps ...predicate.Playlists)
Where appends a list predicates to the PlaylistsMutation builder.
func (*PlaylistsMutation) WhereP ¶
func (m *PlaylistsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PlaylistsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PlaylistsQuery ¶
type PlaylistsQuery struct {
// contains filtered or unexported fields
}
PlaylistsQuery is the builder for querying Playlists entities.
func (*PlaylistsQuery) Aggregate ¶
func (pq *PlaylistsQuery) Aggregate(fns ...AggregateFunc) *PlaylistsSelect
Aggregate returns a PlaylistsSelect configured with the given aggregations.
func (*PlaylistsQuery) All ¶
func (pq *PlaylistsQuery) All(ctx context.Context) ([]*Playlists, error)
All executes the query and returns a list of PlaylistsSlice.
func (*PlaylistsQuery) AllX ¶
func (pq *PlaylistsQuery) AllX(ctx context.Context) []*Playlists
AllX is like All, but panics if an error occurs.
func (*PlaylistsQuery) Clone ¶
func (pq *PlaylistsQuery) Clone() *PlaylistsQuery
Clone returns a duplicate of the PlaylistsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PlaylistsQuery) Count ¶
func (pq *PlaylistsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PlaylistsQuery) CountX ¶
func (pq *PlaylistsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PlaylistsQuery) Exist ¶
func (pq *PlaylistsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PlaylistsQuery) ExistX ¶
func (pq *PlaylistsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PlaylistsQuery) First ¶
func (pq *PlaylistsQuery) First(ctx context.Context) (*Playlists, error)
First returns the first Playlists entity from the query. Returns a *NotFoundError when no Playlists was found.
func (*PlaylistsQuery) FirstID ¶
func (pq *PlaylistsQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Playlists ID from the query. Returns a *NotFoundError when no Playlists ID was found.
func (*PlaylistsQuery) FirstIDX ¶
func (pq *PlaylistsQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*PlaylistsQuery) FirstX ¶
func (pq *PlaylistsQuery) FirstX(ctx context.Context) *Playlists
FirstX is like First, but panics if an error occurs.
func (*PlaylistsQuery) GroupBy ¶
func (pq *PlaylistsQuery) GroupBy(field string, fields ...string) *PlaylistsGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Playlists.Query(). GroupBy(playlists.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PlaylistsQuery) IDs ¶
func (pq *PlaylistsQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Playlists IDs.
func (*PlaylistsQuery) IDsX ¶
func (pq *PlaylistsQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*PlaylistsQuery) Limit ¶
func (pq *PlaylistsQuery) Limit(limit int) *PlaylistsQuery
Limit the number of records to be returned by this query.
func (*PlaylistsQuery) Offset ¶
func (pq *PlaylistsQuery) Offset(offset int) *PlaylistsQuery
Offset to start from.
func (*PlaylistsQuery) Only ¶
func (pq *PlaylistsQuery) Only(ctx context.Context) (*Playlists, error)
Only returns a single Playlists entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Playlists entity is found. Returns a *NotFoundError when no Playlists entities are found.
func (*PlaylistsQuery) OnlyID ¶
func (pq *PlaylistsQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Playlists ID in the query. Returns a *NotSingularError when more than one Playlists ID is found. Returns a *NotFoundError when no entities are found.
func (*PlaylistsQuery) OnlyIDX ¶
func (pq *PlaylistsQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PlaylistsQuery) OnlyX ¶
func (pq *PlaylistsQuery) OnlyX(ctx context.Context) *Playlists
OnlyX is like Only, but panics if an error occurs.
func (*PlaylistsQuery) Order ¶
func (pq *PlaylistsQuery) Order(o ...playlists.OrderOption) *PlaylistsQuery
Order specifies how the records should be ordered.
func (*PlaylistsQuery) QueryImage ¶
func (pq *PlaylistsQuery) QueryImage() *ImagesQuery
QueryImage chains the current query on the "image" edge.
func (*PlaylistsQuery) QueryMusics ¶
func (pq *PlaylistsQuery) QueryMusics() *MusicsQuery
QueryMusics chains the current query on the "musics" edge.
func (*PlaylistsQuery) QueryOwner ¶
func (pq *PlaylistsQuery) QueryOwner() *UsersQuery
QueryOwner chains the current query on the "owner" edge.
func (*PlaylistsQuery) Select ¶
func (pq *PlaylistsQuery) Select(fields ...string) *PlaylistsSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Playlists.Query(). Select(playlists.FieldCreateTime). Scan(ctx, &v)
func (*PlaylistsQuery) Unique ¶
func (pq *PlaylistsQuery) Unique(unique bool) *PlaylistsQuery
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 (*PlaylistsQuery) Where ¶
func (pq *PlaylistsQuery) Where(ps ...predicate.Playlists) *PlaylistsQuery
Where adds a new predicate for the PlaylistsQuery builder.
func (*PlaylistsQuery) WithImage ¶
func (pq *PlaylistsQuery) WithImage(opts ...func(*ImagesQuery)) *PlaylistsQuery
WithImage tells the query-builder to eager-load the nodes that are connected to the "image" edge. The optional arguments are used to configure the query builder of the edge.
func (*PlaylistsQuery) WithMusics ¶
func (pq *PlaylistsQuery) WithMusics(opts ...func(*MusicsQuery)) *PlaylistsQuery
WithMusics tells the query-builder to eager-load the nodes that are connected to the "musics" edge. The optional arguments are used to configure the query builder of the edge.
func (*PlaylistsQuery) WithOwner ¶
func (pq *PlaylistsQuery) WithOwner(opts ...func(*UsersQuery)) *PlaylistsQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type PlaylistsSelect ¶
type PlaylistsSelect struct { *PlaylistsQuery // contains filtered or unexported fields }
PlaylistsSelect is the builder for selecting fields of Playlists entities.
func (*PlaylistsSelect) Aggregate ¶
func (ps *PlaylistsSelect) Aggregate(fns ...AggregateFunc) *PlaylistsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PlaylistsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PlaylistsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PlaylistsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PlaylistsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PlaylistsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PlaylistsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PlaylistsSelect) Scan ¶
func (ps *PlaylistsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PlaylistsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PlaylistsSlice ¶
type PlaylistsSlice []*Playlists
PlaylistsSlice is a parsable slice of Playlists.
type PlaylistsUpdate ¶
type PlaylistsUpdate struct {
// contains filtered or unexported fields
}
PlaylistsUpdate is the builder for updating Playlists entities.
func (*PlaylistsUpdate) AddMusicIDs ¶
func (pu *PlaylistsUpdate) AddMusicIDs(ids ...uint64) *PlaylistsUpdate
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*PlaylistsUpdate) AddMusics ¶
func (pu *PlaylistsUpdate) AddMusics(m ...*Musics) *PlaylistsUpdate
AddMusics adds the "musics" edges to the Musics entity.
func (*PlaylistsUpdate) ClearDescription ¶
func (pu *PlaylistsUpdate) ClearDescription() *PlaylistsUpdate
ClearDescription clears the value of the "description" field.
func (*PlaylistsUpdate) ClearImage ¶
func (pu *PlaylistsUpdate) ClearImage() *PlaylistsUpdate
ClearImage clears the "image" edge to the Images entity.
func (*PlaylistsUpdate) ClearMusics ¶
func (pu *PlaylistsUpdate) ClearMusics() *PlaylistsUpdate
ClearMusics clears all "musics" edges to the Musics entity.
func (*PlaylistsUpdate) ClearOwner ¶
func (pu *PlaylistsUpdate) ClearOwner() *PlaylistsUpdate
ClearOwner clears the "owner" edge to the Users entity.
func (*PlaylistsUpdate) Exec ¶
func (pu *PlaylistsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PlaylistsUpdate) ExecX ¶
func (pu *PlaylistsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlaylistsUpdate) Mutation ¶
func (pu *PlaylistsUpdate) Mutation() *PlaylistsMutation
Mutation returns the PlaylistsMutation object of the builder.
func (*PlaylistsUpdate) RemoveMusicIDs ¶
func (pu *PlaylistsUpdate) RemoveMusicIDs(ids ...uint64) *PlaylistsUpdate
RemoveMusicIDs removes the "musics" edge to Musics entities by IDs.
func (*PlaylistsUpdate) RemoveMusics ¶
func (pu *PlaylistsUpdate) RemoveMusics(m ...*Musics) *PlaylistsUpdate
RemoveMusics removes "musics" edges to Musics entities.
func (*PlaylistsUpdate) Save ¶
func (pu *PlaylistsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PlaylistsUpdate) SaveX ¶
func (pu *PlaylistsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PlaylistsUpdate) SetDescription ¶
func (pu *PlaylistsUpdate) SetDescription(s string) *PlaylistsUpdate
SetDescription sets the "description" field.
func (*PlaylistsUpdate) SetImage ¶
func (pu *PlaylistsUpdate) SetImage(i *Images) *PlaylistsUpdate
SetImage sets the "image" edge to the Images entity.
func (*PlaylistsUpdate) SetImageID ¶
func (pu *PlaylistsUpdate) SetImageID(id uint64) *PlaylistsUpdate
SetImageID sets the "image" edge to the Images entity by ID.
func (*PlaylistsUpdate) SetName ¶
func (pu *PlaylistsUpdate) SetName(s string) *PlaylistsUpdate
SetName sets the "name" field.
func (*PlaylistsUpdate) SetNillableDescription ¶
func (pu *PlaylistsUpdate) SetNillableDescription(s *string) *PlaylistsUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*PlaylistsUpdate) SetNillableImageID ¶
func (pu *PlaylistsUpdate) SetNillableImageID(id *uint64) *PlaylistsUpdate
SetNillableImageID sets the "image" edge to the Images entity by ID if the given value is not nil.
func (*PlaylistsUpdate) SetNillableName ¶
func (pu *PlaylistsUpdate) SetNillableName(s *string) *PlaylistsUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PlaylistsUpdate) SetNillablePrivate ¶
func (pu *PlaylistsUpdate) SetNillablePrivate(b *bool) *PlaylistsUpdate
SetNillablePrivate sets the "private" field if the given value is not nil.
func (*PlaylistsUpdate) SetOwner ¶
func (pu *PlaylistsUpdate) SetOwner(u *Users) *PlaylistsUpdate
SetOwner sets the "owner" edge to the Users entity.
func (*PlaylistsUpdate) SetOwnerID ¶
func (pu *PlaylistsUpdate) SetOwnerID(id uint64) *PlaylistsUpdate
SetOwnerID sets the "owner" edge to the Users entity by ID.
func (*PlaylistsUpdate) SetPrivate ¶
func (pu *PlaylistsUpdate) SetPrivate(b bool) *PlaylistsUpdate
SetPrivate sets the "private" field.
func (*PlaylistsUpdate) SetUpdateTime ¶
func (pu *PlaylistsUpdate) SetUpdateTime(t time.Time) *PlaylistsUpdate
SetUpdateTime sets the "update_time" field.
func (*PlaylistsUpdate) Where ¶
func (pu *PlaylistsUpdate) Where(ps ...predicate.Playlists) *PlaylistsUpdate
Where appends a list predicates to the PlaylistsUpdate builder.
type PlaylistsUpdateOne ¶
type PlaylistsUpdateOne struct {
// contains filtered or unexported fields
}
PlaylistsUpdateOne is the builder for updating a single Playlists entity.
func (*PlaylistsUpdateOne) AddMusicIDs ¶
func (puo *PlaylistsUpdateOne) AddMusicIDs(ids ...uint64) *PlaylistsUpdateOne
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*PlaylistsUpdateOne) AddMusics ¶
func (puo *PlaylistsUpdateOne) AddMusics(m ...*Musics) *PlaylistsUpdateOne
AddMusics adds the "musics" edges to the Musics entity.
func (*PlaylistsUpdateOne) ClearDescription ¶
func (puo *PlaylistsUpdateOne) ClearDescription() *PlaylistsUpdateOne
ClearDescription clears the value of the "description" field.
func (*PlaylistsUpdateOne) ClearImage ¶
func (puo *PlaylistsUpdateOne) ClearImage() *PlaylistsUpdateOne
ClearImage clears the "image" edge to the Images entity.
func (*PlaylistsUpdateOne) ClearMusics ¶
func (puo *PlaylistsUpdateOne) ClearMusics() *PlaylistsUpdateOne
ClearMusics clears all "musics" edges to the Musics entity.
func (*PlaylistsUpdateOne) ClearOwner ¶
func (puo *PlaylistsUpdateOne) ClearOwner() *PlaylistsUpdateOne
ClearOwner clears the "owner" edge to the Users entity.
func (*PlaylistsUpdateOne) Exec ¶
func (puo *PlaylistsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PlaylistsUpdateOne) ExecX ¶
func (puo *PlaylistsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlaylistsUpdateOne) Mutation ¶
func (puo *PlaylistsUpdateOne) Mutation() *PlaylistsMutation
Mutation returns the PlaylistsMutation object of the builder.
func (*PlaylistsUpdateOne) RemoveMusicIDs ¶
func (puo *PlaylistsUpdateOne) RemoveMusicIDs(ids ...uint64) *PlaylistsUpdateOne
RemoveMusicIDs removes the "musics" edge to Musics entities by IDs.
func (*PlaylistsUpdateOne) RemoveMusics ¶
func (puo *PlaylistsUpdateOne) RemoveMusics(m ...*Musics) *PlaylistsUpdateOne
RemoveMusics removes "musics" edges to Musics entities.
func (*PlaylistsUpdateOne) Save ¶
func (puo *PlaylistsUpdateOne) Save(ctx context.Context) (*Playlists, error)
Save executes the query and returns the updated Playlists entity.
func (*PlaylistsUpdateOne) SaveX ¶
func (puo *PlaylistsUpdateOne) SaveX(ctx context.Context) *Playlists
SaveX is like Save, but panics if an error occurs.
func (*PlaylistsUpdateOne) Select ¶
func (puo *PlaylistsUpdateOne) Select(field string, fields ...string) *PlaylistsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PlaylistsUpdateOne) SetDescription ¶
func (puo *PlaylistsUpdateOne) SetDescription(s string) *PlaylistsUpdateOne
SetDescription sets the "description" field.
func (*PlaylistsUpdateOne) SetImage ¶
func (puo *PlaylistsUpdateOne) SetImage(i *Images) *PlaylistsUpdateOne
SetImage sets the "image" edge to the Images entity.
func (*PlaylistsUpdateOne) SetImageID ¶
func (puo *PlaylistsUpdateOne) SetImageID(id uint64) *PlaylistsUpdateOne
SetImageID sets the "image" edge to the Images entity by ID.
func (*PlaylistsUpdateOne) SetName ¶
func (puo *PlaylistsUpdateOne) SetName(s string) *PlaylistsUpdateOne
SetName sets the "name" field.
func (*PlaylistsUpdateOne) SetNillableDescription ¶
func (puo *PlaylistsUpdateOne) SetNillableDescription(s *string) *PlaylistsUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*PlaylistsUpdateOne) SetNillableImageID ¶
func (puo *PlaylistsUpdateOne) SetNillableImageID(id *uint64) *PlaylistsUpdateOne
SetNillableImageID sets the "image" edge to the Images entity by ID if the given value is not nil.
func (*PlaylistsUpdateOne) SetNillableName ¶
func (puo *PlaylistsUpdateOne) SetNillableName(s *string) *PlaylistsUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PlaylistsUpdateOne) SetNillablePrivate ¶
func (puo *PlaylistsUpdateOne) SetNillablePrivate(b *bool) *PlaylistsUpdateOne
SetNillablePrivate sets the "private" field if the given value is not nil.
func (*PlaylistsUpdateOne) SetOwner ¶
func (puo *PlaylistsUpdateOne) SetOwner(u *Users) *PlaylistsUpdateOne
SetOwner sets the "owner" edge to the Users entity.
func (*PlaylistsUpdateOne) SetOwnerID ¶
func (puo *PlaylistsUpdateOne) SetOwnerID(id uint64) *PlaylistsUpdateOne
SetOwnerID sets the "owner" edge to the Users entity by ID.
func (*PlaylistsUpdateOne) SetPrivate ¶
func (puo *PlaylistsUpdateOne) SetPrivate(b bool) *PlaylistsUpdateOne
SetPrivate sets the "private" field.
func (*PlaylistsUpdateOne) SetUpdateTime ¶
func (puo *PlaylistsUpdateOne) SetUpdateTime(t time.Time) *PlaylistsUpdateOne
SetUpdateTime sets the "update_time" field.
func (*PlaylistsUpdateOne) Where ¶
func (puo *PlaylistsUpdateOne) Where(ps ...predicate.Playlists) *PlaylistsUpdateOne
Where appends a list predicates to the PlaylistsUpdate builder.
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 { // Actors is the client for interacting with the Actors builders. Actors *ActorsClient // Albums is the client for interacting with the Albums builders. Albums *AlbumsClient // Artists is the client for interacting with the Artists builders. Artists *ArtistsClient // Audiobooks is the client for interacting with the Audiobooks builders. Audiobooks *AudiobooksClient // Categorys is the client for interacting with the Categorys builders. Categorys *CategorysClient // Devices is the client for interacting with the Devices builders. Devices *DevicesClient // Directors is the client for interacting with the Directors builders. Directors *DirectorsClient // Files is the client for interacting with the Files builders. Files *FilesClient // Images is the client for interacting with the Images builders. Images *ImagesClient // Musics is the client for interacting with the Musics builders. Musics *MusicsClient // Oidc is the client for interacting with the Oidc builders. Oidc *OidcClient // Playlists is the client for interacting with the Playlists builders. Playlists *PlaylistsClient // Users is the client for interacting with the Users builders. Users *UsersClient // Videos is the client for interacting with the Videos builders. Videos *VideosClient // 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 Users ¶
type Users struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // CreateTime holds the value of the "create_time" field. CreateTime time.Time `json:"create_time,omitempty"` // UpdateTime holds the value of the "update_time" field. UpdateTime time.Time `json:"update_time,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Bio holds the value of the "bio" field. Bio string `json:"bio,omitempty"` // Avatar holds the value of the "avatar" field. Avatar string `json:"avatar,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UsersQuery when eager-loading is set. Edges UsersEdges `json:"edges"` // contains filtered or unexported fields }
Users is the model entity for the Users schema.
func (*Users) QueryAlbums ¶
func (u *Users) QueryAlbums() *AlbumsQuery
QueryAlbums queries the "albums" edge of the Users entity.
func (*Users) QueryDevices ¶
func (u *Users) QueryDevices() *DevicesQuery
QueryDevices queries the "devices" edge of the Users entity.
func (*Users) QueryMusics ¶
func (u *Users) QueryMusics() *MusicsQuery
QueryMusics queries the "musics" edge of the Users entity.
func (*Users) QueryPlaylists ¶
func (u *Users) QueryPlaylists() *PlaylistsQuery
QueryPlaylists queries the "playlists" edge of the Users entity.
func (*Users) Unwrap ¶
Unwrap unwraps the Users 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 (*Users) Update ¶
func (u *Users) Update() *UsersUpdateOne
Update returns a builder for updating this Users. Note that you need to call Users.Unwrap() before calling this method if this Users was returned from a transaction, and the transaction was committed or rolled back.
type UsersClient ¶
type UsersClient struct {
// contains filtered or unexported fields
}
UsersClient is a client for the Users schema.
func NewUsersClient ¶
func NewUsersClient(c config) *UsersClient
NewUsersClient returns a client for the Users from the given config.
func (*UsersClient) Create ¶
func (c *UsersClient) Create() *UsersCreate
Create returns a builder for creating a Users entity.
func (*UsersClient) CreateBulk ¶
func (c *UsersClient) CreateBulk(builders ...*UsersCreate) *UsersCreateBulk
CreateBulk returns a builder for creating a bulk of Users entities.
func (*UsersClient) Delete ¶
func (c *UsersClient) Delete() *UsersDelete
Delete returns a delete builder for Users.
func (*UsersClient) DeleteOne ¶
func (c *UsersClient) DeleteOne(u *Users) *UsersDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UsersClient) DeleteOneID ¶
func (c *UsersClient) DeleteOneID(id uint64) *UsersDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UsersClient) GetX ¶
func (c *UsersClient) GetX(ctx context.Context, id uint64) *Users
GetX is like Get, but panics if an error occurs.
func (*UsersClient) Intercept ¶
func (c *UsersClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `users.Intercept(f(g(h())))`.
func (*UsersClient) Interceptors ¶
func (c *UsersClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UsersClient) MapCreateBulk ¶
func (c *UsersClient) MapCreateBulk(slice any, setFunc func(*UsersCreate, int)) *UsersCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UsersClient) Query ¶
func (c *UsersClient) Query() *UsersQuery
Query returns a query builder for Users.
func (*UsersClient) QueryAlbums ¶
func (c *UsersClient) QueryAlbums(u *Users) *AlbumsQuery
QueryAlbums queries the albums edge of a Users.
func (*UsersClient) QueryDevices ¶
func (c *UsersClient) QueryDevices(u *Users) *DevicesQuery
QueryDevices queries the devices edge of a Users.
func (*UsersClient) QueryMusics ¶
func (c *UsersClient) QueryMusics(u *Users) *MusicsQuery
QueryMusics queries the musics edge of a Users.
func (*UsersClient) QueryPlaylists ¶
func (c *UsersClient) QueryPlaylists(u *Users) *PlaylistsQuery
QueryPlaylists queries the playlists edge of a Users.
func (*UsersClient) Update ¶
func (c *UsersClient) Update() *UsersUpdate
Update returns an update builder for Users.
func (*UsersClient) UpdateOne ¶
func (c *UsersClient) UpdateOne(u *Users) *UsersUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UsersClient) UpdateOneID ¶
func (c *UsersClient) UpdateOneID(id uint64) *UsersUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UsersClient) Use ¶
func (c *UsersClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `users.Hooks(f(g(h())))`.
type UsersCreate ¶
type UsersCreate struct {
// contains filtered or unexported fields
}
UsersCreate is the builder for creating a Users entity.
func (*UsersCreate) AddAlbumIDs ¶
func (uc *UsersCreate) AddAlbumIDs(ids ...uint64) *UsersCreate
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*UsersCreate) AddAlbums ¶
func (uc *UsersCreate) AddAlbums(a ...*Albums) *UsersCreate
AddAlbums adds the "albums" edges to the Albums entity.
func (*UsersCreate) AddDeviceIDs ¶
func (uc *UsersCreate) AddDeviceIDs(ids ...uint64) *UsersCreate
AddDeviceIDs adds the "devices" edge to the Devices entity by IDs.
func (*UsersCreate) AddDevices ¶
func (uc *UsersCreate) AddDevices(d ...*Devices) *UsersCreate
AddDevices adds the "devices" edges to the Devices entity.
func (*UsersCreate) AddMusicIDs ¶
func (uc *UsersCreate) AddMusicIDs(ids ...uint64) *UsersCreate
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*UsersCreate) AddMusics ¶
func (uc *UsersCreate) AddMusics(m ...*Musics) *UsersCreate
AddMusics adds the "musics" edges to the Musics entity.
func (*UsersCreate) AddPlaylistIDs ¶
func (uc *UsersCreate) AddPlaylistIDs(ids ...uint64) *UsersCreate
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by IDs.
func (*UsersCreate) AddPlaylists ¶
func (uc *UsersCreate) AddPlaylists(p ...*Playlists) *UsersCreate
AddPlaylists adds the "playlists" edges to the Playlists entity.
func (*UsersCreate) Exec ¶
func (uc *UsersCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UsersCreate) ExecX ¶
func (uc *UsersCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersCreate) Mutation ¶
func (uc *UsersCreate) Mutation() *UsersMutation
Mutation returns the UsersMutation object of the builder.
func (*UsersCreate) Save ¶
func (uc *UsersCreate) Save(ctx context.Context) (*Users, error)
Save creates the Users in the database.
func (*UsersCreate) SaveX ¶
func (uc *UsersCreate) SaveX(ctx context.Context) *Users
SaveX calls Save and panics if Save returns an error.
func (*UsersCreate) SetAvatar ¶
func (uc *UsersCreate) SetAvatar(s string) *UsersCreate
SetAvatar sets the "avatar" field.
func (*UsersCreate) SetBio ¶
func (uc *UsersCreate) SetBio(s string) *UsersCreate
SetBio sets the "bio" field.
func (*UsersCreate) SetCreateTime ¶
func (uc *UsersCreate) SetCreateTime(t time.Time) *UsersCreate
SetCreateTime sets the "create_time" field.
func (*UsersCreate) SetEmail ¶
func (uc *UsersCreate) SetEmail(s string) *UsersCreate
SetEmail sets the "email" field.
func (*UsersCreate) SetID ¶
func (uc *UsersCreate) SetID(u uint64) *UsersCreate
SetID sets the "id" field.
func (*UsersCreate) SetName ¶
func (uc *UsersCreate) SetName(s string) *UsersCreate
SetName sets the "name" field.
func (*UsersCreate) SetNillableAvatar ¶
func (uc *UsersCreate) SetNillableAvatar(s *string) *UsersCreate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UsersCreate) SetNillableBio ¶
func (uc *UsersCreate) SetNillableBio(s *string) *UsersCreate
SetNillableBio sets the "bio" field if the given value is not nil.
func (*UsersCreate) SetNillableCreateTime ¶
func (uc *UsersCreate) SetNillableCreateTime(t *time.Time) *UsersCreate
SetNillableCreateTime sets the "create_time" field if the given value is not nil.
func (*UsersCreate) SetNillableEmail ¶
func (uc *UsersCreate) SetNillableEmail(s *string) *UsersCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UsersCreate) SetNillableName ¶
func (uc *UsersCreate) SetNillableName(s *string) *UsersCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*UsersCreate) SetNillablePassword ¶
func (uc *UsersCreate) SetNillablePassword(s *string) *UsersCreate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UsersCreate) SetNillableUpdateTime ¶
func (uc *UsersCreate) SetNillableUpdateTime(t *time.Time) *UsersCreate
SetNillableUpdateTime sets the "update_time" field if the given value is not nil.
func (*UsersCreate) SetPassword ¶
func (uc *UsersCreate) SetPassword(s string) *UsersCreate
SetPassword sets the "password" field.
func (*UsersCreate) SetUpdateTime ¶
func (uc *UsersCreate) SetUpdateTime(t time.Time) *UsersCreate
SetUpdateTime sets the "update_time" field.
func (*UsersCreate) SetUsername ¶
func (uc *UsersCreate) SetUsername(s string) *UsersCreate
SetUsername sets the "username" field.
type UsersCreateBulk ¶
type UsersCreateBulk struct {
// contains filtered or unexported fields
}
UsersCreateBulk is the builder for creating many Users entities in bulk.
func (*UsersCreateBulk) Exec ¶
func (ucb *UsersCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UsersCreateBulk) ExecX ¶
func (ucb *UsersCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UsersDelete ¶
type UsersDelete struct {
// contains filtered or unexported fields
}
UsersDelete is the builder for deleting a Users entity.
func (*UsersDelete) Exec ¶
func (ud *UsersDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UsersDelete) ExecX ¶
func (ud *UsersDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UsersDelete) Where ¶
func (ud *UsersDelete) Where(ps ...predicate.Users) *UsersDelete
Where appends a list predicates to the UsersDelete builder.
type UsersDeleteOne ¶
type UsersDeleteOne struct {
// contains filtered or unexported fields
}
UsersDeleteOne is the builder for deleting a single Users entity.
func (*UsersDeleteOne) Exec ¶
func (udo *UsersDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UsersDeleteOne) ExecX ¶
func (udo *UsersDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersDeleteOne) Where ¶
func (udo *UsersDeleteOne) Where(ps ...predicate.Users) *UsersDeleteOne
Where appends a list predicates to the UsersDelete builder.
type UsersEdges ¶
type UsersEdges struct { // Devices holds the value of the devices edge. Devices []*Devices `json:"devices,omitempty"` // Playlists holds the value of the playlists edge. Playlists []*Playlists `json:"playlists,omitempty"` // Albums holds the value of the albums edge. Albums []*Albums `json:"albums,omitempty"` // Musics holds the value of the musics edge. Musics []*Musics `json:"musics,omitempty"` // contains filtered or unexported fields }
UsersEdges holds the relations/edges for other nodes in the graph.
func (UsersEdges) AlbumsOrErr ¶
func (e UsersEdges) AlbumsOrErr() ([]*Albums, error)
AlbumsOrErr returns the Albums value or an error if the edge was not loaded in eager-loading.
func (UsersEdges) DevicesOrErr ¶
func (e UsersEdges) DevicesOrErr() ([]*Devices, error)
DevicesOrErr returns the Devices value or an error if the edge was not loaded in eager-loading.
func (UsersEdges) MusicsOrErr ¶
func (e UsersEdges) MusicsOrErr() ([]*Musics, error)
MusicsOrErr returns the Musics value or an error if the edge was not loaded in eager-loading.
func (UsersEdges) PlaylistsOrErr ¶
func (e UsersEdges) PlaylistsOrErr() ([]*Playlists, error)
PlaylistsOrErr returns the Playlists value or an error if the edge was not loaded in eager-loading.
type UsersGroupBy ¶
type UsersGroupBy struct {
// contains filtered or unexported fields
}
UsersGroupBy is the group-by builder for Users entities.
func (*UsersGroupBy) Aggregate ¶
func (ugb *UsersGroupBy) Aggregate(fns ...AggregateFunc) *UsersGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UsersGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UsersGroupBy) Scan ¶
func (ugb *UsersGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UsersGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UsersMutation ¶
type UsersMutation struct {
// contains filtered or unexported fields
}
UsersMutation represents an operation that mutates the Users nodes in the graph.
func (*UsersMutation) AddAlbumIDs ¶
func (m *UsersMutation) AddAlbumIDs(ids ...uint64)
AddAlbumIDs adds the "albums" edge to the Albums entity by ids.
func (*UsersMutation) AddDeviceIDs ¶
func (m *UsersMutation) AddDeviceIDs(ids ...uint64)
AddDeviceIDs adds the "devices" edge to the Devices entity by ids.
func (*UsersMutation) AddField ¶
func (m *UsersMutation) 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 (*UsersMutation) AddMusicIDs ¶
func (m *UsersMutation) AddMusicIDs(ids ...uint64)
AddMusicIDs adds the "musics" edge to the Musics entity by ids.
func (*UsersMutation) AddPlaylistIDs ¶
func (m *UsersMutation) AddPlaylistIDs(ids ...uint64)
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by ids.
func (*UsersMutation) AddedEdges ¶
func (m *UsersMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UsersMutation) AddedField ¶
func (m *UsersMutation) 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 (*UsersMutation) AddedFields ¶
func (m *UsersMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UsersMutation) AddedIDs ¶
func (m *UsersMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UsersMutation) AlbumsCleared ¶
func (m *UsersMutation) AlbumsCleared() bool
AlbumsCleared reports if the "albums" edge to the Albums entity was cleared.
func (*UsersMutation) AlbumsIDs ¶
func (m *UsersMutation) AlbumsIDs() (ids []uint64)
AlbumsIDs returns the "albums" edge IDs in the mutation.
func (*UsersMutation) Avatar ¶
func (m *UsersMutation) Avatar() (r string, exists bool)
Avatar returns the value of the "avatar" field in the mutation.
func (*UsersMutation) AvatarCleared ¶
func (m *UsersMutation) AvatarCleared() bool
AvatarCleared returns if the "avatar" field was cleared in this mutation.
func (*UsersMutation) Bio ¶
func (m *UsersMutation) Bio() (r string, exists bool)
Bio returns the value of the "bio" field in the mutation.
func (*UsersMutation) BioCleared ¶
func (m *UsersMutation) BioCleared() bool
BioCleared returns if the "bio" field was cleared in this mutation.
func (*UsersMutation) ClearAlbums ¶
func (m *UsersMutation) ClearAlbums()
ClearAlbums clears the "albums" edge to the Albums entity.
func (*UsersMutation) ClearAvatar ¶
func (m *UsersMutation) ClearAvatar()
ClearAvatar clears the value of the "avatar" field.
func (*UsersMutation) ClearBio ¶
func (m *UsersMutation) ClearBio()
ClearBio clears the value of the "bio" field.
func (*UsersMutation) ClearDevices ¶
func (m *UsersMutation) ClearDevices()
ClearDevices clears the "devices" edge to the Devices entity.
func (*UsersMutation) ClearEdge ¶
func (m *UsersMutation) 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 (*UsersMutation) ClearEmail ¶
func (m *UsersMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*UsersMutation) ClearField ¶
func (m *UsersMutation) 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 (*UsersMutation) ClearMusics ¶
func (m *UsersMutation) ClearMusics()
ClearMusics clears the "musics" edge to the Musics entity.
func (*UsersMutation) ClearName ¶
func (m *UsersMutation) ClearName()
ClearName clears the value of the "name" field.
func (*UsersMutation) ClearPassword ¶
func (m *UsersMutation) ClearPassword()
ClearPassword clears the value of the "password" field.
func (*UsersMutation) ClearPlaylists ¶
func (m *UsersMutation) ClearPlaylists()
ClearPlaylists clears the "playlists" edge to the Playlists entity.
func (*UsersMutation) ClearedEdges ¶
func (m *UsersMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UsersMutation) ClearedFields ¶
func (m *UsersMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UsersMutation) Client ¶
func (m UsersMutation) 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 (*UsersMutation) CreateTime ¶
func (m *UsersMutation) CreateTime() (r time.Time, exists bool)
CreateTime returns the value of the "create_time" field in the mutation.
func (*UsersMutation) DevicesCleared ¶
func (m *UsersMutation) DevicesCleared() bool
DevicesCleared reports if the "devices" edge to the Devices entity was cleared.
func (*UsersMutation) DevicesIDs ¶
func (m *UsersMutation) DevicesIDs() (ids []uint64)
DevicesIDs returns the "devices" edge IDs in the mutation.
func (*UsersMutation) EdgeCleared ¶
func (m *UsersMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UsersMutation) Email ¶
func (m *UsersMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UsersMutation) EmailCleared ¶
func (m *UsersMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*UsersMutation) Field ¶
func (m *UsersMutation) 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 (*UsersMutation) FieldCleared ¶
func (m *UsersMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UsersMutation) Fields ¶
func (m *UsersMutation) 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 (*UsersMutation) ID ¶
func (m *UsersMutation) 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 (*UsersMutation) IDs ¶
func (m *UsersMutation) 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 (*UsersMutation) MusicsCleared ¶
func (m *UsersMutation) MusicsCleared() bool
MusicsCleared reports if the "musics" edge to the Musics entity was cleared.
func (*UsersMutation) MusicsIDs ¶
func (m *UsersMutation) MusicsIDs() (ids []uint64)
MusicsIDs returns the "musics" edge IDs in the mutation.
func (*UsersMutation) Name ¶
func (m *UsersMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UsersMutation) NameCleared ¶
func (m *UsersMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*UsersMutation) OldAvatar ¶
func (m *UsersMutation) OldAvatar(ctx context.Context) (v string, err error)
OldAvatar returns the old "avatar" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldBio ¶
func (m *UsersMutation) OldBio(ctx context.Context) (v string, err error)
OldBio returns the old "bio" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldCreateTime ¶
OldCreateTime returns the old "create_time" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldEmail ¶
func (m *UsersMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) 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 (*UsersMutation) OldName ¶
func (m *UsersMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldPassword ¶
func (m *UsersMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldUpdateTime ¶
OldUpdateTime returns the old "update_time" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldUsername ¶
func (m *UsersMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) Password ¶
func (m *UsersMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UsersMutation) PasswordCleared ¶
func (m *UsersMutation) PasswordCleared() bool
PasswordCleared returns if the "password" field was cleared in this mutation.
func (*UsersMutation) PlaylistsCleared ¶
func (m *UsersMutation) PlaylistsCleared() bool
PlaylistsCleared reports if the "playlists" edge to the Playlists entity was cleared.
func (*UsersMutation) PlaylistsIDs ¶
func (m *UsersMutation) PlaylistsIDs() (ids []uint64)
PlaylistsIDs returns the "playlists" edge IDs in the mutation.
func (*UsersMutation) RemoveAlbumIDs ¶
func (m *UsersMutation) RemoveAlbumIDs(ids ...uint64)
RemoveAlbumIDs removes the "albums" edge to the Albums entity by IDs.
func (*UsersMutation) RemoveDeviceIDs ¶
func (m *UsersMutation) RemoveDeviceIDs(ids ...uint64)
RemoveDeviceIDs removes the "devices" edge to the Devices entity by IDs.
func (*UsersMutation) RemoveMusicIDs ¶
func (m *UsersMutation) RemoveMusicIDs(ids ...uint64)
RemoveMusicIDs removes the "musics" edge to the Musics entity by IDs.
func (*UsersMutation) RemovePlaylistIDs ¶
func (m *UsersMutation) RemovePlaylistIDs(ids ...uint64)
RemovePlaylistIDs removes the "playlists" edge to the Playlists entity by IDs.
func (*UsersMutation) RemovedAlbumsIDs ¶
func (m *UsersMutation) RemovedAlbumsIDs() (ids []uint64)
RemovedAlbums returns the removed IDs of the "albums" edge to the Albums entity.
func (*UsersMutation) RemovedDevicesIDs ¶
func (m *UsersMutation) RemovedDevicesIDs() (ids []uint64)
RemovedDevices returns the removed IDs of the "devices" edge to the Devices entity.
func (*UsersMutation) RemovedEdges ¶
func (m *UsersMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UsersMutation) RemovedIDs ¶
func (m *UsersMutation) 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 (*UsersMutation) RemovedMusicsIDs ¶
func (m *UsersMutation) RemovedMusicsIDs() (ids []uint64)
RemovedMusics returns the removed IDs of the "musics" edge to the Musics entity.
func (*UsersMutation) RemovedPlaylistsIDs ¶
func (m *UsersMutation) RemovedPlaylistsIDs() (ids []uint64)
RemovedPlaylists returns the removed IDs of the "playlists" edge to the Playlists entity.
func (*UsersMutation) ResetAlbums ¶
func (m *UsersMutation) ResetAlbums()
ResetAlbums resets all changes to the "albums" edge.
func (*UsersMutation) ResetAvatar ¶
func (m *UsersMutation) ResetAvatar()
ResetAvatar resets all changes to the "avatar" field.
func (*UsersMutation) ResetBio ¶
func (m *UsersMutation) ResetBio()
ResetBio resets all changes to the "bio" field.
func (*UsersMutation) ResetCreateTime ¶
func (m *UsersMutation) ResetCreateTime()
ResetCreateTime resets all changes to the "create_time" field.
func (*UsersMutation) ResetDevices ¶
func (m *UsersMutation) ResetDevices()
ResetDevices resets all changes to the "devices" edge.
func (*UsersMutation) ResetEdge ¶
func (m *UsersMutation) 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 (*UsersMutation) ResetEmail ¶
func (m *UsersMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UsersMutation) ResetField ¶
func (m *UsersMutation) 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 (*UsersMutation) ResetMusics ¶
func (m *UsersMutation) ResetMusics()
ResetMusics resets all changes to the "musics" edge.
func (*UsersMutation) ResetName ¶
func (m *UsersMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UsersMutation) ResetPassword ¶
func (m *UsersMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UsersMutation) ResetPlaylists ¶
func (m *UsersMutation) ResetPlaylists()
ResetPlaylists resets all changes to the "playlists" edge.
func (*UsersMutation) ResetUpdateTime ¶
func (m *UsersMutation) ResetUpdateTime()
ResetUpdateTime resets all changes to the "update_time" field.
func (*UsersMutation) ResetUsername ¶
func (m *UsersMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UsersMutation) SetAvatar ¶
func (m *UsersMutation) SetAvatar(s string)
SetAvatar sets the "avatar" field.
func (*UsersMutation) SetBio ¶
func (m *UsersMutation) SetBio(s string)
SetBio sets the "bio" field.
func (*UsersMutation) SetCreateTime ¶
func (m *UsersMutation) SetCreateTime(t time.Time)
SetCreateTime sets the "create_time" field.
func (*UsersMutation) SetEmail ¶
func (m *UsersMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UsersMutation) SetField ¶
func (m *UsersMutation) 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 (*UsersMutation) SetID ¶
func (m *UsersMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Users entities.
func (*UsersMutation) SetName ¶
func (m *UsersMutation) SetName(s string)
SetName sets the "name" field.
func (*UsersMutation) SetOp ¶
func (m *UsersMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UsersMutation) SetPassword ¶
func (m *UsersMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UsersMutation) SetUpdateTime ¶
func (m *UsersMutation) SetUpdateTime(t time.Time)
SetUpdateTime sets the "update_time" field.
func (*UsersMutation) SetUsername ¶
func (m *UsersMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (UsersMutation) Tx ¶
func (m UsersMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UsersMutation) Type ¶
func (m *UsersMutation) Type() string
Type returns the node type of this mutation (Users).
func (*UsersMutation) UpdateTime ¶
func (m *UsersMutation) UpdateTime() (r time.Time, exists bool)
UpdateTime returns the value of the "update_time" field in the mutation.
func (*UsersMutation) Username ¶
func (m *UsersMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UsersMutation) Where ¶
func (m *UsersMutation) Where(ps ...predicate.Users)
Where appends a list predicates to the UsersMutation builder.
func (*UsersMutation) WhereP ¶
func (m *UsersMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UsersMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UsersQuery ¶
type UsersQuery struct {
// contains filtered or unexported fields
}
UsersQuery is the builder for querying Users entities.
func (*UsersQuery) Aggregate ¶
func (uq *UsersQuery) Aggregate(fns ...AggregateFunc) *UsersSelect
Aggregate returns a UsersSelect configured with the given aggregations.
func (*UsersQuery) All ¶
func (uq *UsersQuery) All(ctx context.Context) ([]*Users, error)
All executes the query and returns a list of UsersSlice.
func (*UsersQuery) AllX ¶
func (uq *UsersQuery) AllX(ctx context.Context) []*Users
AllX is like All, but panics if an error occurs.
func (*UsersQuery) Clone ¶
func (uq *UsersQuery) Clone() *UsersQuery
Clone returns a duplicate of the UsersQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UsersQuery) Count ¶
func (uq *UsersQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UsersQuery) CountX ¶
func (uq *UsersQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UsersQuery) Exist ¶
func (uq *UsersQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UsersQuery) ExistX ¶
func (uq *UsersQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UsersQuery) First ¶
func (uq *UsersQuery) First(ctx context.Context) (*Users, error)
First returns the first Users entity from the query. Returns a *NotFoundError when no Users was found.
func (*UsersQuery) FirstID ¶
func (uq *UsersQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Users ID from the query. Returns a *NotFoundError when no Users ID was found.
func (*UsersQuery) FirstIDX ¶
func (uq *UsersQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*UsersQuery) FirstX ¶
func (uq *UsersQuery) FirstX(ctx context.Context) *Users
FirstX is like First, but panics if an error occurs.
func (*UsersQuery) GroupBy ¶
func (uq *UsersQuery) GroupBy(field string, fields ...string) *UsersGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` Count int `json:"count,omitempty"` } client.Users.Query(). GroupBy(users.FieldCreateTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UsersQuery) IDs ¶
func (uq *UsersQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Users IDs.
func (*UsersQuery) IDsX ¶
func (uq *UsersQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*UsersQuery) Limit ¶
func (uq *UsersQuery) Limit(limit int) *UsersQuery
Limit the number of records to be returned by this query.
func (*UsersQuery) Offset ¶
func (uq *UsersQuery) Offset(offset int) *UsersQuery
Offset to start from.
func (*UsersQuery) Only ¶
func (uq *UsersQuery) Only(ctx context.Context) (*Users, error)
Only returns a single Users entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Users entity is found. Returns a *NotFoundError when no Users entities are found.
func (*UsersQuery) OnlyID ¶
func (uq *UsersQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Users ID in the query. Returns a *NotSingularError when more than one Users ID is found. Returns a *NotFoundError when no entities are found.
func (*UsersQuery) OnlyIDX ¶
func (uq *UsersQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UsersQuery) OnlyX ¶
func (uq *UsersQuery) OnlyX(ctx context.Context) *Users
OnlyX is like Only, but panics if an error occurs.
func (*UsersQuery) Order ¶
func (uq *UsersQuery) Order(o ...users.OrderOption) *UsersQuery
Order specifies how the records should be ordered.
func (*UsersQuery) QueryAlbums ¶
func (uq *UsersQuery) QueryAlbums() *AlbumsQuery
QueryAlbums chains the current query on the "albums" edge.
func (*UsersQuery) QueryDevices ¶
func (uq *UsersQuery) QueryDevices() *DevicesQuery
QueryDevices chains the current query on the "devices" edge.
func (*UsersQuery) QueryMusics ¶
func (uq *UsersQuery) QueryMusics() *MusicsQuery
QueryMusics chains the current query on the "musics" edge.
func (*UsersQuery) QueryPlaylists ¶
func (uq *UsersQuery) QueryPlaylists() *PlaylistsQuery
QueryPlaylists chains the current query on the "playlists" edge.
func (*UsersQuery) Select ¶
func (uq *UsersQuery) Select(fields ...string) *UsersSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreateTime time.Time `json:"create_time,omitempty"` } client.Users.Query(). Select(users.FieldCreateTime). Scan(ctx, &v)
func (*UsersQuery) Unique ¶
func (uq *UsersQuery) Unique(unique bool) *UsersQuery
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 (*UsersQuery) Where ¶
func (uq *UsersQuery) Where(ps ...predicate.Users) *UsersQuery
Where adds a new predicate for the UsersQuery builder.
func (*UsersQuery) WithAlbums ¶
func (uq *UsersQuery) WithAlbums(opts ...func(*AlbumsQuery)) *UsersQuery
WithAlbums tells the query-builder to eager-load the nodes that are connected to the "albums" edge. The optional arguments are used to configure the query builder of the edge.
func (*UsersQuery) WithDevices ¶
func (uq *UsersQuery) WithDevices(opts ...func(*DevicesQuery)) *UsersQuery
WithDevices tells the query-builder to eager-load the nodes that are connected to the "devices" edge. The optional arguments are used to configure the query builder of the edge.
func (*UsersQuery) WithMusics ¶
func (uq *UsersQuery) WithMusics(opts ...func(*MusicsQuery)) *UsersQuery
WithMusics tells the query-builder to eager-load the nodes that are connected to the "musics" edge. The optional arguments are used to configure the query builder of the edge.
func (*UsersQuery) WithPlaylists ¶
func (uq *UsersQuery) WithPlaylists(opts ...func(*PlaylistsQuery)) *UsersQuery
WithPlaylists tells the query-builder to eager-load the nodes that are connected to the "playlists" edge. The optional arguments are used to configure the query builder of the edge.
type UsersSelect ¶
type UsersSelect struct { *UsersQuery // contains filtered or unexported fields }
UsersSelect is the builder for selecting fields of Users entities.
func (*UsersSelect) Aggregate ¶
func (us *UsersSelect) Aggregate(fns ...AggregateFunc) *UsersSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UsersSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Scan ¶
func (us *UsersSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UsersSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UsersUpdate ¶
type UsersUpdate struct {
// contains filtered or unexported fields
}
UsersUpdate is the builder for updating Users entities.
func (*UsersUpdate) AddAlbumIDs ¶
func (uu *UsersUpdate) AddAlbumIDs(ids ...uint64) *UsersUpdate
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*UsersUpdate) AddAlbums ¶
func (uu *UsersUpdate) AddAlbums(a ...*Albums) *UsersUpdate
AddAlbums adds the "albums" edges to the Albums entity.
func (*UsersUpdate) AddDeviceIDs ¶
func (uu *UsersUpdate) AddDeviceIDs(ids ...uint64) *UsersUpdate
AddDeviceIDs adds the "devices" edge to the Devices entity by IDs.
func (*UsersUpdate) AddDevices ¶
func (uu *UsersUpdate) AddDevices(d ...*Devices) *UsersUpdate
AddDevices adds the "devices" edges to the Devices entity.
func (*UsersUpdate) AddMusicIDs ¶
func (uu *UsersUpdate) AddMusicIDs(ids ...uint64) *UsersUpdate
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*UsersUpdate) AddMusics ¶
func (uu *UsersUpdate) AddMusics(m ...*Musics) *UsersUpdate
AddMusics adds the "musics" edges to the Musics entity.
func (*UsersUpdate) AddPlaylistIDs ¶
func (uu *UsersUpdate) AddPlaylistIDs(ids ...uint64) *UsersUpdate
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by IDs.
func (*UsersUpdate) AddPlaylists ¶
func (uu *UsersUpdate) AddPlaylists(p ...*Playlists) *UsersUpdate
AddPlaylists adds the "playlists" edges to the Playlists entity.
func (*UsersUpdate) ClearAlbums ¶
func (uu *UsersUpdate) ClearAlbums() *UsersUpdate
ClearAlbums clears all "albums" edges to the Albums entity.
func (*UsersUpdate) ClearAvatar ¶
func (uu *UsersUpdate) ClearAvatar() *UsersUpdate
ClearAvatar clears the value of the "avatar" field.
func (*UsersUpdate) ClearBio ¶
func (uu *UsersUpdate) ClearBio() *UsersUpdate
ClearBio clears the value of the "bio" field.
func (*UsersUpdate) ClearDevices ¶
func (uu *UsersUpdate) ClearDevices() *UsersUpdate
ClearDevices clears all "devices" edges to the Devices entity.
func (*UsersUpdate) ClearEmail ¶
func (uu *UsersUpdate) ClearEmail() *UsersUpdate
ClearEmail clears the value of the "email" field.
func (*UsersUpdate) ClearMusics ¶
func (uu *UsersUpdate) ClearMusics() *UsersUpdate
ClearMusics clears all "musics" edges to the Musics entity.
func (*UsersUpdate) ClearName ¶
func (uu *UsersUpdate) ClearName() *UsersUpdate
ClearName clears the value of the "name" field.
func (*UsersUpdate) ClearPassword ¶
func (uu *UsersUpdate) ClearPassword() *UsersUpdate
ClearPassword clears the value of the "password" field.
func (*UsersUpdate) ClearPlaylists ¶
func (uu *UsersUpdate) ClearPlaylists() *UsersUpdate
ClearPlaylists clears all "playlists" edges to the Playlists entity.
func (*UsersUpdate) Exec ¶
func (uu *UsersUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UsersUpdate) ExecX ¶
func (uu *UsersUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersUpdate) Mutation ¶
func (uu *UsersUpdate) Mutation() *UsersMutation
Mutation returns the UsersMutation object of the builder.
func (*UsersUpdate) RemoveAlbumIDs ¶
func (uu *UsersUpdate) RemoveAlbumIDs(ids ...uint64) *UsersUpdate
RemoveAlbumIDs removes the "albums" edge to Albums entities by IDs.
func (*UsersUpdate) RemoveAlbums ¶
func (uu *UsersUpdate) RemoveAlbums(a ...*Albums) *UsersUpdate
RemoveAlbums removes "albums" edges to Albums entities.
func (*UsersUpdate) RemoveDeviceIDs ¶
func (uu *UsersUpdate) RemoveDeviceIDs(ids ...uint64) *UsersUpdate
RemoveDeviceIDs removes the "devices" edge to Devices entities by IDs.
func (*UsersUpdate) RemoveDevices ¶
func (uu *UsersUpdate) RemoveDevices(d ...*Devices) *UsersUpdate
RemoveDevices removes "devices" edges to Devices entities.
func (*UsersUpdate) RemoveMusicIDs ¶
func (uu *UsersUpdate) RemoveMusicIDs(ids ...uint64) *UsersUpdate
RemoveMusicIDs removes the "musics" edge to Musics entities by IDs.
func (*UsersUpdate) RemoveMusics ¶
func (uu *UsersUpdate) RemoveMusics(m ...*Musics) *UsersUpdate
RemoveMusics removes "musics" edges to Musics entities.
func (*UsersUpdate) RemovePlaylistIDs ¶
func (uu *UsersUpdate) RemovePlaylistIDs(ids ...uint64) *UsersUpdate
RemovePlaylistIDs removes the "playlists" edge to Playlists entities by IDs.
func (*UsersUpdate) RemovePlaylists ¶
func (uu *UsersUpdate) RemovePlaylists(p ...*Playlists) *UsersUpdate
RemovePlaylists removes "playlists" edges to Playlists entities.
func (*UsersUpdate) Save ¶
func (uu *UsersUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UsersUpdate) SaveX ¶
func (uu *UsersUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UsersUpdate) SetAvatar ¶
func (uu *UsersUpdate) SetAvatar(s string) *UsersUpdate
SetAvatar sets the "avatar" field.
func (*UsersUpdate) SetBio ¶
func (uu *UsersUpdate) SetBio(s string) *UsersUpdate
SetBio sets the "bio" field.
func (*UsersUpdate) SetEmail ¶
func (uu *UsersUpdate) SetEmail(s string) *UsersUpdate
SetEmail sets the "email" field.
func (*UsersUpdate) SetName ¶
func (uu *UsersUpdate) SetName(s string) *UsersUpdate
SetName sets the "name" field.
func (*UsersUpdate) SetNillableAvatar ¶
func (uu *UsersUpdate) SetNillableAvatar(s *string) *UsersUpdate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UsersUpdate) SetNillableBio ¶
func (uu *UsersUpdate) SetNillableBio(s *string) *UsersUpdate
SetNillableBio sets the "bio" field if the given value is not nil.
func (*UsersUpdate) SetNillableEmail ¶
func (uu *UsersUpdate) SetNillableEmail(s *string) *UsersUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UsersUpdate) SetNillableName ¶
func (uu *UsersUpdate) SetNillableName(s *string) *UsersUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UsersUpdate) SetNillablePassword ¶
func (uu *UsersUpdate) SetNillablePassword(s *string) *UsersUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UsersUpdate) SetNillableUsername ¶
func (uu *UsersUpdate) SetNillableUsername(s *string) *UsersUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UsersUpdate) SetPassword ¶
func (uu *UsersUpdate) SetPassword(s string) *UsersUpdate
SetPassword sets the "password" field.
func (*UsersUpdate) SetUpdateTime ¶
func (uu *UsersUpdate) SetUpdateTime(t time.Time) *UsersUpdate
SetUpdateTime sets the "update_time" field.
func (*UsersUpdate) SetUsername ¶
func (uu *UsersUpdate) SetUsername(s string) *UsersUpdate
SetUsername sets the "username" field.
func (*UsersUpdate) Where ¶
func (uu *UsersUpdate) Where(ps ...predicate.Users) *UsersUpdate
Where appends a list predicates to the UsersUpdate builder.
type UsersUpdateOne ¶
type UsersUpdateOne struct {
// contains filtered or unexported fields
}
UsersUpdateOne is the builder for updating a single Users entity.
func (*UsersUpdateOne) AddAlbumIDs ¶
func (uuo *UsersUpdateOne) AddAlbumIDs(ids ...uint64) *UsersUpdateOne
AddAlbumIDs adds the "albums" edge to the Albums entity by IDs.
func (*UsersUpdateOne) AddAlbums ¶
func (uuo *UsersUpdateOne) AddAlbums(a ...*Albums) *UsersUpdateOne
AddAlbums adds the "albums" edges to the Albums entity.
func (*UsersUpdateOne) AddDeviceIDs ¶
func (uuo *UsersUpdateOne) AddDeviceIDs(ids ...uint64) *UsersUpdateOne
AddDeviceIDs adds the "devices" edge to the Devices entity by IDs.
func (*UsersUpdateOne) AddDevices ¶
func (uuo *UsersUpdateOne) AddDevices(d ...*Devices) *UsersUpdateOne
AddDevices adds the "devices" edges to the Devices entity.
func (*UsersUpdateOne) AddMusicIDs ¶
func (uuo *UsersUpdateOne) AddMusicIDs(ids ...uint64) *UsersUpdateOne
AddMusicIDs adds the "musics" edge to the Musics entity by IDs.
func (*UsersUpdateOne) AddMusics ¶
func (uuo *UsersUpdateOne) AddMusics(m ...*Musics) *UsersUpdateOne
AddMusics adds the "musics" edges to the Musics entity.
func (*UsersUpdateOne) AddPlaylistIDs ¶
func (uuo *UsersUpdateOne) AddPlaylistIDs(ids ...uint64) *UsersUpdateOne
AddPlaylistIDs adds the "playlists" edge to the Playlists entity by IDs.
func (*UsersUpdateOne) AddPlaylists ¶
func (uuo *UsersUpdateOne) AddPlaylists(p ...*Playlists) *UsersUpdateOne
AddPlaylists adds the "playlists" edges to the Playlists entity.
func (*UsersUpdateOne) ClearAlbums ¶
func (uuo *UsersUpdateOne) ClearAlbums() *UsersUpdateOne
ClearAlbums clears all "albums" edges to the Albums entity.
func (*UsersUpdateOne) ClearAvatar ¶
func (uuo *UsersUpdateOne) ClearAvatar() *UsersUpdateOne
ClearAvatar clears the value of the "avatar" field.
func (*UsersUpdateOne) ClearBio ¶
func (uuo *UsersUpdateOne) ClearBio() *UsersUpdateOne
ClearBio clears the value of the "bio" field.
func (*UsersUpdateOne) ClearDevices ¶
func (uuo *UsersUpdateOne) ClearDevices() *UsersUpdateOne
ClearDevices clears all "devices" edges to the Devices entity.
func (*UsersUpdateOne) ClearEmail ¶
func (uuo *UsersUpdateOne) ClearEmail() *UsersUpdateOne
ClearEmail clears the value of the "email" field.
func (*UsersUpdateOne) ClearMusics ¶
func (uuo *UsersUpdateOne) ClearMusics() *UsersUpdateOne
ClearMusics clears all "musics" edges to the Musics entity.
func (*UsersUpdateOne) ClearName ¶
func (uuo *UsersUpdateOne) ClearName() *UsersUpdateOne
ClearName clears the value of the "name" field.
func (*UsersUpdateOne) ClearPassword ¶
func (uuo *UsersUpdateOne) ClearPassword() *UsersUpdateOne
ClearPassword clears the value of the "password" field.
func (*UsersUpdateOne) ClearPlaylists ¶
func (uuo *UsersUpdateOne) ClearPlaylists() *UsersUpdateOne
ClearPlaylists clears all "playlists" edges to the Playlists entity.
func (*UsersUpdateOne) Exec ¶
func (uuo *UsersUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UsersUpdateOne) ExecX ¶
func (uuo *UsersUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersUpdateOne) Mutation ¶
func (uuo *UsersUpdateOne) Mutation() *UsersMutation
Mutation returns the UsersMutation object of the builder.
func (*UsersUpdateOne) RemoveAlbumIDs ¶
func (uuo *UsersUpdateOne) RemoveAlbumIDs(ids ...uint64) *UsersUpdateOne
RemoveAlbumIDs removes the "albums" edge to Albums entities by IDs.
func (*UsersUpdateOne) RemoveAlbums ¶
func (uuo *UsersUpdateOne) RemoveAlbums(a ...*Albums) *UsersUpdateOne
RemoveAlbums removes "albums" edges to Albums entities.
func (*UsersUpdateOne) RemoveDeviceIDs ¶
func (uuo *UsersUpdateOne) RemoveDeviceIDs(ids ...uint64) *UsersUpdateOne
RemoveDeviceIDs removes the "devices" edge to Devices entities by IDs.
func (*UsersUpdateOne) RemoveDevices ¶
func (uuo *UsersUpdateOne) RemoveDevices(d ...*Devices) *UsersUpdateOne
RemoveDevices removes "devices" edges to Devices entities.
func (*UsersUpdateOne) RemoveMusicIDs ¶
func (uuo *UsersUpdateOne) RemoveMusicIDs(ids ...uint64) *UsersUpdateOne
RemoveMusicIDs removes the "musics" edge to Musics entities by IDs.
func (*UsersUpdateOne) RemoveMusics ¶
func (uuo *UsersUpdateOne) RemoveMusics(m ...*Musics) *UsersUpdateOne
RemoveMusics removes "musics" edges to Musics entities.
func (*UsersUpdateOne) RemovePlaylistIDs ¶
func (uuo *UsersUpdateOne) RemovePlaylistIDs(ids ...uint64) *UsersUpdateOne
RemovePlaylistIDs removes the "playlists" edge to Playlists entities by IDs.
func (*UsersUpdateOne) RemovePlaylists ¶
func (uuo *UsersUpdateOne) RemovePlaylists(p ...*Playlists) *UsersUpdateOne
RemovePlaylists removes "playlists" edges to Playlists entities.
func (*UsersUpdateOne) Save ¶
func (uuo *UsersUpdateOne) Save(ctx context.Context) (*Users, error)
Save executes the query and returns the updated Users entity.
func (*UsersUpdateOne) SaveX ¶
func (uuo *UsersUpdateOne) SaveX(ctx context.Context) *Users
SaveX is like Save, but panics if an error occurs.
func (*UsersUpdateOne) Select ¶
func (uuo *UsersUpdateOne) Select(field string, fields ...string) *UsersUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UsersUpdateOne) SetAvatar ¶
func (uuo *UsersUpdateOne) SetAvatar(s string) *UsersUpdateOne
SetAvatar sets the "avatar" field.
func (*UsersUpdateOne) SetBio ¶
func (uuo *UsersUpdateOne) SetBio(s string) *UsersUpdateOne
SetBio sets the "bio" field.
func (*UsersUpdateOne) SetEmail ¶
func (uuo *UsersUpdateOne) SetEmail(s string) *UsersUpdateOne
SetEmail sets the "email" field.
func (*UsersUpdateOne) SetName ¶
func (uuo *UsersUpdateOne) SetName(s string) *UsersUpdateOne
SetName sets the "name" field.
func (*UsersUpdateOne) SetNillableAvatar ¶
func (uuo *UsersUpdateOne) SetNillableAvatar(s *string) *UsersUpdateOne
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableBio ¶
func (uuo *UsersUpdateOne) SetNillableBio(s *string) *UsersUpdateOne
SetNillableBio sets the "bio" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableEmail ¶
func (uuo *UsersUpdateOne) SetNillableEmail(s *string) *UsersUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableName ¶
func (uuo *UsersUpdateOne) SetNillableName(s *string) *UsersUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*UsersUpdateOne) SetNillablePassword ¶
func (uuo *UsersUpdateOne) SetNillablePassword(s *string) *UsersUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableUsername ¶
func (uuo *UsersUpdateOne) SetNillableUsername(s *string) *UsersUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UsersUpdateOne) SetPassword ¶
func (uuo *UsersUpdateOne) SetPassword(s string) *UsersUpdateOne
SetPassword sets the "password" field.
func (*UsersUpdateOne) SetUpdateTime ¶
func (uuo *UsersUpdateOne) SetUpdateTime(t time.Time) *UsersUpdateOne
SetUpdateTime sets the "update_time" field.
func (*UsersUpdateOne) SetUsername ¶
func (uuo *UsersUpdateOne) SetUsername(s string) *UsersUpdateOne
SetUsername sets the "username" field.
func (*UsersUpdateOne) Where ¶
func (uuo *UsersUpdateOne) Where(ps ...predicate.Users) *UsersUpdateOne
Where appends a list predicates to the UsersUpdate builder.
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 Videos ¶
type Videos struct { // ID of the ent. ID int `json:"id,omitempty"` // contains filtered or unexported fields }
Videos is the model entity for the Videos schema.
func (*Videos) Unwrap ¶
Unwrap unwraps the Videos 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 (*Videos) Update ¶
func (v *Videos) Update() *VideosUpdateOne
Update returns a builder for updating this Videos. Note that you need to call Videos.Unwrap() before calling this method if this Videos was returned from a transaction, and the transaction was committed or rolled back.
type VideosClient ¶
type VideosClient struct {
// contains filtered or unexported fields
}
VideosClient is a client for the Videos schema.
func NewVideosClient ¶
func NewVideosClient(c config) *VideosClient
NewVideosClient returns a client for the Videos from the given config.
func (*VideosClient) Create ¶
func (c *VideosClient) Create() *VideosCreate
Create returns a builder for creating a Videos entity.
func (*VideosClient) CreateBulk ¶
func (c *VideosClient) CreateBulk(builders ...*VideosCreate) *VideosCreateBulk
CreateBulk returns a builder for creating a bulk of Videos entities.
func (*VideosClient) Delete ¶
func (c *VideosClient) Delete() *VideosDelete
Delete returns a delete builder for Videos.
func (*VideosClient) DeleteOne ¶
func (c *VideosClient) DeleteOne(v *Videos) *VideosDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*VideosClient) DeleteOneID ¶
func (c *VideosClient) DeleteOneID(id int) *VideosDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*VideosClient) GetX ¶
func (c *VideosClient) GetX(ctx context.Context, id int) *Videos
GetX is like Get, but panics if an error occurs.
func (*VideosClient) Intercept ¶
func (c *VideosClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `videos.Intercept(f(g(h())))`.
func (*VideosClient) Interceptors ¶
func (c *VideosClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*VideosClient) MapCreateBulk ¶
func (c *VideosClient) MapCreateBulk(slice any, setFunc func(*VideosCreate, int)) *VideosCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*VideosClient) Query ¶
func (c *VideosClient) Query() *VideosQuery
Query returns a query builder for Videos.
func (*VideosClient) Update ¶
func (c *VideosClient) Update() *VideosUpdate
Update returns an update builder for Videos.
func (*VideosClient) UpdateOne ¶
func (c *VideosClient) UpdateOne(v *Videos) *VideosUpdateOne
UpdateOne returns an update builder for the given entity.
func (*VideosClient) UpdateOneID ¶
func (c *VideosClient) UpdateOneID(id int) *VideosUpdateOne
UpdateOneID returns an update builder for the given id.
func (*VideosClient) Use ¶
func (c *VideosClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `videos.Hooks(f(g(h())))`.
type VideosCreate ¶
type VideosCreate struct {
// contains filtered or unexported fields
}
VideosCreate is the builder for creating a Videos entity.
func (*VideosCreate) Exec ¶
func (vc *VideosCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*VideosCreate) ExecX ¶
func (vc *VideosCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideosCreate) Mutation ¶
func (vc *VideosCreate) Mutation() *VideosMutation
Mutation returns the VideosMutation object of the builder.
type VideosCreateBulk ¶
type VideosCreateBulk struct {
// contains filtered or unexported fields
}
VideosCreateBulk is the builder for creating many Videos entities in bulk.
func (*VideosCreateBulk) Exec ¶
func (vcb *VideosCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*VideosCreateBulk) ExecX ¶
func (vcb *VideosCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type VideosDelete ¶
type VideosDelete struct {
// contains filtered or unexported fields
}
VideosDelete is the builder for deleting a Videos entity.
func (*VideosDelete) Exec ¶
func (vd *VideosDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*VideosDelete) ExecX ¶
func (vd *VideosDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*VideosDelete) Where ¶
func (vd *VideosDelete) Where(ps ...predicate.Videos) *VideosDelete
Where appends a list predicates to the VideosDelete builder.
type VideosDeleteOne ¶
type VideosDeleteOne struct {
// contains filtered or unexported fields
}
VideosDeleteOne is the builder for deleting a single Videos entity.
func (*VideosDeleteOne) Exec ¶
func (vdo *VideosDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*VideosDeleteOne) ExecX ¶
func (vdo *VideosDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideosDeleteOne) Where ¶
func (vdo *VideosDeleteOne) Where(ps ...predicate.Videos) *VideosDeleteOne
Where appends a list predicates to the VideosDelete builder.
type VideosGroupBy ¶
type VideosGroupBy struct {
// contains filtered or unexported fields
}
VideosGroupBy is the group-by builder for Videos entities.
func (*VideosGroupBy) Aggregate ¶
func (vgb *VideosGroupBy) Aggregate(fns ...AggregateFunc) *VideosGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*VideosGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VideosGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VideosGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VideosGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VideosGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VideosGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VideosGroupBy) Scan ¶
func (vgb *VideosGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VideosGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VideosMutation ¶
type VideosMutation struct {
// contains filtered or unexported fields
}
VideosMutation represents an operation that mutates the Videos nodes in the graph.
func (*VideosMutation) AddField ¶
func (m *VideosMutation) 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 (*VideosMutation) AddedEdges ¶
func (m *VideosMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*VideosMutation) AddedField ¶
func (m *VideosMutation) 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 (*VideosMutation) AddedFields ¶
func (m *VideosMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*VideosMutation) AddedIDs ¶
func (m *VideosMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*VideosMutation) ClearEdge ¶
func (m *VideosMutation) 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 (*VideosMutation) ClearField ¶
func (m *VideosMutation) 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 (*VideosMutation) ClearedEdges ¶
func (m *VideosMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*VideosMutation) ClearedFields ¶
func (m *VideosMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (VideosMutation) Client ¶
func (m VideosMutation) 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 (*VideosMutation) EdgeCleared ¶
func (m *VideosMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*VideosMutation) Field ¶
func (m *VideosMutation) 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 (*VideosMutation) FieldCleared ¶
func (m *VideosMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*VideosMutation) Fields ¶
func (m *VideosMutation) 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 (*VideosMutation) ID ¶
func (m *VideosMutation) 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 (*VideosMutation) IDs ¶
func (m *VideosMutation) 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 (*VideosMutation) 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 (*VideosMutation) RemovedEdges ¶
func (m *VideosMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*VideosMutation) RemovedIDs ¶
func (m *VideosMutation) 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 (*VideosMutation) ResetEdge ¶
func (m *VideosMutation) 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 (*VideosMutation) ResetField ¶
func (m *VideosMutation) 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 (*VideosMutation) SetField ¶
func (m *VideosMutation) 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 (*VideosMutation) SetOp ¶
func (m *VideosMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (VideosMutation) Tx ¶
func (m VideosMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*VideosMutation) Type ¶
func (m *VideosMutation) Type() string
Type returns the node type of this mutation (Videos).
func (*VideosMutation) Where ¶
func (m *VideosMutation) Where(ps ...predicate.Videos)
Where appends a list predicates to the VideosMutation builder.
func (*VideosMutation) WhereP ¶
func (m *VideosMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the VideosMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type VideosQuery ¶
type VideosQuery struct {
// contains filtered or unexported fields
}
VideosQuery is the builder for querying Videos entities.
func (*VideosQuery) Aggregate ¶
func (vq *VideosQuery) Aggregate(fns ...AggregateFunc) *VideosSelect
Aggregate returns a VideosSelect configured with the given aggregations.
func (*VideosQuery) All ¶
func (vq *VideosQuery) All(ctx context.Context) ([]*Videos, error)
All executes the query and returns a list of VideosSlice.
func (*VideosQuery) AllX ¶
func (vq *VideosQuery) AllX(ctx context.Context) []*Videos
AllX is like All, but panics if an error occurs.
func (*VideosQuery) Clone ¶
func (vq *VideosQuery) Clone() *VideosQuery
Clone returns a duplicate of the VideosQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*VideosQuery) Count ¶
func (vq *VideosQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*VideosQuery) CountX ¶
func (vq *VideosQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*VideosQuery) Exist ¶
func (vq *VideosQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*VideosQuery) ExistX ¶
func (vq *VideosQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*VideosQuery) First ¶
func (vq *VideosQuery) First(ctx context.Context) (*Videos, error)
First returns the first Videos entity from the query. Returns a *NotFoundError when no Videos was found.
func (*VideosQuery) FirstID ¶
func (vq *VideosQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Videos ID from the query. Returns a *NotFoundError when no Videos ID was found.
func (*VideosQuery) FirstIDX ¶
func (vq *VideosQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*VideosQuery) FirstX ¶
func (vq *VideosQuery) FirstX(ctx context.Context) *Videos
FirstX is like First, but panics if an error occurs.
func (*VideosQuery) GroupBy ¶
func (vq *VideosQuery) GroupBy(field string, fields ...string) *VideosGroupBy
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.
func (*VideosQuery) IDs ¶
func (vq *VideosQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Videos IDs.
func (*VideosQuery) IDsX ¶
func (vq *VideosQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*VideosQuery) Limit ¶
func (vq *VideosQuery) Limit(limit int) *VideosQuery
Limit the number of records to be returned by this query.
func (*VideosQuery) Offset ¶
func (vq *VideosQuery) Offset(offset int) *VideosQuery
Offset to start from.
func (*VideosQuery) Only ¶
func (vq *VideosQuery) Only(ctx context.Context) (*Videos, error)
Only returns a single Videos entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Videos entity is found. Returns a *NotFoundError when no Videos entities are found.
func (*VideosQuery) OnlyID ¶
func (vq *VideosQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Videos ID in the query. Returns a *NotSingularError when more than one Videos ID is found. Returns a *NotFoundError when no entities are found.
func (*VideosQuery) OnlyIDX ¶
func (vq *VideosQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*VideosQuery) OnlyX ¶
func (vq *VideosQuery) OnlyX(ctx context.Context) *Videos
OnlyX is like Only, but panics if an error occurs.
func (*VideosQuery) Order ¶
func (vq *VideosQuery) Order(o ...videos.OrderOption) *VideosQuery
Order specifies how the records should be ordered.
func (*VideosQuery) Select ¶
func (vq *VideosQuery) Select(fields ...string) *VideosSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*VideosQuery) Unique ¶
func (vq *VideosQuery) Unique(unique bool) *VideosQuery
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 (*VideosQuery) Where ¶
func (vq *VideosQuery) Where(ps ...predicate.Videos) *VideosQuery
Where adds a new predicate for the VideosQuery builder.
type VideosSelect ¶
type VideosSelect struct { *VideosQuery // contains filtered or unexported fields }
VideosSelect is the builder for selecting fields of Videos entities.
func (*VideosSelect) Aggregate ¶
func (vs *VideosSelect) Aggregate(fns ...AggregateFunc) *VideosSelect
Aggregate adds the given aggregation functions to the selector query.
func (*VideosSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VideosSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VideosSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VideosSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VideosSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VideosSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VideosSelect) Scan ¶
func (vs *VideosSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VideosSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VideosUpdate ¶
type VideosUpdate struct {
// contains filtered or unexported fields
}
VideosUpdate is the builder for updating Videos entities.
func (*VideosUpdate) Exec ¶
func (vu *VideosUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*VideosUpdate) ExecX ¶
func (vu *VideosUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideosUpdate) Mutation ¶
func (vu *VideosUpdate) Mutation() *VideosMutation
Mutation returns the VideosMutation object of the builder.
func (*VideosUpdate) Save ¶
func (vu *VideosUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*VideosUpdate) SaveX ¶
func (vu *VideosUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*VideosUpdate) Where ¶
func (vu *VideosUpdate) Where(ps ...predicate.Videos) *VideosUpdate
Where appends a list predicates to the VideosUpdate builder.
type VideosUpdateOne ¶
type VideosUpdateOne struct {
// contains filtered or unexported fields
}
VideosUpdateOne is the builder for updating a single Videos entity.
func (*VideosUpdateOne) Exec ¶
func (vuo *VideosUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*VideosUpdateOne) ExecX ¶
func (vuo *VideosUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VideosUpdateOne) Mutation ¶
func (vuo *VideosUpdateOne) Mutation() *VideosMutation
Mutation returns the VideosMutation object of the builder.
func (*VideosUpdateOne) Save ¶
func (vuo *VideosUpdateOne) Save(ctx context.Context) (*Videos, error)
Save executes the query and returns the updated Videos entity.
func (*VideosUpdateOne) SaveX ¶
func (vuo *VideosUpdateOne) SaveX(ctx context.Context) *Videos
SaveX is like Save, but panics if an error occurs.
func (*VideosUpdateOne) Select ¶
func (vuo *VideosUpdateOne) Select(field string, fields ...string) *VideosUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*VideosUpdateOne) Where ¶
func (vuo *VideosUpdateOne) Where(ps ...predicate.Videos) *VideosUpdateOne
Where appends a list predicates to the VideosUpdate builder.
Source Files ¶
- actors.go
- actors_create.go
- actors_delete.go
- actors_query.go
- actors_update.go
- albums.go
- albums_create.go
- albums_delete.go
- albums_query.go
- albums_update.go
- artists.go
- artists_create.go
- artists_delete.go
- artists_query.go
- artists_update.go
- audiobooks.go
- audiobooks_create.go
- audiobooks_delete.go
- audiobooks_query.go
- audiobooks_update.go
- categorys.go
- categorys_create.go
- categorys_delete.go
- categorys_query.go
- categorys_update.go
- client.go
- devices.go
- devices_create.go
- devices_delete.go
- devices_query.go
- devices_update.go
- directors.go
- directors_create.go
- directors_delete.go
- directors_query.go
- directors_update.go
- ent.go
- files.go
- files_create.go
- files_delete.go
- files_query.go
- files_update.go
- generate.go
- images.go
- images_create.go
- images_delete.go
- images_query.go
- images_update.go
- musics.go
- musics_create.go
- musics_delete.go
- musics_query.go
- musics_update.go
- mutation.go
- oidc.go
- oidc_create.go
- oidc_delete.go
- oidc_query.go
- oidc_update.go
- playlists.go
- playlists_create.go
- playlists_delete.go
- playlists_query.go
- playlists_update.go
- runtime.go
- tx.go
- users.go
- users_create.go
- users_delete.go
- users_query.go
- users_update.go
- videos.go
- videos_create.go
- videos_delete.go
- videos_query.go
- videos_update.go